Proposal from defect SW098533,the header is confusing and there should not be any data returned when there is no gard records

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10550 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jjhua 2011-09-19 10:16:17 +00:00
parent d6d0a04f43
commit 646a9a3353

View File

@ -282,17 +282,18 @@ sub deconfig {
#print Dumper($decfg);
my $node = $decfg->{NODE};
if( defined($node) && exists($node->{Location_code}) ) {
push @result,[$name,"Deconfigured resources", 0];
push @result,[$name,"Location_code RID Call_Out_Method Call_Out_Hardware_State TYPE", 0];
push @result,[$name,"$node->{Location_code} $node->{RID}", 0];
my $Call_Out_Hardware_State ;
my $Call_Out_Method;
my $Location_code;
my $RID;
my $TYPE;
if(ref($node->{GARDRECORD}) ne "ARRAY") {
push @result,[$name,"NO Deconfigured resources", 0];
return( \@result );
}
push @result,[$name,"Deconfigured resources", 0];
push @result,[$name,"Location_code RID Call_Out_Method Call_Out_Hardware_State TYPE", 0];
push @result,[$name,"$node->{Location_code} $node->{RID}", 0];
foreach my $unit(@{$node->{GARDRECORD}}) {
while (my ($key, $unit3) = each(%$unit) ) {