Skip to content

Commit

Permalink
Add range check on portchannel min-links (#1630)
Browse files Browse the repository at this point in the history
Restrict the min-links parameter in "config portchannel" to the range 0-1024.

Signed-off-by: Raphael Tryster <raphaelt@nvidia.com>
  • Loading branch information
raphaelt-nvidia authored Jun 21, 2021
1 parent a75a2e8 commit 54fee0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1487,7 +1487,7 @@ def portchannel(ctx, namespace):

@portchannel.command('add')
@click.argument('portchannel_name', metavar='<portchannel_name>', required=True)
@click.option('--min-links', default=0, type=int)
@click.option('--min-links', default=1, type=click.IntRange(1,1024))
@click.option('--fallback', default='false')
@click.pass_context
def add_portchannel(ctx, portchannel_name, min_links, fallback):
Expand Down

0 comments on commit 54fee0f

Please sign in to comment.