Skip to content

Commit

Permalink
[pfc_asym]: Fix config CLI command according to latest changes (sonic…
Browse files Browse the repository at this point in the history
…-net#348)

Signed-off-by: Volodymyr Samotiy <volodymyrs@mellanox.com>
  • Loading branch information
Volodymyr Samotiy authored and lguohan committed Oct 17, 2018
1 parent cffb38a commit e6ee437
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions config/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,8 @@ def ecn(profile, rmax, rmin, ymax, ymin, gmax, gmin, verbose):
#

@interface.group()
def pfc():
@click.pass_context
def pfc(ctx):
"""Set PFC configuration."""
pass

Expand All @@ -913,9 +914,12 @@ def pfc():

@pfc.command()
@click.argument('status', type=click.Choice(['on', 'off']))
@click.argument('interface', type=click.STRING)
def asymmetric(status, interface):
@click.pass_context
def asymmetric(ctx, status):
"""Set asymmetric PFC configuration."""
config_db = ctx.obj["config_db"]
interface = ctx.obj["interface_name"]

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

#
Expand Down

0 comments on commit e6ee437

Please sign in to comment.