d8f9904f43
* vyos_lldp_global Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com> * sanity checks Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com> * deprecated changes Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com> * comments incorporated Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com> * test cases updated Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com> * comments incorporated Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com> * branch conflict resolved Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com> * sanity check passes Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>
51 lines
1.2 KiB
YAML
51 lines
1.2 KiB
YAML
---
|
|
- debug:
|
|
msg: "START vyos_lldp_global round trip integration tests on connection={{ ansible_connection }}"
|
|
|
|
- include_tasks: _remove_config.yaml
|
|
|
|
- block:
|
|
- name: Apply the provided configuration (base config)
|
|
vyos_lldp_global:
|
|
config:
|
|
legacy_protocols:
|
|
- 'fdp'
|
|
- 'cdp'
|
|
address: 192.0.2.11
|
|
state: merged
|
|
register: base_config
|
|
|
|
- name: Gather vyos_lldp_global facts
|
|
vyos_facts:
|
|
gather_subset:
|
|
- default
|
|
gather_network_resources:
|
|
- lldp_global
|
|
|
|
- name: Apply the provided configuration (config to be reverted)
|
|
vyos_lldp_global:
|
|
config:
|
|
legacy_protocols:
|
|
- 'edp'
|
|
- 'sonmp'
|
|
- 'cdp'
|
|
address: 192.0.2.14
|
|
state: merged
|
|
register: result
|
|
|
|
- name: Assert that changes were applied
|
|
assert:
|
|
that: "{{ round_trip['after'] == result['after'] }}"
|
|
|
|
- name: Revert back to base config using facts round trip
|
|
vyos_lldp_global:
|
|
config: "{{ ansible_facts['network_resources']['lldp_global'] }}"
|
|
state: replaced
|
|
register: revert
|
|
|
|
- name: Assert that config was reverted
|
|
assert:
|
|
that: "{{ base_config['after'] == revert['after'] }}"
|
|
|
|
always:
|
|
- include_tasks: _remove_config.yaml
|