enhancement for 'rvitals <Flex node> all' to display 'lcds' infomaiton in case no 'nodetype' attribute defined in 'mp' table

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@15234 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
zhaoertao 2013-02-22 05:28:49 +00:00
parent 2e08e93f6a
commit 2579006170

@ -4454,11 +4454,11 @@ sub get_blades_for_mpa {
my %blades_hash = ();
my $mptab = xCAT::Table->new('mp');
my $ppctab = xCAT::Table->new('ppc');
my @attribs = qw(id pprofile parent hcp);
my @attribs = qw(id nodetype parent hcp);
if (!defined($mptab) or !defined($ppctab)) {
return undef;
}
my @nodearray = $mptab->getAttribs({mpa=>$mpa,nodetype=>"blade"}, qw(node));
my @nodearray = $mptab->getAttribs({mpa=>$mpa}, qw(node));
my @blades = ();
my $nodesattrs;
if (!defined(@nodearray)) {
@ -4476,12 +4476,11 @@ sub get_blades_for_mpa {
my @values = ();
if (!defined($att)) {
next;
} elsif ($att and $att->{parent} and ($att->{parent} ne $mpa)) {
} elsif (!defined($att->{parent}) or ($att->{parent} ne $mpa) or !defined($att->{nodetype}) or $att->{nodetype} ne "blade") {
next;
}
my $request;
my $nodetype = "blade";
my $hcp_ip = xCAT::FSPUtils::getIPaddress($request, $nodetype, $att->{hcp});
my $hcp_ip = xCAT::FSPUtils::getIPaddress($request, $att->{nodetype}, $att->{hcp});
if (!defined($hcp_ip) or ($hcp_ip == -3)) {
next;
}