diff options
author | Christian Breunig <christian@breunig.cc> | 2023-10-30 18:52:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-30 18:52:40 +0100 |
commit | 18a0accde0cb6887449be2ced3f092cce77b3d3e (patch) | |
tree | 1a80622308918ddeb0de93cb426f6e210df1b6b2 /src/migration-scripts | |
parent | d223ee5fc5c0f1a252659293a3d49056616f8eef (diff) | |
parent | cc7ba8824a5e9ec818f0bbe7fb85e1713a591527 (diff) | |
download | vyos-1x-18a0accde0cb6887449be2ced3f092cce77b3d3e.tar.gz vyos-1x-18a0accde0cb6887449be2ced3f092cce77b3d3e.zip |
Merge pull request #2417 from c-po/vxlan-t5699
vxlan: T5699: migrate "external" CLI know to "parameters external"
Diffstat (limited to 'src/migration-scripts')
-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: |