Skip to content
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

[sonic_y_cable]: Decorate all method for mux simulator #181

Merged
merged 1 commit into from
Mar 30, 2021

Conversation

theasianpianist
Copy link
Contributor

Signed-off-by: Lawrence Lee lawlee@microsoft.com

Description

Use the @hook_y_cable_simulator decorator for all methods in y_cable.py

Motivation and Context

Decorating all methods (including those that read from hardware) allow us to mock these methods in the mux simulator client and prevent XCVRD from generating errors when run with the mux simulator.

How Has This Been Tested?

Copied changes to a dual ToR testbed with mux simulator, verified normal operation.

Additional Information (Optional)

Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
@theasianpianist theasianpianist merged commit cc162d6 into sonic-net:master Mar 30, 2021
@theasianpianist theasianpianist deleted the hook-y-cable branch March 30, 2021 21:43
wangxin pushed a commit to sonic-net/sonic-mgmt that referenced this pull request Apr 1, 2021
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 <lawlee@microsoft.com>
nirmalya-keysight pushed a commit to nirmalya-keysight/sonic-mgmt that referenced this pull request Apr 5, 2021
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 <lawlee@microsoft.com>
saravanansv pushed a commit to saravanansv/sonic-mgmt that referenced this pull request May 6, 2021
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 <lawlee@microsoft.com>
vmittal-msft pushed a commit to vmittal-msft/sonic-mgmt that referenced this pull request Sep 28, 2021
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 <lawlee@microsoft.com>
oleksandrivantsiv pushed a commit to oleksandrivantsiv/sonic-platform-common that referenced this pull request Oct 25, 2024
Xcvrd crashes when pushing QSFP DD DOM info to state DB.

#### Description
**xcvrd crash log:**
     “May 6 05:12:37.446235 S1G2 ERR pmon#xcvrd[5292]: This functionality is currently not implemented for this platform”
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants