Skip to content

Commit

Permalink
Update sfp.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Andriy Kokhan authored Dec 3, 2021
1 parent 40c3f00 commit 54831ee
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,23 @@ def __init__(self):

SfpUtilBase.__init__(self)

def update_port_info(self):
def qsfp_max_port_get(client):
return client.pltfm_mgr.pltfm_mgr_qsfp_get_max_port()

def update_port_info(self):
def qsfp_max_port_get(client):
return client.pltfm_mgr.pltfm_mgr_qsfp_get_max_port()

if self.QSFP_PORT_END == 0:
platform = device_info.get_platform()
self.QSFP_PORT_END = thrift_try(qsfp_max_port_get)
if platform in ["x86_64-accton_as9516_32d-r0", "x86_64-accton_as9516bf_32d-r0"]:
exclude_cpu_port = [
"x86_64-accton_as9516_32d-r0",
"x86_64-accton_as9516bf_32d-r0",
"x86_64-accton_wedge100bf_32x-r0"
]
if platform in exclude_cpu_port:
self.QSFP_PORT_END -= 1
self.PORT_END = self.QSFP_PORT_END
self.PORTS_IN_BLOCK = self.QSFP_PORT_END
Expand Down

0 comments on commit 54831ee

Please sign in to comment.