01e4c41be4
* 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
110 lines
2.3 KiB
YAML
110 lines
2.3 KiB
YAML
---
|
|
- debug: msg="START connection={{ ansible_connection }} nxos_vrf sanity test"
|
|
|
|
- set_fact: intname1="{{ nxos_int1 }}"
|
|
- set_fact: intname2="{{ nxos_int2 }}"
|
|
|
|
- set_fact: rdnd="1:2"
|
|
when: (platform is not match("N35|N7K")) and ((imagetag != 'I2'))
|
|
|
|
- set_fact: rdd="default"
|
|
when: (platform is not match("N35|N7K")) and ((imagetag != 'I2'))
|
|
|
|
- set_fact: vnind="5000"
|
|
when: platform is not match("N35|N7K|N3L")
|
|
|
|
- set_fact: vnid="default"
|
|
when: platform is not match("N35|N7K|N3L")
|
|
|
|
- name: "Enable feature BGP"
|
|
nxos_feature:
|
|
feature: bgp
|
|
state: enabled
|
|
ignore_errors: yes
|
|
|
|
- name: "Setup: Enable nv overlay evpn"
|
|
nxos_config:
|
|
commands:
|
|
- nv overlay evpn
|
|
provider: "{{ connection }}"
|
|
ignore_errors: yes
|
|
when: platform is match("N5K|N6K")
|
|
|
|
- block:
|
|
- name: Ensure ntc VRF exists on switch
|
|
nxos_vrf: &configure
|
|
vrf: ntc
|
|
admin_state: down
|
|
description: testing
|
|
vni: "{{vnind|default(omit)}}"
|
|
rd: "{{rdnd|default(omit)}}"
|
|
interfaces:
|
|
- "{{ intname1 }}"
|
|
- "{{ intname2 }}"
|
|
register: result
|
|
|
|
- assert: &true
|
|
that:
|
|
- "result.changed == true"
|
|
|
|
- name: "Conf Idempotence"
|
|
nxos_vrf: *configure
|
|
register: result
|
|
|
|
- assert: &false
|
|
that:
|
|
- "result.changed == false"
|
|
|
|
- pause:
|
|
seconds: 30
|
|
|
|
- name: Remove config
|
|
nxos_vrf: &remconf
|
|
vrf: ntc
|
|
admin_state: up
|
|
vni: "{{vnid|default(omit)}}"
|
|
rd: "{{rdd|default(omit)}}"
|
|
interfaces: default
|
|
register: result
|
|
|
|
- assert: *true
|
|
|
|
- name: "Conf Idempotence"
|
|
nxos_vrf: *remconf
|
|
register: result
|
|
|
|
- assert: *false
|
|
|
|
- name: Ensure ntc VRF does not exist on switch
|
|
nxos_vrf: &remove
|
|
vrf: ntc
|
|
state: absent
|
|
register: result
|
|
|
|
- assert: *true
|
|
|
|
- pause:
|
|
seconds: 30
|
|
|
|
- name: "Remove Idempotence"
|
|
nxos_vrf: *remove
|
|
register: result
|
|
|
|
- assert: *false
|
|
|
|
always:
|
|
- name: "Setup: Disable nv overlay evpn"
|
|
nxos_config:
|
|
commands:
|
|
- no nv overlay evpn
|
|
provider: "{{ connection }}"
|
|
ignore_errors: yes
|
|
when: platform is match("N5K|N6K")
|
|
|
|
- name: "Disable feature BGP"
|
|
nxos_feature:
|
|
feature: bgp
|
|
state: disabled
|
|
ignore_errors: yes
|
|
|
|
- debug: msg="END connection={{ ansible_connection }} nxos_vrf sanity test"
|