[20212][port2alias]: Fix to get right number of return values #2188
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.
(cherry picked from commit 3714f63)
Signed-off-by: Suvarna Meenakshi sumeenak@microsoft.com
What I did
Cherry-pick of #1906 to 202012 branch
Fix conflict also few changes done to cherry-pick:
get_port_config was modified to return different set number of arguments in PR: sonic-net/sonic-buildimage#4222. Changes in this PR is:
Additional change done over the cherry-pick:
added setup_class method in test case to load single asic mock db, this was done in pfcwd_test teardown method in 201911 and master branches. It is not done in 202012 branch, hence added setup_class method.
How I did it
Modify port2alias to read ports from all namespaces and also add unit-test
How to verify it
Verified on single and multi-asic DUTs with 202012 image.
Previous command output (if the output of a command-line utility has changed)
New command output (if the output of a command-line utility has changed)