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_vni/tests/common/sanity.yaml
Nathaniel Case e9d7fa0418
HTTP(S) API connection plugin (#39224)
* HTTPAPI connection

* Punt run_commands to cliconf or httpapi

* Fake enable_mode on eapi

* Pull changes to nxos

* Move load_config to edit_config for future-preparedness

* Don't fail on lldp disabled

* Re-enable check_rc on nxos' run_commands

* Reorganize nxos httpapi plugin for compatibility

* draft docs for connection: httpapi

* restores docs for connection:local for eapi

* Add _remote_is_local to httpapi
2018-05-17 18:47:15 -04:00

108 lines
2.2 KiB
YAML

---
- debug: msg="START connection={{ ansible_connection }} nxos_evpn_vni sanity test"
- debug: msg="Using provider={{ connection.transport }}"
when: ansible_connection == "local"
- name: "Setup"
nxos_config: &remove_evpn
lines: no nv overlay evpn
match: none
ignore_errors: yes
- block:
- name: "Enable feature BGP"
nxos_feature:
feature: bgp
state: enabled
- name: "Enable nv overlay evpn"
nxos_config:
lines: nv overlay evpn
match: none
- name: "Configure nxos_evpn_vni"
nxos_evpn_vni: &evpn_vni
vni: 6000
route_distinguisher: "60:10"
route_target_import:
- auto
- "5000:10"
- "4100:100"
route_target_export:
- auto
- "5000:10"
- "1.1.1.1:43"
register: result
- assert: &true
that:
- "result.changed == true"
- name: "Check Idempotence"
nxos_evpn_vni: *evpn_vni
register: result
- assert: &false
that:
- "result.changed == false"
- name: "Configure nxos_evpn_vni"
nxos_evpn_vni: &evpn_vni1
vni: 6000
route_distinguisher: "50:20"
route_target_import: auto
route_target_export: auto
register: result
- assert: *true
- name: "Check Idempotence"
nxos_evpn_vni: *evpn_vni1
register: result
- assert: *false
- name: "Configure nxos_evpn_vni"
nxos_evpn_vni: &evpn_vni_def
vni: 6000
route_distinguisher: default
route_target_import: default
route_target_export: default
register: result
- assert: *true
- name: "Check Idempotence"
nxos_evpn_vni: *evpn_vni_def
register: result
- assert: *false
- name: "remove nxos_evpn_vni"
nxos_evpn_vni: &rvni
vni: 6000
state: absent
register: result
- assert: *true
- name: "Check Idempotence"
nxos_evpn_vni: *rvni
register: result
- assert: *false
when: not (platform is search('N3K')) and not (platform is match('N35'))
always:
- name: "Remove nv overlay evpn"
nxos_config: *remove_evpn
ignore_errors: yes
- name: "Disable feature bgp"
nxos_feature:
feature: bgp
state: disabled
ignore_errors: yes
- debug: msg="END connection={{ ansible_connection }} nxos_evpn_vni sanity test"