summaryrefslogtreecommitdiff
path: root/src/migration-scripts/interfaces
diff options
context:
space:
mode:
authorMark Royds <github@mnr.cc>2021-05-23 11:20:56 +0100
committerChristian Poessinger <christian@poessinger.com>2021-05-24 10:45:42 +0200
commit856800bf75d408700d704921ffd592f6c99f84be (patch)
treea3cc078d386fbe76f85d5ffc1157118fe8456284 /src/migration-scripts/interfaces
parent8ff36fa268f852acde5f2cb29bbeca31bf5212c4 (diff)
downloadvyos-1x-856800bf75d408700d704921ffd592f6c99f84be.tar.gz
vyos-1x-856800bf75d408700d704921ffd592f6c99f84be.zip
router-advert: T3561: add support for specific routes
Co-authored-by: Mark Royds <mark.royds@vitaminit.co.uk> (cherry picked from commit c17f259d09abd2bf632d09400fe8deb4c2781d32)
Diffstat (limited to 'src/migration-scripts/interfaces')
-rwxr-xr-xsrc/migration-scripts/interfaces/5-to-610
1 files changed, 10 insertions, 0 deletions
diff --git a/src/migration-scripts/interfaces/5-to-6 b/src/migration-scripts/interfaces/5-to-6
index 1291751d8..8ae34c208 100755
--- a/src/migration-scripts/interfaces/5-to-6
+++ b/src/migration-scripts/interfaces/5-to-6
@@ -55,6 +55,16 @@ def copy_rtradv(c, old_base, interface):
min_max = interval.split('-')[0]
c.set(new_base + ['interval', min_max], value=tmp)
+ # cleanup boolean nodes in individual route
+ route_base = new_base + ['route']
+ if c.exists(route_base):
+ for route in config.list_nodes(route_base):
+ if c.exists(route_base + [route, 'remove-route']):
+ tmp = c.return_value(route_base + [route, 'remove-route'])
+ c.delete(route_base + [route, 'remove-route'])
+ if tmp == 'false':
+ c.set(route_base + [route, 'no-remove-route'])
+
# cleanup boolean nodes in individual prefix
prefix_base = new_base + ['prefix']
if c.exists(prefix_base):