Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor(eos_cli_config_gen): Improved redistribute data models under router_bgp #4550

Merged
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ router bgp 65101
aggregate-address 2.2.1.0/24
redistribute bgp leaked route-map RM-REDISTRIBUTE-BGP
redistribute connected rcf Router_BGP_Connected()
redistribute ospf include leaked
redistribute ospf match internal
redistribute ospf match external
redistribute ospf match nssa-external 1 include leaked route-map RM-REDISTRIBUTE-OSPF-NSSA-1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,12 @@ router bgp 65001
neighbor aa::2 rcf out VRF_AFIPV6_RCF_OUT()
network aa::/64
no bgp redistribute-internal
redistribute connected rcf VRF_AFIPV6_RCF_CONNECTED()
redistribute isis include leaked
redistribute ospfv3 match external
redistribute ospfv3 match internal include leaked
redistribute ospfv3 match nssa-external
redistribute static route-map VRF_AFIPV6_RM_STATIC
redistribute connected rcf VRF_AFIPV6_RCF_CONNECTED()
redistribute isis include leaked
redistribute ospfv3 match internal include leaked
redistribute ospfv3 match external
redistribute ospfv3 match nssa-external
redistribute static route-map VRF_AFIPV6_RM_STATIC
ClausHolbechArista marked this conversation as resolved.
Show resolved Hide resolved
!
address-family ipv6 multicast
bgp missing-policy direction in action deny
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ router bgp 65101
aggregate-address 2.2.1.0/24
redistribute bgp leaked route-map RM-REDISTRIBUTE-BGP
redistribute connected rcf Router_BGP_Connected()
redistribute ospf include leaked
redistribute ospf match internal
redistribute ospf match external
redistribute ospf match nssa-external 1 include leaked route-map RM-REDISTRIBUTE-OSPF-NSSA-1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,12 @@ router bgp 65001
neighbor aa::2 rcf out VRF_AFIPV6_RCF_OUT()
network aa::/64
no bgp redistribute-internal
redistribute connected rcf VRF_AFIPV6_RCF_CONNECTED()
redistribute isis include leaked
redistribute ospfv3 match external
redistribute ospfv3 match internal include leaked
redistribute ospfv3 match nssa-external
redistribute static route-map VRF_AFIPV6_RM_STATIC
redistribute connected rcf VRF_AFIPV6_RCF_CONNECTED()
redistribute isis include leaked
redistribute ospfv3 match internal include leaked
redistribute ospfv3 match external
redistribute ospfv3 match nssa-external
redistribute static route-map VRF_AFIPV6_RM_STATIC
!
address-family ipv6 multicast
bgp missing-policy direction in action deny
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,24 +80,25 @@ router_bgp:
attribute_map: RM-ATTRIBUTE
match_map: RM-MATCH
advertise_only: true
redistribute_routes:
- source_protocol: ospf
include_leaked: true
- source_protocol: ospf
ospf_route_type: internal
- source_protocol: ospf
ospf_route_type: external
- source_protocol: ospf
ospf_route_type: nssa-external 1
route_map: RM-REDISTRIBUTE-OSPF-NSSA-1
include_leaked: true
- source_protocol: bgp
redistribute:
ospf:
match_internal:
enabled: true
match_external:
enabled: true
match_nssa_external:
enabled: true
nssa_type: 1
route_map: RM-REDISTRIBUTE-OSPF-NSSA-1
include_leaked: true
bgp:
enabled: true
route_map: RM-REDISTRIBUTE-BGP
# this should not do anything as leaked is generated when source protocol is bgp
include_leaked: true
- source_protocol: connected
connected:
enabled: true
rcf: Router_BGP_Connected()
- source_protocol: static
static:
enabled: true
rcf: Router_BGP_Static()
address_family_ipv4:
networks:
Expand Down Expand Up @@ -137,23 +138,28 @@ router_bgp:
rcf_in: Address_Family_IPV4_In()
- ip_address: 10.2.3.9
rcf_out: Address_Family_IPV4_Out()
redistribute_routes:
- source_protocol: ospf
include_leaked: true
ospf_route_type: internal
- source_protocol: ospf
ospf_route_type: external
route_map: RM-REDISTRIBUTE-OSPF-EXTERNAL
include_leaked: true
- source_protocol: ospf
ospf_route_type: nssa-external
- source_protocol: connected
redistribute:
ospf:
match_internal:
enabled: true
include_leaked: true
match_external:
enabled: true
route_map: RM-REDISTRIBUTE-OSPF-EXTERNAL
include_leaked: true
match_nssa_external:
enabled: true
connected:
enabled: true
include_leaked: true
rcf: Address_Family_IPV4_Connected()
- source_protocol: bgp
- source_protocol: static
bgp:
enabled: true
static:
enabled: true
rcf: Address_Family_IPV4_Static()
- source_protocol: dynamic
dynamic:
enabled: true
route_map: Address_Family_IPV4_Dynamic_RM
address_family_ipv6:
networks:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@ router_bgp:
peer_group: EVPN-OVERLAY-PEERS
- ip_address: 10.255.251.1
peer_group: MLAG-IPv4-UNDERLAY-PEER
redistribute_routes:
- source_protocol: connected
redistribute:
connected:
enabled: true
route_map: RM-CONN-2-BGP
address_family_evpn:
bgp:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,12 @@ router_bgp:
remote_as: 1
shutdown: false
description: TEST
redistribute_routes:
- source_protocol: connected
redistribute:
connected:
enabled: true
route_map: RM-CONN-2-BGP
- source_protocol: static
static:
enabled: true
route_map: RM-STATIC-2-BGP
address_family_evpn:
peer_groups:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,18 @@ router_bgp:
activate: false
additional_paths:
receive: true
redistribute_routes:
- source_protocol: ospfv3
ospf_route_type: external
- source_protocol: ospf
ospf_route_type: internal
- source_protocol: ospfv3
ospf_route_type: nssa-external 2
- source_protocol: isis
redistribute:
ospfv3:
match_external:
enabled: true
match_nssa_external:
enabled: true
nssa_type: 2
ospf:
match_internal:
enabled: true
isis:
enabled: true
rcf: Router_BGP_Isis()
neighbors:
- ip_address: aa::1
Expand Down Expand Up @@ -120,16 +124,21 @@ router_bgp:
networks:
- prefix: 2.3.4.0/24
route_map: BARFOO
redistribute_routes:
- source_protocol: ospf
ospf_route_type: external
- source_protocol: ospfv3
ospf_route_type: internal
- source_protocol: ospf
ospf_route_type: nssa-external 1
- source_protocol: connected
redistribute:
ospf:
match_external:
enabled: true
match_nssa_external:
enabled: true
nssa_type: 1
ospfv3:
match_internal:
enabled: true
connected:
enabled: true
rcf: VRF_AFIPV4_RCF_CONNECTED_1()
- source_protocol: static
static:
enabled: true
route_map: VRF_AFIPV4_RM_STATIC_1
address_family_ipv6:
bgp:
Expand All @@ -155,19 +164,23 @@ router_bgp:
rcf_out: VRF_AFIPV6_RCF_OUT()
networks:
- prefix: aa::/64
redistribute_routes:
- source_protocol: ospfv3
ospf_route_type: external
- source_protocol: ospfv3
include_leaked: true
ospf_route_type: internal
- source_protocol: ospfv3
ospf_route_type: nssa-external
- source_protocol: connected
redistribute:
ospfv3:
match_external:
enabled: true
match_internal:
enabled: true
include_leaked: true
match_nssa_external:
enabled: true
connected:
enabled: true
rcf: VRF_AFIPV6_RCF_CONNECTED()
- source_protocol: static
static:
enabled: true
route_map: VRF_AFIPV6_RM_STATIC
- source_protocol: isis
isis:
enabled: true
include_leaked: true
address_family_ipv4_multicast:
bgp:
Expand All @@ -186,16 +199,20 @@ router_bgp:
networks:
- prefix: 239.0.0.0/24
route_map: BARFOO
redistribute_routes:
- source_protocol: ospfv3
ospf_route_type: external
- source_protocol: ospf
ospf_route_type: internal
- source_protocol: ospf
ospf_route_type: nssa-external 2
- source_protocol: connected
rcf: VRF_AFIPV4MULTI_RCF_CONNECTED()
- source_protocol: static
redistribute:
ospfv3:
match_external:
enabled: true
ospf:
match_internal:
enabled: true
match_nssa_external:
enabled: true
nssa_type: 2
connected:
enabled: true
static:
enabled: true
route_map: VRF_AFIPV4MULTI_RM_STATIC
address_family_ipv6_multicast:
bgp:
Expand All @@ -211,16 +228,19 @@ router_bgp:
receive: true
networks:
- prefix: ff08:1::/64
redistribute_routes:
- source_protocol: ospf
ospf_route_type: external
- source_protocol: ospfv3
ospf_route_type: internal
- source_protocol: ospf
ospf_route_type: nssa-external
- source_protocol: connected
rcf: VRF_AFIPV6MULTI_RCF_CONNECTED()
- source_protocol: static
redistribute:
ospf:
match_external:
enabled: true
match_nssa_external:
enabled: true
ospfv3:
match_internal:
enabled: true
connected:
enabled: true
static:
enabled: true
route_map: VRF_AFIPV6MULTI_RM_STATIC
address_family_flow_spec_ipv4:
bgp:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,11 @@ router_bgp:
description: 'BGP Connection in passive mode'
remote_as: 65003
passive: true
redistribute_routes:
- source_protocol: static
- source_protocol: ospf
redistribute:
static:
enabled: true
ospf:
enabled: true
include_leaked: true
route_map: RM-OSPF-TO-BGP
address_family_ipv4:
Expand Down
Loading
Loading