Skip to content

Commit

Permalink
Revert "Revert "Fixed config Asym PFC CLI. (#632)" (#652)"
Browse files Browse the repository at this point in the history
This reverts commit 2ee916c.
  • Loading branch information
yxieca committed Oct 1, 2019
1 parent 7bb6ffb commit 03582a2
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions config/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1183,14 +1183,17 @@ def pfc(ctx):
#

@pfc.command()
@click.argument('interface_name', metavar='<interface_name>', required=True)
@click.argument('status', type=click.Choice(['on', 'off']))
@click.pass_context
def asymmetric(ctx, status):
def asymmetric(ctx, interface_name, status):
"""Set asymmetric PFC configuration."""
config_db = ctx.obj["config_db"]
interface = ctx.obj["interface_name"]
if get_interface_naming_mode() == "alias":
interface_name = interface_alias_to_name(interface_name)
if interface_name is None:
ctx.fail("'interface_name' is None!")

run_command("pfc config asymmetric {0} {1}".format(status, interface))
run_command("pfc config asymmetric {0} {1}".format(status, interface_name))

#
# 'platform' group ('config platform ...')
Expand Down

0 comments on commit 03582a2

Please sign in to comment.