45acdb41d2
* 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
46 lines
1.3 KiB
YAML
46 lines
1.3 KiB
YAML
---
|
|
- debug:
|
|
msg: "START exos_vlans overridden integration tests on connection={{ ansible_connection }}"
|
|
|
|
- include_tasks: _reset_config.yaml
|
|
|
|
- include_tasks: _populate_config.yaml
|
|
|
|
- block:
|
|
- name: Override existing VLAN configuration with provided configuration
|
|
exos_vlans: &overridden
|
|
config:
|
|
- name: TEST_VLAN10
|
|
vlan_id: 10
|
|
state: suspend
|
|
state: overridden
|
|
register: result
|
|
|
|
- name: Assert that correct set of requests were generated
|
|
assert:
|
|
that:
|
|
- "{{ overridden['requests'] == result['requests'] }}"
|
|
|
|
- name: Assert that before dicts were correctly generated
|
|
assert:
|
|
that:
|
|
- "{{ initial_state == result['before'] }}"
|
|
|
|
- name: Assert that after dicts were correctly generated
|
|
assert:
|
|
that:
|
|
- "{{ overridden['after'] == result['after'] }}"
|
|
|
|
- name: Override existing VLAN configuration with provided configuration (IDEMPOTENT)
|
|
exos_vlans: *overridden
|
|
register: result
|
|
|
|
- name: Assert that task was idempotent
|
|
assert:
|
|
that:
|
|
- "result.changed == false"
|
|
|
|
- name: Assert that before dicts were correctly generated
|
|
assert:
|
|
that:
|
|
- "{{ overridden['after'] == result['before'] }}"
|