ansible/test/integration/targets/nxos_vrf_af/tests/common/sanity.yaml
nkshrishail 01e4c41be4 nxos: Removing local-nxapi plugin and related parameters' usage from the integration tests. (#65068)
* nxos_integration_tests: Removing obsolete provider parameter

* nxos: removing support for local-nxapi plugin

* nxos: removing LocalNxapi plugin implementation

* nxos_nxapi: removing local plugin usage

* REVERT - nxos: removing LocalNxapi plugin implementation

* Addressing yamllint issues

* Removing the condition on the debug messages

* Restoring changes done to nxos_nxapi* tests

* Retaining timeout of 500 on nxos_smoke test

* Some cleanup

* Addressing latest comments

* Restoring the nxos_smoke and removing timeout from nxos_config and nxos_rollback
2020-01-08 13:43:23 +05:30

146 lines
2.7 KiB
YAML

---
- debug: msg="START connection={{ ansible_connection }} nxos_vrf_af sanity test"
- name: Configure feature bgp
nxos_feature:
feature: bgp
state: enabled
- name: Configure feature nv overlay
nxos_config:
commands: "feature nv overlay"
ignore_errors: yes
- name: Configure nv overlay evpn
nxos_config:
commands: "nv overlay evpn"
ignore_errors: yes
- block:
- name: Configure vrf af ipv4
nxos_vrf_af: &configure4
vrf: ansible
afi: ipv4
route_target_both_auto_evpn: True
register: result
- assert: &true
that:
- "result.changed == true"
- name: "Conf Idempotence"
nxos_vrf_af: *configure4
register: result
- assert: &false
that:
- "result.changed == false"
- name: Configure vrf af ipv6
nxos_vrf_af: &configure6
vrf: ansible
afi: ipv6
route_target_both_auto_evpn: True
register: result
- assert: *true
- name: "Conf Idempotence"
nxos_vrf_af: *configure6
register: result
- assert: *false
- name: Remove router target4
nxos_vrf_af: &rrt4
vrf: ansible
afi: ipv4
route_target_both_auto_evpn: False
register: result
- assert: *true
- name: "Conf Idempotence"
nxos_vrf_af: *rrt4
register: result
- assert: *false
- name: Remove router target6
nxos_vrf_af: &rrt6
vrf: ansible
afi: ipv6
route_target_both_auto_evpn: False
register: result
- assert: *true
- name: "Conf Idempotence"
nxos_vrf_af: *rrt6
register: result
- assert: *false
- name: Remove vrf af v6
nxos_vrf_af: &remove6
vrf: ansible
afi: ipv6
route_target_both_auto_evpn: True
state: absent
register: result
- assert: *true
- pause:
seconds: 30
- name: "Remove Idempotence"
nxos_vrf_af: *remove6
register: result
- assert: *false
- name: Remove vrf af v4
nxos_vrf_af: &remove4
vrf: ansible
afi: ipv4
route_target_both_auto_evpn: True
state: absent
register: result
- assert: *true
- pause:
seconds: 30
- name: "Remove Idempotence"
nxos_vrf_af: *remove4
register: result
- assert: *false
when: not platform is search("N35|N3L")
always:
- name: Remove vrf
nxos_config:
commands: "no vrf context ansible"
ignore_errors: yes
- name: Remove nv overlay evpn
nxos_config:
commands: "no nv overlay evpn"
ignore_errors: yes
- name: Remove feature nv overlay
nxos_config:
commands: "no feature nv overlay"
ignore_errors: yes
- name: Remove feature bgp
nxos_feature:
feature: bgp
state: disabled
ignore_errors: yes
- debug: msg="END connection={{ ansible_connection }} nxos_vrf_af sanity test"