diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-12-04 14:15:37 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-12-04 14:18:11 +0100 |
commit | 84b29c7c71af6663ef26dc40475cf4b0e5b179a6 (patch) | |
tree | a74faf11b700ef4f7444754f0f424d980bf68be0 /src/validators | |
parent | 4683223c8ffcb10470f7a8a2eb48d57773ac73df (diff) | |
download | vyos-1x-84b29c7c71af6663ef26dc40475cf4b0e5b179a6.tar.gz vyos-1x-84b29c7c71af6663ef26dc40475cf4b0e5b179a6.zip |
validators: T4042: rename bgp-route-target -> bgp-rd-rt
Diffstat (limited to 'src/validators')
-rwxr-xr-x | src/validators/bgp-rd-rt (renamed from src/validators/bgp-route-target) | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/validators/bgp-route-target b/src/validators/bgp-rd-rt index e7e4d403f..24b0043f9 100755 --- a/src/validators/bgp-route-target +++ b/src/validators/bgp-rd-rt @@ -19,8 +19,8 @@ from vyos.template import is_ipv4 parser = ArgumentParser() group = parser.add_mutually_exclusive_group() -group.add_argument('--single', action='store', help='Validate and allow only one route-target') -group.add_argument('--multi', action='store', help='Validate multiple, whitespace separated route-targets') +group.add_argument('--route-target', action='store', help='Validate one BGP route-target') +group.add_argument('--route-target-multi', action='store', help='Validate multiple, whitespace separated BGP route-targets') args = parser.parse_args() def is_valid_rt(rt): @@ -35,12 +35,12 @@ def is_valid_rt(rt): return False if __name__ == '__main__': - if args.single: - if not is_valid_rt(args.single): + if args.route_target: + if not is_valid_rt(args.route_target): exit(1) - elif args.multi: - for rt in args.multi.split(' '): + elif args.route_target_multi: + for rt in args.route_target_multi.split(' '): if not is_valid_rt(rt): exit(1) |