Skip to content

Commit

Permalink
[barefoot] Tmp fix vendor_rev (sonic-net#22)
Browse files Browse the repository at this point in the history
Signed-off-by: Volodymyr Boyko <volodymyrx.boiko@intel.com>
  • Loading branch information
vboykox authored and Your Name committed Dec 22, 2021
1 parent 5a3a601 commit 9c37644
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,11 @@ def reset(self):

def get_transceiver_info(self):
with Sfp.sfputil.eeprom_action() as u:
return u.get_transceiver_info_dict(self.port_num)
info = u.get_transceiver_info_dict(self.port_num)
# XXX https://github.com/Azure/sonic-platform-common/issues/250
if "vendor_rev" not in info:
info["vendor_rev"] = info.get("hardware_rev", "N/A")
return info

def get_transceiver_bulk_status(self):
status = dict()
Expand Down Expand Up @@ -392,7 +396,7 @@ def get_error_description(self):

def get_revision(self):
info = self.get_transceiver_info()
return info.get("hardware_rev", "N/A")
return info.get("vendor_rev", "N/A")

def get_status(self):
return self.get_presence() and bool(self.get_transceiver_bulk_status())
Expand Down

0 comments on commit 9c37644

Please sign in to comment.