raiseConfigError("VRRP group {0} mixes IPv4 and IPv6 virtual addresses, this is not allowed. Create separate groups for IPv4 and IPv6".format(group["name"]))
ifvaddrs4:
ifgroup["hello_source"]:
hsa=ip_address(group["hello_source"])
ifisinstance(hsa,IPv6Address):
raiseConfigError("VRRP group {0} uses IPv4 but its hello-source-address is IPv6".format(group["name"]))
ifgroup["peer_address"]:
pa=ip_address(group["peer_address"])
ifisinstance(pa,IPv6Address):
raiseConfigError("VRRP group {0} uses IPv4 but its peer-address is IPv6".format(group["name"]))
ifvaddrs6:
ifgroup["hello_source"]:
hsa=ip_address(group["hello_source"])
ifisinstance(hsa,IPv4Address):
raiseConfigError("VRRP group {0} uses IPv6 but its hello-source-address is IPv4".format(group["name"]))
ifgroup["peer_address"]:
pa=ip_address(group["peer_address"])
ifisinstance(pa,IPv4Address):
raiseConfigError("VRRP group {0} uses IPv6 but its peer-address is IPv4".format(group["name"]))
# Warn the user about the deprecated mode-force option
ifgroup['script_mode_force']:
print("""Warning: "transition-script mode-force" VRRP option is deprecated and will be removed in VyOS 1.4.""")
print("""It's no longer necessary, so you can safely remove it from your config now.""")