-
Notifications
You must be signed in to change notification settings - Fork 175
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
Modify get_host_lane_assignment_option to return value based on application id #352
Conversation
Signed-off-by: Mihir Patel <patelmi@microsoft.com>
…common into channel_breakout_support
@prgeor @jaganbal-a @keboliu @shyam77git - It will be great if you can help in reviewing this PR |
Please add UT cases and logs |
@shyam77git @jaganbal-a please review |
@keboliu please review |
I have updated it now. |
''' | ||
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 |
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.
can we check if app
is within the number of appl_advt[]
?
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.
Yes, I have now added check for appl <= 0 now as well.
@@ -715,11 +715,15 @@ def get_media_interface_technology(self): | |||
''' | |||
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): |
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.
PR title does not seem to be matching with this API change
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.
I have updated the PR title now
…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>
…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>
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)