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

[config] Add 'interface transceiver' subgroup with 'lpmode' and 'reset' subcommands #904

Merged
merged 4 commits into from
May 9, 2020
Merged

[config] Add 'interface transceiver' subgroup with 'lpmode' and 'reset' subcommands #904

merged 4 commits into from
May 9, 2020

Conversation

jleveque
Copy link
Contributor

@jleveque jleveque commented May 5, 2020

Add 'transceiver' subgroup with 'lpmode' and 'reset' subcommands to 'config interface' group, wrapping sfputil commands.

New command examples:

user@sonic~$ sudo config interface transceiver --help
Usage: config interface transceiver [OPTIONS] COMMAND [ARGS]...

  SFP transceiver configuration

Options:
  -?, -h, --help  Show this message and exit.

Commands:
  lpmode  Enable/disable low-power mode for transceiver
  reset   Reset transceiver

user@sonic~$ sudo config interface transceiver lpmode --help          
Usage: config interface transceiver lpmode [OPTIONS] <interface_name>
                                           (enable|disable)

  Enable/disable low-power mode for SFP transceiver module

Options:
  -?, -h, --help  Show this message and exit.

user@sonic~$ sudo config interface transceiver lpmode Ethernet0 enable
Enabling low-power mode for port Ethernet0...  OK

user@sonic~$ sudo config interface transceiver lpmode Ethernet0 disable
Disabling low-power mode for port Ethernet0...  OK

user@sonic~$ sudo config interface transceiver reset --help
Usage: config interface transceiver reset [OPTIONS] <interface_name>

  Reset SFP transceiver module

Options:
  -?, -h, --help  Show this message and exit.

user@sonic~$ sudo config interface transceiver reset Ethernet0
Resetting port Ethernet0...  OK

@jleveque jleveque merged commit 45eb491 into sonic-net:master May 9, 2020
@jleveque jleveque deleted the config_int_transceiver branch May 9, 2020 21:45
rlhui pushed a commit that referenced this pull request May 10, 2020
abdosi added a commit that referenced this pull request May 10, 2020
abdosi added a commit that referenced this pull request May 12, 2020
abdosi pushed a commit that referenced this pull request May 20, 2020
abdosi added a commit that referenced this pull request May 21, 2020
@abdosi
Copy link
Contributor

abdosi commented May 21, 2020

@jleveque Cherry-pick into 201911 seems to have issue with the change @interface.group(cls=AbbreviationGroup)

I think we ned some other PR's also to go with this one to complete the support of this cls=AbbreviationGroup

For time being i have reverted this PR form 201911.

admin@str-dx010-acs-1:/$ sudo warm-reboot -vvv
Traceback (most recent call last):
File "/usr/bin/config", line 8, in
from config.main import config
File "/usr/lib/python2.7/dist-packages/config/main.py", line 1839, in
@interface.group(cls=AbbreviationGroup)
NameError: name 'AbbreviationGroup' is not defined
Thu May 21 02:40:00 UTC 2020 warm-reboot failure (1) cleanup ...
Traceback (most recent call last):
File "/usr/bin/config", line 8, in
from config.main import config
File "/usr/lib/python2.7/dist-packages/config/main.py", line 1839, in
@interface.group(cls=AbbreviationGroup)
NameError: name 'AbbreviationGroup' is not defined
Thu May 21 02:40:01 UTC 2020 Cancel warm-reboot: code (1)
admin@str-dx010-acs-1:/$

@jleveque
Copy link
Contributor Author

@abdosi: This PR is dependent upon #893. I just added the "Request for 201911 branch" label to that PR. Please see if it will cherry-pick cleanly. If not, we will need to create a separate PR.

abdosi pushed a commit that referenced this pull request Jun 16, 2020
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
[Vnet] Fix NameError for 'swsssdk' and align output (sonic-net#902)
[config] Add 'interface transceiver' subgroup with 'lpmode' and 'reset' subcommands (sonic-net#904)
Improved route_check tool and adopt to 20191130 image. (sonic-net#898)
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.
stepanblyschak pushed a commit to stepanblyschak/sonic-utilities that referenced this pull request Apr 28, 2022
[201911][show] Fix abbreviations for 'show ip bgp ...' commands (sonic-net#909)
Changes to support acl-loader and mirror-session config commands for
multi-npu platforms. (sonic-net#908)
Changes to commands  config reload/load-minigraph (sonic-net#919)
Stop/Start restapi server upon config reload (sonic-net#911)
[config] Add 'interface transceiver' subgroup with 'lpmode' and
'reset' subcommands (sonic-net#904)
stepanblyschak pushed a commit to stepanblyschak/sonic-utilities that referenced this pull request Apr 28, 2022
 Revert "[config] Add 'interface transceiver' subgroup with 'lpmode' and
 'reset' subcommands (sonic-net#904)"
  Multi-asic changes for config bgp commands and utilities. (sonic-net#910)
stepanblyschak pushed a commit to stepanblyschak/sonic-utilities that referenced this pull request Apr 28, 2022
 [201911][thermal control] Backport changes from master branch (sonic-net#929)
     [201911][config] Support abbreviation (sonic-net#933)
       Add 'hw-management-generate-dump.sh' to 'show techsupport'
       command (sonic-net#934)
       [fwutil]: Update fwutil to v2.0.0.0. (sonic-net#942)
       Fixes bug for PFCWD feature parameters (sonic-net#838)
     Fixed fast-reboot for BFN platform (sonic-net#871)
     [config] Add 'interface transceiver' subgroup with 'lpmode' and
     'reset' subcommands (sonic-net#904)
      [warm-reboot]: added pre-check for ISSU file (sonic-net#915)
       [config] Don't attempt to restart disabled services (sonic-net#944)
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.

4 participants