From c9dd5b6aed8038451520531063411ff5f869c4b1 Mon Sep 17 00:00:00 2001 From: jjohnson2 Date: Mon, 18 May 2015 15:17:54 -0400 Subject: [PATCH] Fix issue with using getipmicons for pasu/piflash getipmicons structures the data differently from getNodesAttribs. Accomodate by merging each responses data in node by node rather than simply overwriting with the last data. --- xCAT-client/bin/pasu | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xCAT-client/bin/pasu b/xCAT-client/bin/pasu index b0c206532..1504d55cf 100755 --- a/xCAT-client/bin/pasu +++ b/xCAT-client/bin/pasu @@ -283,7 +283,7 @@ sub expandnoderange { # Contact xcatd to get from the ipmi table for this list of nodes: bmc, username, password sub getipmiattrs { my $noderange = shift @_; - my $nodeattrs; # this will be a reference to a hash + my $nodeattrs = {}; # this will be a reference to a hash my @user = getpwuid($>); my $homedir=$user[7]; my $client = IO::Socket::SSL->new( @@ -317,7 +317,9 @@ sub getipmiattrs { die ("ERROR: ".$rsp->{error}."\n"); } elsif ($rsp->{node}) { #print Dumper($rsp->{node}); - $nodeattrs=$rsp->{node}; # this is reference to a hash, each key is the nodename and the value is a reference to a hash of attr values + foreach (keys %{$rsp->{node}}) { + $nodeattrs->{$_} = $rsp->{node}->{$_}; # this is reference to a hash, each key is the nodename and the value is a reference to a hash of attr values + } } if ($rsp->{serverdone}) { last;