Modify get_host_lane_assignment_option to return value based on application id#352
Merged
prgeor merged 5 commits intosonic-net:masterfrom Mar 18, 2023
Merged
Conversation
Signed-off-by: Mihir Patel <patelmi@microsoft.com>
…common into channel_breakout_support
Contributor
Author
|
@prgeor @jaganbal-a @keboliu @shyam77git - It will be great if you can help in reviewing this PR |
|
Please add UT cases and logs |
Collaborator
|
@shyam77git @jaganbal-a please review |
Collaborator
|
@keboliu please review |
Contributor
Author
I have updated it now. |
prgeor
reviewed
Mar 9, 2023
| ''' | ||
| return self.xcvr_eeprom.read(consts.HOST_LANE_ASSIGNMENT_OPTION) | ||
| appl_advt = self.get_application_advertisement() | ||
| return appl_advt[app]['host_lane_assignment_options'] if len(appl_advt) > 0 else 0 |
Collaborator
There was a problem hiding this comment.
can we check if app is within the number of appl_advt[]?
Contributor
Author
There was a problem hiding this comment.
Yes, I have now added check for appl <= 0 now as well.
prgeor
reviewed
Mar 9, 2023
| return self.xcvr_eeprom.read(consts.MEDIA_INTERFACE_TECH) | ||
|
|
||
| def get_host_lane_assignment_option(self): | ||
| def get_host_lane_assignment_option(self, app=1): |
Collaborator
There was a problem hiding this comment.
PR title does not seem to be matching with this API change
Contributor
Author
There was a problem hiding this comment.
I have updated the PR title now
prgeor
approved these changes
Mar 15, 2023
yxieca
pushed a commit
that referenced
this pull request
Mar 24, 2023
…cation id (#352) * Retrieve channel from CONFIG_DB to enable breakout support Signed-off-by: Mihir Patel <patelmi@microsoft.com> * Enhanced test_get_host_lane_assignment_option * Resolved test case failure * Addressed review comments --------- Signed-off-by: Mihir Patel <patelmi@microsoft.com>
yxieca
pushed a commit
that referenced
this pull request
Aug 29, 2023
…cation id (#352) * Retrieve channel from CONFIG_DB to enable breakout support Signed-off-by: Mihir Patel <patelmi@microsoft.com> * Enhanced test_get_host_lane_assignment_option * Resolved test case failure * Addressed review comments --------- Signed-off-by: Mihir Patel <patelmi@microsoft.com>
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.
The changes with this PR needs to be merged along with sonic-net/sonic-platform-daemons#342
Description
The API get_host_lane_assignment_option doesn't return the host_lane_assignment_options using the application id and always returns value from Application Descriptor 1 (AppSel = 1)
Motivation and Context
The API get_host_lane_assignment_option will now take the AppSel id as the input and would return the host_lane_assignment_option from the relevant Application Descriptor
How Has This Been Tested?
Testcase summary
Please refer to the test details attached to sonic-net/sonic-platform-daemons#342
Additional Information (Optional)