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

132 lines
2.5 KiB
YAML

---
- debug: msg="START connection={{ ansible_connection }} nxos_vrrp sanity test"
- block:
- name: "Enable interface-vlan"
nxos_feature:
feature: interface-vlan
state: enabled
- name: "Enable vrrp"
nxos_feature:
feature: vrrp
state: enabled
- name: "create int vlan 10"
nxos_config:
commands: "int vlan 10"
- name: Ensure vrrp group 100 and vip 10.1.100.1 is on vlan10
nxos_vrrp: &configure
interface: vlan10
group: 100
vip: 10.1.100.1
admin_state: 'no shutdown'
register: result
- assert: &true
that:
- "result.changed == true"
- name: "Conf Idempotence"
nxos_vrrp: *configure
register: result
- assert: &false
that:
- "result.changed == false"
- name: Ensure vrrp group 100 is default
nxos_vrrp: &configure_def
interface: vlan10
group: 100
vip: default
admin_state: default
register: result
- assert: *true
- name: "Conf Idempotence"
nxos_vrrp: *configure_def
register: result
- assert: *false
- name: Ensure removal of the vrrp group config
nxos_vrrp: &remove
interface: vlan10
group: 100
state: absent
register: result
- assert: *true
- pause:
seconds: 30
- name: "Remove Idempotence"
nxos_vrrp: *remove
register: result
- assert: *false
- pause:
seconds: 30
- name: Re-config with more params
nxos_vrrp: &reconfig
interface: vlan10
group: 100
vip: 10.1.100.1
preempt: False
interval: 10
priority: 130
authentication: AUTHKEY
register: result
- assert: *true
- name: "Reconfig Idempotence"
nxos_vrrp: *reconfig
register: result
- assert: *false
- name: Re-config with defaults
nxos_vrrp: &reconfig_def
interface: vlan10
group: 100
vip: default
preempt: True
interval: default
priority: default
authentication: default
register: result
- assert: *true
- name: "Reconfig Idempotence"
nxos_vrrp: *reconfig_def
register: result
- assert: *false
always:
- name: remove vrrp
nxos_vrrp: *remove
ignore_errors: yes
- name: "Disable interface-vlan"
nxos_config:
commands:
- no feature interface-vlan
match: none
ignore_errors: yes
- name: "Disable vrrp"
nxos_feature:
feature: vrrp
state: disabled
ignore_errors: yes
- debug: msg="END connection={{ ansible_connection }} nxos_vrrp sanity test"