ansible/test/integration/targets/nxos_lldp_interfaces/tests/cli/gathered.yml
Adharsh Srivats R 3558651d39
nxos_lldp_interfaces resource module (#67802)
* Added nxos_lldp_interfaces module

* Linting

* Added RTT, resolved shippable errors

* Added new states

* New states edit

* Updated states

* Updated tests

* Show all interfaces in facts

* Test changes

* Added unit tests

* Linting

* Handled portchannel failing condition
2020-03-01 20:52:25 +05:30

52 lines
1.2 KiB
YAML

---
- debug:
msg: Start nxos_lldp_interfaces gathered integration tests connection={{ansible_connection}}"
- name: Enable LLDP feature
nxos_feature:
feature: lldp
state: enabled
- block:
- name: Setup
cli_config:
config: |
interface Ethernet1/1
lldp receive
no lldp transmit
interface Ethernet1/2
no lldp receive
lldp tlv-set vlan 12
interface Ethernet1/3
lldp tlv-set management-address 192.0.2.12
- name: Gather lldp interfaces facts
nxos_facts: &facts
gather_subset:
- "!all"
- "!min"
gather_network_resources: lldp_interfaces
- name: Gathered
nxos_lldp_interfaces: &gathered
state: gathered
register: result
- assert:
that:
- "result.changed == false"
- "ansible_facts.network_resources.lldp_interfaces == result.gathered"
- name: Idempotence - Gathered
nxos_lldp_interfaces: *gathered
register: result
- assert:
that:
- "result.changed == false"
always:
- name: teardown
nxos_feature:
feature: lldp
state: disabled