Fixed a problem with missing attributes from getNodeAttributes

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6894 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
cjhardee 2010-07-28 16:19:51 +00:00
parent 995023136e
commit 6cc88808d4

View File

@ -2215,6 +2215,9 @@ sub getNodeAttribs_nosub_old
}
if ($return)
{
print "data array\n";
print Dumper(@data);
print "\n";
return wantarray ? @data : $data[0];
}
else
@ -2349,7 +2352,6 @@ sub getNodeAttribs_nosub_returnany
my $groupResult;
my $wasAdded; #used to keep track
my %attribsDone;
my %newEntry;
foreach $group (@nodegroups)
{
@ -2407,16 +2409,22 @@ sub getNodeAttribs_nosub_returnany
}
}
my @condResults;
my %condHash;
#run through the results and remove any "+=NEXTRECORD" ocurrances
for $result (@results)
{
for my $key (keys %$result)
{
$result->{$key} =~ s/\+=NEXTRECORD$//;
$result->{$key} =~ s/\+=NEXTRECORD//g;
$condHash{$key} = $result->{$key};
}
}
push(@condResults, \%condHash);
#Don't need to 'correct' node attribute, considering result of the if that governs this code block?
return @results;
return @condResults;
}