[multiasic][sfputil]Fix the sftpuitlhelper on mutilasic platform issue#286
Conversation
|
@rlhui @judyjoseph @prgeor Please review this PR for sfputilhelper on multiasic platform issue. Thanks! |
5b6d71d to
8698c75
Compare
|
@rlhui @judyjoseph @prgeor Unit test case has been also added. Please review this PR. |
8698c75 to
10d6a40
Compare
10d6a40 to
98fa78d
Compare
Signed-off-by: mlok <[email protected]>
98fa78d to
6bc5d34
Compare
|
@dgsudharsan can you review? |
|
@mlok-nokia how are the changes in bcmshell.py related to the sfputil issue? |
| return None | ||
|
|
||
|
|
||
| def read_all_porttab_mappings(self, platform_dir, num_asic_inst): |
There was a problem hiding this comment.
@mlok-nokia can you test this in non-multi-asic platform?
There was a problem hiding this comment.
We don't have any non-multi-asic platform to test this change. But there is an existing UT test_read_port_mappings() for the non-multi-asic case. Not sure if it is enough
This change has nothing to do with the sfputil. During the build/UT and PEP8/flake8 verification, it complains the syntax as warning. I just fix them in the same commit. |
#286) Signed-off-by: mlok <[email protected]>
Description
read_porttab_mappings() is not able to get the multiasic port config. Modified function read_porttab_mapings() to pass the asic_name to allow the get_port_config() to get the port info for each asic. Also use the extend() and update() method to update the logical, logical_to_physical, phyiscal_to_logical lists. Also add the unit test case test_read_all_porttab_mappings() .
Motivation and Context
This change is required to handle the mutliasic platform. Fixes sonic-net/sonic-buildimage#10569
How Has This Been Tested?
The following output should be displayed without any error when using CLI command: sudo sfpulti show presence
Additional Information (Optional)