File tree Expand file tree Collapse file tree 2 files changed +49
-0
lines changed
Expand file tree Collapse file tree 2 files changed +49
-0
lines changed Original file line number Diff line number Diff line change @@ -223,6 +223,26 @@ def get_maximum_supplied_power(self):
223223 """
224224 raise NotImplementedError
225225
226+ def get_psu_power_warning_suppress_threshold (self ):
227+ """
228+ Retrieve the warning suppress threshold of the power on this PSU
229+ The value can be volatile, so the caller should call the API each time it is used.
230+
231+ Returns:
232+ A float number, the warning suppress threshold of the PSU in watts.
233+ """
234+ raise NotImplementedError
235+
236+ def get_psu_power_critical_threshold (self ):
237+ """
238+ Retrieve the critical threshold of the power on this PSU
239+ The value can be volatile, so the caller should call the API each time it is used.
240+
241+ Returns:
242+ A float number, the critical threshold of the PSU in watts.
243+ """
244+ raise NotImplementedError
245+
226246 @classmethod
227247 def get_status_master_led (cls ):
228248 """
Original file line number Diff line number Diff line change 1+ from sonic_platform_base .psu_base import PsuBase
2+
3+ class TestPsuBase :
4+
5+ def test_psu_base (self ):
6+ psu = PsuBase ()
7+ not_implemented_methods = [
8+ psu .get_voltage ,
9+ psu .get_current ,
10+ psu .get_power ,
11+ psu .get_powergood_status ,
12+ psu .get_temperature ,
13+ psu .get_temperature_high_threshold ,
14+ psu .get_voltage_high_threshold ,
15+ psu .get_voltage_low_threshold ,
16+ psu .get_maximum_supplied_power ,
17+ psu .get_psu_power_warning_suppress_threshold ,
18+ psu .get_psu_power_critical_threshold ,
19+ psu .get_input_voltage ,
20+ psu .get_input_current ]
21+
22+ for method in not_implemented_methods :
23+ exception_raised = False
24+ try :
25+ method ()
26+ except NotImplementedError :
27+ exception_raised = True
28+
29+ assert exception_raised
You can’t perform that action at this time.
0 commit comments