diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/router-isis-new.md b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/router-isis-new.md index 4f6715f5cc1..6768c4a09b6 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/router-isis-new.md +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/router-isis-new.md @@ -49,7 +49,6 @@ interface Management1 | Interface | Description | Mode | VLANs | Native VLAN | Trunk Group | Channel-Group | | --------- | ----------- | ---- | ----- | ----------- | ----------- | ------------- | -| Ethernet3 | MLAG_PEER_EAPI-LEAF1B_Ethernet3 | *access | *- | *- | *- | 3 | *Inherited from Port-Channel Interface diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/router-isis.md b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/router-isis.md index ab4280e50bc..f51311b1269 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/router-isis.md +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/router-isis.md @@ -50,7 +50,6 @@ interface Management1 | Interface | Description | Mode | VLANs | Native VLAN | Trunk Group | Channel-Group | | --------- | ----------- | ---- | ----- | ----------- | ----------- | ------------- | -| Ethernet3 | MLAG_PEER_EAPI-LEAF1B_Ethernet3 | *access | *- | *- | *- | 3 | *Inherited from Port-Channel Interface diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/address-locking.yml b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/address-locking.yml index 77faefb1d81..d28fbf9d30d 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/address-locking.yml +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/address-locking.yml @@ -17,17 +17,20 @@ address_locking: ethernet_interfaces: - name: Ethernet1 + type: switched description: Address Locking Interface Testing 1 address_locking: ipv4: true - name: Ethernet2 + type: switched description: Address Locking Interface Testing 2 address_locking: ipv4: true ipv6: true - name: Ethernet3 + type: switched description: Address Locking Interface Testing 3 address_locking: ipv4: false diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/ethernet-interfaces.yml b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/ethernet-interfaces.yml index f7b6a7174b1..d8c60fa029e 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/ethernet-interfaces.yml +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/ethernet-interfaces.yml @@ -64,6 +64,7 @@ ethernet_interfaces: version: 2 - name: Ethernet2 + type: switched peer: SRV-POD03 peer_interface: Eth1 peer_type: server @@ -343,6 +344,7 @@ ethernet_interfaces: vlan: 70 - name: Ethernet14 + type: switched logging: event: link_status: true @@ -354,12 +356,14 @@ ethernet_interfaces: vlans: 110-111,210-211 - name: Ethernet15 + type: switched description: PVLAN Promiscuous Access - only one secondary mode: access vlans: 110 pvlan_mapping: 111 - name: Ethernet16 + type: switched description: PVLAN Promiscuous Trunk - vlan translation out mode: trunk vlans: 110-112 @@ -369,6 +373,7 @@ ethernet_interfaces: to: 110 - name: Ethernet17 + type: switched description: PVLAN Secondary Trunk mode: trunk vlans: 110-112 @@ -384,6 +389,7 @@ ethernet_interfaces: input: MyLANServicePolicy - name: Ethernet19 + type: switched description: Switched port with no LLDP rx/tx mode: access vlans: 110 @@ -400,6 +406,7 @@ ethernet_interfaces: receive: false - name: Ethernet21 + type: switched description: 200MBit/s shape qos: trust: disabled @@ -407,22 +414,26 @@ ethernet_interfaces: rate: "200000 kbps" - name: Ethernet22 + type: switched description: 10% shape shape: rate: "10 percent" - name: Ethernet23 + type: switched description: Error-correction encoding error_correction_encoding: fire_code: true reed_solomon: true - name: Ethernet24 + type: switched description: Disable error-correction encoding error_correction_encoding: enabled: false - name: Ethernet25 + type: switched description: Molecule MAC mac_access_group_in: MAC_ACL_IN mac_access_group_out: MAC_ACL_OUT @@ -485,6 +496,7 @@ ethernet_interfaces: client: true - name: Ethernet27 + type: switched description: EVPN-Vxlan single-active redundancy evpn_ethernet_segment: identifier: "0000:0000:0000:0102:0304" @@ -498,6 +510,7 @@ ethernet_interfaces: candidate_reachability_required: true - name: Ethernet28 + type: switched description: EVPN-MPLS multihoming evpn_ethernet_segment: identifier: "0000:0000:0000:0102:0305" @@ -507,35 +520,41 @@ ethernet_interfaces: tunnel_flood_filter_time: 100 - name: Ethernet29 + type: switched description: DOT1X Testing - auto phone true dot1x: port_control: auto port_control_force_authorized_phone: true - name: Ethernet30 + type: switched description: DOT1X Testing - force-authorized phone false dot1x: port_control: force-authorized port_control_force_authorized_phone: false - name: Ethernet31 + type: switched description: DOT1X Testing - force-unauthorized - no phone dot1x: port_control: force-unauthorized - name: Ethernet32 + type: switched description: DOT1X Testing - auto reauthentication dot1x: port_control: auto reauthentication: true - name: Ethernet33 + type: switched description: DOT1X Testing - pae mode authenticator dot1x: pae: mode: authenticator - name: Ethernet34 + type: switched description: DOT1X Testing - authentication_failure allow dot1x: authentication_failure: @@ -543,24 +562,28 @@ ethernet_interfaces: allow_vlan: 800 - name: Ethernet35 + type: switched description: DOT1X Testing - authentication_failure drop dot1x: authentication_failure: action: drop - name: Ethernet36 + type: switched description: DOT1X Testing - host-mode single-host dot1x: host_mode: mode: single-host - name: Ethernet37 + type: switched description: DOT1X Testing - host-mode multi-host dot1x: host_mode: mode: multi-host - name: Ethernet38 + type: switched description: DOT1X Testing - host-mode multi-host authenticated dot1x: host_mode: @@ -568,6 +591,7 @@ ethernet_interfaces: multi_host_authenticated: true - name: Ethernet39 + type: switched description: DOT1X Testing - mac_based_authentication host-mode common true dot1x: mac_based_authentication: @@ -575,6 +599,7 @@ ethernet_interfaces: host_mode_common: true - name: Ethernet40 + type: switched description: DOT1X Testing - mac_based_authentication always dot1x: mac_based_authentication: @@ -582,6 +607,7 @@ ethernet_interfaces: always: true - name: Ethernet41 + type: switched description: DOT1X Testing - mac_based_authentication always and host-mode common dot1x: mac_based_authentication: @@ -590,12 +616,14 @@ ethernet_interfaces: host_mode_common: true - name: Ethernet42 + type: switched description: DOT1X Testing - mac_based_authentication dot1x: mac_based_authentication: enabled: true - name: Ethernet43 + type: switched description: DOT1X Testing - timeout values dot1x: timeout: @@ -606,6 +634,7 @@ ethernet_interfaces: tx_period: 6 - name: Ethernet44 + type: switched description: DOT1X Testing - reauthorization_request_limit dot1x: reauthorization_request_limit: 3 @@ -613,6 +642,7 @@ ethernet_interfaces: disabled: true - name: Ethernet45 + type: switched description: DOT1X Testing - all features dot1x: port_control: auto @@ -644,6 +674,7 @@ ethernet_interfaces: native_vlan_membership_egress: true - name: Ethernet46 + type: switched description: native-vlan-tag-precedence native_vlan_tag: true native_vlan: 100 @@ -669,17 +700,20 @@ ethernet_interfaces: load_interval: 5 - name: Ethernet50 + type: switched description: SFlow Interface Testing - SFlow ingress enabled sflow: enable: true - name: Ethernet51 + type: switched description: SFlow Interface Testing - SFlow egress enabled sflow: egress: enable: true - name: Ethernet52 + type: switched description: SFlow Interface Testing - SFlow ingress and egress unmodified enabled sflow: enable: true @@ -687,6 +721,7 @@ ethernet_interfaces: unmodified_enable: true - name: Ethernet53 + type: switched description: SFlow Interface Testing - SFlow ingress and egress disabled sflow: enable: false @@ -694,6 +729,7 @@ ethernet_interfaces: enable: false - name: Ethernet54 + type: switched description: SFlow Interface Testing - SFlow ingress and egress unmodified disabled sflow: enable: false @@ -714,6 +750,7 @@ ethernet_interfaces: local_interface: Loopback55 - name: Ethernet56 + type: switched description: Interface with poe commands and limit in class poe: priority: low @@ -730,6 +767,7 @@ ethernet_interfaces: negotiation_lldp: false - name: Ethernet57 + type: switched description: Interface with poe commands and limit in watts poe: disabled: false @@ -747,11 +785,13 @@ ethernet_interfaces: negotiation_lldp: true - name: Ethernet58 + type: switched description: Interface with poe disabled and no other poe keys poe: disabled: true - name: Ethernet60 + type: switched description: IP NAT Testing ip_nat: destination: @@ -933,6 +973,7 @@ ethernet_interfaces: dhcp_server_ipv6: true - name: Ethernet69 + type: switched description: IP NAT service-profile ip_nat: service_profile: TEST-NAT-PROFILE @@ -1011,11 +1052,14 @@ ethernet_interfaces: version: 3 # Transceiver Frequency - name: Ethernet67 + type: switched description: Custom_Transceiver_Frequency shutdown: false transceiver: frequency: 190050 + - name: Ethernet68 + type: switched description: Custom_Transceiver_Frequency shutdown: false transceiver: diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/flow-tracking.yml b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/flow-tracking.yml index c7a42283073..5ee76e9e59d 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/flow-tracking.yml +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/flow-tracking.yml @@ -96,19 +96,23 @@ flow_tracking: format_ipfix_standard_timestamps_counters: true ethernet_interfaces: - name: Ethernet40 + type: switched flow_tracker: sampled: T2 hardware: T2 - name: Ethernet41 + type: switched flow_tracker: sampled: T3 hardware: T3 - name: Ethernet42 + type: switched flow_tracker: sampled: T3 port_channel_interfaces: - name: Port-Channel42 + type: switched flow_tracker: sampled: T3 hardware: T3 diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/l2-protocol-forwarding.yml b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/l2-protocol-forwarding.yml index f95f7aa66a8..7281b89bef0 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/l2-protocol-forwarding.yml +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/l2-protocol-forwarding.yml @@ -64,12 +64,14 @@ l2_protocol: ethernet_interfaces: - name: Ethernet1 + type: switched description: L2PF test l2_protocol: forwarding_profile: TEST1 port_channel_interfaces: - name: Port-Channel1 + type: switched description: L2PF test l2_protocol: forwarding_profile: TEST2 diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/lldp.yml b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/lldp.yml index fcdc4579b4c..f43e85bf03f 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/lldp.yml +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/lldp.yml @@ -20,6 +20,7 @@ ethernet_interfaces: receive: false - name: Ethernet2 + type: switched description: Switched port with no LLDP rx/tx mode: access vlans: 110 diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/port-channel-interfaces.yml b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/port-channel-interfaces.yml index 2fdb93dd95c..480bc83b16b 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/port-channel-interfaces.yml +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/port-channel-interfaces.yml @@ -2,6 +2,7 @@ ### Port-Channel Interfaces ### port_channel_interfaces: - name: Port-Channel5 + type: switched description: DC1_L2LEAF1_Po1 vlans: 110,201 link_tracking_groups: @@ -51,6 +52,7 @@ port_channel_interfaces: - name: ACL2 version: 2 - name: Port-Channel15 + type: switched description: DC1_L2LEAF3_Po1 vlans: 110,201 link_tracking_groups: @@ -61,6 +63,7 @@ port_channel_interfaces: spanning_tree_guard: loop - name: Port-Channel16 + type: switched description: DC1_L2LEAF4_Po1 vlans: 110,201 mode: trunk @@ -69,6 +72,7 @@ port_channel_interfaces: spanning_tree_guard: disabled - name: Port-Channel3 + type: switched description: MLAG_PEER_DC1-LEAF1B_Po3 vlans: "2-4094" mode: trunk @@ -80,6 +84,7 @@ port_channel_interfaces: - MLAG - name: Port-Channel10 + type: switched description: SRV01_bond0 vlans: 2-3000 mode: trunk @@ -90,6 +95,7 @@ port_channel_interfaces: rate: 50 percent - name: Port-Channel50 + type: switched description: SRV-POD03_PortChanne1 vlans: 1-4000 mode: trunk @@ -99,6 +105,7 @@ port_channel_interfaces: lacp_id: 0303.0202.0101 - name: Port-Channel51 + type: switched description: ipv6_prefix vlans: 1-500 mode: trunk @@ -176,6 +183,7 @@ port_channel_interfaces: vlan: 70 - name: Port-Channel13 + type: switched description: EVPN-Vxlan single-active redundancy evpn_ethernet_segment: redundancy: single-active @@ -189,6 +197,7 @@ port_channel_interfaces: route_target: "00:00:01:02:03:04" - name: Port-Channel14 + type: switched description: EVPN-MPLS multihoming evpn_ethernet_segment: identifier: "0000:0000:0000:0102:0305" @@ -220,6 +229,7 @@ port_channel_interfaces: interval: 15 - name: Port-Channel101 + type: switched description: PVLAN Promiscuous Access - only one secondary mode: access vlans: 110 @@ -228,6 +238,7 @@ port_channel_interfaces: trust: disabled - name: Port-Channel102 + type: switched description: PVLAN Promiscuous Trunk - vlan translation out mode: trunk vlans: 110-112 @@ -237,12 +248,14 @@ port_channel_interfaces: to: 110 - name: Port-Channel103 + type: switched description: PVLAN Secondary Trunk mode: trunk vlans: 110-112 trunk_private_vlan_secondary: true - name: Port-Channel104 + type: switched description: LACP fallback individual mode: trunk vlans: 112 @@ -250,26 +263,31 @@ port_channel_interfaces: lacp_fallback_mode: individual - name: Port-Channel105 + type: switched description: bpdu disabled spanning_tree_bpduguard: disabled spanning_tree_bpdufilter: disabled - name: Port-Channel106 + type: switched description: bpdu enabled spanning_tree_bpduguard: enabled spanning_tree_bpdufilter: enabled - name: Port-Channel107 + type: switched description: bpdu true spanning_tree_bpduguard: true spanning_tree_bpdufilter: true - name: Port-Channel108 + type: switched description: bpdu false spanning_tree_bpduguard: false # No config should be rendered for this case spanning_tree_bpdufilter: false # No config should be rendered for this case - name: Port-Channel109 + type: switched description: Molecule ACLs mode: access vlans: 110 @@ -356,6 +374,7 @@ port_channel_interfaces: lacp_id: 0303.0202.0101 - name: Port-Channel112 + type: switched description: LACP fallback individual mode: trunk vlans: 112 @@ -382,6 +401,7 @@ port_channel_interfaces: interface: false - name: Port-Channel115 + type: switched description: native-vlan-tag-precedence native_vlan_tag: true native_vlan: 100 @@ -430,6 +450,7 @@ port_channel_interfaces: mode: trunk - name: Port-Channel130 + type: switched description: IP NAT Testing ip_nat: destination: @@ -599,6 +620,7 @@ ethernet_interfaces: mode: active - name: Ethernet11/2 + type: switched description: LAG Member LACP fallback LLDP ZTP VLAN channel_group: id: 112 diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/ignore-custom-keys-in-data-models.yml b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/ignore-custom-keys-in-data-models.yml index eb86502650e..56a57c2f009 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/ignore-custom-keys-in-data-models.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/ignore-custom-keys-in-data-models.yml @@ -19,5 +19,6 @@ _custom_key2: - custom_value2 ethernet_interfaces: - name: Ethernet1 + type: switched _custom_key3: custom_dict3: custom_value3 diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/platform_settings.yml b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/platform_settings.yml index bbb461b8f65..2faa7829ed9 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/platform_settings.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/platform_settings.yml @@ -23,4 +23,5 @@ ip_igmp_snooping: globally_enabled: true ethernet_interfaces: - name: Ethernet12 + type: switched description: Interface Created from platform_settings.structured_config diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/inventory/host_vars/ignore-custom-keys-in-data-models.yml b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/inventory/host_vars/ignore-custom-keys-in-data-models.yml index 992ed840fd7..fd7dac3f394 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/inventory/host_vars/ignore-custom-keys-in-data-models.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/inventory/host_vars/ignore-custom-keys-in-data-models.yml @@ -13,5 +13,6 @@ l2leaf: _custom_key2: [custom_value2] ethernet_interfaces: - name: "Ethernet1" + type: switched _custom_key3: custom_dict3: custom_value3 diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/inventory/host_vars/platform_settings.yml b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/inventory/host_vars/platform_settings.yml index 4c1ca3a4bf6..c6216cd8c75 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/inventory/host_vars/platform_settings.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/inventory/host_vars/platform_settings.yml @@ -15,4 +15,5 @@ platform_settings: structured_config: ethernet_interfaces: - name: Ethernet12 + type: switched description: Interface Created from platform_settings.structured_config diff --git a/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/ethernet-interfaces.j2 b/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/ethernet-interfaces.j2 index 35b4fbdc66d..d7a43d4e661 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/ethernet-interfaces.j2 +++ b/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/ethernet-interfaces.j2 @@ -20,7 +20,7 @@ {% set port_channel_interface = port_channel_interfaces | arista.avd.default([]) | selectattr('name', 'arista.avd.defined', port_channel_interface_name) | first %} -{% if port_channel_interface.type | arista.avd.default('switched') == 'switched' %} +{% if port_channel_interface.type is arista.avd.defined('switched') %} {% set description = ethernet_interface.description | arista.avd.default("-") %} {% set mode = port_channel_interface.mode | arista.avd.default("access") %} {% set vlans = port_channel_interface.vlans | arista.avd.default('-') %} @@ -42,7 +42,7 @@ {% endif %} | {{ ethernet_interface.name }} | {{ description }} | *{{ mode }} | *{{ vlans }} | *{{ native_vlan }} | *{{ l2.trunk_groups }} | {{ channel_group }} | {% endif %} -{% elif ethernet_interface.type | arista.avd.default('switched') == 'switched' %} +{% elif ethernet_interface.type is arista.avd.defined('switched') %} {% set description = ethernet_interface.description | arista.avd.default("-") %} {% set mode = ethernet_interface.mode | arista.avd.default("access") %} {% set vlans = ethernet_interface.vlans | arista.avd.default('-') %} @@ -326,7 +326,7 @@ first %} {% if port_channel_interface.ip_address is arista.avd.defined %} {% set description = ethernet_interface.description | arista.avd.default("-") %} -{% set type = port_channel_interface.type | arista.avd.default("*switchport") %} +{% set type = port_channel_interface.type | arista.avd.default("-") %} {% set channel_group = ethernet_interface.channel_group.id | arista.avd.default("-") %} {% set ip_address = port_channel_interface.ip_address | arista.avd.default("-") %} {% set vrf = port_channel_interface.vrf | arista.avd.default("*default") %} @@ -339,7 +339,7 @@ {% else %} {% if ethernet_interface.ip_address is arista.avd.defined %} {% set description = ethernet_interface.description | arista.avd.default("-") %} -{% set type = ethernet_interface.type | arista.avd.default("switchport") %} +{% set type = ethernet_interface.type | arista.avd.default("-") %} {% set ip_address = ethernet_interface.ip_address | arista.avd.default("-") %} {% set vrf = ethernet_interface.vrf | arista.avd.default("default") %} {% set mtu = ethernet_interface.mtu | arista.avd.default("-") %} @@ -393,7 +393,7 @@ first %} {% if port_channel_interface.ipv6_address is arista.avd.defined or port_channel_interface.ipv6_enable is arista.avd.defined(true) %} {% set description = ethernet_interface.description | arista.avd.default("-") %} -{% set type = port_channel_interface.type | arista.avd.default("switchport") %} +{% set type = port_channel_interface.type | arista.avd.default("-") %} {% set channel_group = ethernet_interface.channel_group.id | arista.avd.default("-") %} {% set ipv6_address = port_channel_interface.ipv6_address | arista.avd.default("-") %} {% set vrf = port_channel_interface.vrf | arista.avd.default("default") %} @@ -408,7 +408,7 @@ {% else %} {% if ethernet_interface.ipv6_address is arista.avd.defined or ethernet_interface.ipv6_enable is arista.avd.defined(true) %} {% set description = ethernet_interface.description | arista.avd.default("-") %} -{% set type = ethernet_interface.type | arista.avd.default("switchport") %} +{% set type = ethernet_interface.type | arista.avd.default("-") %} {% set ipv6_address = ethernet_interface.ipv6_address | arista.avd.default("-") %} {% set vrf = ethernet_interface.vrf | arista.avd.default("default") %} {% set mtu = ethernet_interface.mtu | arista.avd.default("-") %} diff --git a/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/port-channel-interfaces.j2 b/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/port-channel-interfaces.j2 index 24408c7713a..8e57ec49074 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/port-channel-interfaces.j2 +++ b/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/port-channel-interfaces.j2 @@ -15,9 +15,9 @@ | Interface | Description | Type | Mode | VLANs | Native VLAN | Trunk Group | LACP Fallback Timeout | LACP Fallback Mode | MLAG ID | EVPN ESI | | --------- | ----------- | ---- | ---- | ----- | ----------- | ------------| --------------------- | ------------------ | ------- | -------- | {% for port_channel_interface in port_channel_interfaces | arista.avd.natural_sort('name') %} -{% if port_channel_interface.type | arista.avd.default("switched") == 'switched' %} +{% if port_channel_interface.type is arista.avd.defined("switched") %} {% set description = port_channel_interface.description | arista.avd.default("-") %} -{% set type = port_channel_interface.type | arista.avd.default("switched") %} +{% set type = port_channel_interface.type %} {% set mode = port_channel_interface.mode | arista.avd.default("access") %} {% set vlans = port_channel_interface.vlans | arista.avd.default("-") %} {% if port_channel_interface.native_vlan_tag is arista.avd.defined(true) %} diff --git a/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/ethernet-interfaces.j2 b/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/ethernet-interfaces.j2 index 2d00a8072fd..da73daefdaf 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/ethernet-interfaces.j2 +++ b/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/ethernet-interfaces.j2 @@ -149,7 +149,7 @@ interface {{ ethernet_interface.name }} encapsulation vlan {{ encapsulation_cli }} {% endif %} -{% elif ethernet_interface.type | arista.avd.default('switched') == 'switched' %} +{% elif ethernet_interface.type is arista.avd.defined('switched') %} switchport {% endif %} {% if ethernet_interface.trunk_private_vlan_secondary is arista.avd.defined(true) %} diff --git a/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/port-channel-interfaces.j2 b/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/port-channel-interfaces.j2 index a41e82f9df0..0246fd624ff 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/port-channel-interfaces.j2 +++ b/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/port-channel-interfaces.j2 @@ -61,7 +61,7 @@ interface {{ port_channel_interface.name }} encapsulation vlan {{ encapsulation_cli }} {% endif %} -{% elif port_channel_interface.type | arista.avd.default("switched") == 'switched' %} +{% elif port_channel_interface.type is arista.avd.defined("switched") %} switchport {% endif %} {% if port_channel_interface.vlans is arista.avd.defined and port_channel_interface.mode is arista.avd.defined and port_channel_interface.mode in ["access", "dot1q-tunnel"] %}