From 54fee0f7c81378a1ff956993fb3f058b9120bb83 Mon Sep 17 00:00:00 2001 From: Raphael Tryster <75927947+raphaelt-nvidia@users.noreply.github.com> Date: Mon, 21 Jun 2021 18:54:24 +0300 Subject: [PATCH] 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 --- config/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/main.py b/config/main.py index 43c5ff4ee5d1..f05084846c26 100644 --- a/config/main.py +++ b/config/main.py @@ -1487,7 +1487,7 @@ def portchannel(ctx, namespace): @portchannel.command('add') @click.argument('portchannel_name', metavar='', 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):