diff options
author | Christian Breunig <christian@breunig.cc> | 2023-10-31 06:56:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-31 06:56:18 +0100 |
commit | c937ef1b220b5d25834b3dd41ae9128b136d7b05 (patch) | |
tree | 8e89c81ca1ee4662d9e1e72b04fe0199600c7221 /src/migration-scripts/interfaces/31-to-32 | |
parent | 2d60bc124447c5f978536b796bda4524b121a03c (diff) | |
parent | 4fdecbf61b02c102f0070d9dd1f785643b056de2 (diff) | |
download | vyos-1x-c937ef1b220b5d25834b3dd41ae9128b136d7b05.tar.gz vyos-1x-c937ef1b220b5d25834b3dd41ae9128b136d7b05.zip |
Merge pull request #2418 from vyos/mergify/bp/sagitta/pr-2417
vxlan: T5699: migrate "external" CLI know to "parameters external" (backport #2417)
Diffstat (limited to 'src/migration-scripts/interfaces/31-to-32')
-rwxr-xr-x | src/migration-scripts/interfaces/31-to-32 | 9 |
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: |