From 4f4bd05351e8fe1283a3863ea1db5954c054da40 Mon Sep 17 00:00:00 2001 From: Raphael Tryster Date: Thu, 13 May 2021 06:38:18 +0000 Subject: [PATCH 1/2] Add range check on portchannel min-links 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 3daf93c73d..077e824c52 100755 --- a/config/main.py +++ b/config/main.py @@ -1448,7 +1448,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=0, type=click.IntRange(0,1024)) @click.option('--fallback', default='false') @click.pass_context def add_portchannel(ctx, portchannel_name, min_links, fallback): From 563a2e19932937a36977a40036d91810a273acae Mon Sep 17 00:00:00 2001 From: Raphael Tryster Date: Sun, 13 Jun 2021 15:13:45 +0000 Subject: [PATCH 2/2] Changed min-links lower limit from 0 to 1 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 077e824c52..2db0c8f44a 100755 --- a/config/main.py +++ b/config/main.py @@ -1448,7 +1448,7 @@ def portchannel(ctx, namespace): @portchannel.command('add') @click.argument('portchannel_name', metavar='', required=True) -@click.option('--min-links', default=0, type=click.IntRange(0,1024)) +@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):