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]: split show interfaces commands into separate file #1044

Merged
merged 2 commits into from
Aug 12, 2020

Conversation

lguohan
Copy link
Contributor

@lguohan lguohan commented Aug 11, 2020

Signed-off-by: Guohan Lu lguohan@gmail.com

- What I did
[show]: split show interfaces commands into separate file

add extensive test coverage for show interfaces commands.

- How I did it

- How to verify it
unit test and on box test

unit test coverage

show/interfaces.py                           223     73    67%

a few things not covered.

show breakout (need to check with @zxu why it is not covered before)
show interfaces lpmode (i think this should be add by part of platform efforts)
show interfaces counters ... (this has never been added, need new efforts to add this)

all others commands are almost 100% covered by the unit tests.

- 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)

Signed-off-by: Guohan Lu <lguohan@gmail.com>
@lguohan lguohan requested a review from jleveque August 11, 2020 19:06
@@ -95,166 +96,6 @@ def run_command(command, display_cmd=False, return_cmd=False):
# Global class instance for SONiC interface name to alias conversion
iface_alias_converter = clicommon.InterfaceAliasConverter()

def print_output_in_alias_mode(output, index):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved to cli.py

click.echo(output.rstrip('\n'))


def run_command_in_alias_mode(command):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved to cli.py

@lgtm-com
Copy link

lgtm-com bot commented Aug 11, 2020

This pull request introduces 4 alerts when merging abd44b1 into 7ae8024 - view on LGTM.com

new alerts:

  • 3 for Unused import
  • 1 for Unused local variable

Signed-off-by: Guohan Lu <lguohan@gmail.com>
@lguohan
Copy link
Contributor Author

lguohan commented Aug 11, 2020

retest this please

@lguohan lguohan merged commit 0e96c99 into sonic-net:master Aug 12, 2020
@lguohan lguohan deleted the showint branch August 12, 2020 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants