ansible/test/integration/targets/iosxr_lldp_global/tests/cli/rtt.yaml
Nilashish Chakraborty 09f712c7f3
Add iosxr_lldp_global resource module (#60074)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
2019-08-12 18:03:23 +05:30

49 lines
1.3 KiB
YAML

---
- debug:
msg: "START isoxr_lldp_global round trip integration tests on connection={{ ansible_connection }}"
- block:
- include_tasks: _remove_config.yaml
- name: Apply the provided configuration (base config)
iosxr_lldp_global:
config:
holdtime: 200
timer: 500
state: merged
register: base_config
- name: Gather interfaces facts
iosxr_facts:
gather_subset:
- "!all"
- "!min"
gather_network_resources:
- lldp_global
- name: Apply the provided configuration (config to be reverted)
iosxr_lldp_global:
config:
holdtime: 200
reinit: 4
subinterfaces: True
timer: 3000
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
iosxr_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