ansible/test/integration/targets/nxos_lldp_global/tests/cli/merged.yml
Adharsh Srivats R ee05d6bde2 Added nxos_lldp_global resource module (#60072)
* Added nxos_lldp_global module

Tests

Correction

remove q

* Added tests

* Corrections

Changes

Last few changes please

Final

Finall

Finalll

* Key error and punctuation changes

* .gitignore edit

* Facts file edit

* Changed facts collection and 'replaced' state

Changed facts collection and replaced state

Changed facts collection and replaced state

* Spacing and module error correction

* return facts as empty dict not list

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2019-08-27 14:52:24 +05:30

55 lines
1.3 KiB
YAML

---
- debug:
msg: "Start nxos_lldp_global merged integration tests connection={{ansible_connection}}"
- name: Enable lldp
nxos_feature:
feature: lldp
- block:
- name: Merged
nxos_lldp_global: &merged
config:
reinit: 5
timer: 40
port_id: 1
tlv_select:
power_management: false
state: merged
register: result
- assert:
that:
- "result.before|length == 0"
- "result.changed == true"
- "'lldp reinit 5' in result.commands"
- "'lldp timer 40' in result.commands"
- "'lldp portid-subtype 1' in result.commands"
- "'no lldp tlv-select power-management' in result.commands"
- "result.commands | length == 4"
- name: Gather lldp_global facts
nxos_facts:
gather_subset:
- '!all'
- '!min'
gather_network_resources: lldp_global
- assert:
that:
- "ansible_facts.network_resources.lldp_global == result.after"
- name: Idempotence - Merged
nxos_lldp_global: *merged
register: result
- assert:
that:
- "result.changed == false"
- "result.commands | length == 0"
always:
- name: teardown
nxos_feature:
feature: lldp
state: disabled