2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-29 17:23:08 +00:00

OpenBMC Thermal Mode [Python]

This commit is contained in:
Mark Gurevich 2019-11-13 10:44:50 -05:00
parent 45afc4f58d
commit d571ea1c12
3 changed files with 16 additions and 2 deletions

View File

@ -234,6 +234,18 @@ RSPCONFIG_APIS = {
'setup': "xyz.openbmc_project.Control.Boot.Mode.Modes.Setup",
},
},
'thermalmode': {
'baseurl': "/control/thermal/0",
'set_url': "/attr/Current",
'get_url': "/attr/Current",
'display_name':"BMC ThermalMode",
'attr_values': {
'default': "DEFAULT",
'custom': "CUSTOM",
'heavy_io': "HEAVY_IO",
'max_base_fan_floor': "MAX_BASE_FAN_FLOOR",
},
},
'timesyncmethod': {
'baseurl': '/time/sync_method',
'get_url': '',

View File

@ -53,7 +53,7 @@ all_nodes_result = {}
# global variables of rbeacon
BEACON_OPTIONS = ('on', 'off', 'stat')
RSPCONFIG_GET_OPTIONS = ['ip','ipsrc','netmask','gateway','vlan','ntpservers','hostname','bootmode','autoreboot','powersupplyredundancy','powerrestorepolicy', 'timesyncmethod']
RSPCONFIG_GET_OPTIONS = ['ip','ipsrc','netmask','gateway','vlan','ntpservers','hostname','bootmode','thermalmode','autoreboot','powersupplyredundancy','powerrestorepolicy', 'timesyncmethod']
RSPCONFIG_SET_OPTIONS = {
'ip':'.*',
@ -66,6 +66,7 @@ RSPCONFIG_SET_OPTIONS = {
'powersupplyredundancy':"^enabled$|^disabled$",
'powerrestorepolicy':"^always_on$|^always_off$|^restore$",
'bootmode':"^regular$|^safe$|^setup$",
'thermalmode':"^default$|^custom$|^heavy_io$|^max_base_fan_floor$",
'admin_passwd':'.*,.*',
'timesyncmethod':'^ntp$|^manual$',
}

View File

@ -160,12 +160,13 @@ sub process_request {
xCAT::AGENT::wait_agent($pid, $callback);
}
my @rsp_common_options = qw/autoreboot bootmode powersupplyredundancy powerrestorepolicy timesyncmethod
my @rsp_common_options = qw/autoreboot bootmode thermalmode powersupplyredundancy powerrestorepolicy timesyncmethod
ip netmask gateway hostname vlan ntpservers/;
my @rspconfig_set_options = (@rsp_common_options, qw/admin_passwd/);
my %rsp_set_valid_values = (
autoreboot => "0|1",
bootmode => "regular|safe|setup",
thermalmode => "default|custom|heavy_io|max_base_fan_floor",
powersupplyredundancy => "disabled|enabled",
powerrestorepolicy => "always_off|always_on|restore",
timesyncmethod => "manual|ntp",