From e597591cbf7b9fe315ab356cb4d4a934acae8870 Mon Sep 17 00:00:00 2001 From: emilarista Date: Thu, 4 May 2023 14:56:40 +0200 Subject: [PATCH 1/9] add new data model to schemas --- .../docs/data_model/Routing.md | 112 +++++ .../eos_cli_config_gen.jsonschema.json | 408 ++++++++++++++++++ .../schemas/eos_cli_config_gen.schema.yml | 205 +++++++++ .../schema_fragments/router_bgp.schema.yml | 205 +++++++++ 4 files changed, 930 insertions(+) diff --git a/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/data_model/Routing.md b/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/data_model/Routing.md index 8bafb414c36..1513853957f 100644 --- a/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/data_model/Routing.md +++ b/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/data_model/Routing.md @@ -590,6 +590,62 @@ MAC address (hh:hh:hh:hh:hh:hh) | [          summary_only](## "router_bgp.vrfs.[].aggregate_addresses.[].summary_only") | Boolean | | | | | | [          attribute_map](## "router_bgp.vrfs.[].aggregate_addresses.[].attribute_map") | String | | | | | | [          match_map](## "router_bgp.vrfs.[].aggregate_addresses.[].match_map") | String | | | | | + | [      address_family_ipv4](## "router_bgp.vrfs.[].address_family_ipv4") | Dictionary | | | | | + | [        bgp](## "router_bgp.vrfs.[].address_family_ipv4.bgp") | Dictionary | | | | | + | [          missing_policy](## "router_bgp.vrfs.[].address_family_ipv4.bgp.missing_policy") | Dictionary | | | | | + | [            direction_in_action](## "router_bgp.vrfs.[].address_family_ipv4.bgp.missing_policy.direction_in_action") | String | | | Valid Values:
- deny
- deny-in-out
- permit | | + | [            direction_out_action](## "router_bgp.vrfs.[].address_family_ipv4.bgp.missing_policy.direction_out_action") | String | | | Valid Values:
- deny
- deny-in-out
- permit | | + | [          additional_paths](## "router_bgp.vrfs.[].address_family_ipv4.bgp.additional_paths") | Dictionary | | | | | + | [            install](## "router_bgp.vrfs.[].address_family_ipv4.bgp.additional_paths.install") | Boolean | | | | | + | [            install_ecmp_primary](## "router_bgp.vrfs.[].address_family_ipv4.bgp.additional_paths.install_ecmp_primary") | Boolean | | | | | + | [            receive](## "router_bgp.vrfs.[].address_family_ipv4.bgp.additional_paths.receive") | Boolean | | | | | + | [            send](## "router_bgp.vrfs.[].address_family_ipv4.bgp.additional_paths.send") | Dictionary | | | | | + | [              any](## "router_bgp.vrfs.[].address_family_ipv4.bgp.additional_paths.send.any") | Boolean | | | | | + | [              backup](## "router_bgp.vrfs.[].address_family_ipv4.bgp.additional_paths.send.backup") | Boolean | | | | | + | [              ecmp](## "router_bgp.vrfs.[].address_family_ipv4.bgp.additional_paths.send.ecmp") | Boolean | | | | | + | [              ecmp_limit](## "router_bgp.vrfs.[].address_family_ipv4.bgp.additional_paths.send.ecmp_limit") | Integer | | | Min: 2
Max: 64 | Amount of ECMP paths to send | + | [              limit](## "router_bgp.vrfs.[].address_family_ipv4.bgp.additional_paths.send.limit") | Integer | | | Min: 2
Max: 64 | Amount of paths to send | + | [        neighbors](## "router_bgp.vrfs.[].address_family_ipv4.neighbors") | List, items: Dictionary | | | | | + | [          - ip_address](## "router_bgp.vrfs.[].address_family_ipv4.neighbors.[].ip_address") | String | Required, Unique | | | | + | [            activate](## "router_bgp.vrfs.[].address_family_ipv4.neighbors.[].activate") | Boolean | | | | | + | [            route_map_in](## "router_bgp.vrfs.[].address_family_ipv4.neighbors.[].route_map_in") | String | | | | Inbound route-map name | + | [            route_map_out](## "router_bgp.vrfs.[].address_family_ipv4.neighbors.[].route_map_out") | String | | | | Outbound route-map name | + | [        peer_groups](## "router_bgp.vrfs.[].address_family_ipv4.peer_groups") | List, items: Dictionary | | | | | + | [          - name](## "router_bgp.vrfs.[].address_family_ipv4.peer_groups.[].name") | String | Required, Unique | | | Peer-group name | + | [            activate](## "router_bgp.vrfs.[].address_family_ipv4.peer_groups.[].activate") | Boolean | | | | | + | [            next_hop](## "router_bgp.vrfs.[].address_family_ipv4.peer_groups.[].next_hop") | Dictionary | | | | | + | [              address_family_ipv6](## "router_bgp.vrfs.[].address_family_ipv4.peer_groups.[].next_hop.address_family_ipv6") | Dictionary | | | | | + | [                enabled](## "router_bgp.vrfs.[].address_family_ipv4.peer_groups.[].next_hop.address_family_ipv6.enabled") | Boolean | Required, Unique | | | | + | [                originate](## "router_bgp.vrfs.[].address_family_ipv4.peer_groups.[].next_hop.address_family_ipv6.originate") | Boolean | | | | | + | [        networks](## "router_bgp.vrfs.[].address_family_ipv4.networks") | List, items: Dictionary | | | | | + | [          - prefix](## "router_bgp.vrfs.[].address_family_ipv4.networks.[].prefix") | String | Required, Unique | | | IPv4 prefix "A.B.C.D/E" | + | [            route_map](## "router_bgp.vrfs.[].address_family_ipv4.networks.[].route_map") | String | | | | | + | [      address_family_ipv6](## "router_bgp.vrfs.[].address_family_ipv6") | Dictionary | | | | | + | [        bgp](## "router_bgp.vrfs.[].address_family_ipv6.bgp") | Dictionary | | | | | + | [          missing_policy](## "router_bgp.vrfs.[].address_family_ipv6.bgp.missing_policy") | Dictionary | | | | | + | [            direction_in_action](## "router_bgp.vrfs.[].address_family_ipv6.bgp.missing_policy.direction_in_action") | String | | | Valid Values:
- deny
- deny-in-out
- permit | | + | [            direction_out_action](## "router_bgp.vrfs.[].address_family_ipv6.bgp.missing_policy.direction_out_action") | String | | | Valid Values:
- deny
- deny-in-out
- permit | | + | [          additional_paths](## "router_bgp.vrfs.[].address_family_ipv6.bgp.additional_paths") | Dictionary | | | | | + | [            install](## "router_bgp.vrfs.[].address_family_ipv6.bgp.additional_paths.install") | Boolean | | | | | + | [            install_ecmp_primary](## "router_bgp.vrfs.[].address_family_ipv6.bgp.additional_paths.install_ecmp_primary") | Boolean | | | | | + | [            receive](## "router_bgp.vrfs.[].address_family_ipv6.bgp.additional_paths.receive") | Boolean | | | | | + | [            send](## "router_bgp.vrfs.[].address_family_ipv6.bgp.additional_paths.send") | Dictionary | | | | | + | [              any](## "router_bgp.vrfs.[].address_family_ipv6.bgp.additional_paths.send.any") | Boolean | | | | | + | [              backup](## "router_bgp.vrfs.[].address_family_ipv6.bgp.additional_paths.send.backup") | Boolean | | | | | + | [              ecmp](## "router_bgp.vrfs.[].address_family_ipv6.bgp.additional_paths.send.ecmp") | Boolean | | | | | + | [              ecmp_limit](## "router_bgp.vrfs.[].address_family_ipv6.bgp.additional_paths.send.ecmp_limit") | Integer | | | Min: 2
Max: 64 | Amount of ECMP paths to send | + | [              limit](## "router_bgp.vrfs.[].address_family_ipv6.bgp.additional_paths.send.limit") | Integer | | | Min: 2
Max: 64 | Amount of paths to send | + | [        neighbors](## "router_bgp.vrfs.[].address_family_ipv6.neighbors") | List, items: Dictionary | | | | | + | [          - ip_address](## "router_bgp.vrfs.[].address_family_ipv6.neighbors.[].ip_address") | String | Required, Unique | | | | + | [            activate](## "router_bgp.vrfs.[].address_family_ipv6.neighbors.[].activate") | Boolean | | | | | + | [            route_map_in](## "router_bgp.vrfs.[].address_family_ipv6.neighbors.[].route_map_in") | String | | | | Inbound route-map name | + | [            route_map_out](## "router_bgp.vrfs.[].address_family_ipv6.neighbors.[].route_map_out") | String | | | | Outbound route-map name | + | [        peer_groups](## "router_bgp.vrfs.[].address_family_ipv6.peer_groups") | List, items: Dictionary | | | | | + | [          - name](## "router_bgp.vrfs.[].address_family_ipv6.peer_groups.[].name") | String | Required, Unique | | | Peer-group name | + | [            activate](## "router_bgp.vrfs.[].address_family_ipv6.peer_groups.[].activate") | Boolean | | | | | + | [        networks](## "router_bgp.vrfs.[].address_family_ipv6.networks") | List, items: Dictionary | | | | | + | [          - prefix](## "router_bgp.vrfs.[].address_family_ipv6.networks.[].prefix") | String | Required, Unique | | | IPv6 prefix "A:B:C:D:E:F:G:H/I" | + | [            route_map](## "router_bgp.vrfs.[].address_family_ipv6.networks.[].route_map") | String | | | | | | [      address_families](## "router_bgp.vrfs.[].address_families") | List, items: Dictionary | | | | | | [        - address_family](## "router_bgp.vrfs.[].address_families.[].address_family") | String | Required, Unique | | | | | [          bgp](## "router_bgp.vrfs.[].address_families.[].bgp") | Dictionary | | | | | @@ -1040,6 +1096,62 @@ MAC address (hh:hh:hh:hh:hh:hh) summary_only: attribute_map: match_map: + address_family_ipv4: + bgp: + missing_policy: + direction_in_action: + direction_out_action: + additional_paths: + install: + install_ecmp_primary: + receive: + send: + any: + backup: + ecmp: + ecmp_limit: + limit: + neighbors: + - ip_address: + activate: + route_map_in: + route_map_out: + peer_groups: + - name: + activate: + next_hop: + address_family_ipv6: + enabled: + originate: + networks: + - prefix: + route_map: + address_family_ipv6: + bgp: + missing_policy: + direction_in_action: + direction_out_action: + additional_paths: + install: + install_ecmp_primary: + receive: + send: + any: + backup: + ecmp: + ecmp_limit: + limit: + neighbors: + - ip_address: + activate: + route_map_in: + route_map_out: + peer_groups: + - name: + activate: + networks: + - prefix: + route_map: address_families: - address_family: bgp: 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 42bdb4e4cf2..3b144f7a5da 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 @@ -13481,6 +13481,414 @@ }, "title": "Aggregate Addresses" }, + "address_family_ipv4": { + "type": "object", + "properties": { + "bgp": { + "type": "object", + "properties": { + "missing_policy": { + "type": "object", + "properties": { + "direction_in_action": { + "type": "string", + "enum": [ + "deny", + "deny-in-out", + "permit" + ], + "title": "Direction In Action" + }, + "direction_out_action": { + "type": "string", + "enum": [ + "deny", + "deny-in-out", + "permit" + ], + "title": "Direction Out Action" + } + }, + "additionalProperties": false, + "patternProperties": { + "^_.+$": {} + }, + "title": "Missing Policy" + }, + "additional_paths": { + "type": "object", + "properties": { + "install": { + "type": "boolean", + "title": "Install" + }, + "install_ecmp_primary": { + "type": "boolean", + "title": "Install Ecmp Primary" + }, + "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, + "patternProperties": { + "^_.+$": {} + }, + "title": "BGP" + }, + "neighbors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "ip_address": { + "type": "string", + "title": "IP Address" + }, + "activate": { + "type": "boolean", + "title": "Activate" + }, + "route_map_in": { + "type": "string", + "description": "Inbound route-map name", + "title": "Route Map In" + }, + "route_map_out": { + "type": "string", + "description": "Outbound route-map name", + "title": "Route Map Out" + } + }, + "additionalProperties": false, + "patternProperties": { + "^_.+$": {} + }, + "required": [ + "ip_address" + ] + }, + "title": "Neighbors" + }, + "peer_groups": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Peer-group name", + "title": "Name" + }, + "activate": { + "type": "boolean", + "title": "Activate" + }, + "next_hop": { + "type": "object", + "properties": { + "address_family_ipv6": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Enabled" + }, + "originate": { + "type": "boolean", + "title": "Originate" + } + }, + "additionalProperties": false, + "patternProperties": { + "^_.+$": {} + }, + "title": "Address Family IPv6" + } + }, + "additionalProperties": false, + "patternProperties": { + "^_.+$": {} + }, + "title": "Next Hop" + } + }, + "additionalProperties": false, + "patternProperties": { + "^_.+$": {} + }, + "required": [ + "name" + ] + }, + "title": "Peer Groups" + }, + "networks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "IPv4 prefix \"A.B.C.D/E\"", + "title": "Prefix" + }, + "route_map": { + "type": "string", + "title": "Route Map" + } + }, + "additionalProperties": false, + "patternProperties": { + "^_.+$": {} + }, + "required": [ + "prefix" + ] + }, + "title": "Networks" + } + }, + "additionalProperties": false, + "patternProperties": { + "^_.+$": {} + }, + "title": "Address Family IPv4" + }, + "address_family_ipv6": { + "type": "object", + "properties": { + "bgp": { + "type": "object", + "properties": { + "missing_policy": { + "type": "object", + "properties": { + "direction_in_action": { + "type": "string", + "enum": [ + "deny", + "deny-in-out", + "permit" + ], + "title": "Direction In Action" + }, + "direction_out_action": { + "type": "string", + "enum": [ + "deny", + "deny-in-out", + "permit" + ], + "title": "Direction Out Action" + } + }, + "additionalProperties": false, + "patternProperties": { + "^_.+$": {} + }, + "title": "Missing Policy" + }, + "additional_paths": { + "type": "object", + "properties": { + "install": { + "type": "boolean", + "title": "Install" + }, + "install_ecmp_primary": { + "type": "boolean", + "title": "Install Ecmp Primary" + }, + "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, + "patternProperties": { + "^_.+$": {} + }, + "title": "BGP" + }, + "neighbors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "ip_address": { + "type": "string", + "title": "IP Address" + }, + "activate": { + "type": "boolean", + "title": "Activate" + }, + "route_map_in": { + "type": "string", + "description": "Inbound route-map name", + "title": "Route Map In" + }, + "route_map_out": { + "type": "string", + "description": "Outbound route-map name", + "title": "Route Map Out" + } + }, + "additionalProperties": false, + "patternProperties": { + "^_.+$": {} + }, + "required": [ + "ip_address" + ] + }, + "title": "Neighbors" + }, + "peer_groups": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Peer-group name", + "title": "Name" + }, + "activate": { + "type": "boolean", + "title": "Activate" + } + }, + "additionalProperties": false, + "patternProperties": { + "^_.+$": {} + }, + "required": [ + "name" + ] + }, + "title": "Peer Groups" + }, + "networks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "IPv6 prefix \"A:B:C:D:E:F:G:H/I\"", + "title": "Prefix" + }, + "route_map": { + "type": "string", + "title": "Route Map" + } + }, + "additionalProperties": false, + "patternProperties": { + "^_.+$": {} + }, + "required": [ + "prefix" + ] + }, + "title": "Networks" + } + }, + "additionalProperties": false, + "patternProperties": { + "^_.+$": {} + }, + "title": "Address Family IPv6" + }, "address_families": { "type": "array", "items": { 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 a2599197688..2b62fd22331 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 @@ -8485,6 +8485,211 @@ keys: type: str match_map: type: str + address_family_ipv4: + type: dict + keys: + bgp: + type: dict + keys: + missing_policy: + type: dict + keys: + direction_in_action: + type: str + valid_values: + - deny + - deny-in-out + - permit + direction_out_action: + type: str + valid_values: + - deny + - deny-in-out + - permit + additional_paths: + type: dict + keys: + install: + type: bool + install_ecmp_primary: + type: bool + 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 + neighbors: + type: list + primary_key: ip_address + convert_types: + - dict + items: + type: dict + keys: + ip_address: + type: str + activate: + type: bool + route_map_in: + type: str + description: Inbound route-map name + route_map_out: + type: str + description: Outbound route-map name + peer_groups: + type: list + primary_key: name + convert_types: + - dict + items: + type: dict + keys: + name: + type: str + description: Peer-group name + activate: + type: bool + next_hop: + type: dict + keys: + address_family_ipv6: + type: dict + primary_key: enabled + keys: + enabled: + type: bool + originate: + type: bool + networks: + type: list + primary_key: prefix + convert_types: + - dict + items: + type: dict + keys: + prefix: + type: str + description: IPv4 prefix "A.B.C.D/E" + route_map: + type: str + address_family_ipv6: + type: dict + keys: + bgp: + type: dict + keys: + missing_policy: + type: dict + keys: + direction_in_action: + type: str + valid_values: + - deny + - deny-in-out + - permit + direction_out_action: + type: str + valid_values: + - deny + - deny-in-out + - permit + additional_paths: + type: dict + keys: + install: + type: bool + install_ecmp_primary: + type: bool + 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 + neighbors: + type: list + primary_key: ip_address + convert_types: + - dict + items: + type: dict + keys: + ip_address: + type: str + activate: + type: bool + route_map_in: + type: str + description: Inbound route-map name + route_map_out: + type: str + description: Outbound route-map name + peer_groups: + type: list + primary_key: name + convert_types: + - dict + items: + type: dict + keys: + name: + type: str + description: Peer-group name + activate: + type: bool + networks: + type: list + primary_key: prefix + convert_types: + - dict + items: + type: dict + keys: + prefix: + type: str + description: IPv6 prefix "A:B:C:D:E:F:G:H/I" + route_map: + type: str address_families: type: list primary_key: address_family 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 f76168db768..9e8a813a8e2 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 @@ -1474,6 +1474,211 @@ keys: type: str match_map: type: str + address_family_ipv4: + type: dict + keys: + bgp: + type: dict + keys: + missing_policy: + type: dict + keys: + direction_in_action: + type: str + valid_values: + - "deny" + - "deny-in-out" + - "permit" + direction_out_action: + type: str + valid_values: + - "deny" + - "deny-in-out" + - "permit" + additional_paths: + type: dict + keys: + install: + type: bool + install_ecmp_primary: + type: bool + 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 + neighbors: + type: list + primary_key: ip_address + convert_types: + - dict + items: + type: dict + keys: + ip_address: + type: str + activate: + type: bool + route_map_in: + type: str + description: Inbound route-map name + route_map_out: + type: str + description: Outbound route-map name + peer_groups: + type: list + primary_key: name + convert_types: + - dict + items: + type: dict + keys: + name: + type: str + description: Peer-group name + activate: + type: bool + next_hop: + type: dict + keys: + address_family_ipv6: + type: dict + primary_key: enabled + keys: + enabled: + type: bool + originate: + type: bool + networks: + type: list + primary_key: prefix + convert_types: + - dict + items: + type: dict + keys: + prefix: + type: str + description: IPv4 prefix "A.B.C.D/E" + route_map: + type: str + address_family_ipv6: + type: dict + keys: + bgp: + type: dict + keys: + missing_policy: + type: dict + keys: + direction_in_action: + type: str + valid_values: + - "deny" + - "deny-in-out" + - "permit" + direction_out_action: + type: str + valid_values: + - "deny" + - "deny-in-out" + - "permit" + additional_paths: + type: dict + keys: + install: + type: bool + install_ecmp_primary: + type: bool + 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 + neighbors: + type: list + primary_key: ip_address + convert_types: + - dict + items: + type: dict + keys: + ip_address: + type: str + activate: + type: bool + route_map_in: + type: str + description: Inbound route-map name + route_map_out: + type: str + description: Outbound route-map name + peer_groups: + type: list + primary_key: name + convert_types: + - dict + items: + type: dict + keys: + name: + type: str + description: Peer-group name + activate: + type: bool + networks: + type: list + primary_key: prefix + convert_types: + - dict + items: + type: dict + keys: + prefix: + type: str + description: IPv6 prefix "A:B:C:D:E:F:G:H/I" + route_map: + type: str address_families: type: list primary_key: address_family From 038dc5802f0ef56b3d735f6b0cf1f2b8145e838b Mon Sep 17 00:00:00 2001 From: emilarista Date: Thu, 4 May 2023 15:00:33 +0200 Subject: [PATCH 2/9] add deprecation warning to schemas --- .../avd/roles/eos_cli_config_gen/docs/data_model/Routing.md | 2 +- .../eos_cli_config_gen/schemas/eos_cli_config_gen.schema.yml | 4 ++++ .../schemas/schema_fragments/router_bgp.schema.yml | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/data_model/Routing.md b/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/data_model/Routing.md index 1513853957f..ac69c63f312 100644 --- a/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/data_model/Routing.md +++ b/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/data_model/Routing.md @@ -646,7 +646,7 @@ MAC address (hh:hh:hh:hh:hh:hh) | [        networks](## "router_bgp.vrfs.[].address_family_ipv6.networks") | List, items: Dictionary | | | | | | [          - prefix](## "router_bgp.vrfs.[].address_family_ipv6.networks.[].prefix") | String | Required, Unique | | | IPv6 prefix "A:B:C:D:E:F:G:H/I" | | [            route_map](## "router_bgp.vrfs.[].address_family_ipv6.networks.[].route_map") | String | | | | | - | [      address_families](## "router_bgp.vrfs.[].address_families") | List, items: Dictionary | | | | | + | [      address_families](## "router_bgp.vrfs.[].address_families") deprecated | List, items: Dictionary | | | | This key is deprecated. Support will be removed in AVD version v5.0.0. Use address_family_ipv4/address_family_ipv6 instead. | | [        - address_family](## "router_bgp.vrfs.[].address_families.[].address_family") | String | Required, Unique | | | | | [          bgp](## "router_bgp.vrfs.[].address_families.[].bgp") | Dictionary | | | | | | [            missing_policy](## "router_bgp.vrfs.[].address_families.[].bgp.missing_policy") | Dictionary | | | | | 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 2b62fd22331..2f2194684bb 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 @@ -8695,6 +8695,10 @@ keys: primary_key: address_family convert_types: - dict + deprecation: + warning: true + new_key: address_family_ipv4/address_family_ipv6 + remove_in_version: v5.0.0 items: type: dict keys: 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 9e8a813a8e2..12a035e3f05 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 @@ -1684,6 +1684,10 @@ keys: primary_key: address_family convert_types: - dict + deprecation: + warning: true + new_key: address_family_ipv4/address_family_ipv6 + remove_in_version: v5.0.0 items: type: dict keys: From b5db734d49809a5f8c99b8e4be1713d9c9fe5abc Mon Sep 17 00:00:00 2001 From: emilarista Date: Thu, 4 May 2023 16:36:54 +0200 Subject: [PATCH 3/9] add ipv4/6 flowspec and multicast AFs to schema and EOS temp --- .../docs/data_model/Routing.md | 104 +++++ .../eos_cli_config_gen.jsonschema.json | 436 ++++++++++++++++++ .../schemas/eos_cli_config_gen.schema.yml | 206 +++++++++ .../schema_fragments/router_bgp.schema.yml | 206 +++++++++ .../templates/eos/router-bgp.j2 | 234 ++++++++++ 5 files changed, 1186 insertions(+) diff --git a/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/data_model/Routing.md b/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/data_model/Routing.md index ac69c63f312..3d7feb8a0ff 100644 --- a/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/data_model/Routing.md +++ b/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/data_model/Routing.md @@ -646,6 +646,58 @@ MAC address (hh:hh:hh:hh:hh:hh) | [        networks](## "router_bgp.vrfs.[].address_family_ipv6.networks") | List, items: Dictionary | | | | | | [          - prefix](## "router_bgp.vrfs.[].address_family_ipv6.networks.[].prefix") | String | Required, Unique | | | IPv6 prefix "A:B:C:D:E:F:G:H/I" | | [            route_map](## "router_bgp.vrfs.[].address_family_ipv6.networks.[].route_map") | String | | | | | + | [      address_family_ipv4_multicast](## "router_bgp.vrfs.[].address_family_ipv4_multicast") | Dictionary | | | | | + | [        bgp](## "router_bgp.vrfs.[].address_family_ipv4_multicast.bgp") | Dictionary | | | | | + | [          missing_policy](## "router_bgp.vrfs.[].address_family_ipv4_multicast.bgp.missing_policy") | Dictionary | | | | | + | [            direction_in_action](## "router_bgp.vrfs.[].address_family_ipv4_multicast.bgp.missing_policy.direction_in_action") | String | | | Valid Values:
- deny
- deny-in-out
- permit | | + | [            direction_out_action](## "router_bgp.vrfs.[].address_family_ipv4_multicast.bgp.missing_policy.direction_out_action") | String | | | Valid Values:
- deny
- deny-in-out
- permit | | + | [          additional_paths](## "router_bgp.vrfs.[].address_family_ipv4_multicast.bgp.additional_paths") | Dictionary | | | | | + | [            receive](## "router_bgp.vrfs.[].address_family_ipv4_multicast.bgp.additional_paths.receive") | Boolean | | | | | + | [        neighbors](## "router_bgp.vrfs.[].address_family_ipv4_multicast.neighbors") | List, items: Dictionary | | | | | + | [          - ip_address](## "router_bgp.vrfs.[].address_family_ipv4_multicast.neighbors.[].ip_address") | String | Required, Unique | | | | + | [            activate](## "router_bgp.vrfs.[].address_family_ipv4_multicast.neighbors.[].activate") | Boolean | | | | | + | [            route_map_in](## "router_bgp.vrfs.[].address_family_ipv4_multicast.neighbors.[].route_map_in") | String | | | | Inbound route-map name | + | [            route_map_out](## "router_bgp.vrfs.[].address_family_ipv4_multicast.neighbors.[].route_map_out") | String | | | | Outbound route-map name | + | [        peer_groups](## "router_bgp.vrfs.[].address_family_ipv4_multicast.peer_groups") | List, items: Dictionary | | | | | + | [          - name](## "router_bgp.vrfs.[].address_family_ipv4_multicast.peer_groups.[].name") | String | Required, Unique | | | Peer-group name | + | [            activate](## "router_bgp.vrfs.[].address_family_ipv4_multicast.peer_groups.[].activate") | Boolean | | | | | + | [        networks](## "router_bgp.vrfs.[].address_family_ipv4_multicast.networks") | List, items: Dictionary | | | | | + | [          - prefix](## "router_bgp.vrfs.[].address_family_ipv4_multicast.networks.[].prefix") | String | Required, Unique | | | IPv6 prefix "A.B.C.D/E" | + | [            route_map](## "router_bgp.vrfs.[].address_family_ipv4_multicast.networks.[].route_map") | String | | | | | + | [      address_family_ipv6_multicast](## "router_bgp.vrfs.[].address_family_ipv6_multicast") | Dictionary | | | | | + | [        bgp](## "router_bgp.vrfs.[].address_family_ipv6_multicast.bgp") | Dictionary | | | | | + | [          missing_policy](## "router_bgp.vrfs.[].address_family_ipv6_multicast.bgp.missing_policy") | Dictionary | | | | | + | [            direction_in_action](## "router_bgp.vrfs.[].address_family_ipv6_multicast.bgp.missing_policy.direction_in_action") | String | | | Valid Values:
- deny
- deny-in-out
- permit | | + | [            direction_out_action](## "router_bgp.vrfs.[].address_family_ipv6_multicast.bgp.missing_policy.direction_out_action") | String | | | Valid Values:
- deny
- deny-in-out
- permit | | + | [          additional_paths](## "router_bgp.vrfs.[].address_family_ipv6_multicast.bgp.additional_paths") | Dictionary | | | | | + | [            receive](## "router_bgp.vrfs.[].address_family_ipv6_multicast.bgp.additional_paths.receive") | Boolean | | | | | + | [        neighbors](## "router_bgp.vrfs.[].address_family_ipv6_multicast.neighbors") | List, items: Dictionary | | | | | + | [          - ip_address](## "router_bgp.vrfs.[].address_family_ipv6_multicast.neighbors.[].ip_address") | String | Required, Unique | | | | + | [            activate](## "router_bgp.vrfs.[].address_family_ipv6_multicast.neighbors.[].activate") | Boolean | | | | | + | [            route_map_in](## "router_bgp.vrfs.[].address_family_ipv6_multicast.neighbors.[].route_map_in") | String | | | | Inbound route-map name | + | [            route_map_out](## "router_bgp.vrfs.[].address_family_ipv6_multicast.neighbors.[].route_map_out") | String | | | | Outbound route-map name | + | [        peer_groups](## "router_bgp.vrfs.[].address_family_ipv6_multicast.peer_groups") | List, items: Dictionary | | | | | + | [          - name](## "router_bgp.vrfs.[].address_family_ipv6_multicast.peer_groups.[].name") | String | Required, Unique | | | Peer-group name | + | [            activate](## "router_bgp.vrfs.[].address_family_ipv6_multicast.peer_groups.[].activate") | Boolean | | | | | + | [        networks](## "router_bgp.vrfs.[].address_family_ipv6_multicast.networks") | List, items: Dictionary | | | | | + | [          - prefix](## "router_bgp.vrfs.[].address_family_ipv6_multicast.networks.[].prefix") | String | Required, Unique | | | IPv6 prefix "A:B:C:D:E:F:G:H/I" | + | [            route_map](## "router_bgp.vrfs.[].address_family_ipv6_multicast.networks.[].route_map") | String | | | | | + | [      address_family_flow_spec_ipv4](## "router_bgp.vrfs.[].address_family_flow_spec_ipv4") | Dictionary | | | | | + | [        bgp](## "router_bgp.vrfs.[].address_family_flow_spec_ipv4.bgp") | Dictionary | | | | | + | [          missing_policy](## "router_bgp.vrfs.[].address_family_flow_spec_ipv4.bgp.missing_policy") | Dictionary | | | | | + | [            direction_in_action](## "router_bgp.vrfs.[].address_family_flow_spec_ipv4.bgp.missing_policy.direction_in_action") | String | | | Valid Values:
- deny
- deny-in-out
- permit | | + | [            direction_out_action](## "router_bgp.vrfs.[].address_family_flow_spec_ipv4.bgp.missing_policy.direction_out_action") | String | | | Valid Values:
- deny
- deny-in-out
- permit | | + | [        neighbors](## "router_bgp.vrfs.[].address_family_flow_spec_ipv4.neighbors") | List, items: Dictionary | | | | | + | [          - ip_address](## "router_bgp.vrfs.[].address_family_flow_spec_ipv4.neighbors.[].ip_address") | String | Required, Unique | | | | + | [            activate](## "router_bgp.vrfs.[].address_family_flow_spec_ipv4.neighbors.[].activate") | Boolean | | | | | + | [      address_family_flow_spec_ipv6](## "router_bgp.vrfs.[].address_family_flow_spec_ipv6") | Dictionary | | | | | + | [        bgp](## "router_bgp.vrfs.[].address_family_flow_spec_ipv6.bgp") | Dictionary | | | | | + | [          missing_policy](## "router_bgp.vrfs.[].address_family_flow_spec_ipv6.bgp.missing_policy") | Dictionary | | | | | + | [            direction_in_action](## "router_bgp.vrfs.[].address_family_flow_spec_ipv6.bgp.missing_policy.direction_in_action") | String | | | Valid Values:
- deny
- deny-in-out
- permit | | + | [            direction_out_action](## "router_bgp.vrfs.[].address_family_flow_spec_ipv6.bgp.missing_policy.direction_out_action") | String | | | Valid Values:
- deny
- deny-in-out
- permit | | + | [        neighbors](## "router_bgp.vrfs.[].address_family_flow_spec_ipv6.neighbors") | List, items: Dictionary | | | | | + | [          - ip_address](## "router_bgp.vrfs.[].address_family_flow_spec_ipv6.neighbors.[].ip_address") | String | Required, Unique | | | | + | [            activate](## "router_bgp.vrfs.[].address_family_flow_spec_ipv6.neighbors.[].activate") | Boolean | | | | | | [      address_families](## "router_bgp.vrfs.[].address_families") deprecated | List, items: Dictionary | | | | This key is deprecated. Support will be removed in AVD version v5.0.0. Use address_family_ipv4/address_family_ipv6 instead. | | [        - address_family](## "router_bgp.vrfs.[].address_families.[].address_family") | String | Required, Unique | | | | | [          bgp](## "router_bgp.vrfs.[].address_families.[].bgp") | Dictionary | | | | | @@ -1152,6 +1204,58 @@ MAC address (hh:hh:hh:hh:hh:hh) networks: - prefix: route_map: + address_family_ipv4_multicast: + bgp: + missing_policy: + direction_in_action: + direction_out_action: + additional_paths: + receive: + neighbors: + - ip_address: + activate: + route_map_in: + route_map_out: + peer_groups: + - name: + activate: + networks: + - prefix: + route_map: + address_family_ipv6_multicast: + bgp: + missing_policy: + direction_in_action: + direction_out_action: + additional_paths: + receive: + neighbors: + - ip_address: + activate: + route_map_in: + route_map_out: + peer_groups: + - name: + activate: + networks: + - prefix: + route_map: + address_family_flow_spec_ipv4: + bgp: + missing_policy: + direction_in_action: + direction_out_action: + neighbors: + - ip_address: + activate: + address_family_flow_spec_ipv6: + bgp: + missing_policy: + direction_in_action: + direction_out_action: + neighbors: + - ip_address: + activate: address_families: - address_family: bgp: 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 3b144f7a5da..3e63f5fa507 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 @@ -13889,6 +13889,442 @@ }, "title": "Address Family IPv6" }, + "address_family_ipv4_multicast": { + "type": "object", + "properties": { + "bgp": { + "type": "object", + "properties": { + "missing_policy": { + "type": "object", + "properties": { + "direction_in_action": { + "type": "string", + "enum": [ + "deny", + "deny-in-out", + "permit" + ], + "title": "Direction In Action" + }, + "direction_out_action": { + "type": "string", + "enum": [ + "deny", + "deny-in-out", + "permit" + ], + "title": "Direction Out Action" + } + }, + "additionalProperties": false, + "patternProperties": { + "^_.+$": {} + }, + "title": "Missing Policy" + }, + "additional_paths": { + "type": "object", + "properties": { + "receive": { + "type": "boolean", + "title": "Receive" + } + }, + "additionalProperties": false, + "patternProperties": { + "^_.+$": {} + }, + "title": "Additional Paths" + } + }, + "additionalProperties": false, + "patternProperties": { + "^_.+$": {} + }, + "title": "BGP" + }, + "neighbors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "ip_address": { + "type": "string", + "title": "IP Address" + }, + "activate": { + "type": "boolean", + "title": "Activate" + }, + "route_map_in": { + "type": "string", + "description": "Inbound route-map name", + "title": "Route Map In" + }, + "route_map_out": { + "type": "string", + "description": "Outbound route-map name", + "title": "Route Map Out" + } + }, + "additionalProperties": false, + "patternProperties": { + "^_.+$": {} + }, + "required": [ + "ip_address" + ] + }, + "title": "Neighbors" + }, + "peer_groups": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Peer-group name", + "title": "Name" + }, + "activate": { + "type": "boolean", + "title": "Activate" + } + }, + "additionalProperties": false, + "patternProperties": { + "^_.+$": {} + }, + "required": [ + "name" + ] + }, + "title": "Peer Groups" + }, + "networks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "IPv6 prefix \"A.B.C.D/E\"", + "title": "Prefix" + }, + "route_map": { + "type": "string", + "title": "Route Map" + } + }, + "additionalProperties": false, + "patternProperties": { + "^_.+$": {} + }, + "required": [ + "prefix" + ] + }, + "title": "Networks" + } + }, + "additionalProperties": false, + "patternProperties": { + "^_.+$": {} + }, + "title": "Address Family IPv4 Multicast" + }, + "address_family_ipv6_multicast": { + "type": "object", + "properties": { + "bgp": { + "type": "object", + "properties": { + "missing_policy": { + "type": "object", + "properties": { + "direction_in_action": { + "type": "string", + "enum": [ + "deny", + "deny-in-out", + "permit" + ], + "title": "Direction In Action" + }, + "direction_out_action": { + "type": "string", + "enum": [ + "deny", + "deny-in-out", + "permit" + ], + "title": "Direction Out Action" + } + }, + "additionalProperties": false, + "patternProperties": { + "^_.+$": {} + }, + "title": "Missing Policy" + }, + "additional_paths": { + "type": "object", + "properties": { + "receive": { + "type": "boolean", + "title": "Receive" + } + }, + "additionalProperties": false, + "patternProperties": { + "^_.+$": {} + }, + "title": "Additional Paths" + } + }, + "additionalProperties": false, + "patternProperties": { + "^_.+$": {} + }, + "title": "BGP" + }, + "neighbors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "ip_address": { + "type": "string", + "title": "IP Address" + }, + "activate": { + "type": "boolean", + "title": "Activate" + }, + "route_map_in": { + "type": "string", + "description": "Inbound route-map name", + "title": "Route Map In" + }, + "route_map_out": { + "type": "string", + "description": "Outbound route-map name", + "title": "Route Map Out" + } + }, + "additionalProperties": false, + "patternProperties": { + "^_.+$": {} + }, + "required": [ + "ip_address" + ] + }, + "title": "Neighbors" + }, + "peer_groups": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Peer-group name", + "title": "Name" + }, + "activate": { + "type": "boolean", + "title": "Activate" + } + }, + "additionalProperties": false, + "patternProperties": { + "^_.+$": {} + }, + "required": [ + "name" + ] + }, + "title": "Peer Groups" + }, + "networks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "description": "IPv6 prefix \"A:B:C:D:E:F:G:H/I\"", + "title": "Prefix" + }, + "route_map": { + "type": "string", + "title": "Route Map" + } + }, + "additionalProperties": false, + "patternProperties": { + "^_.+$": {} + }, + "required": [ + "prefix" + ] + }, + "title": "Networks" + } + }, + "additionalProperties": false, + "patternProperties": { + "^_.+$": {} + }, + "title": "Address Family IPv6 Multicast" + }, + "address_family_flow_spec_ipv4": { + "type": "object", + "properties": { + "bgp": { + "type": "object", + "properties": { + "missing_policy": { + "type": "object", + "properties": { + "direction_in_action": { + "type": "string", + "enum": [ + "deny", + "deny-in-out", + "permit" + ], + "title": "Direction In Action" + }, + "direction_out_action": { + "type": "string", + "enum": [ + "deny", + "deny-in-out", + "permit" + ], + "title": "Direction Out Action" + } + }, + "additionalProperties": false, + "patternProperties": { + "^_.+$": {} + }, + "title": "Missing Policy" + } + }, + "additionalProperties": false, + "patternProperties": { + "^_.+$": {} + }, + "title": "BGP" + }, + "neighbors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "ip_address": { + "type": "string", + "title": "IP Address" + }, + "activate": { + "type": "boolean", + "title": "Activate" + } + }, + "additionalProperties": false, + "patternProperties": { + "^_.+$": {} + }, + "required": [ + "ip_address" + ] + }, + "title": "Neighbors" + } + }, + "additionalProperties": false, + "patternProperties": { + "^_.+$": {} + }, + "title": "Address Family Flow Spec IPv4" + }, + "address_family_flow_spec_ipv6": { + "type": "object", + "properties": { + "bgp": { + "type": "object", + "properties": { + "missing_policy": { + "type": "object", + "properties": { + "direction_in_action": { + "type": "string", + "enum": [ + "deny", + "deny-in-out", + "permit" + ], + "title": "Direction In Action" + }, + "direction_out_action": { + "type": "string", + "enum": [ + "deny", + "deny-in-out", + "permit" + ], + "title": "Direction Out Action" + } + }, + "additionalProperties": false, + "patternProperties": { + "^_.+$": {} + }, + "title": "Missing Policy" + } + }, + "additionalProperties": false, + "patternProperties": { + "^_.+$": {} + }, + "title": "BGP" + }, + "neighbors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "ip_address": { + "type": "string", + "title": "IP Address" + }, + "activate": { + "type": "boolean", + "title": "Activate" + } + }, + "additionalProperties": false, + "patternProperties": { + "^_.+$": {} + }, + "required": [ + "ip_address" + ] + }, + "title": "Neighbors" + } + }, + "additionalProperties": false, + "patternProperties": { + "^_.+$": {} + }, + "title": "Address Family Flow Spec IPv6" + }, "address_families": { "type": "array", "items": { 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 2f2194684bb..f713606c48a 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 @@ -8690,6 +8690,212 @@ keys: description: IPv6 prefix "A:B:C:D:E:F:G:H/I" route_map: type: str + address_family_ipv4_multicast: + type: dict + keys: + bgp: + type: dict + keys: + missing_policy: + type: dict + keys: + direction_in_action: + type: str + valid_values: + - deny + - deny-in-out + - permit + direction_out_action: + type: str + valid_values: + - deny + - deny-in-out + - permit + additional_paths: + type: dict + keys: + receive: + type: bool + neighbors: + type: list + primary_key: ip_address + convert_types: + - dict + items: + type: dict + keys: + ip_address: + type: str + activate: + type: bool + route_map_in: + type: str + description: Inbound route-map name + route_map_out: + type: str + description: Outbound route-map name + peer_groups: + type: list + primary_key: name + convert_types: + - dict + items: + type: dict + keys: + name: + type: str + description: Peer-group name + activate: + type: bool + networks: + type: list + primary_key: prefix + convert_types: + - dict + items: + type: dict + keys: + prefix: + type: str + description: IPv6 prefix "A.B.C.D/E" + route_map: + type: str + address_family_ipv6_multicast: + type: dict + keys: + bgp: + type: dict + keys: + missing_policy: + type: dict + keys: + direction_in_action: + type: str + valid_values: + - deny + - deny-in-out + - permit + direction_out_action: + type: str + valid_values: + - deny + - deny-in-out + - permit + additional_paths: + type: dict + keys: + receive: + type: bool + neighbors: + type: list + primary_key: ip_address + convert_types: + - dict + items: + type: dict + keys: + ip_address: + type: str + activate: + type: bool + route_map_in: + type: str + description: Inbound route-map name + route_map_out: + type: str + description: Outbound route-map name + peer_groups: + type: list + primary_key: name + convert_types: + - dict + items: + type: dict + keys: + name: + type: str + description: Peer-group name + activate: + type: bool + networks: + type: list + primary_key: prefix + convert_types: + - dict + items: + type: dict + keys: + prefix: + type: str + description: IPv6 prefix "A:B:C:D:E:F:G:H/I" + route_map: + type: str + address_family_flow_spec_ipv4: + type: dict + keys: + bgp: + type: dict + keys: + missing_policy: + type: dict + keys: + direction_in_action: + type: str + valid_values: + - deny + - deny-in-out + - permit + direction_out_action: + type: str + valid_values: + - deny + - deny-in-out + - permit + neighbors: + type: list + primary_key: ip_address + convert_types: + - dict + items: + type: dict + keys: + ip_address: + type: str + activate: + type: bool + address_family_flow_spec_ipv6: + type: dict + keys: + bgp: + type: dict + keys: + missing_policy: + type: dict + keys: + direction_in_action: + type: str + valid_values: + - deny + - deny-in-out + - permit + direction_out_action: + type: str + valid_values: + - deny + - deny-in-out + - permit + neighbors: + type: list + primary_key: ip_address + convert_types: + - dict + items: + type: dict + keys: + ip_address: + type: str + activate: + type: bool address_families: type: list primary_key: address_family 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 12a035e3f05..e1afe84947b 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 @@ -1679,6 +1679,212 @@ keys: description: IPv6 prefix "A:B:C:D:E:F:G:H/I" route_map: type: str + address_family_ipv4_multicast: + type: dict + keys: + bgp: + type: dict + keys: + missing_policy: + type: dict + keys: + direction_in_action: + type: str + valid_values: + - "deny" + - "deny-in-out" + - "permit" + direction_out_action: + type: str + valid_values: + - "deny" + - "deny-in-out" + - "permit" + additional_paths: + type: dict + keys: + receive: + type: bool + neighbors: + type: list + primary_key: ip_address + convert_types: + - dict + items: + type: dict + keys: + ip_address: + type: str + activate: + type: bool + route_map_in: + type: str + description: Inbound route-map name + route_map_out: + type: str + description: Outbound route-map name + peer_groups: + type: list + primary_key: name + convert_types: + - dict + items: + type: dict + keys: + name: + type: str + description: Peer-group name + activate: + type: bool + networks: + type: list + primary_key: prefix + convert_types: + - dict + items: + type: dict + keys: + prefix: + type: str + description: IPv6 prefix "A.B.C.D/E" + route_map: + type: str + address_family_ipv6_multicast: + type: dict + keys: + bgp: + type: dict + keys: + missing_policy: + type: dict + keys: + direction_in_action: + type: str + valid_values: + - "deny" + - "deny-in-out" + - "permit" + direction_out_action: + type: str + valid_values: + - "deny" + - "deny-in-out" + - "permit" + additional_paths: + type: dict + keys: + receive: + type: bool + neighbors: + type: list + primary_key: ip_address + convert_types: + - dict + items: + type: dict + keys: + ip_address: + type: str + activate: + type: bool + route_map_in: + type: str + description: Inbound route-map name + route_map_out: + type: str + description: Outbound route-map name + peer_groups: + type: list + primary_key: name + convert_types: + - dict + items: + type: dict + keys: + name: + type: str + description: Peer-group name + activate: + type: bool + networks: + type: list + primary_key: prefix + convert_types: + - dict + items: + type: dict + keys: + prefix: + type: str + description: IPv6 prefix "A:B:C:D:E:F:G:H/I" + route_map: + type: str + address_family_flow_spec_ipv4: + type: dict + keys: + bgp: + type: dict + keys: + missing_policy: + type: dict + keys: + direction_in_action: + type: str + valid_values: + - "deny" + - "deny-in-out" + - "permit" + direction_out_action: + type: str + valid_values: + - "deny" + - "deny-in-out" + - "permit" + neighbors: + type: list + primary_key: ip_address + convert_types: + - dict + items: + type: dict + keys: + ip_address: + type: str + activate: + type: bool + address_family_flow_spec_ipv6: + type: dict + keys: + bgp: + type: dict + keys: + missing_policy: + type: dict + keys: + direction_in_action: + type: str + valid_values: + - "deny" + - "deny-in-out" + - "permit" + direction_out_action: + type: str + valid_values: + - "deny" + - "deny-in-out" + - "permit" + neighbors: + type: list + primary_key: ip_address + convert_types: + - dict + items: + type: dict + keys: + ip_address: + type: str + activate: + type: bool address_families: type: list primary_key: address_family 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 ae573ff77f6..e2c09b3acde 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 @@ -1048,6 +1048,240 @@ router bgp {{ router_bgp.as }} {{ redistribute_route_cli }} {% endif %} {% endfor %} +{% if vrf.address_family_ipv4 is arista.avd.defined %} + ! + address-family ipv4 +{% if vrf.address_family_ipv4.bgp.missing_policy.direction_in_action is arista.avd.defined %} + bgp missing-policy direction in action {{ vrf.address_family_ipv4.bgp.missing_policy.direction_in_action }} +{% endif %} +{% if vrf.address_family_ipv4.bgp.missing_policy.direction_out_action is arista.avd.defined %} + bgp missing-policy direction out action {{ vrf.address_family_ipv4.bgp.missing_policy.direction_out_action }} +{% endif %} +{% if vrf.address_family_ipv4.bgp.additional_paths.install is arista.avd.defined(true) %} + bgp additional-paths install +{% elif vrf.address_family_ipv4.bgp.additional_paths.install_ecmp_primary is arista.avd.defined(true) %} + bgp additional-paths install ecmp-primary +{% endif %} +{% if vrf.address_family_ipv4.bgp.additional_paths.receive is arista.avd.defined(true) %} + bgp additional-paths receive +{% endif %} +{% if vrf.address_family_ipv4.bgp.additional_paths.send.any is arista.avd.defined(true) %} + bgp additional-paths send any +{% elif vrf.address_family_ipv4.bgp.additional_paths.send.backup is arista.avd.defined(true) %} + bgp additional-paths send backup +{% elif vrf.address_family_ipv4.bgp.additional_paths.send.ecmp is arista.avd.defined(true) %} + bgp additional-paths send ecmp +{% elif vrf.address_family_ipv4.bgp.additional_paths.send.ecmp_limit is arista.avd.defined %} + bgp additional-paths send ecmp limit {{ vrf.address_family_ipv4.bgp.additional_paths.send.ecmp_limit }} +{% elif vrf.address_family_ipv4.bgp.additional_paths.send.limit is arista.avd.defined %} + bgp additional-paths send limit {{ vrf.address_family_ipv4.bgp.additional_paths.send.limit }} +{% endif %} +{% for peer_group in vrf.address_family_ipv4.peer_groups | arista.avd.natural_sort('name') %} +{% if peer_group.activate is arista.avd.defined(true) %} + neighbor {{ peer_group.name }} activate +{% elif peer_group.activate is arista.avd.defined(false) %} + no neighbor {{ peer_group.name }} activate +{% endif %} +{% if peer_group.next_hop.address_family_ipv6_originate is arista.avd.defined(true) %} + neighbor {{ peer_group.name }} next-hop address-family ipv6 originate +{% endif %} +{% endfor %} +{% for neighbor in vrf.address_family_ipv4.neighbors | arista.avd.natural_sort('ip_address') %} +{% if neighbor.activate is arista.avd.defined(true) %} + neighbor {{ neighbor.ip_address }} activate +{% endif %} +{% if neighbor.route_map_in is arista.avd.defined %} + neighbor {{ neighbor.ip_address }} route-map {{ neighbor.route_map_in }} in +{% endif %} +{% if neighbor.route_map_out is arista.avd.defined %} + neighbor {{ neighbor.ip_address }} route-map {{ neighbor.route_map_out }} out +{% endif %} +{% endfor %} +{% for network in vrf.address_family_ipv4.networks | arista.avd.natural_sort('prefix') %} +{% set network_cli = "network " ~ network.prefix %} +{% if network.route_map is arista.avd.defined %} +{% set network_cli = network_cli ~ " route-map " ~ network.route_map %} +{% endif %} + {{ network_cli }} +{% endfor %} +{% endif %} +{% if vrf.address_family_ipv4_multicast is arista.avd.defined %} + ! + address-family ipv4 multicast +{% if vrf.address_family_ipv4_multicast.bgp.missing_policy.direction_in_action is arista.avd.defined %} + bgp missing-policy direction in action {{ vrf.address_family_ipv4_multicast.bgp.missing_policy.direction_in_action }} +{% endif %} +{% if vrf.address_family_ipv4_multicast.bgp.missing_policy.direction_out_action is arista.avd.defined %} + bgp missing-policy direction out action {{ vrf.address_family_ipv4_multicast.bgp.missing_policy.direction_out_action }} +{% endif %} +{% if vrf.address_family_ipv4_multicast.bgp.additional_paths.receive is arista.avd.defined(true) %} + bgp additional-paths receive +{% endif %} +{% for peer_group in vrf.address_family_ipv4_multicast.peer_groups | arista.avd.natural_sort('name') %} +{% if peer_group.activate is arista.avd.defined(true) %} + neighbor {{ peer_group.name }} activate +{% elif peer_group.activate is arista.avd.defined(false) %} + no neighbor {{ peer_group.name }} activate +{% endif %} +{% endfor %} +{% for neighbor in vrf.address_family_ipv4_multicast.neighbors | arista.avd.natural_sort('ip_address') %} +{% if neighbor.activate is arista.avd.defined(true) %} + neighbor {{ neighbor.ip_address }} activate +{% endif %} +{% if neighbor.route_map_in is arista.avd.defined %} + neighbor {{ neighbor.ip_address }} route-map {{ neighbor.route_map_in }} in +{% endif %} +{% if neighbor.route_map_out is arista.avd.defined %} + neighbor {{ neighbor.ip_address }} route-map {{ neighbor.route_map_out }} out +{% endif %} +{% endfor %} +{% for network in vrf.address_family_ipv4_multicast.networks | arista.avd.natural_sort('prefix') %} +{% set network_cli = "network " ~ network.prefix %} +{% if network.route_map is arista.avd.defined %} +{% set network_cli = network_cli ~ " route-map " ~ network.route_map %} +{% endif %} + {{ network_cli }} +{% endfor %} +{% endif %} +{% if vrf.address_family_ipv6 is arista.avd.defined %} + ! + address-family ipv6 +{% if vrf.address_family_ipv6.bgp.missing_policy.direction_in_action is arista.avd.defined %} + bgp missing-policy direction in action {{ vrf.address_family_ipv6.bgp.missing_policy.direction_in_action }} +{% endif %} +{% if vrf.address_family_ipv6.bgp.missing_policy.direction_out_action is arista.avd.defined %} + bgp missing-policy direction out action {{ vrf.address_family_ipv6.bgp.missing_policy.direction_out_action }} +{% endif %} +{% if vrf.address_family_ipv6.bgp.additional_paths.install is arista.avd.defined(true) %} + bgp additional-paths install +{% elif vrf.address_family_ipv6.bgp.additional_paths.install_ecmp_primary is arista.avd.defined(true) %} + bgp additional-paths install ecmp-primary +{% endif %} +{% if vrf.address_family_ipv6.bgp.additional_paths.receive is arista.avd.defined(true) %} + bgp additional-paths receive +{% endif %} +{% if vrf.address_family_ipv6.bgp.additional_paths.send.any is arista.avd.defined(true) %} + bgp additional-paths send any +{% elif vrf.address_family_ipv6.bgp.additional_paths.send.backup is arista.avd.defined(true) %} + bgp additional-paths send backup +{% elif vrf.address_family_ipv6.bgp.additional_paths.send.ecmp is arista.avd.defined(true) %} + bgp additional-paths send ecmp +{% elif vrf.address_family_ipv6.bgp.additional_paths.send.ecmp_limit is arista.avd.defined %} + bgp additional-paths send ecmp limit {{ vrf.address_family_ipv6.bgp.additional_paths.send.ecmp_limit }} +{% elif vrf.address_family_ipv6.bgp.additional_paths.send.limit is arista.avd.defined %} + bgp additional-paths send limit {{ vrf.address_family_ipv6.bgp.additional_paths.send.limit }} +{% endif %} +{% for peer_group in vrf.address_family_ipv6.peer_groups | arista.avd.natural_sort('name') %} +{% if peer_group.activate is arista.avd.defined(true) %} + neighbor {{ peer_group.name }} activate +{% elif peer_group.activate is arista.avd.defined(false) %} + no neighbor {{ peer_group.name }} activate +{% endif %} +{% if peer_group.next_hop.address_family_ipv6_originate is arista.avd.defined(true) %} + neighbor {{ peer_group.name }} next-hop address-family ipv6 originate +{% endif %} +{% endfor %} +{% for neighbor in vrf.address_family_ipv6.neighbors | arista.avd.natural_sort('ip_address') %} +{% if neighbor.activate is arista.avd.defined(true) %} + neighbor {{ neighbor.ip_address }} activate +{% endif %} +{% if neighbor.route_map_in is arista.avd.defined %} + neighbor {{ neighbor.ip_address }} route-map {{ neighbor.route_map_in }} in +{% endif %} +{% if neighbor.route_map_out is arista.avd.defined %} + neighbor {{ neighbor.ip_address }} route-map {{ neighbor.route_map_out }} out +{% endif %} +{% endfor %} +{% for network in vrf.address_family_ipv6.networks | arista.avd.natural_sort('prefix') %} +{% set network_cli = "network " ~ network.prefix %} +{% if network.route_map is arista.avd.defined %} +{% set network_cli = network_cli ~ " route-map " ~ network.route_map %} +{% endif %} + {{ network_cli }} +{% endfor %} +{% endif %} +{% if vrf.address_family_ipv6_multicast is arista.avd.defined %} + ! + address-family ipv6 multicast +{% if vrf.address_family_ipv6_multicast.bgp.missing_policy.direction_in_action is arista.avd.defined %} + bgp missing-policy direction in action {{ vrf.address_family_ipv6_multicast.bgp.missing_policy.direction_in_action }} +{% endif %} +{% if vrf.address_family_ipv6_multicast.bgp.missing_policy.direction_out_action is arista.avd.defined %} + bgp missing-policy direction out action {{ vrf.address_family_ipv6_multicast.bgp.missing_policy.direction_out_action }} +{% endif %} +{% if vrf.address_family_ipv6_multicast.bgp.additional_paths.receive is arista.avd.defined(true) %} + bgp additional-paths receive +{% endif %} +{% for peer_group in vrf.address_family_ipv6_multicast.peer_groups | arista.avd.natural_sort('name') %} +{% if peer_group.activate is arista.avd.defined(true) %} + neighbor {{ peer_group.name }} activate +{% elif peer_group.activate is arista.avd.defined(false) %} + no neighbor {{ peer_group.name }} activate +{% endif %} +{% endfor %} +{% for neighbor in vrf.address_family_ipv6_multicast.neighbors | arista.avd.natural_sort('ip_address') %} +{% if neighbor.activate is arista.avd.defined(true) %} + neighbor {{ neighbor.ip_address }} activate +{% endif %} +{% if neighbor.route_map_in is arista.avd.defined %} + neighbor {{ neighbor.ip_address }} route-map {{ neighbor.route_map_in }} in +{% endif %} +{% if neighbor.route_map_out is arista.avd.defined %} + neighbor {{ neighbor.ip_address }} route-map {{ neighbor.route_map_out }} out +{% endif %} +{% endfor %} +{% for network in vrf.address_family_ipv6_multicast.networks | arista.avd.natural_sort('prefix') %} +{% set network_cli = "network " ~ network.prefix %} +{% if network.route_map is arista.avd.defined %} +{% set network_cli = network_cli ~ " route-map " ~ network.route_map %} +{% endif %} + {{ network_cli }} +{% endfor %} +{% endif %} +{% if vrf.address_family_flow_spec_ipv4 is arista.avd.defined %} + ! + address-family flow-spec ipv4 +{% if vrf.address_family_flow_spec_ipv4.bgp.missing_policy.direction_in_action is arista.avd.defined %} + bgp missing-policy direction in action {{ vrf.address_family_flow_spec_ipv4.bgp.missing_policy.direction_in_action }} +{% endif %} +{% if vrf.address_family_flow_spec_ipv4.bgp.missing_policy.direction_out_action is arista.avd.defined %} + bgp missing-policy direction out action {{ vrf.address_family_flow_spec_ipv4.bgp.missing_policy.direction_out_action }} +{% endif %} +{% for peer_group in vrf.address_family_flow_spec_ipv4.peer_groups | arista.avd.natural_sort('name') %} +{% if peer_group.activate is arista.avd.defined(true) %} + neighbor {{ peer_group.name }} activate +{% elif peer_group.activate is arista.avd.defined(false) %} + no neighbor {{ peer_group.name }} activate +{% endif %} +{% endfor %} +{% for neighbor in vrf.address_family_flow_spec_ipv4.neighbors | arista.avd.natural_sort('ip_address') %} +{% if neighbor.activate is arista.avd.defined(true) %} + neighbor {{ neighbor.ip_address }} activate +{% endif %} +{% endfor %} +{% endif %} +{% if vrf.address_family_flow_spec_ipv6 is arista.avd.defined %} + ! + address-family flow-spec ipv6 +{% if vrf.address_family_flow_spec_ipv6.bgp.missing_policy.direction_in_action is arista.avd.defined %} + bgp missing-policy direction in action {{ vrf.address_family_flow_spec_ipv6.bgp.missing_policy.direction_in_action }} +{% endif %} +{% if vrf.address_family_flow_spec_ipv6.bgp.missing_policy.direction_out_action is arista.avd.defined %} + bgp missing-policy direction out action {{ vrf.address_family_flow_spec_ipv6.bgp.missing_policy.direction_out_action }} +{% endif %} +{% for peer_group in vrf.address_family_flow_spec_ipv6.peer_groups | arista.avd.natural_sort('name') %} +{% if peer_group.activate is arista.avd.defined(true) %} + neighbor {{ peer_group.name }} activate +{% elif peer_group.activate is arista.avd.defined(false) %} + no neighbor {{ peer_group.name }} activate +{% endif %} +{% endfor %} +{% for neighbor in vrf.address_family_flow_spec_ipv6.neighbors | arista.avd.natural_sort('ip_address') %} +{% if neighbor.activate is arista.avd.defined(true) %} + neighbor {{ neighbor.ip_address }} activate +{% endif %} +{% endfor %} +{% endif %} {% for address_family in vrf.address_families | arista.avd.natural_sort('address_family') %} ! address-family {{ address_family.address_family }} From 2d70670928735b7e0b45a42598f2fa3a80ef9035 Mon Sep 17 00:00:00 2001 From: emilarista Date: Fri, 5 May 2023 11:59:53 +0200 Subject: [PATCH 4/9] added molecule coverage --- .../router-bgp-vrf-address-families.md | 126 ++++++++++++++++++ .../router-bgp-vrf-address-families.cfg | 82 ++++++++++++ .../host_vars/router-bgp-v4-evpn.yml | 51 ++++--- .../router-bgp-vrf-address-families.yml | 116 ++++++++++++++++ .../eos_cli_config_gen/inventory/hosts.ini | 1 + .../inventory/host_vars/host1/router-bgp.yml | 1 + .../templates/eos/router-bgp.j2 | 88 ++++++------ 7 files changed, 395 insertions(+), 70 deletions(-) create mode 100644 ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/router-bgp-vrf-address-families.md create mode 100644 ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/router-bgp-vrf-address-families.cfg create mode 100644 ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/router-bgp-vrf-address-families.yml diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/router-bgp-vrf-address-families.md b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/router-bgp-vrf-address-families.md new file mode 100644 index 00000000000..6b5785d4da2 --- /dev/null +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/router-bgp-vrf-address-families.md @@ -0,0 +1,126 @@ +# router-bgp-vrf-address-families + +## Table of Contents + +- [Management](#management) + - [Management Interfaces](#management-interfaces) +- [Routing](#routing) + - [Router BGP](#router-bgp) + +## Management + +### Management Interfaces + +#### Management Interfaces Summary + +##### IPv4 + +| Management Interface | description | Type | VRF | IP Address | Gateway | +| -------------------- | ----------- | ---- | --- | ---------- | ------- | +| Management1 | oob_management | oob | MGMT | 10.73.255.122/24 | 10.73.255.2 | + +##### IPv6 + +| Management Interface | description | Type | VRF | IPv6 Address | IPv6 Gateway | +| -------------------- | ----------- | ---- | --- | ------------ | ------------ | +| Management1 | oob_management | oob | MGMT | - | - | + +#### Management Interfaces Device Configuration + +```eos +! +interface Management1 + description oob_management + vrf MGMT + ip address 10.73.255.122/24 +``` + +## Routing + +### Router BGP + +#### Router BGP Summary + +| BGP AS | Router ID | +| ------ | --------- | +| 65001| 1.0.1.1 | + +#### Router BGP VRFs + +| VRF | Route-Distinguisher | Redistribute | +| --- | ------------------- | ------------ | +| VRF01 | - | - | +| VRF02 | - | - | +| VRF03 | - | - | + +#### Router BGP Device Configuration + +```eos +! +router bgp 65001 + router-id 1.0.1.1 + ! + vrf VRF01 + ! + address-family flow-spec ipv4 + bgp missing-policy direction in action permit + bgp missing-policy direction out action permit + neighbor 1.2.3.4 activate + ! + address-family flow-spec ipv6 + bgp missing-policy direction in action permit + bgp missing-policy direction out action deny + neighbor aa::1 activate + ! + address-family ipv4 + bgp missing-policy direction in action deny + bgp missing-policy direction out action permit + bgp additional-paths install ecmp-primary + bgp additional-paths receive + bgp additional-paths send ecmp limit 4 + neighbor FOOBAR activate + neighbor 1.2.3.4 activate + 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 + ! + address-family ipv4 multicast + bgp missing-policy direction in action permit + bgp missing-policy direction out action permit + bgp additional-paths receive + neighbor FOOBAR activate + neighbor 1.2.3.4 route-map FOO in + neighbor 1.2.3.4 route-map BAR out + network 239.0.0.0/24 route-map BARFOO + ! + address-family ipv6 + bgp missing-policy direction in action deny-in-out + bgp missing-policy direction out action deny-in-out + bgp additional-paths install + bgp additional-paths receive + bgp additional-paths send any + no neighbor FOOBAR activate + neighbor aa::1 activate + neighbor aa::1 route-map FOO in + neighbor aa::1 route-map BAR out + network aa::/64 + ! + address-family ipv6 multicast + bgp missing-policy direction in action deny + bgp missing-policy direction out action deny + no neighbor FOOBAR activate + network ff08:1::/64 + ! + vrf VRF02 + ! + address-family ipv4 + bgp additional-paths send backup + ! + address-family ipv6 + bgp additional-paths send limit 3 + ! + vrf VRF03 + ! + address-family ipv4 + bgp additional-paths send ecmp +``` diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/router-bgp-vrf-address-families.cfg b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/router-bgp-vrf-address-families.cfg new file mode 100644 index 00000000000..116045374dc --- /dev/null +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/router-bgp-vrf-address-families.cfg @@ -0,0 +1,82 @@ +!RANCID-CONTENT-TYPE: arista +! +transceiver qsfp default-mode 4x10G +! +hostname router-bgp-vrf-address-families +! +no enable password +no aaa root +! +interface Management1 + description oob_management + vrf MGMT + ip address 10.73.255.122/24 +! +router bgp 65001 + router-id 1.0.1.1 + ! + vrf VRF01 + ! + address-family flow-spec ipv4 + bgp missing-policy direction in action permit + bgp missing-policy direction out action permit + neighbor 1.2.3.4 activate + ! + address-family flow-spec ipv6 + bgp missing-policy direction in action permit + bgp missing-policy direction out action deny + neighbor aa::1 activate + ! + address-family ipv4 + bgp missing-policy direction in action deny + bgp missing-policy direction out action permit + bgp additional-paths install ecmp-primary + bgp additional-paths receive + bgp additional-paths send ecmp limit 4 + neighbor FOOBAR activate + neighbor 1.2.3.4 activate + 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 + ! + address-family ipv4 multicast + bgp missing-policy direction in action permit + bgp missing-policy direction out action permit + bgp additional-paths receive + neighbor FOOBAR activate + neighbor 1.2.3.4 route-map FOO in + neighbor 1.2.3.4 route-map BAR out + network 239.0.0.0/24 route-map BARFOO + ! + address-family ipv6 + bgp missing-policy direction in action deny-in-out + bgp missing-policy direction out action deny-in-out + bgp additional-paths install + bgp additional-paths receive + bgp additional-paths send any + no neighbor FOOBAR activate + neighbor aa::1 activate + neighbor aa::1 route-map FOO in + neighbor aa::1 route-map BAR out + network aa::/64 + ! + address-family ipv6 multicast + bgp missing-policy direction in action deny + bgp missing-policy direction out action deny + no neighbor FOOBAR activate + network ff08:1::/64 + ! + vrf VRF02 + ! + address-family ipv4 + bgp additional-paths send backup + ! + address-family ipv6 + bgp additional-paths send limit 3 + ! + vrf VRF03 + ! + address-family ipv4 + bgp additional-paths send ecmp +! +end diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/router-bgp-v4-evpn.yml b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/router-bgp-v4-evpn.yml index 3ced8200474..a4a6766c563 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/router-bgp-v4-evpn.yml +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/router-bgp-v4-evpn.yml @@ -152,32 +152,31 @@ router_bgp: always: true route_map: RM-10.2.3.4-SET-NEXT-HOP-OUT route_map_out: RM-10.2.3.4-SET-NEXT-HOP-OUT - address_families: - - address_family: ipv4 - bgp: - missing_policy: - direction_in_action: permit - direction_out_action: deny - additional_paths: - - install - - receive - - send ecmp - neighbors: - - ip_address: 10.2.3.4 - activate: true - route_map_out: RM-10.2.3.4-SET-NEXT-HOP-OUT - - ip_address: 10.2.3.5 - activate: true - route_map_in: RM-10.2.3.5-SET-NEXT-HOP-IN - networks: - - prefix: 10.0.0.0/8 - - prefix: 100.64.0.0/10 - route_map: RM-10.2.3.4 - peer_groups: - - name: TEST_PEER_GRP - activate: true - next_hop: - address_family_ipv6_originate: true + address_family_ipv4: + bgp: + missing_policy: + direction_in_action: permit + direction_out_action: deny + additional_paths: + - install + - receive + - send ecmp + neighbors: + - ip_address: 10.2.3.4 + activate: true + route_map_out: RM-10.2.3.4-SET-NEXT-HOP-OUT + - ip_address: 10.2.3.5 + activate: true + route_map_in: RM-10.2.3.5-SET-NEXT-HOP-IN + networks: + - prefix: 10.0.0.0/8 + - prefix: 100.64.0.0/10 + route_map: RM-10.2.3.4 + peer_groups: + - name: TEST_PEER_GRP + activate: true + next_hop: + address_family_ipv6_originate: true redistribute_routes: - source_protocol: connected - source_protocol: static diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/router-bgp-vrf-address-families.yml b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/router-bgp-vrf-address-families.yml new file mode 100644 index 00000000000..03dbfb9258f --- /dev/null +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/router-bgp-vrf-address-families.yml @@ -0,0 +1,116 @@ +router_bgp: + as: 65001 + router_id: 1.0.1.1 + vrfs: + - name: VRF01 + address_family_ipv4: + bgp: + missing_policy: + direction_in_action: deny + direction_out_action: permit + additional_paths: + install_ecmp_primary: true + receive: true + send: + ecmp_limit: 4 + neighbors: + - ip_address: 1.2.3.4 + activate: true + route_map_in: FOO + route_map_out: BAR + peer_groups: + - name: FOOBAR + activate: true + next_hop: + address_family_ipv6: + enabled: true + originate: true + networks: + - prefix: 2.3.4.0/24 + route_map: BARFOO + address_family_ipv6: + bgp: + missing_policy: + direction_in_action: deny-in-out + direction_out_action: deny-in-out + additional_paths: + install: true + receive: true + send: + any: true + neighbors: + - ip_address: aa::1 + activate: true + route_map_in: FOO + route_map_out: BAR + peer_groups: + - name: FOOBAR + activate: false + networks: + - prefix: aa::/64 + address_family_ipv4_multicast: + bgp: + missing_policy: + direction_in_action: permit + direction_out_action: permit + additional_paths: + receive: true + neighbors: + - ip_address: 1.2.3.4 + activate: false + route_map_in: FOO + route_map_out: BAR + peer_groups: + - name: FOOBAR + activate: true + networks: + - prefix: 239.0.0.0/24 + route_map: BARFOO + address_family_ipv6_multicast: + bgp: + missing_policy: + direction_in_action: deny + direction_out_action: deny + neighbors: + - ip_address: aa::1 + activate: false + peer_groups: + - name: FOOBAR + activate: false + networks: + - prefix: ff08:1::/64 + address_family_flow_spec_ipv4: + bgp: + missing_policy: + direction_in_action: permit + direction_out_action: permit + neighbors: + - ip_address: 1.2.3.4 + activate: true + address_family_flow_spec_ipv6: + bgp: + missing_policy: + direction_in_action: permit + direction_out_action: deny + neighbors: + - ip_address: aa::1 + activate: true + + - name: VRF02 + address_family_ipv4: + bgp: + additional_paths: + send: + backup: true + address_family_ipv6: + bgp: + additional_paths: + send: + limit: 3 + + - name: VRF03 + address_family_ipv4: + bgp: + additional_paths: + send: + ecmp: true diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/hosts.ini b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/hosts.ini index 9843b143d80..777c6b91dad 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/hosts.ini +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/hosts.ini @@ -111,6 +111,7 @@ router-bgp-v4-evpn router-bgp-v4-v6-evpn router-bgp-vpn-ipv4-vpn-ipv6 router-bgp-vpws +router-bgp-vrf-address-families router-bgp-vrf-lite router-general router-isis diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen_deprecated_vars/inventory/host_vars/host1/router-bgp.yml b/ansible_collections/arista/avd/molecule/eos_cli_config_gen_deprecated_vars/inventory/host_vars/host1/router-bgp.yml index 148fc6aac8c..db2095784de 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen_deprecated_vars/inventory/host_vars/host1/router-bgp.yml +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen_deprecated_vars/inventory/host_vars/host1/router-bgp.yml @@ -158,6 +158,7 @@ router_bgp: remote_as: 1 # Testing address_families as dict of dict # Dict type is deprecated in 4.0.0. To be removed in 5.0.0 + # address_families format itself deprecated in 4.0.0. To be removed in 5.0.0. address_families: ipv4: # Testing neighbors as dict of dict 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 e2c09b3acde..806c9a7589c 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 @@ -1048,6 +1048,50 @@ router bgp {{ router_bgp.as }} {{ redistribute_route_cli }} {% endif %} {% endfor %} +{% if vrf.address_family_flow_spec_ipv4 is arista.avd.defined %} + ! + address-family flow-spec ipv4 +{% if vrf.address_family_flow_spec_ipv4.bgp.missing_policy.direction_in_action is arista.avd.defined %} + bgp missing-policy direction in action {{ vrf.address_family_flow_spec_ipv4.bgp.missing_policy.direction_in_action }} +{% endif %} +{% if vrf.address_family_flow_spec_ipv4.bgp.missing_policy.direction_out_action is arista.avd.defined %} + bgp missing-policy direction out action {{ vrf.address_family_flow_spec_ipv4.bgp.missing_policy.direction_out_action }} +{% endif %} +{% for peer_group in vrf.address_family_flow_spec_ipv4.peer_groups | arista.avd.natural_sort('name') %} +{% if peer_group.activate is arista.avd.defined(true) %} + neighbor {{ peer_group.name }} activate +{% elif peer_group.activate is arista.avd.defined(false) %} + no neighbor {{ peer_group.name }} activate +{% endif %} +{% endfor %} +{% for neighbor in vrf.address_family_flow_spec_ipv4.neighbors | arista.avd.natural_sort('ip_address') %} +{% if neighbor.activate is arista.avd.defined(true) %} + neighbor {{ neighbor.ip_address }} activate +{% endif %} +{% endfor %} +{% endif %} +{% if vrf.address_family_flow_spec_ipv6 is arista.avd.defined %} + ! + address-family flow-spec ipv6 +{% if vrf.address_family_flow_spec_ipv6.bgp.missing_policy.direction_in_action is arista.avd.defined %} + bgp missing-policy direction in action {{ vrf.address_family_flow_spec_ipv6.bgp.missing_policy.direction_in_action }} +{% endif %} +{% if vrf.address_family_flow_spec_ipv6.bgp.missing_policy.direction_out_action is arista.avd.defined %} + bgp missing-policy direction out action {{ vrf.address_family_flow_spec_ipv6.bgp.missing_policy.direction_out_action }} +{% endif %} +{% for peer_group in vrf.address_family_flow_spec_ipv6.peer_groups | arista.avd.natural_sort('name') %} +{% if peer_group.activate is arista.avd.defined(true) %} + neighbor {{ peer_group.name }} activate +{% elif peer_group.activate is arista.avd.defined(false) %} + no neighbor {{ peer_group.name }} activate +{% endif %} +{% endfor %} +{% for neighbor in vrf.address_family_flow_spec_ipv6.neighbors | arista.avd.natural_sort('ip_address') %} +{% if neighbor.activate is arista.avd.defined(true) %} + neighbor {{ neighbor.ip_address }} activate +{% endif %} +{% endfor %} +{% endif %} {% if vrf.address_family_ipv4 is arista.avd.defined %} ! address-family ipv4 @@ -1238,50 +1282,6 @@ router bgp {{ router_bgp.as }} {{ network_cli }} {% endfor %} {% endif %} -{% if vrf.address_family_flow_spec_ipv4 is arista.avd.defined %} - ! - address-family flow-spec ipv4 -{% if vrf.address_family_flow_spec_ipv4.bgp.missing_policy.direction_in_action is arista.avd.defined %} - bgp missing-policy direction in action {{ vrf.address_family_flow_spec_ipv4.bgp.missing_policy.direction_in_action }} -{% endif %} -{% if vrf.address_family_flow_spec_ipv4.bgp.missing_policy.direction_out_action is arista.avd.defined %} - bgp missing-policy direction out action {{ vrf.address_family_flow_spec_ipv4.bgp.missing_policy.direction_out_action }} -{% endif %} -{% for peer_group in vrf.address_family_flow_spec_ipv4.peer_groups | arista.avd.natural_sort('name') %} -{% if peer_group.activate is arista.avd.defined(true) %} - neighbor {{ peer_group.name }} activate -{% elif peer_group.activate is arista.avd.defined(false) %} - no neighbor {{ peer_group.name }} activate -{% endif %} -{% endfor %} -{% for neighbor in vrf.address_family_flow_spec_ipv4.neighbors | arista.avd.natural_sort('ip_address') %} -{% if neighbor.activate is arista.avd.defined(true) %} - neighbor {{ neighbor.ip_address }} activate -{% endif %} -{% endfor %} -{% endif %} -{% if vrf.address_family_flow_spec_ipv6 is arista.avd.defined %} - ! - address-family flow-spec ipv6 -{% if vrf.address_family_flow_spec_ipv6.bgp.missing_policy.direction_in_action is arista.avd.defined %} - bgp missing-policy direction in action {{ vrf.address_family_flow_spec_ipv6.bgp.missing_policy.direction_in_action }} -{% endif %} -{% if vrf.address_family_flow_spec_ipv6.bgp.missing_policy.direction_out_action is arista.avd.defined %} - bgp missing-policy direction out action {{ vrf.address_family_flow_spec_ipv6.bgp.missing_policy.direction_out_action }} -{% endif %} -{% for peer_group in vrf.address_family_flow_spec_ipv6.peer_groups | arista.avd.natural_sort('name') %} -{% if peer_group.activate is arista.avd.defined(true) %} - neighbor {{ peer_group.name }} activate -{% elif peer_group.activate is arista.avd.defined(false) %} - no neighbor {{ peer_group.name }} activate -{% endif %} -{% endfor %} -{% for neighbor in vrf.address_family_flow_spec_ipv6.neighbors | arista.avd.natural_sort('ip_address') %} -{% if neighbor.activate is arista.avd.defined(true) %} - neighbor {{ neighbor.ip_address }} activate -{% endif %} -{% endfor %} -{% endif %} {% for address_family in vrf.address_families | arista.avd.natural_sort('address_family') %} ! address-family {{ address_family.address_family }} From 2995d2576c82108d9bc0636bd7e3904960843dcd Mon Sep 17 00:00:00 2001 From: emilarista Date: Tue, 9 May 2023 12:39:21 +0200 Subject: [PATCH 5/9] update templates, update molecule, refresh facts --- .../host_vars/router-bgp-v4-evpn.yml | 11 +++++--- .../structured_configs/SITE1-LER2.yml | 3 +-- .../structured_configs/SITE2-LER1.yml | 3 +-- .../intended/structured_configs/DC1-BL1A.yml | 5 ++-- .../intended/structured_configs/DC1-BL1B.yml | 5 ++-- .../intended/structured_configs/DC1-BL2A.yml | 3 +-- .../intended/structured_configs/DC1-BL2B.yml | 5 ++-- .../intended/structured_configs/DC1-BL1A.yml | 5 ++-- .../intended/structured_configs/DC1-BL1B.yml | 5 ++-- .../intended/structured_configs/DC1-BL1A.yml | 5 ++-- .../intended/structured_configs/DC1-BL1B.yml | 5 ++-- .../intended/structured_configs/DC1-BL1A.yml | 5 ++-- .../intended/structured_configs/DC1-BL1B.yml | 5 ++-- .../templates/eos/router-bgp.j2 | 8 ++++-- .../network_services/router_bgp.py | 27 ++++++++++++------- 15 files changed, 52 insertions(+), 48 deletions(-) diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/router-bgp-v4-evpn.yml b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/router-bgp-v4-evpn.yml index a4a6766c563..4a36d3e5869 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/router-bgp-v4-evpn.yml +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/router-bgp-v4-evpn.yml @@ -158,9 +158,10 @@ router_bgp: direction_in_action: permit direction_out_action: deny additional_paths: - - install - - receive - - send ecmp + install: true + receive: true + send: + ecmp: true neighbors: - ip_address: 10.2.3.4 activate: true @@ -176,7 +177,9 @@ router_bgp: - name: TEST_PEER_GRP activate: true next_hop: - address_family_ipv6_originate: true + address_family_ipv6: + enabled: true + originate: true redistribute_routes: - source_protocol: connected - source_protocol: static diff --git a/ansible_collections/arista/avd/molecule/eos_designs-mpls-isis-sr-ldp/intended/structured_configs/SITE1-LER2.yml b/ansible_collections/arista/avd/molecule/eos_designs-mpls-isis-sr-ldp/intended/structured_configs/SITE1-LER2.yml index a829b19d6b4..19d4aeea5f0 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs-mpls-isis-sr-ldp/intended/structured_configs/SITE1-LER2.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs-mpls-isis-sr-ldp/intended/structured_configs/SITE1-LER2.yml @@ -86,8 +86,7 @@ router_bgp: description: TENANT_B_CPE_SITE3 password: toZKiUFLVUTU4hdS5V8F4Q== remote_as: '65201' - address_families: - - address_family: ipv4 + address_family_ipv4: neighbors: - ip_address: 192.168.48.1 activate: true diff --git a/ansible_collections/arista/avd/molecule/eos_designs-mpls-isis-sr-ldp/intended/structured_configs/SITE2-LER1.yml b/ansible_collections/arista/avd/molecule/eos_designs-mpls-isis-sr-ldp/intended/structured_configs/SITE2-LER1.yml index aee1d65322c..a3ab890f3af 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs-mpls-isis-sr-ldp/intended/structured_configs/SITE2-LER1.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs-mpls-isis-sr-ldp/intended/structured_configs/SITE2-LER1.yml @@ -88,8 +88,7 @@ router_bgp: description: TENANT_B_CPE_SITE5 password: OajzUG59/YF0NkgvOQyRnQ== remote_as: '65202' - address_families: - - address_family: ipv4 + address_family_ipv4: neighbors: - ip_address: 192.168.48.3 activate: true diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/DC1-BL1A.yml b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/DC1-BL1A.yml index 62b15fe8311..358501cef10 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/DC1-BL1A.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/DC1-BL1A.yml @@ -170,14 +170,13 @@ router_bgp: route_map_out: RM-Tenant_A_WAN_Zone-fd5a:fe45:8831:06c5::a-SET-NEXT-HOP-OUT - ip_address: fd5a:fe45:8831:06c5::b remote_as: '12345' - address_families: - - address_family: ipv4 + address_family_ipv4: neighbors: - ip_address: 123.1.1.10 activate: true - ip_address: 123.1.1.11 activate: true - - address_family: ipv6 + address_family_ipv6: neighbors: - ip_address: fd5a:fe45:8831:06c5::a activate: true diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/DC1-BL1B.yml b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/DC1-BL1B.yml index ebba6b0edae..530dd35e1bf 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/DC1-BL1B.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/DC1-BL1B.yml @@ -174,14 +174,13 @@ router_bgp: route_map_out: RM-Tenant_A_WAN_Zone-fd5a:fe45:8831:06c5::a-SET-NEXT-HOP-OUT - ip_address: fd5a:fe45:8831:06c5::b remote_as: '12345' - address_families: - - address_family: ipv4 + address_family_ipv4: neighbors: - ip_address: 123.1.1.10 activate: true - ip_address: 123.1.1.11 activate: true - - address_family: ipv6 + address_family_ipv6: neighbors: - ip_address: fd5a:fe45:8831:06c5::a activate: true diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/DC1-BL2A.yml b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/DC1-BL2A.yml index 1ec618ac245..c6d4cf84e66 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/DC1-BL2A.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/DC1-BL2A.yml @@ -197,8 +197,7 @@ router_bgp: - ip_address: 2.2.2.3 peer_group: Tenant_C_BGP_PEER_GROUP2 description: test_bgp_peer_group_without_nodes_2nd_time - address_families: - - address_family: ipv4 + address_family_ipv4: neighbors: - ip_address: 2.2.2.2 activate: true diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/DC1-BL2B.yml b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/DC1-BL2B.yml index b2e7bc48fd6..6bbac4fb358 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/DC1-BL2B.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/DC1-BL2B.yml @@ -194,12 +194,11 @@ router_bgp: - ip_address: BEBA::C0CA:C07A peer_group: Tenant_C_WAN_Zone_BGP_PEER_GROUP description: test_ipv6 - address_families: - - address_family: ipv4 + address_family_ipv4: neighbors: - ip_address: 1.1.1.1 activate: true - - address_family: ipv6 + address_family_ipv6: neighbors: - ip_address: BEBA::C0CA:C07A activate: true diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests_v4.0/intended/structured_configs/DC1-BL1A.yml b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests_v4.0/intended/structured_configs/DC1-BL1A.yml index 3225d58f7a0..7fa29e758e4 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests_v4.0/intended/structured_configs/DC1-BL1A.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests_v4.0/intended/structured_configs/DC1-BL1A.yml @@ -150,14 +150,13 @@ router_bgp: route_map_out: RM-Tenant_A_WAN_Zone-fd5a:fe45:8831:06c5::a-SET-NEXT-HOP-OUT - ip_address: fd5a:fe45:8831:06c5::b remote_as: '12345' - address_families: - - address_family: ipv4 + address_family_ipv4: neighbors: - ip_address: 123.1.1.10 activate: true - ip_address: 123.1.1.11 activate: true - - address_family: ipv6 + address_family_ipv6: neighbors: - ip_address: fd5a:fe45:8831:06c5::a activate: true diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests_v4.0/intended/structured_configs/DC1-BL1B.yml b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests_v4.0/intended/structured_configs/DC1-BL1B.yml index 2183ab86466..9e36360e922 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests_v4.0/intended/structured_configs/DC1-BL1B.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests_v4.0/intended/structured_configs/DC1-BL1B.yml @@ -150,14 +150,13 @@ router_bgp: route_map_out: RM-Tenant_A_WAN_Zone-fd5a:fe45:8831:06c5::a-SET-NEXT-HOP-OUT - ip_address: fd5a:fe45:8831:06c5::b remote_as: '12345' - address_families: - - address_family: ipv4 + address_family_ipv4: neighbors: - ip_address: 123.1.1.10 activate: true - ip_address: 123.1.1.11 activate: true - - address_family: ipv6 + address_family_ipv6: neighbors: - ip_address: fd5a:fe45:8831:06c5::a activate: true diff --git a/ansible_collections/arista/avd/molecule/evpn_underlay_ebgp_overlay_ebgp/intended/structured_configs/DC1-BL1A.yml b/ansible_collections/arista/avd/molecule/evpn_underlay_ebgp_overlay_ebgp/intended/structured_configs/DC1-BL1A.yml index 42a037aa6ac..6ff0da643ba 100644 --- a/ansible_collections/arista/avd/molecule/evpn_underlay_ebgp_overlay_ebgp/intended/structured_configs/DC1-BL1A.yml +++ b/ansible_collections/arista/avd/molecule/evpn_underlay_ebgp_overlay_ebgp/intended/structured_configs/DC1-BL1A.yml @@ -127,14 +127,13 @@ router_bgp: route_map_out: RM-Tenant_A_WAN_Zone-fd5a:fe45:8831:06c5::a-SET-NEXT-HOP-OUT - ip_address: fd5a:fe45:8831:06c5::b remote_as: '12345' - address_families: - - address_family: ipv4 + address_family_ipv4: neighbors: - ip_address: 123.1.1.10 activate: true - ip_address: 123.1.1.11 activate: true - - address_family: ipv6 + address_family_ipv6: neighbors: - ip_address: fd5a:fe45:8831:06c5::a activate: true diff --git a/ansible_collections/arista/avd/molecule/evpn_underlay_ebgp_overlay_ebgp/intended/structured_configs/DC1-BL1B.yml b/ansible_collections/arista/avd/molecule/evpn_underlay_ebgp_overlay_ebgp/intended/structured_configs/DC1-BL1B.yml index e98a744f12b..813480fc37d 100644 --- a/ansible_collections/arista/avd/molecule/evpn_underlay_ebgp_overlay_ebgp/intended/structured_configs/DC1-BL1B.yml +++ b/ansible_collections/arista/avd/molecule/evpn_underlay_ebgp_overlay_ebgp/intended/structured_configs/DC1-BL1B.yml @@ -127,14 +127,13 @@ router_bgp: route_map_out: RM-Tenant_A_WAN_Zone-fd5a:fe45:8831:06c5::a-SET-NEXT-HOP-OUT - ip_address: fd5a:fe45:8831:06c5::b remote_as: '12345' - address_families: - - address_family: ipv4 + address_family_ipv4: neighbors: - ip_address: 123.1.1.10 activate: true - ip_address: 123.1.1.11 activate: true - - address_family: ipv6 + address_family_ipv6: neighbors: - ip_address: fd5a:fe45:8831:06c5::a activate: true diff --git a/ansible_collections/arista/avd/molecule/evpn_underlay_rfc5549_overlay_ebgp/intended/structured_configs/DC1-BL1A.yml b/ansible_collections/arista/avd/molecule/evpn_underlay_rfc5549_overlay_ebgp/intended/structured_configs/DC1-BL1A.yml index a8b1371ce31..514e4389129 100644 --- a/ansible_collections/arista/avd/molecule/evpn_underlay_rfc5549_overlay_ebgp/intended/structured_configs/DC1-BL1A.yml +++ b/ansible_collections/arista/avd/molecule/evpn_underlay_rfc5549_overlay_ebgp/intended/structured_configs/DC1-BL1A.yml @@ -115,12 +115,11 @@ router_bgp: route_map_out: RM-Tenant_A_WAN_Zone-fd5a:fe45:8831:06c5::a-SET-NEXT-HOP-OUT - ip_address: fd5a:fe45:8831:06c5::b remote_as: '12345' - address_families: - - address_family: ipv4 + address_family_ipv4: neighbors: - ip_address: 123.1.1.10 activate: true - - address_family: ipv6 + address_family_ipv6: neighbors: - ip_address: fd5a:fe45:8831:06c5::a activate: true diff --git a/ansible_collections/arista/avd/molecule/evpn_underlay_rfc5549_overlay_ebgp/intended/structured_configs/DC1-BL1B.yml b/ansible_collections/arista/avd/molecule/evpn_underlay_rfc5549_overlay_ebgp/intended/structured_configs/DC1-BL1B.yml index 12bd6db3d73..cf70df5d416 100644 --- a/ansible_collections/arista/avd/molecule/evpn_underlay_rfc5549_overlay_ebgp/intended/structured_configs/DC1-BL1B.yml +++ b/ansible_collections/arista/avd/molecule/evpn_underlay_rfc5549_overlay_ebgp/intended/structured_configs/DC1-BL1B.yml @@ -115,12 +115,11 @@ router_bgp: route_map_out: RM-Tenant_A_WAN_Zone-fd5a:fe45:8831:06c5::a-SET-NEXT-HOP-OUT - ip_address: fd5a:fe45:8831:06c5::b remote_as: '12345' - address_families: - - address_family: ipv4 + address_family_ipv4: neighbors: - ip_address: 123.1.1.10 activate: true - - address_family: ipv6 + address_family_ipv6: neighbors: - ip_address: fd5a:fe45:8831:06c5::a activate: true 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 806c9a7589c..466fba093db 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 @@ -1126,8 +1126,12 @@ router bgp {{ router_bgp.as }} {% elif peer_group.activate is arista.avd.defined(false) %} no neighbor {{ peer_group.name }} activate {% endif %} -{% if peer_group.next_hop.address_family_ipv6_originate is arista.avd.defined(true) %} - neighbor {{ peer_group.name }} next-hop address-family ipv6 originate +{% if peer_group.next_hop.address_family_ipv6.enabled is arista.avd.defined(true) %} +{% set ipv6_originate_cli = "neighbor " ~ peer_group.name ~ " next-hop address-family ipv6" %} +{% if peer_group.next_hop.address_family_ipv6.originate is arista.avd.defined(true) %} +{% set ipv6_originate_cli = ipv6_originate_cli ~ " originate" %} +{% endif %} + {{ ipv6_originate_cli }} {% endif %} {% endfor %} {% for neighbor in vrf.address_family_ipv4.neighbors | arista.avd.natural_sort('ip_address') %} diff --git a/ansible_collections/arista/avd/roles/eos_designs/python_modules/network_services/router_bgp.py b/ansible_collections/arista/avd/roles/eos_designs/python_modules/network_services/router_bgp.py index 88f8751dd8e..b2752b33b1f 100644 --- a/ansible_collections/arista/avd/roles/eos_designs/python_modules/network_services/router_bgp.py +++ b/ansible_collections/arista/avd/roles/eos_designs/python_modules/network_services/router_bgp.py @@ -215,16 +215,23 @@ def _router_bgp_vrfs(self) -> list | None: {"ip_address": ip_address, "peer_group": self.shared_utils.bgp_peer_groups["mlag_ipv4_underlay_peer"]["name"]} ) - address_families = [] + # address_families = [] + # New stuff + new_address_families = {} for bgp_peer in vrf["bgp_peers"]: peer_ip = bgp_peer.pop("ip_address") - address_family = f"ipv{ipaddress.ip_address(peer_ip).version}" - + # address_family = f"ipv{ipaddress.ip_address(peer_ip).version}" + # New stuff + new_address_family = f"address_family_ipv{ipaddress.ip_address(peer_ip).version}" + if new_address_family not in new_address_families: + new_address_families[new_address_family] = {"neighbors": []} neighbor = {"ip_address": peer_ip, "activate": True} - if (af := get_item(address_families, "address_family", address_family)) is None: - address_families.append({"address_family": address_family, "neighbors": [neighbor]}) - else: - af["neighbors"].append(neighbor) + new_address_families[new_address_family]["neighbors"].append(neighbor) + + # if (af := get_item(address_families, "address_family", address_family)) is None: + # address_families.append({"address_family": address_family, "neighbors": [neighbor]}) + # else: + # af["neighbors"].append(neighbor) if bgp_peer.get("set_ipv4_next_hop") is not None or bgp_peer.get("set_ipv6_next_hop") is not None: route_map = f"RM-{vrf_name}-{peer_ip}-SET-NEXT-HOP-OUT" @@ -249,8 +256,10 @@ def _router_bgp_vrfs(self) -> list | None: ): bgp_vrf["redistribute_routes"].append({"source_protocol": "ospf"}) - if address_families: - bgp_vrf["address_families"] = address_families + # if address_families: + # bgp_vrf["address_families"] = address_families + if new_address_families: + bgp_vrf.update(new_address_families) if (evpn_multicast_transit_mode := get(vrf, "_evpn_l3_multicast_evpn_peg_transit")) is True: bgp_vrf["evpn_multicast_address_family"] = {"ipv4": {"transit": evpn_multicast_transit_mode}} From faa276536ee2a7354133c11aed2b6fcfe4680154 Mon Sep 17 00:00:00 2001 From: emilarista Date: Tue, 9 May 2023 13:38:54 +0200 Subject: [PATCH 6/9] cleaned up module --- .../network_services/router_bgp.py | 25 ++++++------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/ansible_collections/arista/avd/roles/eos_designs/python_modules/network_services/router_bgp.py b/ansible_collections/arista/avd/roles/eos_designs/python_modules/network_services/router_bgp.py index b2752b33b1f..ea3057a787b 100644 --- a/ansible_collections/arista/avd/roles/eos_designs/python_modules/network_services/router_bgp.py +++ b/ansible_collections/arista/avd/roles/eos_designs/python_modules/network_services/router_bgp.py @@ -215,23 +215,16 @@ def _router_bgp_vrfs(self) -> list | None: {"ip_address": ip_address, "peer_group": self.shared_utils.bgp_peer_groups["mlag_ipv4_underlay_peer"]["name"]} ) - # address_families = [] - # New stuff - new_address_families = {} + address_families = {} for bgp_peer in vrf["bgp_peers"]: peer_ip = bgp_peer.pop("ip_address") - # address_family = f"ipv{ipaddress.ip_address(peer_ip).version}" - # New stuff - new_address_family = f"address_family_ipv{ipaddress.ip_address(peer_ip).version}" - if new_address_family not in new_address_families: - new_address_families[new_address_family] = {"neighbors": []} + address_family = f"address_family_ipv{ipaddress.ip_address(peer_ip).version}" neighbor = {"ip_address": peer_ip, "activate": True} - new_address_families[new_address_family]["neighbors"].append(neighbor) - # if (af := get_item(address_families, "address_family", address_family)) is None: - # address_families.append({"address_family": address_family, "neighbors": [neighbor]}) - # else: - # af["neighbors"].append(neighbor) + if address_family not in address_families: + address_families[address_family] = {"neighbors": [neighbor]} + else: + address_families[address_family]["neighbors"].append(neighbor) if bgp_peer.get("set_ipv4_next_hop") is not None or bgp_peer.get("set_ipv6_next_hop") is not None: route_map = f"RM-{vrf_name}-{peer_ip}-SET-NEXT-HOP-OUT" @@ -256,10 +249,8 @@ def _router_bgp_vrfs(self) -> list | None: ): bgp_vrf["redistribute_routes"].append({"source_protocol": "ospf"}) - # if address_families: - # bgp_vrf["address_families"] = address_families - if new_address_families: - bgp_vrf.update(new_address_families) + if address_families: + bgp_vrf.update(address_families) if (evpn_multicast_transit_mode := get(vrf, "_evpn_l3_multicast_evpn_peg_transit")) is True: bgp_vrf["evpn_multicast_address_family"] = {"ipv4": {"transit": evpn_multicast_transit_mode}} From 9454ea819d43ccce23b1c468a980d48a6cb5e7c6 Mon Sep 17 00:00:00 2001 From: emilarista Date: Fri, 12 May 2023 11:57:26 +0200 Subject: [PATCH 7/9] clean up template and schema --- .../documentation/devices/router-bgp-vrf-address-families.md | 1 + .../intended/configs/router-bgp-vrf-address-families.cfg | 1 + .../avd/roles/eos_cli_config_gen/docs/data_model/Routing.md | 2 +- .../eos_cli_config_gen/schemas/eos_cli_config_gen.schema.yml | 2 +- .../schemas/schema_fragments/router_bgp.schema.yml | 2 +- .../avd/roles/eos_cli_config_gen/templates/eos/router-bgp.j2 | 3 --- 6 files changed, 5 insertions(+), 6 deletions(-) diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/router-bgp-vrf-address-families.md b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/router-bgp-vrf-address-families.md index 6b5785d4da2..0edc0e3b90e 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/router-bgp-vrf-address-families.md +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/router-bgp-vrf-address-families.md @@ -79,6 +79,7 @@ router bgp 65001 bgp additional-paths receive bgp additional-paths send ecmp limit 4 neighbor FOOBAR activate + neighbor FOOBAR next-hop address-family ipv6 originate neighbor 1.2.3.4 activate neighbor 1.2.3.4 route-map FOO in neighbor 1.2.3.4 route-map BAR out diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/router-bgp-vrf-address-families.cfg b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/router-bgp-vrf-address-families.cfg index 116045374dc..3525b624653 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/router-bgp-vrf-address-families.cfg +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/router-bgp-vrf-address-families.cfg @@ -34,6 +34,7 @@ router bgp 65001 bgp additional-paths receive bgp additional-paths send ecmp limit 4 neighbor FOOBAR activate + neighbor FOOBAR next-hop address-family ipv6 originate neighbor 1.2.3.4 activate neighbor 1.2.3.4 route-map FOO in neighbor 1.2.3.4 route-map BAR out diff --git a/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/data_model/Routing.md b/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/data_model/Routing.md index 3d7feb8a0ff..e041cf34168 100644 --- a/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/data_model/Routing.md +++ b/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/data_model/Routing.md @@ -698,7 +698,7 @@ MAC address (hh:hh:hh:hh:hh:hh) | [        neighbors](## "router_bgp.vrfs.[].address_family_flow_spec_ipv6.neighbors") | List, items: Dictionary | | | | | | [          - ip_address](## "router_bgp.vrfs.[].address_family_flow_spec_ipv6.neighbors.[].ip_address") | String | Required, Unique | | | | | [            activate](## "router_bgp.vrfs.[].address_family_flow_spec_ipv6.neighbors.[].activate") | Boolean | | | | | - | [      address_families](## "router_bgp.vrfs.[].address_families") deprecated | List, items: Dictionary | | | | This key is deprecated. Support will be removed in AVD version v5.0.0. Use address_family_ipv4/address_family_ipv6 instead. | + | [      address_families](## "router_bgp.vrfs.[].address_families") deprecated | List, items: Dictionary | | | | This key is deprecated. Support will be removed in AVD version v5.0.0. Use address_family_* instead. | | [        - address_family](## "router_bgp.vrfs.[].address_families.[].address_family") | String | Required, Unique | | | | | [          bgp](## "router_bgp.vrfs.[].address_families.[].bgp") | Dictionary | | | | | | [            missing_policy](## "router_bgp.vrfs.[].address_families.[].bgp.missing_policy") | Dictionary | | | | | 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 f713606c48a..3a6a10a2ec7 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 @@ -8903,7 +8903,7 @@ keys: - dict deprecation: warning: true - new_key: address_family_ipv4/address_family_ipv6 + new_key: address_family_* remove_in_version: v5.0.0 items: type: dict 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 e1afe84947b..418d3ed891d 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 @@ -1892,7 +1892,7 @@ keys: - dict deprecation: warning: true - new_key: address_family_ipv4/address_family_ipv6 + new_key: address_family_* remove_in_version: v5.0.0 items: type: dict 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 466fba093db..ae56b5269bf 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 @@ -1225,9 +1225,6 @@ router bgp {{ router_bgp.as }} {% elif peer_group.activate is arista.avd.defined(false) %} no neighbor {{ peer_group.name }} activate {% endif %} -{% if peer_group.next_hop.address_family_ipv6_originate is arista.avd.defined(true) %} - neighbor {{ peer_group.name }} next-hop address-family ipv6 originate -{% endif %} {% endfor %} {% for neighbor in vrf.address_family_ipv6.neighbors | arista.avd.natural_sort('ip_address') %} {% if neighbor.activate is arista.avd.defined(true) %} From 8ca4c3ae30cdf067e66d3b4e2452a9c5ca1867e7 Mon Sep 17 00:00:00 2001 From: emilarista Date: Fri, 12 May 2023 15:15:21 +0200 Subject: [PATCH 8/9] add notes to release notes and porting guide for data models --- .../arista/avd/docs/porting-guides/4.x.x.md | 62 +++++++++++++++++++ .../arista/avd/docs/release-notes/4.x.x.md | 8 +++ 2 files changed, 70 insertions(+) diff --git a/ansible_collections/arista/avd/docs/porting-guides/4.x.x.md b/ansible_collections/arista/avd/docs/porting-guides/4.x.x.md index ca67db042aa..5787f7fb3f9 100644 --- a/ansible_collections/arista/avd/docs/porting-guides/4.x.x.md +++ b/ansible_collections/arista/avd/docs/porting-guides/4.x.x.md @@ -292,6 +292,68 @@ vlan_interfaces: The change has been incorporated into `eos_designs` so action is only required when defining `structured_configuration` directly. +### New data model for `address_families` under `router_bgp.vrfs` + +An improved data model for address family configuration under `router_bgp.vrfs` has been added containing discrete models for the different address families, along with better subkeys for `bgp additional-paths` configuration options. A new key was added for `router_bgp.vrfs[].address_family_ipv4.peer_groups[].next_hop.address_family_ipv6.enabled` to configure the `neighbor next-hop address-family ipv6` command without the `originate` keyword. + +Example with old data model (list of dictionaries): + +```yaml +router_bgp: + vrfs: + - name: VRF001 + address_families: + - address_family: ipv4 + bgp: + additional_paths: + - send any + neighbors: + - ip_address: 10.2.3.4 + activate: true + route_map_out: RM-10.2.3.4-SET-NEXT-HOP-OUT + networks: + - prefix: 100.64.0.0/10 + route_map: RM-10.2.3.4 + peer_groups: + - name: TEST_PEER_GRP + activate: true + next_hop: + address_family_ipv6_originate: true + - address_family: ipv6 + ... +``` + +Example with new data model (discrete dictionary keys for all supported address families): + +```yaml +router_bgp: + vrfs: + - name: VRF001 + address_family_ipv4: + bgp: + additional_paths: + send: + any: true + neighbors: + - ip_address: 10.2.3.4 + activate: true + route_map_out: RM-10.2.3.4-SET-NEXT-HOP-OUT + networks: + - prefix: 100.64.0.0/10 + route_map: RM-10.2.3.4 + peer_groups: + - name: TEST_PEER_GRP + activate: true + next_hop: + address_family_ipv6: + enabled: true + originate: true + address_family_ipv6: + ... +``` + +The change has been incorporated into `eos_designs` so no action is necessary to retain the same functionality. If using `structured_configuration` to add additional configuration options under the address families using the old data models, migrating to using the new data models is recommended. + ## Changes to role `arista.avd.eos_config_deploy_cvp` ### Inventory to CloudVision containers diff --git a/ansible_collections/arista/avd/docs/release-notes/4.x.x.md b/ansible_collections/arista/avd/docs/release-notes/4.x.x.md index 8552bcf1b86..98ec2a167d5 100644 --- a/ansible_collections/arista/avd/docs/release-notes/4.x.x.md +++ b/ansible_collections/arista/avd/docs/release-notes/4.x.x.md @@ -111,6 +111,14 @@ The change has been incorporated into `eos_designs` so action is only required w See details in the [Porting guide for AVD 4.x.x](../porting-guides/4.x.x.md#new-required-enabled-key-under-vlan_interfacesip_attached_host_route_export). +### New data model for `address_families` under `router_bgp.vrfs` + +New data models to replace deprecated `router_bgp.vrfs[].address_families` keys have been added to eos_cli_config_gen. + +The change has been incorporated into `eos_designs` so no action is necessary to retain the same functionality. + +See details in the [Porting guide for AVD 4.x.x](../porting-guides/4.x.x.md#new-data-models-for-address_families-under-router_bgpvrfs) + #### Several internal switch.* facts and avd_switch_facts have been removed As part of optimizing performance and code reuse, the amount of `switch.*` facts has been limited. From 3da1f633fb649523b22a6da74d1d9ea0cdaebd42 Mon Sep 17 00:00:00 2001 From: emilarista <73955263+emilarista@users.noreply.github.com> Date: Wed, 17 May 2023 11:52:57 +0200 Subject: [PATCH 9/9] Update ansible_collections/arista/avd/docs/porting-guides/4.x.x.md Co-authored-by: Claus Holbech --- ansible_collections/arista/avd/docs/porting-guides/4.x.x.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ansible_collections/arista/avd/docs/porting-guides/4.x.x.md b/ansible_collections/arista/avd/docs/porting-guides/4.x.x.md index aef3c7bb09a..759bbff6b3d 100644 --- a/ansible_collections/arista/avd/docs/porting-guides/4.x.x.md +++ b/ansible_collections/arista/avd/docs/porting-guides/4.x.x.md @@ -523,7 +523,9 @@ router_bgp: ... ``` -The change has been incorporated into `eos_designs` so no action is necessary to retain the same functionality. If using `structured_configuration` to add additional configuration options under the address families using the old data models, migrating to using the new data models is recommended. +The change has been incorporated into `eos_designs` so no action is necessary to retain the same functionality. + +It is recommended to migrate to the new data models when using `structured_config` or `custom_structured_configuration_` to add additional configuration options under the VRF address families. ### Sanitized configuration