sonic-utilities
sonic-utilities copied to clipboard
[sfp] Fix issue: Application Advertisement is not well formatted
What I did
Currently, the value of "Application Advertisement" is a python dict to string which is not well formatted. This PR re-format the output of "Application Advertisement" to a human readable string
How I did it
Set the output to similar to 202012
How to verify it
Unit test Manual test
Previous command output (if the output of a command-line utility has changed)
Ethernet200: SFP EEPROM detected
Application Advertisement: {1: {'host_electrical_interface_id': '400GAUI-8 C2M (Annex 120E)', 'module_media_interface_id': '400GBASE-DR4 (Cl 124)', 'media_lane_count': 4, 'host_lane_count': 8, 'host_lane_assignment_options': 1}, 2: {'host_electrical_interface_id': '100GAUI-2 C2M (Annex 135G)', 'module_media_interface_id': '100GBASE-DR (Cl 140)', 'media_lane_count': 1, 'host_lane_count': 2, 'host_lane_assignment_options': 85}}
...
New command output (if the output of a command-line utility has changed)
Ethernet200: SFP EEPROM detected
Application Advertisement: 400GAUI-8 C2M (Annex 120E) - 400GBASE-DR4 (Cl 124) - 0x1
100GAUI-2 C2M (Annex 135G) - 100GBASE-DR (Cl 140) - 0x55
...
LGTM beside of the comment which is more like a question than a suggestion
/azp run Azure.sonic-utilities
Azure Pipelines successfully started running 1 pipeline(s).
@Junchao-Mellanox can you add lane assignment mask also in hex?
This pull request introduces 2 alerts when merging 52d6c81f918ee2f3f53190eb1f4f1e7a6d17bc23 into a5eb26b682c42b5cf0716dc98b72be4feb81b333 - view on LGTM.com
new alerts:
- 2 for Variable defined multiple times
Hi prgeor, would you please review again?
@Junchao-Mellanox can you check the build failure
/azpw run Azure.sonic-utilities
/AzurePipelines run Azure.sonic-utilities
LGTM check is stuck. Will override.
Hi @yxieca , could you please help cherry-pick to 202205?