Skip to content
Closed
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
14 changes: 3 additions & 11 deletions ansible/roles/test/tasks/lag_2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,8 @@
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_t1-lag.yml
when: testbed_type == 't1-lag'

- name: Include testbed topology configuration (to get LAG IP and PTF docker interfaces, that are behind LAG VMs).
include_vars: vars/topo_t0.yml
when: testbed_type == 't0'

- name: Include testbed topology configuration (to get LAG IP and PTF docker interfaces, that are behind LAG VMs).
include_vars: vars/topo_t0-116.yml
when: testbed_type == 't0-116'
include_vars: "vars/topo_{{ testbed_type }}.yml"
when: testbed_type in ['t1-lag','t0','t0-116']

- set_fact:
dut_mac: "{{ ansible_Ethernet0['macaddress'] }}"
Expand All @@ -73,4 +65,4 @@
- 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
when: test_rate|bool == true
14 changes: 14 additions & 0 deletions ansible/roles/test/tasks/lag_minlink.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,19 @@
### Port channel interface is up after peer port is back

- block:
- name: Shut down neighbor interface {{ neighbor_interface }} on {{ peer_device }} ({{ peer_host }})
become: true
shell: ip link set {{ neighbor_interface }} down
delegate_to: "{{peer_host}}"
when: peer_type == "FanoutLeafSonic"

- name: Shut down neighbor interface {{ neighbor_interface }} on {{ peer_device }} ({{ peer_host }})
action: apswitch template=neighbor_interface_shut_single.j2
args:
host: "{{peer_host}}"
login: "{{switch_login[hwsku_map[peer_hwsku]]}}"
connection: switch
when: peer_type != "FanoutLeafSonic"

- pause:
seconds: "{{ wait_down_time }}"
Expand All @@ -37,12 +44,19 @@

### always bring back port in case test error and left testbed in unknow stage
always:
- name: Bring up neighbor interface {{ neighbor_interface }} on {{ peer_device}} ({{ peer_host }})
become: true
shell: ip link set {{ neighbor_interface }} up
delegate_to: "{{peer_host}}"
when: peer_type == "FanoutLeafSonic"

- name: Bring up neighbor interface {{ neighbor_interface }} on {{ peer_device }} ({{ peer_host }})
action: apswitch template=neighbor_interface_no_shut_single.j2
args:
host: "{{peer_host}}"
login: "{{switch_login[hwsku_map[peer_hwsku]]}}"
connection: switch
when: peer_type != "FanoutLeafSonic"

- pause:
seconds: 35
Expand Down
2 changes: 2 additions & 0 deletions ansible/roles/test/tasks/single_lag_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
- set_fact:
peer_host: "{{ device_info['mgmtip'] }}"
peer_hwsku: "{{ device_info['HwSku'] }}"
peer_type: "{{ device_info['Type']}}"

- name: test fanout interface (physical) flap and lacp keep correct po status follow minimum links requirement
include: lag_minlink.yml
Expand All @@ -38,6 +39,7 @@
peer_device: "{{vm_neighbors[flap_intf]['name']}}"
neighbor_interface: "{{vm_neighbors[flap_intf]['port']}}"
peer_hwsku: 'Arista-VM'
peer_type: 'Arista'

- set_fact:
peer_host: "{{ minigraph_devices[peer_device]['mgmt_addr'] }}"
Expand Down