[device/celestica]: Implement SFP API (#3869)

Add Sfp APIs base on SfpBase and SfpUtilBase
This commit is contained in:
Wirut Getbamrung 2020-01-16 09:45:01 +07:00 committed by lguohan
parent 4c526d9640
commit 4c46178ee8
2 changed files with 1474 additions and 0 deletions

View File

@ -19,6 +19,7 @@ try:
from sonic_platform.component import Component
from sonic_platform.eeprom import Tlv
from sonic_platform.fan import Fan
from sonic_platform.sfp import Sfp
from sonic_platform.psu import Psu
from sonic_platform.thermal import Thermal
from helper import APIHelper
@ -49,6 +50,11 @@ class Chassis(ChassisBase):
for fan_index in range(0, NUM_FAN):
fan = Fan(fant_index, fan_index)
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):
psu = Psu(index)
self._psu_list.append(psu)
@ -59,6 +65,7 @@ class Chassis(ChassisBase):
thermal = Thermal(index)
self._thermal_list.append(thermal)
def get_base_mac(self):
"""
Retrieves the base MAC address for the chassis

File diff suppressed because it is too large Load Diff