Move DomInfoUpdateTask class to a separate file#552
Merged
prgeor merged 3 commits intosonic-net:masterfrom Oct 24, 2024
Merged
Conversation
Signed-off-by: Mihir Patel <patelmi@microsoft.com>
prgeor
approved these changes
Oct 24, 2024
mssonicbld
pushed a commit
to mssonicbld/sonic-platform-daemons
that referenced
this pull request
Oct 25, 2024
* Move DomInfoUpdateTask class to a separate file Signed-off-by: Mihir Patel <patelmi@microsoft.com> * Improved code coverage * Improved code coverage --------- Signed-off-by: Mihir Patel <patelmi@microsoft.com>
Collaborator
|
Cherry-pick PR to 202405: #553 |
mssonicbld
pushed a commit
that referenced
this pull request
Oct 25, 2024
* Move DomInfoUpdateTask class to a separate file Signed-off-by: Mihir Patel <patelmi@microsoft.com> * Improved code coverage * Improved code coverage --------- Signed-off-by: Mihir Patel <patelmi@microsoft.com>
lotus-nexthop
pushed a commit
to lotus-nexthop/sonic-platform-daemons
that referenced
this pull request
Oct 28, 2025
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.
Description
We need to move the DomInfoUpdateTask class to a separate file to improve modularity and for better code maintainability.
sonic-platform-daemons/sonic-xcvrd/xcvrd/xcvrd.py
Line 1684 in ca812b0
MSFT ADO - 29932076
Motivation and Context
Following is the summary of the changes done in this PR
1. Added
DOM-INFO-UPDATE:keyword to all syslogs being logged by the DomInfoUpdateTask class.2. Moved the below functions related to DB update from xcvrd.py to dom_mgr.py
a. post_port_sfp_firmware_info_to_db
b. post_port_dom_info_to_db
c. update_port_transceiver_status_table_hw
d. post_port_pm_info_to_db
3. Consolidated beautify_transceiver_status_dict and beautify_pm_info_dict functions into beautify_info_dict function to avoid code duplication. This was done in dom_mgr.py.
How Has This Been Tested?
show int transceiver eeprom -d $lport
show int transceiver status $lport
show int transceiver pm $lport
Also, ensured that the DOM thread is running by observing the below message in the syslog.
Additional Information (Optional)