diff --git a/ansible_collections/arista/avd/molecule/dhcp_configuration/inventory/group_vars/AVD_LAB.yml b/ansible_collections/arista/avd/molecule/dhcp_configuration/inventory/group_vars/AVD_LAB.yml index 1022e2dc502..f1ecea27849 100644 --- a/ansible_collections/arista/avd/molecule/dhcp_configuration/inventory/group_vars/AVD_LAB.yml +++ b/ansible_collections/arista/avd/molecule/dhcp_configuration/inventory/group_vars/AVD_LAB.yml @@ -3,12 +3,12 @@ root_dir: '{{ playbook_dir }}' # local users local_users: - admin: + - name: admin privilege: 15 role: network-admin no_password: true - cvpadmin: + - name: cvpadmin privilege: 15 role: network-admin sha512_password: "$6$rZKcbIZ7iWGAWTUM$TCgDn1KcavS0s.OV8lacMTUkxTByfzcGlFlYUWroxYuU7M/9bIodhRO7nXGzMweUxvbk8mJmQl8Bh44cRktUj." diff --git a/ansible_collections/arista/avd/molecule/dhcp_configuration/inventory/group_vars/DC1_FABRIC.yml b/ansible_collections/arista/avd/molecule/dhcp_configuration/inventory/group_vars/DC1_FABRIC.yml index ab95884a7f1..4f5adaa6ca9 100644 --- a/ansible_collections/arista/avd/molecule/dhcp_configuration/inventory/group_vars/DC1_FABRIC.yml +++ b/ansible_collections/arista/avd/molecule/dhcp_configuration/inventory/group_vars/DC1_FABRIC.yml @@ -38,19 +38,19 @@ spine: platform: vEOS-LAB bgp_as: 65001 nodes: - DC1-SPINE1: + - name: DC1-SPINE1 id: 1 mgmt_ip: 192.168.200.101/24 mac_address: '0c:1d:c0:1d:62:01' - DC1-SPINE2: + - name: DC1-SPINE2 id: 2 mgmt_ip: 192.168.200.102/24 mac_address: '0c:1d:c0:1d:62:01' - DC1-SPINE3: + - name: DC1-SPINE3 id: 3 mgmt_ip: 192.168.200.103/24 mac_address: '0c:1d:c0:1d:62:01' - DC1-SPINE4: + - name: DC1-SPINE4 id: 4 mgmt_ip: 192.168.200.104/24 mac_address: '0c:1d:c0:1d:62:01' @@ -70,61 +70,61 @@ l3leaf: spanning_tree_priority: 4096 virtual_router_mac_address: 00:dc:00:00:00:0a node_groups: - DC1_LEAF1: + - group: DC1_LEAF1 bgp_as: 65101 filter: tenants: [ all ] tags: [ web, app ] nodes: - DC1-LEAF1A: + - name: DC1-LEAF1A id: 1 mgmt_ip: 192.168.200.105/24 mac_address: '0c:1d:c0:1d:62:01' spine_interfaces: [ Ethernet1, Ethernet1, Ethernet1, Ethernet1 ] - DC1_LEAF2: + - group: DC1_LEAF2 bgp_as: 65102 filter: tenants: [ Tenant_A, Tenant_B, Tenant_C ] tags: [ opzone, web, app, db, vmotion, nfs ] nodes: - DC1-LEAF2A: + - name: DC1-LEAF2A id: 2 mgmt_ip: 192.168.200.106/24 mac_address: '0c:1d:c0:1d:62:01' spine_interfaces: [ Ethernet2, Ethernet2, Ethernet2, Ethernet2 ] - DC1-LEAF2B: + - name: DC1-LEAF2B id: 3 mgmt_ip: 192.168.200.107/24 mac_address: '0c:1d:c0:1d:62:01' spine_interfaces: [ Ethernet3, Ethernet3, Ethernet3, Ethernet3 ] - DC1_SVC3: + - group: DC1_SVC3 bgp_as: 65103 filter: tenants: [ Tenant_A, Tenant_B, Tenant_C ] tags: [ opzone, web, app, db, vmotion, nfs, wan ] nodes: - DC1-SVC3A: + - name: DC1-SVC3A id: 4 mgmt_ip: 192.168.200.108/24 mac_address: '0c:1d:c0:1d:62:01' spine_interfaces: [ Ethernet4, Ethernet4, Ethernet4, Ethernet4 ] - DC1-SVC3B: + - name: DC1-SVC3B id: 5 mgmt_ip: 192.168.200.109/24 mac_address: '0c:1d:c0:1d:62:01' spine_interfaces: [ Ethernet5, Ethernet5, Ethernet5, Ethernet5 ] - DC1_BL1: + - group: DC1_BL1 bgp_as: 65104 filter: tenants: [ all ] tags: [ wan ] nodes: - DC1-BL1A: + - name: DC1-BL1A id: 6 mgmt_ip: 192.168.200.110/24 mac_address: '0c:1d:c0:1d:62:01' spine_interfaces: [ Ethernet6, Ethernet6, Ethernet6, Ethernet6 ] - DC1-BL1B: + - name: DC1-BL1B id: 7 mgmt_ip: 192.168.200.111/24 spine_interfaces: [ Ethernet7, Ethernet7, Ethernet7, Ethernet7 ] diff --git a/ansible_collections/arista/avd/molecule/dhcp_configuration/inventory/group_vars/DC1_TENANTS_NETWORKS.yml b/ansible_collections/arista/avd/molecule/dhcp_configuration/inventory/group_vars/DC1_TENANTS_NETWORKS.yml index f837766c343..5935ffe5cb3 100644 --- a/ansible_collections/arista/avd/molecule/dhcp_configuration/inventory/group_vars/DC1_TENANTS_NETWORKS.yml +++ b/ansible_collections/arista/avd/molecule/dhcp_configuration/inventory/group_vars/DC1_TENANTS_NETWORKS.yml @@ -3,119 +3,118 @@ tenants: # Tenant_A Specific Information - VRFs / VLANs - Tenant_A: + - name: Tenant_A mac_vrf_vni_base: 10000 vrfs: - Tenant_A_OP_Zone: + - name: Tenant_A_OP_Zone vrf_vni: 10 vtep_diagnostic: loopback: 100 loopback_ip_range: 10.255.1.0/24 svis: - 110: + - id: 110 name: Tenant_A_OP_Zone_1 tags: ['opzone'] enabled: True ip_address_virtual: 10.1.10.1/24 - 111: + - id: 111 vni_override: 50111 name: Tenant_A_OP_Zone_2 tags: ['opzone'] enabled: True ip_address_virtual: 10.1.11.1/24 - Tenant_A_WEB_Zone: + - name: Tenant_A_WEB_Zone vrf_vni: 11 svis: - 120: + - id: 120 name: Tenant_A_WEB_Zone_1 tags: ['web', 'erp1'] enabled: True ip_address_virtual: 10.1.20.1/24 - 121: + - id: 121 name: Tenant_A_WEBZone_2 tags: ['web'] enabled: True - ip_address_virtual: 10.1.21.1/24 - Tenant_A_APP_Zone: + - name: Tenant_A_APP_Zone vrf_vni: 12 svis: - 130: + - id: 130 name: Tenant_A_APP_Zone_1 tags: ['app', 'erp1'] enabled: True ip_address_virtual: 10.1.30.1/24 - 131: + - id: 131 name: Tenant_A_APP_Zone_2 tags: ['app'] enabled: True ip_address_virtual: 10.1.31.1/24 - Tenant_A_DB_Zone: + - name: Tenant_A_DB_Zone vrf_vni: 13 svis: - 140: + - id: 140 name: Tenant_A_DB_BZone_1 tags: ['db', 'erp1'] enabled: True ip_address_virtual: 10.1.40.1/24 - 141: + - id: 141 name: Tenant_A_DB_Zone_2 tags: ['db'] enabled: True ip_address_virtual: 10.1.41.1/24 - Tenant_A_WAN_Zone: + - name: Tenant_A_WAN_Zone vrf_vni: 14 svis: - 150: + - id: 150 name: Tenant_A_WAN_Zone_1 tags: ['wan'] enabled: True ip_address_virtual: 10.1.40.1/24 # Tenant_B Specific Information - VRFs / VLANs - Tenant_B: + - name: Tenant_B mac_vrf_vni_base: 20000 vrfs: - Tenant_B_OP_Zone: + - name: Tenant_B_OP_Zone vrf_vni: 20 svis: - 210: + - id: 210 name: Tenant_B_OP_Zone_1 tags: ['opzone'] enabled: True ip_address_virtual: 10.2.10.1/24 - 211: + - id: 211 name: Tenant_B_OP_Zone_2 tags: ['opzone'] enabled: True ip_address_virtual: 10.2.11.1/24 - Tenant_B_WAN_Zone: + - name: Tenant_B_WAN_Zone vrf_vni: 21 svis: - 250: + - id: 250 name: Tenant_B_WAN_Zone_1 tags: ['wan'] enabled: True ip_address_virtual: 10.2.50.1/24 # Tenant_C Specific Information - VRFs / VLANs - Tenant_C: + - name: Tenant_C mac_vrf_vni_base: 30000 vrfs: - Tenant_C_OP_Zone: + - name: Tenant_C_OP_Zone vrf_vni: 30 svis: - 310: + - id: 310 name: Tenant_C_OP_Zone_1 tags: ['opzone'] enabled: True ip_address_virtual: 10.3.10.1/24 - 311: + - id: 311 name: Tenant_C_OP_Zone_2 tags: ['opzone'] enabled: True ip_address_virtual: 10.3.11.1/24 - Tenant_C_WAN_Zone: + - name: Tenant_C_WAN_Zone vrf_vni: 31 svis: - 350: + - id: 350 name: Tenant_C_WAN_Zone_1 tags: ['wan'] enabled: True diff --git a/ansible_collections/arista/avd/molecule/dhcp_provisioning/converge.yml b/ansible_collections/arista/avd/molecule/dhcp_provisioning/converge.yml index a39ed915f64..954e115e3a1 100644 --- a/ansible_collections/arista/avd/molecule/dhcp_provisioning/converge.yml +++ b/ansible_collections/arista/avd/molecule/dhcp_provisioning/converge.yml @@ -13,20 +13,6 @@ eos_config_dir_name: "configs/default_node_types" structured_cvp_dir: "{{ structured_dir }}/cvp/default_node_types/" -- name: Converge - generate DHCP configuration offline for custom node types with 3.x syntax using a dict of dicts - hosts: TOOLS - gather_facts: false - connection: local - tasks: - - name: Generate intended configuration - ansible.builtin.import_role: - name: arista.avd.dhcp_provisioner - vars: - fabric_group: DC1_L2LEAFS - # Overwriting destination dirs .. based on the not so glorious role hack for eos_config_dir_name - eos_config_dir_name: "configs/custom_avd3_node_types" - structured_cvp_dir: "{{ structured_dir }}/cvp/custom_avd3_node_types/" - - name: Converge - generate DHCP configuration offline for custom node types with 4.x syntax using a list of dicts hosts: TOOLS gather_facts: false diff --git a/ansible_collections/arista/avd/molecule/dhcp_provisioning/intended/configs/custom_avd3_node_types/dhcpd.conf b/ansible_collections/arista/avd/molecule/dhcp_provisioning/intended/configs/custom_avd3_node_types/dhcpd.conf deleted file mode 100644 index 42616f08bd1..00000000000 --- a/ansible_collections/arista/avd/molecule/dhcp_provisioning/intended/configs/custom_avd3_node_types/dhcpd.conf +++ /dev/null @@ -1,107 +0,0 @@ - -# Ansible managed: Do NOT edit this file manually! - centos7-systemd -# Subnet of ZTP interface -subnet 172.17.0.0 netmask 255.255.0.0 { - range 172.17.255.200 172.17.255.210; - option routers 192.168.200.5; - option domain-name-servers 8.8.8.8, 192.168.200.5; - max-lease-time 300; -} - -# Per host definition -host DC1-L2LEAF2B { - option host-name "DC1-L2LEAF2B"; - option dhcp-client-identifier 0c:1d:c0:1d:62:22; - fixed-address 192.168.200.114; - option bootfile-name "http://192.168.200.11/ztp/bootstrap"; - option routers 192.168.200.5; - option domain-name-servers 8.8.8.8, 192.168.200.5; -} -host DC1-L2LEAF1A { - option host-name "DC1-L2LEAF1A"; - option dhcp-client-identifier 0c:1d:c0:1d:62:21; - fixed-address 192.168.200.112; - option bootfile-name "http://192.168.200.11/ztp/bootstrap"; - option routers 192.168.200.5; - option domain-name-servers 8.8.8.8, 192.168.200.5; -} -host DC1-BL1A { - option host-name "DC1-BL1A"; - option dhcp-client-identifier 0c:1d:c0:1d:62:16; - fixed-address 192.168.200.110; - option bootfile-name "http://192.168.200.11/ztp/bootstrap"; - option routers 192.168.200.5; - option domain-name-servers 8.8.8.8, 192.168.200.5; -} -host DC1-LEAF1A { - option host-name "DC1-LEAF1A"; - option dhcp-client-identifier 0c:1d:c0:1d:62:11; - fixed-address 192.168.200.105; - option bootfile-name "http://192.168.200.11/ztp/bootstrap"; - option routers 192.168.200.5; - option domain-name-servers 8.8.8.8, 192.168.200.5; -} -host DC1-LEAF2A { - option host-name "DC1-LEAF2A"; - option dhcp-client-identifier 0c:1d:c0:1d:62:12; - fixed-address 192.168.200.106; - option bootfile-name "http://192.168.200.11/ztp/bootstrap"; - option routers 192.168.200.5; - option domain-name-servers 8.8.8.8, 192.168.200.5; -} -host DC1-LEAF2B { - option host-name "DC1-LEAF2B"; - option dhcp-client-identifier 0c:1d:c0:1d:62:13; - fixed-address 192.168.200.107; - option bootfile-name "http://192.168.200.11/ztp/bootstrap"; - option routers 192.168.200.5; - option domain-name-servers 8.8.8.8, 192.168.200.5; -} -host DC1-SVC3A { - option host-name "DC1-SVC3A"; - option dhcp-client-identifier 0c:1d:c0:1d:62:14; - fixed-address 192.168.200.108; - option bootfile-name "http://192.168.200.11/ztp/bootstrap"; - option routers 192.168.200.5; - option domain-name-servers 8.8.8.8, 192.168.200.5; -} -host DC1-SVC3B { - option host-name "DC1-SVC3B"; - option dhcp-client-identifier 0c:1d:c0:1d:62:15; - fixed-address 192.168.200.109; - option bootfile-name "http://192.168.200.11/ztp/bootstrap"; - option routers 192.168.200.5; - option domain-name-servers 8.8.8.8, 192.168.200.5; -} -host DC1-SPINE1 { - option host-name "DC1-SPINE1"; - option dhcp-client-identifier 0c:1d:c0:1d:62:01; - fixed-address 192.168.200.101; - option bootfile-name "http://192.168.200.11/ztp/bootstrap"; - option routers 192.168.200.5; - option domain-name-servers 8.8.8.8, 192.168.200.5; -} -host DC1-SPINE2 { - option host-name "DC1-SPINE2"; - option dhcp-client-identifier 50:08:00:06:00:00; - fixed-address 192.168.200.102; - option bootfile-name "http://192.168.200.11/ztp/bootstrap"; - option routers 192.168.200.5; - option domain-name-servers 8.8.8.8, 192.168.200.5; -} -host DC1-SPINE3 { - option host-name "DC1-SPINE3"; - option dhcp-client-identifier 0c:1d:c0:1d:62:03; - fixed-address 192.168.200.103; - option bootfile-name "http://192.168.200.11/ztp/bootstrap"; - option routers 192.168.200.5; - option domain-name-servers 8.8.8.8, 192.168.200.5; -} -host DC1-SPINE4 { - option host-name "DC1-SPINE4"; - option dhcp-client-identifier 0c:1d:c0:1d:62:04; - fixed-address 192.168.200.104; - option bootfile-name "http://192.168.200.11/ztp/bootstrap"; - option routers 192.168.200.5; - option domain-name-servers 8.8.8.8, 192.168.200.5; -} diff --git a/ansible_collections/arista/avd/molecule/dhcp_provisioning/intended/structured_configs/cvp/custom_avd3_node_types/ztp_configuration.yml b/ansible_collections/arista/avd/molecule/dhcp_provisioning/intended/structured_configs/cvp/custom_avd3_node_types/ztp_configuration.yml deleted file mode 100644 index 264bc1592e8..00000000000 --- a/ansible_collections/arista/avd/molecule/dhcp_provisioning/intended/structured_configs/cvp/custom_avd3_node_types/ztp_configuration.yml +++ /dev/null @@ -1,61 +0,0 @@ ---- -ztp: - default: - registration: http://192.168.200.11/ztp/bootstrap - gateway: 192.168.200.5 - nameservers: - - 8.8.8.8 - - 192.168.200.5 - use_system_mac: true - general: - subnets: - - network: 172.17.0.0 - netmask: 255.255.0.0 - gateway: 192.168.200.5 - nameservers: - - 8.8.8.8 - - 192.168.200.5 - start: 172.17.255.200 - end: 172.17.255.210 - lease_time: 300 - clients: - # custom_l2leaf - - name: DC1-L2LEAF2B - mac: '0c:1d:c0:1d:62:22' - ip4: 192.168.200.114 - # l2leaf - - name: DC1-L2LEAF1A - mac: '0c:1d:c0:1d:62:21' - ip4: 192.168.200.112 - # l3leaf - - name: DC1-BL1A - mac: '0c:1d:c0:1d:62:16' - ip4: 192.168.200.110 - - name: DC1-LEAF1A - mac: '0c:1d:c0:1d:62:11' - ip4: 192.168.200.105 - - name: DC1-LEAF2A - mac: '0c:1d:c0:1d:62:12' - ip4: 192.168.200.106 - - name: DC1-LEAF2B - mac: '0c:1d:c0:1d:62:13' - ip4: 192.168.200.107 - - name: DC1-SVC3A - mac: '0c:1d:c0:1d:62:14' - ip4: 192.168.200.108 - - name: DC1-SVC3B - mac: '0c:1d:c0:1d:62:15' - ip4: 192.168.200.109 - # spine - - name: DC1-SPINE1 - mac: '0c:1d:c0:1d:62:01' - ip4: 192.168.200.101 - - name: DC1-SPINE2 - mac: '50:08:00:06:00:00' - ip4: 192.168.200.102 - - name: DC1-SPINE3 - mac: '0c:1d:c0:1d:62:03' - ip4: 192.168.200.103 - - name: DC1-SPINE4 - mac: '0c:1d:c0:1d:62:04' - ip4: 192.168.200.104 diff --git a/ansible_collections/arista/avd/molecule/dhcp_provisioning/inventory/group_vars/AVD_LAB.yml b/ansible_collections/arista/avd/molecule/dhcp_provisioning/inventory/group_vars/AVD_LAB.yml index 1022e2dc502..f1ecea27849 100644 --- a/ansible_collections/arista/avd/molecule/dhcp_provisioning/inventory/group_vars/AVD_LAB.yml +++ b/ansible_collections/arista/avd/molecule/dhcp_provisioning/inventory/group_vars/AVD_LAB.yml @@ -3,12 +3,12 @@ root_dir: '{{ playbook_dir }}' # local users local_users: - admin: + - name: admin privilege: 15 role: network-admin no_password: true - cvpadmin: + - name: cvpadmin privilege: 15 role: network-admin sha512_password: "$6$rZKcbIZ7iWGAWTUM$TCgDn1KcavS0s.OV8lacMTUkxTByfzcGlFlYUWroxYuU7M/9bIodhRO7nXGzMweUxvbk8mJmQl8Bh44cRktUj." diff --git a/ansible_collections/arista/avd/molecule/dhcp_provisioning/inventory/group_vars/DC1_FABRIC.yml b/ansible_collections/arista/avd/molecule/dhcp_provisioning/inventory/group_vars/DC1_FABRIC.yml index 8b3883433b2..0dee354659b 100644 --- a/ansible_collections/arista/avd/molecule/dhcp_provisioning/inventory/group_vars/DC1_FABRIC.yml +++ b/ansible_collections/arista/avd/molecule/dhcp_provisioning/inventory/group_vars/DC1_FABRIC.yml @@ -38,19 +38,19 @@ spine: platform: vEOS-LAB bgp_as: 65001 nodes: - DC1-SPINE1: + - name: DC1-SPINE1 id: 1 mgmt_ip: 192.168.200.101/24 mac_address: '0c:1d:c0:1d:62:01' - DC1-SPINE2: + - name: DC1-SPINE2 id: 2 mgmt_ip: 192.168.200.102/24 mac_address: '50:08:00:06:00:00' - DC1-SPINE3: + - name: DC1-SPINE3 id: 3 mgmt_ip: 192.168.200.103/24 mac_address: '0c:1d:c0:1d:62:03' - DC1-SPINE4: + - name: DC1-SPINE4 id: 4 mgmt_ip: 192.168.200.104/24 mac_address: '0c:1d:c0:1d:62:04' @@ -70,61 +70,61 @@ l3leaf: spanning_tree_priority: 4096 virtual_router_mac_address: 00:dc:00:00:00:0a node_groups: - DC1_LEAF1: + - group: DC1_LEAF1 bgp_as: 65101 filter: tenants: [ all ] tags: [ web, app ] nodes: - DC1-LEAF1A: + - name: DC1-LEAF1A id: 1 mgmt_ip: 192.168.200.105/24 mac_address: '0c:1d:c0:1d:62:11' spine_interfaces: [ Ethernet1, Ethernet1, Ethernet1, Ethernet1 ] - DC1_LEAF2: + - group: DC1_LEAF2 bgp_as: 65102 filter: tenants: [ Tenant_A, Tenant_B, Tenant_C ] tags: [ opzone, web, app, db, vmotion, nfs ] nodes: - DC1-LEAF2A: + - name: DC1-LEAF2A id: 2 mgmt_ip: 192.168.200.106/24 mac_address: '0c:1d:c0:1d:62:12' spine_interfaces: [ Ethernet2, Ethernet2, Ethernet2, Ethernet2 ] - DC1-LEAF2B: + - name: DC1-LEAF2B id: 3 mgmt_ip: 192.168.200.107/24 mac_address: '0c:1d:c0:1d:62:13' spine_interfaces: [ Ethernet3, Ethernet3, Ethernet3, Ethernet3 ] - DC1_SVC3: + - group: DC1_SVC3 bgp_as: 65103 filter: tenants: [ Tenant_A, Tenant_B, Tenant_C ] tags: [ opzone, web, app, db, vmotion, nfs, wan ] nodes: - DC1-SVC3A: + - name: DC1-SVC3A id: 4 mgmt_ip: 192.168.200.108/24 mac_address: '0c:1d:c0:1d:62:14' spine_interfaces: [ Ethernet4, Ethernet4, Ethernet4, Ethernet4 ] - DC1-SVC3B: + - name: DC1-SVC3B id: 5 mgmt_ip: 192.168.200.109/24 mac_address: '0c:1d:c0:1d:62:15' spine_interfaces: [ Ethernet5, Ethernet5, Ethernet5, Ethernet5 ] - DC1_BL1: + - group: DC1_BL1 bgp_as: 65104 filter: tenants: [ all ] tags: [ wan ] nodes: - DC1-BL1A: + - name: DC1-BL1A id: 6 mgmt_ip: 192.168.200.110/24 mac_address: '0c:1d:c0:1d:62:16' spine_interfaces: [ Ethernet6, Ethernet6, Ethernet6, Ethernet6 ] - DC1-BL1B: + - name: DC1-BL1B id: 7 mgmt_ip: 192.168.200.111/24 spine_interfaces: [ Ethernet7, Ethernet7, Ethernet7, Ethernet7 ] diff --git a/ansible_collections/arista/avd/molecule/dhcp_provisioning/inventory/group_vars/DC1_L2LEAFS.yml b/ansible_collections/arista/avd/molecule/dhcp_provisioning/inventory/group_vars/DC1_L2LEAFS.yml index 67d0242b8a7..10a6db1121e 100644 --- a/ansible_collections/arista/avd/molecule/dhcp_provisioning/inventory/group_vars/DC1_L2LEAFS.yml +++ b/ansible_collections/arista/avd/molecule/dhcp_provisioning/inventory/group_vars/DC1_L2LEAFS.yml @@ -1,14 +1,12 @@ type: l2leaf -# Custom node types with AVD 3.x syntax using a dict of dicts node_type_keys: - - spine: + - key: spine type: spine default_evpn_role: server default_ptp_priority1: 20 - l3leaf: + - key: l3leaf type: l3leaf connected_endpoints: true default_evpn_role: client @@ -19,7 +17,7 @@ node_type_keys: l3: true vtep: true - l2leaf: + - key: l2leaf type: l2leaf connected_endpoints: true mlag_support: true @@ -28,7 +26,7 @@ node_type_keys: underlay_router: false uplink_type: port-channel - custom_l2leaf: + - key: custom_l2leaf type: custom_l2leaf connected_endpoints: true mlag_support: true @@ -37,14 +35,14 @@ node_type_keys: underlay_router: false uplink_type: port-channel - super_spine: + - key: super_spine type: super-spine - overlay_controller: + - key: overlay_controller type: overlay-controller default_evpn_role: server - wan_router: + - key: wan_router type: wan_router default_evpn_role: client default_wan_role: client @@ -54,7 +52,7 @@ node_type_keys: l3: true vtep: true - wan_rr: + - key: wan_rr type: wan_rr default_evpn_role: server default_wan_role: server diff --git a/ansible_collections/arista/avd/molecule/dhcp_provisioning/inventory/group_vars/DC1_LEAFS.yml b/ansible_collections/arista/avd/molecule/dhcp_provisioning/inventory/group_vars/DC1_LEAFS.yml index 3e0bfb68c40..d85fbb295a3 100644 --- a/ansible_collections/arista/avd/molecule/dhcp_provisioning/inventory/group_vars/DC1_LEAFS.yml +++ b/ansible_collections/arista/avd/molecule/dhcp_provisioning/inventory/group_vars/DC1_LEAFS.yml @@ -1,8 +1,6 @@ type: l3leaf -# Custom node types with 4.x syntax using a list of dicts node_type_keys: - - key: spine type: spine default_evpn_role: server diff --git a/ansible_collections/arista/avd/molecule/dhcp_provisioning/inventory/group_vars/DC1_TENANTS_NETWORKS.yml b/ansible_collections/arista/avd/molecule/dhcp_provisioning/inventory/group_vars/DC1_TENANTS_NETWORKS.yml index ee52a90d3ab..2e92788f740 100644 --- a/ansible_collections/arista/avd/molecule/dhcp_provisioning/inventory/group_vars/DC1_TENANTS_NETWORKS.yml +++ b/ansible_collections/arista/avd/molecule/dhcp_provisioning/inventory/group_vars/DC1_TENANTS_NETWORKS.yml @@ -2,149 +2,149 @@ # Documentation of Tenant specific information - Vlans/VRFs # SVI Profile svi_profiles: - GENERIC: + - profile: GENERIC mtu: 1560 enabled: true - GENERIC_FULL: + - profile: GENERIC_FULL name: GENERIC Name mtu: 1560 enabled: false ip_address_virtual: 10.1.10.254/24 - WITH_NO_MTU: + - profile: WITH_NO_MTU enabled: true - WITH_DHCP_AND_SNOOPING: + - profile: WITH_DHCP_AND_SNOOPING enabled: true ip_address_virtual: 10.1.11.254/24 igmp_snooping_enabled: false ip_helpers: - 1.1.1.1: + - ip_helper: 1.1.1.1 source_interface: lo100 source_vrf: TEST - WITH_DHCP: + - profile: WITH_DHCP enabled: true ip_helpers: - 1.1.1.1: + - ip_helper: 1.1.1.1 source_interface: lo100 source_vrf: MGMT tenants: # Tenant_A Specific Information - VRFs / VLANs - Tenant_A: + - name: Tenant_A mac_vrf_vni_base: 10000 vrfs: - Tenant_A_OP_Zone: + - name: Tenant_A_OP_Zone vrf_vni: 10 vtep_diagnostic: loopback: 100 loopback_ip_range: 10.255.1.0/24 svis: - 110: + - id: 110 name: Tenant_A_OP_Zone_1 tags: ['opzone'] enabled: True ip_address_virtual: 10.1.10.1/24 - 111: + - id: 111 vni_override: 50111 name: Tenant_A_OP_Zone_2 tags: ['opzone'] enabled: True ip_address_virtual: 10.1.11.1/24 ip_helpers: - 1.1.1.1: + - ip_helper: 1.1.1.1 source_interface: lo100 source_vrf: MGMT - Tenant_A_WEB_Zone: + - name: Tenant_A_WEB_Zone vrf_vni: 11 svis: - 120: + - id: 120 name: Tenant_A_WEB_Zone_1 tags: ['web', 'erp1'] profile: WITH_DHCP_AND_SNOOPING ip_address_virtual: 10.1.20.1/24 - 121: + - id: 121 name: Tenant_A_WEBZone_2 tags: ['web'] profile: GENERIC_FULL - Tenant_A_APP_Zone: + - name: Tenant_A_APP_Zone vrf_vni: 12 svis: - 130: + - id: 130 name: Tenant_A_APP_Zone_1 tags: ['app', 'erp1'] profile: WITH_NO_MTU ip_address_virtual: 10.1.30.1/24 - 131: + - id: 131 name: Tenant_A_APP_Zone_2 tags: ['app'] enabled: True ip_address_virtual: 10.1.31.1/24 - Tenant_A_DB_Zone: + - name: Tenant_A_DB_Zone vrf_vni: 13 svis: - 140: + - id: 140 name: Tenant_A_DB_BZone_1 tags: ['db', 'erp1'] enabled: True ip_address_virtual: 10.1.40.1/24 - 141: + - id: 141 name: Tenant_A_DB_Zone_2 tags: ['db'] enabled: True ip_address_virtual: 10.1.41.1/24 - Tenant_A_WAN_Zone: + - name: Tenant_A_WAN_Zone vrf_vni: 14 svis: - 150: + - id: 150 name: Tenant_A_WAN_Zone_1 tags: ['wan'] enabled: True ip_address_virtual: 10.1.40.1/24 # Tenant_B Specific Information - VRFs / VLANs - Tenant_B: + - name: Tenant_B mac_vrf_vni_base: 20000 vrfs: - Tenant_B_OP_Zone: + - name: Tenant_B_OP_Zone vrf_vni: 20 svis: - 210: + - id: 210 name: Tenant_B_OP_Zone_1 tags: ['opzone'] enabled: True ip_address_virtual: 10.2.10.1/24 - 211: + - id: 211 name: Tenant_B_OP_Zone_2 tags: ['opzone'] enabled: True ip_address_virtual: 10.2.11.1/24 - Tenant_B_WAN_Zone: + - name: Tenant_B_WAN_Zone vrf_vni: 21 svis: - 250: + - id: 250 name: Tenant_B_WAN_Zone_1 tags: ['wan'] enabled: True ip_address_virtual: 10.2.50.1/24 # Tenant_C Specific Information - VRFs / VLANs - Tenant_C: + - name: Tenant_C mac_vrf_vni_base: 30000 vrfs: - Tenant_C_OP_Zone: + - name: Tenant_C_OP_Zone vrf_vni: 30 svis: - 310: + - id: 310 name: Tenant_C_OP_Zone_1 tags: ['opzone'] enabled: True ip_address_virtual: 10.3.10.1/24 - 311: + - id: 311 name: Tenant_C_OP_Zone_2 tags: ['opzone'] enabled: True ip_address_virtual: 10.3.11.1/24 - Tenant_C_WAN_Zone: + - name: Tenant_C_WAN_Zone vrf_vni: 31 svis: - 350: + - id: 350 name: Tenant_C_WAN_Zone_1 tags: ['wan'] enabled: True diff --git a/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/intended/configs/host1.cfg b/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/intended/configs/host1.cfg index 00a313d3f00..e24069d7094 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/intended/configs/host1.cfg +++ b/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/intended/configs/host1.cfg @@ -13,11 +13,6 @@ no aaa root ! vrf instance MGMT ! -interface Ethernet10 - description ROUTER01_Eth1 - no shutdown - switchport -! interface Loopback0 description EVPN_Overlay_Peering no shutdown diff --git a/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/intended/configs/host2.cfg b/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/intended/configs/host2.cfg index 8d67320813b..39eecb4d112 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/intended/configs/host2.cfg +++ b/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/intended/configs/host2.cfg @@ -11,38 +11,20 @@ hostname host2 no enable password no aaa root ! -vlan 111 - name Tenant_A_OP_Zone_2 -! -vlan 160 - name Tenant_A_VMOTION -! vrf instance MGMT ! -vrf instance TENANT_B_WAN -! interface Loopback0 description MPLS_Overlay_peering no shutdown ip address 10.42.0.102/32 -! -interface Vlan111 - description Tenant_A_OP_Zone_2 - no shutdown - vrf TENANT_B_WAN - ip helper-address 1.1.1.1 vrf MGMT source-interface lo100 + isis enable CORE + isis passive + node-segment ipv4 index 102 ! ip virtual-router mac-address 00:1c:73:00:dc:01 ! ip routing no ip routing vrf MGMT -ip routing vrf TENANT_B_WAN -! -ip prefix-list PL-LOOPBACKS-EVPN-OVERLAY - seq 10 permit 10.42.0.0/24 eq 32 -! -route-map RM-CONN-2-BGP permit 10 - match ip address prefix-list PL-LOOPBACKS-EVPN-OVERLAY ! router bfd multihop interval 300 min-rx 300 multiplier 3 @@ -52,24 +34,34 @@ router bgp 102 maximum-paths 4 ecmp 4 update wait-install no bgp default ipv4-unicast - neighbor IPv4-UNDERLAY-PEERS peer group - neighbor IPv4-UNDERLAY-PEERS send-community - neighbor IPv4-UNDERLAY-PEERS maximum-routes 12000 neighbor MPLS-OVERLAY-PEERS peer group neighbor MPLS-OVERLAY-PEERS remote-as 102 neighbor MPLS-OVERLAY-PEERS update-source Loopback0 neighbor MPLS-OVERLAY-PEERS bfd neighbor MPLS-OVERLAY-PEERS send-community neighbor MPLS-OVERLAY-PEERS maximum-routes 0 - redistribute connected route-map RM-CONN-2-BGP ! address-family evpn - neighbor default encapsulation mpls - neighbor MPLS-OVERLAY-PEERS activate ! address-family ipv4 - neighbor IPv4-UNDERLAY-PEERS activate no neighbor MPLS-OVERLAY-PEERS activate + ! + address-family vpn-ipv4 + neighbor MPLS-OVERLAY-PEERS activate + neighbor default encapsulation mpls next-hop-self source-interface Loopback0 +! +router isis CORE + is-type level-2 + router-id ipv4 10.42.0.102 + log-adjacency-changes + ! + address-family ipv4 unicast + maximum-paths 4 + ! + segment-routing mpls + no shutdown +! +mpls ip ! management api http-commands protocol https diff --git a/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/intended/structured_configs/host1.yml b/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/intended/structured_configs/host1.yml index 7b34a2f7824..0b09ff4822c 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/intended/structured_configs/host1.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/intended/structured_configs/host1.yml @@ -86,12 +86,3 @@ vxlan_interface: vxlan: udp_port: 4789 source_interface: Loopback1 -ethernet_interfaces: -- name: Ethernet10 - peer: ROUTER01 - peer_interface: Eth1 - peer_type: router - port_profile: Tenant_X_LT - description: ROUTER01_Eth1 - shutdown: false - type: switched diff --git a/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/intended/structured_configs/host2.yml b/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/intended/structured_configs/host2.yml index 757de777873..c3fca80239b 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/intended/structured_configs/host2.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/intended/structured_configs/host2.yml @@ -12,10 +12,6 @@ router_bgp: updates: wait_install: true peer_groups: - - name: IPv4-UNDERLAY-PEERS - type: ipv4 - maximum_routes: 12000 - send_community: all - name: MPLS-OVERLAY-PEERS type: mpls update_source: Loopback0 @@ -23,18 +19,15 @@ router_bgp: send_community: all maximum_routes: 0 remote_as: '102' + address_family_evpn: + peer_groups: [] address_family_ipv4: peer_groups: - - name: IPv4-UNDERLAY-PEERS - activate: true - name: MPLS-OVERLAY-PEERS activate: false - redistribute_routes: - - source_protocol: connected - route_map: RM-CONN-2-BGP - address_family_evpn: - neighbor_default: - encapsulation: mpls + address_family_vpn_ipv4: + neighbor_default_encapsulation_mpls_next_hop_self: + source_interface: Loopback0 peer_groups: - name: MPLS-OVERLAY-PEERS activate: true @@ -48,9 +41,6 @@ vlan_internal_order: vrfs: - name: MGMT ip_routing: false -- name: TENANT_B_WAN - tenant: TENANT_B - ip_routing: true management_api_http: enable_vrfs: - name: MGMT @@ -60,42 +50,31 @@ loopback_interfaces: description: MPLS_Overlay_peering shutdown: false ip_address: 10.42.0.102/32 -prefix_lists: -- name: PL-LOOPBACKS-EVPN-OVERLAY - sequence_numbers: - - sequence: 10 - action: permit 10.42.0.0/24 eq 32 -route_maps: -- name: RM-CONN-2-BGP - sequence_numbers: - - sequence: 10 - type: permit - match: - - ip address prefix-list PL-LOOPBACKS-EVPN-OVERLAY + isis_enable: CORE + isis_passive: true + node_segment: + ipv4_index: 102 +router_isis: + instance: CORE + log_adjacency_changes: true + net: null + router_id: 10.42.0.102 + is_type: level-2 + address_family_ipv4: + enabled: true + maximum_paths: 4 + advertise: + passive_only: false + segment_routing_mpls: + router_id: 10.42.0.102 + enabled: true +mpls: + ip: true router_bfd: multihop: interval: 300 min_rx: 300 multiplier: 3 -vlans: -- id: 111 - name: Tenant_A_OP_Zone_2 - tenant: TENANT_B -- id: 160 - name: Tenant_A_VMOTION - tenant: TENANT_B ip_igmp_snooping: globally_enabled: true ip_virtual_router_mac_address: 00:1c:73:00:dc:01 -vlan_interfaces: -- name: Vlan111 - tenant: TENANT_B - tags: - - opzone - description: Tenant_A_OP_Zone_2 - shutdown: false - vrf: TENANT_B_WAN - ip_helpers: - - ip_helper: 1.1.1.1 - source_interface: lo100 - vrf: MGMT diff --git a/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/inventory/host_vars/host1/connected_endpoints_keys.yml b/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/inventory/host_vars/host1/connected_endpoints_keys.yml deleted file mode 100644 index e500814e69d..00000000000 --- a/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/inventory/host_vars/host1/connected_endpoints_keys.yml +++ /dev/null @@ -1,13 +0,0 @@ -# Testing "connected_endpoints_keys" as dict of dict -# Dict type is deprecated in 4.0.0. To be removed in 5.0.0 -connected_endpoints_keys: - servers: - type: server - firewalls: - type: firewall - routers: - type: router - load_balancers: - type: load_balancer - storage_arrays: - type: storage_array diff --git a/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/inventory/host_vars/host1/l3_edge_p2p_links.yml b/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/inventory/host_vars/host1/l3_edge_p2p_links.yml deleted file mode 100644 index 68c6cea9232..00000000000 --- a/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/inventory/host_vars/host1/l3_edge_p2p_links.yml +++ /dev/null @@ -1,13 +0,0 @@ -# Testing "l3_edge.p2p_links_ip_pools" and "l3_edge.p2p_links_profiles" as dict of dict -# Dict type is deprecated in 4.0.0. To be removed in 5.0.0 -l3_edge: - p2p_links_ip_pools: - pool-leaf: 11.1.0.0/24 - pool-spine: 11.1.1.0/24 - pool-super-spine: 11.1.2.0/24 - p2p_links_profiles: - generic-profile: - mtu: 1499 - bfd: false - ptp: - enabled: true diff --git a/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/inventory/host_vars/host1/node_type.yml b/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/inventory/host_vars/host1/node_type.yml index d00c33f1aee..f0ee118c042 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/inventory/host_vars/host1/node_type.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/inventory/host_vars/host1/node_type.yml @@ -5,20 +5,14 @@ l3leaf: vtep_loopback_ipv4_pool: 192.168.254.0/24 id: 101 bgp_as: 101 - # Testing "nodes" as dict of dict - # Dict type is deprecated in 4.0.0. To be removed in 5.0.0 nodes: - host1: + - name: host1 id: 101 bgp_as: 101 - # Testing "node_groups" as dict of dict - # Dict type is deprecated in 4.0.0. To be removed in 5.0.0 node_groups: - sflow-tests-leaf-mlag: + - group: sflow-tests-leaf-mlag bgp_as: 65105 - # Testing "nodes" as dict of dict - # Dict type is deprecated in 4.0.0. To be removed in 5.0.0 nodes: - host1: + - name: host1 id: 5 mgmt_ip: 192.168.0.103/24 diff --git a/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/inventory/host_vars/host1/platform_speed_groups.yml b/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/inventory/host_vars/host1/platform_speed_groups.yml deleted file mode 100644 index 68c939cb7da..00000000000 --- a/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/inventory/host_vars/host1/platform_speed_groups.yml +++ /dev/null @@ -1,6 +0,0 @@ -# Testing "platform_speed_groups" as dict of dict -# Dict type is deprecated in 4.0.0. To be removed in 5.0.0 -platform_speed_groups: - 7280R: - 25G: [ 3, 2 ] - 10G: [ 1, 2, 4 ] diff --git a/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/inventory/host_vars/host1/port_profiles.yml b/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/inventory/host_vars/host1/port_profiles.yml deleted file mode 100644 index 2c225d9075d..00000000000 --- a/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/inventory/host_vars/host1/port_profiles.yml +++ /dev/null @@ -1,6 +0,0 @@ -# Testing "port_profiles" as dict of dict -# Dict type is deprecated in 4.0.0. To be removed in 5.0.0 -port_profiles: - TENANT_A_B: - mode: trunk - vlans: "110-111,210-211" diff --git a/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/inventory/host_vars/host1/routers.yml b/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/inventory/host_vars/host1/routers.yml deleted file mode 100644 index e8e82244c13..00000000000 --- a/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/inventory/host_vars/host1/routers.yml +++ /dev/null @@ -1,10 +0,0 @@ -# Testing "routers" as dict of dict -# Dict type is deprecated in 4.0.0. To be removed in 5.0.0 -routers: - ROUTER01: - rack: RackB - adapters: - - endpoint_ports: [ Eth1 ] - switch_ports: [ Ethernet10 ] - switches: [ host1 ] - profile: Tenant_X_LT diff --git a/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/inventory/host_vars/host1/svi_profiles.yml b/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/inventory/host_vars/host1/svi_profiles.yml deleted file mode 100644 index d32fb79b72a..00000000000 --- a/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/inventory/host_vars/host1/svi_profiles.yml +++ /dev/null @@ -1,30 +0,0 @@ -# Testing "svi_profiles" as dict of dict -# Dict type is deprecated in 4.0.0. To be removed in 5.0.0 -svi_profiles: - GENERIC: - mtu: 1560 - enabled: true - GENERIC_FULL: - name: GENERIC Name - mtu: 1560 - enabled: false - ip_address_virtual: 10.1.10.254/24 - TEST_SVI_NODE_INHERIT: - name: Test the SVI and node config inheritance - mtu: 1560 - enabled: false - ip_address_virtual: 10.4.13.254/24 - # Testing "ip_helpers" as dict of dict - # Dict type is deprecated in 4.0.0. To be removed in 5.0.0 - ip_helpers: - 1.1.1.1: - source_interface: lo101 - source_vrf: TEST - # Testing "nodes" as dict of dict - # Dict type is deprecated in 4.0.0. To be removed in 5.0.0 - nodes: - evpn_services_l2_only_false: - ip_address: 12.4.13.2/24 - ipv6_address: 2012:db9:413::2/64 - ip_virtual_router_addresses: [ "12.4.13.1" ] - ipv6_virtual_router_addresses: [ "2012:db9:413::1" ] diff --git a/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/inventory/host_vars/host2/node_type.yml b/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/inventory/host_vars/host2/node_type.yml index e3ca1522787..cbb67532f1e 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/inventory/host_vars/host2/node_type.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/inventory/host_vars/host2/node_type.yml @@ -1,5 +1,3 @@ -# Testing "pe.nodes" as dict of dict -# Dict type is deprecated in 4.0.0. To be removed in 5.0.0 type: pe design: type: mpls @@ -10,7 +8,7 @@ pe: bgp_as: 42 id: 42 nodes: - host2: + - name: host2 id: 102 bgp_as: 102 virtual_router_mac_address: 00:1c:73:00:dc:01 diff --git a/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/inventory/host_vars/host2/node_type_keys.yml b/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/inventory/host_vars/host2/node_type_keys.yml deleted file mode 100644 index 680ff315574..00000000000 --- a/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/inventory/host_vars/host2/node_type_keys.yml +++ /dev/null @@ -1,16 +0,0 @@ -# Testing "node_type_keys" as dict of dict -# Dict type is deprecated in 4.0.0. To be removed in 5.0.0 - -node_type_keys: - pe: - type: pe - mpls_lsr: true - default_mpls_overlay_role: client - default_evpn_role: client - network_services: - l1: true - l2: true - l3: true - default_overlay_routing_protocol: ibgp - default_overlay_address_families: [ evpn ] - default_evpn_encapsulation: mpls diff --git a/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/inventory/host_vars/host2/tenants.yml b/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/inventory/host_vars/host2/tenants.yml deleted file mode 100644 index b27b98a0ad5..00000000000 --- a/ansible_collections/arista/avd/molecule/eos_designs_deprecated_vars/inventory/host_vars/host2/tenants.yml +++ /dev/null @@ -1,57 +0,0 @@ -# Testing "tenants" as dict of dict -# Dict type is deprecated in 4.0.0. To be removed in 5.0.0 - -tenants: - TENANT_B: - bgp_peer_groups: - Tenant_C_BGP_PEER_GROUP: - remote_as: "666" - description: "Tenant C peer group" - send_community: all - next_hop_self: true - maximum_routes: 1000 - # Testing "l2vlans" as dict of dict - # Dict type is deprecated in 4.0.0. To be removed in 5.0.0 - l2vlans: - '160': - name: Tenant_A_VMOTION - tags: ['opzone'] - # Testing "vrfs" as dict of dict - # Dict type is deprecated in 4.0.0. To be removed in 5.0.0 - vrfs: - TENANT_B_WAN: - vrf_id: 20 - # Testing "svis" as dict of dict - # Dict type is deprecated in 4.0.0. To be removed in 5.0.0 - svis: - 111: - vni_override: 50111 - name: Tenant_A_OP_Zone_2 - tags: ['opzone'] - enabled: True - # Testing "ip_helpers" as dict of dict - # Dict type is deprecated in 4.0.0. To be removed in 5.0.0 - ip_helpers: - 1.1.1.1: - source_interface: lo100 - source_vrf: MGMT - # Testing "nodes" as dict of dict - # Dict type is deprecated in 4.0.0. To be removed in 5.0.0 - nodes: - DC1-LEAF2A: - ip_address: 10.3.11.2/24 - ipv6_address: 2001:db8:311::2/64 - # Testing "bgp_peers" as dict of dict - # Dict type is deprecated in 4.0.0. To be removed in 5.0.0 - bgp_peers: - 1.1.1.1: - peer_group: Tenant_C_WAN_Zone_BGP_PEER_GROUP - description: test_description - nodes: [ DC1-BL2B ] - set_ipv4_next_hop: 1.1.1.1 - # Testing "ip_helpers" as dict of dict - # Dict type is deprecated in 4.0.0. To be removed in 5.0.0 - ip_helpers: - 1.1.1.1: - source_interface: lo100 - source_vrf: MGMT diff --git a/ansible_collections/arista/avd/molecule/eos_designs_negative_unit_tests/inventory/host_vars/invalid-schema.yml b/ansible_collections/arista/avd/molecule/eos_designs_negative_unit_tests/inventory/host_vars/invalid-schema.yml index 363f27bf323..734c1051707 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_negative_unit_tests/inventory/host_vars/invalid-schema.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_negative_unit_tests/inventory/host_vars/invalid-schema.yml @@ -6,10 +6,5 @@ l2leaf: - node: invalid-schema # <--- Key should have been "name" id: 1 -l3leaf: - nodes: - some-other-node: # <--- dict of dicts will be converted but raise an error since avd_data_conversion_mode == "error" - id: 1 - expected_error_message: >- - 1 errors raised during conversion of input vars. 2 errors found during schema validation of input vars. + 2 errors found during schema validation of input vars. diff --git a/ansible_collections/arista/avd/roles/dhcp_provisioner/templates/ztp_configuration.j2 b/ansible_collections/arista/avd/roles/dhcp_provisioner/templates/ztp_configuration.j2 index 32d69fd4d51..64644320d4c 100644 --- a/ansible_collections/arista/avd/roles/dhcp_provisioner/templates/ztp_configuration.j2 +++ b/ansible_collections/arista/avd/roles/dhcp_provisioner/templates/ztp_configuration.j2 @@ -12,7 +12,7 @@ {% endif %} {% set node_types = dict() %} {% if hostvars[groups[fabric_group][0]]['node_type_keys'] is arista.avd.defined %} -{% set node_type_keys = hostvars[groups[fabric_group][0]]['node_type_keys'] | arista.avd.convert_dicts('key') | map(attribute='key') %} +{% set node_type_keys = hostvars[groups[fabric_group][0]]['node_type_keys'] | map(attribute='key') %} {% else %} {% set node_type_keys = ['spine', 'l3leaf', 'l2leaf', 'super_spine', 'overlay_controller'] %} {% endif %} @@ -70,8 +70,8 @@ ztp: {% for node_type in node_types | arista.avd.natural_sort %} # {{ node_type }} {# For NODE GROUPS entries #} -{% for node_group in node_types[node_type]['node_groups'] | arista.avd.convert_dicts('group') | arista.avd.natural_sort('group') %} -{% for node in node_group['nodes'] | arista.avd.convert_dicts('name') | arista.avd.natural_sort('name') %} +{% for node_group in node_types[node_type]['node_groups'] | arista.avd.natural_sort('group') %} +{% for node in node_group['nodes'] | arista.avd.natural_sort('name') %} {% if node.mac_address is arista.avd.defined %} - name: {{ node.name }} mac: '{{ node.mac_address }}' @@ -80,7 +80,7 @@ ztp: {% endfor %} {% endfor %} {# For NODES List #} -{% for node in node_types[node_type]['nodes'] | arista.avd.convert_dicts('name') | arista.avd.natural_sort('name') %} +{% for node in node_types[node_type]['nodes'] | arista.avd.natural_sort('name') %} {% if node.mac_address is arista.avd.defined %} - name: {{ node.name }} mac: '{{ node.mac_address }}' diff --git a/ansible_collections/arista/avd/roles/eos_designs/schemas/schema_fragments/ipv4_prefix_lists.schema.yml b/ansible_collections/arista/avd/roles/eos_designs/schemas/schema_fragments/ipv4_prefix_lists.schema.yml index 9e12e333d9f..ac3adee6733 100644 --- a/ansible_collections/arista/avd/roles/eos_designs/schemas/schema_fragments/ipv4_prefix_lists.schema.yml +++ b/ansible_collections/arista/avd/roles/eos_designs/schemas/schema_fragments/ipv4_prefix_lists.schema.yml @@ -10,8 +10,6 @@ keys: type: list primary_key: name description: IPv4 prefix-list catalog. - convert_types: - - dict items: type: dict keys: @@ -22,8 +20,6 @@ keys: type: list primary_key: sequence required: true - convert_types: - - dict items: type: dict keys: diff --git a/ansible_collections/arista/avd/roles/eos_designs/templates/documentation/connected-endpoints.j2 b/ansible_collections/arista/avd/roles/eos_designs/templates/documentation/connected-endpoints.j2 index 7c33d8a481f..f5eeaf97f37 100644 --- a/ansible_collections/arista/avd/roles/eos_designs/templates/documentation/connected-endpoints.j2 +++ b/ansible_collections/arista/avd/roles/eos_designs/templates/documentation/connected-endpoints.j2 @@ -25,11 +25,11 @@ {% for node in groups[fabric_name] | arista.avd.natural_sort %} {% set node_hostvars = hostvars[node] %} {% set node_facts = avd_switch_facts[node] %} -{% do all_connected_endpoints_keys.extend(node_hostvars.connected_endpoints_keys | arista.avd.convert_dicts("key") | arista.avd.default(default_connected_endpoints_keys)) %} +{% do all_connected_endpoints_keys.extend(node_hostvars.connected_endpoints_keys | arista.avd.default(default_connected_endpoints_keys)) %} {# Populate profiles #} -{% do all_profiles.extend(node_hostvars.port_profiles | arista.avd.convert_dicts("profile") | arista.avd.default([])) %} +{% do all_profiles.extend(node_hostvars.port_profiles | arista.avd.default([])) %} {# Populate endpoints #} -{% for ethernet_interface in node_hostvars.ethernet_interfaces | arista.avd.convert_dicts("name") | arista.avd.natural_sort("name") %} +{% for ethernet_interface in node_hostvars.ethernet_interfaces | arista.avd.natural_sort("name") %} {% set peer_type = ethernet_interface.peer_type | arista.avd.default('undefined') %} {% if peer_type in all_connected_endpoints_keys | map(attribute='type') | list %} {% if ethernet_interface.channel_group.id is arista.avd.defined %} diff --git a/ansible_collections/arista/avd/roles/eos_designs/templates/documentation/fabric-documentation.j2 b/ansible_collections/arista/avd/roles/eos_designs/templates/documentation/fabric-documentation.j2 index f4b0ba82d98..ed2d2f1a055 100644 --- a/ansible_collections/arista/avd/roles/eos_designs/templates/documentation/fabric-documentation.j2 +++ b/ansible_collections/arista/avd/roles/eos_designs/templates/documentation/fabric-documentation.j2 @@ -4,7 +4,7 @@ that can be found in the LICENSE file. #} {% if node_type_keys is arista.avd.defined %} -{% set node_types = node_type_keys | arista.avd.convert_dicts('key') | map(attribute="type") %} +{% set node_types = node_type_keys | map(attribute="type") %} {% else %} {% set default_node_types = { "l3ls-evpn": ["spine", "l3leaf", "l2leaf", "super-spine", "overlay-controller", "wan_router", "wan_rr"], @@ -44,14 +44,14 @@ {% set fabric_switch.provisioned = 'Not Available' if node_hostvars.is_deployed is arista.avd.defined(false) else 'Provisioned' %} {% set fabric_switch.serial_number = node_facts.switch.serial_number | arista.avd.default("-") %} {% if node_hostvars.loopback_interfaces is arista.avd.defined %} -{% set loopback0 = (node_hostvars.loopback_interfaces | arista.avd.convert_dicts("name") | selectattr("name", "arista.avd.defined", "Loopback0"))[0] | arista.avd.default %} +{% set loopback0 = (node_hostvars.loopback_interfaces | selectattr("name", "arista.avd.defined", "Loopback0"))[0] | arista.avd.default %} {% if loopback0.ip_address is arista.avd.defined %} {% set fabric_switch.loopback0_ip_address = loopback0.ip_address %} {% do assigned_ip_addresses.append(fabric_switch.loopback0_ip_address) %} {% endif %} {% endif %} {% if node_hostvars.loopback_interfaces is arista.avd.defined %} -{% set loopback1 = (node_hostvars.loopback_interfaces | arista.avd.convert_dicts("name") | selectattr("name", "arista.avd.defined", "Loopback1"))[0] | arista.avd.default %} +{% set loopback1 = (node_hostvars.loopback_interfaces | selectattr("name", "arista.avd.defined", "Loopback1"))[0] | arista.avd.default %} {% if loopback1.ip_address is arista.avd.defined %} {% set fabric_switch.loopback1_ip_address = loopback1.ip_address %} {% do assigned_ip_addresses.append(fabric_switch.loopback1_ip_address) %} @@ -63,7 +63,7 @@ {% endif %} {% do fabric_switches.append(fabric_switch) %} {# Populate topology_links #} -{% for ethernet_interface in node_hostvars.ethernet_interfaces | arista.avd.convert_dicts("name") | arista.avd.natural_sort("name") %} +{% for ethernet_interface in node_hostvars.ethernet_interfaces | arista.avd.natural_sort("name") %} {% if ethernet_interface.peer_type | arista.avd.default('undefined') in node_types + ['mlag_peer'] %} {% do interfaces_done.append(node ~ "," ~ ethernet_interface.name) %} {% set peer = ethernet_interface.peer %} @@ -83,7 +83,7 @@ {% set topology_link.peer_ip_address = none %} {% set peer_hostvars = hostvars[peer] | arista.avd.default %} {% if peer_hostvars.ethernet_interfaces is arista.avd.defined %} -{% set peer_ethernet_interface = (peer_hostvars.ethernet_interfaces | arista.avd.convert_dicts("name") | selectattr("name", "arista.avd.defined", peer_interface))[0] | arista.avd.default %} +{% set peer_ethernet_interface = (peer_hostvars.ethernet_interfaces | selectattr("name", "arista.avd.defined", peer_interface))[0] | arista.avd.default %} {% if peer_ethernet_interface.ip_address is arista.avd.defined %} {% set topology_link.peer_ip_address = peer_ethernet_interface.ip_address %} {% do assigned_ip_addresses.append(topology_link.peer_ip_address) %} diff --git a/ansible_collections/arista/avd/roles/eos_designs/templates/documentation/fabric-p2p-links.j2 b/ansible_collections/arista/avd/roles/eos_designs/templates/documentation/fabric-p2p-links.j2 index 21894acfb02..a013792c783 100644 --- a/ansible_collections/arista/avd/roles/eos_designs/templates/documentation/fabric-p2p-links.j2 +++ b/ansible_collections/arista/avd/roles/eos_designs/templates/documentation/fabric-p2p-links.j2 @@ -6,7 +6,7 @@ Type,Node,Node Interface,Leaf IP Address,Peer Type,Peer Node,Peer Interface,Peer IP Address {% set interfaces_done = [] %} {% if node_type_keys is arista.avd.defined %} -{% set node_types = node_type_keys | arista.avd.convert_dicts('key') | map(attribute="type") %} +{% set node_types = node_type_keys | map(attribute="type") %} {% else %} {% set default_node_types = { "l3ls-evpn": ["spine", "l3leaf", "l2leaf", "super-spine", "overlay-controller"], @@ -19,7 +19,7 @@ Type,Node,Node Interface,Leaf IP Address,Peer Type,Peer Node,Peer Interface,Peer {% set node_hostvars = hostvars[node] %} {% set node_facts = avd_switch_facts[node] %} {% if node_facts.switch.type | arista.avd.default('undefined') in node_types %} -{% for ethernet_interface in node_hostvars.ethernet_interfaces | arista.avd.convert_dicts("name") | arista.avd.natural_sort("name") %} +{% for ethernet_interface in node_hostvars.ethernet_interfaces | arista.avd.natural_sort("name") %} {% if ethernet_interface.type is arista.avd.defined('routed') %} {% if ethernet_interface.peer_type | arista.avd.default('undefined') in node_types %} {% do interfaces_done.append(node ~ "," ~ ethernet_interface.name) %} @@ -37,7 +37,7 @@ Type,Node,Node Interface,Leaf IP Address,Peer Type,Peer Node,Peer Interface,Peer {% set peer_ip_address = "" %} {% set peer_hostvars = hostvars[peer] | arista.avd.default %} {% if peer_hostvars.ethernet_interfaces is arista.avd.defined %} -{% set peer_ethernet_interface = (peer_hostvars.ethernet_interfaces | arista.avd.convert_dicts("name") | selectattr("name", "arista.avd.defined", peer_interface))[0] | arista.avd.default %} +{% set peer_ethernet_interface = (peer_hostvars.ethernet_interfaces | selectattr("name", "arista.avd.defined", peer_interface))[0] | arista.avd.default %} {% set peer_ip_address = peer_ethernet_interface.ip_address | arista.avd.default("") %} {% endif %} {% do csv_line.append(peer_ip_address) %} diff --git a/ansible_collections/arista/avd/roles/eos_designs/templates/documentation/fabric-topology.j2 b/ansible_collections/arista/avd/roles/eos_designs/templates/documentation/fabric-topology.j2 index adf7f3b6874..4a3ae8c6fee 100644 --- a/ansible_collections/arista/avd/roles/eos_designs/templates/documentation/fabric-topology.j2 +++ b/ansible_collections/arista/avd/roles/eos_designs/templates/documentation/fabric-topology.j2 @@ -5,7 +5,7 @@ #} Node Type,Node,Node Interface,Peer Type,Peer Node,Peer Interface,Node Interface Enabled {% if node_type_keys is arista.avd.defined %} -{% set node_types = node_type_keys | arista.avd.convert_dicts('key') | map(attribute="type") %} +{% set node_types = node_type_keys | map(attribute="type") %} {% else %} {% set default_node_types = { "l3ls-evpn": ["spine", "l3leaf", "l2leaf", "super-spine", "overlay-controller"], @@ -18,7 +18,7 @@ Node Type,Node,Node Interface,Peer Type,Peer Node,Peer Interface,Node Interface {% set node_hostvars = hostvars[node] %} {% set node_facts = avd_switch_facts[node] %} {% if node_facts.switch.type | arista.avd.default('undefined') in node_types %} -{% for ethernet_interface in node_hostvars.ethernet_interfaces | arista.avd.convert_dicts("name") | arista.avd.natural_sort("name") %} +{% for ethernet_interface in node_hostvars.ethernet_interfaces | arista.avd.natural_sort("name") %} {% set csv_line = [] %} {% do csv_line.append(node_facts.switch.type) %} {% do csv_line.append(node) %} diff --git a/python-avd/pyavd/_eos_designs/eos_designs_facts/vlans.py b/python-avd/pyavd/_eos_designs/eos_designs_facts/vlans.py index b322bd2627b..bcab93cf7f1 100644 --- a/python-avd/pyavd/_eos_designs/eos_designs_facts/vlans.py +++ b/python-avd/pyavd/_eos_designs/eos_designs_facts/vlans.py @@ -8,7 +8,7 @@ from typing import TYPE_CHECKING from pyavd._utils import get -from pyavd.j2filters import convert_dicts, list_compress, range_expand +from pyavd.j2filters import list_compress, range_expand if TYPE_CHECKING: from . import EosDesignsFacts @@ -84,7 +84,7 @@ def _local_endpoint_vlans_and_trunk_groups(self: EosDesignsFacts) -> tuple[set, vlans.add(self.shared_utils.inband_mgmt_vlan) for connected_endpoints_key in self.shared_utils.connected_endpoints_keys: - connected_endpoints = convert_dicts(get(self._hostvars, connected_endpoints_key["key"], default=[]), "name") + connected_endpoints = get(self._hostvars, connected_endpoints_key["key"], default=[]) for connected_endpoint in connected_endpoints: for adapter in connected_endpoint.get("adapters", []): adapter_settings = self.shared_utils.get_merged_adapter_settings(adapter) @@ -256,26 +256,14 @@ def _vlans(self: EosDesignsFacts) -> list[int]: for network_services_key in self.shared_utils.network_services_keys: tenants = get(self._hostvars, network_services_key["name"], default=[]) - # Support legacy data model by converting nested dict to list of dict - if isinstance(tenants, dict): - tenants = convert_dicts(tenants, "name") - for tenant in tenants: if not set(self.shared_utils.filter_tenants).intersection([tenant["name"], "all"]): # Not matching tenant filters. Skipping this tenant. continue vrfs = tenant.get("vrfs", []) - # Support legacy data model by converting nested dict to list of dict - if isinstance(vrfs, dict): - vrfs = convert_dicts(vrfs, "name") - for vrf in vrfs: svis = vrf.get("svis", []) - # Support legacy data model by converting nested dict to list of dict - if isinstance(svis, dict): - svis = convert_dicts(svis, "id") - for svi in svis: svi_tags = svi.get("tags", ["all"]) if "all" in match_tags or set(svi_tags).intersection(match_tags): @@ -297,10 +285,6 @@ def _vlans(self: EosDesignsFacts) -> list[int]: vlans.append(int(svi["id"])) l2vlans = tenant.get("l2vlans", []) - # Support legacy data model by converting nested dict to list of dict - if isinstance(l2vlans, dict): - l2vlans = convert_dicts(l2vlans, "id") - for l2vlan in l2vlans: l2vlan_tags = l2vlan.get("tags", ["all"]) if "all" in match_tags or set(l2vlan_tags).intersection(match_tags): diff --git a/python-avd/pyavd/_eos_designs/schema/eos_designs.schema.yml b/python-avd/pyavd/_eos_designs/schema/eos_designs.schema.yml index e5ae3478758..eac2f418a3a 100644 --- a/python-avd/pyavd/_eos_designs/schema/eos_designs.schema.yml +++ b/python-avd/pyavd/_eos_designs/schema/eos_designs.schema.yml @@ -495,8 +495,6 @@ keys: ' type: list primary_key: key - convert_types: - - dict items: type: dict keys: @@ -2050,8 +2048,6 @@ keys: network_services_keys: type: list primary_key: name - convert_types: - - dict description: 'Network Services can be grouped by using separate keys. The keys can be customized to provide a better better organization or grouping @@ -2098,8 +2094,6 @@ keys: to copy the defaults and modify them. ' - convert_types: - - dict primary_key: key items: type: dict @@ -3096,8 +3090,6 @@ keys: type: list primary_key: platform secondary_key: speeds - convert_types: - - dict description: Set Hardware Speed Groups per Platform. items: type: dict @@ -3110,8 +3102,6 @@ keys: type: list primary_key: speed secondary_key: speed_groups - convert_types: - - dict items: type: dict keys: @@ -3142,8 +3132,6 @@ keys: port_profiles: type: list primary_key: profile - convert_types: - - dict description: 'Optional profiles to share common settings for connected_endpoints and/or network_ports. @@ -3724,8 +3712,6 @@ keys: svi_profiles: type: list primary_key: profile - convert_types: - - dict description: 'Profiles to share common settings for SVIs under `.[].vrfs.svis`. Keys are the same used under SVIs. Keys defined under SVIs take precedence. @@ -5319,8 +5305,6 @@ $defs: connected_endpoints: type: list primary_key: name - convert_types: - - dict description: 'This should be applied to group_vars or host_vars where endpoints are connecting. @@ -5421,8 +5405,6 @@ $defs: keys: p2p_links_ip_pools: type: list - convert_types: - - dict primary_key: name secondary_key: ipv4_pool items: @@ -5444,8 +5426,6 @@ $defs: max: 31 p2p_links_profiles: type: list - convert_types: - - dict primary_key: name $ref: eos_designs#/$defs/p2p_links items: @@ -5472,8 +5452,6 @@ $defs: table: network-services-common-settings type: list primary_key: name - convert_types: - - dict items: type: dict keys: @@ -5581,8 +5559,6 @@ $defs: table: network-services-vrfs-bgp-settings type: list primary_key: name - convert_types: - - dict description: 'List of BGP peer groups definitions. This will configure BGP peer groups to be used inside the tenant VRF for @@ -5818,8 +5794,6 @@ $defs: table: network-services-vrfs-settings type: list primary_key: name - convert_types: - - dict description: 'VRFs will only be configured on a node if any of the underlying objects like `svis` or `l3_interfaces` apply to the node. @@ -5931,8 +5905,6 @@ $defs: ip_helpers: type: list primary_key: ip_helper - convert_types: - - dict description: IP helper for DHCP relay. items: type: dict @@ -6198,8 +6170,6 @@ $defs: type: list primary_key: id allow_duplicate_primary_key: true - convert_types: - - dict description: 'List of SVIs. This will create both the L3 SVI and L2 VLAN based on filters applied @@ -6262,8 +6232,6 @@ $defs: nodes: type: list primary_key: node - convert_types: - - dict items: type: dict $ref: eos_designs#/$defs/svi_settings @@ -6583,8 +6551,6 @@ $defs: type: list primary_key: ip_address allow_duplicate_primary_key: true - convert_types: - - dict description: 'List of BGP peer definitions. This will configure BGP neighbors inside the tenant VRF for peering @@ -6852,8 +6818,6 @@ $defs: type: list primary_key: id allow_duplicate_primary_key: true - convert_types: - - dict description: Define L2 network services organized by vlan id. items: type: dict @@ -8826,8 +8790,6 @@ $defs: node_groups: type: list description: Define variables related to all nodes part of this group. - convert_types: - - dict primary_key: group items: $ref: eos_designs#/$defs/node_type/keys/defaults @@ -8849,8 +8811,6 @@ $defs: nodes: description: Define variables per node. type: list - convert_types: - - dict primary_key: name items: $ref: eos_designs#/$defs/node_type/keys/defaults @@ -9222,8 +9182,6 @@ $defs: type: list primary_key: node secondary_key: interfaces - convert_types: - - dict items: type: dict keys: @@ -9268,8 +9226,6 @@ $defs: nodes: type: list primary_key: node - convert_types: - - dict description: 'Define node specific configuration, such as unique IP addresses. Any keys set here will be merged onto the SVI config, except `structured_config` @@ -9389,8 +9345,6 @@ $defs: ip_helpers: type: list primary_key: ip_helper - convert_types: - - dict description: IP helper for DHCP relay. items: type: dict diff --git a/python-avd/pyavd/_eos_designs/schema/schema_fragments/connected_endpoints_keys.schema.yml b/python-avd/pyavd/_eos_designs/schema/schema_fragments/connected_endpoints_keys.schema.yml index 7ed96b93452..c10cece0ba0 100644 --- a/python-avd/pyavd/_eos_designs/schema/schema_fragments/connected_endpoints_keys.schema.yml +++ b/python-avd/pyavd/_eos_designs/schema/schema_fragments/connected_endpoints_keys.schema.yml @@ -16,8 +16,6 @@ keys: The default values will be overridden if defining this key, so it is recommended to copy the defaults and modify them. type: list primary_key: key - convert_types: - - dict items: type: dict keys: diff --git a/python-avd/pyavd/_eos_designs/schema/schema_fragments/defs_connected_endpoints.schema.yml b/python-avd/pyavd/_eos_designs/schema/schema_fragments/defs_connected_endpoints.schema.yml index 450e1ef2fab..70c8807ab50 100644 --- a/python-avd/pyavd/_eos_designs/schema/schema_fragments/defs_connected_endpoints.schema.yml +++ b/python-avd/pyavd/_eos_designs/schema/schema_fragments/defs_connected_endpoints.schema.yml @@ -9,8 +9,6 @@ $defs: connected_endpoints: type: list primary_key: name - convert_types: - - dict description: | This should be applied to group_vars or host_vars where endpoints are connecting. `connected_endpoints_keys.key` is one of the keys under "connected_endpoints_keys". diff --git a/python-avd/pyavd/_eos_designs/schema/schema_fragments/defs_l3_edge.schema.yml b/python-avd/pyavd/_eos_designs/schema/schema_fragments/defs_l3_edge.schema.yml index 0709d779d25..160a95d30c3 100644 --- a/python-avd/pyavd/_eos_designs/schema/schema_fragments/defs_l3_edge.schema.yml +++ b/python-avd/pyavd/_eos_designs/schema/schema_fragments/defs_l3_edge.schema.yml @@ -11,8 +11,6 @@ $defs: keys: p2p_links_ip_pools: type: list - convert_types: - - dict primary_key: name secondary_key: ipv4_pool items: @@ -34,8 +32,6 @@ $defs: max: 31 p2p_links_profiles: type: list - convert_types: - - dict primary_key: name $ref: "eos_designs#/$defs/p2p_links" items: diff --git a/python-avd/pyavd/_eos_designs/schema/schema_fragments/defs_network_services.schema.yml b/python-avd/pyavd/_eos_designs/schema/schema_fragments/defs_network_services.schema.yml index b92a58bab7c..e3e3a2fee1d 100644 --- a/python-avd/pyavd/_eos_designs/schema/schema_fragments/defs_network_services.schema.yml +++ b/python-avd/pyavd/_eos_designs/schema/schema_fragments/defs_network_services.schema.yml @@ -11,8 +11,6 @@ $defs: table: network-services-common-settings type: list primary_key: name - convert_types: - - dict items: type: dict keys: @@ -88,8 +86,6 @@ $defs: table: network-services-vrfs-bgp-settings type: list primary_key: name - convert_types: - - dict description: | List of BGP peer groups definitions. This will configure BGP peer groups to be used inside the tenant VRF for peering with external devices. @@ -288,8 +284,6 @@ $defs: table: network-services-vrfs-settings type: list primary_key: name - convert_types: - - dict description: | VRFs will only be configured on a node if any of the underlying objects like `svis` or `l3_interfaces` apply to the node. @@ -370,8 +364,6 @@ $defs: ip_helpers: type: list primary_key: ip_helper - convert_types: - - dict description: IP helper for DHCP relay. items: type: dict @@ -577,8 +569,6 @@ $defs: type: list primary_key: id allow_duplicate_primary_key: True - convert_types: - - dict description: | List of SVIs. This will create both the L3 SVI and L2 VLAN based on filters applied to the node. @@ -623,8 +613,6 @@ $defs: nodes: type: list primary_key: node - convert_types: - - dict items: type: dict $ref: "eos_designs#/$defs/svi_settings" @@ -911,8 +899,6 @@ $defs: type: list primary_key: ip_address allow_duplicate_primary_key: True - convert_types: - - dict description: | List of BGP peer definitions. This will configure BGP neighbors inside the tenant VRF for peering with external devices. @@ -1135,8 +1121,6 @@ $defs: type: list primary_key: id allow_duplicate_primary_key: True - convert_types: - - dict description: Define L2 network services organized by vlan id. items: type: dict diff --git a/python-avd/pyavd/_eos_designs/schema/schema_fragments/defs_node_type.schema.yml b/python-avd/pyavd/_eos_designs/schema/schema_fragments/defs_node_type.schema.yml index 1421f270cf8..bc2a8d387c6 100644 --- a/python-avd/pyavd/_eos_designs/schema/schema_fragments/defs_node_type.schema.yml +++ b/python-avd/pyavd/_eos_designs/schema/schema_fragments/defs_node_type.schema.yml @@ -1402,8 +1402,6 @@ $defs: node_groups: type: list description: Define variables related to all nodes part of this group. - convert_types: - - dict primary_key: group items: "$ref": "eos_designs#/$defs/node_type/keys/defaults" @@ -1421,8 +1419,6 @@ $defs: nodes: description: Define variables per node. type: list - convert_types: - - dict primary_key: name items: "$ref": "eos_designs#/$defs/node_type/keys/defaults" diff --git a/python-avd/pyavd/_eos_designs/schema/schema_fragments/defs_p2p_links.schema.yml b/python-avd/pyavd/_eos_designs/schema/schema_fragments/defs_p2p_links.schema.yml index 3ecce51292c..4ac4d3061f2 100644 --- a/python-avd/pyavd/_eos_designs/schema/schema_fragments/defs_p2p_links.schema.yml +++ b/python-avd/pyavd/_eos_designs/schema/schema_fragments/defs_p2p_links.schema.yml @@ -145,8 +145,6 @@ $defs: type: list primary_key: node secondary_key: interfaces - convert_types: - - dict items: type: dict keys: diff --git a/python-avd/pyavd/_eos_designs/schema/schema_fragments/defs_svi.schema.yml b/python-avd/pyavd/_eos_designs/schema/schema_fragments/defs_svi.schema.yml index 87745a7e773..31ae5b1bfb9 100644 --- a/python-avd/pyavd/_eos_designs/schema/schema_fragments/defs_svi.schema.yml +++ b/python-avd/pyavd/_eos_designs/schema/schema_fragments/defs_svi.schema.yml @@ -13,8 +13,6 @@ $defs: nodes: type: list primary_key: node - convert_types: - - dict description: | Define node specific configuration, such as unique IP addresses. Any keys set here will be merged onto the SVI config, except `structured_config` keys which will replace the `structured_config` set on SVI level. diff --git a/python-avd/pyavd/_eos_designs/schema/schema_fragments/defs_svi_settings.schema.yml b/python-avd/pyavd/_eos_designs/schema/schema_fragments/defs_svi_settings.schema.yml index c983ed1bf3e..8b86e6a835d 100644 --- a/python-avd/pyavd/_eos_designs/schema/schema_fragments/defs_svi_settings.schema.yml +++ b/python-avd/pyavd/_eos_designs/schema/schema_fragments/defs_svi_settings.schema.yml @@ -87,8 +87,6 @@ $defs: ip_helpers: type: list primary_key: ip_helper - convert_types: - - dict description: IP helper for DHCP relay. items: type: dict diff --git a/python-avd/pyavd/_eos_designs/schema/schema_fragments/network_services_keys.schema.yml b/python-avd/pyavd/_eos_designs/schema/schema_fragments/network_services_keys.schema.yml index f46c5bdf58f..e6864c18eba 100644 --- a/python-avd/pyavd/_eos_designs/schema/schema_fragments/network_services_keys.schema.yml +++ b/python-avd/pyavd/_eos_designs/schema/schema_fragments/network_services_keys.schema.yml @@ -9,8 +9,6 @@ keys: network_services_keys: type: list primary_key: name - convert_types: - - dict description: | Network Services can be grouped by using separate keys. The keys can be customized to provide a better better organization or grouping of your data. diff --git a/python-avd/pyavd/_eos_designs/schema/schema_fragments/node_type_keys.schema.yml b/python-avd/pyavd/_eos_designs/schema/schema_fragments/node_type_keys.schema.yml index 4cd3e4c861a..82d5b734bed 100644 --- a/python-avd/pyavd/_eos_designs/schema/schema_fragments/node_type_keys.schema.yml +++ b/python-avd/pyavd/_eos_designs/schema/schema_fragments/node_type_keys.schema.yml @@ -13,8 +13,6 @@ keys: This allows for complete customization of the fabric layout and functionality. `node_type_keys` should be defined in top level group_var for the fabric. The default values will be overridden if defining this key, so it is recommended to copy the defaults and modify them. - convert_types: - - dict primary_key: key items: type: dict diff --git a/python-avd/pyavd/_eos_designs/schema/schema_fragments/platform_speed_groups.schema.yml b/python-avd/pyavd/_eos_designs/schema/schema_fragments/platform_speed_groups.schema.yml index d34776fc845..d7d7de0be0b 100644 --- a/python-avd/pyavd/_eos_designs/schema/schema_fragments/platform_speed_groups.schema.yml +++ b/python-avd/pyavd/_eos_designs/schema/schema_fragments/platform_speed_groups.schema.yml @@ -12,8 +12,6 @@ keys: type: list primary_key: platform secondary_key: speeds - convert_types: - - dict description: Set Hardware Speed Groups per Platform. items: type: dict @@ -26,8 +24,6 @@ keys: type: list primary_key: speed secondary_key: speed_groups - convert_types: - - dict items: type: dict keys: diff --git a/python-avd/pyavd/_eos_designs/schema/schema_fragments/port_profiles.schema.yml b/python-avd/pyavd/_eos_designs/schema/schema_fragments/port_profiles.schema.yml index be1737f537a..dfc1ea941a1 100644 --- a/python-avd/pyavd/_eos_designs/schema/schema_fragments/port_profiles.schema.yml +++ b/python-avd/pyavd/_eos_designs/schema/schema_fragments/port_profiles.schema.yml @@ -9,8 +9,6 @@ keys: port_profiles: type: list primary_key: profile - convert_types: - - dict description: | Optional profiles to share common settings for connected_endpoints and/or network_ports. Keys are the same used under endpoints adapters. Keys defined under endpoints adapters take precedence. diff --git a/python-avd/pyavd/_eos_designs/schema/schema_fragments/svi_profiles.schema.yml b/python-avd/pyavd/_eos_designs/schema/schema_fragments/svi_profiles.schema.yml index ca39e7308fa..7930f058f00 100644 --- a/python-avd/pyavd/_eos_designs/schema/schema_fragments/svi_profiles.schema.yml +++ b/python-avd/pyavd/_eos_designs/schema/schema_fragments/svi_profiles.schema.yml @@ -9,8 +9,6 @@ keys: svi_profiles: type: list primary_key: profile - convert_types: - - dict description: | Profiles to share common settings for SVIs under `.[].vrfs.svis`. Keys are the same used under SVIs. Keys defined under SVIs take precedence. diff --git a/python-avd/pyavd/_eos_designs/shared_utils/connected_endpoints_keys.py b/python-avd/pyavd/_eos_designs/shared_utils/connected_endpoints_keys.py index 5013681f700..cc019206ddd 100644 --- a/python-avd/pyavd/_eos_designs/shared_utils/connected_endpoints_keys.py +++ b/python-avd/pyavd/_eos_designs/shared_utils/connected_endpoints_keys.py @@ -7,7 +7,6 @@ from typing import TYPE_CHECKING from pyavd._utils import get -from pyavd.j2filters import convert_dicts if TYPE_CHECKING: from . import SharedUtils @@ -46,5 +45,5 @@ def connected_endpoints_keys(self: SharedUtils) -> list: """ connected_endpoints_keys = [] # Support legacy data model by converting nested dict to list of dict - connected_endpoints_keys = convert_dicts(get(self.hostvars, "connected_endpoints_keys", default=DEFAULT_CONNECTED_ENDPOINTS_KEYS), "key") + connected_endpoints_keys = get(self.hostvars, "connected_endpoints_keys", default=DEFAULT_CONNECTED_ENDPOINTS_KEYS) return [entry for entry in connected_endpoints_keys if entry.get("key") is not None and self.hostvars.get(entry["key"]) is not None] diff --git a/python-avd/pyavd/_eos_designs/shared_utils/filtered_tenants.py b/python-avd/pyavd/_eos_designs/shared_utils/filtered_tenants.py index 573f6a3941e..b7d6e001bf3 100644 --- a/python-avd/pyavd/_eos_designs/shared_utils/filtered_tenants.py +++ b/python-avd/pyavd/_eos_designs/shared_utils/filtered_tenants.py @@ -8,7 +8,7 @@ from pyavd._errors import AristaAvdError, AristaAvdMissingVariableError from pyavd._utils import default, get, get_item, merge, unique -from pyavd.j2filters import convert_dicts, natural_sort, range_expand +from pyavd.j2filters import natural_sort, range_expand if TYPE_CHECKING: from . import SharedUtils @@ -36,7 +36,7 @@ def filtered_tenants(self: SharedUtils) -> list[dict]: filtered_tenants = [] filter_tenants = self.filter_tenants for network_services_key in self.network_services_keys: - tenants = convert_dicts(get(self.hostvars, network_services_key["name"]), "name") + tenants = get(self.hostvars, network_services_key["name"]) filtered_tenants.extend( {**tenant, "l2vlans": self.filtered_l2vlans(tenant), "vrfs": self.filtered_vrfs(tenant)} for tenant in tenants @@ -91,7 +91,7 @@ def filtered_l2vlans(self: SharedUtils, tenant: dict) -> list[dict]: if "l2vlans" not in tenant: return [] - l2vlans: list[dict] = natural_sort(convert_dicts(tenant["l2vlans"], "id"), "id") + l2vlans: list[dict] = natural_sort(tenant["l2vlans"], "id") if tenant_evpn_vlan_bundle := get(tenant, "evpn_vlan_bundle"): for l2vlan in l2vlans: @@ -192,7 +192,7 @@ def filtered_vrfs(self: SharedUtils, tenant: dict) -> list[dict]: """ filtered_vrfs = [] - vrfs: list[dict] = natural_sort(convert_dicts(tenant.get("vrfs", []), "name"), "name") + vrfs: list[dict] = natural_sort(tenant.get("vrfs", []), "name") for original_vrf in vrfs: if not self.is_accepted_vrf(original_vrf): continue @@ -200,7 +200,7 @@ def filtered_vrfs(self: SharedUtils, tenant: dict) -> list[dict]: # Copying original_vrf and setting "tenant" for use by child objects like SVIs vrf = {**original_vrf, "tenant": tenant["name"]} - bgp_peers = natural_sort(convert_dicts(vrf.get("bgp_peers"), "ip_address"), "ip_address") + bgp_peers = natural_sort(vrf.get("bgp_peers"), "ip_address") vrf["bgp_peers"] = [bgp_peer for bgp_peer in bgp_peers if self.hostname in bgp_peer.get("nodes", [])] vrf["static_routes"] = [route for route in get(vrf, "static_routes", default=[]) if self.hostname in get(route, "nodes", default=[self.hostname])] vrf["ipv6_static_routes"] = [ @@ -276,11 +276,11 @@ def svi_profiles(self: SharedUtils) -> list[dict]: The key "nodes" is filtered to only contain one item with the relevant dict from "nodes" or {} """ - svi_profiles = convert_dicts(get(self.hostvars, "svi_profiles", default=[]), "profile") + svi_profiles = get(self.hostvars, "svi_profiles", default=[]) return [ { **svi_profile, - "nodes": [get_item(convert_dicts(svi_profile.get("nodes", []), "node"), "node", self.hostname, default={})], + "nodes": [get_item(svi_profile.get("nodes", []), "node", self.hostname, default={})], } for svi_profile in svi_profiles ] @@ -304,7 +304,7 @@ def get_merged_svi_config(self: SharedUtils, svi: dict) -> list[dict]: filtered_svi = { **svi, - "nodes": [get_item(convert_dicts(svi.get("nodes", []), "node"), "node", self.hostname, default={})], + "nodes": [get_item(svi.get("nodes", []), "node", self.hostname, default={})], } if (svi_profile_name := filtered_svi.get("profile")) is not None: @@ -358,7 +358,7 @@ def filtered_svis(self: SharedUtils, vrf: dict) -> list[dict]: if not (self.network_services_l2 or self.network_services_l2_as_subint): return [] - svis: list[dict] = natural_sort(convert_dicts(vrf.get("svis", []), "id"), "id") + svis: list[dict] = natural_sort(vrf.get("svis", []), "id") svis = [svi for svi in svis if self.is_accepted_vlan(svi)] # Handle svi_profile inheritance @@ -424,7 +424,7 @@ def get_additional_svi_config(svi_config: dict, svi: dict, vrf: dict) -> None: The given svi_config is updated in-place. """ - svi_ip_helpers: list[dict] = convert_dicts(default(svi.get("ip_helpers"), vrf.get("ip_helpers"), []), "ip_helper") + svi_ip_helpers: list[dict] = default(svi.get("ip_helpers"), vrf.get("ip_helpers"), []) if svi_ip_helpers: svi_config["ip_helpers"] = [ {"ip_helper": svi_ip_helper["ip_helper"], "source_interface": svi_ip_helper.get("source_interface"), "vrf": svi_ip_helper.get("source_vrf")} diff --git a/python-avd/pyavd/_eos_designs/shared_utils/misc.py b/python-avd/pyavd/_eos_designs/shared_utils/misc.py index c2ec172a131..8f04cbc4202 100644 --- a/python-avd/pyavd/_eos_designs/shared_utils/misc.py +++ b/python-avd/pyavd/_eos_designs/shared_utils/misc.py @@ -9,7 +9,7 @@ from pyavd._errors import AristaAvdError, AristaAvdMissingVariableError from pyavd._utils import default, get -from pyavd.j2filters import convert_dicts, natural_sort, range_expand +from pyavd.j2filters import natural_sort, range_expand if TYPE_CHECKING: from pyavd._eos_designs.eos_designs_facts import EosDesignsFacts @@ -259,9 +259,7 @@ def network_services_keys(self: SharedUtils) -> list[dict]: @cached_property def port_profiles(self: SharedUtils) -> list: - port_profiles = get(self.hostvars, "port_profiles", default=[]) - # Support legacy data model by converting nested dict to list of dict - return convert_dicts(port_profiles, "profile") + return get(self.hostvars, "port_profiles", default=[]) @cached_property def uplink_interface_speed(self: SharedUtils) -> str | None: diff --git a/python-avd/pyavd/_eos_designs/shared_utils/node_type_keys.py b/python-avd/pyavd/_eos_designs/shared_utils/node_type_keys.py index 772c4a5d59d..88d60a6ea23 100644 --- a/python-avd/pyavd/_eos_designs/shared_utils/node_type_keys.py +++ b/python-avd/pyavd/_eos_designs/shared_utils/node_type_keys.py @@ -8,7 +8,6 @@ from pyavd._errors import AristaAvdMissingVariableError from pyavd._utils import get -from pyavd.j2filters import convert_dicts if TYPE_CHECKING: from . import SharedUtils @@ -177,8 +176,7 @@ def node_type_keys(self: SharedUtils) -> list: """NOTE: This method is called _before_ any schema validation, since we need to resolve node_type_keys dynamically.""" design_type = get(self.hostvars, "design.type", default="l3ls-evpn") default_node_type_keys_for_our_design = get(DEFAULT_NODE_TYPE_KEYS, design_type) - node_type_keys = get(self.hostvars, "node_type_keys", default=default_node_type_keys_for_our_design) - return convert_dicts(node_type_keys, "key") + return get(self.hostvars, "node_type_keys", default=default_node_type_keys_for_our_design) @cached_property def node_type_key_data(self: SharedUtils) -> dict: diff --git a/python-avd/pyavd/_eos_designs/shared_utils/switch_data.py b/python-avd/pyavd/_eos_designs/shared_utils/switch_data.py index c23c9d6bd23..79d3d6670fb 100644 --- a/python-avd/pyavd/_eos_designs/shared_utils/switch_data.py +++ b/python-avd/pyavd/_eos_designs/shared_utils/switch_data.py @@ -7,7 +7,6 @@ from typing import TYPE_CHECKING from pyavd._utils import get, merge -from pyavd.j2filters import convert_dicts if TYPE_CHECKING: from . import SharedUtils @@ -49,16 +48,16 @@ def switch_data(self: SharedUtils) -> dict: node_type_key = self.node_type_key_data["key"] node_type_config = get(self.hostvars, f"{node_type_key}", required=True) - nodes = convert_dicts(node_type_config.get("nodes", []), "name") + nodes = node_type_config.get("nodes", []) for node in nodes: if hostname == node["name"]: node_config = node break if not node_config: - node_groups = convert_dicts(node_type_config.get("node_groups", []), "group") + node_groups = node_type_config.get("node_groups", []) for node_group in node_groups: - nodes = convert_dicts(node_group.get("nodes", []), "name") + nodes = node_group.get("nodes", []) node_group["nodes"] = nodes for node in nodes: if hostname == node["name"]: diff --git a/python-avd/pyavd/_eos_designs/structured_config/base/__init__.py b/python-avd/pyavd/_eos_designs/structured_config/base/__init__.py index 3bf47f92aa1..726ac4e2a39 100644 --- a/python-avd/pyavd/_eos_designs/structured_config/base/__init__.py +++ b/python-avd/pyavd/_eos_designs/structured_config/base/__init__.py @@ -8,7 +8,7 @@ from pyavd._eos_designs.avdfacts import AvdFacts from pyavd._errors import AristaAvdMissingVariableError from pyavd._utils import get, strip_null_from_data -from pyavd.j2filters import convert_dicts, natural_sort +from pyavd.j2filters import natural_sort from .ntp import NtpMixin from .snmp_server import SnmpServerMixin @@ -214,12 +214,9 @@ def hardware(self) -> dict | None: return None tmp_speed_groups = {} - # converting nested dict to list of dict to support avd_v4.0 - platform_speed_groups = convert_dicts(platform_speed_groups, "platform", "speeds") for platform_item in platform_speed_groups: if platform_item["platform"] == switch_platform: - # converting nested dict to list of dict to support avd_v4.0 - speeds = convert_dicts(platform_item.get("speeds"), "speed", "speed_groups") + speeds = platform_item.get("speeds") for speed in natural_sort(speeds, "speed"): for speed_group in speed["speed_groups"]: tmp_speed_groups[speed_group] = speed["speed"] @@ -407,7 +404,7 @@ def local_users(self) -> list | None: if (local_users := get(self._hostvars, "local_users")) is None: return None - return natural_sort(convert_dicts(local_users, "name"), "name") + return natural_sort(local_users, "name") @cached_property def clock(self) -> dict | None: diff --git a/python-avd/pyavd/_eos_designs/structured_config/connected_endpoints/utils.py b/python-avd/pyavd/_eos_designs/structured_config/connected_endpoints/utils.py index ecff3a9b23d..29124c9fe02 100644 --- a/python-avd/pyavd/_eos_designs/structured_config/connected_endpoints/utils.py +++ b/python-avd/pyavd/_eos_designs/structured_config/connected_endpoints/utils.py @@ -10,7 +10,6 @@ from pyavd._errors import AristaAvdError from pyavd._utils import get, get_item, short_esi_to_route_target -from pyavd.j2filters import convert_dicts if TYPE_CHECKING: from . import AvdStructuredConfigConnectedEndpoints @@ -32,7 +31,7 @@ def _filtered_connected_endpoints(self: AvdStructuredConfigConnectedEndpoints) - """ filtered_connected_endpoints = [] for connected_endpoints_key in self.shared_utils.connected_endpoints_keys: - connected_endpoints = convert_dicts(get(self._hostvars, connected_endpoints_key["key"], default=[]), "name") + connected_endpoints = get(self._hostvars, connected_endpoints_key["key"], default=[]) for connected_endpoint in connected_endpoints: if "adapters" not in connected_endpoint: continue diff --git a/python-avd/pyavd/_eos_designs/structured_config/core_interfaces_and_l3_edge/utils.py b/python-avd/pyavd/_eos_designs/structured_config/core_interfaces_and_l3_edge/utils.py index cffd8db20e5..1ebc3cd6a74 100644 --- a/python-avd/pyavd/_eos_designs/structured_config/core_interfaces_and_l3_edge/utils.py +++ b/python-avd/pyavd/_eos_designs/structured_config/core_interfaces_and_l3_edge/utils.py @@ -12,7 +12,6 @@ from pyavd._errors import AristaAvdMissingVariableError from pyavd._utils import default, get, get_item, merge -from pyavd.j2filters import convert_dicts if TYPE_CHECKING: from . import AvdStructuredConfigCoreInterfacesAndL3Edge @@ -152,8 +151,6 @@ def _get_p2p_data(self: AvdStructuredConfigCoreInterfacesAndL3Edge, p2p_link: di } node_child_interfaces = get(p2p_link, "port_channel.nodes_child_interfaces") - # Convert to new data models - node_child_interfaces = convert_dicts(node_child_interfaces, primary_key="node", secondary_key="interfaces") if (node_data := get_item(node_child_interfaces, "node", self.shared_utils.hostname)) is not None and ( member_interfaces := node_data.get("interfaces") ):