DellEMC: Z9332f - Platform API implementation (#8787)

This commit is contained in:
Arun Saravanan Balachandran 2021-09-20 00:45:22 +05:30 committed by GitHub
parent e46dd633d8
commit d588b3bc8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 47 additions and 1 deletions

View File

@ -270,6 +270,15 @@ class Chassis(ChassisBase):
""" """
return self._eeprom.serial_number_str() return self._eeprom.serial_number_str()
def get_revision(self):
"""
Retrieves the hardware revision of the device
Returns:
string: Revision value of device
"""
return self._eeprom.revision_str()
def get_system_eeprom_info(self): def get_system_eeprom_info(self):
""" """
Retrieves the full content of system EEPROM information for the chassis Retrieves the full content of system EEPROM information for the chassis

View File

@ -118,7 +118,7 @@ class Eeprom(eeprom_tlvinfo.TlvInfoDecoder):
Returns the device revision Returns the device revision
""" """
(is_valid, results) = self.get_tlv_field( (is_valid, results) = self.get_tlv_field(
self.eeprom_data, self._TLV_CODE_DEVICE_VERSION) self.eeprom_data, self._TLV_CODE_LABEL_REVISION)
if not is_valid: if not is_valid:
return "N/A" return "N/A"

View File

@ -103,3 +103,13 @@ class FanDrawer(FanDrawerBase):
# Fan tray status LED controlled by BMC # Fan tray status LED controlled by BMC
# Return True to avoid thermalctld alarm # Return True to avoid thermalctld alarm
return True return True
def get_maximum_consumed_power(self):
"""
Retrives the maximum power drawn by Fan Drawer
Returns:
A float, with value of the maximum consumable power of the
component.
"""
return 36.0

View File

@ -87,6 +87,19 @@ class Psu(PsuBase):
""" """
return self.fru.get_board_serial() return self.fru.get_board_serial()
def get_revision(self):
"""
Retrieves the hardware revision of the device
Returns:
string: Revision value of device
"""
serial = self.fru.get_board_serial()
if serial != "NA" and len(serial) == 23:
return serial[-3:]
else:
return "NA"
def get_status(self): def get_status(self):
""" """
Retrieves the operational status of the PSU Retrieves the operational status of the PSU
@ -193,6 +206,20 @@ class Psu(PsuBase):
return float(power) return float(power)
def get_maximum_supplied_power(self):
"""
Retrieves the maximum supplied power by PSU
Returns:
A float number, the maximum power output in Watts.
e.g. 1200.1
"""
is_valid, power = self.power_sensor.get_threshold("UpperCritical")
if not is_valid:
return None
return float(power)
def get_powergood_status(self): def get_powergood_status(self):
""" """
Retrieves the powergood status of PSU Retrieves the powergood status of PSU