-
Notifications
You must be signed in to change notification settings - Fork 666
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 interface portchannel support for Multi ASIC #1005
Conversation
Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <arlakshm@microsoft.com>
This pull request introduces 1 alert when merging e71321f into aa1b072 - view on LGTM.com new alerts:
|
Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <arlakshm@microsoft.com>
Please note that the PR check build will fail until the following PRs are merged (in this order): |
show/main.py
Outdated
@@ -1116,10 +1117,15 @@ def rif(interface, period, verbose): | |||
|
|||
# 'portchannel' subcommand ("show interfaces portchannel") | |||
@interfaces.command() | |||
@multi_asic_click_options |
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.
For the config commands I add the namespace option at the command group level ( i.e if you take this example ..it will be like show interfaces -n asic0 portchannel/counters ) instead of specifying the options after the subcommand keyword viz portchannel, counters etc ..
I was looking to see if both the show and config commands follow similar approach .. @arlakshm @jleveque your thoughts ?
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.
@judyjoseph. IMO the CLI syntax is cleaner if we have the keywords first then followed by options/arguments.
Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <arlakshm@microsoft.com>
This pull request introduces 2 alerts when merging a942c4b into 8768580 - view on LGTM.com new alerts:
|
please pass the test |
@click.option('--verbose', is_flag=True, help="Enable verbose output") | ||
@clicommon.pass_db |
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.
why is this removed? this can break the unit test.
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.
With multi asic support, Teamshow will connect to DBs in each namespace or default namespace. No need to pass the db. Unit test will work with the changes done to support multi asic CLIs
Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <arlakshm@microsoft.com>
This pull request introduces 2 alerts when merging 0eaaa72 into 2c0ff92 - view on LGTM.com new alerts:
|
@lguohan, tests are passing now. There was dependency with PR #1006 for Unit tests to work.
|
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.
approve with caveats. we need to allow to pass db into the commands for unit tests
Add the multi ASIC specific options for the command show interface portchannel
Depends on the following PRs
Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan arlakshm@microsoft.com
- What I did
Add support for multi ASIC CLI options for
show interface portchannels
2 new options have added
[-n, --namespace] to allow user to display the information for given namespaces
If this option is not present the information from all the namespaces will be displayed
[-d, --display] to allow user to display information related both internal and external interfaces
If this option is not present only external interfaces/neighbors will be display
One single ASIC platform, this options are not valid, so the behavior remains unchanged
- How I did it
-n
and-d
optionsThis new options are ignored for single ASIC platforms
- How to verify it
Help menu on multi ASIC platforms
Sample output for show interface portchannel
**Sample output for single ASIC **
- 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)