DellEMC: Z9332f - Platform API implementation (#8787)
This commit is contained in:
parent
e46dd633d8
commit
d588b3bc8c
@ -270,6 +270,15 @@ class Chassis(ChassisBase):
|
||||
"""
|
||||
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):
|
||||
"""
|
||||
Retrieves the full content of system EEPROM information for the chassis
|
||||
|
@ -118,7 +118,7 @@ class Eeprom(eeprom_tlvinfo.TlvInfoDecoder):
|
||||
Returns the device revision
|
||||
"""
|
||||
(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:
|
||||
return "N/A"
|
||||
|
||||
|
@ -103,3 +103,13 @@ class FanDrawer(FanDrawerBase):
|
||||
# Fan tray status LED controlled by BMC
|
||||
# Return True to avoid thermalctld alarm
|
||||
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
|
||||
|
@ -87,6 +87,19 @@ class Psu(PsuBase):
|
||||
"""
|
||||
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):
|
||||
"""
|
||||
Retrieves the operational status of the PSU
|
||||
@ -193,6 +206,20 @@ class Psu(PsuBase):
|
||||
|
||||
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):
|
||||
"""
|
||||
Retrieves the powergood status of PSU
|
||||
|
Loading…
Reference in New Issue
Block a user