From cfb44a2d2cba280f859279f738b911502930797c Mon Sep 17 00:00:00 2001 From: laxmikantchintakindi <159624484+laxmikantchintakindi@users.noreply.github.com> Date: Mon, 26 Feb 2024 19:36:14 +0530 Subject: [PATCH] Feat(eos_cli_config_gen): Support for EVPN Multihoming IP Mass-withdrawal (#3656) Co-authored-by: Claus Holbech --- .../documentation/devices/router-bgp-evpn.md | 2 ++ .../intended/configs/router-bgp-evpn.cfg | 2 ++ .../inventory/host_vars/router-bgp-evpn.yml | 3 +++ .../roles/eos_cli_config_gen/docs/tables/router-bgp.md | 4 ++++ .../schemas/eos_cli_config_gen.jsonschema.json | 8 ++++++++ .../schemas/eos_cli_config_gen.schema.yml | 4 ++++ .../schemas/schema_fragments/router_bgp.schema.yml | 4 ++++ .../roles/eos_cli_config_gen/templates/eos/router-bgp.j2 | 6 ++++++ 8 files changed, 33 insertions(+) diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/router-bgp-evpn.md b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/router-bgp-evpn.md index 1cc4008d312..b22dfbc0441 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/router-bgp-evpn.md +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/router-bgp-evpn.md @@ -265,6 +265,8 @@ router bgp 65101 no neighbor MLAG-IPv4-UNDERLAY-PEER activate next-hop resolution disabled neighbor default next-hop-self received-evpn-routes route-type ip-prefix inter-domain + route import ethernet-segment ip mass-withdraw + route export ethernet-segment ip mass-withdraw ! address-family ipv4 no neighbor EVPN-OVERLAY-PEERS activate diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/router-bgp-evpn.cfg b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/router-bgp-evpn.cfg index 27ea71c6fca..f9d0ca83bf6 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/router-bgp-evpn.cfg +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/router-bgp-evpn.cfg @@ -117,6 +117,8 @@ router bgp 65101 no neighbor MLAG-IPv4-UNDERLAY-PEER activate next-hop resolution disabled neighbor default next-hop-self received-evpn-routes route-type ip-prefix inter-domain + route import ethernet-segment ip mass-withdraw + route export ethernet-segment ip mass-withdraw ! address-family ipv4 no neighbor EVPN-OVERLAY-PEERS activate diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/router-bgp-evpn.yml b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/router-bgp-evpn.yml index 34030c02dae..41635d6389a 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/router-bgp-evpn.yml +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/router-bgp-evpn.yml @@ -106,6 +106,9 @@ router_bgp: next_hop: resolution_disabled: true next_hop_unchanged: true + route: + import_ethernet_segment_ip_mass_withdraw: true + export_ethernet_segment_ip_mass_withdraw: true address_family_ipv4: peer_groups: - name: EVPN-OVERLAY-PEERS diff --git a/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/router-bgp.md b/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/router-bgp.md index 290a12841ad..eda61ff0e5f 100644 --- a/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/router-bgp.md +++ b/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/router-bgp.md @@ -280,6 +280,8 @@ | [      resolution_disabled](## "router_bgp.address_family_evpn.next_hop.resolution_disabled") | Boolean | | | | | | [    route](## "router_bgp.address_family_evpn.route") | Dictionary | | | | | | [      import_match_failure_action](## "router_bgp.address_family_evpn.route.import_match_failure_action") | String | | | Valid Values:
- discard | | + | [      import_ethernet_segment_ip_mass_withdraw](## "router_bgp.address_family_evpn.route.import_ethernet_segment_ip_mass_withdraw") | Boolean | | | | | + | [      export_ethernet_segment_ip_mass_withdraw](## "router_bgp.address_family_evpn.route.export_ethernet_segment_ip_mass_withdraw") | Boolean | | | | | | [    next_hop_unchanged](## "router_bgp.address_family_evpn.next_hop_unchanged") | Boolean | | | | | | [  address_family_rtc](## "router_bgp.address_family_rtc") | Dictionary | | | | | | [    peer_groups](## "router_bgp.address_family_rtc.peer_groups") | List, items: Dictionary | | | | | @@ -1239,6 +1241,8 @@ resolution_disabled: route: import_match_failure_action: + import_ethernet_segment_ip_mass_withdraw: + export_ethernet_segment_ip_mass_withdraw: next_hop_unchanged: address_family_rtc: peer_groups: diff --git a/ansible_collections/arista/avd/roles/eos_cli_config_gen/schemas/eos_cli_config_gen.jsonschema.json b/ansible_collections/arista/avd/roles/eos_cli_config_gen/schemas/eos_cli_config_gen.jsonschema.json index 3f9ef7feff5..2660b409cbf 100644 --- a/ansible_collections/arista/avd/roles/eos_cli_config_gen/schemas/eos_cli_config_gen.jsonschema.json +++ b/ansible_collections/arista/avd/roles/eos_cli_config_gen/schemas/eos_cli_config_gen.jsonschema.json @@ -17111,6 +17111,14 @@ "discard" ], "title": "Import Match Failure Action" + }, + "import_ethernet_segment_ip_mass_withdraw": { + "type": "boolean", + "title": "Import Ethernet Segment IP Mass Withdraw" + }, + "export_ethernet_segment_ip_mass_withdraw": { + "type": "boolean", + "title": "Export Ethernet Segment IP Mass Withdraw" } }, "additionalProperties": false, diff --git a/ansible_collections/arista/avd/roles/eos_cli_config_gen/schemas/eos_cli_config_gen.schema.yml b/ansible_collections/arista/avd/roles/eos_cli_config_gen/schemas/eos_cli_config_gen.schema.yml index bb3bcd98481..afbf88f5f49 100644 --- a/ansible_collections/arista/avd/roles/eos_cli_config_gen/schemas/eos_cli_config_gen.schema.yml +++ b/ansible_collections/arista/avd/roles/eos_cli_config_gen/schemas/eos_cli_config_gen.schema.yml @@ -10230,6 +10230,10 @@ keys: type: str valid_values: - discard + import_ethernet_segment_ip_mass_withdraw: + type: bool + export_ethernet_segment_ip_mass_withdraw: + type: bool next_hop_unchanged: type: bool address_family_rtc: diff --git a/ansible_collections/arista/avd/roles/eos_cli_config_gen/schemas/schema_fragments/router_bgp.schema.yml b/ansible_collections/arista/avd/roles/eos_cli_config_gen/schemas/schema_fragments/router_bgp.schema.yml index 7c0db77e71b..824133ecfa5 100644 --- a/ansible_collections/arista/avd/roles/eos_cli_config_gen/schemas/schema_fragments/router_bgp.schema.yml +++ b/ansible_collections/arista/avd/roles/eos_cli_config_gen/schemas/schema_fragments/router_bgp.schema.yml @@ -1024,6 +1024,10 @@ keys: type: str valid_values: - "discard" + import_ethernet_segment_ip_mass_withdraw: + type: bool + export_ethernet_segment_ip_mass_withdraw: + type: bool next_hop_unchanged: type: bool address_family_rtc: diff --git a/ansible_collections/arista/avd/roles/eos_cli_config_gen/templates/eos/router-bgp.j2 b/ansible_collections/arista/avd/roles/eos_cli_config_gen/templates/eos/router-bgp.j2 index 447ed2b2b75..37ab0491b70 100644 --- a/ansible_collections/arista/avd/roles/eos_cli_config_gen/templates/eos/router-bgp.j2 +++ b/ansible_collections/arista/avd/roles/eos_cli_config_gen/templates/eos/router-bgp.j2 @@ -642,6 +642,12 @@ router bgp {{ router_bgp.as }} {% if router_bgp.address_family_evpn.route.import_match_failure_action is arista.avd.defined('discard') %} route import match-failure action discard {% endif %} +{% if router_bgp.address_family_evpn.route.import_ethernet_segment_ip_mass_withdraw is arista.avd.defined(true) %} + route import ethernet-segment ip mass-withdraw +{% endif %} +{% if router_bgp.address_family_evpn.route.export_ethernet_segment_ip_mass_withdraw is arista.avd.defined(true) %} + route export ethernet-segment ip mass-withdraw +{% endif %} {% endif %} {# address family flow-spec ipv4 activation #} {% if router_bgp.address_family_flow_spec_ipv4 is arista.avd.defined %}