-
Notifications
You must be signed in to change notification settings - Fork 753
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
[dualtor]: Mock all y_cable methods for mux sim #3242
Conversation
Signed-off-by: Lawrence Lee <[email protected]>
6b462c3
to
611976a
Compare
Do not merge until #3198 is merged |
@@ -269,3 +277,125 @@ def check_if_link_is_active_for_torB(physical_port): | |||
""" | |||
return True | |||
|
|||
def enable_prbs_mode(physical_port, target, mode_value, lane_map): |
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 would suggest putting a generic note for all these dummy values, so as to ensure that this needs to be corrected in future. suggest putting a TODO as well.
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.
What needs to be done in the future? Since these hardware constructs don't exist for the simulator shouldn't we always use these dummy values?
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.
If we enable /disable loopback or prbs then normal traffic cannot run. I dont know how exactly you can accomplish this with simulator.
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.
Is this something that would be used during normal operation?
@@ -172,7 +180,7 @@ def _post(physical_port, data): | |||
return False | |||
return True | |||
|
|||
def _get(physical_port): | |||
def _get(physical_port, action=None): |
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.
Why add this action
argument? I don't see that it is used.
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 think it's used for flap counter in line 335
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/Azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
What is the motivation for this PR? XCVRD runs some methods which attempt to read from cable hardware. This hardware doesn't exist for mux simulator, so XCVRD writes many errors to the syslog. How did you do it? Implement mocks for all methods in sonic_y_cable to prevent errors from being generated. How did you verify/test it? Inject new mux_simulator_client to dual ToR device with changes from sonic-net/sonic-platform-common#181. Verify PMON and mux containers stay up, and show mux status output looks normal. Initiate CLI switchover and confirm show mux status output reflects switchover. Signed-off-by: Lawrence Lee <[email protected]>
What is the motivation for this PR? XCVRD runs some methods which attempt to read from cable hardware. This hardware doesn't exist for mux simulator, so XCVRD writes many errors to the syslog. How did you do it? Implement mocks for all methods in sonic_y_cable to prevent errors from being generated. How did you verify/test it? Inject new mux_simulator_client to dual ToR device with changes from sonic-net/sonic-platform-common#181. Verify PMON and mux containers stay up, and show mux status output looks normal. Initiate CLI switchover and confirm show mux status output reflects switchover. Signed-off-by: Lawrence Lee <[email protected]>
What is the motivation for this PR? XCVRD runs some methods which attempt to read from cable hardware. This hardware doesn't exist for mux simulator, so XCVRD writes many errors to the syslog. How did you do it? Implement mocks for all methods in sonic_y_cable to prevent errors from being generated. How did you verify/test it? Inject new mux_simulator_client to dual ToR device with changes from sonic-net/sonic-platform-common#181. Verify PMON and mux containers stay up, and show mux status output looks normal. Initiate CLI switchover and confirm show mux status output reflects switchover. Signed-off-by: Lawrence Lee <[email protected]>
Signed-off-by: Lawrence Lee [email protected]
Description of PR
Summary:
Fixes # (issue)
Type of change
Approach
What is the motivation for this PR?
XCVRD runs some methods which attempt to read from cable hardware. This hardware doesn't exist for mux simulator, so XCVRD writes many errors to the syslog.
How did you do it?
Implement mocks for all methods in
sonic_y_cable
to prevent errors from being generated.How did you verify/test it?
Inject new mux_simulator_client to dual ToR device with changes from sonic-net/sonic-platform-common#181. Verify PMON and mux containers stay up, and
show mux status
output looks normal. Initiate CLI switchover and confirmshow mux status
output reflects switchover.Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation