summaryrefslogtreecommitdiff
path: root/src/conf_mode/vrrp.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-09-21 22:07:33 +0200
committerChristian Poessinger <christian@poessinger.com>2021-09-21 22:11:49 +0200
commitb9d4d8c67d6b41ebbf5b570c7c6b09e05520e737 (patch)
tree8ba912776fddc2ef299c1675822c909c1da86ef4 /src/conf_mode/vrrp.py
parent2a57f786931793d59cc5ec2c3a925807b6ee3938 (diff)
downloadvyos-1x-b9d4d8c67d6b41ebbf5b570c7c6b09e05520e737.tar.gz
vyos-1x-b9d4d8c67d6b41ebbf5b570c7c6b09e05520e737.zip
vrrp: keepalived: T3847: migrate/streamline CLI options
Rename virtual-address -> address as we always talk about an IP address.
Diffstat (limited to 'src/conf_mode/vrrp.py')
-rwxr-xr-xsrc/conf_mode/vrrp.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/conf_mode/vrrp.py b/src/conf_mode/vrrp.py
index ba156e915..ffe9dd276 100755
--- a/src/conf_mode/vrrp.py
+++ b/src/conf_mode/vrrp.py
@@ -72,8 +72,8 @@ def verify(vrrp):
if 'interface' not in group_config:
raise ConfigError(f'Interface is required but not set in VRRP group "{group}"')
- if 'virtual_address' not in group_config:
- raise ConfigError(f'virtual-address is required but not set in VRRP group "{group}"')
+ if 'address' not in group_config:
+ raise ConfigError(f'Virtual IP address is required but not set in VRRP group "{group}"')
if 'authentication' in group_config:
if not {'password', 'type'} <= set(group_config['authentication']):
@@ -92,7 +92,7 @@ def verify(vrrp):
# XXX: filter on map object is destructive, so we force it to list.
# Additionally, filter objects always evaluate to True, empty or not,
# so we force them to lists as well.
- vaddrs = list(map(lambda i: ip_interface(i), group_config['virtual_address']))
+ vaddrs = list(map(lambda i: ip_interface(i), group_config['address']))
vaddrs4 = list(filter(lambda x: isinstance(x, IPv4Interface), vaddrs))
vaddrs6 = list(filter(lambda x: isinstance(x, IPv6Interface), vaddrs))