[202012][DellEMC] Z9332f PSU data is not updated in state DB (#7543)
#### Why I did it - PSU data is loaded into state DB. Following errors are seen in syslogs: "Failed to update PSU data - '<=' not supported between instances of 'float' and 'str'" - Issue is not seen in master image as the PSU API return type is different. #### How I did it - Changed the return type in PSU API's.
This commit is contained in:
parent
2fc748eade
commit
11aa05b1d3
@ -113,7 +113,7 @@ class Psu(PsuBase):
|
||||
if not is_valid:
|
||||
return None
|
||||
|
||||
return "{:.1f}".format(voltage)
|
||||
return float(voltage)
|
||||
|
||||
def get_voltage_low_threshold(self):
|
||||
"""
|
||||
@ -159,7 +159,7 @@ class Psu(PsuBase):
|
||||
if not is_valid:
|
||||
return None
|
||||
|
||||
return "{:.1f}".format(current)
|
||||
return float(current)
|
||||
|
||||
def get_power(self):
|
||||
"""
|
||||
@ -173,7 +173,7 @@ class Psu(PsuBase):
|
||||
if not is_valid:
|
||||
return None
|
||||
|
||||
return "{:.1f}".format(power)
|
||||
return float(power)
|
||||
|
||||
def get_powergood_status(self):
|
||||
"""
|
||||
|
Reference in New Issue
Block a user