ansible/test/integration/targets/nxos_acls/tests/cli/parsed.yml
Adharsh Srivats R 7307339a7e
NX-OS ACLs module (#67558)
* Added nxos_acls module

* Adding tests

* Added integration tests

* Integration tests update

* Updated documentation

* Replaced state changes

* Added warning detection

* Added port-protocol mapping

* Added change

* Merge update changes

* Completed integration tests, rtt

* Added unit tests

* Linting

Added metaclass info

* Changed port protocol to str

* Fixed shippable errors, added examples

* Fixed type error, updated examples
2020-03-02 16:49:28 +05:30

45 lines
1.1 KiB
YAML

---
- debug:
msg: Start nxos_acls gathered integration tests connection={{ansible_connection}}"
- include_tasks: populate_config.yaml
- block:
- name: Gather acls facts
nxos_facts: &facts
gather_subset:
- "!all"
- "!min"
gather_network_resources: acls
- name: Parsed
nxos_acls: &parsed
running_config: |
ip access-list ACL1v4
10 permit ip any any
20 deny udp any any
ip access-list ACL2v4
10 permit ahp 192.0.2.0 0.0.0.255 any
ipv6 access-list ACL1v6
10 permit sctp any any
20 remark IPv6 ACL
ipv6 access-list ACL2v6
10 deny ipv6 any 2001:db8:3000::36/128
20 permit tcp 2001:db8:2000:2::2/128 2001:db8:2000:ab::2/128
state: parsed
register: result
- assert:
that:
- "result.changed == false"
- "ansible_facts.network_resources.acls == result.parsed"
- name: Idempotence - Parsed
nxos_acls: *parsed
register: result
- assert:
that: "result.changed == false"
always:
- include_tasks: remove_config.yaml