Skip to content

Commit

Permalink
Feat(eos_cli_config_gen): Add additional-path for evpn address-family…
Browse files Browse the repository at this point in the history
… peer-groups (#3278)
  • Loading branch information
gmuloc authored Oct 20, 2023
1 parent 1724d79 commit e38c287
Show file tree
Hide file tree
Showing 8 changed files with 202 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ interface Management1

| Peer Group | Activate | Encapsulation |
| ---------- | -------- | ------------- |
| ADDITIONAL-PATH-PG-1 | True | default |
| ADDITIONAL-PATH-PG-2 | True | default |
| ADDITIONAL-PATH-PG-3 | True | default |
| ADDITIONAL-PATH-PG-4 | True | default |
| ADDITIONAL-PATH-PG-5 | True | default |
| ADDITIONAL-PATH-PG-6 | True | default |
| EVPN-OVERLAY-PEERS | True | vxlan |
| MLAG-IPv4-UNDERLAY-PEER | False | default |

Expand Down Expand Up @@ -238,6 +244,19 @@ router bgp 65101
bgp next-hop-unchanged
host-flap detection window 10 threshold 1 expiry timeout 3 seconds
domain identifier 65101:0
neighbor ADDITIONAL-PATH-PG-1 activate
neighbor ADDITIONAL-PATH-PG-1 additional-paths receive
neighbor ADDITIONAL-PATH-PG-1 additional-paths send any
neighbor ADDITIONAL-PATH-PG-2 activate
neighbor ADDITIONAL-PATH-PG-2 additional-paths send backup
neighbor ADDITIONAL-PATH-PG-3 activate
neighbor ADDITIONAL-PATH-PG-3 additional-paths send ecmp
neighbor ADDITIONAL-PATH-PG-4 activate
neighbor ADDITIONAL-PATH-PG-4 additional-paths send ecmp limit 42
neighbor ADDITIONAL-PATH-PG-5 activate
neighbor ADDITIONAL-PATH-PG-5 additional-paths send limit 42
neighbor ADDITIONAL-PATH-PG-6 activate
no neighbor ADDITIONAL-PATH-PG-6 additional-paths send any
neighbor EVPN-OVERLAY-PEERS activate
neighbor EVPN-OVERLAY-PEERS domain remote
neighbor EVPN-OVERLAY-PEERS encapsulation vxlan
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,19 @@ router bgp 65101
bgp next-hop-unchanged
host-flap detection window 10 threshold 1 expiry timeout 3 seconds
domain identifier 65101:0
neighbor ADDITIONAL-PATH-PG-1 activate
neighbor ADDITIONAL-PATH-PG-1 additional-paths receive
neighbor ADDITIONAL-PATH-PG-1 additional-paths send any
neighbor ADDITIONAL-PATH-PG-2 activate
neighbor ADDITIONAL-PATH-PG-2 additional-paths send backup
neighbor ADDITIONAL-PATH-PG-3 activate
neighbor ADDITIONAL-PATH-PG-3 additional-paths send ecmp
neighbor ADDITIONAL-PATH-PG-4 activate
neighbor ADDITIONAL-PATH-PG-4 additional-paths send ecmp limit 42
neighbor ADDITIONAL-PATH-PG-5 activate
neighbor ADDITIONAL-PATH-PG-5 additional-paths send limit 42
neighbor ADDITIONAL-PATH-PG-6 activate
no neighbor ADDITIONAL-PATH-PG-6 additional-paths send any
neighbor EVPN-OVERLAY-PEERS activate
neighbor EVPN-OVERLAY-PEERS domain remote
neighbor EVPN-OVERLAY-PEERS encapsulation vxlan
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,38 @@ router_bgp:
encapsulation: vxlan
- name: MLAG-IPv4-UNDERLAY-PEER
activate: false
- name: ADDITIONAL-PATH-PG-1
activate: true
additional_paths:
receive: true
send:
any: true
- name: ADDITIONAL-PATH-PG-2
activate: true
additional_paths:
send:
backup: true
- name: ADDITIONAL-PATH-PG-3
activate: true
additional_paths:
send:
ecmp: true
- name: ADDITIONAL-PATH-PG-4
activate: true
additional_paths:
send:
ecmp_limit: 42
- name: ADDITIONAL-PATH-PG-5
activate: true
additional_paths:
send:
limit: 42
# Checking the `no neighbor <PG> additional-paths send any is rendered
- name: ADDITIONAL-PATH-PG-6
activate: true
additional_paths:
send:
any: false
evpn_hostflap_detection:
enabled: true
window: 10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,14 @@
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;route_map_out</samp>](## "router_bgp.address_family_evpn.peer_groups.[].route_map_out") | String | | | | Outbound route-map name |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;domain_remote</samp>](## "router_bgp.address_family_evpn.peer_groups.[].domain_remote") | Boolean | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;encapsulation</samp>](## "router_bgp.address_family_evpn.peer_groups.[].encapsulation") | String | | | Valid Values:<br>- vxlan<br>- mpls | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;additional_paths</samp>](## "router_bgp.address_family_evpn.peer_groups.[].additional_paths") | Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;receive</samp>](## "router_bgp.address_family_evpn.peer_groups.[].additional_paths.receive") | Boolean | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;send</samp>](## "router_bgp.address_family_evpn.peer_groups.[].additional_paths.send") | Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;any</samp>](## "router_bgp.address_family_evpn.peer_groups.[].additional_paths.send.any") | Boolean | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;backup</samp>](## "router_bgp.address_family_evpn.peer_groups.[].additional_paths.send.backup") | Boolean | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ecmp</samp>](## "router_bgp.address_family_evpn.peer_groups.[].additional_paths.send.ecmp") | Boolean | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ecmp_limit</samp>](## "router_bgp.address_family_evpn.peer_groups.[].additional_paths.send.ecmp_limit") | Integer | | | Min: 2<br>Max: 64 | Amount of ECMP paths to send |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;limit</samp>](## "router_bgp.address_family_evpn.peer_groups.[].additional_paths.send.limit") | Integer | | | Min: 2<br>Max: 64 | Amount of paths to send |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;evpn_hostflap_detection</samp>](## "router_bgp.address_family_evpn.evpn_hostflap_detection") | Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enabled</samp>](## "router_bgp.address_family_evpn.evpn_hostflap_detection.enabled") | Boolean | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;window</samp>](## "router_bgp.address_family_evpn.evpn_hostflap_detection.window") | Integer | | | Min: 0<br>Max: 4294967295 | Time (in seconds) to detect a MAC duplication issue |
Expand Down Expand Up @@ -929,6 +937,14 @@
route_map_out: <str>
domain_remote: <bool>
encapsulation: <str>
additional_paths:
receive: <bool>
send:
any: <bool>
backup: <bool>
ecmp: <bool>
ecmp_limit: <int>
limit: <int>
evpn_hostflap_detection:
enabled: <bool>
window: <int>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14561,6 +14561,56 @@
"mpls"
],
"title": "Encapsulation"
},
"additional_paths": {
"type": "object",
"properties": {
"receive": {
"type": "boolean",
"title": "Receive"
},
"send": {
"type": "object",
"properties": {
"any": {
"type": "boolean",
"title": "Any"
},
"backup": {
"type": "boolean",
"title": "Backup"
},
"ecmp": {
"type": "boolean",
"title": "ECMP"
},
"ecmp_limit": {
"type": "integer",
"description": "Amount of ECMP paths to send",
"minimum": 2,
"maximum": 64,
"title": "ECMP Limit"
},
"limit": {
"type": "integer",
"description": "Amount of paths to send",
"minimum": 2,
"maximum": 64,
"title": "Limit"
}
},
"additionalProperties": false,
"patternProperties": {
"^_.+$": {}
},
"title": "Send"
}
},
"additionalProperties": false,
"patternProperties": {
"^_.+$": {}
},
"title": "Additional Paths"
}
},
"additionalProperties": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8701,6 +8701,34 @@ keys:
valid_values:
- vxlan
- mpls
additional_paths:
type: dict
keys:
receive:
type: bool
send:
type: dict
keys:
any:
type: bool
backup:
type: bool
ecmp:
type: bool
ecmp_limit:
type: int
description: Amount of ECMP paths to send
convert_types:
- str
min: 2
max: 64
limit:
type: int
description: Amount of paths to send
convert_types:
- str
min: 2
max: 64
evpn_hostflap_detection:
type: dict
keys:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -828,6 +828,34 @@ keys:
valid_values:
- "vxlan"
- "mpls"
additional_paths:
type: dict
keys:
receive:
type: bool
send:
type: dict
keys:
any:
type: bool
backup:
type: bool
ecmp:
type: bool
ecmp_limit:
type: int
description: Amount of ECMP paths to send
convert_types:
- str
min: 2
max: 64
limit:
type: int
description: Amount of paths to send
convert_types:
- str
min: 2
max: 64
evpn_hostflap_detection:
type: dict
keys:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,22 @@ router bgp {{ router_bgp.as }}
{% elif peer_group.activate is arista.avd.defined(false) %}
no neighbor {{ peer_group.name }} activate
{% endif %}
{% if peer_group.additional_paths.receive is arista.avd.defined(true) %}
neighbor {{ peer_group.name }} additional-paths receive
{% endif %}
{% if peer_group.additional_paths.send.any is arista.avd.defined(true) %}
neighbor {{ peer_group.name }} additional-paths send any
{% elif peer_group.additional_paths.send.any is arista.avd.defined(false) %}
no neighbor {{ peer_group.name }} additional-paths send any
{% elif peer_group.additional_paths.send.backup is arista.avd.defined(true) %}
neighbor {{ peer_group.name }} additional-paths send backup
{% elif peer_group.additional_paths.send.ecmp is arista.avd.defined(true) %}
neighbor {{ peer_group.name }} additional-paths send ecmp
{% elif peer_group.additional_paths.send.ecmp_limit is arista.avd.defined %}
neighbor {{ peer_group.name }} additional-paths send ecmp limit {{ peer_group.additional_paths.send.ecmp_limit }}
{% elif peer_group.additional_paths.send.limit is arista.avd.defined %}
neighbor {{ peer_group.name }} additional-paths send limit {{ peer_group.additional_paths.send.limit }}
{% endif %}
{% if peer_group.domain_remote is arista.avd.defined(true) %}
neighbor {{ peer_group.name }} domain remote
{% endif %}
Expand Down

0 comments on commit e38c287

Please sign in to comment.