mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-11-04 05:12:30 +00:00 
			
		
		
		
	Merge pull request #6483 from gurevichmark/thermal_mode_python
OpenBMC Thermal Mode [Python]
This commit is contained in:
		@@ -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': '',
 | 
			
		||||
 
 | 
			
		||||
@@ -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$',
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -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",
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user