1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/test/integration/targets/nxos_evpn_global/tests/nxapi/sanity.yaml
rahushen 85fc4c67ef Add integration tests for nxos_facts, nxos_bgp, nxos_bgp_af, nxos_bgp_neighbor, and nxos_evpn_global (#26924)
* Add new ITs for nxos_bgp, nxos_bgp_af, nxos_bgp_neighbor, and nxos_evpn_global

* Add nxos_facts IT and enhance existing tests

* switch nxos_feature tests to use bgp

* misc. test fixes

* Add checks for titanium in IT

* Handle non-titanium case in tests
2017-08-10 05:29:13 -04:00

73 lines
1.7 KiB
YAML

---
- debug: msg="START TRANSPORT:NXAPI nxos_evpn_global sanity test"
- name: "Setup"
nxos_config: &remove_evpn_config
lines: no nv overlay evpn
match: none
provider: "{{ nxapi }}"
ignore_errors: yes
- name: "Disable feature nv overlay"
nxos_feature: &disable_feature_nv_overlay
feature: nv overlay
state: disabled
provider: "{{ nxapi }}"
ignore_errors: yes
- block:
- name: "Enable feature nv overlay"
nxos_feature: &enable_feature_nv_overlay
feature: nv overlay
state: enabled
provider: "{{ nxapi }}"
ignore_errors: yes
- name: "Enable nv overlay evpn"
nxos_evpn_global: &enable_evpn
nv_overlay_evpn: true
provider: "{{ nxapi }}"
register: result
- assert: &true
that:
- "result.changed == true"
- name: "CHECK IDEMPOTENCE - enable nv overlay evpn"
nxos_evpn_global: *enable_evpn
register: result
- assert: &false
that:
- "result.changed == false"
- name: "Disable nv overlay evpn"
nxos_evpn_global: &disable_evpn
nv_overlay_evpn: false
provider: "{{ nxapi }}"
register: result
- assert: *true
- name: "CHECK DEMPOTENCE - Disable nv overlay evpn"
nxos_evpn_global: *disable_evpn
register: result
- assert: *false
when: not (platform | search('N3K'))
rescue:
- debug: msg="TRANSPORT:NXAPI nxos_evpn_global sanity test - FALURE ENCOUNTERED"
always:
- name: "Cleanup - Disable nv overlay evpn"
nxos_config: *remove_evpn_config
ignore_errors: yes
- name: "Cleanup - Disable feature nv overlay"
nxos_feature: *disable_feature_nv_overlay
ignore_errors: yes
- debug: msg="END TRANSPORT:NXAPI nxos_evpn_global sanity test"