summaryrefslogtreecommitdiff
path: root/src/migration-scripts
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-10-30 16:23:30 +0100
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2023-10-30 17:53:31 +0000
commit4fdecbf61b02c102f0070d9dd1f785643b056de2 (patch)
tree8e89c81ca1ee4662d9e1e72b04fe0199600c7221 /src/migration-scripts
parent2d60bc124447c5f978536b796bda4524b121a03c (diff)
downloadvyos-1x-4fdecbf61b02c102f0070d9dd1f785643b056de2.tar.gz
vyos-1x-4fdecbf61b02c102f0070d9dd1f785643b056de2.zip
vxlan: T5699: migrate "external" CLI know to "parameters external"
As we have a bunch of options under "paramteres" already and "external" is clearly one of them it should be migrated under that node as well. (cherry picked from commit cc7ba8824a5e9ec818f0bbe7fb85e1713a591527)
Diffstat (limited to 'src/migration-scripts')
-rwxr-xr-xsrc/migration-scripts/interfaces/31-to-329
1 files changed, 7 insertions, 2 deletions
diff --git a/src/migration-scripts/interfaces/31-to-32 b/src/migration-scripts/interfaces/31-to-32
index 35b397c39..ca3d19320 100755
--- a/src/migration-scripts/interfaces/31-to-32
+++ b/src/migration-scripts/interfaces/31-to-32
@@ -27,7 +27,8 @@ if len(argv) < 2:
file_name = argv[1]
with open(file_name, 'r') as f:
config_file = f.read()
- base = ['interfaces', 'vxlan']
+
+base = ['interfaces', 'vxlan']
config = ConfigTree(config_file)
if not config.exists(base):
@@ -35,7 +36,11 @@ if not config.exists(base):
exit(0)
for vxlan in config.list_nodes(base):
- if not config.exists(base + ['port']):
+ if config.exists(base + [vxlan, 'external']):
+ config.delete(base + [vxlan, 'external'])
+ config.set(base + [vxlan, 'parameters', 'external'])
+
+ if not config.exists(base + [vxlan, 'port']):
config.set(base + [vxlan, 'port'], value='8472')
try: