ansible/test/integration/targets/nxos_aaa_server/tests/common/radius.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

96 lines
2.2 KiB
YAML

---
- debug: msg="START connection={{ ansible_connection }} nxos_aaa_server radius.yaml sanity test"
- name: "Setup"
nxos_aaa_server: &remove
server_type: radius
deadtime: default
server_timeout: default
directed_request: default
state: default
ignore_errors: yes
- block:
- name: "Configure radius server defaults"
nxos_aaa_server: &configure_default_radius
server_type: radius
state: present
register: result
- name: "Check Idempotence"
nxos_aaa_server: *configure_default_radius
register: result
- assert: &false
that:
- "result.changed == false"
- name: "Configure radius server non defaults"
nxos_aaa_server: &configure_radius_non_default
server_type: radius
server_timeout: 9
deadtime: 20
directed_request: enabled
state: present
register: result
- assert: &true
that:
- "result.changed == true"
- name: "Check Idempotence"
nxos_aaa_server: *configure_radius_non_default
register: result
- assert: *false
- name: "Remove radius server configuration"
nxos_aaa_server: *remove
register: result
- assert: *true
- name: "Configure radius server with global key"
nxos_aaa_server: &configure_radius_global_key
server_type: radius
encrypt_type: 7
global_key: test_key
state: present
register: result
- assert: *true
- name: "Check Idempotence"
nxos_aaa_server: *configure_radius_global_key
register: result
- assert: *false
- name: "Remove radius server configuration"
nxos_aaa_server: &rad_def
server_type: radius
deadtime: default
server_timeout: default
global_key: default
directed_request: default
state: default
register: result
- assert: *true
- name: "Check Idempotence"
nxos_aaa_server: *rad_def
register: result
- assert: *false
rescue:
- debug: msg="connection={{ ansible_connection }} nxos_aaa_server failure detected"
always:
- name: "Remove radius server configuration"
nxos_aaa_server: *remove
register: result
- debug: msg="END connection={{ ansible_connection }} nxos_aaa_server radius.yaml sanity test"