diff options
author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2023-07-11 12:48:37 +0000 |
---|---|---|
committer | Viacheslav Hletenko <v.gletenko@vyos.io> | 2023-07-11 12:55:17 +0000 |
commit | 60be130df1b5918c3bf1a460fdf65c5fa0e59253 (patch) | |
tree | 2fa138b18666172d0765e3d8a1882a98d7cc9238 /src/conf_mode | |
parent | 16f7d593e841b73b2fa4b8120f4bb8e66c4321b3 (diff) | |
download | vyos-1x-60be130df1b5918c3bf1a460fdf65c5fa0e59253.tar.gz vyos-1x-60be130df1b5918c3bf1a460fdf65c5fa0e59253.zip |
T5341: HA migrate virtual-server tag to node address
Migrate:
high-availability virtual-server 203.0.113.1
to: high-availability virtual-server <name> address 203.0.113.1
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-x | src/conf_mode/high-availability.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/conf_mode/high-availability.py b/src/conf_mode/high-availability.py index e18b426b1..2b1cdbd23 100755 --- a/src/conf_mode/high-availability.py +++ b/src/conf_mode/high-availability.py @@ -175,6 +175,11 @@ def verify(ha): # Virtual-server if 'virtual_server' in ha: for vs, vs_config in ha['virtual_server'].items(): + + if 'address' not in vs_config and 'fwmark' not in vs_config: + raise ConfigError('Either address or fwmark is required ' + f'but not set for virtual-server "{vs}"') + if 'port' not in vs_config and 'fwmark' not in vs_config: raise ConfigError(f'Port or fwmark is required but not set for virtual-server "{vs}"') if 'port' in vs_config and 'fwmark' in vs_config: |