Fix AS7726 not showing serial number in 'show platform summary' (#10489) (#10509)

This commit is contained in:
FuzailBrcm 2022-04-21 01:36:22 +05:30 committed by GitHub
parent fb147764b5
commit 122cb90695
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -96,11 +96,11 @@ class PddfChassis(ChassisBase):
""" """
return self._eeprom.part_number_str() return self._eeprom.part_number_str()
def get_serial(self): def get_service_tag(self):
""" """
Retrieves the serial number of the chassis (Service tag) Retrieves the service tag of the chassis
Returns: Returns:
string: Serial number of chassis string: Sevice tag of chassis
""" """
return self._eeprom.serial_str() return self._eeprom.serial_str()
@ -123,7 +123,7 @@ class PddfChassis(ChassisBase):
""" """
return self._eeprom.base_mac_addr() return self._eeprom.base_mac_addr()
def get_serial_number(self): def get_serial(self):
""" """
Retrieves the hardware serial number for the chassis Retrieves the hardware serial number for the chassis

View File

@ -150,7 +150,7 @@ class PddfFan(FanBase):
if output['status'].isalpha(): if output['status'].isalpha():
return 0 return 0
else: else:
speed = int(output['status']) speed = int(float(output['status']))
max_speed = int(self.plugin_data['PSU']['PSU_FAN_MAX_SPEED']) max_speed = int(self.plugin_data['PSU']['PSU_FAN_MAX_SPEED'])
speed_percentage = round((speed*100)/max_speed) speed_percentage = round((speed*100)/max_speed)