Skip to content

Commit

Permalink
Add nodetype to pdu table
Browse files Browse the repository at this point in the history
  • Loading branch information
cxhong committed Feb 22, 2017
1 parent aeb9636 commit a7018a3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion perl-xCAT/xCAT/Schema.pm
Original file line number Diff line number Diff line change
Expand Up @@ -679,12 +679,13 @@ passed as argument rather than by table value',
},
},
pdu => {
cols => [qw(node machinetype modelnum serialnum outletCount comments disable)],
cols => [qw(node nodetype machinetype modelnum serialnum outletCount comments disable)],
keys => [qw(node)],
nodecol => "node",
table_desc => 'Parameters to use when interrogating pdus',
descriptions => {
node => 'The hostname/address of the pdu to which the settings apply',
nodetype => 'The node type should be pdu ',
machinetype => 'The pdu machine type',
modelnum => 'The pdu model number',
serialnum => 'The pdu serial number',
Expand Down Expand Up @@ -2853,6 +2854,11 @@ my @nodeattrs = (
#########################
## pdu table #
#########################
{ attr_name => 'nodetype',
only_if => 'nodetype=pdu',
tabentry => 'pdu.nodetype',
access_tabentry => 'pdu.node=attr:node',
},
{ attr_name => 'machinetype',
only_if => 'nodetype=pdu',
tabentry => 'pdu.machinetype',
Expand Down Expand Up @@ -4085,6 +4091,7 @@ push(@{ $defspec{group}->{'attrs'} }, @nodeattrs);
@{ $defspec{pdu}->{'attrs'} } =
(
{ attr_name => 'node',
only_if => 'nodetype=pdu',
tabentry => 'pdu.node',
access_tabentry => 'pdu.node=attr:node',
},
Expand Down

0 comments on commit a7018a3

Please sign in to comment.