mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-06-12 17:30:19 +00:00
Merge pull request #4694 from xcat2/gurevichmark-openbmc_rspconfig_powersupplyredundancy
Gurevichmark openbmc rspconfig powersupplyredundancy
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user