87a568da0b
* Add nxos_lacp resource module Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> * Add commands in module doc Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
49 lines
989 B
YAML
49 lines
989 B
YAML
---
|
|
- debug:
|
|
msg: "Start nxos_lacp merged integration tests connection={{ ansible_connection }}"
|
|
|
|
- name: Enable lacp
|
|
nxos_feature:
|
|
feature: lacp
|
|
|
|
- block:
|
|
- name: Merged
|
|
nxos_lacp: &merged
|
|
config:
|
|
system:
|
|
priority: 11
|
|
state: merged
|
|
register: result
|
|
|
|
- assert:
|
|
that:
|
|
- "result.before|length == 0"
|
|
- "result.changed == true"
|
|
- "'lacp system-priority 11' in result.commands"
|
|
- "result.commands|length == 1"
|
|
|
|
- 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
|