diff --git a/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/chassis.py b/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/chassis.py index 1f9102271431..7a8ed2ca9449 100644 --- a/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/chassis.py +++ b/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/chassis.py @@ -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)