ansible/test/integration/targets/junos_lacp/tests/netconf/rtt.yaml
Ganesh Nalawade 8cbfa75038
Add [junos_lacp] model (#59705)
* Add [junos_lacp] model

*  Add new resource module junos_lacp.
*  Targets model https://github.com/ansible-network/resource_module_models/pull/28

* Fix CI issues

* Fix CI failures
2019-08-12 13:54:44 +05:30

53 lines
1.4 KiB
YAML

---
- debug:
msg: "START junos_lacp RTT integration tests on connection={{ ansible_connection }}"
- include_tasks: _remove_config.yaml
- set_fact:
expected_revert_output:
- system_priority: 63
link_protection: non-revertive
- block:
- name: Apply the provided configuration (base config)
junos_lacp:
config:
system_priority: 63
link_protection: non-revertive
state: merged
- name: Gather interfaces facts
junos_facts:
gather_subset:
- default
gather_network_resources:
- lacp
- name: Apply the provided configuration (config to be reverted)
junos_lacp: &replaced
config:
system_priority: 73
link_protection: revertive
state: replaced
register: result
- name: Assert that changes were applied
assert:
that: "result['changed'] == true"
- name: Revert back to base config using facts round trip
junos_lacp:
config: "{{ ansible_facts['network_resources']['lacp'] }}"
state: replaced
register: revert
- name: Assert that config was reverted
assert:
that: "{{ expected_revert_output | symmetric_difference([revert['after']]) |length == 0 }}"
always:
- include_tasks: _remove_config.yaml
- debug:
msg: "END junos_lacp RTT integration tests on connection={{ ansible_connection }}"