From c17f259d09abd2bf632d09400fe8deb4c2781d32 Mon Sep 17 00:00:00 2001 From: Mark Royds Date: Sun, 23 May 2021 11:20:56 +0100 Subject: router-advert: T3561: add support for specific routes Co-authored-by: Mark Royds --- src/migration-scripts/interfaces/5-to-6 | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/migration-scripts') 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): -- cgit v1.2.3