00193f27eb
* Updated nxos_lacp tests to handle platforms not supporting lacp system mac command * nxos_lacp: addressing comments * nxos_lacp: Updating image tag search to include more tags
66 lines
1.5 KiB
YAML
66 lines
1.5 KiB
YAML
---
|
|
- debug:
|
|
msg: "Start nxos_lacp merged integration tests connection={{ ansible_connection }}"
|
|
|
|
- name: Enable lacp
|
|
nxos_feature:
|
|
feature: lacp
|
|
|
|
- set_fact:
|
|
mac:
|
|
address: 00c1.4c00.bd15
|
|
role: primary
|
|
when: platform is search('N9K') and imagetag is not search('I[2-6]')
|
|
|
|
- block:
|
|
- name: Merged
|
|
nxos_lacp: &merged
|
|
config:
|
|
system:
|
|
priority: 11
|
|
mac: "{{ mac|default(omit) }}"
|
|
state: merged
|
|
register: result
|
|
|
|
- assert:
|
|
that:
|
|
- "result.before|length == 0"
|
|
- "result.changed == true"
|
|
- "'lacp system-priority 11' in result.commands"
|
|
- "'lacp system-mac 00c1.4c00.bd15 role primary' in result.commands"
|
|
- "result.commands|length == 2"
|
|
when: platform is search('N9K') and imagetag is not search('I[2-6]')
|
|
|
|
- assert:
|
|
that:
|
|
- "result.before|length == 0"
|
|
- "result.changed == true"
|
|
- "'lacp system-priority 11' in result.commands"
|
|
- "result.commands|length == 1"
|
|
when: platform is not search('N9K')
|
|
|
|
- name: Gather lacp facts
|
|
nxos_facts:
|
|
gather_subset:
|
|
- '!all'
|
|
- '!min'
|
|
gather_network_resources: lacp
|
|
|
|
- assert:
|
|
that:
|
|
- "ansible_facts.network_resources.lacp == result.after"
|
|
|
|
- name: Idempotence - Merged
|
|
nxos_lacp: *merged
|
|
register: result
|
|
|
|
- assert:
|
|
that:
|
|
- "result.changed == false"
|
|
- "result.commands|length == 0"
|
|
|
|
always:
|
|
- name: teardown
|
|
nxos_feature:
|
|
feature: lacp
|
|
state: disabled
|