diff --git a/platform/broadcom/sonic-platform-modules-dell/s6100/sonic_platform/chassis.py b/platform/broadcom/sonic-platform-modules-dell/s6100/sonic_platform/chassis.py index b3d258f32e..4303e187c4 100755 --- a/platform/broadcom/sonic-platform-modules-dell/s6100/sonic_platform/chassis.py +++ b/platform/broadcom/sonic-platform-modules-dell/s6100/sonic_platform/chassis.py @@ -207,7 +207,7 @@ class Chassis(ChassisBase): Returns: string: Serial number of chassis """ - return self._eeprom.serial_str() + return self._eeprom.serial_number_str() def get_status(self): """ diff --git a/platform/broadcom/sonic-platform-modules-dell/s6100/sonic_platform/eeprom.py b/platform/broadcom/sonic-platform-modules-dell/s6100/sonic_platform/eeprom.py index ab3bb174e6..500b2c0e4a 100644 --- a/platform/broadcom/sonic-platform-modules-dell/s6100/sonic_platform/eeprom.py +++ b/platform/broadcom/sonic-platform-modules-dell/s6100/sonic_platform/eeprom.py @@ -78,8 +78,14 @@ class Eeprom(eeprom_tlvinfo.TlvInfoDecoder): self.eeprom_tlv_dict[mac_code] = '00:00:00:00:00:00' def serial_number_str(self): - (is_valid, results) = self.get_tlv_field( - self.eeprom_data, self._TLV_CODE_SERIAL_NUMBER) + # For Chassis, return service tag instead of serial number + if not self.is_module: + (is_valid, results) = self.get_tlv_field( + self.eeprom_data, self._TLV_CODE_SERVICE_TAG) + else: + (is_valid, results) = self.get_tlv_field( + self.eeprom_data, self._TLV_CODE_SERIAL_NUMBER) + if not is_valid: return "N/A" @@ -113,14 +119,6 @@ class Eeprom(eeprom_tlvinfo.TlvInfoDecoder): return results[2].decode('ascii') - def serial_str(self): - (is_valid, results) = self.get_tlv_field( - self.eeprom_data, self._TLV_CODE_SERVICE_TAG) - if not is_valid: - return "N/A" - - return results[2].decode('ascii') - def revision_str(self): (is_valid, results) = self.get_tlv_field( self.eeprom_data, self._TLV_CODE_LABEL_REVISION) diff --git a/platform/broadcom/sonic-platform-modules-dell/s6100/sonic_platform/module.py b/platform/broadcom/sonic-platform-modules-dell/s6100/sonic_platform/module.py index 163a0ab398..751d90fcc6 100644 --- a/platform/broadcom/sonic-platform-modules-dell/s6100/sonic_platform/module.py +++ b/platform/broadcom/sonic-platform-modules-dell/s6100/sonic_platform/module.py @@ -139,7 +139,7 @@ class Module(ModuleBase): Returns: string: Serial number of module """ - return self._eeprom.serial_str() + return self._eeprom.serial_number_str() def get_status(self): """