mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-31 19:32:31 +00:00 
			
		
		
		
	fix bug 2713312
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3039 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		| @@ -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; | ||||
|         } | ||||
|         ############################### | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
| @@ -68,6 +68,7 @@ I<rscan ivm02 -x -w> | ||||
| Output is similar to: | ||||
|  | ||||
|  <Node> | ||||
|    <cons></cons> | ||||
|    <profile></profile> | ||||
|    <parent></parent> | ||||
|    <serial>10B7D1G</serial> | ||||
| @@ -81,6 +82,7 @@ Output is similar to: | ||||
|  </Node> | ||||
|  | ||||
|  <Node> | ||||
|    <cons>ivm</cons> | ||||
|    <profile>lpar01</profile> | ||||
|    <parent>Server-9133-55A-10B7D1G</parent> | ||||
|    <serial></serial> | ||||
| @@ -94,6 +96,7 @@ Output is similar to: | ||||
|  <Node> | ||||
|  | ||||
|  </Node> | ||||
|    <cons>ivm</cons> | ||||
|    <profile>lpar02</profile> | ||||
|    <parent>Server-9133-55A-10B7D1G</parent> | ||||
|    <serial></serial> | ||||
| @@ -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 | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user