Skip to content

Commit

Permalink
fixing molecule
Browse files Browse the repository at this point in the history
  • Loading branch information
Vibhu-gslab committed May 6, 2024
1 parent 60fcbbc commit 3eaef91
Show file tree
Hide file tree
Showing 9 changed files with 68 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ ASN Notation: asplain
| --- | ------------------- | ------------ |
| VRF01 | - | - |
| VRF02 | - | - |
| VRF03 | - | - |
| VRF03 | - | dynamic |

#### Router BGP Device Configuration

Expand Down Expand Up @@ -104,6 +104,8 @@ router bgp 65001
neighbor 1.2.3.4 route-map FOO in
neighbor 1.2.3.4 route-map BAR out
network 2.3.4.0/24 route-map BARFOO
redistribute connected rcf VRF_AFIPV4_RCF_CONNECTED_1()
redistribute static route-map VRF_AFIPV4_RM_STATIC_1
!
address-family ipv4 multicast
bgp missing-policy direction in action permit
Expand Down Expand Up @@ -147,6 +149,7 @@ router bgp 65001
bgp additional-paths send limit 3
!
vrf VRF03
redistribute dynamic rcf VRF_RCF_DYNAMIC()
!
address-family ipv4
bgp additional-paths send ecmp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ router bgp 65001
neighbor 1.2.3.4 route-map FOO in
neighbor 1.2.3.4 route-map BAR out
network 2.3.4.0/24 route-map BARFOO
redistribute connected rcf VRF_AFIPV4_RCF_CONNECTED_1()
redistribute static route-map VRF_AFIPV4_RM_STATIC_1
!
address-family ipv4 multicast
bgp missing-policy direction in action permit
Expand Down Expand Up @@ -100,6 +102,7 @@ router bgp 65001
bgp additional-paths send limit 3
!
vrf VRF03
redistribute dynamic rcf VRF_RCF_DYNAMIC()
!
address-family ipv4
bgp additional-paths send ecmp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ router_bgp:
networks:
- prefix: 2.3.4.0/24
route_map: BARFOO
redistribute_routes:
- source_protocol: connected
rcf: VRF_AFIPV4_RCF_CONNECTED_1()
- source_protocol: static
route_map: VRF_AFIPV4_RM_STATIC_1
address_family_ipv6:
bgp:
missing_policy:
Expand Down Expand Up @@ -148,3 +153,6 @@ router_bgp:
additional_paths:
send:
ecmp: true
redistribute_routes:
- source_protocol: dynamic
rcf: VRF_RCF_DYNAMIC()
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;redistribute_routes</samp>](## "router_bgp.address_family_ipv4_multicast.redistribute_routes") | List, items: Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;source_protocol</samp>](## "router_bgp.address_family_ipv4_multicast.redistribute_routes.[].source_protocol") | String | Required, Unique | | Valid Values:<br>- <code>attached-host</code><br>- <code>connected</code><br>- <code>isis</code><br>- <code>ospf</code><br>- <code>ospfv3</code><br>- <code>static</code> | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;route_map</samp>](## "router_bgp.address_family_ipv4_multicast.redistribute_routes.[].route_map") | String | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;include_leaked</samp>](## "router_bgp.address_family_ipv4_multicast.redistribute_routes.[].include_leaked") | Boolean | | | | Only used if `source_protocol` is `isis`. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;include_leaked</samp>](## "router_bgp.address_family_ipv4_multicast.redistribute_routes.[].include_leaked") | Boolean | | | | Only applicable if `source_protocol` is `isis`. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rcf</samp>](## "router_bgp.address_family_ipv4_multicast.redistribute_routes.[].rcf") | String | | | | RCF function name with parenthesis.<br>Example: MyFunction(myarg).<br>`route_map` and `rcf` are mutually exclusive. `route_map` takes precedence.<br>Only applicable if `source_protocol` is `isis`. |
| [<samp>&nbsp;&nbsp;address_family_ipv4_sr_te</samp>](## "router_bgp.address_family_ipv4_sr_te") | Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;neighbors</samp>](## "router_bgp.address_family_ipv4_sr_te.neighbors") | List, items: Dictionary | | | | |
Expand Down Expand Up @@ -536,14 +536,14 @@
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;address_family</samp>](## "router_bgp.vrfs.[].route_targets.import.[].address_family") | String | Required, Unique | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;route_targets</samp>](## "router_bgp.vrfs.[].route_targets.import.[].route_targets") | List, items: String | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;&lt;str&gt;</samp>](## "router_bgp.vrfs.[].route_targets.import.[].route_targets.[]") | String | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;route_map</samp>](## "router_bgp.vrfs.[].route_targets.import.[].route_map") | String | | | | Only used if `address_family` is one of `evpn`, `vpn-ipv4` or `vpn-ipv6`. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;route_map</samp>](## "router_bgp.vrfs.[].route_targets.import.[].route_map") | String | | | | Only applicable if `address_family` is one of `evpn`, `vpn-ipv4` or `vpn-ipv6`. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rcf</samp>](## "router_bgp.vrfs.[].route_targets.import.[].rcf") | String | | | | RCF function name with parenthesis.<br>Example: MyFunction(myarg).<br>Only applicable if `address_family` is one of `evpn`, `vpn-ipv4` or `vpn-ipv6`. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vpn_route_filter_rcf</samp>](## "router_bgp.vrfs.[].route_targets.import.[].vpn_route_filter_rcf") | String | | | | RCF function name with parenthesis for filtering VPN routes. Also requires `rcf` to be set.<br>Example: MyFunction(myarg).<br>Only applicable if `address_family` is one of `vpn-ipv4` or `vpn-ipv6`. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;export</samp>](## "router_bgp.vrfs.[].route_targets.export") | List, items: Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;address_family</samp>](## "router_bgp.vrfs.[].route_targets.export.[].address_family") | String | Required, Unique | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;route_targets</samp>](## "router_bgp.vrfs.[].route_targets.export.[].route_targets") | List, items: String | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;&lt;str&gt;</samp>](## "router_bgp.vrfs.[].route_targets.export.[].route_targets.[]") | String | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;route_map</samp>](## "router_bgp.vrfs.[].route_targets.export.[].route_map") | String | | | | Only used if `address_family` is one of `evpn`, `vpn-ipv4` or `vpn-ipv6`. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;route_map</samp>](## "router_bgp.vrfs.[].route_targets.export.[].route_map") | String | | | | Only applicable if `address_family` is one of `evpn`, `vpn-ipv4` or `vpn-ipv6`. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rcf</samp>](## "router_bgp.vrfs.[].route_targets.export.[].rcf") | String | | | | RCF function name with parenthesis.<br>Example: MyFunction(myarg).<br>Only applicable if `address_family` is one of `evpn`, `vpn-ipv4` or `vpn-ipv6`. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vpn_route_filter_rcf</samp>](## "router_bgp.vrfs.[].route_targets.export.[].vpn_route_filter_rcf") | String | | | | RCF function name with parenthesis for filtering VPN routes. Also requires `rcf` to be set.<br>Example: MyFunction(myarg).<br>Only applicable if `address_family` is one of `vpn-ipv4` or `vpn-ipv6`. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;router_id</samp>](## "router_bgp.vrfs.[].router_id") | String | | | | in IP address format A.B.C.D. |
Expand Down Expand Up @@ -615,7 +615,7 @@
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;peer_filter</samp>](## "router_bgp.vrfs.[].neighbor_interfaces.[].peer_filter") | String | | | | Peer-filter name. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;description</samp>](## "router_bgp.vrfs.[].neighbor_interfaces.[].description") | String | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;redistribute_routes</samp>](## "router_bgp.vrfs.[].redistribute_routes") | List, items: Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;source_protocol</samp>](## "router_bgp.vrfs.[].redistribute_routes.[].source_protocol") | String | Required, Unique | | Valid Values:<br>- <code>attached-host</code><br>- <code>connected</code><br>- <code>isis</code><br>- <code>ospf</code><br>- <code>ospfv3</code><br>- <code>static</code> | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;source_protocol</samp>](## "router_bgp.vrfs.[].redistribute_routes.[].source_protocol") | String | Required, Unique | | Valid Values:<br>- <code>attached-host</code><br>- <code>bgp</code><br>- <code>connected</code><br>- <code>dynamic</code><br>- <code>isis</code><br>- <code>ospf</code><br>- <code>ospfv3</code><br>- <code>rip</code><br>- <code>static</code><br>- <code>user</code> | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;route_map</samp>](## "router_bgp.vrfs.[].redistribute_routes.[].route_map") | String | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;include_leaked</samp>](## "router_bgp.vrfs.[].redistribute_routes.[].include_leaked") | Boolean | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rcf</samp>](## "router_bgp.vrfs.[].redistribute_routes.[].rcf") | String | | | | RCF function name with parenthesis.<br>Example: MyFunction(myarg).<br>`route_map` and `rcf` are mutually exclusive. `route_map` takes precedence.<br>Only applicable if `source_protocol` is one of `connected`, `dynamic`, `isis`, `static` and `user`. |
Expand Down Expand Up @@ -1409,7 +1409,7 @@
- source_protocol: <str; "attached-host" | "connected" | "isis" | "ospf" | "ospfv3" | "static"; required; unique>
route_map: <str>

# Only used if `source_protocol` is `isis`.
# Only applicable if `source_protocol` is `isis`.
include_leaked: <bool>

# RCF function name with parenthesis.
Expand Down Expand Up @@ -1714,7 +1714,7 @@
route_targets:
- <str>

# Only used if `address_family` is one of `evpn`, `vpn-ipv4` or `vpn-ipv6`.
# Only applicable if `address_family` is one of `evpn`, `vpn-ipv4` or `vpn-ipv6`.
route_map: <str>

# RCF function name with parenthesis.
Expand All @@ -1731,7 +1731,7 @@
route_targets:
- <str>

# Only used if `address_family` is one of `evpn`, `vpn-ipv4` or `vpn-ipv6`.
# Only applicable if `address_family` is one of `evpn`, `vpn-ipv4` or `vpn-ipv6`.
route_map: <str>

# RCF function name with parenthesis.
Expand Down Expand Up @@ -1896,7 +1896,7 @@
peer_filter: <str>
description: <str>
redistribute_routes:
- source_protocol: <str; "attached-host" | "connected" | "isis" | "ospf" | "ospfv3" | "static"; required; unique>
- source_protocol: <str; "attached-host" | "bgp" | "connected" | "dynamic" | "isis" | "ospf" | "ospfv3" | "rip" | "static" | "user"; required; unique>
route_map: <str>
include_leaked: <bool>

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -2287,11 +2287,15 @@ keys:
type: str
valid_values:
- "attached-host"
- "bgp"
- "connected"
- "dynamic"
- "isis"
- "ospf"
- "ospfv3"
- "rip"
- "static"
- "user"
route_map:
type: str
include_leaked:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1641,24 +1641,24 @@ router bgp {{ router_bgp.as }}
{% endif %}
{{ network_cli }}
{% endfor %}
{% for redistribute_route in vrf.address_family_ipv4.redistribute_routes | arista.avd.natural_sort('source_protocol') %}
{% if redistribute_route.source_protocol is arista.avd.defined %}
{% set redistribute_route_cli = "redistribute " ~ redistribute_route.source_protocol %}
{% if redistribute_route.source_protocol == "bgp" %}
{% set redistribute_route_cli = redistribute_route_cli ~ " leaked" %}
{% elif redistribute_route.include_leaked is arista.avd.defined %}
{% set redistribute_route_cli = redistribute_route_cli ~ " include leaked" %}
{% endif %}
{% if redistribute_route.route_map is arista.avd.defined %}
{% set redistribute_route_cli = redistribute_route_cli ~ " route-map " ~ redistribute_route.route_map %}
{% elif redistribute_route.source_protocol in ["connected", "static", "isis", "user", "dynamic"] %}
{% if redistribute_route.rcf is arista.avd.defined %}
{% set redistribute_route_cli = redistribute_route_cli ~ " rcf " ~ redistribute_route.rcf %}
{% for redistribute_route in vrf.address_family_ipv4.redistribute_routes | arista.avd.natural_sort('source_protocol') %}
{% if redistribute_route.source_protocol is arista.avd.defined %}
{% set redistribute_route_cli = "redistribute " ~ redistribute_route.source_protocol %}
{% if redistribute_route.source_protocol == "bgp" %}
{% set redistribute_route_cli = redistribute_route_cli ~ " leaked" %}
{% elif redistribute_route.include_leaked is arista.avd.defined %}
{% set redistribute_route_cli = redistribute_route_cli ~ " include leaked" %}
{% endif %}
{% if redistribute_route.route_map is arista.avd.defined %}
{% set redistribute_route_cli = redistribute_route_cli ~ " route-map " ~ redistribute_route.route_map %}
{% elif redistribute_route.source_protocol in ["connected", "static", "isis", "user", "dynamic"] %}
{% if redistribute_route.rcf is arista.avd.defined %}
{% set redistribute_route_cli = redistribute_route_cli ~ " rcf " ~ redistribute_route.rcf %}
{% endif %}
{% endif %}
{% endif %}
{{ redistribute_route_cli }}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
{% endif %}
{% if vrf.address_family_ipv4_multicast is arista.avd.defined %}
!
Expand Down
Loading

0 comments on commit 3eaef91

Please sign in to comment.