summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-02-22 09:52:37 +0100
committerChristian Poessinger <christian@poessinger.com>2020-02-23 14:36:56 +0100
commit4f8e30dec96c906ca32b1ab9b48ff70fc3564a61 (patch)
tree94a550e58cade98a173880c0b322640e57eb81d1
parent2608adc31dbc3ca93b852549233f8327f2f4c883 (diff)
downloadvyos-1x-4f8e30dec96c906ca32b1ab9b48ff70fc3564a61.tar.gz
vyos-1x-4f8e30dec96c906ca32b1ab9b48ff70fc3564a61.zip
pppoe: T1318: proper delete old interfaces in migrator
-rwxr-xr-xsrc/migration-scripts/interfaces/4-to-512
1 files changed, 9 insertions, 3 deletions
diff --git a/src/migration-scripts/interfaces/4-to-5 b/src/migration-scripts/interfaces/4-to-5
index 15d841e89..2db9958d3 100755
--- a/src/migration-scripts/interfaces/4-to-5
+++ b/src/migration-scripts/interfaces/4-to-5
@@ -55,9 +55,9 @@ def migrate_dialer(config, tree, intf):
if config.exists(ipv6_slaac):
config.set(new_base + ['ipv6', 'address', 'autoconf'])
- # Delete old PPPoE interface
- config.delete(tree + [pppoe])
-
+ # Firewall migrieren
+ # QoS migrieren
+ # Quagga migrieren
if __name__ == '__main__':
@@ -84,6 +84,9 @@ if __name__ == '__main__':
for dialer in config.list_nodes(pppoe_if):
migrate_dialer(config, pppoe_if, interface)
+ # Delete old PPPoE interface
+ config.delete(pppoe_if)
+
# also migrate VLANs
if not config.exists(['interfaces', link_type, interface, 'vif']):
continue
@@ -95,6 +98,9 @@ if __name__ == '__main__':
intf = "{}.{}".format(interface, vlan)
migrate_dialer(config, pppoe_if, intf)
+ # Delete old PPPoE interface
+ config.delete(pppoe_if)
+
try:
with open(file_name, 'w') as f:
f.write(config.to_string())