[Barefoot]: fix unresolved SFP type on Newport/Montara (#6063)

Fix `show interface status` and `sfpshow eeprom` commands showing incorrect information on Newport/Montara platforms
This commit is contained in:
Dmytro Shevchuk 2020-12-04 21:00:03 +02:00 committed by GitHub
parent 59c1e3a78a
commit 026f0ec3fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,17 +14,14 @@ class Chassis(ChassisBase):
"""
def __init__(self):
ChassisBase.__init__(self)
SFP_PORT_END = Sfp.port_end()
PORTS_IN_BLOCK = (SFP_PORT_END + 1)
MAX_PSU = Psu.get_num_psus()
self._eeprom = Eeprom()
for index in range(0, PORTS_IN_BLOCK):
for index in range(Sfp.port_start(), Sfp.port_end() + 1):
sfp_node = Sfp(index)
self._sfp_list.append(sfp_node)
for i in range(1, MAX_PSU + 1):
for i in range(1, Psu.get_num_psus() + 1):
psu = Psu(i)
self._psu_list.append(psu)