Skip to content

Commit 54fee0f

Browse files
Add range check on portchannel min-links (#1630)
Restrict the min-links parameter in "config portchannel" to the range 0-1024. Signed-off-by: Raphael Tryster <raphaelt@nvidia.com>
1 parent a75a2e8 commit 54fee0f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

config/main.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1487,7 +1487,7 @@ def portchannel(ctx, namespace):
14871487

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

0 commit comments

Comments
 (0)