@@ -84,8 +84,8 @@ def get_voltage(self):
84
84
Retrieves current PSU voltage output
85
85
86
86
Returns:
87
- A float number, the output voltage in volts,
88
- e.g. 12.1
87
+ A float number, the output voltage in volts,
88
+ e.g. 12.1
89
89
"""
90
90
return None
91
91
@@ -143,7 +143,7 @@ def get_power_available_status(self):
143
143
Gets the power available status
144
144
145
145
Returns:
146
- True if power is present and power on.
146
+ True if power is present and power on.
147
147
False and "absence of PSU" if power is not present.
148
148
False and "absence of power" if power is present but not power on.
149
149
"""
@@ -176,7 +176,7 @@ def get_temperature(self):
176
176
177
177
Returns:
178
178
A float number of current temperature in Celsius up to nearest thousandth
179
- of one degree Celsius, e.g. 30.125
179
+ of one degree Celsius, e.g. 30.125
180
180
"""
181
181
return None
182
182
@@ -195,8 +195,8 @@ def get_input_voltage(self):
195
195
Retrieves current PSU voltage input
196
196
197
197
Returns:
198
- A float number, the input voltage in volts,
199
- e.g. 12.1
198
+ A float number, the input voltage in volts,
199
+ e.g. 12.1
200
200
"""
201
201
return None
202
202
@@ -264,7 +264,7 @@ def psu_voltage(self):
264
264
psu_voltage_out = os .path .join (PSU_PATH , "power/psu{}_volt" .format (self .index ))
265
265
if os .path .exists (psu_voltage_out ):
266
266
self ._psu_voltage = psu_voltage_out
267
-
267
+
268
268
return self ._psu_voltage
269
269
270
270
@property
@@ -336,12 +336,10 @@ def get_voltage(self):
336
336
Retrieves current PSU voltage output
337
337
338
338
Returns:
339
- A float number, the output voltage in volts,
340
- e.g. 12.1
339
+ A float number, the output voltage in volts,
340
+ e.g. 12.1
341
341
"""
342
342
if self .get_powergood_status () and self .psu_voltage :
343
- # TODO: should we put log_func=None here? If not do this, when a PSU is back to power, some PSU related
344
- # sysfs may not ready, read_int_from_file would encounter exception and log an error.
345
343
voltage = utils .read_int_from_file (self .psu_voltage , log_func = logger .log_info )
346
344
return float (voltage ) / 1000
347
345
return None
@@ -405,7 +403,7 @@ def get_temperature(self):
405
403
406
404
Returns:
407
405
A float number of current temperature in Celsius up to nearest thousandth
408
- of one degree Celsius, e.g. 30.125
406
+ of one degree Celsius, e.g. 30.125
409
407
"""
410
408
if self .get_powergood_status ():
411
409
temp = utils .read_int_from_file (self .psu_temp , log_func = logger .log_info )
@@ -492,8 +490,8 @@ def get_input_voltage(self):
492
490
Retrieves current PSU voltage input
493
491
494
492
Returns:
495
- A float number, the input voltage in volts,
496
- e.g. 12.1
493
+ A float number, the input voltage in volts,
494
+ e.g. 12.1
497
495
"""
498
496
if self .get_powergood_status ():
499
497
voltage = utils .read_int_from_file (self .psu_voltage_in , log_func = logger .log_info )
@@ -563,13 +561,13 @@ def get_psu_power_critical_threshold(self):
563
561
564
562
565
563
class InvalidPsuVolWA :
566
- """This class is created as a workaround for a known hardware issue that the PSU voltage threshold could be a
564
+ """This class is created as a workaround for a known hardware issue that the PSU voltage threshold could be a
567
565
invalid value 127998. Once we read a voltage threshold value equal to 127998, we should do following:
568
566
1. Check the PSU vendor, it should be Delta
569
567
2. Generate a temp sensor configuration file which contains a few set commands. Those set commands are the WA provided by low level team.
570
568
3. Call "sensors -s -c <tmp_conf_file>"
571
569
4. Wait for it to take effect
572
-
570
+
573
571
This issue is found on 3700, 3700c, 3800, 4600c
574
572
"""
575
573
0 commit comments