nxos_lacp_interfaces: fix integration test dependencies (#61947)
* nxos_lacp_interfaces: fix integration test dependencies * Add conditional mode test to m/d/r tests
This commit is contained in:
parent
621f273767
commit
6e72893d78
5 changed files with 77 additions and 13 deletions
|
@ -1 +1,2 @@
|
||||||
dependencies: []
|
dependencies:
|
||||||
|
- prepare_nxos_tests
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
- debug:
|
- debug:
|
||||||
msg: "Start nxos_lacp_interfaces deleted integration tests connection={{ ansible_connection }}"
|
msg: "Start nxos_lacp_interfaces deleted integration tests connection={{ ansible_connection }}"
|
||||||
|
|
||||||
|
- set_fact:
|
||||||
|
mode: delay
|
||||||
|
when: platform is not search('N5K|N6K|N7K') and ((imagetag != 'I2'))
|
||||||
|
|
||||||
- name: setup1
|
- name: setup1
|
||||||
cli_config: &cleanup
|
cli_config: &cleanup
|
||||||
config: |
|
config: |
|
||||||
|
@ -17,7 +21,15 @@
|
||||||
interface port-channel5
|
interface port-channel5
|
||||||
lacp min-links 5
|
lacp min-links 5
|
||||||
interface port-channel10
|
interface port-channel10
|
||||||
|
lacp max-bundle 10
|
||||||
|
|
||||||
|
- name: setup3 - L2 for mode command
|
||||||
|
cli_config:
|
||||||
|
config: |
|
||||||
|
interface port-channel10
|
||||||
|
switchport
|
||||||
lacp mode delay
|
lacp mode delay
|
||||||
|
when: mode is defined
|
||||||
|
|
||||||
- name: Gather lacp_interfaces facts
|
- name: Gather lacp_interfaces facts
|
||||||
nxos_facts: &facts
|
nxos_facts: &facts
|
||||||
|
@ -39,8 +51,13 @@
|
||||||
- "'interface port-channel5' in result.commands"
|
- "'interface port-channel5' in result.commands"
|
||||||
- "'no lacp min-links' in result.commands"
|
- "'no lacp min-links' in result.commands"
|
||||||
- "'interface port-channel10' in result.commands"
|
- "'interface port-channel10' in result.commands"
|
||||||
|
- "'no lacp max-bundle' in result.commands"
|
||||||
|
|
||||||
|
- assert:
|
||||||
|
that:
|
||||||
- "'no lacp mode delay' in result.commands"
|
- "'no lacp mode delay' in result.commands"
|
||||||
- "result.commands|length == 4"
|
- "result.commands|length == 5"
|
||||||
|
when: mode is defined
|
||||||
|
|
||||||
- name: Idempotence - deleted
|
- name: Idempotence - deleted
|
||||||
nxos_lacp_interfaces: *deleted
|
nxos_lacp_interfaces: *deleted
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
- debug:
|
- debug:
|
||||||
msg: "Start nxos_lacp_interfaces merged integration tests connection={{ ansible_connection }}"
|
msg: "Start nxos_lacp_interfaces merged integration tests connection={{ ansible_connection }}"
|
||||||
|
|
||||||
|
- set_fact:
|
||||||
|
mode: delay
|
||||||
|
when: platform is not search('N5K|N6K|N7K') and ((imagetag != 'I2'))
|
||||||
|
|
||||||
- name: setup1
|
- name: setup1
|
||||||
cli_config: &cleanup
|
cli_config: &cleanup
|
||||||
config: |
|
config: |
|
||||||
|
@ -15,6 +19,13 @@
|
||||||
config: |
|
config: |
|
||||||
feature lacp
|
feature lacp
|
||||||
|
|
||||||
|
- name: setup3 - L2 for mode command
|
||||||
|
cli_config:
|
||||||
|
config: |
|
||||||
|
interface port-channel5
|
||||||
|
switchport
|
||||||
|
when: mode is defined
|
||||||
|
|
||||||
- name: Merged
|
- name: Merged
|
||||||
nxos_lacp_interfaces: &merged
|
nxos_lacp_interfaces: &merged
|
||||||
config:
|
config:
|
||||||
|
@ -22,7 +33,9 @@
|
||||||
links:
|
links:
|
||||||
min: 5
|
min: 5
|
||||||
- name: port-channel5
|
- name: port-channel5
|
||||||
mode: delay
|
mode: "{{ mode | default(omit) }}"
|
||||||
|
links:
|
||||||
|
max: 10
|
||||||
state: merged
|
state: merged
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -33,8 +46,13 @@
|
||||||
- "'interface port-channel10' in result.commands"
|
- "'interface port-channel10' in result.commands"
|
||||||
- "'lacp min-links 5' in result.commands"
|
- "'lacp min-links 5' in result.commands"
|
||||||
- "'interface port-channel5' in result.commands"
|
- "'interface port-channel5' in result.commands"
|
||||||
|
- "'lacp max-bundle 10' in result.commands"
|
||||||
|
|
||||||
|
- assert:
|
||||||
|
that:
|
||||||
- "'lacp mode delay' in result.commands"
|
- "'lacp mode delay' in result.commands"
|
||||||
- "result.commands|length == 4"
|
- "result.commands|length == 5"
|
||||||
|
when: mode is defined
|
||||||
|
|
||||||
- name: Gather lacp_interfaces facts
|
- name: Gather lacp_interfaces facts
|
||||||
nxos_facts:
|
nxos_facts:
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
- debug:
|
- debug:
|
||||||
msg: "Start nxos_lacp_interfaces overridden integration tests connection={{ ansible_connection }}"
|
msg: "Start nxos_lacp_interfaces overridden integration tests connection={{ ansible_connection }}"
|
||||||
|
|
||||||
|
- set_fact:
|
||||||
|
mode: delay
|
||||||
|
when: platform is not search('N5K|N6K|N7K') and ((imagetag != 'I2'))
|
||||||
|
|
||||||
- name: setup1
|
- name: setup1
|
||||||
cli_config: &cleanup
|
cli_config: &cleanup
|
||||||
config: |
|
config: |
|
||||||
|
@ -20,6 +24,13 @@
|
||||||
interface port-channel5
|
interface port-channel5
|
||||||
lacp max-bundle 10
|
lacp max-bundle 10
|
||||||
|
|
||||||
|
- name: setup3 - L2 for mode command
|
||||||
|
cli_config:
|
||||||
|
config: |
|
||||||
|
interface port-channel11
|
||||||
|
switchport
|
||||||
|
when: mode is defined
|
||||||
|
|
||||||
- name: Gather lacp_interfaces facts
|
- name: Gather lacp_interfaces facts
|
||||||
nxos_facts: &facts
|
nxos_facts: &facts
|
||||||
gather_subset:
|
gather_subset:
|
||||||
|
@ -31,7 +42,9 @@
|
||||||
nxos_lacp_interfaces: &overridden
|
nxos_lacp_interfaces: &overridden
|
||||||
config:
|
config:
|
||||||
- name: port-channel11
|
- name: port-channel11
|
||||||
mode: delay
|
links:
|
||||||
|
min: 4
|
||||||
|
mode: "{{ mode | default(omit) }}"
|
||||||
state: overridden
|
state: overridden
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -44,8 +57,12 @@
|
||||||
- "'interface port-channel5' in result.commands"
|
- "'interface port-channel5' in result.commands"
|
||||||
- "'no lacp max-bundle' in result.commands"
|
- "'no lacp max-bundle' in result.commands"
|
||||||
- "'interface port-channel11' in result.commands"
|
- "'interface port-channel11' in result.commands"
|
||||||
|
|
||||||
|
- assert:
|
||||||
|
that:
|
||||||
- "'lacp mode delay' in result.commands"
|
- "'lacp mode delay' in result.commands"
|
||||||
- "result.commands|length == 6"
|
- "result.commands|length == 7"
|
||||||
|
when: mode is defined
|
||||||
|
|
||||||
- name: Gather lacp_interfaces post facts
|
- name: Gather lacp_interfaces post facts
|
||||||
nxos_facts: *facts
|
nxos_facts: *facts
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
- debug:
|
- debug:
|
||||||
msg: "Start nxos_lacp_interfaces replaced integration tests connection={{ ansible_connection }}"
|
msg: "Start nxos_lacp_interfaces replaced integration tests connection={{ ansible_connection }}"
|
||||||
|
|
||||||
|
- set_fact:
|
||||||
|
mode: delay
|
||||||
|
when: platform is not search('N5K|N6K|N7K') and ((imagetag != 'I2'))
|
||||||
|
|
||||||
- name: setup1
|
- name: setup1
|
||||||
cli_config: &cleanup
|
cli_config: &cleanup
|
||||||
config: |
|
config: |
|
||||||
|
@ -14,6 +18,7 @@
|
||||||
config: |
|
config: |
|
||||||
feature lacp
|
feature lacp
|
||||||
interface port-channel10
|
interface port-channel10
|
||||||
|
switchport
|
||||||
lacp min-links 5
|
lacp min-links 5
|
||||||
|
|
||||||
- name: Gather lacp_interfaces facts
|
- name: Gather lacp_interfaces facts
|
||||||
|
@ -29,6 +34,7 @@
|
||||||
- name: port-channel10
|
- name: port-channel10
|
||||||
links:
|
links:
|
||||||
max: 10
|
max: 10
|
||||||
|
mode: "{{ mode | default(omit) }}"
|
||||||
state: replaced
|
state: replaced
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -39,7 +45,12 @@
|
||||||
- "'interface port-channel10' in result.commands"
|
- "'interface port-channel10' in result.commands"
|
||||||
- "'no lacp min-links' in result.commands"
|
- "'no lacp min-links' in result.commands"
|
||||||
- "'lacp max-bundle 10' in result.commands"
|
- "'lacp max-bundle 10' in result.commands"
|
||||||
- "result.commands|length == 3"
|
|
||||||
|
- assert:
|
||||||
|
that:
|
||||||
|
- "'lacp mode delay' in result.commands"
|
||||||
|
- "result.commands|length == 4"
|
||||||
|
when: mode is defined
|
||||||
|
|
||||||
- name: Gather lacp_interfaces post facts
|
- name: Gather lacp_interfaces post facts
|
||||||
nxos_facts: *facts
|
nxos_facts: *facts
|
||||||
|
|
Loading…
Reference in a new issue