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
57 lines
1.2 KiB
YAML
57 lines
1.2 KiB
YAML
---
|
|
- debug: msg="START connection={{ ansible_connection }} nxos_vrf_interface sanity test"
|
|
|
|
# Select interface for test
|
|
- set_fact: intname="{{ nxos_int1 }}"
|
|
|
|
- block:
|
|
- name: put interface in L3
|
|
nxos_config:
|
|
commands:
|
|
- no switchport
|
|
parents:
|
|
- "interface {{ intname }}"
|
|
match: none
|
|
|
|
- name: Ensure vrf ntc exists on interface
|
|
nxos_vrf_interface: &configure
|
|
vrf: ntc
|
|
interface: "{{ intname }}"
|
|
state: present
|
|
register: result
|
|
|
|
- assert: &true
|
|
that:
|
|
- "result.changed == true"
|
|
|
|
- name: "Conf Idempotence"
|
|
nxos_vrf_interface: *configure
|
|
register: result
|
|
|
|
- assert: &false
|
|
that:
|
|
- "result.changed == false"
|
|
|
|
- name: Ensure ntc VRF does not exist on interface
|
|
nxos_vrf_interface: &remove
|
|
vrf: ntc
|
|
interface: "{{ intname }}"
|
|
state: absent
|
|
register: result
|
|
|
|
- assert: *true
|
|
|
|
- name: "Remove Idempotence"
|
|
nxos_vrf_interface: *remove
|
|
register: result
|
|
|
|
- assert: *false
|
|
|
|
always:
|
|
- name: put interface in default mode
|
|
nxos_config:
|
|
lines: "default interface {{ intname }}"
|
|
match: none
|
|
ignore_errors: yes
|
|
|
|
- debug: msg="END connection={{ ansible_connection }} nxos_vrf_interface sanity test"
|