[platform] Remove references to deprecated get_serial_number() method in Chassis class (#5649)
The `get_serial_number()` method in the ChassisBase and ModuleBase classes was redundant, as the `get_serial()` method is inherited from the DeviceBase class. This method was removed from the base classes in sonic-platform-common and the submodule was updated in https://github.com/Azure/sonic-buildimage/pull/5625. This PR aligns the existing vendor platform API implementations to remove the `get_serial_number()` methods and ensure the `get_serial()` methods are implemented, if they weren't previously. Note that this PR does not modify the Dell platform API implementations, as this will be handled as part of https://github.com/Azure/sonic-buildimage/pull/5609
This commit is contained in:
parent
7f59a6e46e
commit
8011edc307
@ -93,7 +93,7 @@ class Chassis(ChassisBase):
|
|||||||
"""
|
"""
|
||||||
return self._eeprom.get_mac()
|
return self._eeprom.get_mac()
|
||||||
|
|
||||||
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
|
||||||
Returns:
|
Returns:
|
||||||
|
@ -87,7 +87,7 @@ class Chassis(ChassisBase):
|
|||||||
"""
|
"""
|
||||||
return self._eeprom.get_mac()
|
return self._eeprom.get_mac()
|
||||||
|
|
||||||
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
|
||||||
Returns:
|
Returns:
|
||||||
|
@ -91,14 +91,6 @@ class Chassis(ChassisBase):
|
|||||||
"""
|
"""
|
||||||
return self._eeprom.get_mac()
|
return self._eeprom.get_mac()
|
||||||
|
|
||||||
def get_serial_number(self):
|
|
||||||
"""
|
|
||||||
Retrieves the hardware serial number for the chassis
|
|
||||||
Returns:
|
|
||||||
A string containing the hardware serial number for this chassis.
|
|
||||||
"""
|
|
||||||
return self._eeprom.get_serial()
|
|
||||||
|
|
||||||
def get_system_eeprom_info(self):
|
def get_system_eeprom_info(self):
|
||||||
"""
|
"""
|
||||||
Retrieves the full content of system EEPROM information for the chassis
|
Retrieves the full content of system EEPROM information for the chassis
|
||||||
@ -252,7 +244,7 @@ class Chassis(ChassisBase):
|
|||||||
Returns:
|
Returns:
|
||||||
string: Serial number of device
|
string: Serial number of device
|
||||||
"""
|
"""
|
||||||
return self.get_serial_number()
|
return self._eeprom.get_serial()
|
||||||
|
|
||||||
def get_status(self):
|
def get_status(self):
|
||||||
"""
|
"""
|
||||||
|
@ -75,7 +75,7 @@ class Chassis(ChassisBase):
|
|||||||
"""
|
"""
|
||||||
return self._eeprom.get_mac()
|
return self._eeprom.get_mac()
|
||||||
|
|
||||||
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
|
||||||
Returns:
|
Returns:
|
||||||
|
@ -101,15 +101,6 @@ class Chassis(ChassisBase):
|
|||||||
"""
|
"""
|
||||||
return self._eeprom.base_mac_addr()
|
return self._eeprom.base_mac_addr()
|
||||||
|
|
||||||
def get_serial_number(self):
|
|
||||||
"""
|
|
||||||
Retrieves the hardware serial number for the chassis
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
A string containing the hardware serial number for this chassis.
|
|
||||||
"""
|
|
||||||
return self._eeprom.serial_number_str()
|
|
||||||
|
|
||||||
def get_system_eeprom_info(self):
|
def get_system_eeprom_info(self):
|
||||||
"""
|
"""
|
||||||
Retrieves the full content of system EEPROM information for the chassis
|
Retrieves the full content of system EEPROM information for the chassis
|
||||||
|
@ -126,14 +126,6 @@ class Chassis(ChassisBase):
|
|||||||
"""
|
"""
|
||||||
return self._eeprom.get_mac()
|
return self._eeprom.get_mac()
|
||||||
|
|
||||||
def get_serial_number(self):
|
|
||||||
"""
|
|
||||||
Retrieves the hardware serial number for the chassis
|
|
||||||
Returns:
|
|
||||||
A string containing the hardware serial number for this chassis.
|
|
||||||
"""
|
|
||||||
return self._eeprom.get_serial()
|
|
||||||
|
|
||||||
def get_system_eeprom_info(self):
|
def get_system_eeprom_info(self):
|
||||||
"""
|
"""
|
||||||
Retrieves the full content of system EEPROM information for the chassis
|
Retrieves the full content of system EEPROM information for the chassis
|
||||||
|
@ -116,15 +116,6 @@ class Chassis(ChassisBase):
|
|||||||
"""
|
"""
|
||||||
return self._eeprom.base_mac_address()
|
return self._eeprom.base_mac_address()
|
||||||
|
|
||||||
def get_serial_number(self):
|
|
||||||
"""
|
|
||||||
Retrieves the hardware serial number for the chassis
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
A string containing the hardware serial number for this chassis.
|
|
||||||
"""
|
|
||||||
return self._eeprom.serial_number_str()
|
|
||||||
|
|
||||||
def get_system_eeprom_info(self):
|
def get_system_eeprom_info(self):
|
||||||
"""
|
"""
|
||||||
Retrieves the full content of system EEPROM information for the chassis
|
Retrieves the full content of system EEPROM information for the chassis
|
||||||
|
@ -119,15 +119,6 @@ class Chassis(ChassisBase):
|
|||||||
"""
|
"""
|
||||||
return self._eeprom.base_mac_addr()
|
return self._eeprom.base_mac_addr()
|
||||||
|
|
||||||
def get_serial_number(self):
|
|
||||||
"""
|
|
||||||
Retrieves the hardware serial number for the chassis
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
A string containing the hardware serial number for this chassis.
|
|
||||||
"""
|
|
||||||
return self._eeprom.serial_number_str()
|
|
||||||
|
|
||||||
def get_system_eeprom_info(self):
|
def get_system_eeprom_info(self):
|
||||||
"""
|
"""
|
||||||
Retrieves the full content of system EEPROM information for the chassis
|
Retrieves the full content of system EEPROM information for the chassis
|
||||||
|
@ -86,7 +86,7 @@ class Chassis(ChassisBase):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
def get_serial_number(self):
|
def get_serial(self):
|
||||||
serial_number_list = self.get_parameter_value('Serial Number')
|
serial_number_list = self.get_parameter_value('Serial Number')
|
||||||
if serial_number_list:
|
if serial_number_list:
|
||||||
serial_number = ''.join(serial_number_list)
|
serial_number = ''.join(serial_number_list)
|
||||||
|
@ -287,7 +287,7 @@ class Chassis(ChassisBase):
|
|||||||
return self._eeprom.get_base_mac()
|
return self._eeprom.get_base_mac()
|
||||||
|
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user