diff --git a/perl-xCAT/xCAT/PPCdb.pm b/perl-xCAT/xCAT/PPCdb.pm index e41772ad6..4bd6ff5bc 100644 --- a/perl-xCAT/xCAT/PPCdb.pm +++ b/perl-xCAT/xCAT/PPCdb.pm @@ -106,6 +106,9 @@ sub add_ppc { # Update nodehm table ########################### $db{nodehm}->setNodeAttribs( $name, {mgt=>$hwtype} ); + if($type =~ /^lpar$/){ + $db{nodehm}->setNodeAttribs( $name, {cons=>$hwtype} ); + } $db{nodehm}{commit} = 1; } ############################### diff --git a/perl-xCAT/xCAT/PPCscan.pm b/perl-xCAT/xCAT/PPCscan.pm index 6b5ac3d53..91b37a84e 100644 --- a/perl-xCAT/xCAT/PPCscan.pm +++ b/perl-xCAT/xCAT/PPCscan.pm @@ -25,7 +25,7 @@ my @header = ( ["serial-number", "%-15s" ], ["address", "%s\n" ]); -my @attribs = qw(nodetype node id mtm serial hcp pprofile parent groups mgt); +my @attribs = qw(nodetype node id mtm serial hcp pprofile parent groups mgt cons); my %nodetype = ( fsp => $::NODETYPE_FSP, bpa => $::NODETYPE_BPA, @@ -468,6 +468,13 @@ sub format_stanza { $d = "$type,all"; } elsif ( /^mgt$/ ) { $d = $hwtype; + } elsif ( /^cons$/ ) { + if ( $type eq "lpar" ) { + $d = $hwtype; + } else { + $d = undef; + } + } elsif ( /^(mtm|serial)$/ ) { if ( $type eq "lpar" ) { $d = undef; @@ -526,6 +533,12 @@ sub format_xml { $d = "$type,all"; } elsif ( /^mgt$/ ) { $d = $hwtype; + } elsif ( /^cons$/ ) { + if ( $type eq "lpar" ) { + $d = $hwtype; + } else { + $d = undef; + } } elsif ( /^(mtm|serial)$/ ) { if ( $type eq "lpar" ) { $d = undef; diff --git a/xCAT-client/pods/man1/rscan.1.pod b/xCAT-client/pods/man1/rscan.1.pod index 9e171d6cc..6a4e8e46e 100644 --- a/xCAT-client/pods/man1/rscan.1.pod +++ b/xCAT-client/pods/man1/rscan.1.pod @@ -68,6 +68,7 @@ I Output is similar to: + 10B7D1G @@ -81,6 +82,7 @@ Output is similar to: + ivm lpar01 Server-9133-55A-10B7D1G @@ -94,6 +96,7 @@ Output is similar to: + ivm lpar02 Server-9133-55A-10B7D1G @@ -124,6 +127,7 @@ Output is similar to: parent= groups=bpa,all mgt=hmc + cons= Server-9119-590-SN02C5F9E: objtype=node @@ -136,6 +140,7 @@ Output is similar to: parent=Server-9458-100992001Y_B groups=fsp,all mgt=hmc + cons= lpar01: objtype=node @@ -148,6 +153,7 @@ Output is similar to: parent=Server-9119-590-SN02C5F9E groups=lpar,all mgt=hmc + cons=hmc lpar02: objtype=node @@ -160,7 +166,7 @@ Output is similar to: parent=Server-9119-590-SN02C5F9E groups=lpar,all mgt=hmc - + cons=hmc =head1 FILES