From badc75f64853ad56b9b675c90528286fe989fd3b Mon Sep 17 00:00:00 2001 From: Fuzail Khan Date: Fri, 8 Apr 2022 04:14:25 -0700 Subject: [PATCH] Fix AS7726 not showing serial number in 'show platform summary' (#10489) --- .../sonic_platform_pddf_base/pddf_chassis.py | 8 ++++---- .../sonic_platform_pddf_base/pddf_fan.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/platform/pddf/platform-api-pddf-base/sonic_platform_pddf_base/pddf_chassis.py b/platform/pddf/platform-api-pddf-base/sonic_platform_pddf_base/pddf_chassis.py index d90949184d5b..ef211b9933c4 100644 --- a/platform/pddf/platform-api-pddf-base/sonic_platform_pddf_base/pddf_chassis.py +++ b/platform/pddf/platform-api-pddf-base/sonic_platform_pddf_base/pddf_chassis.py @@ -96,11 +96,11 @@ def get_model(self): """ 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: - string: Serial number of chassis + string: Sevice tag of chassis """ return self._eeprom.serial_str() @@ -123,7 +123,7 @@ def get_base_mac(self): """ return self._eeprom.base_mac_addr() - def get_serial_number(self): + def get_serial(self): """ Retrieves the hardware serial number for the chassis diff --git a/platform/pddf/platform-api-pddf-base/sonic_platform_pddf_base/pddf_fan.py b/platform/pddf/platform-api-pddf-base/sonic_platform_pddf_base/pddf_fan.py index 2a8ef46085c5..c0e95c896910 100644 --- a/platform/pddf/platform-api-pddf-base/sonic_platform_pddf_base/pddf_fan.py +++ b/platform/pddf/platform-api-pddf-base/sonic_platform_pddf_base/pddf_fan.py @@ -150,7 +150,7 @@ def get_speed(self): if output['status'].isalpha(): return 0 else: - speed = int(output['status']) + speed = int(float(output['status'])) max_speed = int(self.plugin_data['PSU']['PSU_FAN_MAX_SPEED']) speed_percentage = round((speed*100)/max_speed)