diff --git a/xCAT-server/lib/xcat/plugins/openbmc.pm b/xCAT-server/lib/xcat/plugins/openbmc.pm index 7d1479151..63c9d8983 100644 --- a/xCAT-server/lib/xcat/plugins/openbmc.pm +++ b/xCAT-server/lib/xcat/plugins/openbmc.pm @@ -575,23 +575,27 @@ my %api_config_info = ( command => "rspconfig", url => "/control/host0/auto_reboot", attr_url => "AutoReboot", - display_name => "AutoReboot", + display_name => "BMC AutoReboot", type => "boolean", subcommand => "autoreboot", }, - RSPCONFIG_POWERSUPPLY_REDUNDENCY => { + RSPCONFIG_POWERSUPPLY_REDUNDANCY => { command => "rspconfig", url => "/sensors/chassis/PowerSupplyRedundancy", - attr_url => "PowerSupplyRedundency", - display_name => "PowerSupplyRedundency", - type => "boolean", - subcommand => "powersupplyredundency", + attr_url => "value", + display_name => "BMC PowerSupplyRedundancy", + type => "attribute", + subcommand => "powersupplyredundancy", + attr_value => { + enabled => "Enabled", + disabled => "Disabled", + }, }, RSPCONFIG_POWERRESTORE_POLICY => { command => "rspconfig", url => "/control/host0/power_restore_policy", attr_url => "PowerRestorePolicy", - display_name => "PowerRestorePolicy", + display_name => "BMC PowerRestorePolicy", type => "attribute", subcommand => "powerrestorepolicy", attr_value => { @@ -4496,10 +4500,8 @@ sub is_valid_config_api { $subcommand_value = $2; } foreach my $config_subcommand (keys %api_config_info) { - foreach my $config_attribute (keys %{ $api_config_info{$config_subcommand} }) { - if ($subcommand_key eq $api_config_info{$config_subcommand}{subcommand}) { - return $config_subcommand; - } + if ($subcommand_key eq $api_config_info{$config_subcommand}{subcommand}) { + return $config_subcommand; } } return -1;