diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-09-21 22:07:33 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-09-21 22:11:49 +0200 |
commit | b9d4d8c67d6b41ebbf5b570c7c6b09e05520e737 (patch) | |
tree | 8ba912776fddc2ef299c1675822c909c1da86ef4 /src/migration-scripts | |
parent | 2a57f786931793d59cc5ec2c3a925807b6ee3938 (diff) | |
download | vyos-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/migration-scripts')
-rwxr-xr-x | src/migration-scripts/vrrp/2-to-3 | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/migration-scripts/vrrp/2-to-3 b/src/migration-scripts/vrrp/2-to-3 index b96ca139d..1151ae18c 100755 --- a/src/migration-scripts/vrrp/2-to-3 +++ b/src/migration-scripts/vrrp/2-to-3 @@ -44,6 +44,16 @@ if config.exists(base + ['group']): if config.exists(tmp): config.delete(tmp) + # Rename virtual-address -> address + tmp = group_base + ['virtual-address'] + if config.exists(tmp): + config.rename(tmp, 'address') + + # Rename virtual-address-excluded -> excluded-address + tmp = group_base + ['virtual-address-excluded'] + if config.exists(tmp): + config.rename(tmp, 'excluded-address') + try: with open(file_name, 'w') as f: f.write(config.to_string()) |