Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
Signed-off-by: Guohan Lu <lguohan@gmail.com>
  • Loading branch information
lguohan committed Aug 8, 2020
1 parent cba2661 commit 76d9608
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -884,9 +884,9 @@ def config(ctx):

ctx.obj = Db()

config.add_command(feature.feature)
config.add_command(aaa.aaa)
config.add_command(aaa.tacacs)
config.add_command(feature.feature)
# === Add NAT Configuration ==========
config.add_command(nat.nat)

Expand Down
4 changes: 2 additions & 2 deletions show/feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
from natsort import natsorted
from tabulate import tabulate

from utilities_common.cli import pass_db
from utilities_common.cli import AbbreviationGroup, pass_db

#
# 'feature' group (show feature ...)
#
@click.group(name='feature', invoke_without_command=False)
@click.group(cls=AbbreviationGroup, name='feature', invoke_without_command=False)
def feature():
"""Show feature status"""
pass
Expand Down
9 changes: 9 additions & 0 deletions tests/feature_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,15 @@ def test_show_feature_status(self, get_cmd_module):
assert result.exit_code == 0
assert result.output == show_feature_status_output

def test_show_feature_status_abbrev_cmd(self, get_cmd_module):
(config, show) = get_cmd_module
runner = CliRunner()
result = runner.invoke(show.cli.commands["feature"], ["st"])
print(result.exit_code)
print(result.output)
assert result.exit_code == 0
assert result.output == show_feature_status_output

def test_show_bgp_feature_status(self, get_cmd_module):
(config, show) = get_cmd_module
runner = CliRunner()
Expand Down

0 comments on commit 76d9608

Please sign in to comment.