From f40ea6d4b14801de9aab3c393254b14bdd91a9d3 Mon Sep 17 00:00:00 2001 From: xuweibj Date: Fri, 26 Jan 2018 11:14:05 +0800 Subject: [PATCH] fix issue 4731, specify variable to hash type (#4732) --- xCAT-server/lib/xcat/plugins/openbmc.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/openbmc.pm b/xCAT-server/lib/xcat/plugins/openbmc.pm index 3a6a3514c..658dee13c 100644 --- a/xCAT-server/lib/xcat/plugins/openbmc.pm +++ b/xCAT-server/lib/xcat/plugins/openbmc.pm @@ -1625,7 +1625,7 @@ sub parse_command_status { else { # Everything else is invalid xCAT::SvrUtils::sendmsg([1, "Invalid value '$subcommand_value' for '$subcommand_key'"], $callback); - my @valid_values = keys $api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{attr_value}; + my @valid_values = keys %{ $api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{attr_value} }; xCAT::SvrUtils::sendmsg([1, "Valid values: " . join(",", @valid_values)], $callback); return 1; } @@ -3624,7 +3624,7 @@ sub rspconfig_api_config_response { # will be displayed as "Restore" my @attr_value = split('\.', $value); my $last_component = $attr_value[-1]; - my @valid_values = values $api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{attr_value}; + my @valid_values = values %{ $api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{attr_value} }; if ($value) { xCAT::SvrUtils::sendmsg($api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{display_name} . " : $last_component", $callback, $node); my $found = grep(/$value/, @valid_values);