Skip to content
Merged
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
83 changes: 50 additions & 33 deletions ansible/roles/test/tasks/single_lag_lacp_rate_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,36 +47,53 @@
neighbor_lag_intfs: "{{ neighbor_lag_intfs }} + [ '{{ vm_neighbors[item]['port'] }}' ]"
with_items: "{{ po_interfaces }}"

# make sure portchannel peer rate is set to fast
- name: make sure all lag members on VM are set to fast
action: apswitch template=neighbor_lag_rate_fast.j2
args:
host: "{{peer_host}}"
login: "{{switch_login[hwsku_map[peer_hwsku]]}}"
connection: switch

- pause:
seconds: 5

- name: test lacp packet sending rate is 1 seconds
include: lag_lacp_timing_test.yml
vars:
vm_name: "{{ peer_device }}"
lacp_timer: 1

# make sure portchannel peer rate is set to slow
- name: make sure all lag members on VM are set to slow
action: apswitch template=neighbor_lag_rate_slow.j2
args:
host: "{{peer_host}}"
login: "{{switch_login[hwsku_map[peer_hwsku]]}}"
connection: switch

- pause:
seconds: 5

- name: test lacp packet sending rate is 30 seconds
include: lag_lacp_timing_test.yml
vars:
vm_name: "{{ peer_device }}"
lacp_timer: 30
- block:
# make sure portchannel peer rate is set to fast
- name: make sure all lag members on VM are set to fast
action: apswitch template=neighbor_lag_rate_fast.j2
args:
host: "{{peer_host}}"
login: "{{switch_login[hwsku_map[peer_hwsku]]}}"
connection: switch

- set_fact:
lag_rate_current_setting: "fast"

- pause:
seconds: 5

- name: test lacp packet sending rate is 1 seconds
include: lag_lacp_timing_test.yml
vars:
vm_name: "{{ peer_device }}"
lacp_timer: 1

# make sure portchannel peer rate is set to slow
- name: make sure all lag members on VM are set to slow
action: apswitch template=neighbor_lag_rate_slow.j2
args:
host: "{{peer_host}}"
login: "{{switch_login[hwsku_map[peer_hwsku]]}}"
connection: switch

- set_fact:
lag_rate_current_setting: "slow"

- pause:
seconds: 5

- name: test lacp packet sending rate is 30 seconds
include: lag_lacp_timing_test.yml
vars:
vm_name: "{{ peer_device }}"
lacp_timer: 30

always:
- name: Restore lag rate setting on VM in case of failure
action: apswitch template=neighbor_lag_rate_slow.j2
args:
host: "{{peer_host}}"
login: "{{switch_login[hwsku_map[peer_hwsku]]}}"
timeout: 300
connection: switch
when: "lag_rate_current_setting is defined and lag_rate_current_setting == 'fast'"