performance improving of discovering hmc.

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13614 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
yinle 2012-08-27 06:11:39 +00:00
parent dba7c5d40d
commit 182de6c93b

View File

@ -593,26 +593,28 @@ sub format_output {
###########################################
# Read table to get exists data
###########################################
my $errcode = read_from_table();
if ($errcode) {
send_msg( $request, 0, "Can't open $errcode table" );
return;
}
unless($globalopt{service} =~ /hardware-management-console/) {
my $errcode = read_from_table();
if ($errcode) {
send_msg( $request, 0, "Can't open $errcode table" );
return;
}
}
###########################################
# Parse responses and add to hash
###########################################
my $outhash = parse_responses( $request, \$length, $searchmacsref );
#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;
}
#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 in the same vlan