Transceiver CLI changes to support DOM and STATUS table related changes#3844
Merged
prgeor merged 11 commits intosonic-net:masterfrom May 6, 2025
Merged
Transceiver CLI changes to support DOM and STATUS table related changes#3844prgeor merged 11 commits intosonic-net:masterfrom
prgeor merged 11 commits intosonic-net:masterfrom
Conversation
Collaborator
|
/azp run |
Contributor
There was a problem hiding this comment.
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
utilities_common/sfp_helper.py:61
- The naming convention for transceiver fault keys has changed from 'txfault{n}' to 'tx{n}fault'. Please ensure that all consuming code and CLI output functions are updated consistently to handle the new key names.
'tx1fault': 'Tx fault flag on media lane 1',
utilities_common/sfp_helper.py:397
- [nitpick] There appears to be a typo in the function name: 'covert' might be intended as 'convert' for clarity and accuracy.
def covert_application_advertisement_to_output_string(indent, sfp_info_dict):
|
Azure Pipelines successfully started running 1 pipeline(s). |
This was referenced Apr 10, 2025
Merged
…added support for TRANSCEIVER_STATUS_SW table
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
There was a problem hiding this comment.
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
sfputil/main.py:546
- There is an inconsistency in the use of the port identifier: while most queries use 'first_subport', this update uses 'interface_name'. Please verify that this mixed usage is intentional and does not lead to mismatched data retrieval.
sfp_status_dict.update(state_db.get_all(state_db.STATE_DB, 'TRANSCEIVER_STATUS_SW|{}'.format(interface_name)) or {})
sfputil/main.py:490
- Consider adding unit tests for the 'convert_vdm_fields_to_legacy_fields' function to ensure robust handling of both 'FLAG' and 'THRESHOLD' VDM field types.
def convert_vdm_fields_to_legacy_fields(self, state_db, interface_name, dict_to_be_updated, vdm_to_legacy_field_map, vdm_field_type):
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
ede1c33 to
e87981a
Compare
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
e87981a to
b9f63c3
Compare
prgeor
approved these changes
May 6, 2025
mihirpat1
added a commit
to mihirpat1/sonic-utilities
that referenced
this pull request
May 6, 2025
…es (sonic-net#3844) * Transceiver CLI changes to support DOM and STATUS table related changes Signed-off-by: Mihir Patel <[email protected]> * Added details to convert_vdm_fields_to_legacy_fields * Fixed pre-commit check * Added CLI support to access diagnostic tables from primary subport + added support for TRANSCEIVER_STATUS_SW table * Fix pre-commit check * Fixed unit-test failure by adding TRANSCEIVER_STATUS_SW as part of mocked STATE_DB * Fixed ycable failure due to TRANSCEIVER_STATUS related change * Modified update_firmware_info_to_state_db to update DB for first subport * Increased code coverage for update_firmware_info_to_state_db * Added test_show_eeprom_dom_real_value_exception --------- Signed-off-by: Mihir Patel <[email protected]>
Collaborator
|
Cherry-pick PR to msft-202412: Azure/sonic-utilities.msft#176 |
mssonicbld
added a commit
to mssonicbld/sonic-platform-common.msft
that referenced
this pull request
May 9, 2025
<!-- Provide a general summary of your changes in the Title above -->
#### Description
<!--
Describe your changes in detail
-->
The DOM and Status related APIs need to be modified to ensure that the fields which have latched registers are moved to the flag specific API.
Also, all the VDM specific fields have now been removed from DOM and Status related APIs since separate APIs pertaining to processing VDM data have now been created.
This change is in line to the requirements of [SONiC/doc/platform_api/CMIS_Diagnostic_Monitoring_Overview_in_SONiC.md at master · sonic-net/SONiC](https://github.com/sonic-net/SONiC/blob/master/doc/platform_api/CMIS_Diagnostic_Monitoring_Overview_in_SONiC.md)
#### Motivation and Context
<!--
Why is this change required? What problem does it solve?
If this pull request closes/resolves an open Issue, make sure you
include the text "fixes #xxxx", "closes #xxxx" or "resolves #xxxx" here
-->
N/A
#### How Has This Been Tested?
<!--
Please describe in detail how you tested your changes.
Include details of your testing environment, and the tests you ran to
see how your change affects other areas of the code, etc.
-->
Please refer to sonic-net/sonic-utilities#3844 for the test details
#### Additional Information (Optional)
MSFT ADO - 30090754
Related PRs
sonic-net/SONiC#1954
sonic-net/sonic-platform-daemons#604
sonic-net/sonic-utilities#3844
mssonicbld
added a commit
to Azure/sonic-platform-common.msft
that referenced
this pull request
May 9, 2025
<!-- Provide a general summary of your changes in the Title above --> #### Description <!-- Describe your changes in detail --> The DOM and Status related APIs need to be modified to ensure that the fields which have latched registers are moved to the flag specific API. Also, all the VDM specific fields have now been removed from DOM and Status related APIs since separate APIs pertaining to processing VDM data have now been created. This change is in line to the requirements of [SONiC/doc/platform_api/CMIS_Diagnostic_Monitoring_Overview_in_SONiC.md at master · sonic-net/SONiC](https://github.com/sonic-net/SONiC/blob/master/doc/platform_api/CMIS_Diagnostic_Monitoring_Overview_in_SONiC.md) #### Motivation and Context <!-- Why is this change required? What problem does it solve? If this pull request closes/resolves an open Issue, make sure you include the text "fixes #xxxx", "closes #xxxx" or "resolves #xxxx" here --> N/A #### How Has This Been Tested? <!-- Please describe in detail how you tested your changes. Include details of your testing environment, and the tests you ran to see how your change affects other areas of the code, etc. --> Please refer to sonic-net/sonic-utilities#3844 for the test details #### Additional Information (Optional) MSFT ADO - 30090754 Related PRs sonic-net/SONiC#1954 sonic-net/sonic-platform-daemons#604 sonic-net/sonic-utilities#3844
11 tasks
This was referenced Jun 19, 2025
arlakshm
pushed a commit
to Azure/sonic-mgmt.msft
that referenced
this pull request
Jun 24, 2025
The changes to the sonic-mgmt testcases are required due to the below changes: sonic-net/sonic-platform-common#556 sonic-net/sonic-platform-daemons#604 sonic-net/sonic-utilities#3844 This PR also reverts the changes made by #181 .
nmoray
pushed a commit
to nmoray/sonic-utilities
that referenced
this pull request
Jun 25, 2025
…es (sonic-net#3844) * Transceiver CLI changes to support DOM and STATUS table related changes Signed-off-by: Mihir Patel <[email protected]> * Added details to convert_vdm_fields_to_legacy_fields * Fixed pre-commit check * Added CLI support to access diagnostic tables from primary subport + added support for TRANSCEIVER_STATUS_SW table * Fix pre-commit check * Fixed unit-test failure by adding TRANSCEIVER_STATUS_SW as part of mocked STATE_DB * Fixed ycable failure due to TRANSCEIVER_STATUS related change * Modified update_firmware_info_to_state_db to update DB for first subport * Increased code coverage for update_firmware_info_to_state_db * Added test_show_eeprom_dom_real_value_exception --------- Signed-off-by: Mihir Patel <[email protected]>
Contributor
|
Hi @mihirpat1 , please fix conflict and create PR to 202505 branch |
Contributor
|
202505 branched out around 5/16, this commit is included when created, removing request labels. |
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.
What I did
With the recent transceiver DOM and STATUS table related changes, the handles of the following CLIs need to be modified to ensure that the CLI function inline to the existing behavior
Also, all the diagnostics related tables will not be present only for the first subport for breakout ports. Hence, made the corresponding CLI handler related changes to support this
Modified the
sfputil show error-statusCLI handler to useTRANSCEIVER_STATUS_SWinstead ofTRANSCEIVER_STATUStableHow I did it
Related PRs
sonic-net/SONiC#1954
[cmis] Separate Flag-Specific Fields for DOM and Status APIs by mihirpat1 · Pull Request #556 · sonic-net/sonic-platform-common
[xcvrd] Re-organize transceiver DOM and STATUS tables by mihirpat1 · Pull Request #604 · sonic-net/sonic-platform-daemons
How to verify it
Following tests were attempted and confirmed to pass
Also, execute sfputil reset on 10 different physical ports and ensure that all the corresponding flags on the remote side are updated for all 8 lanes of a DR8 optic
Specifically, we need to ensure that the following flags are set wherein X represents the lane number
Previous command output (if the output of a command-line utility has changed)
The output of show int transceiver info and show int transceiver eeprom will change if an invalid port name is passed to the CLI
New command output (if the output of a command-line utility has changed)
MSFT ADO - 32238285