-
Notifications
You must be signed in to change notification settings - Fork 419
Description
Currently the show run bgp parser does not account for multiple different redistributions. You could have multiple instances of say ospf that you want to redistribute or a mixture of ospf, isis, eigrp, rip, static, am, direct, lisp along with different route maps.
Example:
router bgp 333
cluster-id 3
no graceful-restart
address-family ipv4 unicast
network 10.4.1.0/24 route-map LOCAL-RM
redistribute ospf 1 route-map ADD_RT_400_400
redistribute ospf 2 route-map ADD_RT_400_511
redistribute ospf 3 route-map ADD_RT_400_400
In this example you would only get 1 af_redist_ospf_route_policy, af_network_route_map and af_redist_ospf where it should be a list of values for each redistribute. One suggestion might be "redistribute" : [{"af_redist": 1, "af_network_route_map": "ADD_RT_400_400", "table": "ospf"},{"af_redist":2, "af_network_route_map": "ADD_RT_400_5111", "table": "ospf"}, {"af_redist":3, "af_network_route_map": "ADD_RT_400_400", "table": "ospf"}].
The network statements are also parsed in a way that the route map does not line up with them. the network is split into af_network_number, af_network_mask and the route map is in af_network_route_map. This becomes a problem if you have more than a single network statement. The network statements are split across two lists and a key:value.