From 6cc88808d49e607e423bdd05d03e88800fe65f41 Mon Sep 17 00:00:00 2001 From: cjhardee Date: Wed, 28 Jul 2010 16:19:51 +0000 Subject: [PATCH] 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 --- perl-xCAT/xCAT/Table.pm | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/perl-xCAT/xCAT/Table.pm b/perl-xCAT/xCAT/Table.pm index 8cb0e8998..dec0eafcf 100644 --- a/perl-xCAT/xCAT/Table.pm +++ b/perl-xCAT/xCAT/Table.pm @@ -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; }