ansible/test/integration/targets/nxos_system/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

126 lines
2.3 KiB
YAML

---
- debug: msg="START connection={{ ansible_connection }}/sanity.yaml"
- block:
- name: remove configuration
nxos_system: &remove
state: absent
register: result
ignore_errors: yes
- name: configure domain lookup
nxos_system: &dlo
domain_lookup: true
state: present
register: result
- name: configure hostname and domain-name
nxos_system: &hostname
hostname: switch
domain_name: test.example.com
register: result
- assert: &true
that:
- "result.changed == true"
- name: Idempotence check
nxos_system: *hostname
register: result
- assert: &false
that:
- "result.changed == false"
- name: configure name servers
nxos_system: &ns
name_servers:
- 8.8.8.8
- 8.8.4.4
register: result
- assert: *true
- name: Idempotence check
nxos_system: *ns
register: result
- assert: *false
- name: configure name servers with VRF support
nxos_system: &nsv
name_servers:
- { server: 8.8.8.8, vrf: management }
- { server: 8.8.4.4, vrf: management }
register: result
- assert: *true
- name: Idempotence check
nxos_system: *nsv
register: result
- assert: *false
- name: configure domain lookup1
nxos_system: &ndlo
domain_lookup: false
register: result
- assert: *true
- name: Idempotence check
nxos_system: *ndlo
register: result
- assert: *false
- name: configure domain lookup2
nxos_system: *dlo
register: result
- assert: *true
- name: Idempotence check
nxos_system: *dlo
register: result
- assert: *false
- name: configure system mtu
nxos_system: &sysmtu
system_mtu: 3000
register: result
- assert: *true
- name: Idempotence check
nxos_system: *sysmtu
register: result
- assert: *false
- name: default configuration
nxos_system: &default
hostname: default
domain_name: default
name_servers: default
system_mtu: default
register: result
- assert: *true
- name: Idempotence check
nxos_system: *default
register: result
- assert: *false
always:
- name: remove configuration
nxos_system: *remove
- name: Re-configure hostname
nxos_system: *hostname
- debug: msg="END connection={{ ansible_connection }}/sanity.yaml"