Skip to content

Commit 57cd012

Browse files
[platform] Add new APIs in thermal.py for test_thermal.py in testbed
1 parent e16a716 commit 57cd012

File tree

1 file changed

+32
-0
lines changed
  • platform/broadcom/sonic-platform-modules-quanta/ix7-32x/sonic_platform

1 file changed

+32
-0
lines changed

platform/broadcom/sonic-platform-modules-quanta/ix7-32x/sonic_platform/thermal.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,22 @@ def get_presence(self):
9292
else:
9393
return False
9494

95+
def get_model(self):
96+
"""
97+
Retrieves the model number (or part number) of the Thermal
98+
Returns:
99+
string: Model/part number of Thermal
100+
"""
101+
return 'N/A'
102+
103+
def get_serial(self):
104+
"""
105+
Retrieves the serial number of the Thermal
106+
Returns:
107+
string: Serial number of Thermal
108+
"""
109+
return 'N/A'
110+
95111
def get_status(self):
96112
"""
97113
Retrieves the operational status of the device
@@ -152,3 +168,19 @@ def get_high_critical_threshold(self):
152168
else:
153169
return None
154170

171+
def get_position_in_parent(self):
172+
"""
173+
Retrieves 1-based relative physical position in parent device.
174+
Returns:
175+
integer: The 1-based relative physical position in parent
176+
device or -1 if cannot determine the position
177+
"""
178+
return self.index
179+
180+
def is_replaceable(self):
181+
"""
182+
Indicate whether this Thermal is replaceable.
183+
Returns:
184+
bool: True if it is replaceable.
185+
"""
186+
return False

0 commit comments

Comments
 (0)