ansible/test/integration/targets/junos_interfaces/tests/netconf/groups.yaml
Ganesh Nalawade a9a5f4e40d
Change enable to enabled for junos_interfaces module (#62321)
Fixes #62319

Change `enable` option to `enabled` in junos_interfaces
and junos_lldp_interfaces
data model to be in sync with other network platform
resource modules added in 2.9 version.
2019-09-16 12:17:27 +05:30

49 lines
1.5 KiB
YAML

---
- debug:
msg: "START junos_interfaces groups integration tests on connection={{ ansible_connection }}"
- include_tasks: _remove_config.yaml
- set_fact:
expected_group_output:
- name: ge-0/0/11
description: "within test group"
enabled: true
- name: ge-0/0/12
description: "global interface config"
enabled: true
- name: fxp0
enabled: true
- name: "Teardown delete interface configuration"
junos_config: &delete_interface_config
lines:
- delete apply-groups test
- delete groups test interfaces ge-0/0/11
- delete interfaces ge-0/0/12
- block:
- name: "Setup interface configuration"
junos_config:
lines:
- set groups test interfaces ge-0/0/11 description "within test group"
- set apply-groups test
- set interfaces ge-0/0/12 description "global interface config"
- name: "get junos interfaces facts"
junos_facts:
gather_subset: min
gather_network_resources: interfaces
register: result
- name: Assert the configuration is reflected on host
assert:
that:
- "{{ expected_group_output | symmetric_difference(result['ansible_facts']['ansible_network_resources']['interfaces'])|length == 0 }}"
always:
- name: "Teardown delete interface configuration"
junos_config: *delete_interface_config
- debug:
msg: "END junos_interfaces merged integration tests on connection={{ ansible_connection }}"