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 <andriy.kokhan@plvision.eu>
Signed-off-by: selldinesh <dinesh.sellappan@keysight.com>
  • Loading branch information
andriy-kokhan authored and selldinesh committed Oct 5, 2023
1 parent de86f48 commit fa41773
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 fa41773

Please sign in to comment.