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

[supervisor][show][interfaces]Fixed show interfaces command shows warning on Supervisor card #1771

Merged
merged 1 commit into from
Nov 4, 2021

Conversation

mlok-nokia
Copy link
Contributor

@mlok-nokia mlok-nokia commented Aug 17, 2021

What I did

Fixed sonic-net/sonic-buildimage#8521

How I did it

Before displaying the warning message, call device_info.is_supervisor() function to check if it is supervisor card, don't display the warning message.

How to verify it

  1. Running the image on supervisor card
  2. Execute the CLI "show interfaces status"
  3. No warning should be seen.
admin@supervisor:~$ show interfaces status
  Interface    Lanes    Speed    MTU    FEC    Alias    Vlan    Oper    Admin    Type    Asym PFC
  -----------  -------  -------  -----  -----  -------  ------  ------  -------  ------  ---------

Previous command output (if the output of a command-line utility has changed)

New command output (if the output of a command-line utility has changed)

@mlok-nokia
Copy link
Contributor Author

@judyjoseph @abdosi @minionatwork Please help review or assign the right person to review this PR. Thanks

@mlok-nokia mlok-nokia changed the title [supervisor][show][interfaces]show interfaces command shows warning on Supervisor card [supervisor][show][interfaces]Fixed show interfaces command shows warning on Supervisor card Aug 18, 2021
Copy link
Contributor

@arlakshm arlakshm left a comment

Choose a reason for hiding this comment

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

is it possible to add a Unit test for this ?

utilities_common/cli.py Show resolved Hide resolved
@mlok-nokia
Copy link
Contributor Author

is it possible to add a Unit test for this ?

Based on the latest master change (the display message has been changed to Configuration database contains no ports, two Unit test cases have been added: Case#1 displaying this message when there is NO port in linecard. Case#2 not to display this message when there is NO port in Supervisor card.

@mlok-nokia mlok-nokia closed this Sep 14, 2021
@mlok-nokia mlok-nokia reopened this Sep 14, 2021
@mlok-nokia
Copy link
Contributor Author

@arlakshm @zhangyanzhao I have added the test case and address the comment. Please review this PR. Thanks.

@mlok-nokia mlok-nokia closed this Oct 6, 2021
@mlok-nokia mlok-nokia deleted the showintf-warning branch October 6, 2021 13:15
@mlok-nokia mlok-nokia restored the showintf-warning branch October 7, 2021 18:19
@mlok-nokia mlok-nokia reopened this Oct 7, 2021
@mlok-nokia
Copy link
Contributor Author

@arlakshm I have addressed your review comment by adding the UNIT case. Please review the new changes. Thanks

@mlok-nokia
Copy link
Contributor Author

@arlakshm @minionwork Please help to merge this PR to the main line. Thanks.

@mlok-nokia
Copy link
Contributor Author

@judyjoseph This PR has been approved, Please help to merge to the main branch. Thanks.

@arlakshm arlakshm merged commit efbe1f4 into sonic-net:master Nov 4, 2021
judyjoseph pushed a commit that referenced this pull request Nov 14, 2021
…g on Supervisor card (#1771)

What I did
Fixed sonic-net/sonic-buildimage#8521

How I did it
Before displaying the warning message, call device_info.is_supervisor() function to check if it is supervisor card, don't display the warning message.

How to verify it
Running the image on supervisor card
Execute the CLI "show interfaces status"
No warning should be seen.
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.

[[supervisor][show][interfaces]show interfaces command shows warning on Supervisor card
6 participants