diff options
author | saichint <saichint@cisco.com> | 2018-04-03 07:53:43 +0200 |
---|---|---|
committer | Trishna Guha <trishnaguha17@gmail.com> | 2018-04-03 07:53:43 +0200 |
commit | 24cc6b80bd189a0f296d5e7d19cf0f93b5a53b00 (patch) | |
tree | 81a368f6f8072f48c9cf901d2843fe613ced1c9b /test/integration/targets/nxos_aaa_server_host | |
parent | Add missing required property to docs (diff) | |
download | ansible-24cc6b80bd189a0f296d5e7d19cf0f93b5a53b00.tar.xz ansible-24cc6b80bd189a0f296d5e7d19cf0f93b5a53b00.zip |
fix nxos_aaa_server_host issues (#38188)
Diffstat (limited to 'test/integration/targets/nxos_aaa_server_host')
-rw-r--r-- | test/integration/targets/nxos_aaa_server_host/tests/common/radius.yaml | 68 | ||||
-rw-r--r-- | test/integration/targets/nxos_aaa_server_host/tests/common/tacacs.yaml | 61 |
2 files changed, 117 insertions, 12 deletions
diff --git a/test/integration/targets/nxos_aaa_server_host/tests/common/radius.yaml b/test/integration/targets/nxos_aaa_server_host/tests/common/radius.yaml index 572650e97e..cf9a65556b 100644 --- a/test/integration/targets/nxos_aaa_server_host/tests/common/radius.yaml +++ b/test/integration/targets/nxos_aaa_server_host/tests/common/radius.yaml @@ -43,7 +43,7 @@ register: result - assert: *false - + - name: "Configure radius server non defaults" nxos_aaa_server_host: &configure_radius_non_default server_type: radius @@ -54,7 +54,7 @@ state: present provider: "{{ connection }}" register: result - + - assert: *true - name: "Check Idempotence" @@ -63,25 +63,38 @@ - assert: *false - - name: "Remove radius server configuration" - nxos_aaa_server_host: *remove + - name: "Configure some defaults on radius server" + nxos_aaa_server_host: &configure_some_radius_default + server_type: radius + address: 8.8.8.8 + host_timeout: default + auth_port: 1000 + acct_port: default + state: present + provider: "{{ connection }}" register: result - assert: *true + - name: "Check Idempotence" + nxos_aaa_server_host: *configure_some_radius_default + register: result + + - assert: *false + - name: "Configure radius server with clear text pwd" nxos_aaa_server_host: &configure_radius_clear_text server_type: radius address: 8.8.8.8 host_timeout: 25 - auth_port: 2083 + auth_port: default acct_port: 2084 encrypt_type: 0 key: hello state: present provider: "{{ connection }}" register: result - + - assert: *true - name: "Check NOT Idempotent" @@ -115,8 +128,49 @@ nxos_aaa_server_host: *configure_radius_type7 register: result + - assert: *false + + - name: "Configure radius server with default key" + nxos_aaa_server_host: &configure_radius_defkey + server_type: radius + address: 8.8.8.8 + host_timeout: default + auth_port: 1000 + acct_port: default + encrypt_type: 7 + key: default + state: present + provider: "{{ connection }}" + register: result + + - assert: *true + + - name: "Check Idempotence" + nxos_aaa_server_host: *configure_radius_defkey + register: result + + - assert: *false + + - name: "Configure radius server with all def" + nxos_aaa_server_host: &configure_radius_alldef + server_type: radius + address: 8.8.8.8 + host_timeout: default + auth_port: default + acct_port: default + key: default + state: present + provider: "{{ connection }}" + register: result + - assert: *true + - name: "Check Idempotence" + nxos_aaa_server_host: *configure_radius_alldef + register: result + + - assert: *false + rescue: - debug: msg="connection={{ ansible_connection }} nxos_aaa_server_host failure detected" @@ -127,4 +181,4 @@ nxos_aaa_server_host: *remove register: result - - debug: msg="END connection={{ ansible_connection }} nxos_aaa_server_host radius.yaml sanity test" + - debug: msg="END connection={{ ansible_connection }} nxos_aaa_server_host radius.yaml sanity test" diff --git a/test/integration/targets/nxos_aaa_server_host/tests/common/tacacs.yaml b/test/integration/targets/nxos_aaa_server_host/tests/common/tacacs.yaml index 4229f9affb..6307316734 100644 --- a/test/integration/targets/nxos_aaa_server_host/tests/common/tacacs.yaml +++ b/test/integration/targets/nxos_aaa_server_host/tests/common/tacacs.yaml @@ -60,7 +60,7 @@ state: present provider: "{{ connection }}" register: result - + - assert: *true - name: "Check Idempotence" @@ -69,18 +69,30 @@ - assert: *false - - name: "Remove tacacs server configuration" - nxos_aaa_server_host: *remove + - name: "Configure some defaults on tacacs server" + nxos_aaa_server_host: &configure_some_tacacs_default + server_type: tacacs + address: 8.8.8.8 + host_timeout: default + tacacs_port: 100 + state: present + provider: "{{ connection }}" register: result - assert: *true + - name: "Check Idempotence" + nxos_aaa_server_host: *configure_some_tacacs_default + register: result + + - assert: *false + - name: "Configure tacacs server with clear text pwd" nxos_aaa_server_host: &configure_tacacs_clear_text server_type: tacacs address: 8.8.8.8 host_timeout: 25 - tacacs_port: 89 + tacacs_port: default encrypt_type: 0 key: hello state: present @@ -119,8 +131,47 @@ nxos_aaa_server_host: *configure_tacacs_type7 register: result + - assert: *false + + - name: "Configure tacacs server with default key" + nxos_aaa_server_host: &configure_tacacs_defkey + server_type: tacacs + address: 8.8.8.8 + host_timeout: default + tacacs_port: 89 + encrypt_type: 7 + key: default + state: present + provider: "{{ connection }}" + register: result + + - assert: *true + + - name: "Check Idempotence" + nxos_aaa_server_host: *configure_tacacs_defkey + register: result + + - assert: *false + + - name: "Configure tacacs server with all def" + nxos_aaa_server_host: &configure_tacacs_alldef + server_type: tacacs + address: 8.8.8.8 + host_timeout: default + tacacs_port: default + key: default + state: present + provider: "{{ connection }}" + register: result + - assert: *true + - name: "Check Idempotence" + nxos_aaa_server_host: *configure_tacacs_alldef + register: result + + - assert: *false + rescue: - debug: msg="connection={{ ansible_connection }} nxos_aaa_server_host failure detected" @@ -131,7 +182,7 @@ nxos_aaa_server_host: *remove register: result - - name: "Enable feature tacacs+" + - name: "Disable feature tacacs+" nxos_feature: feature: tacacs+ state: disabled |