ansible/test/integration/targets/exos_vlans/tests/httpapi/merged.yaml
JayalakshmiV 45acdb41d2 Added Exos vlan resource module (#61865)
* EXOS_VLAN resource module

* EXOS_VLAN resource module

* EXOS_VLAN resource module

* EXOS_VLAN resource module

* EXOS_VLAN resource module

* Fix exos_vlans resource module and integration test

* Move exos_vlan folder to exos_vlans folder

* Fix exos->config->vlans and exos->utils

* Fix version_added

* Improve exos_vlans module and integration tests

* Fix exos_vlans.py

* exos_vlan resource module
2019-10-10 06:50:04 -04:00

49 lines
1.3 KiB
YAML

---
- debug:
msg: "START exos_vlans merged integration tests on connection = {{ ansible_connection }}"
- include_tasks: _reset_config.yaml
- include_tasks: _populate_config.yaml
- block:
- name: Merge the provided configuration with the existing running configuration
exos_vlans: &merged
config:
- name: vlan_30
vlan_id: 30
state: active
- vlan_id: 10
name: vlan_10
state: suspend
state: merged
register: result
- name: Assert that before dicts were correctly generated
assert:
that:
- "{{ initial_state == result['before'] }}"
- name: Assert that correct set of requests were generated
assert:
that:
- "{{ merged['requests'] == result['requests'] }}"
- name: Assert that after dicts were correctly generated
assert:
that:
- "{{ merged['after'] == result['after'] }}"
- name: Merge the provided configuration with the existing configuration (IDEMPOTENT)
exos_vlans: *merged
register: result
- name: Assert that the previous task was idempotent
assert:
that:
- "result.changed == false"
- name: Assert that before dict was correctly generated
assert:
that:
- "{{ merged['after'] == result['before'] }}"