Skip to content

Commit

Permalink
[voq][chassis] VOQ cli show commands implementation (#1689)
Browse files Browse the repository at this point in the history
Changes in this commit
- Implementation of the following show commands for VOQ chassis.

show chassis system-ports [<system port>] {-n <namespace>}, if multi-asic voq chassis
show chassis system-ports [<system port>] , if single asic voq chassis
show chassis system-neighbors [<nbr ip address>] [-n <asic name>]
show chassis system-lags [<system lag>] [-n <asic name>] [-l <linecard or host name>]

- The existing chassis commands under "show chassis_modules" and
"config chassis_modules" have been renamed (moved) under
"show chassis modules" and "config chassis modules" respectively

Signed-off-by: vedganes <vedavinayagam.ganesan@nokia.com>
  • Loading branch information
vganesan-nokia committed Aug 25, 2021
1 parent 37039f5 commit 7ebb2f7
Show file tree
Hide file tree
Showing 12 changed files with 778 additions and 26 deletions.
13 changes: 9 additions & 4 deletions config/chassis_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,19 @@
# 'chassis_modules' group ('config chassis_modules ...')
#
@click.group(cls=clicommon.AliasedGroup)
def chassis_modules():
"""Configure chassis-modules options"""
def chassis():
"""Configure chassis commands group"""
pass

@chassis.group()
def modules():
"""Configure chassis modules"""
pass

#
# 'shutdown' subcommand ('config chassis_modules shutdown ...')
#
@chassis_modules.command('shutdown')
@modules.command('shutdown')
@clicommon.pass_db
@click.argument('chassis_module_name', metavar='<module_name>', required=True)
def shutdown_chassis_module(db, chassis_module_name):
Expand All @@ -34,7 +39,7 @@ def shutdown_chassis_module(db, chassis_module_name):
#
# 'startup' subcommand ('config chassis_modules startup ...')
#
@chassis_modules.command('startup')
@modules.command('startup')
@clicommon.pass_db
@click.argument('chassis_module_name', metavar='<module_name>', required=True)
def startup_chassis_module(db, chassis_module_name):
Expand Down
2 changes: 1 addition & 1 deletion config/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,7 @@ def config(ctx):
config.add_command(aaa.aaa)
config.add_command(aaa.tacacs)
config.add_command(aaa.radius)
config.add_command(chassis_modules.chassis_modules)
config.add_command(chassis_modules.chassis)
config.add_command(console.console)
config.add_command(feature.feature)
config.add_command(kdump.kdump)
Expand Down
Loading

0 comments on commit 7ebb2f7

Please sign in to comment.