diff --git a/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc_client.py b/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc_client.py index 2ce1a547e..e1e92a3fe 100644 --- a/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc_client.py +++ b/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc_client.py @@ -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': '', diff --git a/xCAT-openbmc-py/lib/python/agent/xcatagent/openbmc.py b/xCAT-openbmc-py/lib/python/agent/xcatagent/openbmc.py index de8df2484..c01884876 100644 --- a/xCAT-openbmc-py/lib/python/agent/xcatagent/openbmc.py +++ b/xCAT-openbmc-py/lib/python/agent/xcatagent/openbmc.py @@ -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$', } diff --git a/xCAT-server/lib/xcat/plugins/openbmc2.pm b/xCAT-server/lib/xcat/plugins/openbmc2.pm index 4a73fdcfb..f48817a26 100644 --- a/xCAT-server/lib/xcat/plugins/openbmc2.pm +++ b/xCAT-server/lib/xcat/plugins/openbmc2.pm @@ -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",