-
Notifications
You must be signed in to change notification settings - Fork 174
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
[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 <marty.lok@nokia.com>
98fa78d
to
6bc5d34
Compare
@dgsudharsan can you review? |
@mlok-nokia how are the changes in bcmshell.py related to the sfputil issue? |
self.logical.extend(logical) | ||
self.logical = list(set(self.logical)) | ||
self.logical_to_physical.update(logical_to_physical) | ||
self.physical_to_logical.update(physical_to_logical) | ||
|
||
return None | ||
|
||
|
||
def read_all_porttab_mappings(self, platform_dir, num_asic_inst): |
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.
@mlok-nokia can you test this in non-multi-asic platform?
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.
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 <marty.lok@nokia.com>
sonic-net#286) Signed-off-by: mlok <marty.lok@nokia.com>
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)