Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor(eos_designs): Improve structured_config object duplication checks with opt-in #4897

Merged
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
avd_eos_designs_enforce_duplication_checks_across_all_models: true

type: l3spine
l3spine:
nodes:
- name: avd_eos_designs_enforce_duplication_checks_across_all_models
id: 1
loopback_ipv4_pool: 192.168.100.0/24

l3_edge:
p2p_links:
- ip: [10.10.10.0/31, 10.10.10.1/31]
nodes: [avd_eos_designs_enforce_duplication_checks_across_all_models, somethingelse]
interfaces: [Ethernet1, Ethernet1]

servers:
- name: Myserver
adapters:
- switches: [avd_eos_designs_enforce_duplication_checks_across_all_models]
switch_ports: [Ethernet1]
vlans: 100

expected_error_message: >-
Found duplicate objects with conflicting data while generating configuration for EthernetInterfaces.
{'name': 'Ethernet1', 'description': 'SERVER_Myserver', 'shutdown': False, 'peer': 'Myserver', 'peer_type': 'server', 'switchport': {'enabled': True}}
conflicts with
{'name': 'Ethernet1', 'description': 'P2P_somethingelse_Ethernet1', 'shutdown': False, 'mtu': 9214, 'ip_address': '10.10.10.0/31', 'peer': 'somethingelse',
'peer_interface': 'Ethernet1', 'peer_type': 'other', 'switchport': {'enabled': False}}.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ servers:
switches: [ duplicate-interfaces-connected-endpoints ]

expected_error_message: >-
Found duplicate objects with conflicting data while generating configuration for Ethernet Interfaces defined under connected_endpoints.
{'name': 'Ethernet10', 'peer_interface': 'Eth2', 'description': 'SERVER_server02_Eth2', 'peer': 'server02'} conflicts with
{'name': 'Ethernet10', 'peer_interface': 'Eth1', 'description': 'SERVER_server01_ES1_Eth1', 'peer': 'server01_ES1'}.
Found duplicate objects with conflicting data while generating configuration for EthernetInterfaces.
{'name': 'Ethernet10', 'description': 'SERVER_server02_Eth2', 'shutdown': False, 'peer': 'server02', 'peer_interface': 'Eth2',
'peer_type': 'server', 'switchport': {'enabled': True}}
conflicts with
{'name': 'Ethernet10', 'description': 'SERVER_server01_ES1_Eth1', 'shutdown': False, 'peer': 'server01_ES1', 'peer_interface': 'Eth1',
'peer_type': 'server', 'switchport': {'enabled': True}}.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ servers:
channel_id: 42

expected_error_message: >-
Found duplicate objects with conflicting data while generating configuration for Port-channel Interfaces defined under
connected_endpoints. {'name': 'Port-Channel42', 'description': 'SERVER_server1_Description2'} conflicts with
{'name': 'Port-Channel42', 'description': 'SERVER_server1_Description1'}.
Found duplicate objects with conflicting data while generating configuration for PortChannelInterfaces.
{'name': 'Port-Channel42', 'description': 'SERVER_server1_Description2', 'shutdown': False, 'switchport': {'enabled': True}}
conflicts with
{'name': 'Port-Channel42', 'description': 'SERVER_server1_Description1', 'shutdown': False, 'switchport': {'enabled': True}}.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ all:
children:
EOS_DESIGNS_FAILURES_INCLUDED:
hosts:
avd_eos_designs_enforce_duplication_checks_across_all_models:
failure-port-channel:
connected-endpoints-mismatched-descriptions:
connected-endpoints-missing-profile-lacp-fallback:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,54 +185,6 @@ ethernet_interfaces:
peer_type: l3_interface
switchport:
enabled: false
- name: Ethernet24
description: PC
shutdown: false
dot1x:
port_control: auto
reauthentication: true
pae:
mode: authenticator
authentication_failure:
action: allow
allow_vlan: 800
host_mode:
mode: multi-host
multi_host_authenticated: true
mac_based_authentication:
enabled: true
timeout:
reauth_period: server
tx_period: 3
reauthorization_request_limit: 3
peer_type: network_port
port_profile: DOT1X_PORT_PROFILE
switchport:
enabled: true
- name: Ethernet25
description: PC
shutdown: false
dot1x:
port_control: auto
reauthentication: true
pae:
mode: authenticator
authentication_failure:
action: allow
allow_vlan: 800
host_mode:
mode: multi-host
multi_host_authenticated: true
mac_based_authentication:
enabled: true
timeout:
reauth_period: server
tx_period: 3
reauthorization_request_limit: 3
peer_type: network_port
port_profile: DOT1X_PORT_PROFILE
switchport:
enabled: true
- name: Ethernet10
description: server01_MLAG_Eth2
shutdown: false
Expand Down Expand Up @@ -293,6 +245,54 @@ ethernet_interfaces:
peer_interface: Eth0
peer_type: phone
port_profile: PHONE_WITH_PC
- name: Ethernet24
description: PC
shutdown: false
dot1x:
port_control: auto
reauthentication: true
pae:
mode: authenticator
authentication_failure:
action: allow
allow_vlan: 800
host_mode:
mode: multi-host
multi_host_authenticated: true
mac_based_authentication:
enabled: true
timeout:
reauth_period: server
tx_period: 3
reauthorization_request_limit: 3
peer_type: network_port
port_profile: DOT1X_PORT_PROFILE
switchport:
enabled: true
- name: Ethernet25
description: PC
shutdown: false
dot1x:
port_control: auto
reauthentication: true
pae:
mode: authenticator
authentication_failure:
action: allow
allow_vlan: 800
host_mode:
mode: multi-host
multi_host_authenticated: true
mac_based_authentication:
enabled: true
timeout:
reauth_period: server
tx_period: 3
reauthorization_request_limit: 3
peer_type: network_port
port_profile: DOT1X_PORT_PROFILE
switchport:
enabled: true
hardware:
speed_groups:
- speed_group: '1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ ethernet_interfaces:
peer: network-ports-tests-2
peer_interface: Ethernet10/1
peer_type: mlag_peer
- name: Ethernet14
description: SERVER_CONNECTED_ENDPOINT_OVERWRITING_NETWORK_PORT_Eth42
shutdown: false
peer: CONNECTED_ENDPOINT_OVERWRITING_NETWORK_PORT
peer_interface: Eth42
peer_type: server
switchport:
enabled: true
- name: Ethernet1
description: PCs
shutdown: false
Expand Down Expand Up @@ -669,14 +677,6 @@ ethernet_interfaces:
peer_type: network_port
switchport:
enabled: true
- name: Ethernet14
description: SERVER_CONNECTED_ENDPOINT_OVERWRITING_NETWORK_PORT_Eth42
shutdown: false
peer: CONNECTED_ENDPOINT_OVERWRITING_NETWORK_PORT
peer_interface: Eth42
peer_type: server
switchport:
enabled: true
- name: Ethernet51
shutdown: true
peer_type: network_port
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,39 @@ aaa_root: null
config_end: null
enable_password: null
ethernet_interfaces:
- name: Ethernet12
description: SERVER_TEST_SERVER_01_Nic1
shutdown: false
peer: TEST_SERVER_01
peer_interface: Nic1
peer_type: server
port_profile: MY_PROFILE
switchport:
enabled: true
mode: trunk
trunk:
allowed_vlan: 1-100
native_vlan: 1000
- name: Ethernet1
description: SERVER_TEST_SERVER_01_Nic1
shutdown: false
channel_group:
id: 1
mode: active
peer: TEST_SERVER_01
peer_interface: Nic1
peer_type: server
port_profile: MY_PROFILE
- name: Ethernet2
description: SERVER_TEST_SERVER_01_Nic2
shutdown: false
channel_group:
id: 1
mode: active
peer: TEST_SERVER_01
peer_interface: Nic2
peer_type: server
port_profile: MY_PROFILE
- name: Ethernet20
description: Network Port
shutdown: false
Expand Down Expand Up @@ -122,39 +155,6 @@ ethernet_interfaces:
trunk:
allowed_vlan: 1-100
native_vlan: 1000
- name: Ethernet12
description: SERVER_TEST_SERVER_01_Nic1
shutdown: false
peer: TEST_SERVER_01
peer_interface: Nic1
peer_type: server
port_profile: MY_PROFILE
switchport:
enabled: true
mode: trunk
trunk:
allowed_vlan: 1-100
native_vlan: 1000
- name: Ethernet1
description: SERVER_TEST_SERVER_01_Nic1
shutdown: false
channel_group:
id: 1
mode: active
peer: TEST_SERVER_01
peer_interface: Nic1
peer_type: server
port_profile: MY_PROFILE
- name: Ethernet2
description: SERVER_TEST_SERVER_01_Nic2
shutdown: false
channel_group:
id: 1
mode: active
peer: TEST_SERVER_01
peer_interface: Nic2
peer_type: server
port_profile: MY_PROFILE
hostname: only-connected-endpoints
is_deployed: null
management_api_http: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,15 @@ ethernet_interfaces:
peer: dc1-leaf1c
peer_interface: Ethernet2
peer_type: l2leaf
- name: Ethernet5
description: SERVER_dc1-leaf1-server1_PCI2
shutdown: false
channel_group:
id: 5
mode: active
peer: dc1-leaf1-server1
peer_interface: PCI2
peer_type: server
- name: Ethernet41
description: Cameras
shutdown: false
Expand Down Expand Up @@ -162,15 +171,6 @@ ethernet_interfaces:
enabled: true
mode: access
access_vlan: 50
- name: Ethernet5
description: SERVER_dc1-leaf1-server1_PCI2
shutdown: false
channel_group:
id: 5
mode: active
peer: dc1-leaf1-server1
peer_interface: PCI2
peer_type: server
hostname: dc1-leaf1b
ip_igmp_snooping:
globally_enabled: true
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading