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

[xcvrd] Fix crash: If 'dom_capability' not in port_info_dict, insert 'N/A' #162

Merged
merged 1 commit into from
Mar 9, 2021
Merged

[xcvrd] Fix crash: If 'dom_capability' not in port_info_dict, insert 'N/A' #162

merged 1 commit into from
Mar 9, 2021

Conversation

jleveque
Copy link
Contributor

@jleveque jleveque commented Mar 7, 2021

Description

If 'dom_capability' not in port_info_dict, insert 'N/A'

Motivation and Context

Currently, some vendors are using custom transceiver info parsers which do not yet provide the dom_capability field in the results of get_transceiver_info(). However, PR #72 introduced storing this value to State DB under the assumption that it would always be present. On platforms where this value is not present, it would cause xcvrd to crash (see issue: sonic-net/sonic-buildimage#6978).

This change will prevent a crash if it is not present, and will in turn save 'N/A' as the dom_capability value in State DB.

How Has This Been Tested?

Tested on one affected platform.

Additional Information (Optional)

sonic-xcvrd/xcvrd/xcvrd.py Show resolved Hide resolved
@jleveque jleveque merged commit e5165b7 into sonic-net:master Mar 9, 2021
@jleveque jleveque deleted the dom_cap_optional branch March 9, 2021 18:26
vdahiya12 added a commit to vdahiya12/sonic-platform-daemons that referenced this pull request Apr 4, 2022
… internal and nic temperature and voltage (sonic-net#162)

* [sonic_y_cable] add support for retreiving firmware info for Y cable,
internal and nic tempertaure and voltage
This PR provides the necessary infrastructure to add support for getting firmware information running on the three ends of Y cable. Also we get internal and nic side temperature and voltage

What is the motivation for this PR?
To add the necessary support for fetching firmware info for Y cable, internal and nic temperature and voltage

How did you do it?
Added the changes in sonic-platform-common module in the y_cable.py file

How did you verify/test it?
opened a python shell and ran the API's manually and test verified
the values are correct.

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants