diff --git a/ansible_collections/arista/avd/examples/cv-pathfinder/intended/structured_configs/site1-wan1.yml b/ansible_collections/arista/avd/examples/cv-pathfinder/intended/structured_configs/site1-wan1.yml index 26ebe38fe11..1184ca94d6e 100644 --- a/ansible_collections/arista/avd/examples/cv-pathfinder/intended/structured_configs/site1-wan1.yml +++ b/ansible_collections/arista/avd/examples/cv-pathfinder/intended/structured_configs/site1-wan1.yml @@ -334,9 +334,9 @@ ethernet_interfaces: switchport: enabled: false description: REGION1-INTERNET-CORP_inet-site1-wan1_inet-cloud_Ethernet5 - access_group_in: ACL-INTERNET-IN_Ethernet4 flow_tracker: hardware: FLOW-TRACKER + access_group_in: ACL-INTERNET-IN_Ethernet4 loopback_interfaces: - name: Loopback0 description: ROUTER_ID diff --git a/ansible_collections/arista/avd/examples/cv-pathfinder/intended/structured_configs/site1-wan2.yml b/ansible_collections/arista/avd/examples/cv-pathfinder/intended/structured_configs/site1-wan2.yml index 6cd61b9e2be..4bb66fe57cb 100644 --- a/ansible_collections/arista/avd/examples/cv-pathfinder/intended/structured_configs/site1-wan2.yml +++ b/ansible_collections/arista/avd/examples/cv-pathfinder/intended/structured_configs/site1-wan2.yml @@ -334,9 +334,9 @@ ethernet_interfaces: switchport: enabled: false description: REGION1-INTERNET-CORP_inet-site1-wan2_inet-cloud_Ethernet6 - access_group_in: ACL-INTERNET-IN_Ethernet4 flow_tracker: hardware: FLOW-TRACKER + access_group_in: ACL-INTERNET-IN_Ethernet4 dhcp_client_accept_default_route: true loopback_interfaces: - name: Loopback0 diff --git a/ansible_collections/arista/avd/examples/cv-pathfinder/intended/structured_configs/site2-wan2.yml b/ansible_collections/arista/avd/examples/cv-pathfinder/intended/structured_configs/site2-wan2.yml index b95710ba067..22e9e1adb78 100644 --- a/ansible_collections/arista/avd/examples/cv-pathfinder/intended/structured_configs/site2-wan2.yml +++ b/ansible_collections/arista/avd/examples/cv-pathfinder/intended/structured_configs/site2-wan2.yml @@ -365,9 +365,9 @@ ethernet_interfaces: switchport: enabled: false description: REGION2-INTERNET-CORP_inet-site2-wan2_inet-cloud_Ethernet7 - access_group_in: ACL-INTERNET-IN_Ethernet4 flow_tracker: hardware: FLOW-TRACKER + access_group_in: ACL-INTERNET-IN_Ethernet4 - name: Ethernet5 switchport: enabled: false diff --git a/ansible_collections/arista/avd/examples/cv-pathfinder/intended/structured_configs/site3-wan1.yml b/ansible_collections/arista/avd/examples/cv-pathfinder/intended/structured_configs/site3-wan1.yml index a5c8da00bd0..5e33a03c44d 100644 --- a/ansible_collections/arista/avd/examples/cv-pathfinder/intended/structured_configs/site3-wan1.yml +++ b/ansible_collections/arista/avd/examples/cv-pathfinder/intended/structured_configs/site3-wan1.yml @@ -223,9 +223,9 @@ ethernet_interfaces: switchport: enabled: false description: REGION2-INTERNET-CORP_inet-site3-wan1_inet-cloud_Ethernet8 - access_group_in: ACL-INTERNET-IN_Ethernet4 flow_tracker: hardware: FLOW-TRACKER + access_group_in: ACL-INTERNET-IN_Ethernet4 dhcp_client_accept_default_route: true loopback_interfaces: - name: Loopback0 diff --git a/ansible_collections/arista/avd/molecule/eos_designs_negative_unit_tests/inventory/host_vars/ipv4-acl-in-missing-on-wan-interface.yml b/ansible_collections/arista/avd/molecule/eos_designs_negative_unit_tests/inventory/host_vars/ipv4-acl-in-missing-on-wan-interface.yml index 0c2656b2281..5930aa1e75e 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_negative_unit_tests/inventory/host_vars/ipv4-acl-in-missing-on-wan-interface.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_negative_unit_tests/inventory/host_vars/ipv4-acl-in-missing-on-wan-interface.yml @@ -24,4 +24,4 @@ wan_path_groups: expected_error_message: >- 'ipv4_acl_in' must be set on WAN interfaces where 'wan_carrier' is set, - unless the carrier is configured as 'trusted' under 'wan_carriers'. 'ipv4_acl_in' is missing on interface 'Ethernet1'. + unless the carrier is configured as 'trusted' under 'wan_carriers'. 'ipv4_acl_in' is missing on L3 interface 'Ethernet1'. diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/node-type-l3-port-channels.cfg b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/node-type-l3-port-channels.cfg new file mode 100644 index 00000000000..a10f3398080 --- /dev/null +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/node-type-l3-port-channels.cfg @@ -0,0 +1,122 @@ +! +no enable password +no aaa root +! +vlan internal order ascending range 1006 1199 +! +flow tracking sampled + sample 10000 + tracker FLOW-TRACKER + record export on inactive timeout 70000 + record export on interval 300000 + exporter CV-TELEMETRY + collector 127.0.0.1 + local interface Loopback0 + template interval 3600000 + no shutdown +! +transceiver qsfp default-mode 4x10G +! +service routing protocols model multi-agent +! +hostname node-type-l3-port-channels +! +spanning-tree mode none +! +vrf instance MGMT +! +management api http-commands + protocol https + no shutdown + ! + vrf MGMT + no shutdown +! +interface Port-Channel2 + description Cybercast_101_peer1_Port-Channel10 + no shutdown + no switchport + flow tracker sampled FLOW-TRACKER + ip address 192.168.1.102/31 + service-profile TEST-QOS-PROFILE1 +! +interface Port-Channel5 + description StreamFast_102_peer2_Port-Channel15 + no shutdown + no switchport + ip address 192.168.1.105/31 + service-policy type qos input TEST_POLICY + service-profile TEST-QOS-PROFILE1 + ! TEST RAW_EOS_CLI + +! +interface Port-Channel5.100 + description ExtremeCable_105_peer2_Port-Channel15 + no shutdown + encapsulation dot1q vlan 108 + flow tracker sampled FLOW-TRACKER + ip address 192.168.100.115/31 + service-profile TEST-QOS-PROFILE2 +! +interface Ethernet1 + description Cybercast_101_peerDevice1_Ethernet11 + no shutdown + speed forced 10000full + no switchport + channel-group 2 mode active +! +interface Ethernet1/4 + description StreamFast_102_peerDevice2_Ethernet1/12 + no shutdown + speed forced 10000full + no switchport + channel-group 5 mode passive +! +interface Ethernet1/5 + description StreamFast_102_peer2_Port-Channel15 + no shutdown + speed forced 10000full + no switchport + channel-group 5 mode passive +! +interface Ethernet2 + description Cybercast_101_peer1_Port-Channel10 + no shutdown + speed forced 10000full + no switchport + channel-group 2 mode active +! +interface Ethernet3 + description Custom eth3 description + no shutdown + no switchport + channel-group 2 mode active +! +interface Loopback0 + description ROUTER_ID + no shutdown + ip address 2.3.4.1/32 +! +ip routing +no ip routing vrf MGMT +! +ip prefix-list PL-LOOPBACKS-EVPN-OVERLAY + seq 10 permit 2.3.4.5/24 eq 32 +! +route-map RM-CONN-2-BGP permit 10 + match ip address prefix-list PL-LOOPBACKS-EVPN-OVERLAY +! +router bgp 65005 + router-id 2.3.4.1 + update wait-install + no bgp default ipv4-unicast + maximum-paths 4 ecmp 4 + neighbor IPv4-UNDERLAY-PEERS peer group + neighbor IPv4-UNDERLAY-PEERS send-community + neighbor IPv4-UNDERLAY-PEERS maximum-routes 12000 + redistribute connected route-map RM-CONN-2-BGP + ! + address-family ipv4 + neighbor IPv4-UNDERLAY-PEERS activate +! +end diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-edge4A.yml b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-edge4A.yml index 84006493a56..453d52ec8f2 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-edge4A.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-edge4A.yml @@ -159,9 +159,9 @@ ethernet_interfaces: ip_address: dhcp shutdown: false description: Comcast + dhcp_client_accept_default_route: true encapsulation_dot1q: vlan: 42 - dhcp_client_accept_default_route: true - name: Ethernet1 switchport: enabled: false diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-edge4B.yml b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-edge4B.yml index cfa89076411..f858694efb5 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-edge4B.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-edge4B.yml @@ -159,9 +159,9 @@ ethernet_interfaces: ip_address: dhcp shutdown: false description: Comcast + dhcp_client_accept_default_route: true encapsulation_dot1q: vlan: 42 - dhcp_client_accept_default_route: true - name: Ethernet1 switchport: enabled: false diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-transit1A.yml b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-transit1A.yml index b42ca1cd3e3..9c93a9cdd34 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-transit1A.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-transit1A.yml @@ -269,9 +269,9 @@ ethernet_interfaces: ip_address: dhcp shutdown: false description: Comcast + dhcp_client_accept_default_route: true encapsulation_dot1q: vlan: 42 - dhcp_client_accept_default_route: true - name: Ethernet2.42 peer_type: l3_interface ip_address: 172.16.6.6/31 diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-transit1B.yml b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-transit1B.yml index 4b42d7cbaa8..9fbfc5cdaca 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-transit1B.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-transit1B.yml @@ -269,9 +269,9 @@ ethernet_interfaces: ip_address: dhcp shutdown: false description: Comcast + dhcp_client_accept_default_route: true encapsulation_dot1q: vlan: 42 - dhcp_client_accept_default_route: true - name: Ethernet2.42 peer_type: l3_interface ip_address: 172.16.6.6/31 diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/node-type-l3-port-channels.yml b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/node-type-l3-port-channels.yml new file mode 100644 index 00000000000..6839d83f5b7 --- /dev/null +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/node-type-l3-port-channels.yml @@ -0,0 +1,181 @@ +hostname: node-type-l3-port-channels +is_deployed: true +router_bgp: + as: '65005' + router_id: 2.3.4.1 + bgp: + default: + ipv4_unicast: false + maximum_paths: + paths: 4 + ecmp: 4 + redistribute: + connected: + enabled: true + route_map: RM-CONN-2-BGP + updates: + wait_install: true + peer_groups: + - name: IPv4-UNDERLAY-PEERS + type: ipv4 + maximum_routes: 12000 + send_community: all + address_family_ipv4: + peer_groups: + - name: IPv4-UNDERLAY-PEERS + activate: true +service_routing_protocols_model: multi-agent +ip_routing: true +vlan_internal_order: + allocation: ascending + range: + beginning: 1006 + ending: 1199 +aaa_root: + disabled: true +config_end: true +enable_password: + disabled: true +transceiver_qsfp_default_mode_4x10: true +spanning_tree: + mode: none +vrfs: +- name: MGMT + ip_routing: false +management_api_http: + enable_vrfs: + - name: MGMT + enable_https: true +ethernet_interfaces: +- name: Ethernet1 + description: Cybercast_101_peerDevice1_Ethernet11 + peer_type: l3_port_channel + peer: peerDevice1 + peer_interface: Ethernet11 + shutdown: false + switchport: + enabled: false + speed: forced 10000full + channel_group: + id: 2 + mode: active +- name: Ethernet2 + description: Cybercast_101_peer1_Port-Channel10 + peer_type: l3_port_channel + peer: peer1 + peer_interface: Port-Channel10 + shutdown: false + switchport: + enabled: false + speed: forced 10000full + channel_group: + id: 2 + mode: active +- name: Ethernet3 + description: Custom eth3 description + peer_type: l3_port_channel + peer: peer1 + peer_interface: Port-Channel10 + shutdown: false + switchport: + enabled: false + channel_group: + id: 2 + mode: active +- name: Ethernet1/4 + description: StreamFast_102_peerDevice2_Ethernet1/12 + peer_type: l3_port_channel + peer: peerDevice2 + peer_interface: Ethernet1/12 + shutdown: false + switchport: + enabled: false + speed: forced 10000full + channel_group: + id: 5 + mode: passive +- name: Ethernet1/5 + description: StreamFast_102_peer2_Port-Channel15 + peer_type: l3_port_channel + peer: peer2 + peer_interface: Port-Channel15 + shutdown: false + switchport: + enabled: false + speed: forced 10000full + channel_group: + id: 5 + mode: passive +port_channel_interfaces: +- name: Port-Channel2 + peer_type: l3_port_channel + peer: peer1 + peer_interface: Port-Channel10 + ip_address: 192.168.1.102/31 + shutdown: false + switchport: + enabled: false + description: Cybercast_101_peer1_Port-Channel10 + service_profile: TEST-QOS-PROFILE1 + flow_tracker: + sampled: FLOW-TRACKER +- name: Port-Channel5 + peer_type: l3_port_channel + peer: peer2 + peer_interface: Port-Channel15 + ip_address: 192.168.1.105/31 + shutdown: false + switchport: + enabled: false + description: StreamFast_102_peer2_Port-Channel15 + service_profile: TEST-QOS-PROFILE1 + eos_cli: '! TEST RAW_EOS_CLI + + ' + service_policy: + qos: + input: TEST_POLICY +- name: Port-Channel5.100 + peer_type: l3_port_channel + peer: peer2 + peer_interface: Port-Channel15 + ip_address: 192.168.100.115/31 + shutdown: false + description: ExtremeCable_105_peer2_Port-Channel15 + service_profile: TEST-QOS-PROFILE2 + flow_tracker: + sampled: FLOW-TRACKER + encapsulation_dot1q: + vlan: 108 +loopback_interfaces: +- name: Loopback0 + description: ROUTER_ID + shutdown: false + ip_address: 2.3.4.1/32 +prefix_lists: +- name: PL-LOOPBACKS-EVPN-OVERLAY + sequence_numbers: + - sequence: 10 + action: permit 2.3.4.5/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 +flow_tracking: + sampled: + sample: 10000 + trackers: + - name: FLOW-TRACKER + record_export: + on_inactive_timeout: 70000 + on_interval: 300000 + exporters: + - name: CV-TELEMETRY + collector: + host: 127.0.0.1 + local_interface: Loopback0 + template_interval: 3600000 + shutdown: false diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/inventory/host_vars/node-type-l3-port-channels.yml b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/inventory/host_vars/node-type-l3-port-channels.yml new file mode 100644 index 00000000000..90f403c6a93 --- /dev/null +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/inventory/host_vars/node-type-l3-port-channels.yml @@ -0,0 +1,73 @@ +--- +type: spine +spine: + nodes: + - name: node-type-l3-port-channels + id: 1 + evpn_role: none + loopback_ipv4_pool: 2.3.4.5/24 + bgp_as: 65005 + l3_port_channels: + - # Port-Channel with 3 member ports + name: Port-Channel2 + mode: active + member_interfaces: + - name: Ethernet1 + peer: peerDevice1 + peer_interface: Ethernet11 + speed: "forced 10000full" + - # peer, peer_interface not set, use one from parent L3 Port-Channel + name: Ethernet2 + speed: "forced 10000full" + - # one with structured config for member port (TO ADD) + name: Ethernet3 + description: "Custom eth3 description" + ip_address: 192.168.1.102/31 + peer: peer1 + peer_port_channel: Port-Channel10 + peer_ip: 192.168.1.10 + static_routes: + - prefix: 0.0.0.0/0 + qos_profile: TEST-QOS-PROFILE1 + wan_carrier: Cybercast + wan_circuit_id: 101 + flow_tracking: + enabled: true + - # Port-Channel with 2 member ports + name: Port-Channel5 + mode: passive + member_interfaces: + - name: Ethernet1/4 + peer: peerDevice2 + peer_interface: Ethernet1/12 + speed: "forced 10000full" + - # peer, peer_interface not set, use one from parent L3 Port-Channel + name: Ethernet1/5 + speed: "forced 10000full" + ip_address: 192.168.1.105/31 + peer: peer2 + peer_port_channel: Port-Channel15 + peer_ip: 192.168.1.15 + qos_profile: TEST-QOS-PROFILE1 + wan_carrier: StreamFast + wan_circuit_id: 102 + flow_tracking: + enabled: false + structured_config: + service_policy: + qos: + input: TEST_POLICY + raw_eos_cli: | + ! TEST RAW_EOS_CLI + - # sub-interface for Port-Channel + name: Port-Channel5.100 + encapsulation_dot1q_vlan: 108 + ip_address: 192.168.100.115/31 + peer: peer2 + peer_port_channel: Port-Channel15 + peer_ip: 192.168.1.15 + qos_profile: TEST-QOS-PROFILE2 + wan_carrier: ExtremeCable + wan_circuit_id: 105 + flow_tracking: + enabled: true diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/inventory/hosts.yml b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/inventory/hosts.yml index 62a5b1e8ca0..032556ab7a4 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/inventory/hosts.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/inventory/hosts.yml @@ -50,6 +50,7 @@ all: spanning-tree-mode-rapid-pvst: node-type-l3-interfaces: node-type-l3-interfaces-bgp: + node-type-l3-port-channels: ipv4-acls: only-connected-endpoints: platform_settings: diff --git a/ansible_collections/arista/avd/roles/eos_designs/docs/tables/management-flow-tracking-settings.md b/ansible_collections/arista/avd/roles/eos_designs/docs/tables/management-flow-tracking-settings.md index 5eddb2ca443..27281796fe2 100644 --- a/ansible_collections/arista/avd/roles/eos_designs/docs/tables/management-flow-tracking-settings.md +++ b/ansible_collections/arista/avd/roles/eos_designs/docs/tables/management-flow-tracking-settings.md @@ -29,6 +29,9 @@ | [  l3_interfaces](## "fabric_flow_tracking.l3_interfaces") | Dictionary | | | | Enable flow-tracking on all node.l3_interfaces and network-services tenants.vrfs.l3_interfaces. | | [    enabled](## "fabric_flow_tracking.l3_interfaces.enabled") | Boolean | | `False` | | | | [    name](## "fabric_flow_tracking.l3_interfaces.name") | String | | `FLOW-TRACKER` | | Flow tracker name as defined in flow_tracking_settings. | + | [  l3_port_channels](## "fabric_flow_tracking.l3_port_channels") | Dictionary | | | | Enable flow-tracking on all node.l3_port_channels. | + | [    enabled](## "fabric_flow_tracking.l3_port_channels.enabled") | Boolean | | `False` | | | + | [    name](## "fabric_flow_tracking.l3_port_channels.name") | String | | `FLOW-TRACKER` | | Flow tracker name as defined in flow_tracking_settings. | | [  dps_interfaces](## "fabric_flow_tracking.dps_interfaces") | Dictionary | | | | Enable flow-tracking on all dps_interfaces. | | [    enabled](## "fabric_flow_tracking.dps_interfaces.enabled") | Boolean | | `True` | | | | [    name](## "fabric_flow_tracking.dps_interfaces.name") | String | | `FLOW-TRACKER` | | Flow tracker name as defined in flow_tracking_settings. | @@ -124,6 +127,13 @@ # Flow tracker name as defined in flow_tracking_settings. name: + # Enable flow-tracking on all node.l3_port_channels. + l3_port_channels: + enabled: + + # Flow tracker name as defined in flow_tracking_settings. + name: + # Enable flow-tracking on all dps_interfaces. dps_interfaces: enabled: diff --git a/ansible_collections/arista/avd/roles/eos_designs/docs/tables/node-type-l3-port-channels-configuration.md b/ansible_collections/arista/avd/roles/eos_designs/docs/tables/node-type-l3-port-channels-configuration.md index 00496f9888a..5d43c5aebf3 100644 --- a/ansible_collections/arista/avd/roles/eos_designs/docs/tables/node-type-l3-port-channels-configuration.md +++ b/ansible_collections/arista/avd/roles/eos_designs/docs/tables/node-type-l3-port-channels-configuration.md @@ -12,7 +12,7 @@ | [    l3_port_channels](## ".defaults.l3_port_channels") | List, items: Dictionary | | | | L3 Port-Channel interfaces to configure on the node.
Used to define the node for WAN interfaces when `wan_carrier` is set. | | [      - name](## ".defaults.l3_port_channels.[].name") | String | Required, Unique | | Pattern: `Port-Channel[\d/]+(.[\d]+)?` | Port-Channel interface name like 'Port-Channel2' or subinterface name like 'Port-Channel2.42'.
For a Port-Channel subinterface, the parent Port-Channel interface must be defined as well. | | [        description](## ".defaults.l3_port_channels.[].description") | String | | | | Interface description.
If not set a default description will be configured with '[[ ]]'. | - | [        mode](## ".defaults.l3_port_channels.[].mode") | String | | `on` | Valid Values:
- active
- passive
- on | Port-Channel mode.
Should not be set on Port-Channel subinterfaces. | + | [        mode](## ".defaults.l3_port_channels.[].mode") | String | | `active` | Valid Values:
- active
- passive
- on | Port-Channel mode.
Should not be set on Port-Channel subinterfaces. | | [        member_interfaces](## ".defaults.l3_port_channels.[].member_interfaces") | List, items: Dictionary | | | | Port-Channel member interfaces.
Should not be set on Port-Channel subinterfaces. | | [          - name](## ".defaults.l3_port_channels.[].member_interfaces.[].name") | String | Required, Unique | | Pattern: `Ethernet[\d/]+` | Ethernet interface name like 'Ethernet2'.
Member interface cannot be subinterface. | | [            description](## ".defaults.l3_port_channels.[].member_interfaces.[].description") | String | | | | Interface description for this member.
If not set a default description will be configured with '[[ ]]'. | @@ -35,7 +35,7 @@ | [        ipv4_acl_in](## ".defaults.l3_port_channels.[].ipv4_acl_in") | String | | | | Name of the IPv4 access-list to be assigned in the ingress direction.
The access-list must be defined under `ipv4_acls` and supports field substitution for "interface_ip" and "peer_ip".
Required for all WAN interfaces (`wan_carrier` is set) unless the carrier is marked as 'trusted' under `wan_carriers`. | | [        ipv4_acl_out](## ".defaults.l3_port_channels.[].ipv4_acl_out") | String | | | | Name of the IPv4 Access-list to be assigned in the egress direction.
The access-list must be defined under `ipv4_acls` and supports field substitution for "interface_ip" and "peer_ip". | | [        static_routes](## ".defaults.l3_port_channels.[].static_routes") | List, items: Dictionary | | | Min Length: 1 | Configure IPv4 static routes pointing to `peer_ip`. | - | [          - prefix](## ".defaults.l3_port_channels.[].static_routes.[].prefix") | String | Required | | | IPv4_network/Mask. | + | [          - prefix](## ".defaults.l3_port_channels.[].static_routes.[].prefix") | String | Required, Unique | | | IPv4_network/Mask. | | [        qos_profile](## ".defaults.l3_port_channels.[].qos_profile") | String | | | | QOS service profile. | | [        wan_carrier](## ".defaults.l3_port_channels.[].wan_carrier") | String | | | | The WAN carrier this interface is connected to.
This is used to infer the path-groups in which this interface should be configured.
Unless the carrier is marked as 'trusted' under `wan_carriers`, `ipv4_acl_in` is also required on all WAN interfaces. | | [        wan_circuit_id](## ".defaults.l3_port_channels.[].wan_circuit_id") | String | | | | The WAN circuit ID for this interface.
This is not rendered in the configuration but used for WAN designs. | @@ -44,8 +44,8 @@ | [          policies](## ".defaults.l3_port_channels.[].cv_pathfinder_internet_exit.policies") | List, items: Dictionary | | | | List of Internet-exit policies using this interface as exit. | | [            - name](## ".defaults.l3_port_channels.[].cv_pathfinder_internet_exit.policies.[].name") | String | Required, Unique | | | Internet-exit policy name. | | [              tunnel_interface_numbers](## ".defaults.l3_port_channels.[].cv_pathfinder_internet_exit.policies.[].tunnel_interface_numbers") | String | | | | Number range to use for Tunnel interfaces to an internet-exit service provider using this local interface.
Examples: '1-3' or '100,200,300' | - | [        raw_eos_cli](## ".defaults.l3_port_channels.[].raw_eos_cli") | String | | | | EOS CLI rendered directly on the interface in the final EOS configuration. | - | [        flow_tracking](## ".defaults.l3_port_channels.[].flow_tracking") | Dictionary | | | | Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_interfaces` setting. | + | [        raw_eos_cli](## ".defaults.l3_port_channels.[].raw_eos_cli") | String | | | | EOS CLI rendered directly on the Port-Channel interface in the final EOS configuration. | + | [        flow_tracking](## ".defaults.l3_port_channels.[].flow_tracking") | Dictionary | | | | Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_port_channels` setting. | | [          enabled](## ".defaults.l3_port_channels.[].flow_tracking.enabled") | Boolean | | | | | | [          name](## ".defaults.l3_port_channels.[].flow_tracking.name") | String | | | | Flow tracker name as defined in flow_tracking_settings. | | [        structured_config](## ".defaults.l3_port_channels.[].structured_config") | Dictionary | | | | Custom structured config for the Port-Channel interface. | @@ -56,7 +56,7 @@ | [          l3_port_channels](## ".node_groups.[].nodes.[].l3_port_channels") | List, items: Dictionary | | | | L3 Port-Channel interfaces to configure on the node.
Used to define the node for WAN interfaces when `wan_carrier` is set. | | [            - name](## ".node_groups.[].nodes.[].l3_port_channels.[].name") | String | Required, Unique | | Pattern: `Port-Channel[\d/]+(.[\d]+)?` | Port-Channel interface name like 'Port-Channel2' or subinterface name like 'Port-Channel2.42'.
For a Port-Channel subinterface, the parent Port-Channel interface must be defined as well. | | [              description](## ".node_groups.[].nodes.[].l3_port_channels.[].description") | String | | | | Interface description.
If not set a default description will be configured with '[[ ]]'. | - | [              mode](## ".node_groups.[].nodes.[].l3_port_channels.[].mode") | String | | `on` | Valid Values:
- active
- passive
- on | Port-Channel mode.
Should not be set on Port-Channel subinterfaces. | + | [              mode](## ".node_groups.[].nodes.[].l3_port_channels.[].mode") | String | | `active` | Valid Values:
- active
- passive
- on | Port-Channel mode.
Should not be set on Port-Channel subinterfaces. | | [              member_interfaces](## ".node_groups.[].nodes.[].l3_port_channels.[].member_interfaces") | List, items: Dictionary | | | | Port-Channel member interfaces.
Should not be set on Port-Channel subinterfaces. | | [                - name](## ".node_groups.[].nodes.[].l3_port_channels.[].member_interfaces.[].name") | String | Required, Unique | | Pattern: `Ethernet[\d/]+` | Ethernet interface name like 'Ethernet2'.
Member interface cannot be subinterface. | | [                  description](## ".node_groups.[].nodes.[].l3_port_channels.[].member_interfaces.[].description") | String | | | | Interface description for this member.
If not set a default description will be configured with '[[ ]]'. | @@ -79,7 +79,7 @@ | [              ipv4_acl_in](## ".node_groups.[].nodes.[].l3_port_channels.[].ipv4_acl_in") | String | | | | Name of the IPv4 access-list to be assigned in the ingress direction.
The access-list must be defined under `ipv4_acls` and supports field substitution for "interface_ip" and "peer_ip".
Required for all WAN interfaces (`wan_carrier` is set) unless the carrier is marked as 'trusted' under `wan_carriers`. | | [              ipv4_acl_out](## ".node_groups.[].nodes.[].l3_port_channels.[].ipv4_acl_out") | String | | | | Name of the IPv4 Access-list to be assigned in the egress direction.
The access-list must be defined under `ipv4_acls` and supports field substitution for "interface_ip" and "peer_ip". | | [              static_routes](## ".node_groups.[].nodes.[].l3_port_channels.[].static_routes") | List, items: Dictionary | | | Min Length: 1 | Configure IPv4 static routes pointing to `peer_ip`. | - | [                - prefix](## ".node_groups.[].nodes.[].l3_port_channels.[].static_routes.[].prefix") | String | Required | | | IPv4_network/Mask. | + | [                - prefix](## ".node_groups.[].nodes.[].l3_port_channels.[].static_routes.[].prefix") | String | Required, Unique | | | IPv4_network/Mask. | | [              qos_profile](## ".node_groups.[].nodes.[].l3_port_channels.[].qos_profile") | String | | | | QOS service profile. | | [              wan_carrier](## ".node_groups.[].nodes.[].l3_port_channels.[].wan_carrier") | String | | | | The WAN carrier this interface is connected to.
This is used to infer the path-groups in which this interface should be configured.
Unless the carrier is marked as 'trusted' under `wan_carriers`, `ipv4_acl_in` is also required on all WAN interfaces. | | [              wan_circuit_id](## ".node_groups.[].nodes.[].l3_port_channels.[].wan_circuit_id") | String | | | | The WAN circuit ID for this interface.
This is not rendered in the configuration but used for WAN designs. | @@ -88,15 +88,15 @@ | [                policies](## ".node_groups.[].nodes.[].l3_port_channels.[].cv_pathfinder_internet_exit.policies") | List, items: Dictionary | | | | List of Internet-exit policies using this interface as exit. | | [                  - name](## ".node_groups.[].nodes.[].l3_port_channels.[].cv_pathfinder_internet_exit.policies.[].name") | String | Required, Unique | | | Internet-exit policy name. | | [                    tunnel_interface_numbers](## ".node_groups.[].nodes.[].l3_port_channels.[].cv_pathfinder_internet_exit.policies.[].tunnel_interface_numbers") | String | | | | Number range to use for Tunnel interfaces to an internet-exit service provider using this local interface.
Examples: '1-3' or '100,200,300' | - | [              raw_eos_cli](## ".node_groups.[].nodes.[].l3_port_channels.[].raw_eos_cli") | String | | | | EOS CLI rendered directly on the interface in the final EOS configuration. | - | [              flow_tracking](## ".node_groups.[].nodes.[].l3_port_channels.[].flow_tracking") | Dictionary | | | | Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_interfaces` setting. | + | [              raw_eos_cli](## ".node_groups.[].nodes.[].l3_port_channels.[].raw_eos_cli") | String | | | | EOS CLI rendered directly on the Port-Channel interface in the final EOS configuration. | + | [              flow_tracking](## ".node_groups.[].nodes.[].l3_port_channels.[].flow_tracking") | Dictionary | | | | Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_port_channels` setting. | | [                enabled](## ".node_groups.[].nodes.[].l3_port_channels.[].flow_tracking.enabled") | Boolean | | | | | | [                name](## ".node_groups.[].nodes.[].l3_port_channels.[].flow_tracking.name") | String | | | | Flow tracker name as defined in flow_tracking_settings. | | [              structured_config](## ".node_groups.[].nodes.[].l3_port_channels.[].structured_config") | Dictionary | | | | Custom structured config for the Port-Channel interface. | | [      l3_port_channels](## ".node_groups.[].l3_port_channels") | List, items: Dictionary | | | | L3 Port-Channel interfaces to configure on the node.
Used to define the node for WAN interfaces when `wan_carrier` is set. | | [        - name](## ".node_groups.[].l3_port_channels.[].name") | String | Required, Unique | | Pattern: `Port-Channel[\d/]+(.[\d]+)?` | Port-Channel interface name like 'Port-Channel2' or subinterface name like 'Port-Channel2.42'.
For a Port-Channel subinterface, the parent Port-Channel interface must be defined as well. | | [          description](## ".node_groups.[].l3_port_channels.[].description") | String | | | | Interface description.
If not set a default description will be configured with '[[ ]]'. | - | [          mode](## ".node_groups.[].l3_port_channels.[].mode") | String | | `on` | Valid Values:
- active
- passive
- on | Port-Channel mode.
Should not be set on Port-Channel subinterfaces. | + | [          mode](## ".node_groups.[].l3_port_channels.[].mode") | String | | `active` | Valid Values:
- active
- passive
- on | Port-Channel mode.
Should not be set on Port-Channel subinterfaces. | | [          member_interfaces](## ".node_groups.[].l3_port_channels.[].member_interfaces") | List, items: Dictionary | | | | Port-Channel member interfaces.
Should not be set on Port-Channel subinterfaces. | | [            - name](## ".node_groups.[].l3_port_channels.[].member_interfaces.[].name") | String | Required, Unique | | Pattern: `Ethernet[\d/]+` | Ethernet interface name like 'Ethernet2'.
Member interface cannot be subinterface. | | [              description](## ".node_groups.[].l3_port_channels.[].member_interfaces.[].description") | String | | | | Interface description for this member.
If not set a default description will be configured with '[[ ]]'. | @@ -119,7 +119,7 @@ | [          ipv4_acl_in](## ".node_groups.[].l3_port_channels.[].ipv4_acl_in") | String | | | | Name of the IPv4 access-list to be assigned in the ingress direction.
The access-list must be defined under `ipv4_acls` and supports field substitution for "interface_ip" and "peer_ip".
Required for all WAN interfaces (`wan_carrier` is set) unless the carrier is marked as 'trusted' under `wan_carriers`. | | [          ipv4_acl_out](## ".node_groups.[].l3_port_channels.[].ipv4_acl_out") | String | | | | Name of the IPv4 Access-list to be assigned in the egress direction.
The access-list must be defined under `ipv4_acls` and supports field substitution for "interface_ip" and "peer_ip". | | [          static_routes](## ".node_groups.[].l3_port_channels.[].static_routes") | List, items: Dictionary | | | Min Length: 1 | Configure IPv4 static routes pointing to `peer_ip`. | - | [            - prefix](## ".node_groups.[].l3_port_channels.[].static_routes.[].prefix") | String | Required | | | IPv4_network/Mask. | + | [            - prefix](## ".node_groups.[].l3_port_channels.[].static_routes.[].prefix") | String | Required, Unique | | | IPv4_network/Mask. | | [          qos_profile](## ".node_groups.[].l3_port_channels.[].qos_profile") | String | | | | QOS service profile. | | [          wan_carrier](## ".node_groups.[].l3_port_channels.[].wan_carrier") | String | | | | The WAN carrier this interface is connected to.
This is used to infer the path-groups in which this interface should be configured.
Unless the carrier is marked as 'trusted' under `wan_carriers`, `ipv4_acl_in` is also required on all WAN interfaces. | | [          wan_circuit_id](## ".node_groups.[].l3_port_channels.[].wan_circuit_id") | String | | | | The WAN circuit ID for this interface.
This is not rendered in the configuration but used for WAN designs. | @@ -128,8 +128,8 @@ | [            policies](## ".node_groups.[].l3_port_channels.[].cv_pathfinder_internet_exit.policies") | List, items: Dictionary | | | | List of Internet-exit policies using this interface as exit. | | [              - name](## ".node_groups.[].l3_port_channels.[].cv_pathfinder_internet_exit.policies.[].name") | String | Required, Unique | | | Internet-exit policy name. | | [                tunnel_interface_numbers](## ".node_groups.[].l3_port_channels.[].cv_pathfinder_internet_exit.policies.[].tunnel_interface_numbers") | String | | | | Number range to use for Tunnel interfaces to an internet-exit service provider using this local interface.
Examples: '1-3' or '100,200,300' | - | [          raw_eos_cli](## ".node_groups.[].l3_port_channels.[].raw_eos_cli") | String | | | | EOS CLI rendered directly on the interface in the final EOS configuration. | - | [          flow_tracking](## ".node_groups.[].l3_port_channels.[].flow_tracking") | Dictionary | | | | Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_interfaces` setting. | + | [          raw_eos_cli](## ".node_groups.[].l3_port_channels.[].raw_eos_cli") | String | | | | EOS CLI rendered directly on the Port-Channel interface in the final EOS configuration. | + | [          flow_tracking](## ".node_groups.[].l3_port_channels.[].flow_tracking") | Dictionary | | | | Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_port_channels` setting. | | [            enabled](## ".node_groups.[].l3_port_channels.[].flow_tracking.enabled") | Boolean | | | | | | [            name](## ".node_groups.[].l3_port_channels.[].flow_tracking.name") | String | | | | Flow tracker name as defined in flow_tracking_settings. | | [          structured_config](## ".node_groups.[].l3_port_channels.[].structured_config") | Dictionary | | | | Custom structured config for the Port-Channel interface. | @@ -138,7 +138,7 @@ | [      l3_port_channels](## ".nodes.[].l3_port_channels") | List, items: Dictionary | | | | L3 Port-Channel interfaces to configure on the node.
Used to define the node for WAN interfaces when `wan_carrier` is set. | | [        - name](## ".nodes.[].l3_port_channels.[].name") | String | Required, Unique | | Pattern: `Port-Channel[\d/]+(.[\d]+)?` | Port-Channel interface name like 'Port-Channel2' or subinterface name like 'Port-Channel2.42'.
For a Port-Channel subinterface, the parent Port-Channel interface must be defined as well. | | [          description](## ".nodes.[].l3_port_channels.[].description") | String | | | | Interface description.
If not set a default description will be configured with '[[ ]]'. | - | [          mode](## ".nodes.[].l3_port_channels.[].mode") | String | | `on` | Valid Values:
- active
- passive
- on | Port-Channel mode.
Should not be set on Port-Channel subinterfaces. | + | [          mode](## ".nodes.[].l3_port_channels.[].mode") | String | | `active` | Valid Values:
- active
- passive
- on | Port-Channel mode.
Should not be set on Port-Channel subinterfaces. | | [          member_interfaces](## ".nodes.[].l3_port_channels.[].member_interfaces") | List, items: Dictionary | | | | Port-Channel member interfaces.
Should not be set on Port-Channel subinterfaces. | | [            - name](## ".nodes.[].l3_port_channels.[].member_interfaces.[].name") | String | Required, Unique | | Pattern: `Ethernet[\d/]+` | Ethernet interface name like 'Ethernet2'.
Member interface cannot be subinterface. | | [              description](## ".nodes.[].l3_port_channels.[].member_interfaces.[].description") | String | | | | Interface description for this member.
If not set a default description will be configured with '[[ ]]'. | @@ -161,7 +161,7 @@ | [          ipv4_acl_in](## ".nodes.[].l3_port_channels.[].ipv4_acl_in") | String | | | | Name of the IPv4 access-list to be assigned in the ingress direction.
The access-list must be defined under `ipv4_acls` and supports field substitution for "interface_ip" and "peer_ip".
Required for all WAN interfaces (`wan_carrier` is set) unless the carrier is marked as 'trusted' under `wan_carriers`. | | [          ipv4_acl_out](## ".nodes.[].l3_port_channels.[].ipv4_acl_out") | String | | | | Name of the IPv4 Access-list to be assigned in the egress direction.
The access-list must be defined under `ipv4_acls` and supports field substitution for "interface_ip" and "peer_ip". | | [          static_routes](## ".nodes.[].l3_port_channels.[].static_routes") | List, items: Dictionary | | | Min Length: 1 | Configure IPv4 static routes pointing to `peer_ip`. | - | [            - prefix](## ".nodes.[].l3_port_channels.[].static_routes.[].prefix") | String | Required | | | IPv4_network/Mask. | + | [            - prefix](## ".nodes.[].l3_port_channels.[].static_routes.[].prefix") | String | Required, Unique | | | IPv4_network/Mask. | | [          qos_profile](## ".nodes.[].l3_port_channels.[].qos_profile") | String | | | | QOS service profile. | | [          wan_carrier](## ".nodes.[].l3_port_channels.[].wan_carrier") | String | | | | The WAN carrier this interface is connected to.
This is used to infer the path-groups in which this interface should be configured.
Unless the carrier is marked as 'trusted' under `wan_carriers`, `ipv4_acl_in` is also required on all WAN interfaces. | | [          wan_circuit_id](## ".nodes.[].l3_port_channels.[].wan_circuit_id") | String | | | | The WAN circuit ID for this interface.
This is not rendered in the configuration but used for WAN designs. | @@ -170,8 +170,8 @@ | [            policies](## ".nodes.[].l3_port_channels.[].cv_pathfinder_internet_exit.policies") | List, items: Dictionary | | | | List of Internet-exit policies using this interface as exit. | | [              - name](## ".nodes.[].l3_port_channels.[].cv_pathfinder_internet_exit.policies.[].name") | String | Required, Unique | | | Internet-exit policy name. | | [                tunnel_interface_numbers](## ".nodes.[].l3_port_channels.[].cv_pathfinder_internet_exit.policies.[].tunnel_interface_numbers") | String | | | | Number range to use for Tunnel interfaces to an internet-exit service provider using this local interface.
Examples: '1-3' or '100,200,300' | - | [          raw_eos_cli](## ".nodes.[].l3_port_channels.[].raw_eos_cli") | String | | | | EOS CLI rendered directly on the interface in the final EOS configuration. | - | [          flow_tracking](## ".nodes.[].l3_port_channels.[].flow_tracking") | Dictionary | | | | Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_interfaces` setting. | + | [          raw_eos_cli](## ".nodes.[].l3_port_channels.[].raw_eos_cli") | String | | | | EOS CLI rendered directly on the Port-Channel interface in the final EOS configuration. | + | [          flow_tracking](## ".nodes.[].l3_port_channels.[].flow_tracking") | Dictionary | | | | Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_port_channels` setting. | | [            enabled](## ".nodes.[].l3_port_channels.[].flow_tracking.enabled") | Boolean | | | | | | [            name](## ".nodes.[].l3_port_channels.[].flow_tracking.name") | String | | | | Flow tracker name as defined in flow_tracking_settings. | | [          structured_config](## ".nodes.[].l3_port_channels.[].structured_config") | Dictionary | | | | Custom structured config for the Port-Channel interface. | @@ -198,7 +198,7 @@ # Port-Channel mode. # Should not be set on Port-Channel subinterfaces. - mode: + mode: # Port-Channel member interfaces. # Should not be set on Port-Channel subinterfaces. @@ -289,7 +289,7 @@ static_routes: # >=1 items # IPv4_network/Mask. - - prefix: + - prefix: # QOS service profile. qos_profile: @@ -319,10 +319,10 @@ # Examples: '1-3' or '100,200,300' tunnel_interface_numbers: - # EOS CLI rendered directly on the interface in the final EOS configuration. + # EOS CLI rendered directly on the Port-Channel interface in the final EOS configuration. raw_eos_cli: - # Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_interfaces` setting. + # Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_port_channels` setting. flow_tracking: enabled: @@ -359,7 +359,7 @@ # Port-Channel mode. # Should not be set on Port-Channel subinterfaces. - mode: + mode: # Port-Channel member interfaces. # Should not be set on Port-Channel subinterfaces. @@ -450,7 +450,7 @@ static_routes: # >=1 items # IPv4_network/Mask. - - prefix: + - prefix: # QOS service profile. qos_profile: @@ -480,10 +480,10 @@ # Examples: '1-3' or '100,200,300' tunnel_interface_numbers: - # EOS CLI rendered directly on the interface in the final EOS configuration. + # EOS CLI rendered directly on the Port-Channel interface in the final EOS configuration. raw_eos_cli: - # Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_interfaces` setting. + # Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_port_channels` setting. flow_tracking: enabled: @@ -507,7 +507,7 @@ # Port-Channel mode. # Should not be set on Port-Channel subinterfaces. - mode: + mode: # Port-Channel member interfaces. # Should not be set on Port-Channel subinterfaces. @@ -598,7 +598,7 @@ static_routes: # >=1 items # IPv4_network/Mask. - - prefix: + - prefix: # QOS service profile. qos_profile: @@ -628,10 +628,10 @@ # Examples: '1-3' or '100,200,300' tunnel_interface_numbers: - # EOS CLI rendered directly on the interface in the final EOS configuration. + # EOS CLI rendered directly on the Port-Channel interface in the final EOS configuration. raw_eos_cli: - # Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_interfaces` setting. + # Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_port_channels` setting. flow_tracking: enabled: @@ -661,7 +661,7 @@ # Port-Channel mode. # Should not be set on Port-Channel subinterfaces. - mode: + mode: # Port-Channel member interfaces. # Should not be set on Port-Channel subinterfaces. @@ -752,7 +752,7 @@ static_routes: # >=1 items # IPv4_network/Mask. - - prefix: + - prefix: # QOS service profile. qos_profile: @@ -782,10 +782,10 @@ # Examples: '1-3' or '100,200,300' tunnel_interface_numbers: - # EOS CLI rendered directly on the interface in the final EOS configuration. + # EOS CLI rendered directly on the Port-Channel interface in the final EOS configuration. raw_eos_cli: - # Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_interfaces` setting. + # Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_port_channels` setting. flow_tracking: enabled: diff --git a/python-avd/pyavd/_eos_designs/schema/__init__.py b/python-avd/pyavd/_eos_designs/schema/__init__.py index afa5548636b..43673bfe95e 100644 --- a/python-avd/pyavd/_eos_designs/schema/__init__.py +++ b/python-avd/pyavd/_eos_designs/schema/__init__.py @@ -3400,6 +3400,46 @@ def __init__( L3Interfaces. + Subclass of AvdModel. + + Args: + enabled: enabled + name: Flow tracker name as defined in flow_tracking_settings. + _custom_data: _custom_data + + """ + + class L3PortChannels(AvdModel): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = { + "enabled": {"type": bool, "default": False}, + "name": {"type": str, "default": "FLOW-TRACKER"}, + "_custom_data": {"type": dict}, + } + enabled: bool + """Default value: `False`""" + name: str + """ + Flow tracker name as defined in flow_tracking_settings. + + Default value: `"FLOW-TRACKER"` + """ + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, + *, + enabled: bool | UndefinedType = Undefined, + name: str | UndefinedType = Undefined, + _custom_data: dict[str, Any] | UndefinedType = Undefined, + ) -> None: + """ + L3PortChannels. + + Subclass of AvdModel. Args: @@ -3497,6 +3537,7 @@ def __init__( "core_interfaces": {"type": CoreInterfaces}, "mlag_interfaces": {"type": MlagInterfaces}, "l3_interfaces": {"type": L3Interfaces}, + "l3_port_channels": {"type": L3PortChannels}, "dps_interfaces": {"type": DpsInterfaces}, "direct_wan_ha_links": {"type": DirectWanHaLinks}, "_custom_data": {"type": dict}, @@ -3540,6 +3581,12 @@ def __init__( l3_interfaces: L3Interfaces """ Enable flow-tracking on all node.l3_interfaces and network-services tenants.vrfs.l3_interfaces. + Subclass of AvdModel. + """ + l3_port_channels: L3PortChannels + """ + Enable flow-tracking on all node.l3_port_channels. + Subclass of AvdModel. """ dps_interfaces: DpsInterfaces @@ -3568,6 +3615,7 @@ def __init__( core_interfaces: CoreInterfaces | UndefinedType = Undefined, mlag_interfaces: MlagInterfaces | UndefinedType = Undefined, l3_interfaces: L3Interfaces | UndefinedType = Undefined, + l3_port_channels: L3PortChannels | UndefinedType = Undefined, dps_interfaces: DpsInterfaces | UndefinedType = Undefined, direct_wan_ha_links: DirectWanHaLinks | UndefinedType = Undefined, _custom_data: dict[str, Any] | UndefinedType = Undefined, @@ -3605,6 +3653,10 @@ def __init__( Subclass of AvdModel. l3_interfaces: Enable flow-tracking on all node.l3_interfaces and network-services tenants.vrfs.l3_interfaces. + Subclass of AvdModel. + l3_port_channels: + Enable flow-tracking on all node.l3_port_channels. + Subclass of AvdModel. dps_interfaces: Enable flow-tracking on all dps_interfaces. @@ -21191,6 +21243,627 @@ class L3Interfaces(AvdIndexedList[str, L3InterfacesItem]): L3Interfaces._item_type = L3InterfacesItem + class L3PortChannelsItem(AvdModel): + """Subclass of AvdModel.""" + + class MemberInterfacesItem(AvdModel): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = { + "name": {"type": str}, + "description": {"type": str}, + "peer": {"type": str}, + "peer_interface": {"type": str}, + "speed": {"type": str}, + "_custom_data": {"type": dict}, + } + name: str + """ + Ethernet interface name like 'Ethernet2'. + Member interface cannot be subinterface. + """ + description: str | None + """ + Interface description for this member. + If not set a default description will be configured with + '[[ ]]'. + """ + peer: str | None + """ + The peer device name. Used for description and documentation. + If not set, this inherits the peer + setting on the port-channel interface. + """ + peer_interface: str | None + """The peer device interface. Used for description and documentation.""" + speed: str | None + """ + Speed should be set in the format `` or `forced ` or `auto + `. + """ + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, + *, + name: str | UndefinedType = Undefined, + description: str | None | UndefinedType = Undefined, + peer: str | None | UndefinedType = Undefined, + peer_interface: str | None | UndefinedType = Undefined, + speed: str | None | UndefinedType = Undefined, + _custom_data: dict[str, Any] | UndefinedType = Undefined, + ) -> None: + """ + MemberInterfacesItem. + + + Subclass of AvdModel. + + Args: + name: + Ethernet interface name like 'Ethernet2'. + Member interface cannot be subinterface. + description: + Interface description for this member. + If not set a default description will be configured with + '[[ ]]'. + peer: + The peer device name. Used for description and documentation. + If not set, this inherits the peer + setting on the port-channel interface. + peer_interface: The peer device interface. Used for description and documentation. + speed: + Speed should be set in the format `` or `forced ` or `auto + `. + _custom_data: _custom_data + + """ + + class MemberInterfaces(AvdIndexedList[str, MemberInterfacesItem]): + """Subclass of AvdIndexedList with `MemberInterfacesItem` items. Primary key is `name` (`str`).""" + + _primary_key: ClassVar[str] = "name" + + MemberInterfaces._item_type = MemberInterfacesItem + + class Bgp(AvdModel): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = { + "peer_as": {"type": str}, + "ipv4_prefix_list_in": {"type": str}, + "ipv4_prefix_list_out": {"type": str}, + "_custom_data": {"type": dict}, + } + peer_as: str + """ + BGP AS <1-4294967295> or AS number in asdot notation "<1-65535>.<0-65535>". + For asdot notation in + YAML inputs, the value must be put in quotes, to prevent it from being interpreted as a float + number. + """ + ipv4_prefix_list_in: str | None + """ + Prefix List Name. Accept routes for only these prefixes from the peer. + Required for wan interfaces. + """ + ipv4_prefix_list_out: str | None + """ + Prefix List Name. Advertise routes for only these prefixes. + If not specified, nothing would be + advertised. + """ + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, + *, + peer_as: str | UndefinedType = Undefined, + ipv4_prefix_list_in: str | None | UndefinedType = Undefined, + ipv4_prefix_list_out: str | None | UndefinedType = Undefined, + _custom_data: dict[str, Any] | UndefinedType = Undefined, + ) -> None: + """ + Bgp. + + + Subclass of AvdModel. + + Args: + peer_as: + BGP AS <1-4294967295> or AS number in asdot notation "<1-65535>.<0-65535>". + For asdot notation in + YAML inputs, the value must be put in quotes, to prevent it from being interpreted as a float + number. + ipv4_prefix_list_in: + Prefix List Name. Accept routes for only these prefixes from the peer. + Required for wan interfaces. + ipv4_prefix_list_out: + Prefix List Name. Advertise routes for only these prefixes. + If not specified, nothing would be + advertised. + _custom_data: _custom_data + + """ + + class StaticRoutesItem(AvdModel): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = {"prefix": {"type": str}, "_custom_data": {"type": dict}} + prefix: str + """IPv4_network/Mask.""" + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, *, prefix: str | UndefinedType = Undefined, _custom_data: dict[str, Any] | UndefinedType = Undefined + ) -> None: + """ + StaticRoutesItem. + + + Subclass of AvdModel. + + Args: + prefix: IPv4_network/Mask. + _custom_data: _custom_data + + """ + + class StaticRoutes(AvdIndexedList[str, StaticRoutesItem]): + """Subclass of AvdIndexedList with `StaticRoutesItem` items. Primary key is `prefix` (`str`).""" + + _primary_key: ClassVar[str] = "prefix" + + StaticRoutes._item_type = StaticRoutesItem + + class CvPathfinderInternetExit(AvdModel): + """Subclass of AvdModel.""" + + class PoliciesItem(AvdModel): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = {"name": {"type": str}, "tunnel_interface_numbers": {"type": str}, "_custom_data": {"type": dict}} + name: str + """Internet-exit policy name.""" + tunnel_interface_numbers: str | None + """ + Number range to use for Tunnel interfaces to an internet-exit service provider using this local + interface. + Examples: '1-3' or '100,200,300' + """ + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, + *, + name: str | UndefinedType = Undefined, + tunnel_interface_numbers: str | None | UndefinedType = Undefined, + _custom_data: dict[str, Any] | UndefinedType = Undefined, + ) -> None: + """ + PoliciesItem. + + + Subclass of AvdModel. + + Args: + name: Internet-exit policy name. + tunnel_interface_numbers: + Number range to use for Tunnel interfaces to an internet-exit service provider using this local + interface. + Examples: '1-3' or '100,200,300' + _custom_data: _custom_data + + """ + + class Policies(AvdIndexedList[str, PoliciesItem]): + """Subclass of AvdIndexedList with `PoliciesItem` items. Primary key is `name` (`str`).""" + + _primary_key: ClassVar[str] = "name" + + Policies._item_type = PoliciesItem + + _fields: ClassVar[dict] = {"policies": {"type": Policies}, "_custom_data": {"type": dict}} + policies: Policies + """ + List of Internet-exit policies using this interface as exit. + + Subclass of AvdIndexedList with + `PoliciesItem` items. Primary key is `name` (`str`). + """ + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, *, policies: Policies | UndefinedType = Undefined, _custom_data: dict[str, Any] | UndefinedType = Undefined + ) -> None: + """ + CvPathfinderInternetExit. + + + Subclass of AvdModel. + + Args: + policies: + List of Internet-exit policies using this interface as exit. + + Subclass of AvdIndexedList with + `PoliciesItem` items. Primary key is `name` (`str`). + _custom_data: _custom_data + + """ + + class FlowTracking(AvdModel): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = {"enabled": {"type": bool}, "name": {"type": str}, "_custom_data": {"type": dict}} + enabled: bool | None + name: str | None + """Flow tracker name as defined in flow_tracking_settings.""" + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, + *, + enabled: bool | None | UndefinedType = Undefined, + name: str | None | UndefinedType = Undefined, + _custom_data: dict[str, Any] | UndefinedType = Undefined, + ) -> None: + """ + FlowTracking. + + + Subclass of AvdModel. + + Args: + enabled: enabled + name: Flow tracker name as defined in flow_tracking_settings. + _custom_data: _custom_data + + """ + + class StructuredConfig(EosCliConfigGen.PortChannelInterfacesItem): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = { + "name": {"type": str}, + "description": {"type": str}, + "mode": {"type": str, "default": "active"}, + "member_interfaces": {"type": MemberInterfaces}, + "ip_address": {"type": str}, + "dhcp_ip": {"type": str}, + "public_ip": {"type": str}, + "encapsulation_dot1q_vlan": {"type": int}, + "dhcp_accept_default_route": {"type": bool, "default": True}, + "enabled": {"type": bool, "default": True}, + "peer": {"type": str}, + "peer_port_channel": {"type": str}, + "peer_ip": {"type": str}, + "bgp": {"type": Bgp}, + "ipv4_acl_in": {"type": str}, + "ipv4_acl_out": {"type": str}, + "static_routes": {"type": StaticRoutes}, + "qos_profile": {"type": str}, + "wan_carrier": {"type": str}, + "wan_circuit_id": {"type": str}, + "connected_to_pathfinder": {"type": bool, "default": True}, + "cv_pathfinder_internet_exit": {"type": CvPathfinderInternetExit}, + "raw_eos_cli": {"type": str}, + "flow_tracking": {"type": FlowTracking}, + "structured_config": {"type": StructuredConfig}, + "_custom_data": {"type": dict}, + } + name: str + """ + Port-Channel interface name like 'Port-Channel2' or subinterface name like 'Port-Channel2.42'. + For a + Port-Channel subinterface, the parent Port-Channel interface must be defined as well. + """ + description: str | None + """ + Interface description. + If not set a default description will be configured with '[[ + ]]'. + """ + mode: Literal["active", "passive", "on"] + """ + Port-Channel mode. + Should not be set on Port-Channel subinterfaces. + + Default value: `"active"` + """ + member_interfaces: MemberInterfaces + """ + Port-Channel member interfaces. + Should not be set on Port-Channel subinterfaces. + + Subclass of + AvdIndexedList with `MemberInterfacesItem` items. Primary key is `name` (`str`). + """ + ip_address: str | None + """Node IPv4 address/Mask or 'dhcp'.""" + dhcp_ip: str | None + """ + When the `ip_address` is `dhcp`, this optional field allows to indicate the expected + IPv4 address + (without mask) to be allocated on the interface if known. + This is not rendered in the configuration + but can be used for substitution of 'interface_ip' in the Access-list + set under `ipv4_acl_in` and + `ipv4_acl_out`. + """ + public_ip: str | None + """ + Node IPv4 address (no mask). + + This is used to get the public IP (if known) when the device is behind + NAT. + This is only used for `wan_rr` routers (AutoVPN RRs and Pathfinders) to determine the Public IP + with the following preference: + `wan_route_servers.path_groups.interfaces.ip_address` + -> + `l3_port_channels.public_ip` + -> `l3_port_channels.ip_address` + + The determined Public IP is + used by WAN routers when peering with this interface. + """ + encapsulation_dot1q_vlan: int | None + """ + For subinterfaces the dot1q vlan is derived from the interface name by default, but can also be + specified. + """ + dhcp_accept_default_route: bool + """ + Accept a default route from DHCP if `ip_address` is set to `dhcp`. + + Default value: `True` + """ + enabled: bool + """ + Enable or Shutdown the interface. + + Default value: `True` + """ + peer: str | None + """The peer device name. Used for description and documentation.""" + peer_port_channel: str | None + """The peer device port-channel interface. Used for description and documentation.""" + peer_ip: str | None + """ + The peer device IPv4 address (no mask). Used as default route gateway if `set_default_route` is true + and `ip` is an IP address. + """ + bgp: Bgp + """ + Enforce IPv4 BGP peering for the peer + + Subclass of AvdModel. + """ + ipv4_acl_in: str | None + """ + Name of the IPv4 access-list to be assigned in the ingress direction. + The access-list must be + defined under `ipv4_acls` and supports field substitution for "interface_ip" and "peer_ip". + Required + for all WAN interfaces (`wan_carrier` is set) unless the carrier is marked as 'trusted' under + `wan_carriers`. + """ + ipv4_acl_out: str | None + """ + Name of the IPv4 Access-list to be assigned in the egress direction. + The access-list must be defined + under `ipv4_acls` and supports field substitution for "interface_ip" and "peer_ip". + """ + static_routes: StaticRoutes + """ + Configure IPv4 static routes pointing to `peer_ip`. + + Subclass of AvdIndexedList with + `StaticRoutesItem` items. Primary key is `prefix` (`str`). + """ + qos_profile: str | None + """QOS service profile.""" + wan_carrier: str | None + """ + The WAN carrier this interface is connected to. + This is used to infer the path-groups in which this + interface should be configured. + Unless the carrier is marked as 'trusted' under `wan_carriers`, + `ipv4_acl_in` is also required on all WAN interfaces. + """ + wan_circuit_id: str | None + """ + The WAN circuit ID for this interface. + This is not rendered in the configuration but used for WAN + designs. + """ + connected_to_pathfinder: bool + """ + For a WAN interface (`wan_carrier` is set), allow to disable the static tunnel towards Pathfinders. + + Default value: `True` + """ + cv_pathfinder_internet_exit: CvPathfinderInternetExit + """ + PREVIEW: This key is in preview mode + + Subclass of AvdModel. + """ + raw_eos_cli: str | None + """EOS CLI rendered directly on the Port-Channel interface in the final EOS configuration.""" + flow_tracking: FlowTracking + """ + Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_port_channels` + setting. + + Subclass of AvdModel. + """ + structured_config: StructuredConfig + """ + Custom structured config for the Port-Channel interface. + + Subclass of AvdModel. + """ + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, + *, + name: str | UndefinedType = Undefined, + description: str | None | UndefinedType = Undefined, + mode: Literal["active", "passive", "on"] | UndefinedType = Undefined, + member_interfaces: MemberInterfaces | UndefinedType = Undefined, + ip_address: str | None | UndefinedType = Undefined, + dhcp_ip: str | None | UndefinedType = Undefined, + public_ip: str | None | UndefinedType = Undefined, + encapsulation_dot1q_vlan: int | None | UndefinedType = Undefined, + dhcp_accept_default_route: bool | UndefinedType = Undefined, + enabled: bool | UndefinedType = Undefined, + peer: str | None | UndefinedType = Undefined, + peer_port_channel: str | None | UndefinedType = Undefined, + peer_ip: str | None | UndefinedType = Undefined, + bgp: Bgp | UndefinedType = Undefined, + ipv4_acl_in: str | None | UndefinedType = Undefined, + ipv4_acl_out: str | None | UndefinedType = Undefined, + static_routes: StaticRoutes | UndefinedType = Undefined, + qos_profile: str | None | UndefinedType = Undefined, + wan_carrier: str | None | UndefinedType = Undefined, + wan_circuit_id: str | None | UndefinedType = Undefined, + connected_to_pathfinder: bool | UndefinedType = Undefined, + cv_pathfinder_internet_exit: CvPathfinderInternetExit | UndefinedType = Undefined, + raw_eos_cli: str | None | UndefinedType = Undefined, + flow_tracking: FlowTracking | UndefinedType = Undefined, + structured_config: StructuredConfig | UndefinedType = Undefined, + _custom_data: dict[str, Any] | UndefinedType = Undefined, + ) -> None: + """ + L3PortChannelsItem. + + + Subclass of AvdModel. + + Args: + name: + Port-Channel interface name like 'Port-Channel2' or subinterface name like 'Port-Channel2.42'. + For a + Port-Channel subinterface, the parent Port-Channel interface must be defined as well. + description: + Interface description. + If not set a default description will be configured with '[[ + ]]'. + mode: + Port-Channel mode. + Should not be set on Port-Channel subinterfaces. + member_interfaces: + Port-Channel member interfaces. + Should not be set on Port-Channel subinterfaces. + + Subclass of + AvdIndexedList with `MemberInterfacesItem` items. Primary key is `name` (`str`). + ip_address: Node IPv4 address/Mask or 'dhcp'. + dhcp_ip: + When the `ip_address` is `dhcp`, this optional field allows to indicate the expected + IPv4 address + (without mask) to be allocated on the interface if known. + This is not rendered in the configuration + but can be used for substitution of 'interface_ip' in the Access-list + set under `ipv4_acl_in` and + `ipv4_acl_out`. + public_ip: + Node IPv4 address (no mask). + + This is used to get the public IP (if known) when the device is behind + NAT. + This is only used for `wan_rr` routers (AutoVPN RRs and Pathfinders) to determine the Public IP + with the following preference: + `wan_route_servers.path_groups.interfaces.ip_address` + -> + `l3_port_channels.public_ip` + -> `l3_port_channels.ip_address` + + The determined Public IP is + used by WAN routers when peering with this interface. + encapsulation_dot1q_vlan: + For subinterfaces the dot1q vlan is derived from the interface name by default, but can also be + specified. + dhcp_accept_default_route: Accept a default route from DHCP if `ip_address` is set to `dhcp`. + enabled: Enable or Shutdown the interface. + peer: The peer device name. Used for description and documentation. + peer_port_channel: The peer device port-channel interface. Used for description and documentation. + peer_ip: + The peer device IPv4 address (no mask). Used as default route gateway if `set_default_route` is true + and `ip` is an IP address. + bgp: + Enforce IPv4 BGP peering for the peer + + Subclass of AvdModel. + ipv4_acl_in: + Name of the IPv4 access-list to be assigned in the ingress direction. + The access-list must be + defined under `ipv4_acls` and supports field substitution for "interface_ip" and "peer_ip". + Required + for all WAN interfaces (`wan_carrier` is set) unless the carrier is marked as 'trusted' under + `wan_carriers`. + ipv4_acl_out: + Name of the IPv4 Access-list to be assigned in the egress direction. + The access-list must be defined + under `ipv4_acls` and supports field substitution for "interface_ip" and "peer_ip". + static_routes: + Configure IPv4 static routes pointing to `peer_ip`. + + Subclass of AvdIndexedList with + `StaticRoutesItem` items. Primary key is `prefix` (`str`). + qos_profile: QOS service profile. + wan_carrier: + The WAN carrier this interface is connected to. + This is used to infer the path-groups in which this + interface should be configured. + Unless the carrier is marked as 'trusted' under `wan_carriers`, + `ipv4_acl_in` is also required on all WAN interfaces. + wan_circuit_id: + The WAN circuit ID for this interface. + This is not rendered in the configuration but used for WAN + designs. + connected_to_pathfinder: For a WAN interface (`wan_carrier` is set), allow to disable the static tunnel towards Pathfinders. + cv_pathfinder_internet_exit: + PREVIEW: This key is in preview mode + + Subclass of AvdModel. + raw_eos_cli: EOS CLI rendered directly on the Port-Channel interface in the final EOS configuration. + flow_tracking: + Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_port_channels` + setting. + + Subclass of AvdModel. + structured_config: + Custom structured config for the Port-Channel interface. + + Subclass of AvdModel. + _custom_data: _custom_data + + """ + + class L3PortChannels(AvdIndexedList[str, L3PortChannelsItem]): + """Subclass of AvdIndexedList with `L3PortChannelsItem` items. Primary key is `name` (`str`).""" + + _primary_key: ClassVar[str] = "name" + + L3PortChannels._item_type = L3PortChannelsItem + _fields: ClassVar[dict] = { "id": {"type": int}, "platform": {"type": str}, @@ -21295,6 +21968,7 @@ class L3Interfaces(AvdIndexedList[str, L3InterfacesItem]): "wan_ha": {"type": WanHa}, "dps_mss_ipv4": {"type": str, "default": "auto"}, "l3_interfaces": {"type": L3Interfaces}, + "l3_port_channels": {"type": L3PortChannels}, "data_plane_cpu_allocation_max": {"type": int}, "flow_tracker_type": {"type": str}, "_custom_data": {"type": dict}, @@ -22057,6 +22731,15 @@ class L3Interfaces(AvdIndexedList[str, L3InterfacesItem]): Subclass of AvdIndexedList with `L3InterfacesItem` items. Primary key is `name` (`str`). """ + l3_port_channels: L3PortChannels + """ + L3 Port-Channel interfaces to configure on the node. + Used to define the node for WAN interfaces when + `wan_carrier` is set. + + Subclass of AvdIndexedList with `L3PortChannelsItem` items. Primary key is + `name` (`str`). + """ data_plane_cpu_allocation_max: int | None """ Set the maximum number of CPU used for the data plane. @@ -22180,6 +22863,7 @@ def __init__( wan_ha: WanHa | UndefinedType = Undefined, dps_mss_ipv4: str | UndefinedType = Undefined, l3_interfaces: L3Interfaces | UndefinedType = Undefined, + l3_port_channels: L3PortChannels | UndefinedType = Undefined, data_plane_cpu_allocation_max: int | None | UndefinedType = Undefined, flow_tracker_type: Literal["sampled", "hardware"] | None | UndefinedType = Undefined, _custom_data: dict[str, Any] | UndefinedType = Undefined, @@ -22720,6 +23404,13 @@ def __init__( Subclass of AvdIndexedList with `L3InterfacesItem` items. Primary key is `name` (`str`). + l3_port_channels: + L3 Port-Channel interfaces to configure on the node. + Used to define the node for WAN interfaces when + `wan_carrier` is set. + + Subclass of AvdIndexedList with `L3PortChannelsItem` items. Primary key is + `name` (`str`). data_plane_cpu_allocation_max: Set the maximum number of CPU used for the data plane. This setting is useful on virtual Route @@ -24021,70 +24712,510 @@ def __init__( """ _fields: ClassVar[dict] = { - "enabled": {"type": bool}, - "ipsec": {"type": bool, "default": True}, - "mtu": {"type": int, "default": 9194}, - "ha_interfaces": {"type": HaInterfaces}, - "ha_ipv4_pool": {"type": str}, - "max_ha_interfaces": {"type": int}, - "port_channel_id": {"type": int}, - "use_port_channel_for_direct_ha": {"type": bool, "default": True}, + "enabled": {"type": bool}, + "ipsec": {"type": bool, "default": True}, + "mtu": {"type": int, "default": 9194}, + "ha_interfaces": {"type": HaInterfaces}, + "ha_ipv4_pool": {"type": str}, + "max_ha_interfaces": {"type": int}, + "port_channel_id": {"type": int}, + "use_port_channel_for_direct_ha": {"type": bool, "default": True}, + "flow_tracking": {"type": FlowTracking}, + "_custom_data": {"type": dict}, + } + enabled: bool | None + """Enable / Disable auto CV-Pathfinder HA, when two nodes are defined in the same node_group.""" + ipsec: bool + """ + Enable / Disable IPsec over HA path-group when HA is enabled. + + Default value: `True` + """ + mtu: int + """ + Set MTU on WAN HA interfaces. + + Default value: `9194` + """ + ha_interfaces: HaInterfaces + """ + Local WAN HA interfaces + Overwrite the default behavior which is to pick all the `uplink_interfaces`. + Can be used to filter uplink interfaces when there are multiple uplinks. + Limitations: + Either all + interfaces must be uplinks or all interfaces must not be uplinks. + Only one interface is supported + for non uplinks. + + Subclass of AvdList with `str` items. + """ + ha_ipv4_pool: str | None + """ + IP address pool used for WAN HA connectivity. + IP is derived from the node ID. + Not used for uplink + interfaces. + """ + max_ha_interfaces: int | None + """ + Number of parallel links towards HA switches. + Can be used to reserve IP addresses for future + parallel HA links. + """ + port_channel_id: int | None + """Port-channel ID to use for direct HA.""" + use_port_channel_for_direct_ha: bool + """ + Enable or disable using a port-channel interface for direct HA when there is only one interface. + This feature was introduced in EOS 4.33.0F. + + Default value: `True` + """ + flow_tracking: FlowTracking + """ + Configures flow-tracking on the HA interfaces. Overrides `fabric_flow_tracking.wan_ha_links` + setting. + + Subclass of AvdModel. + """ + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, + *, + enabled: bool | None | UndefinedType = Undefined, + ipsec: bool | UndefinedType = Undefined, + mtu: int | UndefinedType = Undefined, + ha_interfaces: HaInterfaces | UndefinedType = Undefined, + ha_ipv4_pool: str | None | UndefinedType = Undefined, + max_ha_interfaces: int | None | UndefinedType = Undefined, + port_channel_id: int | None | UndefinedType = Undefined, + use_port_channel_for_direct_ha: bool | UndefinedType = Undefined, + flow_tracking: FlowTracking | UndefinedType = Undefined, + _custom_data: dict[str, Any] | UndefinedType = Undefined, + ) -> None: + """ + WanHa. + + + Subclass of AvdModel. + + Args: + enabled: Enable / Disable auto CV-Pathfinder HA, when two nodes are defined in the same node_group. + ipsec: Enable / Disable IPsec over HA path-group when HA is enabled. + mtu: Set MTU on WAN HA interfaces. + ha_interfaces: + Local WAN HA interfaces + Overwrite the default behavior which is to pick all the `uplink_interfaces`. + Can be used to filter uplink interfaces when there are multiple uplinks. + Limitations: + Either all + interfaces must be uplinks or all interfaces must not be uplinks. + Only one interface is supported + for non uplinks. + + Subclass of AvdList with `str` items. + ha_ipv4_pool: + IP address pool used for WAN HA connectivity. + IP is derived from the node ID. + Not used for uplink + interfaces. + max_ha_interfaces: + Number of parallel links towards HA switches. + Can be used to reserve IP addresses for future + parallel HA links. + port_channel_id: Port-channel ID to use for direct HA. + use_port_channel_for_direct_ha: + Enable or disable using a port-channel interface for direct HA when there is only one interface. + This feature was introduced in EOS 4.33.0F. + flow_tracking: + Configures flow-tracking on the HA interfaces. Overrides `fabric_flow_tracking.wan_ha_links` + setting. + + Subclass of AvdModel. + _custom_data: _custom_data + + """ + + class L3InterfacesItem(AvdModel): + """Subclass of AvdModel.""" + + class Bgp(AvdModel): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = { + "peer_as": {"type": str}, + "ipv4_prefix_list_in": {"type": str}, + "ipv4_prefix_list_out": {"type": str}, + "_custom_data": {"type": dict}, + } + peer_as: str + """ + BGP AS <1-4294967295> or AS number in asdot notation "<1-65535>.<0-65535>". + For asdot notation in + YAML inputs, the value must be put in quotes, to prevent it from being interpreted as a float + number. + """ + ipv4_prefix_list_in: str | None + """ + Prefix List Name. Accept routes for only these prefixes from the peer. + Required for wan interfaces. + """ + ipv4_prefix_list_out: str | None + """ + Prefix List Name. Advertise routes for only these prefixes. + If not specified, nothing would be + advertised. + """ + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, + *, + peer_as: str | UndefinedType = Undefined, + ipv4_prefix_list_in: str | None | UndefinedType = Undefined, + ipv4_prefix_list_out: str | None | UndefinedType = Undefined, + _custom_data: dict[str, Any] | UndefinedType = Undefined, + ) -> None: + """ + Bgp. + + + Subclass of AvdModel. + + Args: + peer_as: + BGP AS <1-4294967295> or AS number in asdot notation "<1-65535>.<0-65535>". + For asdot notation in + YAML inputs, the value must be put in quotes, to prevent it from being interpreted as a float + number. + ipv4_prefix_list_in: + Prefix List Name. Accept routes for only these prefixes from the peer. + Required for wan interfaces. + ipv4_prefix_list_out: + Prefix List Name. Advertise routes for only these prefixes. + If not specified, nothing would be + advertised. + _custom_data: _custom_data + + """ + + class StaticRoutesItem(AvdModel): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = {"prefix": {"type": str}, "_custom_data": {"type": dict}} + prefix: str + """IPv4_network/Mask.""" + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, *, prefix: str | UndefinedType = Undefined, _custom_data: dict[str, Any] | UndefinedType = Undefined + ) -> None: + """ + StaticRoutesItem. + + + Subclass of AvdModel. + + Args: + prefix: IPv4_network/Mask. + _custom_data: _custom_data + + """ + + class StaticRoutes(AvdList[StaticRoutesItem]): + """Subclass of AvdList with `StaticRoutesItem` items.""" + + StaticRoutes._item_type = StaticRoutesItem + + class CvPathfinderInternetExit(AvdModel): + """Subclass of AvdModel.""" + + class PoliciesItem(AvdModel): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = {"name": {"type": str}, "tunnel_interface_numbers": {"type": str}, "_custom_data": {"type": dict}} + name: str + """Internet-exit policy name.""" + tunnel_interface_numbers: str | None + """ + Number range to use for Tunnel interfaces to an internet-exit service provider using this local + interface. + Examples: '1-3' or '100,200,300' + """ + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, + *, + name: str | UndefinedType = Undefined, + tunnel_interface_numbers: str | None | UndefinedType = Undefined, + _custom_data: dict[str, Any] | UndefinedType = Undefined, + ) -> None: + """ + PoliciesItem. + + + Subclass of AvdModel. + + Args: + name: Internet-exit policy name. + tunnel_interface_numbers: + Number range to use for Tunnel interfaces to an internet-exit service provider using this local + interface. + Examples: '1-3' or '100,200,300' + _custom_data: _custom_data + + """ + + class Policies(AvdIndexedList[str, PoliciesItem]): + """Subclass of AvdIndexedList with `PoliciesItem` items. Primary key is `name` (`str`).""" + + _primary_key: ClassVar[str] = "name" + + Policies._item_type = PoliciesItem + + _fields: ClassVar[dict] = {"policies": {"type": Policies}, "_custom_data": {"type": dict}} + policies: Policies + """ + List of Internet-exit policies using this interface as exit. + + Subclass of AvdIndexedList with + `PoliciesItem` items. Primary key is `name` (`str`). + """ + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, *, policies: Policies | UndefinedType = Undefined, _custom_data: dict[str, Any] | UndefinedType = Undefined + ) -> None: + """ + CvPathfinderInternetExit. + + + Subclass of AvdModel. + + Args: + policies: + List of Internet-exit policies using this interface as exit. + + Subclass of AvdIndexedList with + `PoliciesItem` items. Primary key is `name` (`str`). + _custom_data: _custom_data + + """ + + class FlowTracking(AvdModel): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = {"enabled": {"type": bool}, "name": {"type": str}, "_custom_data": {"type": dict}} + enabled: bool | None + name: str | None + """Flow tracker name as defined in flow_tracking_settings.""" + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, + *, + enabled: bool | None | UndefinedType = Undefined, + name: str | None | UndefinedType = Undefined, + _custom_data: dict[str, Any] | UndefinedType = Undefined, + ) -> None: + """ + FlowTracking. + + + Subclass of AvdModel. + + Args: + enabled: enabled + name: Flow tracker name as defined in flow_tracking_settings. + _custom_data: _custom_data + + """ + + class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = { + "profile": {"type": str}, + "name": {"type": str}, + "description": {"type": str}, + "ip_address": {"type": str}, + "dhcp_ip": {"type": str}, + "public_ip": {"type": str}, + "encapsulation_dot1q_vlan": {"type": int}, + "dhcp_accept_default_route": {"type": bool, "default": True}, + "enabled": {"type": bool, "default": True}, + "speed": {"type": str}, + "peer": {"type": str}, + "peer_interface": {"type": str}, + "peer_ip": {"type": str}, + "bgp": {"type": Bgp}, + "ipv4_acl_in": {"type": str}, + "ipv4_acl_out": {"type": str}, + "static_routes": {"type": StaticRoutes}, + "qos_profile": {"type": str}, + "wan_carrier": {"type": str}, + "wan_circuit_id": {"type": str}, + "connected_to_pathfinder": {"type": bool, "default": True}, + "cv_pathfinder_internet_exit": {"type": CvPathfinderInternetExit}, + "raw_eos_cli": {"type": str}, "flow_tracking": {"type": FlowTracking}, + "structured_config": {"type": StructuredConfig}, "_custom_data": {"type": dict}, } - enabled: bool | None - """Enable / Disable auto CV-Pathfinder HA, when two nodes are defined in the same node_group.""" - ipsec: bool + profile: str | None + """L3 interface profile name. Profile defined under `l3_interface_profiles`.""" + name: str """ - Enable / Disable IPsec over HA path-group when HA is enabled. + Ethernet interface name like 'Ethernet2' or subinterface name like 'Ethernet2.42'. + For a + subinterface, the parent physical interface is automatically created. + """ + description: str | None + """ + Interface description. + If not set a default description will be configured with '[[ + ]]'. + """ + ip_address: str | None + """Node IPv4 address/Mask or 'dhcp'.""" + dhcp_ip: str | None + """ + When the `ip_address` is `dhcp`, this optional field allows to indicate the expected + IPv4 address + (without mask) to be allocated on the interface if known. + This is not rendered in the configuration + but can be used for substitution of 'interface_ip' in the Access-list + set under `ipv4_acl_in` and + `ipv4_acl_out`. + """ + public_ip: str | None + """ + Node IPv4 address (no mask). + + This is used to get the public IP (if known) when the device is behind + NAT. + This is only used for `wan_rr` routers (AutoVPN RRs and Pathfinders) to determine the Public IP + with the following preference: + `wan_route_servers.path_groups.interfaces.ip_address` + -> + `l3_interfaces.public_ip` + -> `l3_interfaces.ip_address` + + The determined Public IP is used + by WAN routers when peering with this interface. + """ + encapsulation_dot1q_vlan: int | None + """ + For subinterfaces the dot1q vlan is derived from the interface name by default, but can also be + specified. + """ + dhcp_accept_default_route: bool + """ + Accept a default route from DHCP if `ip_address` is set to `dhcp`. Default value: `True` """ - mtu: int + enabled: bool """ - Set MTU on WAN HA interfaces. + Enable or Shutdown the interface. - Default value: `9194` + Default value: `True` """ - ha_interfaces: HaInterfaces + speed: str | None """ - Local WAN HA interfaces - Overwrite the default behavior which is to pick all the `uplink_interfaces`. - Can be used to filter uplink interfaces when there are multiple uplinks. - Limitations: - Either all - interfaces must be uplinks or all interfaces must not be uplinks. - Only one interface is supported - for non uplinks. + Speed should be set in the format `` or `forced ` or `auto + `. + """ + peer: str | None + """The peer device name. Used for description and documentation.""" + peer_interface: str | None + """The peer device interface. Used for description and documentation.""" + peer_ip: str | None + """ + The peer device IPv4 address (no mask). Used as default route gateway if `set_default_route` is true + and `ip` is an IP address. + """ + bgp: Bgp + """ + Enforce IPv4 BGP peering for the peer - Subclass of AvdList with `str` items. + Subclass of AvdModel. """ - ha_ipv4_pool: str | None + ipv4_acl_in: str | None """ - IP address pool used for WAN HA connectivity. - IP is derived from the node ID. - Not used for uplink - interfaces. + Name of the IPv4 access-list to be assigned in the ingress direction. + The access-list must be + defined under `ipv4_acls` and supports field substitution for "interface_ip" and "peer_ip". + Required + for all WAN interfaces (`wan_carrier` is set) unless the carrier is marked as 'trusted' under + `wan_carriers`. """ - max_ha_interfaces: int | None + ipv4_acl_out: str | None """ - Number of parallel links towards HA switches. - Can be used to reserve IP addresses for future - parallel HA links. + Name of the IPv4 Access-list to be assigned in the egress direction. + The access-list must be defined + under `ipv4_acls` and supports field substitution for "interface_ip" and "peer_ip". """ - port_channel_id: int | None - """Port-channel ID to use for direct HA.""" - use_port_channel_for_direct_ha: bool + static_routes: StaticRoutes """ - Enable or disable using a port-channel interface for direct HA when there is only one interface. - This feature was introduced in EOS 4.33.0F. + Configure IPv4 static routes pointing to `peer_ip`. + + Subclass of AvdList with `StaticRoutesItem` + items. + """ + qos_profile: str | None + """QOS service profile.""" + wan_carrier: str | None + """ + The WAN carrier this interface is connected to. + This is used to infer the path-groups in which this + interface should be configured. + Unless the carrier is marked as 'trusted' under `wan_carriers`, + `ipv4_acl_in` is also required on all WAN interfaces. + """ + wan_circuit_id: str | None + """ + The WAN circuit ID for this interface. + This is not rendered in the configuration but used for WAN + designs. + """ + connected_to_pathfinder: bool + """ + For a WAN interface (`wan_carrier` is set), allow to disable the static tunnel towards Pathfinders. Default value: `True` """ + cv_pathfinder_internet_exit: CvPathfinderInternetExit + """ + PREVIEW: This key is in preview mode + + Subclass of AvdModel. + """ + raw_eos_cli: str | None + """EOS CLI rendered directly on the interface in the final EOS configuration.""" flow_tracking: FlowTracking """ - Configures flow-tracking on the HA interfaces. Overrides `fabric_flow_tracking.wan_ha_links` - setting. + Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_interfaces` setting. + Subclass of AvdModel. + """ + structured_config: StructuredConfig + """ + Custom structured config for the Ethernet interface. Subclass of AvdModel. """ @@ -24095,63 +25226,225 @@ def __init__( def __init__( self, *, - enabled: bool | None | UndefinedType = Undefined, - ipsec: bool | UndefinedType = Undefined, - mtu: int | UndefinedType = Undefined, - ha_interfaces: HaInterfaces | UndefinedType = Undefined, - ha_ipv4_pool: str | None | UndefinedType = Undefined, - max_ha_interfaces: int | None | UndefinedType = Undefined, - port_channel_id: int | None | UndefinedType = Undefined, - use_port_channel_for_direct_ha: bool | UndefinedType = Undefined, + profile: str | None | UndefinedType = Undefined, + name: str | UndefinedType = Undefined, + description: str | None | UndefinedType = Undefined, + ip_address: str | None | UndefinedType = Undefined, + dhcp_ip: str | None | UndefinedType = Undefined, + public_ip: str | None | UndefinedType = Undefined, + encapsulation_dot1q_vlan: int | None | UndefinedType = Undefined, + dhcp_accept_default_route: bool | UndefinedType = Undefined, + enabled: bool | UndefinedType = Undefined, + speed: str | None | UndefinedType = Undefined, + peer: str | None | UndefinedType = Undefined, + peer_interface: str | None | UndefinedType = Undefined, + peer_ip: str | None | UndefinedType = Undefined, + bgp: Bgp | UndefinedType = Undefined, + ipv4_acl_in: str | None | UndefinedType = Undefined, + ipv4_acl_out: str | None | UndefinedType = Undefined, + static_routes: StaticRoutes | UndefinedType = Undefined, + qos_profile: str | None | UndefinedType = Undefined, + wan_carrier: str | None | UndefinedType = Undefined, + wan_circuit_id: str | None | UndefinedType = Undefined, + connected_to_pathfinder: bool | UndefinedType = Undefined, + cv_pathfinder_internet_exit: CvPathfinderInternetExit | UndefinedType = Undefined, + raw_eos_cli: str | None | UndefinedType = Undefined, flow_tracking: FlowTracking | UndefinedType = Undefined, + structured_config: StructuredConfig | UndefinedType = Undefined, _custom_data: dict[str, Any] | UndefinedType = Undefined, ) -> None: """ - WanHa. + L3InterfacesItem. Subclass of AvdModel. Args: - enabled: Enable / Disable auto CV-Pathfinder HA, when two nodes are defined in the same node_group. - ipsec: Enable / Disable IPsec over HA path-group when HA is enabled. - mtu: Set MTU on WAN HA interfaces. - ha_interfaces: - Local WAN HA interfaces - Overwrite the default behavior which is to pick all the `uplink_interfaces`. - Can be used to filter uplink interfaces when there are multiple uplinks. - Limitations: - Either all - interfaces must be uplinks or all interfaces must not be uplinks. - Only one interface is supported - for non uplinks. + profile: L3 interface profile name. Profile defined under `l3_interface_profiles`. + name: + Ethernet interface name like 'Ethernet2' or subinterface name like 'Ethernet2.42'. + For a + subinterface, the parent physical interface is automatically created. + description: + Interface description. + If not set a default description will be configured with '[[ + ]]'. + ip_address: Node IPv4 address/Mask or 'dhcp'. + dhcp_ip: + When the `ip_address` is `dhcp`, this optional field allows to indicate the expected + IPv4 address + (without mask) to be allocated on the interface if known. + This is not rendered in the configuration + but can be used for substitution of 'interface_ip' in the Access-list + set under `ipv4_acl_in` and + `ipv4_acl_out`. + public_ip: + Node IPv4 address (no mask). - Subclass of AvdList with `str` items. - ha_ipv4_pool: - IP address pool used for WAN HA connectivity. - IP is derived from the node ID. - Not used for uplink - interfaces. - max_ha_interfaces: - Number of parallel links towards HA switches. - Can be used to reserve IP addresses for future - parallel HA links. - port_channel_id: Port-channel ID to use for direct HA. - use_port_channel_for_direct_ha: - Enable or disable using a port-channel interface for direct HA when there is only one interface. - This feature was introduced in EOS 4.33.0F. + This is used to get the public IP (if known) when the device is behind + NAT. + This is only used for `wan_rr` routers (AutoVPN RRs and Pathfinders) to determine the Public IP + with the following preference: + `wan_route_servers.path_groups.interfaces.ip_address` + -> + `l3_interfaces.public_ip` + -> `l3_interfaces.ip_address` + + The determined Public IP is used + by WAN routers when peering with this interface. + encapsulation_dot1q_vlan: + For subinterfaces the dot1q vlan is derived from the interface name by default, but can also be + specified. + dhcp_accept_default_route: Accept a default route from DHCP if `ip_address` is set to `dhcp`. + enabled: Enable or Shutdown the interface. + speed: + Speed should be set in the format `` or `forced ` or `auto + `. + peer: The peer device name. Used for description and documentation. + peer_interface: The peer device interface. Used for description and documentation. + peer_ip: + The peer device IPv4 address (no mask). Used as default route gateway if `set_default_route` is true + and `ip` is an IP address. + bgp: + Enforce IPv4 BGP peering for the peer + + Subclass of AvdModel. + ipv4_acl_in: + Name of the IPv4 access-list to be assigned in the ingress direction. + The access-list must be + defined under `ipv4_acls` and supports field substitution for "interface_ip" and "peer_ip". + Required + for all WAN interfaces (`wan_carrier` is set) unless the carrier is marked as 'trusted' under + `wan_carriers`. + ipv4_acl_out: + Name of the IPv4 Access-list to be assigned in the egress direction. + The access-list must be defined + under `ipv4_acls` and supports field substitution for "interface_ip" and "peer_ip". + static_routes: + Configure IPv4 static routes pointing to `peer_ip`. + + Subclass of AvdList with `StaticRoutesItem` + items. + qos_profile: QOS service profile. + wan_carrier: + The WAN carrier this interface is connected to. + This is used to infer the path-groups in which this + interface should be configured. + Unless the carrier is marked as 'trusted' under `wan_carriers`, + `ipv4_acl_in` is also required on all WAN interfaces. + wan_circuit_id: + The WAN circuit ID for this interface. + This is not rendered in the configuration but used for WAN + designs. + connected_to_pathfinder: For a WAN interface (`wan_carrier` is set), allow to disable the static tunnel towards Pathfinders. + cv_pathfinder_internet_exit: + PREVIEW: This key is in preview mode + + Subclass of AvdModel. + raw_eos_cli: EOS CLI rendered directly on the interface in the final EOS configuration. flow_tracking: - Configures flow-tracking on the HA interfaces. Overrides `fabric_flow_tracking.wan_ha_links` - setting. + Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_interfaces` setting. + Subclass of AvdModel. + structured_config: + Custom structured config for the Ethernet interface. Subclass of AvdModel. _custom_data: _custom_data """ - class L3InterfacesItem(AvdModel): + class L3Interfaces(AvdIndexedList[str, L3InterfacesItem]): + """Subclass of AvdIndexedList with `L3InterfacesItem` items. Primary key is `name` (`str`).""" + + _primary_key: ClassVar[str] = "name" + + L3Interfaces._item_type = L3InterfacesItem + + class L3PortChannelsItem(AvdModel): """Subclass of AvdModel.""" + class MemberInterfacesItem(AvdModel): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = { + "name": {"type": str}, + "description": {"type": str}, + "peer": {"type": str}, + "peer_interface": {"type": str}, + "speed": {"type": str}, + "_custom_data": {"type": dict}, + } + name: str + """ + Ethernet interface name like 'Ethernet2'. + Member interface cannot be subinterface. + """ + description: str | None + """ + Interface description for this member. + If not set a default description will be configured with + '[[ ]]'. + """ + peer: str | None + """ + The peer device name. Used for description and documentation. + If not set, this inherits the peer + setting on the port-channel interface. + """ + peer_interface: str | None + """The peer device interface. Used for description and documentation.""" + speed: str | None + """ + Speed should be set in the format `` or `forced ` or `auto + `. + """ + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, + *, + name: str | UndefinedType = Undefined, + description: str | None | UndefinedType = Undefined, + peer: str | None | UndefinedType = Undefined, + peer_interface: str | None | UndefinedType = Undefined, + speed: str | None | UndefinedType = Undefined, + _custom_data: dict[str, Any] | UndefinedType = Undefined, + ) -> None: + """ + MemberInterfacesItem. + + + Subclass of AvdModel. + + Args: + name: + Ethernet interface name like 'Ethernet2'. + Member interface cannot be subinterface. + description: + Interface description for this member. + If not set a default description will be configured with + '[[ ]]'. + peer: + The peer device name. Used for description and documentation. + If not set, this inherits the peer + setting on the port-channel interface. + peer_interface: The peer device interface. Used for description and documentation. + speed: + Speed should be set in the format `` or `forced ` or `auto + `. + _custom_data: _custom_data + + """ + + class MemberInterfaces(AvdIndexedList[str, MemberInterfacesItem]): + """Subclass of AvdIndexedList with `MemberInterfacesItem` items. Primary key is `name` (`str`).""" + + _primary_key: ClassVar[str] = "name" + + MemberInterfaces._item_type = MemberInterfacesItem + class Bgp(AvdModel): """Subclass of AvdModel.""" @@ -24239,8 +25532,10 @@ def __init__( """ - class StaticRoutes(AvdList[StaticRoutesItem]): - """Subclass of AvdList with `StaticRoutesItem` items.""" + class StaticRoutes(AvdIndexedList[str, StaticRoutesItem]): + """Subclass of AvdIndexedList with `StaticRoutesItem` items. Primary key is `prefix` (`str`).""" + + _primary_key: ClassVar[str] = "prefix" StaticRoutes._item_type = StaticRoutesItem @@ -24355,22 +25650,22 @@ def __init__( """ - class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): + class StructuredConfig(EosCliConfigGen.PortChannelInterfacesItem): """Subclass of AvdModel.""" _fields: ClassVar[dict] = { - "profile": {"type": str}, "name": {"type": str}, "description": {"type": str}, + "mode": {"type": str, "default": "active"}, + "member_interfaces": {"type": MemberInterfaces}, "ip_address": {"type": str}, "dhcp_ip": {"type": str}, "public_ip": {"type": str}, "encapsulation_dot1q_vlan": {"type": int}, "dhcp_accept_default_route": {"type": bool, "default": True}, "enabled": {"type": bool, "default": True}, - "speed": {"type": str}, "peer": {"type": str}, - "peer_interface": {"type": str}, + "peer_port_channel": {"type": str}, "peer_ip": {"type": str}, "bgp": {"type": Bgp}, "ipv4_acl_in": {"type": str}, @@ -24386,19 +25681,32 @@ class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): "structured_config": {"type": StructuredConfig}, "_custom_data": {"type": dict}, } - profile: str | None - """L3 interface profile name. Profile defined under `l3_interface_profiles`.""" name: str """ - Ethernet interface name like 'Ethernet2' or subinterface name like 'Ethernet2.42'. + Port-Channel interface name like 'Port-Channel2' or subinterface name like 'Port-Channel2.42'. For a - subinterface, the parent physical interface is automatically created. + Port-Channel subinterface, the parent Port-Channel interface must be defined as well. """ description: str | None """ Interface description. If not set a default description will be configured with '[[ - ]]'. + ]]'. + """ + mode: Literal["active", "passive", "on"] + """ + Port-Channel mode. + Should not be set on Port-Channel subinterfaces. + + Default value: `"active"` + """ + member_interfaces: MemberInterfaces + """ + Port-Channel member interfaces. + Should not be set on Port-Channel subinterfaces. + + Subclass of + AvdIndexedList with `MemberInterfacesItem` items. Primary key is `name` (`str`). """ ip_address: str | None """Node IPv4 address/Mask or 'dhcp'.""" @@ -24422,11 +25730,11 @@ class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): with the following preference: `wan_route_servers.path_groups.interfaces.ip_address` -> - `l3_interfaces.public_ip` - -> `l3_interfaces.ip_address` + `l3_port_channels.public_ip` + -> `l3_port_channels.ip_address` - The determined Public IP is used - by WAN routers when peering with this interface. + The determined Public IP is + used by WAN routers when peering with this interface. """ encapsulation_dot1q_vlan: int | None """ @@ -24445,15 +25753,10 @@ class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): Default value: `True` """ - speed: str | None - """ - Speed should be set in the format `` or `forced ` or `auto - `. - """ peer: str | None """The peer device name. Used for description and documentation.""" - peer_interface: str | None - """The peer device interface. Used for description and documentation.""" + peer_port_channel: str | None + """The peer device port-channel interface. Used for description and documentation.""" peer_ip: str | None """ The peer device IPv4 address (no mask). Used as default route gateway if `set_default_route` is true @@ -24484,8 +25787,8 @@ class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): """ Configure IPv4 static routes pointing to `peer_ip`. - Subclass of AvdList with `StaticRoutesItem` - items. + Subclass of AvdIndexedList with + `StaticRoutesItem` items. Primary key is `prefix` (`str`). """ qos_profile: str | None """QOS service profile.""" @@ -24516,15 +25819,17 @@ class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): Subclass of AvdModel. """ raw_eos_cli: str | None - """EOS CLI rendered directly on the interface in the final EOS configuration.""" + """EOS CLI rendered directly on the Port-Channel interface in the final EOS configuration.""" flow_tracking: FlowTracking """ - Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_interfaces` setting. + Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_port_channels` + setting. + Subclass of AvdModel. """ structured_config: StructuredConfig """ - Custom structured config for the Ethernet interface. + Custom structured config for the Port-Channel interface. Subclass of AvdModel. """ @@ -24535,18 +25840,18 @@ class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): def __init__( self, *, - profile: str | None | UndefinedType = Undefined, name: str | UndefinedType = Undefined, description: str | None | UndefinedType = Undefined, + mode: Literal["active", "passive", "on"] | UndefinedType = Undefined, + member_interfaces: MemberInterfaces | UndefinedType = Undefined, ip_address: str | None | UndefinedType = Undefined, dhcp_ip: str | None | UndefinedType = Undefined, public_ip: str | None | UndefinedType = Undefined, encapsulation_dot1q_vlan: int | None | UndefinedType = Undefined, dhcp_accept_default_route: bool | UndefinedType = Undefined, enabled: bool | UndefinedType = Undefined, - speed: str | None | UndefinedType = Undefined, peer: str | None | UndefinedType = Undefined, - peer_interface: str | None | UndefinedType = Undefined, + peer_port_channel: str | None | UndefinedType = Undefined, peer_ip: str | None | UndefinedType = Undefined, bgp: Bgp | UndefinedType = Undefined, ipv4_acl_in: str | None | UndefinedType = Undefined, @@ -24563,21 +25868,29 @@ def __init__( _custom_data: dict[str, Any] | UndefinedType = Undefined, ) -> None: """ - L3InterfacesItem. + L3PortChannelsItem. Subclass of AvdModel. Args: - profile: L3 interface profile name. Profile defined under `l3_interface_profiles`. name: - Ethernet interface name like 'Ethernet2' or subinterface name like 'Ethernet2.42'. + Port-Channel interface name like 'Port-Channel2' or subinterface name like 'Port-Channel2.42'. For a - subinterface, the parent physical interface is automatically created. + Port-Channel subinterface, the parent Port-Channel interface must be defined as well. description: Interface description. If not set a default description will be configured with '[[ - ]]'. + ]]'. + mode: + Port-Channel mode. + Should not be set on Port-Channel subinterfaces. + member_interfaces: + Port-Channel member interfaces. + Should not be set on Port-Channel subinterfaces. + + Subclass of + AvdIndexedList with `MemberInterfacesItem` items. Primary key is `name` (`str`). ip_address: Node IPv4 address/Mask or 'dhcp'. dhcp_ip: When the `ip_address` is `dhcp`, this optional field allows to indicate the expected @@ -24596,21 +25909,18 @@ def __init__( with the following preference: `wan_route_servers.path_groups.interfaces.ip_address` -> - `l3_interfaces.public_ip` - -> `l3_interfaces.ip_address` + `l3_port_channels.public_ip` + -> `l3_port_channels.ip_address` - The determined Public IP is used - by WAN routers when peering with this interface. + The determined Public IP is + used by WAN routers when peering with this interface. encapsulation_dot1q_vlan: For subinterfaces the dot1q vlan is derived from the interface name by default, but can also be specified. dhcp_accept_default_route: Accept a default route from DHCP if `ip_address` is set to `dhcp`. enabled: Enable or Shutdown the interface. - speed: - Speed should be set in the format `` or `forced ` or `auto - `. peer: The peer device name. Used for description and documentation. - peer_interface: The peer device interface. Used for description and documentation. + peer_port_channel: The peer device port-channel interface. Used for description and documentation. peer_ip: The peer device IPv4 address (no mask). Used as default route gateway if `set_default_route` is true and `ip` is an IP address. @@ -24632,8 +25942,8 @@ def __init__( static_routes: Configure IPv4 static routes pointing to `peer_ip`. - Subclass of AvdList with `StaticRoutesItem` - items. + Subclass of AvdIndexedList with + `StaticRoutesItem` items. Primary key is `prefix` (`str`). qos_profile: QOS service profile. wan_carrier: The WAN carrier this interface is connected to. @@ -24650,24 +25960,26 @@ def __init__( PREVIEW: This key is in preview mode Subclass of AvdModel. - raw_eos_cli: EOS CLI rendered directly on the interface in the final EOS configuration. + raw_eos_cli: EOS CLI rendered directly on the Port-Channel interface in the final EOS configuration. flow_tracking: - Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_interfaces` setting. + Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_port_channels` + setting. + Subclass of AvdModel. structured_config: - Custom structured config for the Ethernet interface. + Custom structured config for the Port-Channel interface. Subclass of AvdModel. _custom_data: _custom_data """ - class L3Interfaces(AvdIndexedList[str, L3InterfacesItem]): - """Subclass of AvdIndexedList with `L3InterfacesItem` items. Primary key is `name` (`str`).""" + class L3PortChannels(AvdIndexedList[str, L3PortChannelsItem]): + """Subclass of AvdIndexedList with `L3PortChannelsItem` items. Primary key is `name` (`str`).""" _primary_key: ClassVar[str] = "name" - L3Interfaces._item_type = L3InterfacesItem + L3PortChannels._item_type = L3PortChannelsItem _fields: ClassVar[dict] = { "name": {"type": str}, @@ -24775,6 +26087,7 @@ class L3Interfaces(AvdIndexedList[str, L3InterfacesItem]): "wan_ha": {"type": WanHa}, "dps_mss_ipv4": {"type": str, "default": "auto"}, "l3_interfaces": {"type": L3Interfaces}, + "l3_port_channels": {"type": L3PortChannels}, "data_plane_cpu_allocation_max": {"type": int}, "flow_tracker_type": {"type": str}, "_custom_data": {"type": dict}, @@ -25547,6 +26860,15 @@ class L3Interfaces(AvdIndexedList[str, L3InterfacesItem]): Subclass of AvdIndexedList with `L3InterfacesItem` items. Primary key is `name` (`str`). """ + l3_port_channels: L3PortChannels + """ + L3 Port-Channel interfaces to configure on the node. + Used to define the node for WAN interfaces when + `wan_carrier` is set. + + Subclass of AvdIndexedList with `L3PortChannelsItem` items. Primary key is + `name` (`str`). + """ data_plane_cpu_allocation_max: int | None """ Set the maximum number of CPU used for the data plane. @@ -25672,6 +26994,7 @@ def __init__( wan_ha: WanHa | UndefinedType = Undefined, dps_mss_ipv4: str | UndefinedType = Undefined, l3_interfaces: L3Interfaces | UndefinedType = Undefined, + l3_port_channels: L3PortChannels | UndefinedType = Undefined, data_plane_cpu_allocation_max: int | None | UndefinedType = Undefined, flow_tracker_type: Literal["sampled", "hardware"] | None | UndefinedType = Undefined, _custom_data: dict[str, Any] | UndefinedType = Undefined, @@ -26219,6 +27542,13 @@ def __init__( Subclass of AvdIndexedList with `L3InterfacesItem` items. Primary key is `name` (`str`). + l3_port_channels: + L3 Port-Channel interfaces to configure on the node. + Used to define the node for WAN interfaces when + `wan_carrier` is set. + + Subclass of AvdIndexedList with `L3PortChannelsItem` items. Primary key is + `name` (`str`). data_plane_cpu_allocation_max: Set the maximum number of CPU used for the data plane. This setting is useful on virtual Route @@ -27462,70 +28792,510 @@ def __init__( """ _fields: ClassVar[dict] = { - "enabled": {"type": bool}, - "ipsec": {"type": bool, "default": True}, - "mtu": {"type": int, "default": 9194}, - "ha_interfaces": {"type": HaInterfaces}, - "ha_ipv4_pool": {"type": str}, - "max_ha_interfaces": {"type": int}, - "port_channel_id": {"type": int}, - "use_port_channel_for_direct_ha": {"type": bool, "default": True}, + "enabled": {"type": bool}, + "ipsec": {"type": bool, "default": True}, + "mtu": {"type": int, "default": 9194}, + "ha_interfaces": {"type": HaInterfaces}, + "ha_ipv4_pool": {"type": str}, + "max_ha_interfaces": {"type": int}, + "port_channel_id": {"type": int}, + "use_port_channel_for_direct_ha": {"type": bool, "default": True}, + "flow_tracking": {"type": FlowTracking}, + "_custom_data": {"type": dict}, + } + enabled: bool | None + """Enable / Disable auto CV-Pathfinder HA, when two nodes are defined in the same node_group.""" + ipsec: bool + """ + Enable / Disable IPsec over HA path-group when HA is enabled. + + Default value: `True` + """ + mtu: int + """ + Set MTU on WAN HA interfaces. + + Default value: `9194` + """ + ha_interfaces: HaInterfaces + """ + Local WAN HA interfaces + Overwrite the default behavior which is to pick all the `uplink_interfaces`. + Can be used to filter uplink interfaces when there are multiple uplinks. + Limitations: + Either all + interfaces must be uplinks or all interfaces must not be uplinks. + Only one interface is supported + for non uplinks. + + Subclass of AvdList with `str` items. + """ + ha_ipv4_pool: str | None + """ + IP address pool used for WAN HA connectivity. + IP is derived from the node ID. + Not used for uplink + interfaces. + """ + max_ha_interfaces: int | None + """ + Number of parallel links towards HA switches. + Can be used to reserve IP addresses for future + parallel HA links. + """ + port_channel_id: int | None + """Port-channel ID to use for direct HA.""" + use_port_channel_for_direct_ha: bool + """ + Enable or disable using a port-channel interface for direct HA when there is only one interface. + This feature was introduced in EOS 4.33.0F. + + Default value: `True` + """ + flow_tracking: FlowTracking + """ + Configures flow-tracking on the HA interfaces. Overrides `fabric_flow_tracking.wan_ha_links` + setting. + + Subclass of AvdModel. + """ + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, + *, + enabled: bool | None | UndefinedType = Undefined, + ipsec: bool | UndefinedType = Undefined, + mtu: int | UndefinedType = Undefined, + ha_interfaces: HaInterfaces | UndefinedType = Undefined, + ha_ipv4_pool: str | None | UndefinedType = Undefined, + max_ha_interfaces: int | None | UndefinedType = Undefined, + port_channel_id: int | None | UndefinedType = Undefined, + use_port_channel_for_direct_ha: bool | UndefinedType = Undefined, + flow_tracking: FlowTracking | UndefinedType = Undefined, + _custom_data: dict[str, Any] | UndefinedType = Undefined, + ) -> None: + """ + WanHa. + + + Subclass of AvdModel. + + Args: + enabled: Enable / Disable auto CV-Pathfinder HA, when two nodes are defined in the same node_group. + ipsec: Enable / Disable IPsec over HA path-group when HA is enabled. + mtu: Set MTU on WAN HA interfaces. + ha_interfaces: + Local WAN HA interfaces + Overwrite the default behavior which is to pick all the `uplink_interfaces`. + Can be used to filter uplink interfaces when there are multiple uplinks. + Limitations: + Either all + interfaces must be uplinks or all interfaces must not be uplinks. + Only one interface is supported + for non uplinks. + + Subclass of AvdList with `str` items. + ha_ipv4_pool: + IP address pool used for WAN HA connectivity. + IP is derived from the node ID. + Not used for uplink + interfaces. + max_ha_interfaces: + Number of parallel links towards HA switches. + Can be used to reserve IP addresses for future + parallel HA links. + port_channel_id: Port-channel ID to use for direct HA. + use_port_channel_for_direct_ha: + Enable or disable using a port-channel interface for direct HA when there is only one interface. + This feature was introduced in EOS 4.33.0F. + flow_tracking: + Configures flow-tracking on the HA interfaces. Overrides `fabric_flow_tracking.wan_ha_links` + setting. + + Subclass of AvdModel. + _custom_data: _custom_data + + """ + + class L3InterfacesItem(AvdModel): + """Subclass of AvdModel.""" + + class Bgp(AvdModel): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = { + "peer_as": {"type": str}, + "ipv4_prefix_list_in": {"type": str}, + "ipv4_prefix_list_out": {"type": str}, + "_custom_data": {"type": dict}, + } + peer_as: str + """ + BGP AS <1-4294967295> or AS number in asdot notation "<1-65535>.<0-65535>". + For asdot notation in + YAML inputs, the value must be put in quotes, to prevent it from being interpreted as a float + number. + """ + ipv4_prefix_list_in: str | None + """ + Prefix List Name. Accept routes for only these prefixes from the peer. + Required for wan interfaces. + """ + ipv4_prefix_list_out: str | None + """ + Prefix List Name. Advertise routes for only these prefixes. + If not specified, nothing would be + advertised. + """ + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, + *, + peer_as: str | UndefinedType = Undefined, + ipv4_prefix_list_in: str | None | UndefinedType = Undefined, + ipv4_prefix_list_out: str | None | UndefinedType = Undefined, + _custom_data: dict[str, Any] | UndefinedType = Undefined, + ) -> None: + """ + Bgp. + + + Subclass of AvdModel. + + Args: + peer_as: + BGP AS <1-4294967295> or AS number in asdot notation "<1-65535>.<0-65535>". + For asdot notation in + YAML inputs, the value must be put in quotes, to prevent it from being interpreted as a float + number. + ipv4_prefix_list_in: + Prefix List Name. Accept routes for only these prefixes from the peer. + Required for wan interfaces. + ipv4_prefix_list_out: + Prefix List Name. Advertise routes for only these prefixes. + If not specified, nothing would be + advertised. + _custom_data: _custom_data + + """ + + class StaticRoutesItem(AvdModel): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = {"prefix": {"type": str}, "_custom_data": {"type": dict}} + prefix: str + """IPv4_network/Mask.""" + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, *, prefix: str | UndefinedType = Undefined, _custom_data: dict[str, Any] | UndefinedType = Undefined + ) -> None: + """ + StaticRoutesItem. + + + Subclass of AvdModel. + + Args: + prefix: IPv4_network/Mask. + _custom_data: _custom_data + + """ + + class StaticRoutes(AvdList[StaticRoutesItem]): + """Subclass of AvdList with `StaticRoutesItem` items.""" + + StaticRoutes._item_type = StaticRoutesItem + + class CvPathfinderInternetExit(AvdModel): + """Subclass of AvdModel.""" + + class PoliciesItem(AvdModel): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = {"name": {"type": str}, "tunnel_interface_numbers": {"type": str}, "_custom_data": {"type": dict}} + name: str + """Internet-exit policy name.""" + tunnel_interface_numbers: str | None + """ + Number range to use for Tunnel interfaces to an internet-exit service provider using this local + interface. + Examples: '1-3' or '100,200,300' + """ + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, + *, + name: str | UndefinedType = Undefined, + tunnel_interface_numbers: str | None | UndefinedType = Undefined, + _custom_data: dict[str, Any] | UndefinedType = Undefined, + ) -> None: + """ + PoliciesItem. + + + Subclass of AvdModel. + + Args: + name: Internet-exit policy name. + tunnel_interface_numbers: + Number range to use for Tunnel interfaces to an internet-exit service provider using this local + interface. + Examples: '1-3' or '100,200,300' + _custom_data: _custom_data + + """ + + class Policies(AvdIndexedList[str, PoliciesItem]): + """Subclass of AvdIndexedList with `PoliciesItem` items. Primary key is `name` (`str`).""" + + _primary_key: ClassVar[str] = "name" + + Policies._item_type = PoliciesItem + + _fields: ClassVar[dict] = {"policies": {"type": Policies}, "_custom_data": {"type": dict}} + policies: Policies + """ + List of Internet-exit policies using this interface as exit. + + Subclass of AvdIndexedList with + `PoliciesItem` items. Primary key is `name` (`str`). + """ + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, *, policies: Policies | UndefinedType = Undefined, _custom_data: dict[str, Any] | UndefinedType = Undefined + ) -> None: + """ + CvPathfinderInternetExit. + + + Subclass of AvdModel. + + Args: + policies: + List of Internet-exit policies using this interface as exit. + + Subclass of AvdIndexedList with + `PoliciesItem` items. Primary key is `name` (`str`). + _custom_data: _custom_data + + """ + + class FlowTracking(AvdModel): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = {"enabled": {"type": bool}, "name": {"type": str}, "_custom_data": {"type": dict}} + enabled: bool | None + name: str | None + """Flow tracker name as defined in flow_tracking_settings.""" + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, + *, + enabled: bool | None | UndefinedType = Undefined, + name: str | None | UndefinedType = Undefined, + _custom_data: dict[str, Any] | UndefinedType = Undefined, + ) -> None: + """ + FlowTracking. + + + Subclass of AvdModel. + + Args: + enabled: enabled + name: Flow tracker name as defined in flow_tracking_settings. + _custom_data: _custom_data + + """ + + class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = { + "profile": {"type": str}, + "name": {"type": str}, + "description": {"type": str}, + "ip_address": {"type": str}, + "dhcp_ip": {"type": str}, + "public_ip": {"type": str}, + "encapsulation_dot1q_vlan": {"type": int}, + "dhcp_accept_default_route": {"type": bool, "default": True}, + "enabled": {"type": bool, "default": True}, + "speed": {"type": str}, + "peer": {"type": str}, + "peer_interface": {"type": str}, + "peer_ip": {"type": str}, + "bgp": {"type": Bgp}, + "ipv4_acl_in": {"type": str}, + "ipv4_acl_out": {"type": str}, + "static_routes": {"type": StaticRoutes}, + "qos_profile": {"type": str}, + "wan_carrier": {"type": str}, + "wan_circuit_id": {"type": str}, + "connected_to_pathfinder": {"type": bool, "default": True}, + "cv_pathfinder_internet_exit": {"type": CvPathfinderInternetExit}, + "raw_eos_cli": {"type": str}, "flow_tracking": {"type": FlowTracking}, + "structured_config": {"type": StructuredConfig}, "_custom_data": {"type": dict}, } - enabled: bool | None - """Enable / Disable auto CV-Pathfinder HA, when two nodes are defined in the same node_group.""" - ipsec: bool + profile: str | None + """L3 interface profile name. Profile defined under `l3_interface_profiles`.""" + name: str """ - Enable / Disable IPsec over HA path-group when HA is enabled. + Ethernet interface name like 'Ethernet2' or subinterface name like 'Ethernet2.42'. + For a + subinterface, the parent physical interface is automatically created. + """ + description: str | None + """ + Interface description. + If not set a default description will be configured with '[[ + ]]'. + """ + ip_address: str | None + """Node IPv4 address/Mask or 'dhcp'.""" + dhcp_ip: str | None + """ + When the `ip_address` is `dhcp`, this optional field allows to indicate the expected + IPv4 address + (without mask) to be allocated on the interface if known. + This is not rendered in the configuration + but can be used for substitution of 'interface_ip' in the Access-list + set under `ipv4_acl_in` and + `ipv4_acl_out`. + """ + public_ip: str | None + """ + Node IPv4 address (no mask). + + This is used to get the public IP (if known) when the device is behind + NAT. + This is only used for `wan_rr` routers (AutoVPN RRs and Pathfinders) to determine the Public IP + with the following preference: + `wan_route_servers.path_groups.interfaces.ip_address` + -> + `l3_interfaces.public_ip` + -> `l3_interfaces.ip_address` + + The determined Public IP is used + by WAN routers when peering with this interface. + """ + encapsulation_dot1q_vlan: int | None + """ + For subinterfaces the dot1q vlan is derived from the interface name by default, but can also be + specified. + """ + dhcp_accept_default_route: bool + """ + Accept a default route from DHCP if `ip_address` is set to `dhcp`. Default value: `True` """ - mtu: int + enabled: bool """ - Set MTU on WAN HA interfaces. + Enable or Shutdown the interface. - Default value: `9194` + Default value: `True` """ - ha_interfaces: HaInterfaces + speed: str | None """ - Local WAN HA interfaces - Overwrite the default behavior which is to pick all the `uplink_interfaces`. - Can be used to filter uplink interfaces when there are multiple uplinks. - Limitations: - Either all - interfaces must be uplinks or all interfaces must not be uplinks. - Only one interface is supported - for non uplinks. + Speed should be set in the format `` or `forced ` or `auto + `. + """ + peer: str | None + """The peer device name. Used for description and documentation.""" + peer_interface: str | None + """The peer device interface. Used for description and documentation.""" + peer_ip: str | None + """ + The peer device IPv4 address (no mask). Used as default route gateway if `set_default_route` is true + and `ip` is an IP address. + """ + bgp: Bgp + """ + Enforce IPv4 BGP peering for the peer - Subclass of AvdList with `str` items. + Subclass of AvdModel. """ - ha_ipv4_pool: str | None + ipv4_acl_in: str | None """ - IP address pool used for WAN HA connectivity. - IP is derived from the node ID. - Not used for uplink - interfaces. + Name of the IPv4 access-list to be assigned in the ingress direction. + The access-list must be + defined under `ipv4_acls` and supports field substitution for "interface_ip" and "peer_ip". + Required + for all WAN interfaces (`wan_carrier` is set) unless the carrier is marked as 'trusted' under + `wan_carriers`. """ - max_ha_interfaces: int | None + ipv4_acl_out: str | None """ - Number of parallel links towards HA switches. - Can be used to reserve IP addresses for future - parallel HA links. + Name of the IPv4 Access-list to be assigned in the egress direction. + The access-list must be defined + under `ipv4_acls` and supports field substitution for "interface_ip" and "peer_ip". """ - port_channel_id: int | None - """Port-channel ID to use for direct HA.""" - use_port_channel_for_direct_ha: bool + static_routes: StaticRoutes """ - Enable or disable using a port-channel interface for direct HA when there is only one interface. - This feature was introduced in EOS 4.33.0F. + Configure IPv4 static routes pointing to `peer_ip`. + + Subclass of AvdList with `StaticRoutesItem` + items. + """ + qos_profile: str | None + """QOS service profile.""" + wan_carrier: str | None + """ + The WAN carrier this interface is connected to. + This is used to infer the path-groups in which this + interface should be configured. + Unless the carrier is marked as 'trusted' under `wan_carriers`, + `ipv4_acl_in` is also required on all WAN interfaces. + """ + wan_circuit_id: str | None + """ + The WAN circuit ID for this interface. + This is not rendered in the configuration but used for WAN + designs. + """ + connected_to_pathfinder: bool + """ + For a WAN interface (`wan_carrier` is set), allow to disable the static tunnel towards Pathfinders. Default value: `True` """ + cv_pathfinder_internet_exit: CvPathfinderInternetExit + """ + PREVIEW: This key is in preview mode + + Subclass of AvdModel. + """ + raw_eos_cli: str | None + """EOS CLI rendered directly on the interface in the final EOS configuration.""" flow_tracking: FlowTracking """ - Configures flow-tracking on the HA interfaces. Overrides `fabric_flow_tracking.wan_ha_links` - setting. + Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_interfaces` setting. + Subclass of AvdModel. + """ + structured_config: StructuredConfig + """ + Custom structured config for the Ethernet interface. Subclass of AvdModel. """ @@ -27536,63 +29306,225 @@ def __init__( def __init__( self, *, - enabled: bool | None | UndefinedType = Undefined, - ipsec: bool | UndefinedType = Undefined, - mtu: int | UndefinedType = Undefined, - ha_interfaces: HaInterfaces | UndefinedType = Undefined, - ha_ipv4_pool: str | None | UndefinedType = Undefined, - max_ha_interfaces: int | None | UndefinedType = Undefined, - port_channel_id: int | None | UndefinedType = Undefined, - use_port_channel_for_direct_ha: bool | UndefinedType = Undefined, + profile: str | None | UndefinedType = Undefined, + name: str | UndefinedType = Undefined, + description: str | None | UndefinedType = Undefined, + ip_address: str | None | UndefinedType = Undefined, + dhcp_ip: str | None | UndefinedType = Undefined, + public_ip: str | None | UndefinedType = Undefined, + encapsulation_dot1q_vlan: int | None | UndefinedType = Undefined, + dhcp_accept_default_route: bool | UndefinedType = Undefined, + enabled: bool | UndefinedType = Undefined, + speed: str | None | UndefinedType = Undefined, + peer: str | None | UndefinedType = Undefined, + peer_interface: str | None | UndefinedType = Undefined, + peer_ip: str | None | UndefinedType = Undefined, + bgp: Bgp | UndefinedType = Undefined, + ipv4_acl_in: str | None | UndefinedType = Undefined, + ipv4_acl_out: str | None | UndefinedType = Undefined, + static_routes: StaticRoutes | UndefinedType = Undefined, + qos_profile: str | None | UndefinedType = Undefined, + wan_carrier: str | None | UndefinedType = Undefined, + wan_circuit_id: str | None | UndefinedType = Undefined, + connected_to_pathfinder: bool | UndefinedType = Undefined, + cv_pathfinder_internet_exit: CvPathfinderInternetExit | UndefinedType = Undefined, + raw_eos_cli: str | None | UndefinedType = Undefined, flow_tracking: FlowTracking | UndefinedType = Undefined, + structured_config: StructuredConfig | UndefinedType = Undefined, _custom_data: dict[str, Any] | UndefinedType = Undefined, ) -> None: """ - WanHa. + L3InterfacesItem. Subclass of AvdModel. Args: - enabled: Enable / Disable auto CV-Pathfinder HA, when two nodes are defined in the same node_group. - ipsec: Enable / Disable IPsec over HA path-group when HA is enabled. - mtu: Set MTU on WAN HA interfaces. - ha_interfaces: - Local WAN HA interfaces - Overwrite the default behavior which is to pick all the `uplink_interfaces`. - Can be used to filter uplink interfaces when there are multiple uplinks. - Limitations: - Either all - interfaces must be uplinks or all interfaces must not be uplinks. - Only one interface is supported - for non uplinks. + profile: L3 interface profile name. Profile defined under `l3_interface_profiles`. + name: + Ethernet interface name like 'Ethernet2' or subinterface name like 'Ethernet2.42'. + For a + subinterface, the parent physical interface is automatically created. + description: + Interface description. + If not set a default description will be configured with '[[ + ]]'. + ip_address: Node IPv4 address/Mask or 'dhcp'. + dhcp_ip: + When the `ip_address` is `dhcp`, this optional field allows to indicate the expected + IPv4 address + (without mask) to be allocated on the interface if known. + This is not rendered in the configuration + but can be used for substitution of 'interface_ip' in the Access-list + set under `ipv4_acl_in` and + `ipv4_acl_out`. + public_ip: + Node IPv4 address (no mask). - Subclass of AvdList with `str` items. - ha_ipv4_pool: - IP address pool used for WAN HA connectivity. - IP is derived from the node ID. - Not used for uplink - interfaces. - max_ha_interfaces: - Number of parallel links towards HA switches. - Can be used to reserve IP addresses for future - parallel HA links. - port_channel_id: Port-channel ID to use for direct HA. - use_port_channel_for_direct_ha: - Enable or disable using a port-channel interface for direct HA when there is only one interface. - This feature was introduced in EOS 4.33.0F. + This is used to get the public IP (if known) when the device is behind + NAT. + This is only used for `wan_rr` routers (AutoVPN RRs and Pathfinders) to determine the Public IP + with the following preference: + `wan_route_servers.path_groups.interfaces.ip_address` + -> + `l3_interfaces.public_ip` + -> `l3_interfaces.ip_address` + + The determined Public IP is used + by WAN routers when peering with this interface. + encapsulation_dot1q_vlan: + For subinterfaces the dot1q vlan is derived from the interface name by default, but can also be + specified. + dhcp_accept_default_route: Accept a default route from DHCP if `ip_address` is set to `dhcp`. + enabled: Enable or Shutdown the interface. + speed: + Speed should be set in the format `` or `forced ` or `auto + `. + peer: The peer device name. Used for description and documentation. + peer_interface: The peer device interface. Used for description and documentation. + peer_ip: + The peer device IPv4 address (no mask). Used as default route gateway if `set_default_route` is true + and `ip` is an IP address. + bgp: + Enforce IPv4 BGP peering for the peer + + Subclass of AvdModel. + ipv4_acl_in: + Name of the IPv4 access-list to be assigned in the ingress direction. + The access-list must be + defined under `ipv4_acls` and supports field substitution for "interface_ip" and "peer_ip". + Required + for all WAN interfaces (`wan_carrier` is set) unless the carrier is marked as 'trusted' under + `wan_carriers`. + ipv4_acl_out: + Name of the IPv4 Access-list to be assigned in the egress direction. + The access-list must be defined + under `ipv4_acls` and supports field substitution for "interface_ip" and "peer_ip". + static_routes: + Configure IPv4 static routes pointing to `peer_ip`. + + Subclass of AvdList with `StaticRoutesItem` + items. + qos_profile: QOS service profile. + wan_carrier: + The WAN carrier this interface is connected to. + This is used to infer the path-groups in which this + interface should be configured. + Unless the carrier is marked as 'trusted' under `wan_carriers`, + `ipv4_acl_in` is also required on all WAN interfaces. + wan_circuit_id: + The WAN circuit ID for this interface. + This is not rendered in the configuration but used for WAN + designs. + connected_to_pathfinder: For a WAN interface (`wan_carrier` is set), allow to disable the static tunnel towards Pathfinders. + cv_pathfinder_internet_exit: + PREVIEW: This key is in preview mode + + Subclass of AvdModel. + raw_eos_cli: EOS CLI rendered directly on the interface in the final EOS configuration. flow_tracking: - Configures flow-tracking on the HA interfaces. Overrides `fabric_flow_tracking.wan_ha_links` - setting. + Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_interfaces` setting. + Subclass of AvdModel. + structured_config: + Custom structured config for the Ethernet interface. Subclass of AvdModel. _custom_data: _custom_data """ - class L3InterfacesItem(AvdModel): + class L3Interfaces(AvdIndexedList[str, L3InterfacesItem]): + """Subclass of AvdIndexedList with `L3InterfacesItem` items. Primary key is `name` (`str`).""" + + _primary_key: ClassVar[str] = "name" + + L3Interfaces._item_type = L3InterfacesItem + + class L3PortChannelsItem(AvdModel): """Subclass of AvdModel.""" + class MemberInterfacesItem(AvdModel): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = { + "name": {"type": str}, + "description": {"type": str}, + "peer": {"type": str}, + "peer_interface": {"type": str}, + "speed": {"type": str}, + "_custom_data": {"type": dict}, + } + name: str + """ + Ethernet interface name like 'Ethernet2'. + Member interface cannot be subinterface. + """ + description: str | None + """ + Interface description for this member. + If not set a default description will be configured with + '[[ ]]'. + """ + peer: str | None + """ + The peer device name. Used for description and documentation. + If not set, this inherits the peer + setting on the port-channel interface. + """ + peer_interface: str | None + """The peer device interface. Used for description and documentation.""" + speed: str | None + """ + Speed should be set in the format `` or `forced ` or `auto + `. + """ + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, + *, + name: str | UndefinedType = Undefined, + description: str | None | UndefinedType = Undefined, + peer: str | None | UndefinedType = Undefined, + peer_interface: str | None | UndefinedType = Undefined, + speed: str | None | UndefinedType = Undefined, + _custom_data: dict[str, Any] | UndefinedType = Undefined, + ) -> None: + """ + MemberInterfacesItem. + + + Subclass of AvdModel. + + Args: + name: + Ethernet interface name like 'Ethernet2'. + Member interface cannot be subinterface. + description: + Interface description for this member. + If not set a default description will be configured with + '[[ ]]'. + peer: + The peer device name. Used for description and documentation. + If not set, this inherits the peer + setting on the port-channel interface. + peer_interface: The peer device interface. Used for description and documentation. + speed: + Speed should be set in the format `` or `forced ` or `auto + `. + _custom_data: _custom_data + + """ + + class MemberInterfaces(AvdIndexedList[str, MemberInterfacesItem]): + """Subclass of AvdIndexedList with `MemberInterfacesItem` items. Primary key is `name` (`str`).""" + + _primary_key: ClassVar[str] = "name" + + MemberInterfaces._item_type = MemberInterfacesItem + class Bgp(AvdModel): """Subclass of AvdModel.""" @@ -27680,8 +29612,10 @@ def __init__( """ - class StaticRoutes(AvdList[StaticRoutesItem]): - """Subclass of AvdList with `StaticRoutesItem` items.""" + class StaticRoutes(AvdIndexedList[str, StaticRoutesItem]): + """Subclass of AvdIndexedList with `StaticRoutesItem` items. Primary key is `prefix` (`str`).""" + + _primary_key: ClassVar[str] = "prefix" StaticRoutes._item_type = StaticRoutesItem @@ -27796,22 +29730,22 @@ def __init__( """ - class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): + class StructuredConfig(EosCliConfigGen.PortChannelInterfacesItem): """Subclass of AvdModel.""" _fields: ClassVar[dict] = { - "profile": {"type": str}, "name": {"type": str}, "description": {"type": str}, + "mode": {"type": str, "default": "active"}, + "member_interfaces": {"type": MemberInterfaces}, "ip_address": {"type": str}, "dhcp_ip": {"type": str}, "public_ip": {"type": str}, "encapsulation_dot1q_vlan": {"type": int}, "dhcp_accept_default_route": {"type": bool, "default": True}, "enabled": {"type": bool, "default": True}, - "speed": {"type": str}, "peer": {"type": str}, - "peer_interface": {"type": str}, + "peer_port_channel": {"type": str}, "peer_ip": {"type": str}, "bgp": {"type": Bgp}, "ipv4_acl_in": {"type": str}, @@ -27827,19 +29761,32 @@ class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): "structured_config": {"type": StructuredConfig}, "_custom_data": {"type": dict}, } - profile: str | None - """L3 interface profile name. Profile defined under `l3_interface_profiles`.""" name: str """ - Ethernet interface name like 'Ethernet2' or subinterface name like 'Ethernet2.42'. + Port-Channel interface name like 'Port-Channel2' or subinterface name like 'Port-Channel2.42'. For a - subinterface, the parent physical interface is automatically created. + Port-Channel subinterface, the parent Port-Channel interface must be defined as well. """ description: str | None """ Interface description. If not set a default description will be configured with '[[ - ]]'. + ]]'. + """ + mode: Literal["active", "passive", "on"] + """ + Port-Channel mode. + Should not be set on Port-Channel subinterfaces. + + Default value: `"active"` + """ + member_interfaces: MemberInterfaces + """ + Port-Channel member interfaces. + Should not be set on Port-Channel subinterfaces. + + Subclass of + AvdIndexedList with `MemberInterfacesItem` items. Primary key is `name` (`str`). """ ip_address: str | None """Node IPv4 address/Mask or 'dhcp'.""" @@ -27863,11 +29810,11 @@ class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): with the following preference: `wan_route_servers.path_groups.interfaces.ip_address` -> - `l3_interfaces.public_ip` - -> `l3_interfaces.ip_address` + `l3_port_channels.public_ip` + -> `l3_port_channels.ip_address` - The determined Public IP is used - by WAN routers when peering with this interface. + The determined Public IP is + used by WAN routers when peering with this interface. """ encapsulation_dot1q_vlan: int | None """ @@ -27886,15 +29833,10 @@ class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): Default value: `True` """ - speed: str | None - """ - Speed should be set in the format `` or `forced ` or `auto - `. - """ peer: str | None """The peer device name. Used for description and documentation.""" - peer_interface: str | None - """The peer device interface. Used for description and documentation.""" + peer_port_channel: str | None + """The peer device port-channel interface. Used for description and documentation.""" peer_ip: str | None """ The peer device IPv4 address (no mask). Used as default route gateway if `set_default_route` is true @@ -27925,8 +29867,8 @@ class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): """ Configure IPv4 static routes pointing to `peer_ip`. - Subclass of AvdList with `StaticRoutesItem` - items. + Subclass of AvdIndexedList with + `StaticRoutesItem` items. Primary key is `prefix` (`str`). """ qos_profile: str | None """QOS service profile.""" @@ -27957,15 +29899,17 @@ class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): Subclass of AvdModel. """ raw_eos_cli: str | None - """EOS CLI rendered directly on the interface in the final EOS configuration.""" + """EOS CLI rendered directly on the Port-Channel interface in the final EOS configuration.""" flow_tracking: FlowTracking """ - Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_interfaces` setting. + Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_port_channels` + setting. + Subclass of AvdModel. """ structured_config: StructuredConfig """ - Custom structured config for the Ethernet interface. + Custom structured config for the Port-Channel interface. Subclass of AvdModel. """ @@ -27976,18 +29920,18 @@ class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): def __init__( self, *, - profile: str | None | UndefinedType = Undefined, name: str | UndefinedType = Undefined, description: str | None | UndefinedType = Undefined, + mode: Literal["active", "passive", "on"] | UndefinedType = Undefined, + member_interfaces: MemberInterfaces | UndefinedType = Undefined, ip_address: str | None | UndefinedType = Undefined, dhcp_ip: str | None | UndefinedType = Undefined, public_ip: str | None | UndefinedType = Undefined, encapsulation_dot1q_vlan: int | None | UndefinedType = Undefined, dhcp_accept_default_route: bool | UndefinedType = Undefined, enabled: bool | UndefinedType = Undefined, - speed: str | None | UndefinedType = Undefined, peer: str | None | UndefinedType = Undefined, - peer_interface: str | None | UndefinedType = Undefined, + peer_port_channel: str | None | UndefinedType = Undefined, peer_ip: str | None | UndefinedType = Undefined, bgp: Bgp | UndefinedType = Undefined, ipv4_acl_in: str | None | UndefinedType = Undefined, @@ -28004,21 +29948,29 @@ def __init__( _custom_data: dict[str, Any] | UndefinedType = Undefined, ) -> None: """ - L3InterfacesItem. + L3PortChannelsItem. Subclass of AvdModel. Args: - profile: L3 interface profile name. Profile defined under `l3_interface_profiles`. name: - Ethernet interface name like 'Ethernet2' or subinterface name like 'Ethernet2.42'. + Port-Channel interface name like 'Port-Channel2' or subinterface name like 'Port-Channel2.42'. For a - subinterface, the parent physical interface is automatically created. + Port-Channel subinterface, the parent Port-Channel interface must be defined as well. description: Interface description. If not set a default description will be configured with '[[ - ]]'. + ]]'. + mode: + Port-Channel mode. + Should not be set on Port-Channel subinterfaces. + member_interfaces: + Port-Channel member interfaces. + Should not be set on Port-Channel subinterfaces. + + Subclass of + AvdIndexedList with `MemberInterfacesItem` items. Primary key is `name` (`str`). ip_address: Node IPv4 address/Mask or 'dhcp'. dhcp_ip: When the `ip_address` is `dhcp`, this optional field allows to indicate the expected @@ -28037,21 +29989,18 @@ def __init__( with the following preference: `wan_route_servers.path_groups.interfaces.ip_address` -> - `l3_interfaces.public_ip` - -> `l3_interfaces.ip_address` + `l3_port_channels.public_ip` + -> `l3_port_channels.ip_address` - The determined Public IP is used - by WAN routers when peering with this interface. + The determined Public IP is + used by WAN routers when peering with this interface. encapsulation_dot1q_vlan: For subinterfaces the dot1q vlan is derived from the interface name by default, but can also be specified. dhcp_accept_default_route: Accept a default route from DHCP if `ip_address` is set to `dhcp`. enabled: Enable or Shutdown the interface. - speed: - Speed should be set in the format `` or `forced ` or `auto - `. peer: The peer device name. Used for description and documentation. - peer_interface: The peer device interface. Used for description and documentation. + peer_port_channel: The peer device port-channel interface. Used for description and documentation. peer_ip: The peer device IPv4 address (no mask). Used as default route gateway if `set_default_route` is true and `ip` is an IP address. @@ -28073,8 +30022,8 @@ def __init__( static_routes: Configure IPv4 static routes pointing to `peer_ip`. - Subclass of AvdList with `StaticRoutesItem` - items. + Subclass of AvdIndexedList with + `StaticRoutesItem` items. Primary key is `prefix` (`str`). qos_profile: QOS service profile. wan_carrier: The WAN carrier this interface is connected to. @@ -28091,24 +30040,26 @@ def __init__( PREVIEW: This key is in preview mode Subclass of AvdModel. - raw_eos_cli: EOS CLI rendered directly on the interface in the final EOS configuration. + raw_eos_cli: EOS CLI rendered directly on the Port-Channel interface in the final EOS configuration. flow_tracking: - Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_interfaces` setting. + Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_port_channels` + setting. + Subclass of AvdModel. structured_config: - Custom structured config for the Ethernet interface. + Custom structured config for the Port-Channel interface. Subclass of AvdModel. _custom_data: _custom_data """ - class L3Interfaces(AvdIndexedList[str, L3InterfacesItem]): - """Subclass of AvdIndexedList with `L3InterfacesItem` items. Primary key is `name` (`str`).""" + class L3PortChannels(AvdIndexedList[str, L3PortChannelsItem]): + """Subclass of AvdIndexedList with `L3PortChannelsItem` items. Primary key is `name` (`str`).""" _primary_key: ClassVar[str] = "name" - L3Interfaces._item_type = L3InterfacesItem + L3PortChannels._item_type = L3PortChannelsItem _fields: ClassVar[dict] = { "group": {"type": str}, @@ -28216,6 +30167,7 @@ class L3Interfaces(AvdIndexedList[str, L3InterfacesItem]): "wan_ha": {"type": WanHa}, "dps_mss_ipv4": {"type": str, "default": "auto"}, "l3_interfaces": {"type": L3Interfaces}, + "l3_port_channels": {"type": L3PortChannels}, "data_plane_cpu_allocation_max": {"type": int}, "flow_tracker_type": {"type": str}, "_custom_data": {"type": dict}, @@ -28991,6 +30943,15 @@ class L3Interfaces(AvdIndexedList[str, L3InterfacesItem]): Subclass of AvdIndexedList with `L3InterfacesItem` items. Primary key is `name` (`str`). """ + l3_port_channels: L3PortChannels + """ + L3 Port-Channel interfaces to configure on the node. + Used to define the node for WAN interfaces when + `wan_carrier` is set. + + Subclass of AvdIndexedList with `L3PortChannelsItem` items. Primary key is + `name` (`str`). + """ data_plane_cpu_allocation_max: int | None """ Set the maximum number of CPU used for the data plane. @@ -29116,6 +31077,7 @@ def __init__( wan_ha: WanHa | UndefinedType = Undefined, dps_mss_ipv4: str | UndefinedType = Undefined, l3_interfaces: L3Interfaces | UndefinedType = Undefined, + l3_port_channels: L3PortChannels | UndefinedType = Undefined, data_plane_cpu_allocation_max: int | None | UndefinedType = Undefined, flow_tracker_type: Literal["sampled", "hardware"] | None | UndefinedType = Undefined, _custom_data: dict[str, Any] | UndefinedType = Undefined, @@ -29665,6 +31627,13 @@ def __init__( Subclass of AvdIndexedList with `L3InterfacesItem` items. Primary key is `name` (`str`). + l3_port_channels: + L3 Port-Channel interfaces to configure on the node. + Used to define the node for WAN interfaces when + `wan_carrier` is set. + + Subclass of AvdIndexedList with `L3PortChannelsItem` items. Primary key is + `name` (`str`). data_plane_cpu_allocation_max: Set the maximum number of CPU used for the data plane. This setting is useful on virtual Route @@ -30968,70 +32937,510 @@ def __init__( """ _fields: ClassVar[dict] = { - "enabled": {"type": bool}, - "ipsec": {"type": bool, "default": True}, - "mtu": {"type": int, "default": 9194}, - "ha_interfaces": {"type": HaInterfaces}, - "ha_ipv4_pool": {"type": str}, - "max_ha_interfaces": {"type": int}, - "port_channel_id": {"type": int}, - "use_port_channel_for_direct_ha": {"type": bool, "default": True}, + "enabled": {"type": bool}, + "ipsec": {"type": bool, "default": True}, + "mtu": {"type": int, "default": 9194}, + "ha_interfaces": {"type": HaInterfaces}, + "ha_ipv4_pool": {"type": str}, + "max_ha_interfaces": {"type": int}, + "port_channel_id": {"type": int}, + "use_port_channel_for_direct_ha": {"type": bool, "default": True}, + "flow_tracking": {"type": FlowTracking}, + "_custom_data": {"type": dict}, + } + enabled: bool | None + """Enable / Disable auto CV-Pathfinder HA, when two nodes are defined in the same node_group.""" + ipsec: bool + """ + Enable / Disable IPsec over HA path-group when HA is enabled. + + Default value: `True` + """ + mtu: int + """ + Set MTU on WAN HA interfaces. + + Default value: `9194` + """ + ha_interfaces: HaInterfaces + """ + Local WAN HA interfaces + Overwrite the default behavior which is to pick all the `uplink_interfaces`. + Can be used to filter uplink interfaces when there are multiple uplinks. + Limitations: + Either all + interfaces must be uplinks or all interfaces must not be uplinks. + Only one interface is supported + for non uplinks. + + Subclass of AvdList with `str` items. + """ + ha_ipv4_pool: str | None + """ + IP address pool used for WAN HA connectivity. + IP is derived from the node ID. + Not used for uplink + interfaces. + """ + max_ha_interfaces: int | None + """ + Number of parallel links towards HA switches. + Can be used to reserve IP addresses for future + parallel HA links. + """ + port_channel_id: int | None + """Port-channel ID to use for direct HA.""" + use_port_channel_for_direct_ha: bool + """ + Enable or disable using a port-channel interface for direct HA when there is only one interface. + This feature was introduced in EOS 4.33.0F. + + Default value: `True` + """ + flow_tracking: FlowTracking + """ + Configures flow-tracking on the HA interfaces. Overrides `fabric_flow_tracking.wan_ha_links` + setting. + + Subclass of AvdModel. + """ + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, + *, + enabled: bool | None | UndefinedType = Undefined, + ipsec: bool | UndefinedType = Undefined, + mtu: int | UndefinedType = Undefined, + ha_interfaces: HaInterfaces | UndefinedType = Undefined, + ha_ipv4_pool: str | None | UndefinedType = Undefined, + max_ha_interfaces: int | None | UndefinedType = Undefined, + port_channel_id: int | None | UndefinedType = Undefined, + use_port_channel_for_direct_ha: bool | UndefinedType = Undefined, + flow_tracking: FlowTracking | UndefinedType = Undefined, + _custom_data: dict[str, Any] | UndefinedType = Undefined, + ) -> None: + """ + WanHa. + + + Subclass of AvdModel. + + Args: + enabled: Enable / Disable auto CV-Pathfinder HA, when two nodes are defined in the same node_group. + ipsec: Enable / Disable IPsec over HA path-group when HA is enabled. + mtu: Set MTU on WAN HA interfaces. + ha_interfaces: + Local WAN HA interfaces + Overwrite the default behavior which is to pick all the `uplink_interfaces`. + Can be used to filter uplink interfaces when there are multiple uplinks. + Limitations: + Either all + interfaces must be uplinks or all interfaces must not be uplinks. + Only one interface is supported + for non uplinks. + + Subclass of AvdList with `str` items. + ha_ipv4_pool: + IP address pool used for WAN HA connectivity. + IP is derived from the node ID. + Not used for uplink + interfaces. + max_ha_interfaces: + Number of parallel links towards HA switches. + Can be used to reserve IP addresses for future + parallel HA links. + port_channel_id: Port-channel ID to use for direct HA. + use_port_channel_for_direct_ha: + Enable or disable using a port-channel interface for direct HA when there is only one interface. + This feature was introduced in EOS 4.33.0F. + flow_tracking: + Configures flow-tracking on the HA interfaces. Overrides `fabric_flow_tracking.wan_ha_links` + setting. + + Subclass of AvdModel. + _custom_data: _custom_data + + """ + + class L3InterfacesItem(AvdModel): + """Subclass of AvdModel.""" + + class Bgp(AvdModel): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = { + "peer_as": {"type": str}, + "ipv4_prefix_list_in": {"type": str}, + "ipv4_prefix_list_out": {"type": str}, + "_custom_data": {"type": dict}, + } + peer_as: str + """ + BGP AS <1-4294967295> or AS number in asdot notation "<1-65535>.<0-65535>". + For asdot notation in + YAML inputs, the value must be put in quotes, to prevent it from being interpreted as a float + number. + """ + ipv4_prefix_list_in: str | None + """ + Prefix List Name. Accept routes for only these prefixes from the peer. + Required for wan interfaces. + """ + ipv4_prefix_list_out: str | None + """ + Prefix List Name. Advertise routes for only these prefixes. + If not specified, nothing would be + advertised. + """ + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, + *, + peer_as: str | UndefinedType = Undefined, + ipv4_prefix_list_in: str | None | UndefinedType = Undefined, + ipv4_prefix_list_out: str | None | UndefinedType = Undefined, + _custom_data: dict[str, Any] | UndefinedType = Undefined, + ) -> None: + """ + Bgp. + + + Subclass of AvdModel. + + Args: + peer_as: + BGP AS <1-4294967295> or AS number in asdot notation "<1-65535>.<0-65535>". + For asdot notation in + YAML inputs, the value must be put in quotes, to prevent it from being interpreted as a float + number. + ipv4_prefix_list_in: + Prefix List Name. Accept routes for only these prefixes from the peer. + Required for wan interfaces. + ipv4_prefix_list_out: + Prefix List Name. Advertise routes for only these prefixes. + If not specified, nothing would be + advertised. + _custom_data: _custom_data + + """ + + class StaticRoutesItem(AvdModel): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = {"prefix": {"type": str}, "_custom_data": {"type": dict}} + prefix: str + """IPv4_network/Mask.""" + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, *, prefix: str | UndefinedType = Undefined, _custom_data: dict[str, Any] | UndefinedType = Undefined + ) -> None: + """ + StaticRoutesItem. + + + Subclass of AvdModel. + + Args: + prefix: IPv4_network/Mask. + _custom_data: _custom_data + + """ + + class StaticRoutes(AvdList[StaticRoutesItem]): + """Subclass of AvdList with `StaticRoutesItem` items.""" + + StaticRoutes._item_type = StaticRoutesItem + + class CvPathfinderInternetExit(AvdModel): + """Subclass of AvdModel.""" + + class PoliciesItem(AvdModel): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = {"name": {"type": str}, "tunnel_interface_numbers": {"type": str}, "_custom_data": {"type": dict}} + name: str + """Internet-exit policy name.""" + tunnel_interface_numbers: str | None + """ + Number range to use for Tunnel interfaces to an internet-exit service provider using this local + interface. + Examples: '1-3' or '100,200,300' + """ + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, + *, + name: str | UndefinedType = Undefined, + tunnel_interface_numbers: str | None | UndefinedType = Undefined, + _custom_data: dict[str, Any] | UndefinedType = Undefined, + ) -> None: + """ + PoliciesItem. + + + Subclass of AvdModel. + + Args: + name: Internet-exit policy name. + tunnel_interface_numbers: + Number range to use for Tunnel interfaces to an internet-exit service provider using this local + interface. + Examples: '1-3' or '100,200,300' + _custom_data: _custom_data + + """ + + class Policies(AvdIndexedList[str, PoliciesItem]): + """Subclass of AvdIndexedList with `PoliciesItem` items. Primary key is `name` (`str`).""" + + _primary_key: ClassVar[str] = "name" + + Policies._item_type = PoliciesItem + + _fields: ClassVar[dict] = {"policies": {"type": Policies}, "_custom_data": {"type": dict}} + policies: Policies + """ + List of Internet-exit policies using this interface as exit. + + Subclass of AvdIndexedList with + `PoliciesItem` items. Primary key is `name` (`str`). + """ + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, *, policies: Policies | UndefinedType = Undefined, _custom_data: dict[str, Any] | UndefinedType = Undefined + ) -> None: + """ + CvPathfinderInternetExit. + + + Subclass of AvdModel. + + Args: + policies: + List of Internet-exit policies using this interface as exit. + + Subclass of AvdIndexedList with + `PoliciesItem` items. Primary key is `name` (`str`). + _custom_data: _custom_data + + """ + + class FlowTracking(AvdModel): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = {"enabled": {"type": bool}, "name": {"type": str}, "_custom_data": {"type": dict}} + enabled: bool | None + name: str | None + """Flow tracker name as defined in flow_tracking_settings.""" + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, + *, + enabled: bool | None | UndefinedType = Undefined, + name: str | None | UndefinedType = Undefined, + _custom_data: dict[str, Any] | UndefinedType = Undefined, + ) -> None: + """ + FlowTracking. + + + Subclass of AvdModel. + + Args: + enabled: enabled + name: Flow tracker name as defined in flow_tracking_settings. + _custom_data: _custom_data + + """ + + class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = { + "profile": {"type": str}, + "name": {"type": str}, + "description": {"type": str}, + "ip_address": {"type": str}, + "dhcp_ip": {"type": str}, + "public_ip": {"type": str}, + "encapsulation_dot1q_vlan": {"type": int}, + "dhcp_accept_default_route": {"type": bool, "default": True}, + "enabled": {"type": bool, "default": True}, + "speed": {"type": str}, + "peer": {"type": str}, + "peer_interface": {"type": str}, + "peer_ip": {"type": str}, + "bgp": {"type": Bgp}, + "ipv4_acl_in": {"type": str}, + "ipv4_acl_out": {"type": str}, + "static_routes": {"type": StaticRoutes}, + "qos_profile": {"type": str}, + "wan_carrier": {"type": str}, + "wan_circuit_id": {"type": str}, + "connected_to_pathfinder": {"type": bool, "default": True}, + "cv_pathfinder_internet_exit": {"type": CvPathfinderInternetExit}, + "raw_eos_cli": {"type": str}, "flow_tracking": {"type": FlowTracking}, + "structured_config": {"type": StructuredConfig}, "_custom_data": {"type": dict}, } - enabled: bool | None - """Enable / Disable auto CV-Pathfinder HA, when two nodes are defined in the same node_group.""" - ipsec: bool + profile: str | None + """L3 interface profile name. Profile defined under `l3_interface_profiles`.""" + name: str """ - Enable / Disable IPsec over HA path-group when HA is enabled. + Ethernet interface name like 'Ethernet2' or subinterface name like 'Ethernet2.42'. + For a + subinterface, the parent physical interface is automatically created. + """ + description: str | None + """ + Interface description. + If not set a default description will be configured with '[[ + ]]'. + """ + ip_address: str | None + """Node IPv4 address/Mask or 'dhcp'.""" + dhcp_ip: str | None + """ + When the `ip_address` is `dhcp`, this optional field allows to indicate the expected + IPv4 address + (without mask) to be allocated on the interface if known. + This is not rendered in the configuration + but can be used for substitution of 'interface_ip' in the Access-list + set under `ipv4_acl_in` and + `ipv4_acl_out`. + """ + public_ip: str | None + """ + Node IPv4 address (no mask). + + This is used to get the public IP (if known) when the device is behind + NAT. + This is only used for `wan_rr` routers (AutoVPN RRs and Pathfinders) to determine the Public IP + with the following preference: + `wan_route_servers.path_groups.interfaces.ip_address` + -> + `l3_interfaces.public_ip` + -> `l3_interfaces.ip_address` + + The determined Public IP is used + by WAN routers when peering with this interface. + """ + encapsulation_dot1q_vlan: int | None + """ + For subinterfaces the dot1q vlan is derived from the interface name by default, but can also be + specified. + """ + dhcp_accept_default_route: bool + """ + Accept a default route from DHCP if `ip_address` is set to `dhcp`. Default value: `True` """ - mtu: int + enabled: bool """ - Set MTU on WAN HA interfaces. + Enable or Shutdown the interface. - Default value: `9194` + Default value: `True` """ - ha_interfaces: HaInterfaces + speed: str | None """ - Local WAN HA interfaces - Overwrite the default behavior which is to pick all the `uplink_interfaces`. - Can be used to filter uplink interfaces when there are multiple uplinks. - Limitations: - Either all - interfaces must be uplinks or all interfaces must not be uplinks. - Only one interface is supported - for non uplinks. + Speed should be set in the format `` or `forced ` or `auto + `. + """ + peer: str | None + """The peer device name. Used for description and documentation.""" + peer_interface: str | None + """The peer device interface. Used for description and documentation.""" + peer_ip: str | None + """ + The peer device IPv4 address (no mask). Used as default route gateway if `set_default_route` is true + and `ip` is an IP address. + """ + bgp: Bgp + """ + Enforce IPv4 BGP peering for the peer - Subclass of AvdList with `str` items. + Subclass of AvdModel. """ - ha_ipv4_pool: str | None + ipv4_acl_in: str | None """ - IP address pool used for WAN HA connectivity. - IP is derived from the node ID. - Not used for uplink - interfaces. + Name of the IPv4 access-list to be assigned in the ingress direction. + The access-list must be + defined under `ipv4_acls` and supports field substitution for "interface_ip" and "peer_ip". + Required + for all WAN interfaces (`wan_carrier` is set) unless the carrier is marked as 'trusted' under + `wan_carriers`. """ - max_ha_interfaces: int | None + ipv4_acl_out: str | None """ - Number of parallel links towards HA switches. - Can be used to reserve IP addresses for future - parallel HA links. + Name of the IPv4 Access-list to be assigned in the egress direction. + The access-list must be defined + under `ipv4_acls` and supports field substitution for "interface_ip" and "peer_ip". """ - port_channel_id: int | None - """Port-channel ID to use for direct HA.""" - use_port_channel_for_direct_ha: bool + static_routes: StaticRoutes """ - Enable or disable using a port-channel interface for direct HA when there is only one interface. - This feature was introduced in EOS 4.33.0F. + Configure IPv4 static routes pointing to `peer_ip`. + + Subclass of AvdList with `StaticRoutesItem` + items. + """ + qos_profile: str | None + """QOS service profile.""" + wan_carrier: str | None + """ + The WAN carrier this interface is connected to. + This is used to infer the path-groups in which this + interface should be configured. + Unless the carrier is marked as 'trusted' under `wan_carriers`, + `ipv4_acl_in` is also required on all WAN interfaces. + """ + wan_circuit_id: str | None + """ + The WAN circuit ID for this interface. + This is not rendered in the configuration but used for WAN + designs. + """ + connected_to_pathfinder: bool + """ + For a WAN interface (`wan_carrier` is set), allow to disable the static tunnel towards Pathfinders. Default value: `True` """ + cv_pathfinder_internet_exit: CvPathfinderInternetExit + """ + PREVIEW: This key is in preview mode + + Subclass of AvdModel. + """ + raw_eos_cli: str | None + """EOS CLI rendered directly on the interface in the final EOS configuration.""" flow_tracking: FlowTracking """ - Configures flow-tracking on the HA interfaces. Overrides `fabric_flow_tracking.wan_ha_links` - setting. + Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_interfaces` setting. + Subclass of AvdModel. + """ + structured_config: StructuredConfig + """ + Custom structured config for the Ethernet interface. Subclass of AvdModel. """ @@ -31042,63 +33451,225 @@ def __init__( def __init__( self, *, - enabled: bool | None | UndefinedType = Undefined, - ipsec: bool | UndefinedType = Undefined, - mtu: int | UndefinedType = Undefined, - ha_interfaces: HaInterfaces | UndefinedType = Undefined, - ha_ipv4_pool: str | None | UndefinedType = Undefined, - max_ha_interfaces: int | None | UndefinedType = Undefined, - port_channel_id: int | None | UndefinedType = Undefined, - use_port_channel_for_direct_ha: bool | UndefinedType = Undefined, + profile: str | None | UndefinedType = Undefined, + name: str | UndefinedType = Undefined, + description: str | None | UndefinedType = Undefined, + ip_address: str | None | UndefinedType = Undefined, + dhcp_ip: str | None | UndefinedType = Undefined, + public_ip: str | None | UndefinedType = Undefined, + encapsulation_dot1q_vlan: int | None | UndefinedType = Undefined, + dhcp_accept_default_route: bool | UndefinedType = Undefined, + enabled: bool | UndefinedType = Undefined, + speed: str | None | UndefinedType = Undefined, + peer: str | None | UndefinedType = Undefined, + peer_interface: str | None | UndefinedType = Undefined, + peer_ip: str | None | UndefinedType = Undefined, + bgp: Bgp | UndefinedType = Undefined, + ipv4_acl_in: str | None | UndefinedType = Undefined, + ipv4_acl_out: str | None | UndefinedType = Undefined, + static_routes: StaticRoutes | UndefinedType = Undefined, + qos_profile: str | None | UndefinedType = Undefined, + wan_carrier: str | None | UndefinedType = Undefined, + wan_circuit_id: str | None | UndefinedType = Undefined, + connected_to_pathfinder: bool | UndefinedType = Undefined, + cv_pathfinder_internet_exit: CvPathfinderInternetExit | UndefinedType = Undefined, + raw_eos_cli: str | None | UndefinedType = Undefined, flow_tracking: FlowTracking | UndefinedType = Undefined, + structured_config: StructuredConfig | UndefinedType = Undefined, _custom_data: dict[str, Any] | UndefinedType = Undefined, ) -> None: """ - WanHa. + L3InterfacesItem. Subclass of AvdModel. Args: - enabled: Enable / Disable auto CV-Pathfinder HA, when two nodes are defined in the same node_group. - ipsec: Enable / Disable IPsec over HA path-group when HA is enabled. - mtu: Set MTU on WAN HA interfaces. - ha_interfaces: - Local WAN HA interfaces - Overwrite the default behavior which is to pick all the `uplink_interfaces`. - Can be used to filter uplink interfaces when there are multiple uplinks. - Limitations: - Either all - interfaces must be uplinks or all interfaces must not be uplinks. - Only one interface is supported - for non uplinks. + profile: L3 interface profile name. Profile defined under `l3_interface_profiles`. + name: + Ethernet interface name like 'Ethernet2' or subinterface name like 'Ethernet2.42'. + For a + subinterface, the parent physical interface is automatically created. + description: + Interface description. + If not set a default description will be configured with '[[ + ]]'. + ip_address: Node IPv4 address/Mask or 'dhcp'. + dhcp_ip: + When the `ip_address` is `dhcp`, this optional field allows to indicate the expected + IPv4 address + (without mask) to be allocated on the interface if known. + This is not rendered in the configuration + but can be used for substitution of 'interface_ip' in the Access-list + set under `ipv4_acl_in` and + `ipv4_acl_out`. + public_ip: + Node IPv4 address (no mask). - Subclass of AvdList with `str` items. - ha_ipv4_pool: - IP address pool used for WAN HA connectivity. - IP is derived from the node ID. - Not used for uplink - interfaces. - max_ha_interfaces: - Number of parallel links towards HA switches. - Can be used to reserve IP addresses for future - parallel HA links. - port_channel_id: Port-channel ID to use for direct HA. - use_port_channel_for_direct_ha: - Enable or disable using a port-channel interface for direct HA when there is only one interface. - This feature was introduced in EOS 4.33.0F. + This is used to get the public IP (if known) when the device is behind + NAT. + This is only used for `wan_rr` routers (AutoVPN RRs and Pathfinders) to determine the Public IP + with the following preference: + `wan_route_servers.path_groups.interfaces.ip_address` + -> + `l3_interfaces.public_ip` + -> `l3_interfaces.ip_address` + + The determined Public IP is used + by WAN routers when peering with this interface. + encapsulation_dot1q_vlan: + For subinterfaces the dot1q vlan is derived from the interface name by default, but can also be + specified. + dhcp_accept_default_route: Accept a default route from DHCP if `ip_address` is set to `dhcp`. + enabled: Enable or Shutdown the interface. + speed: + Speed should be set in the format `` or `forced ` or `auto + `. + peer: The peer device name. Used for description and documentation. + peer_interface: The peer device interface. Used for description and documentation. + peer_ip: + The peer device IPv4 address (no mask). Used as default route gateway if `set_default_route` is true + and `ip` is an IP address. + bgp: + Enforce IPv4 BGP peering for the peer + + Subclass of AvdModel. + ipv4_acl_in: + Name of the IPv4 access-list to be assigned in the ingress direction. + The access-list must be + defined under `ipv4_acls` and supports field substitution for "interface_ip" and "peer_ip". + Required + for all WAN interfaces (`wan_carrier` is set) unless the carrier is marked as 'trusted' under + `wan_carriers`. + ipv4_acl_out: + Name of the IPv4 Access-list to be assigned in the egress direction. + The access-list must be defined + under `ipv4_acls` and supports field substitution for "interface_ip" and "peer_ip". + static_routes: + Configure IPv4 static routes pointing to `peer_ip`. + + Subclass of AvdList with `StaticRoutesItem` + items. + qos_profile: QOS service profile. + wan_carrier: + The WAN carrier this interface is connected to. + This is used to infer the path-groups in which this + interface should be configured. + Unless the carrier is marked as 'trusted' under `wan_carriers`, + `ipv4_acl_in` is also required on all WAN interfaces. + wan_circuit_id: + The WAN circuit ID for this interface. + This is not rendered in the configuration but used for WAN + designs. + connected_to_pathfinder: For a WAN interface (`wan_carrier` is set), allow to disable the static tunnel towards Pathfinders. + cv_pathfinder_internet_exit: + PREVIEW: This key is in preview mode + + Subclass of AvdModel. + raw_eos_cli: EOS CLI rendered directly on the interface in the final EOS configuration. flow_tracking: - Configures flow-tracking on the HA interfaces. Overrides `fabric_flow_tracking.wan_ha_links` - setting. + Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_interfaces` setting. + Subclass of AvdModel. + structured_config: + Custom structured config for the Ethernet interface. Subclass of AvdModel. _custom_data: _custom_data """ - class L3InterfacesItem(AvdModel): + class L3Interfaces(AvdIndexedList[str, L3InterfacesItem]): + """Subclass of AvdIndexedList with `L3InterfacesItem` items. Primary key is `name` (`str`).""" + + _primary_key: ClassVar[str] = "name" + + L3Interfaces._item_type = L3InterfacesItem + + class L3PortChannelsItem(AvdModel): """Subclass of AvdModel.""" + class MemberInterfacesItem(AvdModel): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = { + "name": {"type": str}, + "description": {"type": str}, + "peer": {"type": str}, + "peer_interface": {"type": str}, + "speed": {"type": str}, + "_custom_data": {"type": dict}, + } + name: str + """ + Ethernet interface name like 'Ethernet2'. + Member interface cannot be subinterface. + """ + description: str | None + """ + Interface description for this member. + If not set a default description will be configured with + '[[ ]]'. + """ + peer: str | None + """ + The peer device name. Used for description and documentation. + If not set, this inherits the peer + setting on the port-channel interface. + """ + peer_interface: str | None + """The peer device interface. Used for description and documentation.""" + speed: str | None + """ + Speed should be set in the format `` or `forced ` or `auto + `. + """ + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, + *, + name: str | UndefinedType = Undefined, + description: str | None | UndefinedType = Undefined, + peer: str | None | UndefinedType = Undefined, + peer_interface: str | None | UndefinedType = Undefined, + speed: str | None | UndefinedType = Undefined, + _custom_data: dict[str, Any] | UndefinedType = Undefined, + ) -> None: + """ + MemberInterfacesItem. + + + Subclass of AvdModel. + + Args: + name: + Ethernet interface name like 'Ethernet2'. + Member interface cannot be subinterface. + description: + Interface description for this member. + If not set a default description will be configured with + '[[ ]]'. + peer: + The peer device name. Used for description and documentation. + If not set, this inherits the peer + setting on the port-channel interface. + peer_interface: The peer device interface. Used for description and documentation. + speed: + Speed should be set in the format `` or `forced ` or `auto + `. + _custom_data: _custom_data + + """ + + class MemberInterfaces(AvdIndexedList[str, MemberInterfacesItem]): + """Subclass of AvdIndexedList with `MemberInterfacesItem` items. Primary key is `name` (`str`).""" + + _primary_key: ClassVar[str] = "name" + + MemberInterfaces._item_type = MemberInterfacesItem + class Bgp(AvdModel): """Subclass of AvdModel.""" @@ -31186,8 +33757,10 @@ def __init__( """ - class StaticRoutes(AvdList[StaticRoutesItem]): - """Subclass of AvdList with `StaticRoutesItem` items.""" + class StaticRoutes(AvdIndexedList[str, StaticRoutesItem]): + """Subclass of AvdIndexedList with `StaticRoutesItem` items. Primary key is `prefix` (`str`).""" + + _primary_key: ClassVar[str] = "prefix" StaticRoutes._item_type = StaticRoutesItem @@ -31302,22 +33875,22 @@ def __init__( """ - class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): + class StructuredConfig(EosCliConfigGen.PortChannelInterfacesItem): """Subclass of AvdModel.""" _fields: ClassVar[dict] = { - "profile": {"type": str}, "name": {"type": str}, "description": {"type": str}, + "mode": {"type": str, "default": "active"}, + "member_interfaces": {"type": MemberInterfaces}, "ip_address": {"type": str}, "dhcp_ip": {"type": str}, "public_ip": {"type": str}, "encapsulation_dot1q_vlan": {"type": int}, "dhcp_accept_default_route": {"type": bool, "default": True}, "enabled": {"type": bool, "default": True}, - "speed": {"type": str}, "peer": {"type": str}, - "peer_interface": {"type": str}, + "peer_port_channel": {"type": str}, "peer_ip": {"type": str}, "bgp": {"type": Bgp}, "ipv4_acl_in": {"type": str}, @@ -31333,19 +33906,32 @@ class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): "structured_config": {"type": StructuredConfig}, "_custom_data": {"type": dict}, } - profile: str | None - """L3 interface profile name. Profile defined under `l3_interface_profiles`.""" name: str """ - Ethernet interface name like 'Ethernet2' or subinterface name like 'Ethernet2.42'. + Port-Channel interface name like 'Port-Channel2' or subinterface name like 'Port-Channel2.42'. For a - subinterface, the parent physical interface is automatically created. + Port-Channel subinterface, the parent Port-Channel interface must be defined as well. """ description: str | None """ Interface description. If not set a default description will be configured with '[[ - ]]'. + ]]'. + """ + mode: Literal["active", "passive", "on"] + """ + Port-Channel mode. + Should not be set on Port-Channel subinterfaces. + + Default value: `"active"` + """ + member_interfaces: MemberInterfaces + """ + Port-Channel member interfaces. + Should not be set on Port-Channel subinterfaces. + + Subclass of + AvdIndexedList with `MemberInterfacesItem` items. Primary key is `name` (`str`). """ ip_address: str | None """Node IPv4 address/Mask or 'dhcp'.""" @@ -31369,11 +33955,11 @@ class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): with the following preference: `wan_route_servers.path_groups.interfaces.ip_address` -> - `l3_interfaces.public_ip` - -> `l3_interfaces.ip_address` + `l3_port_channels.public_ip` + -> `l3_port_channels.ip_address` - The determined Public IP is used - by WAN routers when peering with this interface. + The determined Public IP is + used by WAN routers when peering with this interface. """ encapsulation_dot1q_vlan: int | None """ @@ -31392,15 +33978,10 @@ class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): Default value: `True` """ - speed: str | None - """ - Speed should be set in the format `` or `forced ` or `auto - `. - """ peer: str | None """The peer device name. Used for description and documentation.""" - peer_interface: str | None - """The peer device interface. Used for description and documentation.""" + peer_port_channel: str | None + """The peer device port-channel interface. Used for description and documentation.""" peer_ip: str | None """ The peer device IPv4 address (no mask). Used as default route gateway if `set_default_route` is true @@ -31431,8 +34012,8 @@ class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): """ Configure IPv4 static routes pointing to `peer_ip`. - Subclass of AvdList with `StaticRoutesItem` - items. + Subclass of AvdIndexedList with + `StaticRoutesItem` items. Primary key is `prefix` (`str`). """ qos_profile: str | None """QOS service profile.""" @@ -31463,15 +34044,17 @@ class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): Subclass of AvdModel. """ raw_eos_cli: str | None - """EOS CLI rendered directly on the interface in the final EOS configuration.""" + """EOS CLI rendered directly on the Port-Channel interface in the final EOS configuration.""" flow_tracking: FlowTracking """ - Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_interfaces` setting. + Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_port_channels` + setting. + Subclass of AvdModel. """ structured_config: StructuredConfig """ - Custom structured config for the Ethernet interface. + Custom structured config for the Port-Channel interface. Subclass of AvdModel. """ @@ -31482,18 +34065,18 @@ class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): def __init__( self, *, - profile: str | None | UndefinedType = Undefined, name: str | UndefinedType = Undefined, description: str | None | UndefinedType = Undefined, + mode: Literal["active", "passive", "on"] | UndefinedType = Undefined, + member_interfaces: MemberInterfaces | UndefinedType = Undefined, ip_address: str | None | UndefinedType = Undefined, dhcp_ip: str | None | UndefinedType = Undefined, public_ip: str | None | UndefinedType = Undefined, encapsulation_dot1q_vlan: int | None | UndefinedType = Undefined, dhcp_accept_default_route: bool | UndefinedType = Undefined, enabled: bool | UndefinedType = Undefined, - speed: str | None | UndefinedType = Undefined, peer: str | None | UndefinedType = Undefined, - peer_interface: str | None | UndefinedType = Undefined, + peer_port_channel: str | None | UndefinedType = Undefined, peer_ip: str | None | UndefinedType = Undefined, bgp: Bgp | UndefinedType = Undefined, ipv4_acl_in: str | None | UndefinedType = Undefined, @@ -31510,21 +34093,29 @@ def __init__( _custom_data: dict[str, Any] | UndefinedType = Undefined, ) -> None: """ - L3InterfacesItem. + L3PortChannelsItem. Subclass of AvdModel. Args: - profile: L3 interface profile name. Profile defined under `l3_interface_profiles`. name: - Ethernet interface name like 'Ethernet2' or subinterface name like 'Ethernet2.42'. + Port-Channel interface name like 'Port-Channel2' or subinterface name like 'Port-Channel2.42'. For a - subinterface, the parent physical interface is automatically created. + Port-Channel subinterface, the parent Port-Channel interface must be defined as well. description: Interface description. If not set a default description will be configured with '[[ - ]]'. + ]]'. + mode: + Port-Channel mode. + Should not be set on Port-Channel subinterfaces. + member_interfaces: + Port-Channel member interfaces. + Should not be set on Port-Channel subinterfaces. + + Subclass of + AvdIndexedList with `MemberInterfacesItem` items. Primary key is `name` (`str`). ip_address: Node IPv4 address/Mask or 'dhcp'. dhcp_ip: When the `ip_address` is `dhcp`, this optional field allows to indicate the expected @@ -31543,21 +34134,18 @@ def __init__( with the following preference: `wan_route_servers.path_groups.interfaces.ip_address` -> - `l3_interfaces.public_ip` - -> `l3_interfaces.ip_address` + `l3_port_channels.public_ip` + -> `l3_port_channels.ip_address` - The determined Public IP is used - by WAN routers when peering with this interface. + The determined Public IP is + used by WAN routers when peering with this interface. encapsulation_dot1q_vlan: For subinterfaces the dot1q vlan is derived from the interface name by default, but can also be specified. dhcp_accept_default_route: Accept a default route from DHCP if `ip_address` is set to `dhcp`. enabled: Enable or Shutdown the interface. - speed: - Speed should be set in the format `` or `forced ` or `auto - `. peer: The peer device name. Used for description and documentation. - peer_interface: The peer device interface. Used for description and documentation. + peer_port_channel: The peer device port-channel interface. Used for description and documentation. peer_ip: The peer device IPv4 address (no mask). Used as default route gateway if `set_default_route` is true and `ip` is an IP address. @@ -31579,8 +34167,8 @@ def __init__( static_routes: Configure IPv4 static routes pointing to `peer_ip`. - Subclass of AvdList with `StaticRoutesItem` - items. + Subclass of AvdIndexedList with + `StaticRoutesItem` items. Primary key is `prefix` (`str`). qos_profile: QOS service profile. wan_carrier: The WAN carrier this interface is connected to. @@ -31597,24 +34185,26 @@ def __init__( PREVIEW: This key is in preview mode Subclass of AvdModel. - raw_eos_cli: EOS CLI rendered directly on the interface in the final EOS configuration. + raw_eos_cli: EOS CLI rendered directly on the Port-Channel interface in the final EOS configuration. flow_tracking: - Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_interfaces` setting. + Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_port_channels` + setting. + Subclass of AvdModel. structured_config: - Custom structured config for the Ethernet interface. + Custom structured config for the Port-Channel interface. Subclass of AvdModel. _custom_data: _custom_data """ - class L3Interfaces(AvdIndexedList[str, L3InterfacesItem]): - """Subclass of AvdIndexedList with `L3InterfacesItem` items. Primary key is `name` (`str`).""" + class L3PortChannels(AvdIndexedList[str, L3PortChannelsItem]): + """Subclass of AvdIndexedList with `L3PortChannelsItem` items. Primary key is `name` (`str`).""" _primary_key: ClassVar[str] = "name" - L3Interfaces._item_type = L3InterfacesItem + L3PortChannels._item_type = L3PortChannelsItem _fields: ClassVar[dict] = { "name": {"type": str}, @@ -31722,6 +34312,7 @@ class L3Interfaces(AvdIndexedList[str, L3InterfacesItem]): "wan_ha": {"type": WanHa}, "dps_mss_ipv4": {"type": str, "default": "auto"}, "l3_interfaces": {"type": L3Interfaces}, + "l3_port_channels": {"type": L3PortChannels}, "data_plane_cpu_allocation_max": {"type": int}, "flow_tracker_type": {"type": str}, "_custom_data": {"type": dict}, @@ -32494,6 +35085,15 @@ class L3Interfaces(AvdIndexedList[str, L3InterfacesItem]): Subclass of AvdIndexedList with `L3InterfacesItem` items. Primary key is `name` (`str`). """ + l3_port_channels: L3PortChannels + """ + L3 Port-Channel interfaces to configure on the node. + Used to define the node for WAN interfaces when + `wan_carrier` is set. + + Subclass of AvdIndexedList with `L3PortChannelsItem` items. Primary key is + `name` (`str`). + """ data_plane_cpu_allocation_max: int | None """ Set the maximum number of CPU used for the data plane. @@ -32619,6 +35219,7 @@ def __init__( wan_ha: WanHa | UndefinedType = Undefined, dps_mss_ipv4: str | UndefinedType = Undefined, l3_interfaces: L3Interfaces | UndefinedType = Undefined, + l3_port_channels: L3PortChannels | UndefinedType = Undefined, data_plane_cpu_allocation_max: int | None | UndefinedType = Undefined, flow_tracker_type: Literal["sampled", "hardware"] | None | UndefinedType = Undefined, _custom_data: dict[str, Any] | UndefinedType = Undefined, @@ -33166,6 +35767,13 @@ def __init__( Subclass of AvdIndexedList with `L3InterfacesItem` items. Primary key is `name` (`str`). + l3_port_channels: + L3 Port-Channel interfaces to configure on the node. + Used to define the node for WAN interfaces when + `wan_carrier` is set. + + Subclass of AvdIndexedList with `L3PortChannelsItem` items. Primary key is + `name` (`str`). data_plane_cpu_allocation_max: Set the maximum number of CPU used for the data plane. This setting is useful on virtual Route @@ -41213,70 +43821,510 @@ def __init__( """ _fields: ClassVar[dict] = { - "enabled": {"type": bool}, - "ipsec": {"type": bool, "default": True}, - "mtu": {"type": int, "default": 9194}, - "ha_interfaces": {"type": HaInterfaces}, - "ha_ipv4_pool": {"type": str}, - "max_ha_interfaces": {"type": int}, - "port_channel_id": {"type": int}, - "use_port_channel_for_direct_ha": {"type": bool, "default": True}, + "enabled": {"type": bool}, + "ipsec": {"type": bool, "default": True}, + "mtu": {"type": int, "default": 9194}, + "ha_interfaces": {"type": HaInterfaces}, + "ha_ipv4_pool": {"type": str}, + "max_ha_interfaces": {"type": int}, + "port_channel_id": {"type": int}, + "use_port_channel_for_direct_ha": {"type": bool, "default": True}, + "flow_tracking": {"type": FlowTracking}, + "_custom_data": {"type": dict}, + } + enabled: bool | None + """Enable / Disable auto CV-Pathfinder HA, when two nodes are defined in the same node_group.""" + ipsec: bool + """ + Enable / Disable IPsec over HA path-group when HA is enabled. + + Default value: `True` + """ + mtu: int + """ + Set MTU on WAN HA interfaces. + + Default value: `9194` + """ + ha_interfaces: HaInterfaces + """ + Local WAN HA interfaces + Overwrite the default behavior which is to pick all the `uplink_interfaces`. + Can be used to filter uplink interfaces when there are multiple uplinks. + Limitations: + Either all + interfaces must be uplinks or all interfaces must not be uplinks. + Only one interface is supported + for non uplinks. + + Subclass of AvdList with `str` items. + """ + ha_ipv4_pool: str | None + """ + IP address pool used for WAN HA connectivity. + IP is derived from the node ID. + Not used for uplink + interfaces. + """ + max_ha_interfaces: int | None + """ + Number of parallel links towards HA switches. + Can be used to reserve IP addresses for future + parallel HA links. + """ + port_channel_id: int | None + """Port-channel ID to use for direct HA.""" + use_port_channel_for_direct_ha: bool + """ + Enable or disable using a port-channel interface for direct HA when there is only one interface. + This feature was introduced in EOS 4.33.0F. + + Default value: `True` + """ + flow_tracking: FlowTracking + """ + Configures flow-tracking on the HA interfaces. Overrides `fabric_flow_tracking.wan_ha_links` + setting. + + Subclass of AvdModel. + """ + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, + *, + enabled: bool | None | UndefinedType = Undefined, + ipsec: bool | UndefinedType = Undefined, + mtu: int | UndefinedType = Undefined, + ha_interfaces: HaInterfaces | UndefinedType = Undefined, + ha_ipv4_pool: str | None | UndefinedType = Undefined, + max_ha_interfaces: int | None | UndefinedType = Undefined, + port_channel_id: int | None | UndefinedType = Undefined, + use_port_channel_for_direct_ha: bool | UndefinedType = Undefined, + flow_tracking: FlowTracking | UndefinedType = Undefined, + _custom_data: dict[str, Any] | UndefinedType = Undefined, + ) -> None: + """ + WanHa. + + + Subclass of AvdModel. + + Args: + enabled: Enable / Disable auto CV-Pathfinder HA, when two nodes are defined in the same node_group. + ipsec: Enable / Disable IPsec over HA path-group when HA is enabled. + mtu: Set MTU on WAN HA interfaces. + ha_interfaces: + Local WAN HA interfaces + Overwrite the default behavior which is to pick all the `uplink_interfaces`. + Can be used to filter uplink interfaces when there are multiple uplinks. + Limitations: + Either all + interfaces must be uplinks or all interfaces must not be uplinks. + Only one interface is supported + for non uplinks. + + Subclass of AvdList with `str` items. + ha_ipv4_pool: + IP address pool used for WAN HA connectivity. + IP is derived from the node ID. + Not used for uplink + interfaces. + max_ha_interfaces: + Number of parallel links towards HA switches. + Can be used to reserve IP addresses for future + parallel HA links. + port_channel_id: Port-channel ID to use for direct HA. + use_port_channel_for_direct_ha: + Enable or disable using a port-channel interface for direct HA when there is only one interface. + This feature was introduced in EOS 4.33.0F. + flow_tracking: + Configures flow-tracking on the HA interfaces. Overrides `fabric_flow_tracking.wan_ha_links` + setting. + + Subclass of AvdModel. + _custom_data: _custom_data + + """ + + class L3InterfacesItem(AvdModel): + """Subclass of AvdModel.""" + + class Bgp(AvdModel): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = { + "peer_as": {"type": str}, + "ipv4_prefix_list_in": {"type": str}, + "ipv4_prefix_list_out": {"type": str}, + "_custom_data": {"type": dict}, + } + peer_as: str + """ + BGP AS <1-4294967295> or AS number in asdot notation "<1-65535>.<0-65535>". + For asdot notation in + YAML inputs, the value must be put in quotes, to prevent it from being interpreted as a float + number. + """ + ipv4_prefix_list_in: str | None + """ + Prefix List Name. Accept routes for only these prefixes from the peer. + Required for wan interfaces. + """ + ipv4_prefix_list_out: str | None + """ + Prefix List Name. Advertise routes for only these prefixes. + If not specified, nothing would be + advertised. + """ + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, + *, + peer_as: str | UndefinedType = Undefined, + ipv4_prefix_list_in: str | None | UndefinedType = Undefined, + ipv4_prefix_list_out: str | None | UndefinedType = Undefined, + _custom_data: dict[str, Any] | UndefinedType = Undefined, + ) -> None: + """ + Bgp. + + + Subclass of AvdModel. + + Args: + peer_as: + BGP AS <1-4294967295> or AS number in asdot notation "<1-65535>.<0-65535>". + For asdot notation in + YAML inputs, the value must be put in quotes, to prevent it from being interpreted as a float + number. + ipv4_prefix_list_in: + Prefix List Name. Accept routes for only these prefixes from the peer. + Required for wan interfaces. + ipv4_prefix_list_out: + Prefix List Name. Advertise routes for only these prefixes. + If not specified, nothing would be + advertised. + _custom_data: _custom_data + + """ + + class StaticRoutesItem(AvdModel): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = {"prefix": {"type": str}, "_custom_data": {"type": dict}} + prefix: str + """IPv4_network/Mask.""" + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, *, prefix: str | UndefinedType = Undefined, _custom_data: dict[str, Any] | UndefinedType = Undefined + ) -> None: + """ + StaticRoutesItem. + + + Subclass of AvdModel. + + Args: + prefix: IPv4_network/Mask. + _custom_data: _custom_data + + """ + + class StaticRoutes(AvdList[StaticRoutesItem]): + """Subclass of AvdList with `StaticRoutesItem` items.""" + + StaticRoutes._item_type = StaticRoutesItem + + class CvPathfinderInternetExit(AvdModel): + """Subclass of AvdModel.""" + + class PoliciesItem(AvdModel): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = {"name": {"type": str}, "tunnel_interface_numbers": {"type": str}, "_custom_data": {"type": dict}} + name: str + """Internet-exit policy name.""" + tunnel_interface_numbers: str | None + """ + Number range to use for Tunnel interfaces to an internet-exit service provider using this local + interface. + Examples: '1-3' or '100,200,300' + """ + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, + *, + name: str | UndefinedType = Undefined, + tunnel_interface_numbers: str | None | UndefinedType = Undefined, + _custom_data: dict[str, Any] | UndefinedType = Undefined, + ) -> None: + """ + PoliciesItem. + + + Subclass of AvdModel. + + Args: + name: Internet-exit policy name. + tunnel_interface_numbers: + Number range to use for Tunnel interfaces to an internet-exit service provider using this local + interface. + Examples: '1-3' or '100,200,300' + _custom_data: _custom_data + + """ + + class Policies(AvdIndexedList[str, PoliciesItem]): + """Subclass of AvdIndexedList with `PoliciesItem` items. Primary key is `name` (`str`).""" + + _primary_key: ClassVar[str] = "name" + + Policies._item_type = PoliciesItem + + _fields: ClassVar[dict] = {"policies": {"type": Policies}, "_custom_data": {"type": dict}} + policies: Policies + """ + List of Internet-exit policies using this interface as exit. + + Subclass of AvdIndexedList with + `PoliciesItem` items. Primary key is `name` (`str`). + """ + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, *, policies: Policies | UndefinedType = Undefined, _custom_data: dict[str, Any] | UndefinedType = Undefined + ) -> None: + """ + CvPathfinderInternetExit. + + + Subclass of AvdModel. + + Args: + policies: + List of Internet-exit policies using this interface as exit. + + Subclass of AvdIndexedList with + `PoliciesItem` items. Primary key is `name` (`str`). + _custom_data: _custom_data + + """ + + class FlowTracking(AvdModel): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = {"enabled": {"type": bool}, "name": {"type": str}, "_custom_data": {"type": dict}} + enabled: bool | None + name: str | None + """Flow tracker name as defined in flow_tracking_settings.""" + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, + *, + enabled: bool | None | UndefinedType = Undefined, + name: str | None | UndefinedType = Undefined, + _custom_data: dict[str, Any] | UndefinedType = Undefined, + ) -> None: + """ + FlowTracking. + + + Subclass of AvdModel. + + Args: + enabled: enabled + name: Flow tracker name as defined in flow_tracking_settings. + _custom_data: _custom_data + + """ + + class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = { + "profile": {"type": str}, + "name": {"type": str}, + "description": {"type": str}, + "ip_address": {"type": str}, + "dhcp_ip": {"type": str}, + "public_ip": {"type": str}, + "encapsulation_dot1q_vlan": {"type": int}, + "dhcp_accept_default_route": {"type": bool, "default": True}, + "enabled": {"type": bool, "default": True}, + "speed": {"type": str}, + "peer": {"type": str}, + "peer_interface": {"type": str}, + "peer_ip": {"type": str}, + "bgp": {"type": Bgp}, + "ipv4_acl_in": {"type": str}, + "ipv4_acl_out": {"type": str}, + "static_routes": {"type": StaticRoutes}, + "qos_profile": {"type": str}, + "wan_carrier": {"type": str}, + "wan_circuit_id": {"type": str}, + "connected_to_pathfinder": {"type": bool, "default": True}, + "cv_pathfinder_internet_exit": {"type": CvPathfinderInternetExit}, + "raw_eos_cli": {"type": str}, "flow_tracking": {"type": FlowTracking}, + "structured_config": {"type": StructuredConfig}, "_custom_data": {"type": dict}, } - enabled: bool | None - """Enable / Disable auto CV-Pathfinder HA, when two nodes are defined in the same node_group.""" - ipsec: bool + profile: str | None + """L3 interface profile name. Profile defined under `l3_interface_profiles`.""" + name: str """ - Enable / Disable IPsec over HA path-group when HA is enabled. + Ethernet interface name like 'Ethernet2' or subinterface name like 'Ethernet2.42'. + For a + subinterface, the parent physical interface is automatically created. + """ + description: str | None + """ + Interface description. + If not set a default description will be configured with '[[ + ]]'. + """ + ip_address: str | None + """Node IPv4 address/Mask or 'dhcp'.""" + dhcp_ip: str | None + """ + When the `ip_address` is `dhcp`, this optional field allows to indicate the expected + IPv4 address + (without mask) to be allocated on the interface if known. + This is not rendered in the configuration + but can be used for substitution of 'interface_ip' in the Access-list + set under `ipv4_acl_in` and + `ipv4_acl_out`. + """ + public_ip: str | None + """ + Node IPv4 address (no mask). + + This is used to get the public IP (if known) when the device is behind + NAT. + This is only used for `wan_rr` routers (AutoVPN RRs and Pathfinders) to determine the Public IP + with the following preference: + `wan_route_servers.path_groups.interfaces.ip_address` + -> + `l3_interfaces.public_ip` + -> `l3_interfaces.ip_address` + + The determined Public IP is used + by WAN routers when peering with this interface. + """ + encapsulation_dot1q_vlan: int | None + """ + For subinterfaces the dot1q vlan is derived from the interface name by default, but can also be + specified. + """ + dhcp_accept_default_route: bool + """ + Accept a default route from DHCP if `ip_address` is set to `dhcp`. Default value: `True` """ - mtu: int + enabled: bool """ - Set MTU on WAN HA interfaces. + Enable or Shutdown the interface. - Default value: `9194` + Default value: `True` """ - ha_interfaces: HaInterfaces + speed: str | None """ - Local WAN HA interfaces - Overwrite the default behavior which is to pick all the `uplink_interfaces`. - Can be used to filter uplink interfaces when there are multiple uplinks. - Limitations: - Either all - interfaces must be uplinks or all interfaces must not be uplinks. - Only one interface is supported - for non uplinks. + Speed should be set in the format `` or `forced ` or `auto + `. + """ + peer: str | None + """The peer device name. Used for description and documentation.""" + peer_interface: str | None + """The peer device interface. Used for description and documentation.""" + peer_ip: str | None + """ + The peer device IPv4 address (no mask). Used as default route gateway if `set_default_route` is true + and `ip` is an IP address. + """ + bgp: Bgp + """ + Enforce IPv4 BGP peering for the peer - Subclass of AvdList with `str` items. + Subclass of AvdModel. """ - ha_ipv4_pool: str | None + ipv4_acl_in: str | None """ - IP address pool used for WAN HA connectivity. - IP is derived from the node ID. - Not used for uplink - interfaces. + Name of the IPv4 access-list to be assigned in the ingress direction. + The access-list must be + defined under `ipv4_acls` and supports field substitution for "interface_ip" and "peer_ip". + Required + for all WAN interfaces (`wan_carrier` is set) unless the carrier is marked as 'trusted' under + `wan_carriers`. """ - max_ha_interfaces: int | None + ipv4_acl_out: str | None """ - Number of parallel links towards HA switches. - Can be used to reserve IP addresses for future - parallel HA links. + Name of the IPv4 Access-list to be assigned in the egress direction. + The access-list must be defined + under `ipv4_acls` and supports field substitution for "interface_ip" and "peer_ip". """ - port_channel_id: int | None - """Port-channel ID to use for direct HA.""" - use_port_channel_for_direct_ha: bool + static_routes: StaticRoutes """ - Enable or disable using a port-channel interface for direct HA when there is only one interface. - This feature was introduced in EOS 4.33.0F. + Configure IPv4 static routes pointing to `peer_ip`. + + Subclass of AvdList with `StaticRoutesItem` + items. + """ + qos_profile: str | None + """QOS service profile.""" + wan_carrier: str | None + """ + The WAN carrier this interface is connected to. + This is used to infer the path-groups in which this + interface should be configured. + Unless the carrier is marked as 'trusted' under `wan_carriers`, + `ipv4_acl_in` is also required on all WAN interfaces. + """ + wan_circuit_id: str | None + """ + The WAN circuit ID for this interface. + This is not rendered in the configuration but used for WAN + designs. + """ + connected_to_pathfinder: bool + """ + For a WAN interface (`wan_carrier` is set), allow to disable the static tunnel towards Pathfinders. Default value: `True` """ + cv_pathfinder_internet_exit: CvPathfinderInternetExit + """ + PREVIEW: This key is in preview mode + + Subclass of AvdModel. + """ + raw_eos_cli: str | None + """EOS CLI rendered directly on the interface in the final EOS configuration.""" flow_tracking: FlowTracking """ - Configures flow-tracking on the HA interfaces. Overrides `fabric_flow_tracking.wan_ha_links` - setting. + Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_interfaces` setting. + Subclass of AvdModel. + """ + structured_config: StructuredConfig + """ + Custom structured config for the Ethernet interface. Subclass of AvdModel. """ @@ -41287,63 +44335,225 @@ def __init__( def __init__( self, *, - enabled: bool | None | UndefinedType = Undefined, - ipsec: bool | UndefinedType = Undefined, - mtu: int | UndefinedType = Undefined, - ha_interfaces: HaInterfaces | UndefinedType = Undefined, - ha_ipv4_pool: str | None | UndefinedType = Undefined, - max_ha_interfaces: int | None | UndefinedType = Undefined, - port_channel_id: int | None | UndefinedType = Undefined, - use_port_channel_for_direct_ha: bool | UndefinedType = Undefined, + profile: str | None | UndefinedType = Undefined, + name: str | UndefinedType = Undefined, + description: str | None | UndefinedType = Undefined, + ip_address: str | None | UndefinedType = Undefined, + dhcp_ip: str | None | UndefinedType = Undefined, + public_ip: str | None | UndefinedType = Undefined, + encapsulation_dot1q_vlan: int | None | UndefinedType = Undefined, + dhcp_accept_default_route: bool | UndefinedType = Undefined, + enabled: bool | UndefinedType = Undefined, + speed: str | None | UndefinedType = Undefined, + peer: str | None | UndefinedType = Undefined, + peer_interface: str | None | UndefinedType = Undefined, + peer_ip: str | None | UndefinedType = Undefined, + bgp: Bgp | UndefinedType = Undefined, + ipv4_acl_in: str | None | UndefinedType = Undefined, + ipv4_acl_out: str | None | UndefinedType = Undefined, + static_routes: StaticRoutes | UndefinedType = Undefined, + qos_profile: str | None | UndefinedType = Undefined, + wan_carrier: str | None | UndefinedType = Undefined, + wan_circuit_id: str | None | UndefinedType = Undefined, + connected_to_pathfinder: bool | UndefinedType = Undefined, + cv_pathfinder_internet_exit: CvPathfinderInternetExit | UndefinedType = Undefined, + raw_eos_cli: str | None | UndefinedType = Undefined, flow_tracking: FlowTracking | UndefinedType = Undefined, + structured_config: StructuredConfig | UndefinedType = Undefined, _custom_data: dict[str, Any] | UndefinedType = Undefined, ) -> None: """ - WanHa. + L3InterfacesItem. Subclass of AvdModel. Args: - enabled: Enable / Disable auto CV-Pathfinder HA, when two nodes are defined in the same node_group. - ipsec: Enable / Disable IPsec over HA path-group when HA is enabled. - mtu: Set MTU on WAN HA interfaces. - ha_interfaces: - Local WAN HA interfaces - Overwrite the default behavior which is to pick all the `uplink_interfaces`. - Can be used to filter uplink interfaces when there are multiple uplinks. - Limitations: - Either all - interfaces must be uplinks or all interfaces must not be uplinks. - Only one interface is supported - for non uplinks. + profile: L3 interface profile name. Profile defined under `l3_interface_profiles`. + name: + Ethernet interface name like 'Ethernet2' or subinterface name like 'Ethernet2.42'. + For a + subinterface, the parent physical interface is automatically created. + description: + Interface description. + If not set a default description will be configured with '[[ + ]]'. + ip_address: Node IPv4 address/Mask or 'dhcp'. + dhcp_ip: + When the `ip_address` is `dhcp`, this optional field allows to indicate the expected + IPv4 address + (without mask) to be allocated on the interface if known. + This is not rendered in the configuration + but can be used for substitution of 'interface_ip' in the Access-list + set under `ipv4_acl_in` and + `ipv4_acl_out`. + public_ip: + Node IPv4 address (no mask). - Subclass of AvdList with `str` items. - ha_ipv4_pool: - IP address pool used for WAN HA connectivity. - IP is derived from the node ID. - Not used for uplink - interfaces. - max_ha_interfaces: - Number of parallel links towards HA switches. - Can be used to reserve IP addresses for future - parallel HA links. - port_channel_id: Port-channel ID to use for direct HA. - use_port_channel_for_direct_ha: - Enable or disable using a port-channel interface for direct HA when there is only one interface. - This feature was introduced in EOS 4.33.0F. + This is used to get the public IP (if known) when the device is behind + NAT. + This is only used for `wan_rr` routers (AutoVPN RRs and Pathfinders) to determine the Public IP + with the following preference: + `wan_route_servers.path_groups.interfaces.ip_address` + -> + `l3_interfaces.public_ip` + -> `l3_interfaces.ip_address` + + The determined Public IP is used + by WAN routers when peering with this interface. + encapsulation_dot1q_vlan: + For subinterfaces the dot1q vlan is derived from the interface name by default, but can also be + specified. + dhcp_accept_default_route: Accept a default route from DHCP if `ip_address` is set to `dhcp`. + enabled: Enable or Shutdown the interface. + speed: + Speed should be set in the format `` or `forced ` or `auto + `. + peer: The peer device name. Used for description and documentation. + peer_interface: The peer device interface. Used for description and documentation. + peer_ip: + The peer device IPv4 address (no mask). Used as default route gateway if `set_default_route` is true + and `ip` is an IP address. + bgp: + Enforce IPv4 BGP peering for the peer + + Subclass of AvdModel. + ipv4_acl_in: + Name of the IPv4 access-list to be assigned in the ingress direction. + The access-list must be + defined under `ipv4_acls` and supports field substitution for "interface_ip" and "peer_ip". + Required + for all WAN interfaces (`wan_carrier` is set) unless the carrier is marked as 'trusted' under + `wan_carriers`. + ipv4_acl_out: + Name of the IPv4 Access-list to be assigned in the egress direction. + The access-list must be defined + under `ipv4_acls` and supports field substitution for "interface_ip" and "peer_ip". + static_routes: + Configure IPv4 static routes pointing to `peer_ip`. + + Subclass of AvdList with `StaticRoutesItem` + items. + qos_profile: QOS service profile. + wan_carrier: + The WAN carrier this interface is connected to. + This is used to infer the path-groups in which this + interface should be configured. + Unless the carrier is marked as 'trusted' under `wan_carriers`, + `ipv4_acl_in` is also required on all WAN interfaces. + wan_circuit_id: + The WAN circuit ID for this interface. + This is not rendered in the configuration but used for WAN + designs. + connected_to_pathfinder: For a WAN interface (`wan_carrier` is set), allow to disable the static tunnel towards Pathfinders. + cv_pathfinder_internet_exit: + PREVIEW: This key is in preview mode + + Subclass of AvdModel. + raw_eos_cli: EOS CLI rendered directly on the interface in the final EOS configuration. flow_tracking: - Configures flow-tracking on the HA interfaces. Overrides `fabric_flow_tracking.wan_ha_links` - setting. + Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_interfaces` setting. + Subclass of AvdModel. + structured_config: + Custom structured config for the Ethernet interface. Subclass of AvdModel. _custom_data: _custom_data """ - class L3InterfacesItem(AvdModel): + class L3Interfaces(AvdIndexedList[str, L3InterfacesItem]): + """Subclass of AvdIndexedList with `L3InterfacesItem` items. Primary key is `name` (`str`).""" + + _primary_key: ClassVar[str] = "name" + + L3Interfaces._item_type = L3InterfacesItem + + class L3PortChannelsItem(AvdModel): """Subclass of AvdModel.""" + class MemberInterfacesItem(AvdModel): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = { + "name": {"type": str}, + "description": {"type": str}, + "peer": {"type": str}, + "peer_interface": {"type": str}, + "speed": {"type": str}, + "_custom_data": {"type": dict}, + } + name: str + """ + Ethernet interface name like 'Ethernet2'. + Member interface cannot be subinterface. + """ + description: str | None + """ + Interface description for this member. + If not set a default description will be configured with + '[[ ]]'. + """ + peer: str | None + """ + The peer device name. Used for description and documentation. + If not set, this inherits the peer + setting on the port-channel interface. + """ + peer_interface: str | None + """The peer device interface. Used for description and documentation.""" + speed: str | None + """ + Speed should be set in the format `` or `forced ` or `auto + `. + """ + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, + *, + name: str | UndefinedType = Undefined, + description: str | None | UndefinedType = Undefined, + peer: str | None | UndefinedType = Undefined, + peer_interface: str | None | UndefinedType = Undefined, + speed: str | None | UndefinedType = Undefined, + _custom_data: dict[str, Any] | UndefinedType = Undefined, + ) -> None: + """ + MemberInterfacesItem. + + + Subclass of AvdModel. + + Args: + name: + Ethernet interface name like 'Ethernet2'. + Member interface cannot be subinterface. + description: + Interface description for this member. + If not set a default description will be configured with + '[[ ]]'. + peer: + The peer device name. Used for description and documentation. + If not set, this inherits the peer + setting on the port-channel interface. + peer_interface: The peer device interface. Used for description and documentation. + speed: + Speed should be set in the format `` or `forced ` or `auto + `. + _custom_data: _custom_data + + """ + + class MemberInterfaces(AvdIndexedList[str, MemberInterfacesItem]): + """Subclass of AvdIndexedList with `MemberInterfacesItem` items. Primary key is `name` (`str`).""" + + _primary_key: ClassVar[str] = "name" + + MemberInterfaces._item_type = MemberInterfacesItem + class Bgp(AvdModel): """Subclass of AvdModel.""" @@ -41431,8 +44641,10 @@ def __init__( """ - class StaticRoutes(AvdList[StaticRoutesItem]): - """Subclass of AvdList with `StaticRoutesItem` items.""" + class StaticRoutes(AvdIndexedList[str, StaticRoutesItem]): + """Subclass of AvdIndexedList with `StaticRoutesItem` items. Primary key is `prefix` (`str`).""" + + _primary_key: ClassVar[str] = "prefix" StaticRoutes._item_type = StaticRoutesItem @@ -41547,22 +44759,22 @@ def __init__( """ - class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): + class StructuredConfig(EosCliConfigGen.PortChannelInterfacesItem): """Subclass of AvdModel.""" _fields: ClassVar[dict] = { - "profile": {"type": str}, "name": {"type": str}, "description": {"type": str}, + "mode": {"type": str, "default": "active"}, + "member_interfaces": {"type": MemberInterfaces}, "ip_address": {"type": str}, "dhcp_ip": {"type": str}, "public_ip": {"type": str}, "encapsulation_dot1q_vlan": {"type": int}, "dhcp_accept_default_route": {"type": bool, "default": True}, "enabled": {"type": bool, "default": True}, - "speed": {"type": str}, "peer": {"type": str}, - "peer_interface": {"type": str}, + "peer_port_channel": {"type": str}, "peer_ip": {"type": str}, "bgp": {"type": Bgp}, "ipv4_acl_in": {"type": str}, @@ -41578,19 +44790,32 @@ class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): "structured_config": {"type": StructuredConfig}, "_custom_data": {"type": dict}, } - profile: str | None - """L3 interface profile name. Profile defined under `l3_interface_profiles`.""" name: str """ - Ethernet interface name like 'Ethernet2' or subinterface name like 'Ethernet2.42'. + Port-Channel interface name like 'Port-Channel2' or subinterface name like 'Port-Channel2.42'. For a - subinterface, the parent physical interface is automatically created. + Port-Channel subinterface, the parent Port-Channel interface must be defined as well. """ description: str | None """ Interface description. If not set a default description will be configured with '[[ - ]]'. + ]]'. + """ + mode: Literal["active", "passive", "on"] + """ + Port-Channel mode. + Should not be set on Port-Channel subinterfaces. + + Default value: `"active"` + """ + member_interfaces: MemberInterfaces + """ + Port-Channel member interfaces. + Should not be set on Port-Channel subinterfaces. + + Subclass of + AvdIndexedList with `MemberInterfacesItem` items. Primary key is `name` (`str`). """ ip_address: str | None """Node IPv4 address/Mask or 'dhcp'.""" @@ -41614,11 +44839,11 @@ class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): with the following preference: `wan_route_servers.path_groups.interfaces.ip_address` -> - `l3_interfaces.public_ip` - -> `l3_interfaces.ip_address` + `l3_port_channels.public_ip` + -> `l3_port_channels.ip_address` - The determined Public IP is used - by WAN routers when peering with this interface. + The determined Public IP is + used by WAN routers when peering with this interface. """ encapsulation_dot1q_vlan: int | None """ @@ -41637,15 +44862,10 @@ class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): Default value: `True` """ - speed: str | None - """ - Speed should be set in the format `` or `forced ` or `auto - `. - """ peer: str | None """The peer device name. Used for description and documentation.""" - peer_interface: str | None - """The peer device interface. Used for description and documentation.""" + peer_port_channel: str | None + """The peer device port-channel interface. Used for description and documentation.""" peer_ip: str | None """ The peer device IPv4 address (no mask). Used as default route gateway if `set_default_route` is true @@ -41676,8 +44896,8 @@ class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): """ Configure IPv4 static routes pointing to `peer_ip`. - Subclass of AvdList with `StaticRoutesItem` - items. + Subclass of AvdIndexedList with + `StaticRoutesItem` items. Primary key is `prefix` (`str`). """ qos_profile: str | None """QOS service profile.""" @@ -41708,15 +44928,17 @@ class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): Subclass of AvdModel. """ raw_eos_cli: str | None - """EOS CLI rendered directly on the interface in the final EOS configuration.""" + """EOS CLI rendered directly on the Port-Channel interface in the final EOS configuration.""" flow_tracking: FlowTracking """ - Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_interfaces` setting. + Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_port_channels` + setting. + Subclass of AvdModel. """ structured_config: StructuredConfig """ - Custom structured config for the Ethernet interface. + Custom structured config for the Port-Channel interface. Subclass of AvdModel. """ @@ -41727,18 +44949,18 @@ class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): def __init__( self, *, - profile: str | None | UndefinedType = Undefined, name: str | UndefinedType = Undefined, description: str | None | UndefinedType = Undefined, + mode: Literal["active", "passive", "on"] | UndefinedType = Undefined, + member_interfaces: MemberInterfaces | UndefinedType = Undefined, ip_address: str | None | UndefinedType = Undefined, dhcp_ip: str | None | UndefinedType = Undefined, public_ip: str | None | UndefinedType = Undefined, encapsulation_dot1q_vlan: int | None | UndefinedType = Undefined, dhcp_accept_default_route: bool | UndefinedType = Undefined, enabled: bool | UndefinedType = Undefined, - speed: str | None | UndefinedType = Undefined, peer: str | None | UndefinedType = Undefined, - peer_interface: str | None | UndefinedType = Undefined, + peer_port_channel: str | None | UndefinedType = Undefined, peer_ip: str | None | UndefinedType = Undefined, bgp: Bgp | UndefinedType = Undefined, ipv4_acl_in: str | None | UndefinedType = Undefined, @@ -41755,21 +44977,29 @@ def __init__( _custom_data: dict[str, Any] | UndefinedType = Undefined, ) -> None: """ - L3InterfacesItem. + L3PortChannelsItem. Subclass of AvdModel. Args: - profile: L3 interface profile name. Profile defined under `l3_interface_profiles`. name: - Ethernet interface name like 'Ethernet2' or subinterface name like 'Ethernet2.42'. + Port-Channel interface name like 'Port-Channel2' or subinterface name like 'Port-Channel2.42'. For a - subinterface, the parent physical interface is automatically created. + Port-Channel subinterface, the parent Port-Channel interface must be defined as well. description: Interface description. If not set a default description will be configured with '[[ - ]]'. + ]]'. + mode: + Port-Channel mode. + Should not be set on Port-Channel subinterfaces. + member_interfaces: + Port-Channel member interfaces. + Should not be set on Port-Channel subinterfaces. + + Subclass of + AvdIndexedList with `MemberInterfacesItem` items. Primary key is `name` (`str`). ip_address: Node IPv4 address/Mask or 'dhcp'. dhcp_ip: When the `ip_address` is `dhcp`, this optional field allows to indicate the expected @@ -41788,21 +45018,18 @@ def __init__( with the following preference: `wan_route_servers.path_groups.interfaces.ip_address` -> - `l3_interfaces.public_ip` - -> `l3_interfaces.ip_address` + `l3_port_channels.public_ip` + -> `l3_port_channels.ip_address` - The determined Public IP is used - by WAN routers when peering with this interface. + The determined Public IP is + used by WAN routers when peering with this interface. encapsulation_dot1q_vlan: For subinterfaces the dot1q vlan is derived from the interface name by default, but can also be specified. dhcp_accept_default_route: Accept a default route from DHCP if `ip_address` is set to `dhcp`. enabled: Enable or Shutdown the interface. - speed: - Speed should be set in the format `` or `forced ` or `auto - `. peer: The peer device name. Used for description and documentation. - peer_interface: The peer device interface. Used for description and documentation. + peer_port_channel: The peer device port-channel interface. Used for description and documentation. peer_ip: The peer device IPv4 address (no mask). Used as default route gateway if `set_default_route` is true and `ip` is an IP address. @@ -41824,8 +45051,8 @@ def __init__( static_routes: Configure IPv4 static routes pointing to `peer_ip`. - Subclass of AvdList with `StaticRoutesItem` - items. + Subclass of AvdIndexedList with + `StaticRoutesItem` items. Primary key is `prefix` (`str`). qos_profile: QOS service profile. wan_carrier: The WAN carrier this interface is connected to. @@ -41842,24 +45069,26 @@ def __init__( PREVIEW: This key is in preview mode Subclass of AvdModel. - raw_eos_cli: EOS CLI rendered directly on the interface in the final EOS configuration. + raw_eos_cli: EOS CLI rendered directly on the Port-Channel interface in the final EOS configuration. flow_tracking: - Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_interfaces` setting. + Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_port_channels` + setting. + Subclass of AvdModel. structured_config: - Custom structured config for the Ethernet interface. + Custom structured config for the Port-Channel interface. Subclass of AvdModel. _custom_data: _custom_data """ - class L3Interfaces(AvdIndexedList[str, L3InterfacesItem]): - """Subclass of AvdIndexedList with `L3InterfacesItem` items. Primary key is `name` (`str`).""" + class L3PortChannels(AvdIndexedList[str, L3PortChannelsItem]): + """Subclass of AvdIndexedList with `L3PortChannelsItem` items. Primary key is `name` (`str`).""" _primary_key: ClassVar[str] = "name" - L3Interfaces._item_type = L3InterfacesItem + L3PortChannels._item_type = L3PortChannelsItem _fields: ClassVar[dict] = { "id": {"type": int}, @@ -41965,6 +45194,7 @@ class L3Interfaces(AvdIndexedList[str, L3InterfacesItem]): "wan_ha": {"type": WanHa}, "dps_mss_ipv4": {"type": str, "default": "auto"}, "l3_interfaces": {"type": L3Interfaces}, + "l3_port_channels": {"type": L3PortChannels}, "data_plane_cpu_allocation_max": {"type": int}, "flow_tracker_type": {"type": str}, "_custom_data": {"type": dict}, @@ -42727,6 +45957,15 @@ class L3Interfaces(AvdIndexedList[str, L3InterfacesItem]): Subclass of AvdIndexedList with `L3InterfacesItem` items. Primary key is `name` (`str`). """ + l3_port_channels: L3PortChannels + """ + L3 Port-Channel interfaces to configure on the node. + Used to define the node for WAN interfaces when + `wan_carrier` is set. + + Subclass of AvdIndexedList with `L3PortChannelsItem` items. Primary key is + `name` (`str`). + """ data_plane_cpu_allocation_max: int | None """ Set the maximum number of CPU used for the data plane. @@ -42850,6 +46089,7 @@ def __init__( wan_ha: WanHa | UndefinedType = Undefined, dps_mss_ipv4: str | UndefinedType = Undefined, l3_interfaces: L3Interfaces | UndefinedType = Undefined, + l3_port_channels: L3PortChannels | UndefinedType = Undefined, data_plane_cpu_allocation_max: int | None | UndefinedType = Undefined, flow_tracker_type: Literal["sampled", "hardware"] | None | UndefinedType = Undefined, _custom_data: dict[str, Any] | UndefinedType = Undefined, @@ -43390,6 +46630,13 @@ def __init__( Subclass of AvdIndexedList with `L3InterfacesItem` items. Primary key is `name` (`str`). + l3_port_channels: + L3 Port-Channel interfaces to configure on the node. + Used to define the node for WAN interfaces when + `wan_carrier` is set. + + Subclass of AvdIndexedList with `L3PortChannelsItem` items. Primary key is + `name` (`str`). data_plane_cpu_allocation_max: Set the maximum number of CPU used for the data plane. This setting is useful on virtual Route @@ -44691,70 +47938,510 @@ def __init__( """ _fields: ClassVar[dict] = { - "enabled": {"type": bool}, - "ipsec": {"type": bool, "default": True}, - "mtu": {"type": int, "default": 9194}, - "ha_interfaces": {"type": HaInterfaces}, - "ha_ipv4_pool": {"type": str}, - "max_ha_interfaces": {"type": int}, - "port_channel_id": {"type": int}, - "use_port_channel_for_direct_ha": {"type": bool, "default": True}, + "enabled": {"type": bool}, + "ipsec": {"type": bool, "default": True}, + "mtu": {"type": int, "default": 9194}, + "ha_interfaces": {"type": HaInterfaces}, + "ha_ipv4_pool": {"type": str}, + "max_ha_interfaces": {"type": int}, + "port_channel_id": {"type": int}, + "use_port_channel_for_direct_ha": {"type": bool, "default": True}, + "flow_tracking": {"type": FlowTracking}, + "_custom_data": {"type": dict}, + } + enabled: bool | None + """Enable / Disable auto CV-Pathfinder HA, when two nodes are defined in the same node_group.""" + ipsec: bool + """ + Enable / Disable IPsec over HA path-group when HA is enabled. + + Default value: `True` + """ + mtu: int + """ + Set MTU on WAN HA interfaces. + + Default value: `9194` + """ + ha_interfaces: HaInterfaces + """ + Local WAN HA interfaces + Overwrite the default behavior which is to pick all the `uplink_interfaces`. + Can be used to filter uplink interfaces when there are multiple uplinks. + Limitations: + Either all + interfaces must be uplinks or all interfaces must not be uplinks. + Only one interface is supported + for non uplinks. + + Subclass of AvdList with `str` items. + """ + ha_ipv4_pool: str | None + """ + IP address pool used for WAN HA connectivity. + IP is derived from the node ID. + Not used for uplink + interfaces. + """ + max_ha_interfaces: int | None + """ + Number of parallel links towards HA switches. + Can be used to reserve IP addresses for future + parallel HA links. + """ + port_channel_id: int | None + """Port-channel ID to use for direct HA.""" + use_port_channel_for_direct_ha: bool + """ + Enable or disable using a port-channel interface for direct HA when there is only one interface. + This feature was introduced in EOS 4.33.0F. + + Default value: `True` + """ + flow_tracking: FlowTracking + """ + Configures flow-tracking on the HA interfaces. Overrides `fabric_flow_tracking.wan_ha_links` + setting. + + Subclass of AvdModel. + """ + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, + *, + enabled: bool | None | UndefinedType = Undefined, + ipsec: bool | UndefinedType = Undefined, + mtu: int | UndefinedType = Undefined, + ha_interfaces: HaInterfaces | UndefinedType = Undefined, + ha_ipv4_pool: str | None | UndefinedType = Undefined, + max_ha_interfaces: int | None | UndefinedType = Undefined, + port_channel_id: int | None | UndefinedType = Undefined, + use_port_channel_for_direct_ha: bool | UndefinedType = Undefined, + flow_tracking: FlowTracking | UndefinedType = Undefined, + _custom_data: dict[str, Any] | UndefinedType = Undefined, + ) -> None: + """ + WanHa. + + + Subclass of AvdModel. + + Args: + enabled: Enable / Disable auto CV-Pathfinder HA, when two nodes are defined in the same node_group. + ipsec: Enable / Disable IPsec over HA path-group when HA is enabled. + mtu: Set MTU on WAN HA interfaces. + ha_interfaces: + Local WAN HA interfaces + Overwrite the default behavior which is to pick all the `uplink_interfaces`. + Can be used to filter uplink interfaces when there are multiple uplinks. + Limitations: + Either all + interfaces must be uplinks or all interfaces must not be uplinks. + Only one interface is supported + for non uplinks. + + Subclass of AvdList with `str` items. + ha_ipv4_pool: + IP address pool used for WAN HA connectivity. + IP is derived from the node ID. + Not used for uplink + interfaces. + max_ha_interfaces: + Number of parallel links towards HA switches. + Can be used to reserve IP addresses for future + parallel HA links. + port_channel_id: Port-channel ID to use for direct HA. + use_port_channel_for_direct_ha: + Enable or disable using a port-channel interface for direct HA when there is only one interface. + This feature was introduced in EOS 4.33.0F. + flow_tracking: + Configures flow-tracking on the HA interfaces. Overrides `fabric_flow_tracking.wan_ha_links` + setting. + + Subclass of AvdModel. + _custom_data: _custom_data + + """ + + class L3InterfacesItem(AvdModel): + """Subclass of AvdModel.""" + + class Bgp(AvdModel): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = { + "peer_as": {"type": str}, + "ipv4_prefix_list_in": {"type": str}, + "ipv4_prefix_list_out": {"type": str}, + "_custom_data": {"type": dict}, + } + peer_as: str + """ + BGP AS <1-4294967295> or AS number in asdot notation "<1-65535>.<0-65535>". + For asdot notation in + YAML inputs, the value must be put in quotes, to prevent it from being interpreted as a float + number. + """ + ipv4_prefix_list_in: str | None + """ + Prefix List Name. Accept routes for only these prefixes from the peer. + Required for wan interfaces. + """ + ipv4_prefix_list_out: str | None + """ + Prefix List Name. Advertise routes for only these prefixes. + If not specified, nothing would be + advertised. + """ + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, + *, + peer_as: str | UndefinedType = Undefined, + ipv4_prefix_list_in: str | None | UndefinedType = Undefined, + ipv4_prefix_list_out: str | None | UndefinedType = Undefined, + _custom_data: dict[str, Any] | UndefinedType = Undefined, + ) -> None: + """ + Bgp. + + + Subclass of AvdModel. + + Args: + peer_as: + BGP AS <1-4294967295> or AS number in asdot notation "<1-65535>.<0-65535>". + For asdot notation in + YAML inputs, the value must be put in quotes, to prevent it from being interpreted as a float + number. + ipv4_prefix_list_in: + Prefix List Name. Accept routes for only these prefixes from the peer. + Required for wan interfaces. + ipv4_prefix_list_out: + Prefix List Name. Advertise routes for only these prefixes. + If not specified, nothing would be + advertised. + _custom_data: _custom_data + + """ + + class StaticRoutesItem(AvdModel): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = {"prefix": {"type": str}, "_custom_data": {"type": dict}} + prefix: str + """IPv4_network/Mask.""" + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, *, prefix: str | UndefinedType = Undefined, _custom_data: dict[str, Any] | UndefinedType = Undefined + ) -> None: + """ + StaticRoutesItem. + + + Subclass of AvdModel. + + Args: + prefix: IPv4_network/Mask. + _custom_data: _custom_data + + """ + + class StaticRoutes(AvdList[StaticRoutesItem]): + """Subclass of AvdList with `StaticRoutesItem` items.""" + + StaticRoutes._item_type = StaticRoutesItem + + class CvPathfinderInternetExit(AvdModel): + """Subclass of AvdModel.""" + + class PoliciesItem(AvdModel): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = {"name": {"type": str}, "tunnel_interface_numbers": {"type": str}, "_custom_data": {"type": dict}} + name: str + """Internet-exit policy name.""" + tunnel_interface_numbers: str | None + """ + Number range to use for Tunnel interfaces to an internet-exit service provider using this local + interface. + Examples: '1-3' or '100,200,300' + """ + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, + *, + name: str | UndefinedType = Undefined, + tunnel_interface_numbers: str | None | UndefinedType = Undefined, + _custom_data: dict[str, Any] | UndefinedType = Undefined, + ) -> None: + """ + PoliciesItem. + + + Subclass of AvdModel. + + Args: + name: Internet-exit policy name. + tunnel_interface_numbers: + Number range to use for Tunnel interfaces to an internet-exit service provider using this local + interface. + Examples: '1-3' or '100,200,300' + _custom_data: _custom_data + + """ + + class Policies(AvdIndexedList[str, PoliciesItem]): + """Subclass of AvdIndexedList with `PoliciesItem` items. Primary key is `name` (`str`).""" + + _primary_key: ClassVar[str] = "name" + + Policies._item_type = PoliciesItem + + _fields: ClassVar[dict] = {"policies": {"type": Policies}, "_custom_data": {"type": dict}} + policies: Policies + """ + List of Internet-exit policies using this interface as exit. + + Subclass of AvdIndexedList with + `PoliciesItem` items. Primary key is `name` (`str`). + """ + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, *, policies: Policies | UndefinedType = Undefined, _custom_data: dict[str, Any] | UndefinedType = Undefined + ) -> None: + """ + CvPathfinderInternetExit. + + + Subclass of AvdModel. + + Args: + policies: + List of Internet-exit policies using this interface as exit. + + Subclass of AvdIndexedList with + `PoliciesItem` items. Primary key is `name` (`str`). + _custom_data: _custom_data + + """ + + class FlowTracking(AvdModel): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = {"enabled": {"type": bool}, "name": {"type": str}, "_custom_data": {"type": dict}} + enabled: bool | None + name: str | None + """Flow tracker name as defined in flow_tracking_settings.""" + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, + *, + enabled: bool | None | UndefinedType = Undefined, + name: str | None | UndefinedType = Undefined, + _custom_data: dict[str, Any] | UndefinedType = Undefined, + ) -> None: + """ + FlowTracking. + + + Subclass of AvdModel. + + Args: + enabled: enabled + name: Flow tracker name as defined in flow_tracking_settings. + _custom_data: _custom_data + + """ + + class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = { + "profile": {"type": str}, + "name": {"type": str}, + "description": {"type": str}, + "ip_address": {"type": str}, + "dhcp_ip": {"type": str}, + "public_ip": {"type": str}, + "encapsulation_dot1q_vlan": {"type": int}, + "dhcp_accept_default_route": {"type": bool, "default": True}, + "enabled": {"type": bool, "default": True}, + "speed": {"type": str}, + "peer": {"type": str}, + "peer_interface": {"type": str}, + "peer_ip": {"type": str}, + "bgp": {"type": Bgp}, + "ipv4_acl_in": {"type": str}, + "ipv4_acl_out": {"type": str}, + "static_routes": {"type": StaticRoutes}, + "qos_profile": {"type": str}, + "wan_carrier": {"type": str}, + "wan_circuit_id": {"type": str}, + "connected_to_pathfinder": {"type": bool, "default": True}, + "cv_pathfinder_internet_exit": {"type": CvPathfinderInternetExit}, + "raw_eos_cli": {"type": str}, "flow_tracking": {"type": FlowTracking}, + "structured_config": {"type": StructuredConfig}, "_custom_data": {"type": dict}, } - enabled: bool | None - """Enable / Disable auto CV-Pathfinder HA, when two nodes are defined in the same node_group.""" - ipsec: bool + profile: str | None + """L3 interface profile name. Profile defined under `l3_interface_profiles`.""" + name: str """ - Enable / Disable IPsec over HA path-group when HA is enabled. + Ethernet interface name like 'Ethernet2' or subinterface name like 'Ethernet2.42'. + For a + subinterface, the parent physical interface is automatically created. + """ + description: str | None + """ + Interface description. + If not set a default description will be configured with '[[ + ]]'. + """ + ip_address: str | None + """Node IPv4 address/Mask or 'dhcp'.""" + dhcp_ip: str | None + """ + When the `ip_address` is `dhcp`, this optional field allows to indicate the expected + IPv4 address + (without mask) to be allocated on the interface if known. + This is not rendered in the configuration + but can be used for substitution of 'interface_ip' in the Access-list + set under `ipv4_acl_in` and + `ipv4_acl_out`. + """ + public_ip: str | None + """ + Node IPv4 address (no mask). + + This is used to get the public IP (if known) when the device is behind + NAT. + This is only used for `wan_rr` routers (AutoVPN RRs and Pathfinders) to determine the Public IP + with the following preference: + `wan_route_servers.path_groups.interfaces.ip_address` + -> + `l3_interfaces.public_ip` + -> `l3_interfaces.ip_address` + + The determined Public IP is used + by WAN routers when peering with this interface. + """ + encapsulation_dot1q_vlan: int | None + """ + For subinterfaces the dot1q vlan is derived from the interface name by default, but can also be + specified. + """ + dhcp_accept_default_route: bool + """ + Accept a default route from DHCP if `ip_address` is set to `dhcp`. Default value: `True` """ - mtu: int + enabled: bool """ - Set MTU on WAN HA interfaces. + Enable or Shutdown the interface. - Default value: `9194` + Default value: `True` """ - ha_interfaces: HaInterfaces + speed: str | None """ - Local WAN HA interfaces - Overwrite the default behavior which is to pick all the `uplink_interfaces`. - Can be used to filter uplink interfaces when there are multiple uplinks. - Limitations: - Either all - interfaces must be uplinks or all interfaces must not be uplinks. - Only one interface is supported - for non uplinks. + Speed should be set in the format `` or `forced ` or `auto + `. + """ + peer: str | None + """The peer device name. Used for description and documentation.""" + peer_interface: str | None + """The peer device interface. Used for description and documentation.""" + peer_ip: str | None + """ + The peer device IPv4 address (no mask). Used as default route gateway if `set_default_route` is true + and `ip` is an IP address. + """ + bgp: Bgp + """ + Enforce IPv4 BGP peering for the peer - Subclass of AvdList with `str` items. + Subclass of AvdModel. """ - ha_ipv4_pool: str | None + ipv4_acl_in: str | None """ - IP address pool used for WAN HA connectivity. - IP is derived from the node ID. - Not used for uplink - interfaces. + Name of the IPv4 access-list to be assigned in the ingress direction. + The access-list must be + defined under `ipv4_acls` and supports field substitution for "interface_ip" and "peer_ip". + Required + for all WAN interfaces (`wan_carrier` is set) unless the carrier is marked as 'trusted' under + `wan_carriers`. """ - max_ha_interfaces: int | None + ipv4_acl_out: str | None """ - Number of parallel links towards HA switches. - Can be used to reserve IP addresses for future - parallel HA links. + Name of the IPv4 Access-list to be assigned in the egress direction. + The access-list must be defined + under `ipv4_acls` and supports field substitution for "interface_ip" and "peer_ip". """ - port_channel_id: int | None - """Port-channel ID to use for direct HA.""" - use_port_channel_for_direct_ha: bool + static_routes: StaticRoutes """ - Enable or disable using a port-channel interface for direct HA when there is only one interface. - This feature was introduced in EOS 4.33.0F. + Configure IPv4 static routes pointing to `peer_ip`. + + Subclass of AvdList with `StaticRoutesItem` + items. + """ + qos_profile: str | None + """QOS service profile.""" + wan_carrier: str | None + """ + The WAN carrier this interface is connected to. + This is used to infer the path-groups in which this + interface should be configured. + Unless the carrier is marked as 'trusted' under `wan_carriers`, + `ipv4_acl_in` is also required on all WAN interfaces. + """ + wan_circuit_id: str | None + """ + The WAN circuit ID for this interface. + This is not rendered in the configuration but used for WAN + designs. + """ + connected_to_pathfinder: bool + """ + For a WAN interface (`wan_carrier` is set), allow to disable the static tunnel towards Pathfinders. Default value: `True` """ + cv_pathfinder_internet_exit: CvPathfinderInternetExit + """ + PREVIEW: This key is in preview mode + + Subclass of AvdModel. + """ + raw_eos_cli: str | None + """EOS CLI rendered directly on the interface in the final EOS configuration.""" flow_tracking: FlowTracking """ - Configures flow-tracking on the HA interfaces. Overrides `fabric_flow_tracking.wan_ha_links` - setting. + Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_interfaces` setting. + Subclass of AvdModel. + """ + structured_config: StructuredConfig + """ + Custom structured config for the Ethernet interface. Subclass of AvdModel. """ @@ -44765,63 +48452,225 @@ def __init__( def __init__( self, *, - enabled: bool | None | UndefinedType = Undefined, - ipsec: bool | UndefinedType = Undefined, - mtu: int | UndefinedType = Undefined, - ha_interfaces: HaInterfaces | UndefinedType = Undefined, - ha_ipv4_pool: str | None | UndefinedType = Undefined, - max_ha_interfaces: int | None | UndefinedType = Undefined, - port_channel_id: int | None | UndefinedType = Undefined, - use_port_channel_for_direct_ha: bool | UndefinedType = Undefined, + profile: str | None | UndefinedType = Undefined, + name: str | UndefinedType = Undefined, + description: str | None | UndefinedType = Undefined, + ip_address: str | None | UndefinedType = Undefined, + dhcp_ip: str | None | UndefinedType = Undefined, + public_ip: str | None | UndefinedType = Undefined, + encapsulation_dot1q_vlan: int | None | UndefinedType = Undefined, + dhcp_accept_default_route: bool | UndefinedType = Undefined, + enabled: bool | UndefinedType = Undefined, + speed: str | None | UndefinedType = Undefined, + peer: str | None | UndefinedType = Undefined, + peer_interface: str | None | UndefinedType = Undefined, + peer_ip: str | None | UndefinedType = Undefined, + bgp: Bgp | UndefinedType = Undefined, + ipv4_acl_in: str | None | UndefinedType = Undefined, + ipv4_acl_out: str | None | UndefinedType = Undefined, + static_routes: StaticRoutes | UndefinedType = Undefined, + qos_profile: str | None | UndefinedType = Undefined, + wan_carrier: str | None | UndefinedType = Undefined, + wan_circuit_id: str | None | UndefinedType = Undefined, + connected_to_pathfinder: bool | UndefinedType = Undefined, + cv_pathfinder_internet_exit: CvPathfinderInternetExit | UndefinedType = Undefined, + raw_eos_cli: str | None | UndefinedType = Undefined, flow_tracking: FlowTracking | UndefinedType = Undefined, + structured_config: StructuredConfig | UndefinedType = Undefined, _custom_data: dict[str, Any] | UndefinedType = Undefined, ) -> None: """ - WanHa. + L3InterfacesItem. Subclass of AvdModel. Args: - enabled: Enable / Disable auto CV-Pathfinder HA, when two nodes are defined in the same node_group. - ipsec: Enable / Disable IPsec over HA path-group when HA is enabled. - mtu: Set MTU on WAN HA interfaces. - ha_interfaces: - Local WAN HA interfaces - Overwrite the default behavior which is to pick all the `uplink_interfaces`. - Can be used to filter uplink interfaces when there are multiple uplinks. - Limitations: - Either all - interfaces must be uplinks or all interfaces must not be uplinks. - Only one interface is supported - for non uplinks. + profile: L3 interface profile name. Profile defined under `l3_interface_profiles`. + name: + Ethernet interface name like 'Ethernet2' or subinterface name like 'Ethernet2.42'. + For a + subinterface, the parent physical interface is automatically created. + description: + Interface description. + If not set a default description will be configured with '[[ + ]]'. + ip_address: Node IPv4 address/Mask or 'dhcp'. + dhcp_ip: + When the `ip_address` is `dhcp`, this optional field allows to indicate the expected + IPv4 address + (without mask) to be allocated on the interface if known. + This is not rendered in the configuration + but can be used for substitution of 'interface_ip' in the Access-list + set under `ipv4_acl_in` and + `ipv4_acl_out`. + public_ip: + Node IPv4 address (no mask). - Subclass of AvdList with `str` items. - ha_ipv4_pool: - IP address pool used for WAN HA connectivity. - IP is derived from the node ID. - Not used for uplink - interfaces. - max_ha_interfaces: - Number of parallel links towards HA switches. - Can be used to reserve IP addresses for future - parallel HA links. - port_channel_id: Port-channel ID to use for direct HA. - use_port_channel_for_direct_ha: - Enable or disable using a port-channel interface for direct HA when there is only one interface. - This feature was introduced in EOS 4.33.0F. + This is used to get the public IP (if known) when the device is behind + NAT. + This is only used for `wan_rr` routers (AutoVPN RRs and Pathfinders) to determine the Public IP + with the following preference: + `wan_route_servers.path_groups.interfaces.ip_address` + -> + `l3_interfaces.public_ip` + -> `l3_interfaces.ip_address` + + The determined Public IP is used + by WAN routers when peering with this interface. + encapsulation_dot1q_vlan: + For subinterfaces the dot1q vlan is derived from the interface name by default, but can also be + specified. + dhcp_accept_default_route: Accept a default route from DHCP if `ip_address` is set to `dhcp`. + enabled: Enable or Shutdown the interface. + speed: + Speed should be set in the format `` or `forced ` or `auto + `. + peer: The peer device name. Used for description and documentation. + peer_interface: The peer device interface. Used for description and documentation. + peer_ip: + The peer device IPv4 address (no mask). Used as default route gateway if `set_default_route` is true + and `ip` is an IP address. + bgp: + Enforce IPv4 BGP peering for the peer + + Subclass of AvdModel. + ipv4_acl_in: + Name of the IPv4 access-list to be assigned in the ingress direction. + The access-list must be + defined under `ipv4_acls` and supports field substitution for "interface_ip" and "peer_ip". + Required + for all WAN interfaces (`wan_carrier` is set) unless the carrier is marked as 'trusted' under + `wan_carriers`. + ipv4_acl_out: + Name of the IPv4 Access-list to be assigned in the egress direction. + The access-list must be defined + under `ipv4_acls` and supports field substitution for "interface_ip" and "peer_ip". + static_routes: + Configure IPv4 static routes pointing to `peer_ip`. + + Subclass of AvdList with `StaticRoutesItem` + items. + qos_profile: QOS service profile. + wan_carrier: + The WAN carrier this interface is connected to. + This is used to infer the path-groups in which this + interface should be configured. + Unless the carrier is marked as 'trusted' under `wan_carriers`, + `ipv4_acl_in` is also required on all WAN interfaces. + wan_circuit_id: + The WAN circuit ID for this interface. + This is not rendered in the configuration but used for WAN + designs. + connected_to_pathfinder: For a WAN interface (`wan_carrier` is set), allow to disable the static tunnel towards Pathfinders. + cv_pathfinder_internet_exit: + PREVIEW: This key is in preview mode + + Subclass of AvdModel. + raw_eos_cli: EOS CLI rendered directly on the interface in the final EOS configuration. flow_tracking: - Configures flow-tracking on the HA interfaces. Overrides `fabric_flow_tracking.wan_ha_links` - setting. + Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_interfaces` setting. + Subclass of AvdModel. + structured_config: + Custom structured config for the Ethernet interface. Subclass of AvdModel. _custom_data: _custom_data """ - class L3InterfacesItem(AvdModel): + class L3Interfaces(AvdIndexedList[str, L3InterfacesItem]): + """Subclass of AvdIndexedList with `L3InterfacesItem` items. Primary key is `name` (`str`).""" + + _primary_key: ClassVar[str] = "name" + + L3Interfaces._item_type = L3InterfacesItem + + class L3PortChannelsItem(AvdModel): """Subclass of AvdModel.""" + class MemberInterfacesItem(AvdModel): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = { + "name": {"type": str}, + "description": {"type": str}, + "peer": {"type": str}, + "peer_interface": {"type": str}, + "speed": {"type": str}, + "_custom_data": {"type": dict}, + } + name: str + """ + Ethernet interface name like 'Ethernet2'. + Member interface cannot be subinterface. + """ + description: str | None + """ + Interface description for this member. + If not set a default description will be configured with + '[[ ]]'. + """ + peer: str | None + """ + The peer device name. Used for description and documentation. + If not set, this inherits the peer + setting on the port-channel interface. + """ + peer_interface: str | None + """The peer device interface. Used for description and documentation.""" + speed: str | None + """ + Speed should be set in the format `` or `forced ` or `auto + `. + """ + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, + *, + name: str | UndefinedType = Undefined, + description: str | None | UndefinedType = Undefined, + peer: str | None | UndefinedType = Undefined, + peer_interface: str | None | UndefinedType = Undefined, + speed: str | None | UndefinedType = Undefined, + _custom_data: dict[str, Any] | UndefinedType = Undefined, + ) -> None: + """ + MemberInterfacesItem. + + + Subclass of AvdModel. + + Args: + name: + Ethernet interface name like 'Ethernet2'. + Member interface cannot be subinterface. + description: + Interface description for this member. + If not set a default description will be configured with + '[[ ]]'. + peer: + The peer device name. Used for description and documentation. + If not set, this inherits the peer + setting on the port-channel interface. + peer_interface: The peer device interface. Used for description and documentation. + speed: + Speed should be set in the format `` or `forced ` or `auto + `. + _custom_data: _custom_data + + """ + + class MemberInterfaces(AvdIndexedList[str, MemberInterfacesItem]): + """Subclass of AvdIndexedList with `MemberInterfacesItem` items. Primary key is `name` (`str`).""" + + _primary_key: ClassVar[str] = "name" + + MemberInterfaces._item_type = MemberInterfacesItem + class Bgp(AvdModel): """Subclass of AvdModel.""" @@ -44909,8 +48758,10 @@ def __init__( """ - class StaticRoutes(AvdList[StaticRoutesItem]): - """Subclass of AvdList with `StaticRoutesItem` items.""" + class StaticRoutes(AvdIndexedList[str, StaticRoutesItem]): + """Subclass of AvdIndexedList with `StaticRoutesItem` items. Primary key is `prefix` (`str`).""" + + _primary_key: ClassVar[str] = "prefix" StaticRoutes._item_type = StaticRoutesItem @@ -45025,22 +48876,22 @@ def __init__( """ - class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): + class StructuredConfig(EosCliConfigGen.PortChannelInterfacesItem): """Subclass of AvdModel.""" _fields: ClassVar[dict] = { - "profile": {"type": str}, "name": {"type": str}, "description": {"type": str}, + "mode": {"type": str, "default": "active"}, + "member_interfaces": {"type": MemberInterfaces}, "ip_address": {"type": str}, "dhcp_ip": {"type": str}, "public_ip": {"type": str}, "encapsulation_dot1q_vlan": {"type": int}, "dhcp_accept_default_route": {"type": bool, "default": True}, "enabled": {"type": bool, "default": True}, - "speed": {"type": str}, "peer": {"type": str}, - "peer_interface": {"type": str}, + "peer_port_channel": {"type": str}, "peer_ip": {"type": str}, "bgp": {"type": Bgp}, "ipv4_acl_in": {"type": str}, @@ -45056,19 +48907,32 @@ class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): "structured_config": {"type": StructuredConfig}, "_custom_data": {"type": dict}, } - profile: str | None - """L3 interface profile name. Profile defined under `l3_interface_profiles`.""" name: str """ - Ethernet interface name like 'Ethernet2' or subinterface name like 'Ethernet2.42'. + Port-Channel interface name like 'Port-Channel2' or subinterface name like 'Port-Channel2.42'. For a - subinterface, the parent physical interface is automatically created. + Port-Channel subinterface, the parent Port-Channel interface must be defined as well. """ description: str | None """ Interface description. If not set a default description will be configured with '[[ - ]]'. + ]]'. + """ + mode: Literal["active", "passive", "on"] + """ + Port-Channel mode. + Should not be set on Port-Channel subinterfaces. + + Default value: `"active"` + """ + member_interfaces: MemberInterfaces + """ + Port-Channel member interfaces. + Should not be set on Port-Channel subinterfaces. + + Subclass of + AvdIndexedList with `MemberInterfacesItem` items. Primary key is `name` (`str`). """ ip_address: str | None """Node IPv4 address/Mask or 'dhcp'.""" @@ -45092,11 +48956,11 @@ class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): with the following preference: `wan_route_servers.path_groups.interfaces.ip_address` -> - `l3_interfaces.public_ip` - -> `l3_interfaces.ip_address` + `l3_port_channels.public_ip` + -> `l3_port_channels.ip_address` - The determined Public IP is used - by WAN routers when peering with this interface. + The determined Public IP is + used by WAN routers when peering with this interface. """ encapsulation_dot1q_vlan: int | None """ @@ -45115,15 +48979,10 @@ class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): Default value: `True` """ - speed: str | None - """ - Speed should be set in the format `` or `forced ` or `auto - `. - """ peer: str | None """The peer device name. Used for description and documentation.""" - peer_interface: str | None - """The peer device interface. Used for description and documentation.""" + peer_port_channel: str | None + """The peer device port-channel interface. Used for description and documentation.""" peer_ip: str | None """ The peer device IPv4 address (no mask). Used as default route gateway if `set_default_route` is true @@ -45154,8 +49013,8 @@ class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): """ Configure IPv4 static routes pointing to `peer_ip`. - Subclass of AvdList with `StaticRoutesItem` - items. + Subclass of AvdIndexedList with + `StaticRoutesItem` items. Primary key is `prefix` (`str`). """ qos_profile: str | None """QOS service profile.""" @@ -45186,15 +49045,17 @@ class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): Subclass of AvdModel. """ raw_eos_cli: str | None - """EOS CLI rendered directly on the interface in the final EOS configuration.""" + """EOS CLI rendered directly on the Port-Channel interface in the final EOS configuration.""" flow_tracking: FlowTracking """ - Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_interfaces` setting. + Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_port_channels` + setting. + Subclass of AvdModel. """ structured_config: StructuredConfig """ - Custom structured config for the Ethernet interface. + Custom structured config for the Port-Channel interface. Subclass of AvdModel. """ @@ -45205,18 +49066,18 @@ class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): def __init__( self, *, - profile: str | None | UndefinedType = Undefined, name: str | UndefinedType = Undefined, description: str | None | UndefinedType = Undefined, + mode: Literal["active", "passive", "on"] | UndefinedType = Undefined, + member_interfaces: MemberInterfaces | UndefinedType = Undefined, ip_address: str | None | UndefinedType = Undefined, dhcp_ip: str | None | UndefinedType = Undefined, public_ip: str | None | UndefinedType = Undefined, encapsulation_dot1q_vlan: int | None | UndefinedType = Undefined, dhcp_accept_default_route: bool | UndefinedType = Undefined, enabled: bool | UndefinedType = Undefined, - speed: str | None | UndefinedType = Undefined, peer: str | None | UndefinedType = Undefined, - peer_interface: str | None | UndefinedType = Undefined, + peer_port_channel: str | None | UndefinedType = Undefined, peer_ip: str | None | UndefinedType = Undefined, bgp: Bgp | UndefinedType = Undefined, ipv4_acl_in: str | None | UndefinedType = Undefined, @@ -45233,21 +49094,29 @@ def __init__( _custom_data: dict[str, Any] | UndefinedType = Undefined, ) -> None: """ - L3InterfacesItem. + L3PortChannelsItem. Subclass of AvdModel. Args: - profile: L3 interface profile name. Profile defined under `l3_interface_profiles`. name: - Ethernet interface name like 'Ethernet2' or subinterface name like 'Ethernet2.42'. + Port-Channel interface name like 'Port-Channel2' or subinterface name like 'Port-Channel2.42'. For a - subinterface, the parent physical interface is automatically created. + Port-Channel subinterface, the parent Port-Channel interface must be defined as well. description: Interface description. If not set a default description will be configured with '[[ - ]]'. + ]]'. + mode: + Port-Channel mode. + Should not be set on Port-Channel subinterfaces. + member_interfaces: + Port-Channel member interfaces. + Should not be set on Port-Channel subinterfaces. + + Subclass of + AvdIndexedList with `MemberInterfacesItem` items. Primary key is `name` (`str`). ip_address: Node IPv4 address/Mask or 'dhcp'. dhcp_ip: When the `ip_address` is `dhcp`, this optional field allows to indicate the expected @@ -45266,21 +49135,18 @@ def __init__( with the following preference: `wan_route_servers.path_groups.interfaces.ip_address` -> - `l3_interfaces.public_ip` - -> `l3_interfaces.ip_address` + `l3_port_channels.public_ip` + -> `l3_port_channels.ip_address` - The determined Public IP is used - by WAN routers when peering with this interface. + The determined Public IP is + used by WAN routers when peering with this interface. encapsulation_dot1q_vlan: For subinterfaces the dot1q vlan is derived from the interface name by default, but can also be specified. dhcp_accept_default_route: Accept a default route from DHCP if `ip_address` is set to `dhcp`. enabled: Enable or Shutdown the interface. - speed: - Speed should be set in the format `` or `forced ` or `auto - `. peer: The peer device name. Used for description and documentation. - peer_interface: The peer device interface. Used for description and documentation. + peer_port_channel: The peer device port-channel interface. Used for description and documentation. peer_ip: The peer device IPv4 address (no mask). Used as default route gateway if `set_default_route` is true and `ip` is an IP address. @@ -45302,8 +49168,8 @@ def __init__( static_routes: Configure IPv4 static routes pointing to `peer_ip`. - Subclass of AvdList with `StaticRoutesItem` - items. + Subclass of AvdIndexedList with + `StaticRoutesItem` items. Primary key is `prefix` (`str`). qos_profile: QOS service profile. wan_carrier: The WAN carrier this interface is connected to. @@ -45320,24 +49186,26 @@ def __init__( PREVIEW: This key is in preview mode Subclass of AvdModel. - raw_eos_cli: EOS CLI rendered directly on the interface in the final EOS configuration. + raw_eos_cli: EOS CLI rendered directly on the Port-Channel interface in the final EOS configuration. flow_tracking: - Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_interfaces` setting. + Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_port_channels` + setting. + Subclass of AvdModel. structured_config: - Custom structured config for the Ethernet interface. + Custom structured config for the Port-Channel interface. Subclass of AvdModel. _custom_data: _custom_data """ - class L3Interfaces(AvdIndexedList[str, L3InterfacesItem]): - """Subclass of AvdIndexedList with `L3InterfacesItem` items. Primary key is `name` (`str`).""" + class L3PortChannels(AvdIndexedList[str, L3PortChannelsItem]): + """Subclass of AvdIndexedList with `L3PortChannelsItem` items. Primary key is `name` (`str`).""" _primary_key: ClassVar[str] = "name" - L3Interfaces._item_type = L3InterfacesItem + L3PortChannels._item_type = L3PortChannelsItem _fields: ClassVar[dict] = { "name": {"type": str}, @@ -45445,6 +49313,7 @@ class L3Interfaces(AvdIndexedList[str, L3InterfacesItem]): "wan_ha": {"type": WanHa}, "dps_mss_ipv4": {"type": str, "default": "auto"}, "l3_interfaces": {"type": L3Interfaces}, + "l3_port_channels": {"type": L3PortChannels}, "data_plane_cpu_allocation_max": {"type": int}, "flow_tracker_type": {"type": str}, "_custom_data": {"type": dict}, @@ -46217,6 +50086,15 @@ class L3Interfaces(AvdIndexedList[str, L3InterfacesItem]): Subclass of AvdIndexedList with `L3InterfacesItem` items. Primary key is `name` (`str`). """ + l3_port_channels: L3PortChannels + """ + L3 Port-Channel interfaces to configure on the node. + Used to define the node for WAN interfaces when + `wan_carrier` is set. + + Subclass of AvdIndexedList with `L3PortChannelsItem` items. Primary key is + `name` (`str`). + """ data_plane_cpu_allocation_max: int | None """ Set the maximum number of CPU used for the data plane. @@ -46342,6 +50220,7 @@ def __init__( wan_ha: WanHa | UndefinedType = Undefined, dps_mss_ipv4: str | UndefinedType = Undefined, l3_interfaces: L3Interfaces | UndefinedType = Undefined, + l3_port_channels: L3PortChannels | UndefinedType = Undefined, data_plane_cpu_allocation_max: int | None | UndefinedType = Undefined, flow_tracker_type: Literal["sampled", "hardware"] | None | UndefinedType = Undefined, _custom_data: dict[str, Any] | UndefinedType = Undefined, @@ -46889,6 +50768,13 @@ def __init__( Subclass of AvdIndexedList with `L3InterfacesItem` items. Primary key is `name` (`str`). + l3_port_channels: + L3 Port-Channel interfaces to configure on the node. + Used to define the node for WAN interfaces when + `wan_carrier` is set. + + Subclass of AvdIndexedList with `L3PortChannelsItem` items. Primary key is + `name` (`str`). data_plane_cpu_allocation_max: Set the maximum number of CPU used for the data plane. This setting is useful on virtual Route @@ -48132,70 +52018,510 @@ def __init__( """ _fields: ClassVar[dict] = { - "enabled": {"type": bool}, - "ipsec": {"type": bool, "default": True}, - "mtu": {"type": int, "default": 9194}, - "ha_interfaces": {"type": HaInterfaces}, - "ha_ipv4_pool": {"type": str}, - "max_ha_interfaces": {"type": int}, - "port_channel_id": {"type": int}, - "use_port_channel_for_direct_ha": {"type": bool, "default": True}, + "enabled": {"type": bool}, + "ipsec": {"type": bool, "default": True}, + "mtu": {"type": int, "default": 9194}, + "ha_interfaces": {"type": HaInterfaces}, + "ha_ipv4_pool": {"type": str}, + "max_ha_interfaces": {"type": int}, + "port_channel_id": {"type": int}, + "use_port_channel_for_direct_ha": {"type": bool, "default": True}, + "flow_tracking": {"type": FlowTracking}, + "_custom_data": {"type": dict}, + } + enabled: bool | None + """Enable / Disable auto CV-Pathfinder HA, when two nodes are defined in the same node_group.""" + ipsec: bool + """ + Enable / Disable IPsec over HA path-group when HA is enabled. + + Default value: `True` + """ + mtu: int + """ + Set MTU on WAN HA interfaces. + + Default value: `9194` + """ + ha_interfaces: HaInterfaces + """ + Local WAN HA interfaces + Overwrite the default behavior which is to pick all the `uplink_interfaces`. + Can be used to filter uplink interfaces when there are multiple uplinks. + Limitations: + Either all + interfaces must be uplinks or all interfaces must not be uplinks. + Only one interface is supported + for non uplinks. + + Subclass of AvdList with `str` items. + """ + ha_ipv4_pool: str | None + """ + IP address pool used for WAN HA connectivity. + IP is derived from the node ID. + Not used for uplink + interfaces. + """ + max_ha_interfaces: int | None + """ + Number of parallel links towards HA switches. + Can be used to reserve IP addresses for future + parallel HA links. + """ + port_channel_id: int | None + """Port-channel ID to use for direct HA.""" + use_port_channel_for_direct_ha: bool + """ + Enable or disable using a port-channel interface for direct HA when there is only one interface. + This feature was introduced in EOS 4.33.0F. + + Default value: `True` + """ + flow_tracking: FlowTracking + """ + Configures flow-tracking on the HA interfaces. Overrides `fabric_flow_tracking.wan_ha_links` + setting. + + Subclass of AvdModel. + """ + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, + *, + enabled: bool | None | UndefinedType = Undefined, + ipsec: bool | UndefinedType = Undefined, + mtu: int | UndefinedType = Undefined, + ha_interfaces: HaInterfaces | UndefinedType = Undefined, + ha_ipv4_pool: str | None | UndefinedType = Undefined, + max_ha_interfaces: int | None | UndefinedType = Undefined, + port_channel_id: int | None | UndefinedType = Undefined, + use_port_channel_for_direct_ha: bool | UndefinedType = Undefined, + flow_tracking: FlowTracking | UndefinedType = Undefined, + _custom_data: dict[str, Any] | UndefinedType = Undefined, + ) -> None: + """ + WanHa. + + + Subclass of AvdModel. + + Args: + enabled: Enable / Disable auto CV-Pathfinder HA, when two nodes are defined in the same node_group. + ipsec: Enable / Disable IPsec over HA path-group when HA is enabled. + mtu: Set MTU on WAN HA interfaces. + ha_interfaces: + Local WAN HA interfaces + Overwrite the default behavior which is to pick all the `uplink_interfaces`. + Can be used to filter uplink interfaces when there are multiple uplinks. + Limitations: + Either all + interfaces must be uplinks or all interfaces must not be uplinks. + Only one interface is supported + for non uplinks. + + Subclass of AvdList with `str` items. + ha_ipv4_pool: + IP address pool used for WAN HA connectivity. + IP is derived from the node ID. + Not used for uplink + interfaces. + max_ha_interfaces: + Number of parallel links towards HA switches. + Can be used to reserve IP addresses for future + parallel HA links. + port_channel_id: Port-channel ID to use for direct HA. + use_port_channel_for_direct_ha: + Enable or disable using a port-channel interface for direct HA when there is only one interface. + This feature was introduced in EOS 4.33.0F. + flow_tracking: + Configures flow-tracking on the HA interfaces. Overrides `fabric_flow_tracking.wan_ha_links` + setting. + + Subclass of AvdModel. + _custom_data: _custom_data + + """ + + class L3InterfacesItem(AvdModel): + """Subclass of AvdModel.""" + + class Bgp(AvdModel): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = { + "peer_as": {"type": str}, + "ipv4_prefix_list_in": {"type": str}, + "ipv4_prefix_list_out": {"type": str}, + "_custom_data": {"type": dict}, + } + peer_as: str + """ + BGP AS <1-4294967295> or AS number in asdot notation "<1-65535>.<0-65535>". + For asdot notation in + YAML inputs, the value must be put in quotes, to prevent it from being interpreted as a float + number. + """ + ipv4_prefix_list_in: str | None + """ + Prefix List Name. Accept routes for only these prefixes from the peer. + Required for wan interfaces. + """ + ipv4_prefix_list_out: str | None + """ + Prefix List Name. Advertise routes for only these prefixes. + If not specified, nothing would be + advertised. + """ + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, + *, + peer_as: str | UndefinedType = Undefined, + ipv4_prefix_list_in: str | None | UndefinedType = Undefined, + ipv4_prefix_list_out: str | None | UndefinedType = Undefined, + _custom_data: dict[str, Any] | UndefinedType = Undefined, + ) -> None: + """ + Bgp. + + + Subclass of AvdModel. + + Args: + peer_as: + BGP AS <1-4294967295> or AS number in asdot notation "<1-65535>.<0-65535>". + For asdot notation in + YAML inputs, the value must be put in quotes, to prevent it from being interpreted as a float + number. + ipv4_prefix_list_in: + Prefix List Name. Accept routes for only these prefixes from the peer. + Required for wan interfaces. + ipv4_prefix_list_out: + Prefix List Name. Advertise routes for only these prefixes. + If not specified, nothing would be + advertised. + _custom_data: _custom_data + + """ + + class StaticRoutesItem(AvdModel): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = {"prefix": {"type": str}, "_custom_data": {"type": dict}} + prefix: str + """IPv4_network/Mask.""" + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, *, prefix: str | UndefinedType = Undefined, _custom_data: dict[str, Any] | UndefinedType = Undefined + ) -> None: + """ + StaticRoutesItem. + + + Subclass of AvdModel. + + Args: + prefix: IPv4_network/Mask. + _custom_data: _custom_data + + """ + + class StaticRoutes(AvdList[StaticRoutesItem]): + """Subclass of AvdList with `StaticRoutesItem` items.""" + + StaticRoutes._item_type = StaticRoutesItem + + class CvPathfinderInternetExit(AvdModel): + """Subclass of AvdModel.""" + + class PoliciesItem(AvdModel): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = {"name": {"type": str}, "tunnel_interface_numbers": {"type": str}, "_custom_data": {"type": dict}} + name: str + """Internet-exit policy name.""" + tunnel_interface_numbers: str | None + """ + Number range to use for Tunnel interfaces to an internet-exit service provider using this local + interface. + Examples: '1-3' or '100,200,300' + """ + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, + *, + name: str | UndefinedType = Undefined, + tunnel_interface_numbers: str | None | UndefinedType = Undefined, + _custom_data: dict[str, Any] | UndefinedType = Undefined, + ) -> None: + """ + PoliciesItem. + + + Subclass of AvdModel. + + Args: + name: Internet-exit policy name. + tunnel_interface_numbers: + Number range to use for Tunnel interfaces to an internet-exit service provider using this local + interface. + Examples: '1-3' or '100,200,300' + _custom_data: _custom_data + + """ + + class Policies(AvdIndexedList[str, PoliciesItem]): + """Subclass of AvdIndexedList with `PoliciesItem` items. Primary key is `name` (`str`).""" + + _primary_key: ClassVar[str] = "name" + + Policies._item_type = PoliciesItem + + _fields: ClassVar[dict] = {"policies": {"type": Policies}, "_custom_data": {"type": dict}} + policies: Policies + """ + List of Internet-exit policies using this interface as exit. + + Subclass of AvdIndexedList with + `PoliciesItem` items. Primary key is `name` (`str`). + """ + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, *, policies: Policies | UndefinedType = Undefined, _custom_data: dict[str, Any] | UndefinedType = Undefined + ) -> None: + """ + CvPathfinderInternetExit. + + + Subclass of AvdModel. + + Args: + policies: + List of Internet-exit policies using this interface as exit. + + Subclass of AvdIndexedList with + `PoliciesItem` items. Primary key is `name` (`str`). + _custom_data: _custom_data + + """ + + class FlowTracking(AvdModel): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = {"enabled": {"type": bool}, "name": {"type": str}, "_custom_data": {"type": dict}} + enabled: bool | None + name: str | None + """Flow tracker name as defined in flow_tracking_settings.""" + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, + *, + enabled: bool | None | UndefinedType = Undefined, + name: str | None | UndefinedType = Undefined, + _custom_data: dict[str, Any] | UndefinedType = Undefined, + ) -> None: + """ + FlowTracking. + + + Subclass of AvdModel. + + Args: + enabled: enabled + name: Flow tracker name as defined in flow_tracking_settings. + _custom_data: _custom_data + + """ + + class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = { + "profile": {"type": str}, + "name": {"type": str}, + "description": {"type": str}, + "ip_address": {"type": str}, + "dhcp_ip": {"type": str}, + "public_ip": {"type": str}, + "encapsulation_dot1q_vlan": {"type": int}, + "dhcp_accept_default_route": {"type": bool, "default": True}, + "enabled": {"type": bool, "default": True}, + "speed": {"type": str}, + "peer": {"type": str}, + "peer_interface": {"type": str}, + "peer_ip": {"type": str}, + "bgp": {"type": Bgp}, + "ipv4_acl_in": {"type": str}, + "ipv4_acl_out": {"type": str}, + "static_routes": {"type": StaticRoutes}, + "qos_profile": {"type": str}, + "wan_carrier": {"type": str}, + "wan_circuit_id": {"type": str}, + "connected_to_pathfinder": {"type": bool, "default": True}, + "cv_pathfinder_internet_exit": {"type": CvPathfinderInternetExit}, + "raw_eos_cli": {"type": str}, "flow_tracking": {"type": FlowTracking}, + "structured_config": {"type": StructuredConfig}, "_custom_data": {"type": dict}, } - enabled: bool | None - """Enable / Disable auto CV-Pathfinder HA, when two nodes are defined in the same node_group.""" - ipsec: bool + profile: str | None + """L3 interface profile name. Profile defined under `l3_interface_profiles`.""" + name: str """ - Enable / Disable IPsec over HA path-group when HA is enabled. + Ethernet interface name like 'Ethernet2' or subinterface name like 'Ethernet2.42'. + For a + subinterface, the parent physical interface is automatically created. + """ + description: str | None + """ + Interface description. + If not set a default description will be configured with '[[ + ]]'. + """ + ip_address: str | None + """Node IPv4 address/Mask or 'dhcp'.""" + dhcp_ip: str | None + """ + When the `ip_address` is `dhcp`, this optional field allows to indicate the expected + IPv4 address + (without mask) to be allocated on the interface if known. + This is not rendered in the configuration + but can be used for substitution of 'interface_ip' in the Access-list + set under `ipv4_acl_in` and + `ipv4_acl_out`. + """ + public_ip: str | None + """ + Node IPv4 address (no mask). + + This is used to get the public IP (if known) when the device is behind + NAT. + This is only used for `wan_rr` routers (AutoVPN RRs and Pathfinders) to determine the Public IP + with the following preference: + `wan_route_servers.path_groups.interfaces.ip_address` + -> + `l3_interfaces.public_ip` + -> `l3_interfaces.ip_address` + + The determined Public IP is used + by WAN routers when peering with this interface. + """ + encapsulation_dot1q_vlan: int | None + """ + For subinterfaces the dot1q vlan is derived from the interface name by default, but can also be + specified. + """ + dhcp_accept_default_route: bool + """ + Accept a default route from DHCP if `ip_address` is set to `dhcp`. Default value: `True` """ - mtu: int + enabled: bool """ - Set MTU on WAN HA interfaces. + Enable or Shutdown the interface. - Default value: `9194` + Default value: `True` """ - ha_interfaces: HaInterfaces + speed: str | None """ - Local WAN HA interfaces - Overwrite the default behavior which is to pick all the `uplink_interfaces`. - Can be used to filter uplink interfaces when there are multiple uplinks. - Limitations: - Either all - interfaces must be uplinks or all interfaces must not be uplinks. - Only one interface is supported - for non uplinks. + Speed should be set in the format `` or `forced ` or `auto + `. + """ + peer: str | None + """The peer device name. Used for description and documentation.""" + peer_interface: str | None + """The peer device interface. Used for description and documentation.""" + peer_ip: str | None + """ + The peer device IPv4 address (no mask). Used as default route gateway if `set_default_route` is true + and `ip` is an IP address. + """ + bgp: Bgp + """ + Enforce IPv4 BGP peering for the peer - Subclass of AvdList with `str` items. + Subclass of AvdModel. """ - ha_ipv4_pool: str | None + ipv4_acl_in: str | None """ - IP address pool used for WAN HA connectivity. - IP is derived from the node ID. - Not used for uplink - interfaces. + Name of the IPv4 access-list to be assigned in the ingress direction. + The access-list must be + defined under `ipv4_acls` and supports field substitution for "interface_ip" and "peer_ip". + Required + for all WAN interfaces (`wan_carrier` is set) unless the carrier is marked as 'trusted' under + `wan_carriers`. """ - max_ha_interfaces: int | None + ipv4_acl_out: str | None """ - Number of parallel links towards HA switches. - Can be used to reserve IP addresses for future - parallel HA links. + Name of the IPv4 Access-list to be assigned in the egress direction. + The access-list must be defined + under `ipv4_acls` and supports field substitution for "interface_ip" and "peer_ip". """ - port_channel_id: int | None - """Port-channel ID to use for direct HA.""" - use_port_channel_for_direct_ha: bool + static_routes: StaticRoutes """ - Enable or disable using a port-channel interface for direct HA when there is only one interface. - This feature was introduced in EOS 4.33.0F. + Configure IPv4 static routes pointing to `peer_ip`. + + Subclass of AvdList with `StaticRoutesItem` + items. + """ + qos_profile: str | None + """QOS service profile.""" + wan_carrier: str | None + """ + The WAN carrier this interface is connected to. + This is used to infer the path-groups in which this + interface should be configured. + Unless the carrier is marked as 'trusted' under `wan_carriers`, + `ipv4_acl_in` is also required on all WAN interfaces. + """ + wan_circuit_id: str | None + """ + The WAN circuit ID for this interface. + This is not rendered in the configuration but used for WAN + designs. + """ + connected_to_pathfinder: bool + """ + For a WAN interface (`wan_carrier` is set), allow to disable the static tunnel towards Pathfinders. Default value: `True` """ + cv_pathfinder_internet_exit: CvPathfinderInternetExit + """ + PREVIEW: This key is in preview mode + + Subclass of AvdModel. + """ + raw_eos_cli: str | None + """EOS CLI rendered directly on the interface in the final EOS configuration.""" flow_tracking: FlowTracking """ - Configures flow-tracking on the HA interfaces. Overrides `fabric_flow_tracking.wan_ha_links` - setting. + Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_interfaces` setting. + Subclass of AvdModel. + """ + structured_config: StructuredConfig + """ + Custom structured config for the Ethernet interface. Subclass of AvdModel. """ @@ -48206,63 +52532,225 @@ def __init__( def __init__( self, *, - enabled: bool | None | UndefinedType = Undefined, - ipsec: bool | UndefinedType = Undefined, - mtu: int | UndefinedType = Undefined, - ha_interfaces: HaInterfaces | UndefinedType = Undefined, - ha_ipv4_pool: str | None | UndefinedType = Undefined, - max_ha_interfaces: int | None | UndefinedType = Undefined, - port_channel_id: int | None | UndefinedType = Undefined, - use_port_channel_for_direct_ha: bool | UndefinedType = Undefined, + profile: str | None | UndefinedType = Undefined, + name: str | UndefinedType = Undefined, + description: str | None | UndefinedType = Undefined, + ip_address: str | None | UndefinedType = Undefined, + dhcp_ip: str | None | UndefinedType = Undefined, + public_ip: str | None | UndefinedType = Undefined, + encapsulation_dot1q_vlan: int | None | UndefinedType = Undefined, + dhcp_accept_default_route: bool | UndefinedType = Undefined, + enabled: bool | UndefinedType = Undefined, + speed: str | None | UndefinedType = Undefined, + peer: str | None | UndefinedType = Undefined, + peer_interface: str | None | UndefinedType = Undefined, + peer_ip: str | None | UndefinedType = Undefined, + bgp: Bgp | UndefinedType = Undefined, + ipv4_acl_in: str | None | UndefinedType = Undefined, + ipv4_acl_out: str | None | UndefinedType = Undefined, + static_routes: StaticRoutes | UndefinedType = Undefined, + qos_profile: str | None | UndefinedType = Undefined, + wan_carrier: str | None | UndefinedType = Undefined, + wan_circuit_id: str | None | UndefinedType = Undefined, + connected_to_pathfinder: bool | UndefinedType = Undefined, + cv_pathfinder_internet_exit: CvPathfinderInternetExit | UndefinedType = Undefined, + raw_eos_cli: str | None | UndefinedType = Undefined, flow_tracking: FlowTracking | UndefinedType = Undefined, + structured_config: StructuredConfig | UndefinedType = Undefined, _custom_data: dict[str, Any] | UndefinedType = Undefined, ) -> None: """ - WanHa. + L3InterfacesItem. Subclass of AvdModel. Args: - enabled: Enable / Disable auto CV-Pathfinder HA, when two nodes are defined in the same node_group. - ipsec: Enable / Disable IPsec over HA path-group when HA is enabled. - mtu: Set MTU on WAN HA interfaces. - ha_interfaces: - Local WAN HA interfaces - Overwrite the default behavior which is to pick all the `uplink_interfaces`. - Can be used to filter uplink interfaces when there are multiple uplinks. - Limitations: - Either all - interfaces must be uplinks or all interfaces must not be uplinks. - Only one interface is supported - for non uplinks. + profile: L3 interface profile name. Profile defined under `l3_interface_profiles`. + name: + Ethernet interface name like 'Ethernet2' or subinterface name like 'Ethernet2.42'. + For a + subinterface, the parent physical interface is automatically created. + description: + Interface description. + If not set a default description will be configured with '[[ + ]]'. + ip_address: Node IPv4 address/Mask or 'dhcp'. + dhcp_ip: + When the `ip_address` is `dhcp`, this optional field allows to indicate the expected + IPv4 address + (without mask) to be allocated on the interface if known. + This is not rendered in the configuration + but can be used for substitution of 'interface_ip' in the Access-list + set under `ipv4_acl_in` and + `ipv4_acl_out`. + public_ip: + Node IPv4 address (no mask). - Subclass of AvdList with `str` items. - ha_ipv4_pool: - IP address pool used for WAN HA connectivity. - IP is derived from the node ID. - Not used for uplink - interfaces. - max_ha_interfaces: - Number of parallel links towards HA switches. - Can be used to reserve IP addresses for future - parallel HA links. - port_channel_id: Port-channel ID to use for direct HA. - use_port_channel_for_direct_ha: - Enable or disable using a port-channel interface for direct HA when there is only one interface. - This feature was introduced in EOS 4.33.0F. + This is used to get the public IP (if known) when the device is behind + NAT. + This is only used for `wan_rr` routers (AutoVPN RRs and Pathfinders) to determine the Public IP + with the following preference: + `wan_route_servers.path_groups.interfaces.ip_address` + -> + `l3_interfaces.public_ip` + -> `l3_interfaces.ip_address` + + The determined Public IP is used + by WAN routers when peering with this interface. + encapsulation_dot1q_vlan: + For subinterfaces the dot1q vlan is derived from the interface name by default, but can also be + specified. + dhcp_accept_default_route: Accept a default route from DHCP if `ip_address` is set to `dhcp`. + enabled: Enable or Shutdown the interface. + speed: + Speed should be set in the format `` or `forced ` or `auto + `. + peer: The peer device name. Used for description and documentation. + peer_interface: The peer device interface. Used for description and documentation. + peer_ip: + The peer device IPv4 address (no mask). Used as default route gateway if `set_default_route` is true + and `ip` is an IP address. + bgp: + Enforce IPv4 BGP peering for the peer + + Subclass of AvdModel. + ipv4_acl_in: + Name of the IPv4 access-list to be assigned in the ingress direction. + The access-list must be + defined under `ipv4_acls` and supports field substitution for "interface_ip" and "peer_ip". + Required + for all WAN interfaces (`wan_carrier` is set) unless the carrier is marked as 'trusted' under + `wan_carriers`. + ipv4_acl_out: + Name of the IPv4 Access-list to be assigned in the egress direction. + The access-list must be defined + under `ipv4_acls` and supports field substitution for "interface_ip" and "peer_ip". + static_routes: + Configure IPv4 static routes pointing to `peer_ip`. + + Subclass of AvdList with `StaticRoutesItem` + items. + qos_profile: QOS service profile. + wan_carrier: + The WAN carrier this interface is connected to. + This is used to infer the path-groups in which this + interface should be configured. + Unless the carrier is marked as 'trusted' under `wan_carriers`, + `ipv4_acl_in` is also required on all WAN interfaces. + wan_circuit_id: + The WAN circuit ID for this interface. + This is not rendered in the configuration but used for WAN + designs. + connected_to_pathfinder: For a WAN interface (`wan_carrier` is set), allow to disable the static tunnel towards Pathfinders. + cv_pathfinder_internet_exit: + PREVIEW: This key is in preview mode + + Subclass of AvdModel. + raw_eos_cli: EOS CLI rendered directly on the interface in the final EOS configuration. flow_tracking: - Configures flow-tracking on the HA interfaces. Overrides `fabric_flow_tracking.wan_ha_links` - setting. + Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_interfaces` setting. + Subclass of AvdModel. + structured_config: + Custom structured config for the Ethernet interface. Subclass of AvdModel. _custom_data: _custom_data """ - class L3InterfacesItem(AvdModel): + class L3Interfaces(AvdIndexedList[str, L3InterfacesItem]): + """Subclass of AvdIndexedList with `L3InterfacesItem` items. Primary key is `name` (`str`).""" + + _primary_key: ClassVar[str] = "name" + + L3Interfaces._item_type = L3InterfacesItem + + class L3PortChannelsItem(AvdModel): """Subclass of AvdModel.""" + class MemberInterfacesItem(AvdModel): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = { + "name": {"type": str}, + "description": {"type": str}, + "peer": {"type": str}, + "peer_interface": {"type": str}, + "speed": {"type": str}, + "_custom_data": {"type": dict}, + } + name: str + """ + Ethernet interface name like 'Ethernet2'. + Member interface cannot be subinterface. + """ + description: str | None + """ + Interface description for this member. + If not set a default description will be configured with + '[[ ]]'. + """ + peer: str | None + """ + The peer device name. Used for description and documentation. + If not set, this inherits the peer + setting on the port-channel interface. + """ + peer_interface: str | None + """The peer device interface. Used for description and documentation.""" + speed: str | None + """ + Speed should be set in the format `` or `forced ` or `auto + `. + """ + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, + *, + name: str | UndefinedType = Undefined, + description: str | None | UndefinedType = Undefined, + peer: str | None | UndefinedType = Undefined, + peer_interface: str | None | UndefinedType = Undefined, + speed: str | None | UndefinedType = Undefined, + _custom_data: dict[str, Any] | UndefinedType = Undefined, + ) -> None: + """ + MemberInterfacesItem. + + + Subclass of AvdModel. + + Args: + name: + Ethernet interface name like 'Ethernet2'. + Member interface cannot be subinterface. + description: + Interface description for this member. + If not set a default description will be configured with + '[[ ]]'. + peer: + The peer device name. Used for description and documentation. + If not set, this inherits the peer + setting on the port-channel interface. + peer_interface: The peer device interface. Used for description and documentation. + speed: + Speed should be set in the format `` or `forced ` or `auto + `. + _custom_data: _custom_data + + """ + + class MemberInterfaces(AvdIndexedList[str, MemberInterfacesItem]): + """Subclass of AvdIndexedList with `MemberInterfacesItem` items. Primary key is `name` (`str`).""" + + _primary_key: ClassVar[str] = "name" + + MemberInterfaces._item_type = MemberInterfacesItem + class Bgp(AvdModel): """Subclass of AvdModel.""" @@ -48350,8 +52838,10 @@ def __init__( """ - class StaticRoutes(AvdList[StaticRoutesItem]): - """Subclass of AvdList with `StaticRoutesItem` items.""" + class StaticRoutes(AvdIndexedList[str, StaticRoutesItem]): + """Subclass of AvdIndexedList with `StaticRoutesItem` items. Primary key is `prefix` (`str`).""" + + _primary_key: ClassVar[str] = "prefix" StaticRoutes._item_type = StaticRoutesItem @@ -48466,22 +52956,22 @@ def __init__( """ - class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): + class StructuredConfig(EosCliConfigGen.PortChannelInterfacesItem): """Subclass of AvdModel.""" _fields: ClassVar[dict] = { - "profile": {"type": str}, "name": {"type": str}, "description": {"type": str}, + "mode": {"type": str, "default": "active"}, + "member_interfaces": {"type": MemberInterfaces}, "ip_address": {"type": str}, "dhcp_ip": {"type": str}, "public_ip": {"type": str}, "encapsulation_dot1q_vlan": {"type": int}, "dhcp_accept_default_route": {"type": bool, "default": True}, "enabled": {"type": bool, "default": True}, - "speed": {"type": str}, "peer": {"type": str}, - "peer_interface": {"type": str}, + "peer_port_channel": {"type": str}, "peer_ip": {"type": str}, "bgp": {"type": Bgp}, "ipv4_acl_in": {"type": str}, @@ -48497,19 +52987,32 @@ class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): "structured_config": {"type": StructuredConfig}, "_custom_data": {"type": dict}, } - profile: str | None - """L3 interface profile name. Profile defined under `l3_interface_profiles`.""" name: str """ - Ethernet interface name like 'Ethernet2' or subinterface name like 'Ethernet2.42'. + Port-Channel interface name like 'Port-Channel2' or subinterface name like 'Port-Channel2.42'. For a - subinterface, the parent physical interface is automatically created. + Port-Channel subinterface, the parent Port-Channel interface must be defined as well. """ description: str | None """ Interface description. If not set a default description will be configured with '[[ - ]]'. + ]]'. + """ + mode: Literal["active", "passive", "on"] + """ + Port-Channel mode. + Should not be set on Port-Channel subinterfaces. + + Default value: `"active"` + """ + member_interfaces: MemberInterfaces + """ + Port-Channel member interfaces. + Should not be set on Port-Channel subinterfaces. + + Subclass of + AvdIndexedList with `MemberInterfacesItem` items. Primary key is `name` (`str`). """ ip_address: str | None """Node IPv4 address/Mask or 'dhcp'.""" @@ -48533,11 +53036,11 @@ class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): with the following preference: `wan_route_servers.path_groups.interfaces.ip_address` -> - `l3_interfaces.public_ip` - -> `l3_interfaces.ip_address` + `l3_port_channels.public_ip` + -> `l3_port_channels.ip_address` - The determined Public IP is used - by WAN routers when peering with this interface. + The determined Public IP is + used by WAN routers when peering with this interface. """ encapsulation_dot1q_vlan: int | None """ @@ -48556,15 +53059,10 @@ class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): Default value: `True` """ - speed: str | None - """ - Speed should be set in the format `` or `forced ` or `auto - `. - """ peer: str | None """The peer device name. Used for description and documentation.""" - peer_interface: str | None - """The peer device interface. Used for description and documentation.""" + peer_port_channel: str | None + """The peer device port-channel interface. Used for description and documentation.""" peer_ip: str | None """ The peer device IPv4 address (no mask). Used as default route gateway if `set_default_route` is true @@ -48595,8 +53093,8 @@ class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): """ Configure IPv4 static routes pointing to `peer_ip`. - Subclass of AvdList with `StaticRoutesItem` - items. + Subclass of AvdIndexedList with + `StaticRoutesItem` items. Primary key is `prefix` (`str`). """ qos_profile: str | None """QOS service profile.""" @@ -48627,15 +53125,17 @@ class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): Subclass of AvdModel. """ raw_eos_cli: str | None - """EOS CLI rendered directly on the interface in the final EOS configuration.""" + """EOS CLI rendered directly on the Port-Channel interface in the final EOS configuration.""" flow_tracking: FlowTracking """ - Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_interfaces` setting. + Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_port_channels` + setting. + Subclass of AvdModel. """ structured_config: StructuredConfig """ - Custom structured config for the Ethernet interface. + Custom structured config for the Port-Channel interface. Subclass of AvdModel. """ @@ -48646,18 +53146,18 @@ class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): def __init__( self, *, - profile: str | None | UndefinedType = Undefined, name: str | UndefinedType = Undefined, description: str | None | UndefinedType = Undefined, + mode: Literal["active", "passive", "on"] | UndefinedType = Undefined, + member_interfaces: MemberInterfaces | UndefinedType = Undefined, ip_address: str | None | UndefinedType = Undefined, dhcp_ip: str | None | UndefinedType = Undefined, public_ip: str | None | UndefinedType = Undefined, encapsulation_dot1q_vlan: int | None | UndefinedType = Undefined, dhcp_accept_default_route: bool | UndefinedType = Undefined, enabled: bool | UndefinedType = Undefined, - speed: str | None | UndefinedType = Undefined, peer: str | None | UndefinedType = Undefined, - peer_interface: str | None | UndefinedType = Undefined, + peer_port_channel: str | None | UndefinedType = Undefined, peer_ip: str | None | UndefinedType = Undefined, bgp: Bgp | UndefinedType = Undefined, ipv4_acl_in: str | None | UndefinedType = Undefined, @@ -48674,21 +53174,29 @@ def __init__( _custom_data: dict[str, Any] | UndefinedType = Undefined, ) -> None: """ - L3InterfacesItem. + L3PortChannelsItem. Subclass of AvdModel. Args: - profile: L3 interface profile name. Profile defined under `l3_interface_profiles`. name: - Ethernet interface name like 'Ethernet2' or subinterface name like 'Ethernet2.42'. + Port-Channel interface name like 'Port-Channel2' or subinterface name like 'Port-Channel2.42'. For a - subinterface, the parent physical interface is automatically created. + Port-Channel subinterface, the parent Port-Channel interface must be defined as well. description: Interface description. If not set a default description will be configured with '[[ - ]]'. + ]]'. + mode: + Port-Channel mode. + Should not be set on Port-Channel subinterfaces. + member_interfaces: + Port-Channel member interfaces. + Should not be set on Port-Channel subinterfaces. + + Subclass of + AvdIndexedList with `MemberInterfacesItem` items. Primary key is `name` (`str`). ip_address: Node IPv4 address/Mask or 'dhcp'. dhcp_ip: When the `ip_address` is `dhcp`, this optional field allows to indicate the expected @@ -48707,21 +53215,18 @@ def __init__( with the following preference: `wan_route_servers.path_groups.interfaces.ip_address` -> - `l3_interfaces.public_ip` - -> `l3_interfaces.ip_address` + `l3_port_channels.public_ip` + -> `l3_port_channels.ip_address` - The determined Public IP is used - by WAN routers when peering with this interface. + The determined Public IP is + used by WAN routers when peering with this interface. encapsulation_dot1q_vlan: For subinterfaces the dot1q vlan is derived from the interface name by default, but can also be specified. dhcp_accept_default_route: Accept a default route from DHCP if `ip_address` is set to `dhcp`. enabled: Enable or Shutdown the interface. - speed: - Speed should be set in the format `` or `forced ` or `auto - `. peer: The peer device name. Used for description and documentation. - peer_interface: The peer device interface. Used for description and documentation. + peer_port_channel: The peer device port-channel interface. Used for description and documentation. peer_ip: The peer device IPv4 address (no mask). Used as default route gateway if `set_default_route` is true and `ip` is an IP address. @@ -48743,8 +53248,8 @@ def __init__( static_routes: Configure IPv4 static routes pointing to `peer_ip`. - Subclass of AvdList with `StaticRoutesItem` - items. + Subclass of AvdIndexedList with + `StaticRoutesItem` items. Primary key is `prefix` (`str`). qos_profile: QOS service profile. wan_carrier: The WAN carrier this interface is connected to. @@ -48761,24 +53266,26 @@ def __init__( PREVIEW: This key is in preview mode Subclass of AvdModel. - raw_eos_cli: EOS CLI rendered directly on the interface in the final EOS configuration. + raw_eos_cli: EOS CLI rendered directly on the Port-Channel interface in the final EOS configuration. flow_tracking: - Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_interfaces` setting. + Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_port_channels` + setting. + Subclass of AvdModel. structured_config: - Custom structured config for the Ethernet interface. + Custom structured config for the Port-Channel interface. Subclass of AvdModel. _custom_data: _custom_data """ - class L3Interfaces(AvdIndexedList[str, L3InterfacesItem]): - """Subclass of AvdIndexedList with `L3InterfacesItem` items. Primary key is `name` (`str`).""" + class L3PortChannels(AvdIndexedList[str, L3PortChannelsItem]): + """Subclass of AvdIndexedList with `L3PortChannelsItem` items. Primary key is `name` (`str`).""" _primary_key: ClassVar[str] = "name" - L3Interfaces._item_type = L3InterfacesItem + L3PortChannels._item_type = L3PortChannelsItem _fields: ClassVar[dict] = { "group": {"type": str}, @@ -48886,6 +53393,7 @@ class L3Interfaces(AvdIndexedList[str, L3InterfacesItem]): "wan_ha": {"type": WanHa}, "dps_mss_ipv4": {"type": str, "default": "auto"}, "l3_interfaces": {"type": L3Interfaces}, + "l3_port_channels": {"type": L3PortChannels}, "data_plane_cpu_allocation_max": {"type": int}, "flow_tracker_type": {"type": str}, "_custom_data": {"type": dict}, @@ -49661,6 +54169,15 @@ class L3Interfaces(AvdIndexedList[str, L3InterfacesItem]): Subclass of AvdIndexedList with `L3InterfacesItem` items. Primary key is `name` (`str`). """ + l3_port_channels: L3PortChannels + """ + L3 Port-Channel interfaces to configure on the node. + Used to define the node for WAN interfaces when + `wan_carrier` is set. + + Subclass of AvdIndexedList with `L3PortChannelsItem` items. Primary key is + `name` (`str`). + """ data_plane_cpu_allocation_max: int | None """ Set the maximum number of CPU used for the data plane. @@ -49786,6 +54303,7 @@ def __init__( wan_ha: WanHa | UndefinedType = Undefined, dps_mss_ipv4: str | UndefinedType = Undefined, l3_interfaces: L3Interfaces | UndefinedType = Undefined, + l3_port_channels: L3PortChannels | UndefinedType = Undefined, data_plane_cpu_allocation_max: int | None | UndefinedType = Undefined, flow_tracker_type: Literal["sampled", "hardware"] | None | UndefinedType = Undefined, _custom_data: dict[str, Any] | UndefinedType = Undefined, @@ -50335,6 +54853,13 @@ def __init__( Subclass of AvdIndexedList with `L3InterfacesItem` items. Primary key is `name` (`str`). + l3_port_channels: + L3 Port-Channel interfaces to configure on the node. + Used to define the node for WAN interfaces when + `wan_carrier` is set. + + Subclass of AvdIndexedList with `L3PortChannelsItem` items. Primary key is + `name` (`str`). data_plane_cpu_allocation_max: Set the maximum number of CPU used for the data plane. This setting is useful on virtual Route @@ -51638,70 +56163,510 @@ def __init__( """ _fields: ClassVar[dict] = { - "enabled": {"type": bool}, - "ipsec": {"type": bool, "default": True}, - "mtu": {"type": int, "default": 9194}, - "ha_interfaces": {"type": HaInterfaces}, - "ha_ipv4_pool": {"type": str}, - "max_ha_interfaces": {"type": int}, - "port_channel_id": {"type": int}, - "use_port_channel_for_direct_ha": {"type": bool, "default": True}, + "enabled": {"type": bool}, + "ipsec": {"type": bool, "default": True}, + "mtu": {"type": int, "default": 9194}, + "ha_interfaces": {"type": HaInterfaces}, + "ha_ipv4_pool": {"type": str}, + "max_ha_interfaces": {"type": int}, + "port_channel_id": {"type": int}, + "use_port_channel_for_direct_ha": {"type": bool, "default": True}, + "flow_tracking": {"type": FlowTracking}, + "_custom_data": {"type": dict}, + } + enabled: bool | None + """Enable / Disable auto CV-Pathfinder HA, when two nodes are defined in the same node_group.""" + ipsec: bool + """ + Enable / Disable IPsec over HA path-group when HA is enabled. + + Default value: `True` + """ + mtu: int + """ + Set MTU on WAN HA interfaces. + + Default value: `9194` + """ + ha_interfaces: HaInterfaces + """ + Local WAN HA interfaces + Overwrite the default behavior which is to pick all the `uplink_interfaces`. + Can be used to filter uplink interfaces when there are multiple uplinks. + Limitations: + Either all + interfaces must be uplinks or all interfaces must not be uplinks. + Only one interface is supported + for non uplinks. + + Subclass of AvdList with `str` items. + """ + ha_ipv4_pool: str | None + """ + IP address pool used for WAN HA connectivity. + IP is derived from the node ID. + Not used for uplink + interfaces. + """ + max_ha_interfaces: int | None + """ + Number of parallel links towards HA switches. + Can be used to reserve IP addresses for future + parallel HA links. + """ + port_channel_id: int | None + """Port-channel ID to use for direct HA.""" + use_port_channel_for_direct_ha: bool + """ + Enable or disable using a port-channel interface for direct HA when there is only one interface. + This feature was introduced in EOS 4.33.0F. + + Default value: `True` + """ + flow_tracking: FlowTracking + """ + Configures flow-tracking on the HA interfaces. Overrides `fabric_flow_tracking.wan_ha_links` + setting. + + Subclass of AvdModel. + """ + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, + *, + enabled: bool | None | UndefinedType = Undefined, + ipsec: bool | UndefinedType = Undefined, + mtu: int | UndefinedType = Undefined, + ha_interfaces: HaInterfaces | UndefinedType = Undefined, + ha_ipv4_pool: str | None | UndefinedType = Undefined, + max_ha_interfaces: int | None | UndefinedType = Undefined, + port_channel_id: int | None | UndefinedType = Undefined, + use_port_channel_for_direct_ha: bool | UndefinedType = Undefined, + flow_tracking: FlowTracking | UndefinedType = Undefined, + _custom_data: dict[str, Any] | UndefinedType = Undefined, + ) -> None: + """ + WanHa. + + + Subclass of AvdModel. + + Args: + enabled: Enable / Disable auto CV-Pathfinder HA, when two nodes are defined in the same node_group. + ipsec: Enable / Disable IPsec over HA path-group when HA is enabled. + mtu: Set MTU on WAN HA interfaces. + ha_interfaces: + Local WAN HA interfaces + Overwrite the default behavior which is to pick all the `uplink_interfaces`. + Can be used to filter uplink interfaces when there are multiple uplinks. + Limitations: + Either all + interfaces must be uplinks or all interfaces must not be uplinks. + Only one interface is supported + for non uplinks. + + Subclass of AvdList with `str` items. + ha_ipv4_pool: + IP address pool used for WAN HA connectivity. + IP is derived from the node ID. + Not used for uplink + interfaces. + max_ha_interfaces: + Number of parallel links towards HA switches. + Can be used to reserve IP addresses for future + parallel HA links. + port_channel_id: Port-channel ID to use for direct HA. + use_port_channel_for_direct_ha: + Enable or disable using a port-channel interface for direct HA when there is only one interface. + This feature was introduced in EOS 4.33.0F. + flow_tracking: + Configures flow-tracking on the HA interfaces. Overrides `fabric_flow_tracking.wan_ha_links` + setting. + + Subclass of AvdModel. + _custom_data: _custom_data + + """ + + class L3InterfacesItem(AvdModel): + """Subclass of AvdModel.""" + + class Bgp(AvdModel): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = { + "peer_as": {"type": str}, + "ipv4_prefix_list_in": {"type": str}, + "ipv4_prefix_list_out": {"type": str}, + "_custom_data": {"type": dict}, + } + peer_as: str + """ + BGP AS <1-4294967295> or AS number in asdot notation "<1-65535>.<0-65535>". + For asdot notation in + YAML inputs, the value must be put in quotes, to prevent it from being interpreted as a float + number. + """ + ipv4_prefix_list_in: str | None + """ + Prefix List Name. Accept routes for only these prefixes from the peer. + Required for wan interfaces. + """ + ipv4_prefix_list_out: str | None + """ + Prefix List Name. Advertise routes for only these prefixes. + If not specified, nothing would be + advertised. + """ + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, + *, + peer_as: str | UndefinedType = Undefined, + ipv4_prefix_list_in: str | None | UndefinedType = Undefined, + ipv4_prefix_list_out: str | None | UndefinedType = Undefined, + _custom_data: dict[str, Any] | UndefinedType = Undefined, + ) -> None: + """ + Bgp. + + + Subclass of AvdModel. + + Args: + peer_as: + BGP AS <1-4294967295> or AS number in asdot notation "<1-65535>.<0-65535>". + For asdot notation in + YAML inputs, the value must be put in quotes, to prevent it from being interpreted as a float + number. + ipv4_prefix_list_in: + Prefix List Name. Accept routes for only these prefixes from the peer. + Required for wan interfaces. + ipv4_prefix_list_out: + Prefix List Name. Advertise routes for only these prefixes. + If not specified, nothing would be + advertised. + _custom_data: _custom_data + + """ + + class StaticRoutesItem(AvdModel): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = {"prefix": {"type": str}, "_custom_data": {"type": dict}} + prefix: str + """IPv4_network/Mask.""" + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, *, prefix: str | UndefinedType = Undefined, _custom_data: dict[str, Any] | UndefinedType = Undefined + ) -> None: + """ + StaticRoutesItem. + + + Subclass of AvdModel. + + Args: + prefix: IPv4_network/Mask. + _custom_data: _custom_data + + """ + + class StaticRoutes(AvdList[StaticRoutesItem]): + """Subclass of AvdList with `StaticRoutesItem` items.""" + + StaticRoutes._item_type = StaticRoutesItem + + class CvPathfinderInternetExit(AvdModel): + """Subclass of AvdModel.""" + + class PoliciesItem(AvdModel): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = {"name": {"type": str}, "tunnel_interface_numbers": {"type": str}, "_custom_data": {"type": dict}} + name: str + """Internet-exit policy name.""" + tunnel_interface_numbers: str | None + """ + Number range to use for Tunnel interfaces to an internet-exit service provider using this local + interface. + Examples: '1-3' or '100,200,300' + """ + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, + *, + name: str | UndefinedType = Undefined, + tunnel_interface_numbers: str | None | UndefinedType = Undefined, + _custom_data: dict[str, Any] | UndefinedType = Undefined, + ) -> None: + """ + PoliciesItem. + + + Subclass of AvdModel. + + Args: + name: Internet-exit policy name. + tunnel_interface_numbers: + Number range to use for Tunnel interfaces to an internet-exit service provider using this local + interface. + Examples: '1-3' or '100,200,300' + _custom_data: _custom_data + + """ + + class Policies(AvdIndexedList[str, PoliciesItem]): + """Subclass of AvdIndexedList with `PoliciesItem` items. Primary key is `name` (`str`).""" + + _primary_key: ClassVar[str] = "name" + + Policies._item_type = PoliciesItem + + _fields: ClassVar[dict] = {"policies": {"type": Policies}, "_custom_data": {"type": dict}} + policies: Policies + """ + List of Internet-exit policies using this interface as exit. + + Subclass of AvdIndexedList with + `PoliciesItem` items. Primary key is `name` (`str`). + """ + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, *, policies: Policies | UndefinedType = Undefined, _custom_data: dict[str, Any] | UndefinedType = Undefined + ) -> None: + """ + CvPathfinderInternetExit. + + + Subclass of AvdModel. + + Args: + policies: + List of Internet-exit policies using this interface as exit. + + Subclass of AvdIndexedList with + `PoliciesItem` items. Primary key is `name` (`str`). + _custom_data: _custom_data + + """ + + class FlowTracking(AvdModel): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = {"enabled": {"type": bool}, "name": {"type": str}, "_custom_data": {"type": dict}} + enabled: bool | None + name: str | None + """Flow tracker name as defined in flow_tracking_settings.""" + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, + *, + enabled: bool | None | UndefinedType = Undefined, + name: str | None | UndefinedType = Undefined, + _custom_data: dict[str, Any] | UndefinedType = Undefined, + ) -> None: + """ + FlowTracking. + + + Subclass of AvdModel. + + Args: + enabled: enabled + name: Flow tracker name as defined in flow_tracking_settings. + _custom_data: _custom_data + + """ + + class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = { + "profile": {"type": str}, + "name": {"type": str}, + "description": {"type": str}, + "ip_address": {"type": str}, + "dhcp_ip": {"type": str}, + "public_ip": {"type": str}, + "encapsulation_dot1q_vlan": {"type": int}, + "dhcp_accept_default_route": {"type": bool, "default": True}, + "enabled": {"type": bool, "default": True}, + "speed": {"type": str}, + "peer": {"type": str}, + "peer_interface": {"type": str}, + "peer_ip": {"type": str}, + "bgp": {"type": Bgp}, + "ipv4_acl_in": {"type": str}, + "ipv4_acl_out": {"type": str}, + "static_routes": {"type": StaticRoutes}, + "qos_profile": {"type": str}, + "wan_carrier": {"type": str}, + "wan_circuit_id": {"type": str}, + "connected_to_pathfinder": {"type": bool, "default": True}, + "cv_pathfinder_internet_exit": {"type": CvPathfinderInternetExit}, + "raw_eos_cli": {"type": str}, "flow_tracking": {"type": FlowTracking}, + "structured_config": {"type": StructuredConfig}, "_custom_data": {"type": dict}, } - enabled: bool | None - """Enable / Disable auto CV-Pathfinder HA, when two nodes are defined in the same node_group.""" - ipsec: bool + profile: str | None + """L3 interface profile name. Profile defined under `l3_interface_profiles`.""" + name: str """ - Enable / Disable IPsec over HA path-group when HA is enabled. + Ethernet interface name like 'Ethernet2' or subinterface name like 'Ethernet2.42'. + For a + subinterface, the parent physical interface is automatically created. + """ + description: str | None + """ + Interface description. + If not set a default description will be configured with '[[ + ]]'. + """ + ip_address: str | None + """Node IPv4 address/Mask or 'dhcp'.""" + dhcp_ip: str | None + """ + When the `ip_address` is `dhcp`, this optional field allows to indicate the expected + IPv4 address + (without mask) to be allocated on the interface if known. + This is not rendered in the configuration + but can be used for substitution of 'interface_ip' in the Access-list + set under `ipv4_acl_in` and + `ipv4_acl_out`. + """ + public_ip: str | None + """ + Node IPv4 address (no mask). + + This is used to get the public IP (if known) when the device is behind + NAT. + This is only used for `wan_rr` routers (AutoVPN RRs and Pathfinders) to determine the Public IP + with the following preference: + `wan_route_servers.path_groups.interfaces.ip_address` + -> + `l3_interfaces.public_ip` + -> `l3_interfaces.ip_address` + + The determined Public IP is used + by WAN routers when peering with this interface. + """ + encapsulation_dot1q_vlan: int | None + """ + For subinterfaces the dot1q vlan is derived from the interface name by default, but can also be + specified. + """ + dhcp_accept_default_route: bool + """ + Accept a default route from DHCP if `ip_address` is set to `dhcp`. Default value: `True` """ - mtu: int + enabled: bool """ - Set MTU on WAN HA interfaces. + Enable or Shutdown the interface. - Default value: `9194` + Default value: `True` """ - ha_interfaces: HaInterfaces + speed: str | None """ - Local WAN HA interfaces - Overwrite the default behavior which is to pick all the `uplink_interfaces`. - Can be used to filter uplink interfaces when there are multiple uplinks. - Limitations: - Either all - interfaces must be uplinks or all interfaces must not be uplinks. - Only one interface is supported - for non uplinks. + Speed should be set in the format `` or `forced ` or `auto + `. + """ + peer: str | None + """The peer device name. Used for description and documentation.""" + peer_interface: str | None + """The peer device interface. Used for description and documentation.""" + peer_ip: str | None + """ + The peer device IPv4 address (no mask). Used as default route gateway if `set_default_route` is true + and `ip` is an IP address. + """ + bgp: Bgp + """ + Enforce IPv4 BGP peering for the peer - Subclass of AvdList with `str` items. + Subclass of AvdModel. """ - ha_ipv4_pool: str | None + ipv4_acl_in: str | None """ - IP address pool used for WAN HA connectivity. - IP is derived from the node ID. - Not used for uplink - interfaces. + Name of the IPv4 access-list to be assigned in the ingress direction. + The access-list must be + defined under `ipv4_acls` and supports field substitution for "interface_ip" and "peer_ip". + Required + for all WAN interfaces (`wan_carrier` is set) unless the carrier is marked as 'trusted' under + `wan_carriers`. """ - max_ha_interfaces: int | None + ipv4_acl_out: str | None """ - Number of parallel links towards HA switches. - Can be used to reserve IP addresses for future - parallel HA links. + Name of the IPv4 Access-list to be assigned in the egress direction. + The access-list must be defined + under `ipv4_acls` and supports field substitution for "interface_ip" and "peer_ip". """ - port_channel_id: int | None - """Port-channel ID to use for direct HA.""" - use_port_channel_for_direct_ha: bool + static_routes: StaticRoutes """ - Enable or disable using a port-channel interface for direct HA when there is only one interface. - This feature was introduced in EOS 4.33.0F. + Configure IPv4 static routes pointing to `peer_ip`. + + Subclass of AvdList with `StaticRoutesItem` + items. + """ + qos_profile: str | None + """QOS service profile.""" + wan_carrier: str | None + """ + The WAN carrier this interface is connected to. + This is used to infer the path-groups in which this + interface should be configured. + Unless the carrier is marked as 'trusted' under `wan_carriers`, + `ipv4_acl_in` is also required on all WAN interfaces. + """ + wan_circuit_id: str | None + """ + The WAN circuit ID for this interface. + This is not rendered in the configuration but used for WAN + designs. + """ + connected_to_pathfinder: bool + """ + For a WAN interface (`wan_carrier` is set), allow to disable the static tunnel towards Pathfinders. Default value: `True` """ + cv_pathfinder_internet_exit: CvPathfinderInternetExit + """ + PREVIEW: This key is in preview mode + + Subclass of AvdModel. + """ + raw_eos_cli: str | None + """EOS CLI rendered directly on the interface in the final EOS configuration.""" flow_tracking: FlowTracking """ - Configures flow-tracking on the HA interfaces. Overrides `fabric_flow_tracking.wan_ha_links` - setting. + Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_interfaces` setting. + Subclass of AvdModel. + """ + structured_config: StructuredConfig + """ + Custom structured config for the Ethernet interface. Subclass of AvdModel. """ @@ -51712,63 +56677,225 @@ def __init__( def __init__( self, *, - enabled: bool | None | UndefinedType = Undefined, - ipsec: bool | UndefinedType = Undefined, - mtu: int | UndefinedType = Undefined, - ha_interfaces: HaInterfaces | UndefinedType = Undefined, - ha_ipv4_pool: str | None | UndefinedType = Undefined, - max_ha_interfaces: int | None | UndefinedType = Undefined, - port_channel_id: int | None | UndefinedType = Undefined, - use_port_channel_for_direct_ha: bool | UndefinedType = Undefined, + profile: str | None | UndefinedType = Undefined, + name: str | UndefinedType = Undefined, + description: str | None | UndefinedType = Undefined, + ip_address: str | None | UndefinedType = Undefined, + dhcp_ip: str | None | UndefinedType = Undefined, + public_ip: str | None | UndefinedType = Undefined, + encapsulation_dot1q_vlan: int | None | UndefinedType = Undefined, + dhcp_accept_default_route: bool | UndefinedType = Undefined, + enabled: bool | UndefinedType = Undefined, + speed: str | None | UndefinedType = Undefined, + peer: str | None | UndefinedType = Undefined, + peer_interface: str | None | UndefinedType = Undefined, + peer_ip: str | None | UndefinedType = Undefined, + bgp: Bgp | UndefinedType = Undefined, + ipv4_acl_in: str | None | UndefinedType = Undefined, + ipv4_acl_out: str | None | UndefinedType = Undefined, + static_routes: StaticRoutes | UndefinedType = Undefined, + qos_profile: str | None | UndefinedType = Undefined, + wan_carrier: str | None | UndefinedType = Undefined, + wan_circuit_id: str | None | UndefinedType = Undefined, + connected_to_pathfinder: bool | UndefinedType = Undefined, + cv_pathfinder_internet_exit: CvPathfinderInternetExit | UndefinedType = Undefined, + raw_eos_cli: str | None | UndefinedType = Undefined, flow_tracking: FlowTracking | UndefinedType = Undefined, + structured_config: StructuredConfig | UndefinedType = Undefined, _custom_data: dict[str, Any] | UndefinedType = Undefined, ) -> None: """ - WanHa. + L3InterfacesItem. Subclass of AvdModel. Args: - enabled: Enable / Disable auto CV-Pathfinder HA, when two nodes are defined in the same node_group. - ipsec: Enable / Disable IPsec over HA path-group when HA is enabled. - mtu: Set MTU on WAN HA interfaces. - ha_interfaces: - Local WAN HA interfaces - Overwrite the default behavior which is to pick all the `uplink_interfaces`. - Can be used to filter uplink interfaces when there are multiple uplinks. - Limitations: - Either all - interfaces must be uplinks or all interfaces must not be uplinks. - Only one interface is supported - for non uplinks. + profile: L3 interface profile name. Profile defined under `l3_interface_profiles`. + name: + Ethernet interface name like 'Ethernet2' or subinterface name like 'Ethernet2.42'. + For a + subinterface, the parent physical interface is automatically created. + description: + Interface description. + If not set a default description will be configured with '[[ + ]]'. + ip_address: Node IPv4 address/Mask or 'dhcp'. + dhcp_ip: + When the `ip_address` is `dhcp`, this optional field allows to indicate the expected + IPv4 address + (without mask) to be allocated on the interface if known. + This is not rendered in the configuration + but can be used for substitution of 'interface_ip' in the Access-list + set under `ipv4_acl_in` and + `ipv4_acl_out`. + public_ip: + Node IPv4 address (no mask). - Subclass of AvdList with `str` items. - ha_ipv4_pool: - IP address pool used for WAN HA connectivity. - IP is derived from the node ID. - Not used for uplink - interfaces. - max_ha_interfaces: - Number of parallel links towards HA switches. - Can be used to reserve IP addresses for future - parallel HA links. - port_channel_id: Port-channel ID to use for direct HA. - use_port_channel_for_direct_ha: - Enable or disable using a port-channel interface for direct HA when there is only one interface. - This feature was introduced in EOS 4.33.0F. + This is used to get the public IP (if known) when the device is behind + NAT. + This is only used for `wan_rr` routers (AutoVPN RRs and Pathfinders) to determine the Public IP + with the following preference: + `wan_route_servers.path_groups.interfaces.ip_address` + -> + `l3_interfaces.public_ip` + -> `l3_interfaces.ip_address` + + The determined Public IP is used + by WAN routers when peering with this interface. + encapsulation_dot1q_vlan: + For subinterfaces the dot1q vlan is derived from the interface name by default, but can also be + specified. + dhcp_accept_default_route: Accept a default route from DHCP if `ip_address` is set to `dhcp`. + enabled: Enable or Shutdown the interface. + speed: + Speed should be set in the format `` or `forced ` or `auto + `. + peer: The peer device name. Used for description and documentation. + peer_interface: The peer device interface. Used for description and documentation. + peer_ip: + The peer device IPv4 address (no mask). Used as default route gateway if `set_default_route` is true + and `ip` is an IP address. + bgp: + Enforce IPv4 BGP peering for the peer + + Subclass of AvdModel. + ipv4_acl_in: + Name of the IPv4 access-list to be assigned in the ingress direction. + The access-list must be + defined under `ipv4_acls` and supports field substitution for "interface_ip" and "peer_ip". + Required + for all WAN interfaces (`wan_carrier` is set) unless the carrier is marked as 'trusted' under + `wan_carriers`. + ipv4_acl_out: + Name of the IPv4 Access-list to be assigned in the egress direction. + The access-list must be defined + under `ipv4_acls` and supports field substitution for "interface_ip" and "peer_ip". + static_routes: + Configure IPv4 static routes pointing to `peer_ip`. + + Subclass of AvdList with `StaticRoutesItem` + items. + qos_profile: QOS service profile. + wan_carrier: + The WAN carrier this interface is connected to. + This is used to infer the path-groups in which this + interface should be configured. + Unless the carrier is marked as 'trusted' under `wan_carriers`, + `ipv4_acl_in` is also required on all WAN interfaces. + wan_circuit_id: + The WAN circuit ID for this interface. + This is not rendered in the configuration but used for WAN + designs. + connected_to_pathfinder: For a WAN interface (`wan_carrier` is set), allow to disable the static tunnel towards Pathfinders. + cv_pathfinder_internet_exit: + PREVIEW: This key is in preview mode + + Subclass of AvdModel. + raw_eos_cli: EOS CLI rendered directly on the interface in the final EOS configuration. flow_tracking: - Configures flow-tracking on the HA interfaces. Overrides `fabric_flow_tracking.wan_ha_links` - setting. + Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_interfaces` setting. + Subclass of AvdModel. + structured_config: + Custom structured config for the Ethernet interface. Subclass of AvdModel. _custom_data: _custom_data """ - class L3InterfacesItem(AvdModel): + class L3Interfaces(AvdIndexedList[str, L3InterfacesItem]): + """Subclass of AvdIndexedList with `L3InterfacesItem` items. Primary key is `name` (`str`).""" + + _primary_key: ClassVar[str] = "name" + + L3Interfaces._item_type = L3InterfacesItem + + class L3PortChannelsItem(AvdModel): """Subclass of AvdModel.""" + class MemberInterfacesItem(AvdModel): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = { + "name": {"type": str}, + "description": {"type": str}, + "peer": {"type": str}, + "peer_interface": {"type": str}, + "speed": {"type": str}, + "_custom_data": {"type": dict}, + } + name: str + """ + Ethernet interface name like 'Ethernet2'. + Member interface cannot be subinterface. + """ + description: str | None + """ + Interface description for this member. + If not set a default description will be configured with + '[[ ]]'. + """ + peer: str | None + """ + The peer device name. Used for description and documentation. + If not set, this inherits the peer + setting on the port-channel interface. + """ + peer_interface: str | None + """The peer device interface. Used for description and documentation.""" + speed: str | None + """ + Speed should be set in the format `` or `forced ` or `auto + `. + """ + _custom_data: dict[str, Any] + + if TYPE_CHECKING: + + def __init__( + self, + *, + name: str | UndefinedType = Undefined, + description: str | None | UndefinedType = Undefined, + peer: str | None | UndefinedType = Undefined, + peer_interface: str | None | UndefinedType = Undefined, + speed: str | None | UndefinedType = Undefined, + _custom_data: dict[str, Any] | UndefinedType = Undefined, + ) -> None: + """ + MemberInterfacesItem. + + + Subclass of AvdModel. + + Args: + name: + Ethernet interface name like 'Ethernet2'. + Member interface cannot be subinterface. + description: + Interface description for this member. + If not set a default description will be configured with + '[[ ]]'. + peer: + The peer device name. Used for description and documentation. + If not set, this inherits the peer + setting on the port-channel interface. + peer_interface: The peer device interface. Used for description and documentation. + speed: + Speed should be set in the format `` or `forced ` or `auto + `. + _custom_data: _custom_data + + """ + + class MemberInterfaces(AvdIndexedList[str, MemberInterfacesItem]): + """Subclass of AvdIndexedList with `MemberInterfacesItem` items. Primary key is `name` (`str`).""" + + _primary_key: ClassVar[str] = "name" + + MemberInterfaces._item_type = MemberInterfacesItem + class Bgp(AvdModel): """Subclass of AvdModel.""" @@ -51856,8 +56983,10 @@ def __init__( """ - class StaticRoutes(AvdList[StaticRoutesItem]): - """Subclass of AvdList with `StaticRoutesItem` items.""" + class StaticRoutes(AvdIndexedList[str, StaticRoutesItem]): + """Subclass of AvdIndexedList with `StaticRoutesItem` items. Primary key is `prefix` (`str`).""" + + _primary_key: ClassVar[str] = "prefix" StaticRoutes._item_type = StaticRoutesItem @@ -51972,22 +57101,22 @@ def __init__( """ - class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): + class StructuredConfig(EosCliConfigGen.PortChannelInterfacesItem): """Subclass of AvdModel.""" _fields: ClassVar[dict] = { - "profile": {"type": str}, "name": {"type": str}, "description": {"type": str}, + "mode": {"type": str, "default": "active"}, + "member_interfaces": {"type": MemberInterfaces}, "ip_address": {"type": str}, "dhcp_ip": {"type": str}, "public_ip": {"type": str}, "encapsulation_dot1q_vlan": {"type": int}, "dhcp_accept_default_route": {"type": bool, "default": True}, "enabled": {"type": bool, "default": True}, - "speed": {"type": str}, "peer": {"type": str}, - "peer_interface": {"type": str}, + "peer_port_channel": {"type": str}, "peer_ip": {"type": str}, "bgp": {"type": Bgp}, "ipv4_acl_in": {"type": str}, @@ -52003,19 +57132,32 @@ class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): "structured_config": {"type": StructuredConfig}, "_custom_data": {"type": dict}, } - profile: str | None - """L3 interface profile name. Profile defined under `l3_interface_profiles`.""" name: str """ - Ethernet interface name like 'Ethernet2' or subinterface name like 'Ethernet2.42'. + Port-Channel interface name like 'Port-Channel2' or subinterface name like 'Port-Channel2.42'. For a - subinterface, the parent physical interface is automatically created. + Port-Channel subinterface, the parent Port-Channel interface must be defined as well. """ description: str | None """ Interface description. If not set a default description will be configured with '[[ - ]]'. + ]]'. + """ + mode: Literal["active", "passive", "on"] + """ + Port-Channel mode. + Should not be set on Port-Channel subinterfaces. + + Default value: `"active"` + """ + member_interfaces: MemberInterfaces + """ + Port-Channel member interfaces. + Should not be set on Port-Channel subinterfaces. + + Subclass of + AvdIndexedList with `MemberInterfacesItem` items. Primary key is `name` (`str`). """ ip_address: str | None """Node IPv4 address/Mask or 'dhcp'.""" @@ -52039,11 +57181,11 @@ class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): with the following preference: `wan_route_servers.path_groups.interfaces.ip_address` -> - `l3_interfaces.public_ip` - -> `l3_interfaces.ip_address` + `l3_port_channels.public_ip` + -> `l3_port_channels.ip_address` - The determined Public IP is used - by WAN routers when peering with this interface. + The determined Public IP is + used by WAN routers when peering with this interface. """ encapsulation_dot1q_vlan: int | None """ @@ -52062,15 +57204,10 @@ class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): Default value: `True` """ - speed: str | None - """ - Speed should be set in the format `` or `forced ` or `auto - `. - """ peer: str | None """The peer device name. Used for description and documentation.""" - peer_interface: str | None - """The peer device interface. Used for description and documentation.""" + peer_port_channel: str | None + """The peer device port-channel interface. Used for description and documentation.""" peer_ip: str | None """ The peer device IPv4 address (no mask). Used as default route gateway if `set_default_route` is true @@ -52101,8 +57238,8 @@ class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): """ Configure IPv4 static routes pointing to `peer_ip`. - Subclass of AvdList with `StaticRoutesItem` - items. + Subclass of AvdIndexedList with + `StaticRoutesItem` items. Primary key is `prefix` (`str`). """ qos_profile: str | None """QOS service profile.""" @@ -52133,15 +57270,17 @@ class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): Subclass of AvdModel. """ raw_eos_cli: str | None - """EOS CLI rendered directly on the interface in the final EOS configuration.""" + """EOS CLI rendered directly on the Port-Channel interface in the final EOS configuration.""" flow_tracking: FlowTracking """ - Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_interfaces` setting. + Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_port_channels` + setting. + Subclass of AvdModel. """ structured_config: StructuredConfig """ - Custom structured config for the Ethernet interface. + Custom structured config for the Port-Channel interface. Subclass of AvdModel. """ @@ -52152,18 +57291,18 @@ class StructuredConfig(EosCliConfigGen.EthernetInterfacesItem): def __init__( self, *, - profile: str | None | UndefinedType = Undefined, name: str | UndefinedType = Undefined, description: str | None | UndefinedType = Undefined, + mode: Literal["active", "passive", "on"] | UndefinedType = Undefined, + member_interfaces: MemberInterfaces | UndefinedType = Undefined, ip_address: str | None | UndefinedType = Undefined, dhcp_ip: str | None | UndefinedType = Undefined, public_ip: str | None | UndefinedType = Undefined, encapsulation_dot1q_vlan: int | None | UndefinedType = Undefined, dhcp_accept_default_route: bool | UndefinedType = Undefined, enabled: bool | UndefinedType = Undefined, - speed: str | None | UndefinedType = Undefined, peer: str | None | UndefinedType = Undefined, - peer_interface: str | None | UndefinedType = Undefined, + peer_port_channel: str | None | UndefinedType = Undefined, peer_ip: str | None | UndefinedType = Undefined, bgp: Bgp | UndefinedType = Undefined, ipv4_acl_in: str | None | UndefinedType = Undefined, @@ -52180,21 +57319,29 @@ def __init__( _custom_data: dict[str, Any] | UndefinedType = Undefined, ) -> None: """ - L3InterfacesItem. + L3PortChannelsItem. Subclass of AvdModel. Args: - profile: L3 interface profile name. Profile defined under `l3_interface_profiles`. name: - Ethernet interface name like 'Ethernet2' or subinterface name like 'Ethernet2.42'. + Port-Channel interface name like 'Port-Channel2' or subinterface name like 'Port-Channel2.42'. For a - subinterface, the parent physical interface is automatically created. + Port-Channel subinterface, the parent Port-Channel interface must be defined as well. description: Interface description. If not set a default description will be configured with '[[ - ]]'. + ]]'. + mode: + Port-Channel mode. + Should not be set on Port-Channel subinterfaces. + member_interfaces: + Port-Channel member interfaces. + Should not be set on Port-Channel subinterfaces. + + Subclass of + AvdIndexedList with `MemberInterfacesItem` items. Primary key is `name` (`str`). ip_address: Node IPv4 address/Mask or 'dhcp'. dhcp_ip: When the `ip_address` is `dhcp`, this optional field allows to indicate the expected @@ -52213,21 +57360,18 @@ def __init__( with the following preference: `wan_route_servers.path_groups.interfaces.ip_address` -> - `l3_interfaces.public_ip` - -> `l3_interfaces.ip_address` + `l3_port_channels.public_ip` + -> `l3_port_channels.ip_address` - The determined Public IP is used - by WAN routers when peering with this interface. + The determined Public IP is + used by WAN routers when peering with this interface. encapsulation_dot1q_vlan: For subinterfaces the dot1q vlan is derived from the interface name by default, but can also be specified. dhcp_accept_default_route: Accept a default route from DHCP if `ip_address` is set to `dhcp`. enabled: Enable or Shutdown the interface. - speed: - Speed should be set in the format `` or `forced ` or `auto - `. peer: The peer device name. Used for description and documentation. - peer_interface: The peer device interface. Used for description and documentation. + peer_port_channel: The peer device port-channel interface. Used for description and documentation. peer_ip: The peer device IPv4 address (no mask). Used as default route gateway if `set_default_route` is true and `ip` is an IP address. @@ -52249,8 +57393,8 @@ def __init__( static_routes: Configure IPv4 static routes pointing to `peer_ip`. - Subclass of AvdList with `StaticRoutesItem` - items. + Subclass of AvdIndexedList with + `StaticRoutesItem` items. Primary key is `prefix` (`str`). qos_profile: QOS service profile. wan_carrier: The WAN carrier this interface is connected to. @@ -52267,24 +57411,26 @@ def __init__( PREVIEW: This key is in preview mode Subclass of AvdModel. - raw_eos_cli: EOS CLI rendered directly on the interface in the final EOS configuration. + raw_eos_cli: EOS CLI rendered directly on the Port-Channel interface in the final EOS configuration. flow_tracking: - Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_interfaces` setting. + Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_port_channels` + setting. + Subclass of AvdModel. structured_config: - Custom structured config for the Ethernet interface. + Custom structured config for the Port-Channel interface. Subclass of AvdModel. _custom_data: _custom_data """ - class L3Interfaces(AvdIndexedList[str, L3InterfacesItem]): - """Subclass of AvdIndexedList with `L3InterfacesItem` items. Primary key is `name` (`str`).""" + class L3PortChannels(AvdIndexedList[str, L3PortChannelsItem]): + """Subclass of AvdIndexedList with `L3PortChannelsItem` items. Primary key is `name` (`str`).""" _primary_key: ClassVar[str] = "name" - L3Interfaces._item_type = L3InterfacesItem + L3PortChannels._item_type = L3PortChannelsItem _fields: ClassVar[dict] = { "name": {"type": str}, @@ -52392,6 +57538,7 @@ class L3Interfaces(AvdIndexedList[str, L3InterfacesItem]): "wan_ha": {"type": WanHa}, "dps_mss_ipv4": {"type": str, "default": "auto"}, "l3_interfaces": {"type": L3Interfaces}, + "l3_port_channels": {"type": L3PortChannels}, "data_plane_cpu_allocation_max": {"type": int}, "flow_tracker_type": {"type": str}, "_custom_data": {"type": dict}, @@ -53164,6 +58311,15 @@ class L3Interfaces(AvdIndexedList[str, L3InterfacesItem]): Subclass of AvdIndexedList with `L3InterfacesItem` items. Primary key is `name` (`str`). """ + l3_port_channels: L3PortChannels + """ + L3 Port-Channel interfaces to configure on the node. + Used to define the node for WAN interfaces when + `wan_carrier` is set. + + Subclass of AvdIndexedList with `L3PortChannelsItem` items. Primary key is + `name` (`str`). + """ data_plane_cpu_allocation_max: int | None """ Set the maximum number of CPU used for the data plane. @@ -53289,6 +58445,7 @@ def __init__( wan_ha: WanHa | UndefinedType = Undefined, dps_mss_ipv4: str | UndefinedType = Undefined, l3_interfaces: L3Interfaces | UndefinedType = Undefined, + l3_port_channels: L3PortChannels | UndefinedType = Undefined, data_plane_cpu_allocation_max: int | None | UndefinedType = Undefined, flow_tracker_type: Literal["sampled", "hardware"] | None | UndefinedType = Undefined, _custom_data: dict[str, Any] | UndefinedType = Undefined, @@ -53836,6 +58993,13 @@ def __init__( Subclass of AvdIndexedList with `L3InterfacesItem` items. Primary key is `name` (`str`). + l3_port_channels: + L3 Port-Channel interfaces to configure on the node. + Used to define the node for WAN interfaces when + `wan_carrier` is set. + + Subclass of AvdIndexedList with `L3PortChannelsItem` items. Primary key is + `name` (`str`). data_plane_cpu_allocation_max: Set the maximum number of CPU used for the data plane. This setting is useful on virtual Route 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 df00851d787..f973ed12c19 100644 --- a/python-avd/pyavd/_eos_designs/schema/eos_designs.schema.yml +++ b/python-avd/pyavd/_eos_designs/schema/eos_designs.schema.yml @@ -1434,6 +1434,10 @@ keys: tenants.vrfs.l3_interfaces. type: dict $ref: eos_designs#/keys/fabric_flow_tracking/keys/uplinks + l3_port_channels: + description: Enable flow-tracking on all node.l3_port_channels. + type: dict + $ref: eos_designs#/keys/fabric_flow_tracking/keys/uplinks dps_interfaces: description: Enable flow-tracking on all dps_interfaces. type: dict @@ -9549,7 +9553,7 @@ $defs: - active - passive - 'on' - default: 'on' + default: active member_interfaces: description: 'Port-Channel member interfaces. @@ -9683,12 +9687,12 @@ $defs: description: Configure IPv4 static routes pointing to `peer_ip`. type: list min_length: 1 + primary_key: prefix items: type: dict keys: prefix: type: str - required: true description: IPv4_network/Mask. qos_profile: type: str @@ -9737,12 +9741,12 @@ $defs: Examples: ''1-3'' or ''100,200,300''' raw_eos_cli: type: str - description: EOS CLI rendered directly on the interface in the final EOS - configuration. + description: EOS CLI rendered directly on the Port-Channel interface in + the final EOS configuration. flow_tracking: type: dict $ref: eos_designs#/$defs/flow_tracking_link - description: Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_interfaces` + description: Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_port_channels` setting. structured_config: type: dict diff --git a/python-avd/pyavd/_eos_designs/schema/schema_fragments/defs_node_type_l3_port_channels.schema.yml b/python-avd/pyavd/_eos_designs/schema/schema_fragments/defs_node_type_l3_port_channels.schema.yml index 2478adf2783..70f1f7b7b16 100644 --- a/python-avd/pyavd/_eos_designs/schema/schema_fragments/defs_node_type_l3_port_channels.schema.yml +++ b/python-avd/pyavd/_eos_designs/schema/schema_fragments/defs_node_type_l3_port_channels.schema.yml @@ -33,7 +33,7 @@ $defs: - "active" - "passive" - "on" - default: "on" + default: "active" member_interfaces: description: |- Port-Channel member interfaces. @@ -162,12 +162,12 @@ $defs: description: Configure IPv4 static routes pointing to `peer_ip`. type: list min_length: 1 + primary_key: prefix items: type: dict keys: prefix: type: str - required: true description: IPv4_network/Mask. qos_profile: type: str @@ -212,12 +212,12 @@ $defs: Examples: '1-3' or '100,200,300' raw_eos_cli: type: str - description: EOS CLI rendered directly on the interface in the final EOS configuration. + description: EOS CLI rendered directly on the Port-Channel interface in the final EOS configuration. flow_tracking: type: dict $ref: "eos_designs#/$defs/flow_tracking_link" description: |- - Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_interfaces` setting. + Configures flow-tracking on the interface. Overrides `fabric_flow_tracking.l3_port_channels` setting. structured_config: type: dict documentation_options: diff --git a/python-avd/pyavd/_eos_designs/schema/schema_fragments/fabric_flow_tracking.schema.yml b/python-avd/pyavd/_eos_designs/schema/schema_fragments/fabric_flow_tracking.schema.yml index 5b25f4a1e1d..fa4af77d0ba 100644 --- a/python-avd/pyavd/_eos_designs/schema/schema_fragments/fabric_flow_tracking.schema.yml +++ b/python-avd/pyavd/_eos_designs/schema/schema_fragments/fabric_flow_tracking.schema.yml @@ -50,6 +50,10 @@ keys: description: Enable flow-tracking on all node.l3_interfaces and network-services tenants.vrfs.l3_interfaces. type: dict $ref: eos_designs#/keys/fabric_flow_tracking/keys/uplinks + l3_port_channels: + description: Enable flow-tracking on all node.l3_port_channels. + type: dict + $ref: eos_designs#/keys/fabric_flow_tracking/keys/uplinks dps_interfaces: description: Enable flow-tracking on all dps_interfaces. type: dict diff --git a/python-avd/pyavd/_eos_designs/shared_utils/__init__.py b/python-avd/pyavd/_eos_designs/shared_utils/__init__.py index 511e8eea589..7da72abeb76 100644 --- a/python-avd/pyavd/_eos_designs/shared_utils/__init__.py +++ b/python-avd/pyavd/_eos_designs/shared_utils/__init__.py @@ -11,6 +11,7 @@ from .interface_descriptions import InterfaceDescriptionsMixin from .ip_addressing import IpAddressingMixin from .l3_interfaces import L3InterfacesMixin +from .l3_port_channels import L3PortChannelsMixin from .link_tracking_groups import LinkTrackingGroupsMixin from .mgmt import MgmtMixin from .misc import MiscMixin @@ -34,6 +35,7 @@ class SharedUtils( IpAddressingMixin, LinkTrackingGroupsMixin, L3InterfacesMixin, + L3PortChannelsMixin, CvTopology, MgmtMixin, MlagMixin, diff --git a/python-avd/pyavd/_eos_designs/shared_utils/flow_tracking.py b/python-avd/pyavd/_eos_designs/shared_utils/flow_tracking.py index aeb043eb602..b7edb0648ee 100644 --- a/python-avd/pyavd/_eos_designs/shared_utils/flow_tracking.py +++ b/python-avd/pyavd/_eos_designs/shared_utils/flow_tracking.py @@ -19,6 +19,7 @@ | EosDesigns.L3Edge.P2pLinksItem.FlowTracking | EosDesigns._DynamicKeys.DynamicNodeTypesItem.NodeTypes.NodesItem.WanHa.FlowTracking | EosDesigns._DynamicKeys.DynamicNodeTypesItem.NodeTypes.NodesItem.L3InterfacesItem.FlowTracking + | EosDesigns._DynamicKeys.DynamicNodeTypesItem.NodeTypes.NodesItem.L3PortChannelsItem.FlowTracking | EosDesigns.FabricFlowTracking.MlagInterfaces | EosDesigns.FabricFlowTracking.DpsInterfaces | EosDesigns.FabricFlowTracking.Uplinks @@ -60,6 +61,9 @@ def get_flow_tracker(self: SharedUtils, flow_tracking: FlowTracking) -> dict[str case EosDesigns._DynamicKeys.DynamicNodeTypesItem.NodeTypes.NodesItem.L3InterfacesItem.FlowTracking(): enabled: bool = default(flow_tracking.enabled, self.inputs.fabric_flow_tracking.l3_interfaces.enabled) name: str = default(flow_tracking.name, self.inputs.fabric_flow_tracking.l3_interfaces.name) + case EosDesigns._DynamicKeys.DynamicNodeTypesItem.NodeTypes.NodesItem.L3PortChannelsItem.FlowTracking(): + enabled: bool = default(flow_tracking.enabled, self.inputs.fabric_flow_tracking.l3_port_channels.enabled) + name: str = default(flow_tracking.name, self.inputs.fabric_flow_tracking.l3_port_channels.name) case ( EosDesigns.FabricFlowTracking.MlagInterfaces() | EosDesigns.FabricFlowTracking.DpsInterfaces() diff --git a/python-avd/pyavd/_eos_designs/shared_utils/l3_interfaces.py b/python-avd/pyavd/_eos_designs/shared_utils/l3_interfaces.py index 61537193d91..14d170c2533 100644 --- a/python-avd/pyavd/_eos_designs/shared_utils/l3_interfaces.py +++ b/python-avd/pyavd/_eos_designs/shared_utils/l3_interfaces.py @@ -8,7 +8,6 @@ from pyavd._eos_designs.schema import EosDesigns from pyavd._errors import AristaAvdInvalidInputsError -from pyavd.api.interface_descriptions import InterfaceDescriptionData if TYPE_CHECKING: from . import SharedUtils @@ -57,51 +56,5 @@ def l3_interfaces(self: SharedUtils) -> EosDesigns._DynamicKeys.DynamicNodeTypes @cached_property def l3_interfaces_bgp_neighbors(self: SharedUtils) -> list: - neighbors = [] - for interface in self.l3_interfaces: - if not (interface.peer_ip and interface.bgp): - continue - - peer_as = interface.bgp.peer_as - if peer_as is None: - msg = f"'l3_interfaces[{interface.name}].bgp.peer_as' needs to be set to enable BGP." - raise AristaAvdInvalidInputsError(msg) - - is_intf_wan = bool(interface.wan_carrier) - - if not interface.bgp.ipv4_prefix_list_in and is_intf_wan: - msg = f"BGP is enabled but 'bgp.ipv4_prefix_list_in' is not configured for l3_interfaces[{interface.name}]" - raise AristaAvdInvalidInputsError(msg) - - description = interface.description - if not description: - description = self.interface_descriptions.underlay_ethernet_interface( - InterfaceDescriptionData( - shared_utils=self, - interface=interface.name, - peer=interface.peer, - peer_interface=interface.peer_interface, - wan_carrier=interface.wan_carrier, - wan_circuit_id=interface.wan_circuit_id, - ), - ) - - neighbor = { - "ip_address": interface.peer_ip, - "remote_as": peer_as, - "description": description, - } - - neighbor["ipv4_prefix_list_in"] = interface.bgp.ipv4_prefix_list_in - neighbor["ipv4_prefix_list_out"] = interface.bgp.ipv4_prefix_list_out - if is_intf_wan: - neighbor["set_no_advertise"] = True - - # The inbound route-map is only used if there is a prefix list or no-advertise - if neighbor["ipv4_prefix_list_in"] or neighbor.get("set_no_advertise") is True: - neighbor["route_map_in"] = f"RM-BGP-{neighbor['ip_address']}-IN" - neighbor["route_map_out"] = f"RM-BGP-{neighbor['ip_address']}-OUT" - - neighbors.append(neighbor) - - return neighbors + interface_type = "l3_interface" + return self.get_l3_generic_interface_bgp_neighbors(interface_type) diff --git a/python-avd/pyavd/_eos_designs/shared_utils/l3_port_channels.py b/python-avd/pyavd/_eos_designs/shared_utils/l3_port_channels.py new file mode 100644 index 00000000000..ab71e934dfb --- /dev/null +++ b/python-avd/pyavd/_eos_designs/shared_utils/l3_port_channels.py @@ -0,0 +1,31 @@ +# Copyright (c) 2023-2024 Arista Networks, Inc. +# Use of this source code is governed by the Apache License 2.0 +# that can be found in the LICENSE file. +from __future__ import annotations + +from functools import cached_property +from typing import TYPE_CHECKING + +from pyavd._eos_designs.schema import EosDesigns + +if TYPE_CHECKING: + from . import SharedUtils + + +class L3PortChannelsMixin: + """ + Mixin Class providing a subset of SharedUtils. + + Class should only be used as Mixin to the SharedUtils class. + Using type-hint on self to get proper type-hints on attributes across all Mixins. + """ + + @cached_property + def l3_port_channels(self: SharedUtils) -> EosDesigns._DynamicKeys.DynamicNodeTypesItem.NodeTypes.NodesItem.L3PortChannels: + """Returns the list of l3_port_channels.""" + return EosDesigns._DynamicKeys.DynamicNodeTypesItem.NodeTypes.NodesItem.L3PortChannels(list(self.node_config.l3_port_channels)) + + @cached_property + def l3_port_channels_bgp_neighbors(self: SharedUtils) -> list: + interface_type = "l3_port_channel" + return self.get_l3_generic_interface_bgp_neighbors(interface_type) diff --git a/python-avd/pyavd/_eos_designs/shared_utils/misc.py b/python-avd/pyavd/_eos_designs/shared_utils/misc.py index bf7a7b88ac7..521250cc840 100644 --- a/python-avd/pyavd/_eos_designs/shared_utils/misc.py +++ b/python-avd/pyavd/_eos_designs/shared_utils/misc.py @@ -4,10 +4,11 @@ from __future__ import annotations from functools import cached_property -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, Literal from pyavd._errors import AristaAvdError, AristaAvdInvalidInputsError, AristaAvdMissingVariableError from pyavd._utils import default, get +from pyavd.api.interface_descriptions import InterfaceDescriptionData from pyavd.j2filters import range_expand if TYPE_CHECKING: @@ -233,3 +234,79 @@ def _get_ipv4_acl_field_with_substitution(field_value: str, replacements: dict[s return value return field_value + + def get_l3_generic_interface_bgp_neighbors(self: SharedUtils, interface_type: Literal["l3_interface", "l3_port_channel"]) -> list: + """ + Fetches bgp neighbors for given interface_type. + + Fetches bgp neighbors (list of dict) for all interfaces belonging to specified interface_type such as: + 'l3_interface' or 'l3_port_channel'. + """ + neighbors = [] + if interface_type == "l3_interface": + generic_interfaces = self.l3_interfaces + node_type_in_schema = "l3_interfaces" + else: + # implies L3 Port-Channel interface type + generic_interfaces = self.l3_port_channels + node_type_in_schema = "l3_port_channels" + + for interface in generic_interfaces: + if not (interface.peer_ip and interface.bgp): + continue + + peer_as = interface.bgp.peer_as + if peer_as is None: + msg = f"'{node_type_in_schema}[{interface.name}].bgp.peer_as' needs to be set to enable BGP." + raise AristaAvdInvalidInputsError(msg) + + is_intf_wan = bool(interface.wan_carrier) + + if not interface.bgp.ipv4_prefix_list_in and is_intf_wan: + msg = f"BGP is enabled but 'bgp.ipv4_prefix_list_in' is not configured for {node_type_in_schema}[{interface.name}]" + raise AristaAvdInvalidInputsError(msg) + + description = interface.description + if not description: + if interface_type == "l3_interface": + description = self.interface_descriptions.underlay_ethernet_interface( + InterfaceDescriptionData( + shared_utils=self, + interface=interface.name, + peer=interface.peer, + peer_interface=interface.peer_interface, + wan_carrier=interface.wan_carrier, + wan_circuit_id=interface.wan_circuit_id, + ), + ) + else: + description = self.interface_descriptions.underlay_port_channel_interface( + InterfaceDescriptionData( + shared_utils=self, + interface=interface.name, + peer=interface.peer, + peer_interface=interface.peer_port_channel, + wan_carrier=interface.wan_carrier, + wan_circuit_id=interface.wan_circuit_id, + ), + ) + + neighbor = { + "ip_address": interface.peer_ip, + "remote_as": peer_as, + "description": description, + } + + neighbor["ipv4_prefix_list_in"] = interface.bgp.ipv4_prefix_list_in + neighbor["ipv4_prefix_list_out"] = interface.bgp.ipv4_prefix_list_out + if is_intf_wan: + neighbor["set_no_advertise"] = True + + # The inbound route-map is only used if there is a prefix list or no-advertise + if neighbor["ipv4_prefix_list_in"] or neighbor.get("set_no_advertise") is True: + neighbor["route_map_in"] = f"RM-BGP-{neighbor['ip_address']}-IN" + neighbor["route_map_out"] = f"RM-BGP-{neighbor['ip_address']}-OUT" + + neighbors.append(neighbor) + + return neighbors diff --git a/python-avd/pyavd/_eos_designs/structured_config/underlay/ethernet_interfaces.py b/python-avd/pyavd/_eos_designs/structured_config/underlay/ethernet_interfaces.py index b082ff69790..035b7923c2d 100644 --- a/python-avd/pyavd/_eos_designs/structured_config/underlay/ethernet_interfaces.py +++ b/python-avd/pyavd/_eos_designs/structured_config/underlay/ethernet_interfaces.py @@ -303,6 +303,18 @@ def ethernet_interfaces(self: AvdStructuredConfigUnderlay) -> list | None: context_keys=["name", "peer", "peer_interface"], ) + # Member ethernet ports for Port-Channel interface + for l3_port_channel in self.shared_utils.l3_port_channels: + member_eth_intfs = self._get_l3_port_channel_member_ports_cfg(l3_port_channel) + for member_eth_intf in member_eth_intfs: + append_if_not_duplicate( + list_of_dicts=ethernet_interfaces, + primary_key="name", + new_dict=member_eth_intf, + context=f"Ethernet interface defined under 'member_interfaces' for {self.shared_utils.node_type_key_data.key} l3_port_channels", + context_keys=["name", "peer", "peer_interface"], + ) + if ethernet_interfaces: return ethernet_interfaces diff --git a/python-avd/pyavd/_eos_designs/structured_config/underlay/port_channel_interfaces.py b/python-avd/pyavd/_eos_designs/structured_config/underlay/port_channel_interfaces.py index a9264779d2a..8b715c31770 100644 --- a/python-avd/pyavd/_eos_designs/structured_config/underlay/port_channel_interfaces.py +++ b/python-avd/pyavd/_eos_designs/structured_config/underlay/port_channel_interfaces.py @@ -6,6 +6,7 @@ from functools import cached_property from typing import TYPE_CHECKING +from pyavd._errors import AristaAvdInvalidInputsError from pyavd._utils import append_if_not_duplicate, get, short_esi_to_route_target, strip_null_from_data from pyavd.api.interface_descriptions import InterfaceDescriptionData @@ -109,6 +110,47 @@ def port_channel_interfaces(self: AvdStructuredConfigUnderlay) -> list | None: port_channel_interfaces.append(port_channel_interface) + # Support l3_port_channels including sub-interfaces + subif_parent_port_channel_names = set() + regular_l3_port_channel_names = set() + for l3_port_channel in self.shared_utils.l3_port_channels: + interface_name = l3_port_channel.name + if "." in interface_name: + # This is a subinterface for a port-channel interface. + # We need to ensure that parent port-channel interface is also included explicitly + # within list of Port-Channel interfaces. + parent_port_channel_name = interface_name.split(".", maxsplit=1)[0] + subif_parent_port_channel_names.add(parent_port_channel_name) + # TODO: Unable to add validation for 'mode' setting for Port-Channel sub-interface. + # Since we have default value specified in schema for this, + # we end up finding default value even when no explicit value is specified. + if l3_port_channel.member_interfaces: + msg = f"Port-Channel sub-interface '{l3_port_channel}' has 'member_interfaces' set.This is not a valid setting." + raise AristaAvdInvalidInputsError(msg) + else: + # This is a regular Port-Channel (not sub-interface) + regular_l3_port_channel_names.add(interface_name) + + # Sanity check if the parent Port-channel for sub-interface is specified + for parent_port_channel in subif_parent_port_channel_names: + if parent_port_channel not in regular_l3_port_channel_names: + msg = "At least one L3 Port-Channel subinterface does not have parent Port-Channel interface specified." + raise AristaAvdInvalidInputsError(msg) + + # Now that validation is complete, we can make another pass at all l3_port_channels + # (subinterfaces or otherwise) and generate their structured config. + # Note: structured config for individual member ethernet ports of each port-channel + # would be generated by logic within EthernetInterfacesMixin class. + for l3_port_channel in self.shared_utils.l3_port_channels: + port_channel_interface = self._get_l3_port_channel_cfg(l3_port_channel) + append_if_not_duplicate( + list_of_dicts=port_channel_interfaces, + primary_key="name", + new_dict=port_channel_interface, + context=f"L3 Port-Channel interfaces defined under {self.shared_utils.node_type_key_data.key} l3_port_channels", + context_keys=["name", "peer", "peer_port_channel"], + ) + # WAN HA interface for direct connection if (port_channel_interface := self._get_direct_ha_port_channel_interface()) is not None: append_if_not_duplicate( diff --git a/python-avd/pyavd/_eos_designs/structured_config/underlay/utils.py b/python-avd/pyavd/_eos_designs/structured_config/underlay/utils.py index 556bc1d8dc9..9cd8b5dba44 100644 --- a/python-avd/pyavd/_eos_designs/structured_config/underlay/utils.py +++ b/python-avd/pyavd/_eos_designs/structured_config/underlay/utils.py @@ -4,8 +4,9 @@ from __future__ import annotations from functools import cached_property -from typing import TYPE_CHECKING +from typing import TYPE_CHECKING, Literal +from pyavd._eos_designs.schema import EosDesigns from pyavd._errors import AristaAvdError, AristaAvdMissingVariableError from pyavd._utils import default, get, get_ip_from_ip_prefix, get_item, strip_empties_from_dict from pyavd.api.interface_descriptions import InterfaceDescriptionData @@ -150,65 +151,157 @@ def _get_l3_interface_cfg( self: AvdStructuredConfigUnderlay, l3_interface: EosDesigns._DynamicKeys.DynamicNodeTypesItem.NodeTypes.NodesItem.L3InterfacesItem ) -> dict | None: """Returns structured_configuration for one L3 interface.""" - interface_description = l3_interface.description + interface_type = "l3_interface" + return self._get_l3_generic_interface_cfg(l3_interface, interface_type) + + def _get_l3_port_channel_cfg( + self: AvdStructuredConfigUnderlay, l3_port_channel: EosDesigns._DynamicKeys.DynamicNodeTypesItem.NodeTypes.NodesItem.L3PortChannelsItem + ) -> dict | None: + """Returns structured_configuration for one L3 Port-Channel.""" + interface_type = "l3_port_channel" + return self._get_l3_generic_interface_cfg(l3_port_channel, interface_type) + + def _get_l3_generic_interface_cfg( + self: AvdStructuredConfigUnderlay, + l3_generic_interface: ( + EosDesigns._DynamicKeys.DynamicNodeTypesItem.NodeTypes.NodesItem.L3InterfacesItem + | EosDesigns._DynamicKeys.DynamicNodeTypesItem.NodeTypes.NodesItem.L3PortChannelsItem + ), + interface_type: Literal["l3_interface", "l3_port_channel"], + ) -> dict | None: + """Returns structured_configuration for one L3 interface or L3 Port-Channel.""" + if interface_type == "l3_interface": + node_type_in_schema = "l3_interfaces" + intf_ref_in_msg = "L3 interface" + else: + # implies interface_type is "l3_port_channel" + node_type_in_schema = "l3_port_channels" + intf_ref_in_msg = "L3 Port-Channel" + + interface_description = l3_generic_interface.description if not interface_description: - interface_description = self.shared_utils.interface_descriptions.underlay_ethernet_interface( - InterfaceDescriptionData( - shared_utils=self.shared_utils, - interface=l3_interface.name, - peer=l3_interface.peer, - peer_interface=l3_interface.peer_interface, - wan_carrier=l3_interface.wan_carrier, - wan_circuit_id=l3_interface.wan_circuit_id, - ), - ) + if interface_type == "l3_interface": + interface_description = self.shared_utils.interface_descriptions.underlay_ethernet_interface( + InterfaceDescriptionData( + shared_utils=self.shared_utils, + interface=l3_generic_interface.name, + peer=l3_generic_interface.peer, + peer_interface=l3_generic_interface.peer_interface, + wan_carrier=l3_generic_interface.wan_carrier, + wan_circuit_id=l3_generic_interface.wan_circuit_id, + ), + ) + else: + # interface is L3 Port-Channel interface + interface_description = self.shared_utils.interface_descriptions.underlay_port_channel_interface( + InterfaceDescriptionData( + shared_utils=self.shared_utils, + interface=l3_generic_interface.name, + peer=l3_generic_interface.peer, + peer_interface=l3_generic_interface.peer_port_channel, + wan_carrier=l3_generic_interface.wan_carrier, + wan_circuit_id=l3_generic_interface.wan_circuit_id, + ), + ) # TODO: catch if ip_address is not valid or not dhcp - if not l3_interface.ip_address: - msg = f"{self.shared_utils.node_type_key_data.key}.nodes[name={self.shared_utils.hostname}].l3_interfaces[name={l3_interface.name}].ip_address" + if not l3_generic_interface.ip_address: + msg = f"{self.shared_utils.node_type_key_data.key}.nodes[name={self.shared_utils.hostname}].{node_type_in_schema}" + msg += f"[name={l3_generic_interface.name}].ip_address" raise AristaAvdMissingVariableError(msg) interface = { - "name": l3_interface.name, - "peer_type": "l3_interface", - "peer": l3_interface.peer, - "peer_interface": l3_interface.peer_interface, - "ip_address": l3_interface.ip_address, - "shutdown": not l3_interface.enabled, - "switchport": {"enabled": False if "." not in l3_interface.name else None}, + "name": l3_generic_interface.name, + "peer_type": interface_type, + "peer": l3_generic_interface.peer, + "peer_interface": l3_generic_interface.peer_interface if interface_type == "l3_interface" else l3_generic_interface.peer_port_channel, + "ip_address": l3_generic_interface.ip_address, + "shutdown": not l3_generic_interface.enabled, + "switchport": {"enabled": False if "." not in l3_generic_interface.name else None}, "description": interface_description, - "speed": l3_interface.speed, - "service_profile": l3_interface.qos_profile, - "access_group_in": get(self._l3_interface_acls, f"{l3_interface.name}..ipv4_acl_in..name", separator=".."), - "access_group_out": get(self._l3_interface_acls, f"{l3_interface.name}..ipv4_acl_out..name", separator=".."), - "eos_cli": l3_interface.raw_eos_cli, - "struct_cfg": l3_interface.structured_config._as_dict(strip_values=()), - "flow_tracker": self.shared_utils.get_flow_tracker(l3_interface.flow_tracking), + "speed": l3_generic_interface.speed if interface_type == "l3_interface" else None, + "service_profile": l3_generic_interface.qos_profile, + "eos_cli": l3_generic_interface.raw_eos_cli, + "struct_cfg": l3_generic_interface.structured_config._as_dict(strip_values=()), + "flow_tracker": self.shared_utils.get_flow_tracker(l3_generic_interface.flow_tracking), } - if self.inputs.fabric_sflow.l3_interfaces is not None: - interface["sflow"] = {"enable": self.inputs.fabric_sflow.l3_interfaces} - - if "." in l3_interface.name: - interface["encapsulation_dot1q"] = {"vlan": default(l3_interface.encapsulation_dot1q_vlan, int(l3_interface.name.split(".", maxsplit=1)[-1]))} - - if l3_interface.ip_address == "dhcp" and l3_interface.dhcp_accept_default_route: - interface["dhcp_client_accept_default_route"] = True + if interface_type == "l3_interface": + if self.inputs.fabric_sflow.l3_interfaces is not None: + interface["sflow"] = {"enable": self.inputs.fabric_sflow.l3_interfaces} + interface["access_group_in"] = get(self._l3_interface_acls, f"{l3_generic_interface.name}..ipv4_acl_in..name", separator="..") + interface["access_group_out"] = get(self._l3_interface_acls, f"{l3_generic_interface.name}..ipv4_acl_out..name", separator="..") + # TODO: Move this to common logic upon adding support to eos_cli_config_gen to handle this setting for Port-channel interface + if l3_generic_interface.ip_address == "dhcp" and l3_generic_interface.dhcp_accept_default_route: + interface["dhcp_client_accept_default_route"] = True + else: + # logic for L3 Port-Channel + interface["access_group_in"] = get(self._l3_port_channel_acls, f"{l3_generic_interface.name}..ipv4_acl_in..name", separator="..") + interface["access_group_out"] = get(self._l3_port_channel_acls, f"{l3_generic_interface.name}..ipv4_acl_out..name", separator="..") + + if "." in l3_generic_interface.name: + interface["encapsulation_dot1q"] = { + "vlan": default(l3_generic_interface.encapsulation_dot1q_vlan, int(l3_generic_interface.name.split(".", maxsplit=1)[-1])) + } if ( self.shared_utils.is_wan_router - and (wan_carrier_name := l3_interface.wan_carrier) is not None + and (wan_carrier_name := l3_generic_interface.wan_carrier) is not None and interface["access_group_in"] is None and (wan_carrier_name not in self.inputs.wan_carriers or not self.inputs.wan_carriers[wan_carrier_name].trusted) ): msg = ( "'ipv4_acl_in' must be set on WAN interfaces where 'wan_carrier' is set, unless the carrier is configured as 'trusted' " - f"under 'wan_carriers'. 'ipv4_acl_in' is missing on interface '{l3_interface.name}'." + f"under 'wan_carriers'. 'ipv4_acl_in' is missing on {intf_ref_in_msg} '{l3_generic_interface.name}'." ) raise AristaAvdError(msg) return strip_empties_from_dict(interface) + def _get_l3_port_channel_member_ports_cfg( + self: AvdStructuredConfigUnderlay, l3_port_channel: EosDesigns._DynamicKeys.DynamicNodeTypesItem.NodeTypes.NodesItem.L3PortChannelsItem + ) -> list: + """Returns structured_configuration (list of ethernet interfaces) representing member ports for one L3 Port-Channel.""" + ethernet_interfaces = [] + # sub-interface for l3_port_channel cannot have member eth ports. + # skip any logic to generate member port config for such sub-interfaces + if "." in l3_port_channel.name: + return ethernet_interfaces + channel_group_id = l3_port_channel.name.split("Port-Channel")[-1] + for member_intf in l3_port_channel.member_interfaces: + interface_description = member_intf.description + # derive values for peer, peer_interface from parent L3 port-channel + # if not defined explicitly for member interface + peer = member_intf.peer if member_intf.peer else l3_port_channel.peer + peer_interface = member_intf.peer_interface if member_intf.peer_interface else l3_port_channel.peer_port_channel + if not interface_description: + interface_description = self.shared_utils.interface_descriptions.underlay_ethernet_interface( + InterfaceDescriptionData( + shared_utils=self.shared_utils, + interface=member_intf.name, + peer=peer, + peer_interface=peer_interface, + wan_carrier=l3_port_channel.wan_carrier, + wan_circuit_id=l3_port_channel.wan_circuit_id, + ), + ) + ethernet_interface = { + "name": member_intf.name, + "description": interface_description, + "peer_type": "l3_port_channel", + "peer": peer, + "peer_interface": peer_interface, + "shutdown": not l3_port_channel.enabled, + "switchport": {"enabled": False}, + "speed": member_intf.speed if member_intf.speed else None, + "channel_group": { + "id": int(channel_group_id), + "mode": l3_port_channel.mode, + }, + } + ethernet_interfaces.append(strip_empties_from_dict(ethernet_interface)) + return ethernet_interfaces + def _get_l3_uplink_with_l2_as_subint(self: AvdStructuredConfigUnderlay, link: dict) -> tuple[dict, list[dict]]: """Return a tuple with main uplink interface, list of subinterfaces representing each SVI.""" vlans = [int(vlan) for vlan in range_expand(link["vlans"])] @@ -304,33 +397,68 @@ def _l3_interface_acls(self: AvdStructuredConfigUnderlay) -> dict[str, dict[str, "ipv4_acl_out": , } + Only contains L3 interfaces with ACLs and only the ACLs that are set. + """ + interface_type = "l3_interface" + return self._get_l3_generic_interface_acls(interface_type) + + @cached_property + def _l3_port_channel_acls(self: AvdStructuredConfigUnderlay) -> dict[str, dict[str, dict]]: + """ + Return dict of l3 Port-Channel ACLs. + + : { + "ipv4_acl_in": , + "ipv4_acl_out": , + } + + Only contains L3 Port-Channel with ACLs and only the ACLs that are set. + """ + interface_type = "l3_port_channel" + return self._get_l3_generic_interface_acls(interface_type) + + def _get_l3_generic_interface_acls( + self: AvdStructuredConfigUnderlay, interface_type: Literal["l3_interface", "l3_port_channel"] + ) -> dict[str, dict[str, dict]]: + """ + Return dict of l3 interface ACLs referenced by either L3 interface or L3 Port-Channel. + + : { + "ipv4_acl_in": , + "ipv4_acl_out": , + } + Only contains interfaces with ACLs and only the ACLs that are set, - so use `get(self._l3_interface_acls, f"{interface_name}.ipv4_acl_in")` to get the value. + so use `get(self._get_l3_generic_interface_acls(), f"{interface_name}.ipv4_acl_in")` to get the value. + where ` is either 'l3_interface' or 'l3_port_channel'` """ l3_interface_acls = {} - for l3_interface in self.shared_utils.l3_interfaces: - ipv4_acl_in = l3_interface.ipv4_acl_in - ipv4_acl_out = l3_interface.ipv4_acl_out + l3_generic_interfaces = {} + l3_generic_interfaces = self.shared_utils.l3_interfaces if interface_type == "l3_interface" else self.shared_utils.l3_port_channels + + for l3_generic_interface in l3_generic_interfaces: + ipv4_acl_in = l3_generic_interface.ipv4_acl_in + ipv4_acl_out = l3_generic_interface.ipv4_acl_out if ipv4_acl_in is None and ipv4_acl_out is None: continue - interface_ip = l3_interface.dhcp_ip if (ip_address := l3_interface.ip_address) == "dhcp" else ip_address + interface_ip = l3_generic_interface.dhcp_ip if (ip_address := l3_generic_interface.ip_address) == "dhcp" else ip_address if interface_ip is not None and "/" in interface_ip: interface_ip = get_ip_from_ip_prefix(interface_ip) if ipv4_acl_in is not None: - l3_interface_acls.setdefault(l3_interface.name, {})["ipv4_acl_in"] = self.shared_utils.get_ipv4_acl( + l3_interface_acls.setdefault(l3_generic_interface.name, {})["ipv4_acl_in"] = self.shared_utils.get_ipv4_acl( name=ipv4_acl_in, - interface_name=l3_interface.name, + interface_name=l3_generic_interface.name, interface_ip=interface_ip, - peer_ip=l3_interface.peer_ip, + peer_ip=l3_generic_interface.peer_ip, )._as_dict() if ipv4_acl_out is not None: - l3_interface_acls.setdefault(l3_interface.name, {})["ipv4_acl_out"] = self.shared_utils.get_ipv4_acl( + l3_interface_acls.setdefault(l3_generic_interface.name, {})["ipv4_acl_out"] = self.shared_utils.get_ipv4_acl( name=ipv4_acl_out, - interface_name=l3_interface.name, + interface_name=l3_generic_interface.name, interface_ip=interface_ip, - peer_ip=l3_interface.peer_ip, + peer_ip=l3_generic_interface.peer_ip, )._as_dict() return l3_interface_acls diff --git a/python-avd/pyavd/api/interface_descriptions/__init__.py b/python-avd/pyavd/api/interface_descriptions/__init__.py index 0b0e082cac0..cd2175ba3d9 100644 --- a/python-avd/pyavd/api/interface_descriptions/__init__.py +++ b/python-avd/pyavd/api/interface_descriptions/__init__.py @@ -105,7 +105,9 @@ def underlay_port_channel_interface(self, data: InterfaceDescriptionData) -> str - mpls_overlay_role - mpls_lsr - overlay_routing_protocol - - type. + - type + - wan_carrier + - wan_circuit_id. """ if template_path := self.shared_utils.node_type_key_data.interface_descriptions.underlay_port_channel_interfaces: return self._template( @@ -123,9 +125,13 @@ def underlay_port_channel_interface(self, data: InterfaceDescriptionData) -> str description = data.port_channel_description elif data.link_type in ("l3_edge", "core_interfaces"): description = self.inputs.default_underlay_p2p_port_channel_description - else: + elif data.link_type is not None and data.link_type in ("underlay_l2"): # This is for L2 port-channels description = self.inputs.underlay_l2_port_channel_description + else: + # This is for L3 port-channels + elems = [data.wan_carrier, data.wan_circuit_id, data.peer, data.peer_interface] + return "_".join([elem for elem in elems if elem]) return AvdStringFormatter().format( description,