summaryrefslogtreecommitdiff
path: root/src/migration-scripts
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-02-27 21:37:15 +0100
committerChristian Poessinger <christian@poessinger.com>2021-02-28 00:54:37 +0100
commit582b718221c67ddb71e39fbad0a72241761304a9 (patch)
tree4bb7c0ea424ce74137e5ba966e05bbeef4e7cede /src/migration-scripts
parent8f100189086102458ff8e4f61f842cf44a6bf8aa (diff)
downloadvyos-1x-582b718221c67ddb71e39fbad0a72241761304a9.tar.gz
vyos-1x-582b718221c67ddb71e39fbad0a72241761304a9.zip
tunnel: T3366: rename local-ip to source-address
Streamline the CLI configuration where we try to use source-address when creating connections which are especially sourced from a discrete address.
Diffstat (limited to 'src/migration-scripts')
-rwxr-xr-xsrc/migration-scripts/interfaces/19-to-2013
1 files changed, 9 insertions, 4 deletions
diff --git a/src/migration-scripts/interfaces/19-to-20 b/src/migration-scripts/interfaces/19-to-20
index be42cdd61..1727ac4dc 100755
--- a/src/migration-scripts/interfaces/19-to-20
+++ b/src/migration-scripts/interfaces/19-to-20
@@ -36,12 +36,17 @@ if __name__ == '__main__':
#
# Migrate "interface tunnel <tunX> encapsulation gre-bridge" to gretap
+ # Migrate "interface tunnel <tunX> local-ip" to source-address
for interface in config.list_nodes(base):
- path = base + [interface, 'encapsulation']
- if config.exists(path):
- tmp = config.return_value(path)
+ encap_path = base + [interface, 'encapsulation']
+ if config.exists(encap_path):
+ tmp = config.return_value(encap_path)
if tmp == 'gre-bridge':
- config.set(path, value='gretap')
+ config.set(encap_path, value='gretap')
+
+ local_ip_path = base + [interface, 'local-ip']
+ if config.exists(local_ip_path):
+ config.rename(local_ip_path, 'source-address')
try:
with open(file_name, 'w') as f: