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

Remove dependency on click-default-group package #903

Merged
merged 2 commits into from
May 9, 2020
Merged

Remove dependency on click-default-group package #903

merged 2 commits into from
May 9, 2020

Conversation

jleveque
Copy link
Contributor

@jleveque jleveque commented May 4, 2020

Inheriting DefaultGroup class from click-default-group package breaks autocomplete, so we remove dependence upon it.

Fixes #27

  • In doing so, a couple commands changed:

    • Previously, sonic-clear ip bgp would, by default, clear all bgp data for all neighbors. This functionality was already being duplicated if someone ran sonic-clear ip bgp neighbor without specifying a peer IP address. Thus, I instead added an 'all' subcommand to sonic-clear ip bgp neighbor (and also added a matching 'all' subcommand to the 'soft' group sonic-clear ip bgp soft), restructuring the sonic-clear ip bgp commands as follows:

      • sonic-clear ip bgp neighbor all [<ipaddress>]
      • sonic-clear ip bgp neighbor in [<ipaddress>]
      • sonic-clear ip bgp neighbor out [<ipaddress>]
      • sonic-clear ip bgp neighbor soft all [<ipaddress>]
      • sonic-clear ip bgp neighbor soft in [<ipaddress>]
      • sonic-clear ip bgp neighbor soft out [<ipaddress>]
    • I think we could further consolidate these functions in the future by adding soft as an option (e.g., a -s|--soft flag?) to the first three sonic-clear ip bgp neighbor commands instead of making it its own subgroup of commands (opened issue [clear] Consolidate 'soft' variants of bgp neighbor clear commands #906).

    • I also think we should consider removing the undebug utility, and instead add an on|off parameter to all commands in the debug utility, thus consolidating further (opened issue Consider removing 'undebug' utility and consolidate functinality into 'debug' utility #905).

  • Also corrected some docstrings

@jleveque jleveque self-assigned this May 4, 2020
@jleveque jleveque marked this pull request as ready for review May 4, 2020 17:12
@jleveque jleveque merged commit f57b487 into sonic-net:master May 9, 2020
@jleveque jleveque deleted the remove_defaultgroup branch May 9, 2020 21:46
jleveque added a commit to sonic-net/sonic-buildimage that referenced this pull request Jun 19, 2020
All dependencies upon the Python 'click-default-group' package have been removed from sonic-utilities as of sonic-net/sonic-utilities#903. The submodule was updated to include this patch as of #4601, therefore we no longer need to install this package in the SONiC image.
abdosi pushed a commit to abdosi/sonic-utilities that referenced this pull request Aug 4, 2020
stepanblyschak pushed a commit to stepanblyschak/sonic-utilities that referenced this pull request Apr 28, 2022
Reverted Add 'interface transceiver' subgroup with 'lpmode' and 'reset'
subcommands (sonic-net#904) as it dependent of sonic-net#903 which is not marked to
cherry-pick for 201911. Need to add that before we can use this.
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.

[CLI]: 'Default' commands prevent autocomplete from displaying subcommands
3 participants