Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sfputilbase] Fix xcvr and sfpshow crash with OSFP #63

Merged
merged 2 commits into from
Oct 9, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions sonic_platform_base/sonic_sfp/sfputilbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ def get_transceiver_info_dict(self, port_num):
transceiver_info_dict['ext_rateselect_compliance'] = 'N/A'
transceiver_info_dict['cable_type'] = 'N/A'
transceiver_info_dict['cable_length'] = 'N/A'
transceiver_info_dict['specification_compliance'] = 'N/A'
transceiver_info_dict['specification_compliance'] = '{}'
transceiver_info_dict['nominal_bit_rate'] = 'N/A'

else:
Expand Down Expand Up @@ -1103,7 +1103,11 @@ def get_transceiver_dom_threshold_info_dict(self, port_num):
]
transceiver_dom_threshold_info_dict = dict.fromkeys(dom_info_dict_keys, 'N/A')

if port_num in self.qsfp_ports:
if port_num in self.osfp_ports:
# Below part is added to avoid fail xcvrd, shall be implemented later
return transceiver_dom_threshold_info_dict

elif port_num in self.qsfp_ports:
file_path = self._get_port_eeprom_path(port_num, self.IDENTITY_EEPROM_ADDR)
if not self._sfp_eeprom_present(file_path, 0):
return None
Expand Down