Skip to content

Commit 974b96a

Browse files
keboliupull[bot]
authored andcommitted
[Mellanox] [Platform API] Update SN2201 dynamic minimum fan speed table (#12602)
- Why I did it Update SN2201 dynamic minimum fan speed table according to data provided by the thermal team. - How I did it Update the thermal table in device_data.py - How to verify it Run platform related regression Signed-off-by: Kebo Liu <[email protected]>
1 parent e8d6d71 commit 974b96a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

platform/mellanox/mlnx-platform-api/sonic_platform/device_data.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,10 @@
156156
},
157157
'x86_64-nvidia_sn2201-r0': {
158158
'thermal': {
159+
'minimum_table': {
160+
"unk_trust": {"-127:30": 13, "31:35": 14, "36:40": 15, "41:120": 16},
161+
"unk_untrust": {"-127:15": 13, "16:20": 14, "21:25": 15, "26:30": 16, "31:35": 17, "36:40": 18, "41:120": 19},
162+
},
159163
"capability": {
160164
"comex_amb": False,
161165
"cpu_amb": True

platform/mellanox/mlnx-platform-api/tests/test_thermal.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ def test_chassis_thermal(self):
9393
assert gearbox_thermal_count == 2
9494
assert cpu_thermal_count == 2
9595

96+
@mock.patch('sonic_platform.device_data.DeviceDataManager.get_platform_name', mock.MagicMock(return_value='x86_64-nvidia_sn2201-r0'))
97+
@mock.patch('sonic_platform.device_data.DeviceDataManager.get_thermal_capability', mock.MagicMock(return_value={'comex_amb': False, 'cpu_amb': True, 'swb_amb': True}))
9698
def test_chassis_thermal_includes(self):
9799
from sonic_platform.thermal import THERMAL_NAMING_RULE
98-
DeviceDataManager.get_platform_name = mock.MagicMock(return_value='x86_64-nvidia_sn2201-r0')
99-
DeviceDataManager.get_thermal_capability = mock.MagicMock(return_value={'comex_amb': False, 'cpu_amb': True, 'swb_amb': True})
100100
chassis = Chassis()
101101
thermal_list = chassis.get_all_thermals()
102102
assert thermal_list

0 commit comments

Comments
 (0)