Skip to content

Commit

Permalink
DellEMC: Z9332f - Platform API implementation (#8787)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArunSaravananBalachandran authored Sep 19, 2021
1 parent e46dd63 commit d588b3b
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,15 @@ def get_serial_number(self):
"""
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def revision_str(self):
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"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,13 @@ def set_status_led(self, color):
# 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
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,19 @@ def get_serial(self):
"""
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
Expand Down Expand Up @@ -193,6 +206,20 @@ def get_power(self):

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
Expand Down

0 comments on commit d588b3b

Please sign in to comment.