Adding support of NGP FSPs

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11383 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
zhaoertao 2012-01-16 06:40:55 +00:00
parent 2858e37b67
commit cc452b7485

View File

@ -2916,6 +2916,7 @@ sub getIPaddress
my $parent;
my $ppctab = xCAT::Table->new( 'ppc' );
my $vpdtab = xCAT::Table->new( 'vpd' );
my $mptab = xCAT::Table->new( 'mp');
if ($type eq "bpa" or $type eq "fsp") {
my $tmp_p = $ppctab->getNodeAttribs($nodetocheck, ['parent']);
if ($tmp_p and $tmp_p->{parent}) {
@ -2923,6 +2924,17 @@ sub getIPaddress
} else {
return undef;
}
if ($mptab) {
my $tmp_p_type = $mptab->getNodeAttribs($parent, ['nodetype']);
if ($tmp_p_type && $tmp_p_type->{nodetype} =~ /^(cmm|mp)$/) {
return getNodeIPaddress($nodetocheck);
} else {
my $p_type = xCAT::DBobjUtils->getnodetype($parent);
if ($p_type && $p_type =~ /^(cmm|mp)$/) {
return getNodeIPaddress($nodetocheck);
}
}
}
my $tmp_s = $vpdtab->getNodeAttribs($nodetocheck, ['side']);
if ($tmp_s->{side} and ($tmp_s->{side} =~ /(A|B)-\d/i)) {
$side = $1; # get side for the fsp, in order to get its brothers