[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:
Aravind Mani 2021-05-06 11:53:42 -07:00 committed by GitHub
parent 2fc748eade
commit 11aa05b1d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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):
"""