-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Expand file tree
/
Copy pathlag_2.yml
More file actions
68 lines (52 loc) · 2.39 KB
/
Copy pathlag_2.yml
File metadata and controls
68 lines (52 loc) · 2.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
### this is the Lag_2 lag test that tests each Lag interface minimum link and rate of sending LACP DU packets
### this test could be consider as an additional/alternative lag test from existing lagall.yml.
### Due to some labs are using two layer fanout switches, and one DUT might connects to multiple fanoutleaf switches
### so for minimum link test of lag member flaps, it requires to use lab connection facts to determine the fanout neighbor ports,
### Also, most of the traffic load balancing tests of LAG interface are covered in new FIB tests. so we are ignoring traffic test
### for lag member flaps for now, will consider add traffic back if required
- fail: msg="Please define ptf_host"
when: ptf_host is not defined
- fail: msg="Please define testbed_type"
when: testbed_type is not defined
- name: gathering lag facts from device
lag_facts: host={{ inventory_hostname }}
- fail: msg="No lag configuration found in {{ inventory_hostname }}"
when: lag_facts.names == []
- set_fact: test_minlink=true
when: test_minlink is not defined
- set_fact: test_rate=true
when: test_rate is not defined
- name: Gathering peer VM information from lldp
lldp:
vars:
ansible_shell_type: docker
ansible_python_interpreter: docker exec -i lldp python
- name: gathering minigraph of the device configuration
minigraph_facts: host={{ inventory_hostname }}
- name: Gathering lab graph facts about the device
conn_graph_facts: host={{ inventory_hostname }}
connection: local
- set_fact:
fanout_neighbors: "{{device_conn}}"
- set_fact:
vm_neighbors: "{{ minigraph_neighbors }}"
- name: Copy PTF test into PTF-docker for test LACP DU.
copy: src=roles/test/files/acstests/{{ item }} dest=/tmp/{{ item }}
with_items:
- lag_test.py
- acs_base_test.py
- router_utils.py
delegate_to: "{{ ptf_host }}"
- name: Include testbed topology configuration (to get LAG IP and PTF docker interfaces, that are behind LAG VMs).
include_vars: "vars/topo_{{ testbed_type }}.yml"
when: testbed_type in ['t1-lag','t0','t0-116']
- set_fact:
dut_mac: "{{ ansible_Ethernet0['macaddress'] }}"
- name: test each lag interface minimum links and rate
include: single_lag_test.yml
with_items: lag_facts.names
when: test_minlink|bool == true
- name: test each lag interface LACP DU rate
include: single_lag_lacp_rate_test.yml
with_items: lag_facts.names
when: test_rate|bool == true