Skip to content

Commit

Permalink
Fixed set_sku_mode() (opencomputeproject#198)
Browse files Browse the repository at this point in the history
Signed-off-by: Andriy Kokhan <[email protected]>
Signed-off-by: selldinesh <[email protected]>
  • Loading branch information
andriy-kokhan authored and selldinesh committed Oct 16, 2023
1 parent d390311 commit 2f135f4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions common/sai_npu.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,8 @@ def set_sku_mode(self, sku):
self.remove(oid)
self.remove(self.dot1q_bp_oids[idx])
status, data = self.get(self.port_oids[idx], ["SAI_PORT_ATTR_PORT_SERDES_ID"], do_assert=False)
serdes_oid = data.oid()
if status == "SAI_STATUS_SUCCESS" and serdes_oid != "oid:0x0":
self.remove(serdes_oid)
if status == "SAI_STATUS_SUCCESS" and data.oid() != "oid:0x0":
self.remove(data.oid())
self.remove(self.port_oids[idx])
self.port_oids.clear()
self.dot1q_bp_oids.clear()
Expand Down

0 comments on commit 2f135f4

Please sign in to comment.