From 201e55a8bc1dfb86f22ed38ed108ac56fef4cc61 Mon Sep 17 00:00:00 2001 From: yinle Date: Thu, 17 May 2012 08:31:33 +0000 Subject: [PATCH] Fix bug 3527194: lsslp -s HMC gives no HMC info git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@12758 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/lsslp.pm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/lsslp.pm b/xCAT-server/lib/xcat/plugins/lsslp.pm index ebf0687fa..a4416f60a 100644 --- a/xCAT-server/lib/xcat/plugins/lsslp.pm +++ b/xCAT-server/lib/xcat/plugins/lsslp.pm @@ -499,6 +499,11 @@ sub invoke_dodiscover { } else { $services = [WILDCARD_SERVICE,HARDWARE_SERVICE,SOFTWARE_SERVICE]; } + #efix for hmc bug + if ($services =~ /hardware-management-console/) { + $services = [WILDCARD_SERVICE,HARDWARE_SERVICE,SOFTWARE_SERVICE]; + } + if ($globalopt{maxtries}) { $maxt = $globalopt{maxtries}; } else { @@ -598,6 +603,17 @@ sub format_output { ########################################### my $outhash = parse_responses( $request, \$length ); + #hmc bug efix + my $newouthash; + if ($globalopt{service} =~ /hardware-management-console/) { + for my $en ( keys %$outhash ) { + if (${$outhash->{$en}}{type} eq 'hmc') { + $newouthash->{$en} = $outhash->{$en}; + } + } + $outhash = $newouthash; + } + ########################################### # filter the result and keep the specified nodes ###########################################