Fix bug 3346280: rcons can't work with the lpar node
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9998 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
dcb7412c4c
commit
0eef3d1836
@ -24,11 +24,20 @@ my @header = (
|
||||
["serial-number", "%-15s" ],
|
||||
["side", "%-6s\n" ]);
|
||||
|
||||
my @attribs = qw(nodetype node id mtm serial side hcp pprofile parent groups mgt cons);
|
||||
my %nodetype = (
|
||||
my @attribs = qw(nodetype hwtype node id mtm serial side hcp pprofile parent groups mgt cons);
|
||||
my %globalnodetype = (
|
||||
fsp => $::NODETYPE_PPC,
|
||||
bpa => $::NODETYPE_PPC,
|
||||
cec => $::NODETYPE_PPC,
|
||||
frame=> $::NODETYPE_PPC,
|
||||
lpar =>"$::NODETYPE_PPC,$::NODETYPE_OSI"
|
||||
);
|
||||
my %globalhwtype = (
|
||||
fsp => $::NODETYPE_FSP,
|
||||
bpa => $::NODETYPE_BPA,
|
||||
lpar =>"$::NODETYPE_LPAR,$::NODETYPE_OSI"
|
||||
lpar => $::NODETYPE_LPAR,
|
||||
cec => $::NODETYPE_CEC,
|
||||
frame=> $::NODETYPE_FRAME,
|
||||
);
|
||||
|
||||
|
||||
@ -538,7 +547,9 @@ sub format_stanza {
|
||||
if ( /^node$/ ) {
|
||||
next;
|
||||
} elsif ( /^nodetype$/ ) {
|
||||
$d = $type;
|
||||
$d = $globalnodetype{$type};
|
||||
} elsif ( /^hwtype$/ ) {
|
||||
$d = $globalhwtype{$type};
|
||||
} elsif ( /^groups$/ ) {
|
||||
$d = "$type,all";
|
||||
} elsif ( /^mgt$/ ) {
|
||||
@ -554,6 +565,10 @@ sub format_stanza {
|
||||
if ( $type eq "lpar" ) {
|
||||
$d = undef;
|
||||
}
|
||||
} elsif (/^side$/) {
|
||||
unless ( $type =~ /^fsp|bpa$/ ) {
|
||||
next;
|
||||
}
|
||||
}
|
||||
$result .= "\t$_=$d\n";
|
||||
}
|
||||
@ -608,7 +623,9 @@ sub format_xml {
|
||||
my $d = $data[$i++];
|
||||
|
||||
if ( /^nodetype$/ ) {
|
||||
$d = $nodetype{$d};
|
||||
$d = $globalnodetype{$type};
|
||||
} elsif ( /^hwtype$/ ) {
|
||||
$d = $globalhwtype{$type};
|
||||
} elsif ( /^groups$/ ) {
|
||||
$d = "$type,all";
|
||||
} elsif ( /^mgt$/ ) {
|
||||
@ -623,6 +640,10 @@ sub format_xml {
|
||||
if ( $type eq "lpar" ) {
|
||||
$d = undef;
|
||||
}
|
||||
} elsif (/^side$/) {
|
||||
unless ( $type =~ /^fsp|bpa$/ ) {
|
||||
next;
|
||||
}
|
||||
}
|
||||
$href->{Node}->{$_} = $d;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user