summaryrefslogtreecommitdiff
path: root/src/migration-scripts/interfaces/31-to-32
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-10-30 16:23:30 +0100
committerChristian Breunig <christian@breunig.cc>2023-10-30 16:31:54 +0100
commitcc7ba8824a5e9ec818f0bbe7fb85e1713a591527 (patch)
tree5ee5ddff7aa9927ca3dbad00e4fa8236a626af35 /src/migration-scripts/interfaces/31-to-32
parent78e00bf4099bfac2164ef2075acce8169c40c9c3 (diff)
downloadvyos-1x-cc7ba8824a5e9ec818f0bbe7fb85e1713a591527.tar.gz
vyos-1x-cc7ba8824a5e9ec818f0bbe7fb85e1713a591527.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.
Diffstat (limited to 'src/migration-scripts/interfaces/31-to-32')
-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: