2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-24 15:05:36 +00:00

Merge pull request #4806 from xuweibj/I4805

fix issue 4805, support rspconfig openbmc in hierarchy
This commit is contained in:
zet809
2018-02-08 13:08:35 +08:00
committed by GitHub

View File

@ -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