-
Notifications
You must be signed in to change notification settings - Fork 661
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
Add transceiver-info items advertised for cmis-supported moddules #2135
Add transceiver-info items advertised for cmis-supported moddules #2135
Conversation
@qinchuanares could you add the unit for these:-
|
if sfp_info_dict['type'] == "QSFP-DD Double Density 8X Pluggable Transceiver" or \ | ||
sfp_info_dict['type'] == "OSFP 8X Pluggable Transceiver" or \ | ||
sfp_info_dict['type'] == "QSFP+ or later with CMIS": | ||
output += '{}{}: {}\n'.format(indent, QSFP_DATA_MAP[key], sfp_info_dict[key]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this if condition will never be it because of if check at line 320
@qinchuanares I just realized that this PR can result in Sfputil crash for non-ZR CMIS compliant modules https://github.com/Azure/sonic-platform-common/blob/cd692122cd3a7eaf0420121559f48aa937d37a8c/sonic_platform_base/sonic_xcvr/api/public/c_cmis.py#L301 is NOT applicable for non-ZR. Can you fix this crash? |
General purpose
This PR intends to include the recent changes made in the following two PRs from sonic-platform-common into sfputil CLI
sonic-net/sonic-platform-common#228
sonic-net/sonic-platform-common#235
Description
The update transceiver info can be referenced to the HLD here.
What I did
Include more transceiver info items for module supporting CMIS and C-CMIS.
After we introduce the support for CMIS and C-CMIS memory map in xcvr_api in sonic-platform-common, we want to adopt the changes in sfputil by starting with updating the transceiver info output. After update, the new CLI output include:
How I did it
I introduced a new data map dictionary QSFP_DD_DATA_MAP, and modified convert_sfp_info_to_output_string() in sfputil/main.py to adopt both non-CMIS- and CMIS-compliant module types.
How to verify it
I tried on both non-CMIS- and CMIS-compliant module types on Arista 7060DX4 switch.
Previous command output (if the output of a command-line utility has changed)
This is an example of a non-CMIS-compliant InPhi DWDM module:
This is an example of a non-CMIS-compliant Molex DR module:
New command output (if the output of a command-line utility has changed)
This is an example of CMIS-compliant XXX 400ZR module. To protect vendor proprietary info, I removed some of the information in the output.
This is an example of CMIS-compliant Molex DR4 module.