fix bug 3536 rscan cmm -z for Blacktip blades has wrong hwtype=xblade and missing cons

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16117 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
zhaoertao 2013-04-28 06:28:55 +00:00
parent 7839592fbc
commit e3d0fb9c9e
2 changed files with 27 additions and 8 deletions

View File

@ -1930,6 +1930,11 @@ my @nodeattrs = (
tabentry => 'mp.nodetype',
access_tabentry => 'mp.node=attr:node',
},
{attr_name => 'hwtype',
only_if => 'mgt=ipmi',
tabentry => 'mp.nodetype',
access_tabentry => 'mp.node=attr:node',
},
{attr_name => 'supernode',
tabentry => 'ppc.supernode',
access_tabentry => 'ppc.node=attr:node',
@ -2048,7 +2053,7 @@ my @nodeattrs = (
tabentry => 'mp.id',
access_tabentry => 'mp.node=attr:node',
},
{attr_name => 'id',
{attr_name => 'slotid',
only_if => 'mgt=ipmi',
tabentry => 'mp.id',
access_tabentry => 'mp.node=attr:node',

View File

@ -1541,7 +1541,7 @@ sub rscan {
}
foreach (@values ){
my @data = split /,/;
if ($data[0] eq "ppcblade") {
if ($data[0] eq "ppcblade" or $data[0] eq "xblade") {
$data[0] = "blade";
}
my $i = 0;
@ -1584,7 +1584,6 @@ sub rscan {
$name =~ s/ /_/;
$name =~ tr/A-Z/a-z/;
}
if (exists($opt{u})) {
## TRACE_LINE print "Rscan: orig_name [$name]\n";
@ -1741,7 +1740,7 @@ sub rscan_xml {
my $i = 0;
my $type = $data[0];
my $origtype = $type;
if ($type eq "ppcblade") {
if ($type eq "ppcblade" or $type eq "xblade") {
$type = "blade";
}
# ignore the blade server which status is 'Comm Error'
@ -1771,6 +1770,8 @@ sub rscan_xml {
} elsif ( /^mgt$/ ) {
if ($origtype eq "ppcblade") {
$d = "fsp";
} elsif ($origtype eq "xblade") {
$d = "ipmi";
} else {
$d = "blade";
}
@ -1779,13 +1780,15 @@ sub rscan_xml {
$d = "blade";
} elsif ($origtype eq "ppcblade"){
$d = "fsp";
} elsif ($origtype eq "xblade") {
$d = "ipmi";
} else {
$ignore = 1;
}
} elsif ( /^mpa$/ ) {
$d = $mpa;
} elsif ( /^hwtype$/ ) {
if ($origtype eq "ppcblade") {
if ($origtype eq "ppcblade" or $origtype eq "xblade") {
$d = "blade";
} else {
$d = $type;
@ -1796,6 +1799,10 @@ sub rscan_xml {
$href->{Node}->{slotid} = $d;
$d = "1";
}
elsif ($origtype eq "xblade") {
$href->{Node}->{slotid} = $d;
$ignore = 1;
}
} elsif (/^hcp/) {
if ($origtype eq "ppcblade") {
$href->{Node}->{parent} = $mpa;
@ -1825,7 +1832,7 @@ sub rscan_stanza {
my $i = 0;
my $type = $data[0];
my $origtype = $type;
if ($type eq "ppcblade") {
if ($type eq "ppcblade" or $type eq "xblade") {
$type = "blade";
}
# ignore the blade server which status is 'Comm Error'
@ -1842,7 +1849,6 @@ sub rscan_stanza {
} else {
$objname = $data[1];
}
$result .= "$objname:\n\tobjtype=node\n";
foreach ( @rscan_attribs ) {
@ -1864,6 +1870,8 @@ sub rscan_stanza {
} elsif ( /^mgt$/ ) {
if ($origtype eq "ppcblade") {
$d = "fsp";
} elsif ($origtype eq "xblade") {
$d = "ipmi";
} else {
$d = "blade";
}
@ -1872,13 +1880,15 @@ sub rscan_stanza {
$d = "blade";
} elsif ($origtype eq "ppcblade"){
$d = "fsp";
} elsif ($origtype eq "xblade") {
$d = "ipmi";
} else {
$ignore = 1;
}
} elsif ( /^mpa$/ ) {
$d = $mpa;
} elsif ( /^hwtype$/ ) {
if ($origtype eq "ppcblade") {
if ($origtype eq "ppcblade" or $origtype eq "xblade") {
$d = "blade";
} else {
$d = $type;
@ -1889,6 +1899,10 @@ sub rscan_stanza {
$result .= "\tslotid=$d\n";
$d = "1";
}
elsif ($origtype eq "xblade") {
$result .= "\tslotid=$d\n";
$ignore = 1;
}
} elsif (/^hcp/) {
if ($origtype eq "ppcblade") {
$result .= "\tparent=$mpa\n";