diff --git a/perl-xCAT/xCAT/Schema.pm b/perl-xCAT/xCAT/Schema.pm index 1b64915ca..a2bb755f7 100644 --- a/perl-xCAT/xCAT/Schema.pm +++ b/perl-xCAT/xCAT/Schema.pm @@ -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', diff --git a/xCAT-server/lib/xcat/plugins/blade.pm b/xCAT-server/lib/xcat/plugins/blade.pm index c61106de2..e40cd30a2 100644 --- a/xCAT-server/lib/xcat/plugins/blade.pm +++ b/xCAT-server/lib/xcat/plugins/blade.pm @@ -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";