-
Notifications
You must be signed in to change notification settings - Fork 659
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
[config][show] cli support for retrieving ber, eye-info and configuring prbs, loopback on Y-cable #1386
[config][show] cli support for retrieving ber, eye-info and configuring prbs, loopback on Y-cable #1386
Conversation
eye info, configure prbs and loopback Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
show/muxcable.py
Outdated
|
||
if os.geteuid() != 0: | ||
click.echo("Root privileges are required for this operation") | ||
sys.exit(CONFIG_FAIL) |
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.
CONFIG_SUCCESSFUL
/ CONFIG_FAIL
names don't really apply to the show command, as nothing is being configured. Can we change them to EXIT_SUCCESS
and EXIT_FAILURE
, or similar? And what is the difference between the CONFIG_*
values and the STATUS_*
codes?
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.
fixed. changed these to EXIT_FAILURE
. Actually all these error codes require rework now that I read your comment. Originally i wrote STATUS_
and CONFIG_
to differentiate between
show muxcable status
and
show muxcable config
but they are confusing as we are not configuring everything in config. But hwproxy now already has the error codes handed over. Maybe just rename them and keep the codes(integer value) as is ?
**- Why I did it** sonic-utilities will become dependent upon sonic-platform-common as of sonic-net/sonic-utilities#1386. **- How I did it** - Add sonic-platform-common as a dependency in docker-sonic-vs.mk - Additionally, no longer install Python 2 packages of swsssdk and sonic-py-common, as they should no longer be needed.
Restest this please |
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
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.
Also please update Command Reference to reflect the new enable
/disable
subcommands.
**- Why I did it** sonic-utilities will become dependent upon sonic-platform-common as of sonic-net/sonic-utilities#1386. **- How I did it** - Add sonic-platform-common as a dependency in docker-sonic-vs.mk - Additionally, no longer install Python 2 packages of swsssdk and sonic-py-common, as they should no longer be needed.
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Retest this please |
**- Why I did it** sonic-utilities will become dependent upon sonic-platform-common as of sonic-net/sonic-utilities#1386. **- How I did it** - Add sonic-platform-common as a dependency in docker-sonic-vs.mk - Additionally, no longer install Python 2 packages of swsssdk and sonic-py-common, as they should no longer be needed.
…ng prbs, loopback on Y-cable (#1386) This PR provides the support for adding CLI commands for configuring prbs, loopback and showing the BER and Eye info of the muxcable. In particular these Cli commands are supported: ` show muxcable eyeinfo <portnumber><target>` ` show muxcable berinfo <portnumber> <target>` `config muxcable prbs <portnumber> <target> <mode> <lanemap>` `config muxcable loopback <portnumber> <target> <lanemap>` #### What is the motivation for this PR? To add the support for Cli for muxcable to be utilized for configuring prbs, loopback modes and showing the ber, eye info of all the Port/Ports on a muxcable. Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
sonic-utilities will become dependent upon sonic-platform-common as of sonic-net/sonic-utilities#1386.
…ng prbs, loopback on Y-cable (sonic-net#1386) This PR provides the support for adding CLI commands for configuring prbs, loopback and showing the BER and Eye info of the muxcable. In particular these Cli commands are supported: ` show muxcable eyeinfo <portnumber><target>` ` show muxcable berinfo <portnumber> <target>` `config muxcable prbs <portnumber> <target> <mode> <lanemap>` `config muxcable loopback <portnumber> <target> <lanemap>` #### What is the motivation for this PR? To add the support for Cli for muxcable to be utilized for configuring prbs, loopback modes and showing the ber, eye info of all the Port/Ports on a muxcable. Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
sonic-utilities will become dependent upon sonic-platform-common as of sonic-net/sonic-utilities#1386.
Summary:
This PR provides the support for adding CLI commands for configuring prbs, loopback and showing the BER and Eye info of the muxcable.
In particular these Cli commands are supported:
show muxcable eyeinfo <portnumber><target>
show muxcable berinfo <portnumber> <target>
config muxcable prbs <portnumber> <target> <mode> <lanemap>
config muxcable loopback <portnumber> <target> <lanemap>
Type of change
Approach
added the changes in sonic-utilities/show and sonic-utilities/config by changing the muxcable.py
What is the motivation for this PR?
To add the support for Cli for muxcable to be utilized for configuring prbs, loopback modes and showing the ber, eye info of all the Port/Ports on a muxcable.
How did you do it?
Added the changes inside sonic-utilities and tested it on the testbed
How did you verify/test it?
Ran the cli commands on an Arista7260cx3 testbed with Gemini cable
Signed-off-by: vaibhav-dahiya vdahiya@microsoft.com