Add transceiver-info items advertised for cmis-supported moddules#2135
Merged
prgeor merged 9 commits intosonic-net:masterfrom May 10, 2022
Merged
Conversation
Contributor
|
@qinchuanares could you add the unit for these:- |
prgeor
reviewed
May 9, 2022
Comment on lines
+363
to
+366
| 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]) |
Contributor
There was a problem hiding this comment.
i think this if condition will never be it because of if check at line 320
prgeor
approved these changes
May 10, 2022
Contributor
|
@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? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.