Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[show] fix "show interfaces breakout" command (#1198)
**- What I did** Fixed `show interface breakout` command **- How I did it** **- How to verify it** From command line type `show interface breakout` **- Previous command output (if the output of a command-line utility has changed)** ``` Traceback (most recent call last): File "/usr/local/bin/show", line 10, in <module> sys.exit(cli()) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 764, in __call__ return self.main(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 717, in main rv = self.invoke(ctx) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1114, in invoke return Command.invoke(self, ctx) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 956, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 555, in invoke return callback(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/click/decorators.py", line 17, in new_func return f(get_current_context(), *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/show/interfaces/__init__.py", line 135, in breakout config_db = ConfigDBConnector() NameError: global name 'ConfigDBConnector' is not defined ``` **- New command output (if the output of a command-line utility has changed)** Related from DPB config. e.g. ``` { "Ethernet0": { "index": "0,0,0,0", "default_brkout_mode": "1x100G[40G]", "child ports": "Ethernet0", "breakout_modes": "1x100G[40G],2x50G,4x25G[10G],2x25G(2)+1x50G(2),1x50G(2)+2x25G(2)", "child port speeds": "100G", "Current Breakout Mode": "1x100G[40G]", "lanes": "25,26,27,28", "alias_at_lanes": "Ethernet0/0,Ethernet0/1,Ethernet0/2,Ethernet0/3" } } ```
- Loading branch information