Skip to content

Commit

Permalink
Fixed set_sku_mode() (#198)
Browse files Browse the repository at this point in the history
Signed-off-by: Andriy Kokhan <andriy.kokhan@plvision.eu>
  • Loading branch information
andriy-kokhan authored Sep 16, 2023
1 parent 37cacec commit eda4f64
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 eda4f64

Please sign in to comment.