diff --git a/xCAT-server/lib/xcat/plugins/openbmc.pm b/xCAT-server/lib/xcat/plugins/openbmc.pm index 6b197c243..34d424f98 100644 --- a/xCAT-server/lib/xcat/plugins/openbmc.pm +++ b/xCAT-server/lib/xcat/plugins/openbmc.pm @@ -1199,6 +1199,7 @@ sub parse_args { foreach $subcommand (@ARGV) { $::RSPCONFIG_CONFIGURED_API_KEY = &is_valid_config_api($subcommand, $callback); if ($::RSPCONFIG_CONFIGURED_API_KEY ne -1) { + return ([ 1, "Can not query $api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{subcommand} information with other options at the same time" ]) if ($#ARGV > 1); # subcommand defined in the configured API hash, return from here, the RSPCONFIG_CONFIGURED_API_KEY is the key into the hash return; } @@ -1601,8 +1602,9 @@ sub parse_command_status { my @options = (); my $num_subcommand = @$subcommands; #Setup chain to process the configured command + $subcommand = $$subcommands[0]; + $::RSPCONFIG_CONFIGURED_API_KEY = &is_valid_config_api($subcommand, $callback); if ($::RSPCONFIG_CONFIGURED_API_KEY ne -1) { - $subcommand = $$subcommands[0]; # Check if setting or quering if ($subcommand =~ /^(\w+)=(.*)/) { # setting