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

Test: Move ansible-only tests to their own molecule scenario #5100

Open
wants to merge 16 commits into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/pull-request-management.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ jobs:
fail-fast: true
matrix:
avd_scenario:
- "ansible_only"
- "eos_designs_deprecated_vars"
- "eos_designs-l2ls"
- "eos_designs-mpls-isis-sr-ldp"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
ansible_only
eos_cli_config_gen
eos_cli_config_gen_deprecated_vars
eos_config_deploy_cvp
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
- name: Converge
hosts: ANSIBLE_ONLY
gather_facts: false
connection: local
vars:
string_set_as_play_var: "test of var set under play vars"
tasks:
- name: Generate intended variables
delegate_to: 127.0.0.1
ansible.builtin.import_role:
name: arista.avd.eos_designs
13 changes: 13 additions & 0 deletions ansible_collections/arista/avd/molecule/ansible_only/create.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
- name: Configure local folders
hosts: ANSIBLE_ONLY
gather_facts: false
connection: local
vars:
root_dir: "{{ playbook_dir }}"
tasks:
- name: Create local output folders
delegate_to: 127.0.0.1
ansible.builtin.import_role:
name: arista.avd.build_output_folders
run_once: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
- name: Remove output folders
hosts: ANSIBLE_ONLY
gather_facts: false
connection: local
tasks:
- name: Delete local folders
delegate_to: 127.0.0.1
run_once: true
ansible.builtin.file:
path: "{{ root_dir }}/{{ item }}"
state: absent
with_items:
- documentation
- intended
- config_backup
- reports
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
!
no enable password
no aaa root
!
vlan internal order ascending range 1006 1199
!
event-monitor
!
load-interval default 6
!
transceiver qsfp default-mode 4x10G
!
service routing protocols model multi-agent
!
hostname DC1-BL1A
!
platform sand lag hardware-only
!
sflow vrf OOB destination 10.0.200.90
sflow vrf OOB destination 192.168.200.10
sflow vrf OOB source-interface Management1
!
spanning-tree mode mstp
spanning-tree root super
spanning-tree mst 0 priority 4096
!
service unsupported-transceiver key1 dsafDSFfvadskjh3424
!
clock timezone correctly_templated_timezone
!
vrf instance MGMT
!
queue-monitor streaming
max-connections 8
ip access-group ACL-QMS
ipv6 access-group ACLv6-QMS
vrf vrf1
no shutdown
!
management api http-commands
protocol https
no shutdown
!
vrf MGMT
no shutdown
!
interface Ethernet1
description P2P_DC1-SPINE1_Ethernet1
no shutdown
mtu 9214
speed forced 100gfull
no switchport
ip address 172.31.254.41/31
!
interface Ethernet2
description P2P_DC1-SPINE1_Ethernet2
no shutdown
mtu 9214
speed forced 100gfull
no switchport
ip address 172.31.254.43/31
!
interface Loopback0
description MY_ROUTER_ID_LOOPBACK
no shutdown
ip address 192.168.255.14/32
!
interface Loopback1
description VXLAN_TUNNEL_SOURCE
no shutdown
ip address 192.168.254.14/32
ip address 192.168.255.255/32 secondary
!
interface Management1
description OOB_MANAGEMENT
no shutdown
vrf MGMT
ip address 192.168.200.110/24
!
interface Vxlan1
description DC1-BL1A_VTEP
vxlan source-interface Loopback1
vxlan udp-port 4789
!
hardware tcam
system profile vxlan-routing
!
mac address-table aging-time 42
!
event-handler evpn-blacklist-recovery
trigger on-logging
regex EVPN-3-BLACKLISTED_DUPLICATE_MAC
action bash FastCli -p 15 -c "clear bgp evpn host-flap"
delay 300
asynchronous
!
ip virtual-router mac-address 00:dc:00:00:00:0a
!
ip routing
no ip routing vrf MGMT
!
ip prefix-list PL-LOOPBACKS-EVPN-OVERLAY
seq 10 permit 192.168.255.0/25 eq 32
seq 20 permit 192.168.255.128/26 eq 32
seq 30 permit 192.168.255.192/29 eq 32
seq 40 permit 192.168.255.200/32 eq 32
seq 50 permit 192.168.254.0/25 eq 32
seq 60 permit 192.168.254.128/26 eq 32
seq 70 permit 192.168.254.192/29 eq 32
seq 80 permit 192.168.254.200/32 eq 32
seq 90 permit 192.168.255.255/32
!
route-map RM-CONN-2-BGP permit 10
match ip address prefix-list PL-LOOPBACKS-EVPN-OVERLAY
!
router bfd
multihop interval 300 min-rx 300 multiplier 3
!
router bgp 65104
update wait-install
no bgp default ipv4-unicast
maximum-paths 4 ecmp 4
distance bgp 20 200 200
neighbor EVPN-OVERLAY-PEERS peer group
neighbor EVPN-OVERLAY-PEERS update-source Loopback0
neighbor EVPN-OVERLAY-PEERS bfd
neighbor EVPN-OVERLAY-PEERS ebgp-multihop 3
neighbor EVPN-OVERLAY-PEERS password 7 q+VNViP5i4rVjW1cxFv2wA==
neighbor EVPN-OVERLAY-PEERS send-community
neighbor EVPN-OVERLAY-PEERS maximum-routes 0
neighbor UNDERLAY-PEERS peer group
neighbor UNDERLAY-PEERS password 7 0nsCUm70mvSTxVO0ldytrg==
neighbor UNDERLAY-PEERS send-community
neighbor UNDERLAY-PEERS maximum-routes 12000
neighbor 172.31.254.40 peer group UNDERLAY-PEERS
neighbor 172.31.254.40 remote-as 65001
neighbor 172.31.254.40 description DC1-SPINE1_Ethernet1
neighbor 172.31.254.42 peer group UNDERLAY-PEERS
neighbor 172.31.254.42 remote-as 65001
neighbor 172.31.254.42 description DC1-SPINE1_Ethernet2
neighbor 192.168.255.1 peer group EVPN-OVERLAY-PEERS
neighbor 192.168.255.1 remote-as 65001
neighbor 192.168.255.1 description DC1-SPINE1_Loopback0
redistribute connected route-map RM-CONN-2-BGP
!
address-family evpn
neighbor EVPN-OVERLAY-PEERS activate
!
address-family ipv4
no neighbor EVPN-OVERLAY-PEERS activate
neighbor UNDERLAY-PEERS activate
!
router general
router-id ipv4 192.168.255.14
exit
!
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
!
no enable password
no aaa root
!
vlan internal order ascending range 1006 1199
!
transceiver qsfp default-mode 4x10G
!
service routing protocols model multi-agent
!
hostname DC1-BL1B
!
platform sand lag hardware-only
!
sflow vrf OOB destination 10.0.200.90
sflow vrf OOB destination 192.168.200.10
sflow vrf OOB source-interface Management1
!
spanning-tree mode mstp
spanning-tree root super
spanning-tree mst 0 priority 4096
!
vrf instance MGMT
!
management api http-commands
protocol https
no shutdown
!
vrf MGMT
no shutdown
!
interface Ethernet1
description P2P_DC1-SPINE1_Ethernet3
no shutdown
mtu 9214
speed forced 100gfull
no switchport
ip address 172.31.254.49/31
!
interface Ethernet2
description P2P_DC1-SPINE1_Ethernet4
no shutdown
mtu 9214
speed forced 100gfull
no switchport
ip address 172.31.254.51/31
!
interface Loopback0
description ROUTER_ID
no shutdown
ip address 192.168.255.15/32
!
interface Loopback1
description VXLAN_TUNNEL_SOURCE
no shutdown
ip address 192.168.254.15/32
!
interface Management1
description OOB_MANAGEMENT
no shutdown
vrf MGMT
ip address 192.168.200.111/24
!
interface Vxlan1
description DC1-BL1B_VTEP
vxlan source-interface Loopback1
vxlan udp-port 4789
!
hardware tcam
system profile vxlan-routing
!
ip virtual-router mac-address 00:dc:00:00:00:0a
!
ip routing
no ip routing vrf MGMT
!
ip prefix-list PL-LOOPBACKS-EVPN-OVERLAY
seq 10 permit 192.168.255.0/25 eq 32
seq 20 permit 192.168.255.128/26 eq 32
seq 30 permit 192.168.255.192/29 eq 32
seq 40 permit 192.168.255.200/32 eq 32
seq 50 permit 192.168.254.0/25 eq 32
seq 60 permit 192.168.254.128/26 eq 32
seq 70 permit 192.168.254.192/29 eq 32
seq 80 permit 192.168.254.200/32 eq 32
!
route-map RM-CONN-2-BGP permit 10
match ip address prefix-list PL-LOOPBACKS-EVPN-OVERLAY
!
router bfd
multihop interval 300 min-rx 300 multiplier 3
!
router bgp 65105
router-id 192.168.255.15
update wait-install
no bgp default ipv4-unicast
maximum-paths 4 ecmp 4
distance bgp 20 200 200
neighbor EVPN-OVERLAY-PEERS peer group
neighbor EVPN-OVERLAY-PEERS update-source Loopback0
neighbor EVPN-OVERLAY-PEERS bfd
neighbor EVPN-OVERLAY-PEERS ebgp-multihop 3
neighbor EVPN-OVERLAY-PEERS password 7 q+VNViP5i4rVjW1cxFv2wA==
neighbor EVPN-OVERLAY-PEERS send-community
neighbor EVPN-OVERLAY-PEERS maximum-routes 0
neighbor UNDERLAY-PEERS peer group
neighbor UNDERLAY-PEERS password 7 0nsCUm70mvSTxVO0ldytrg==
neighbor UNDERLAY-PEERS send-community
neighbor UNDERLAY-PEERS maximum-routes 12000
neighbor 172.31.254.48 peer group UNDERLAY-PEERS
neighbor 172.31.254.48 remote-as 65001
neighbor 172.31.254.48 description DC1-SPINE1_Ethernet3
neighbor 172.31.254.50 peer group UNDERLAY-PEERS
neighbor 172.31.254.50 remote-as 65001
neighbor 172.31.254.50 description DC1-SPINE1_Ethernet4
neighbor 192.168.255.1 peer group EVPN-OVERLAY-PEERS
neighbor 192.168.255.1 remote-as 65001
neighbor 192.168.255.1 description DC1-SPINE1_Loopback0
redistribute connected route-map RM-CONN-2-BGP
!
address-family evpn
neighbor EVPN-OVERLAY-PEERS activate
!
address-family ipv4
no neighbor EVPN-OVERLAY-PEERS activate
neighbor UNDERLAY-PEERS activate
!
end
Loading