Just did an upgrade from 1.1.8 to 1.2.0-rc10 with BGP and redistribute static configured.
The network settings are nicely migrated from protocols bgp 65001 network to protools bgp 65001 address-family ipv4-unicast network.
The redistribute static is not migrated. Adding it again in the new location makes it work.
Description
Description
Details
Details
- Version
- 1.2.0-rc10
Related Objects
Related Objects
Event Timeline
Comment Actions
With the following patch the statements are migrated. Needs some work to also migrate the metric and route-map settings. Will try to do that later.
--- 2-to-3.orig 2018-12-17 22:28:02.630000000 +0000 +++ 2-to-3 2018-12-17 22:24:34.490000000 +0000 @@ -178,6 +178,17 @@ for peer_group in peer_groups: migrate_neighbor(config, peer_group_path, peer_group) + ## Migrate redistribute statements + redistribute_path = ['protocols', 'bgp', asn, 'redistribute'] + if config.exists(redistribute_path): + config.set(bgp_path + af_path + ['redistribute']) + + redistributes = config.list_nodes(redistribute_path) + for redistribute in redistributes: + config.set(bgp_path + af_path + ['redistribute', redistribute]) + + config.delete(redistribute_path) + try: with open(file_name, 'w') as f: f.write(config.to_string())
Comment Actions
Hey @Merijn, sorry for late reply and thanks for the patch! I've merged it in and it will be in the next nightly build.
Comment Actions
Oh, you forgot metric and route-map options. Extending your patch to support them wasn's hard though, most of the work was already done.