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

[show] cli support for show muxcable cableinfo #1448

Merged
merged 7 commits into from
Feb 25, 2021

Conversation

vdahiya12
Copy link
Contributor

Summary:
This PR provides the support for adding CLI commands for retrieving cable vendor name and part number information of the muxcable.
In particular these Cli commands are supported:
show muxcable cableinfo <port>

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

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 retrieving cable vendor name and part number information of the 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 Arista7050cx3 testbed with Gemini cable

Signed-off-by: vaibhav-dahiya [email protected]

@vdahiya12 vdahiya12 added the show label Feb 19, 2021
@vdahiya12 vdahiya12 marked this pull request as draft February 19, 2021 20:28
Signed-off-by: vaibhav-dahiya <[email protected]>
@vdahiya12 vdahiya12 marked this pull request as ready for review February 22, 2021 18:13
tests/muxcable_test.py Show resolved Hide resolved
Signed-off-by: vaibhav-dahiya <[email protected]>
show/muxcable.py Outdated Show resolved Hide resolved
show/muxcable.py Outdated Show resolved Hide resolved
Signed-off-by: vaibhav-dahiya <[email protected]>
show/muxcable.py Outdated Show resolved Hide resolved
show/muxcable.py Outdated Show resolved Hide resolved
show/muxcable.py Outdated
temp_list.append(part)
lane_data.append(temp_list)
click.echo(tabulate(lane_data, headers=headers))
sys.exit(EXIT_SUCCESS)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that we've changed the success code to 0, there's no need to call sys.exit(EXIT_SUCCESS) anywhere, because Click will exit 0 by default.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please plan to open a cleanup PR to remove all other sys.exit(EXIT_SUCCESS) calls

Signed-off-by: vaibhav-dahiya <[email protected]>
Signed-off-by: vaibhav-dahiya <[email protected]>
@vdahiya12
Copy link
Contributor Author

Retest this please

@vdahiya12 vdahiya12 merged commit 79ccd03 into sonic-net:master Feb 25, 2021
@vdahiya12 vdahiya12 deleted the cli-enhance branch February 25, 2021 19:29
anand-kumar-subramanian pushed a commit to anand-kumar-subramanian/sonic-utilities that referenced this pull request Mar 2, 2021
Summary:
This PR provides the support for adding CLI commands for retrieving cable vendor name and part number information of the muxcable.
In particular these Cli commands are supported:
show muxcable cableinfo <port>

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 retrieving cable vendor name and part number information of the muxcable.

Signed-off-by: vaibhav-dahiya <[email protected]>
daall pushed a commit that referenced this pull request Mar 10, 2021
Summary:
This PR provides the support for adding CLI commands for retrieving cable vendor name and part number information of the muxcable.
In particular these Cli commands are supported:
show muxcable cableinfo <port>

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 retrieving cable vendor name and part number information of the muxcable.

Signed-off-by: vaibhav-dahiya <[email protected]>
stepanblyschak pushed a commit to stepanblyschak/sonic-utilities that referenced this pull request Apr 28, 2022
  [portsorch]: Set proper initial forwarding state for LAG member
  (sonic-net#1448)

Signed-off-by: Abhishek Dosi <[email protected]>
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.

3 participants