[device/celestica]: Implement SFP API (#3869)
Add Sfp APIs base on SfpBase and SfpUtilBase
This commit is contained in:
parent
4c526d9640
commit
4c46178ee8
@ -19,6 +19,7 @@ try:
|
|||||||
from sonic_platform.component import Component
|
from sonic_platform.component import Component
|
||||||
from sonic_platform.eeprom import Tlv
|
from sonic_platform.eeprom import Tlv
|
||||||
from sonic_platform.fan import Fan
|
from sonic_platform.fan import Fan
|
||||||
|
from sonic_platform.sfp import Sfp
|
||||||
from sonic_platform.psu import Psu
|
from sonic_platform.psu import Psu
|
||||||
from sonic_platform.thermal import Thermal
|
from sonic_platform.thermal import Thermal
|
||||||
from helper import APIHelper
|
from helper import APIHelper
|
||||||
@ -49,6 +50,11 @@ class Chassis(ChassisBase):
|
|||||||
for fan_index in range(0, NUM_FAN):
|
for fan_index in range(0, NUM_FAN):
|
||||||
fan = Fan(fant_index, fan_index)
|
fan = Fan(fant_index, fan_index)
|
||||||
self._fan_list.append(fan)
|
self._fan_list.append(fan)
|
||||||
|
|
||||||
|
for index in range(0, NUM_SFP):
|
||||||
|
sfp = Sfp(index)
|
||||||
|
self._sfp_list.append(sfp)
|
||||||
|
|
||||||
for index in range(0, NUM_PSU):
|
for index in range(0, NUM_PSU):
|
||||||
psu = Psu(index)
|
psu = Psu(index)
|
||||||
self._psu_list.append(psu)
|
self._psu_list.append(psu)
|
||||||
@ -59,6 +65,7 @@ class Chassis(ChassisBase):
|
|||||||
thermal = Thermal(index)
|
thermal = Thermal(index)
|
||||||
self._thermal_list.append(thermal)
|
self._thermal_list.append(thermal)
|
||||||
|
|
||||||
|
|
||||||
def get_base_mac(self):
|
def get_base_mac(self):
|
||||||
"""
|
"""
|
||||||
Retrieves the base MAC address for the chassis
|
Retrieves the base MAC address for the chassis
|
||||||
|
1467
device/celestica/x86_64-cel_silverstone-r0/sonic_platform/sfp.py
Normal file
1467
device/celestica/x86_64-cel_silverstone-r0/sonic_platform/sfp.py
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user