ansible/test/integration/targets/vyos_firewall_global/tests/cli/parsed.yaml
Rohit fc05c50b7f
VyOS: firewall global module added (#66800)
* firewall global module

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* sanity fixed

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* test updated

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* sanity fixes

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* group member handling updated

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* comments incorporated

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>
2020-02-24 09:03:02 -05:00

39 lines
1 KiB
YAML

---
- debug:
msg: "START vyos_firewall_global parsed integration tests on connection={{ ansible_connection }}"
- include_tasks: _remove_config.yaml
- include_tasks: _populate.yaml
- block:
- name: Gather firewall_global facts
vyos_facts:
gather_subset:
- default
gather_network_resources:
- firewall_global
register: firewall_global_facts
- name: Provide the running configuration for parsing (config to be parsed)
vyos_firewall_global: &parsed
running_config:
"{{ lookup('file', '_parsed_config.cfg') }}"
state: parsed
register: result
- name: Assert that correct parsing done
assert:
that: "{{ ansible_facts['network_resources']['firewall_global'] == result['parsed'] }}"
- name: Gather the existing running configuration (IDEMPOTENT)
vyos_firewall_global: *parsed
register: result
- name: Assert that the previous task was idempotent
assert:
that:
- "result['changed'] == false"
always:
- include_tasks: _remove_config.yaml