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/branches/2.8@16116 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
zhaoertao 2013-04-28 06:21:21 +00:00
parent d7892547c3
commit e6c6be8827
2 changed files with 27 additions and 6 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;
@ -1740,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'
@ -1770,6 +1770,8 @@ sub rscan_xml {
} elsif ( /^mgt$/ ) {
if ($origtype eq "ppcblade") {
$d = "fsp";
} elsif ($origtype eq "xblade") {
$d = "ipmi";
} else {
$d = "blade";
}
@ -1778,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;
@ -1795,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;
@ -1824,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'
@ -1862,6 +1870,8 @@ sub rscan_stanza {
} elsif ( /^mgt$/ ) {
if ($origtype eq "ppcblade") {
$d = "fsp";
} elsif ($origtype eq "xblade") {
$d = "ipmi";
} else {
$d = "blade";
}
@ -1870,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;
@ -1887,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";