Commit 1b65c4d6 authored by Mike Hibler's avatar Mike Hibler

Check for per-node disktype/disksize/bootdisk_unit values ahead of node_type.

parent cd8a4873
......@@ -1494,6 +1494,36 @@ sub default_pxeboot($) {
return NodeTypeAttribute($self, "pxe_boot_path", undef);
}
sub disksize($;$) {
my ($self,$stuff) = @_;
my $val = undef;
if (NodeAttribute($self, "disksize", \$val) == 0 && defined($val)) {
return $val;
}
return NodeTypeInfo($self)->disksize($stuff);
}
sub disktype($;$) {
my ($self,$stuff) = @_;
my $val = undef;
if (NodeAttribute($self, "disktype", \$val) == 0 && defined($val)) {
return $val;
}
return NodeTypeInfo($self)->disktype($stuff);
}
sub bootdisk_unit($;$) {
my ($self,$stuff) = @_;
my $val = undef;
if (NodeAttribute($self, "bootdisk_unit", \$val) == 0 && defined($val)) {
return $val;
}
return NodeTypeInfo($self)->bootdisk_unit($stuff);
}
#
# And these are the less common attributes, but still common enough to
# warrant shortcuts.
......@@ -1507,15 +1537,6 @@ sub jail_osid($;$) {
sub imageable($;$) {
return NodeTypeInfo($_[0])->imageable($_[1]);
}
sub disksize($;$) {
return NodeTypeInfo($_[0])->disksize($_[1]);
}
sub disktype($;$) {
return NodeTypeInfo($_[0])->disktype($_[1]);
}
sub bootdisk_unit($;$) {
return NodeTypeInfo($_[0])->bootdisk_unit($_[1]);
}
sub control_iface($;$) {
return NodeTypeInfo($_[0])->control_iface($_[1]);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment