summaryrefslogtreecommitdiff
path: root/src/migration-scripts/vrf/0-to-1
diff options
context:
space:
mode:
Diffstat (limited to 'src/migration-scripts/vrf/0-to-1')
-rwxr-xr-xsrc/migration-scripts/vrf/0-to-110
1 files changed, 10 insertions, 0 deletions
diff --git a/src/migration-scripts/vrf/0-to-1 b/src/migration-scripts/vrf/0-to-1
index 29b2fab74..2b41ef3c7 100755
--- a/src/migration-scripts/vrf/0-to-1
+++ b/src/migration-scripts/vrf/0-to-1
@@ -91,6 +91,16 @@ for vrf in config.list_nodes(base):
if config.exists(vrf_path):
config.rename(vrf_path, 'vrf')
+ next_hop = route_path + [route, 'interface']
+ if config.exists(next_hop):
+ for interface in config.list_nodes(next_hop):
+ interface_path = next_hop + [interface, 'next-hop-interface']
+ if config.exists(interface_path):
+ config.rename(interface_path, 'interface')
+ vrf_path = next_hop + [interface, 'next-hop-vrf']
+ if config.exists(vrf_path):
+ config.rename(vrf_path, 'vrf')
+
#
# Cleanup nodes inside route6
#