DellEMC: Z9332f update PSU threshold (#7832)
#### Why I did it Updated Z9332f PSU threshold values. #### How I did it Fetch the PSU voltage and temperature threshold via ipmitool
This commit is contained in:
parent
2b6c1cd1cb
commit
b577b32ddd
@ -26,6 +26,7 @@ class Psu(PsuBase):
|
|||||||
2: { "State": 0x39, "Current": 0x41,
|
2: { "State": 0x39, "Current": 0x41,
|
||||||
"Power": 0x42, "Voltage": 0x40,
|
"Power": 0x42, "Voltage": 0x40,
|
||||||
"Temperature": 0x3F } }
|
"Temperature": 0x3F } }
|
||||||
|
|
||||||
# ( PSU-ID: FRU-ID }
|
# ( PSU-ID: FRU-ID }
|
||||||
FRU_MAPPING = { 1: 3, 2: 4 }
|
FRU_MAPPING = { 1: 3, 2: 4 }
|
||||||
|
|
||||||
@ -119,13 +120,24 @@ class Psu(PsuBase):
|
|||||||
"""
|
"""
|
||||||
Returns PSU low threshold in Volts
|
Returns PSU low threshold in Volts
|
||||||
"""
|
"""
|
||||||
return 11.4
|
is_valid, low_threshold = self.voltage_sensor.get_threshold("LowerCritical")
|
||||||
|
if not is_valid:
|
||||||
|
low_threshold = 11.4
|
||||||
|
low_threshold = "{:.2f}".format(low_threshold)
|
||||||
|
|
||||||
|
return float(low_threshold)
|
||||||
|
|
||||||
|
|
||||||
def get_voltage_high_threshold(self):
|
def get_voltage_high_threshold(self):
|
||||||
"""
|
"""
|
||||||
Returns PSU high threshold in Volts
|
Returns PSU high threshold in Volts
|
||||||
"""
|
"""
|
||||||
return 12.6
|
is_valid, high_threshold = self.voltage_sensor.get_threshold("UpperCritical")
|
||||||
|
if not is_valid:
|
||||||
|
high_threshold = 12.6
|
||||||
|
high_threshold = "{:.2f}".format(high_threshold)
|
||||||
|
|
||||||
|
return float(high_threshold)
|
||||||
|
|
||||||
def get_temperature(self):
|
def get_temperature(self):
|
||||||
"""
|
"""
|
||||||
@ -145,7 +157,13 @@ class Psu(PsuBase):
|
|||||||
"""
|
"""
|
||||||
Returns the high temperature threshold for PSU in Celsius
|
Returns the high temperature threshold for PSU in Celsius
|
||||||
"""
|
"""
|
||||||
return 45.0
|
is_valid, high_threshold = self.temp_sensor.get_threshold("UpperCritical")
|
||||||
|
if not is_valid:
|
||||||
|
high_threshold = 113
|
||||||
|
high_threshold = "{:.2f}".format(high_threshold)
|
||||||
|
|
||||||
|
return float(high_threshold)
|
||||||
|
|
||||||
|
|
||||||
def get_current(self):
|
def get_current(self):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user