allow per-interface filtering for "show interfaces counters errors"#4502
Open
donggyu-nexthop wants to merge 2 commits into
Open
allow per-interface filtering for "show interfaces counters errors"#4502donggyu-nexthop wants to merge 2 commits into
donggyu-nexthop wants to merge 2 commits into
Conversation
Signed-off-by: donggyu-nexthop <donggyu@nexthop.ai>
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: Donggyu Kim <donggyu@nexthop.ai>
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What I did
fixes #4501
Added per-interface filtering for the
show interface counterssuite of commands (for ones that didn't already have this feature)How I did it
in
interfaces/__init__.py, I updatedcounterssub-commands that didn't support per-interface filtering to take in an optionalINTERFACEpositional argument.I added per-interface filtering support for the following commands:
show interfaces counters errorsshow interfaces counters fec-statsshow interfaces counters ratesshow interfaces counterswas also updated to use a positional argument instead of the-iflagThis filtering functionality already existed for the other sub-commands. After discussions it was decided that it'd be best to keep the CLI consistent (with other CLI commands that provide per-interface filtering) by providing filtering capabilities via positional arguments rather than a flag.
How to verify it
on a DUT:
Previous command output (if the output of a command-line utility has changed)
Running
show interfaces counters Ethernet0would spit out a message saying something along the lines of "Ethernet0 is not a valid command".Running
show interfaces counters errors Ethernet0would ignore the interface argument, and print out the counters table for all admin-up interfacesNew command output (if the output of a command-line utility has changed)