-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[multi-asic] Use asic_id/asic_name for APIs to get port config data #18452
Conversation
Signed-off-by: Anand Mehra anamehra@cisco.com
Hi @abdosi , please review. |
I raised a PR to fix this #18452 |
Please help with the review. Thanks |
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.
Looks good
@SuvarnaMeenakshi : can you help with review of this. |
Thank you for the fix. |
Thanks for review @SuvarnaMeenakshi ! May I use another PR to add UT? Busy with a couple of other activities. This PR needs to help with nightly T2 runs. |
It might fall through later, it appears to be a simple UT can do the test in this case. |
Hi @SuvarnaMeenakshi , added the test case, please review. Thanks |
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.
lgtm
Hi @SuvarnaMeenakshi , @abdosi , please suggest what to be done for ms_conflict. Thanks |
@anamehra please help resolve conflicts |
/azpw ms_conflict -f |
Hi @abdosi , please merge. Thanks |
@qiluo-msft : can you help with merge of this. |
Signed-off-by: Anand Mehra anamehra@cisco.com
Fixes: #18431
Why I did it
sonic-cfggen misses handling for namespace at couple of locations. Due to this, when port config is fetched, it returns data from global config and not the namespace.
The function calls for
get_path_to_port_config_file
get_port_config
needs to be fixed to handle namespace for multi-asic.
Work item tracking
How I did it
1.Pass asic_id as argument when calling get_path_to_port_config_file()
For single asic, asic_id is None and the function returns the correct port_config.ini file path.
For multi-asic, using asic_id provides the correct file path for the asic.
How to verify it
sonic-cfggen -H --print -n -k
This command should return the correct port config for the namespace.
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)