mirror of https://github.com/ansible/ansible.git
nxos_nxapi fix pick-2.5 (#42490)
* Enforcing NXAPI default HTTP behavior (#41817) * nxos_nxapi http default behavior * Use nxos_nxapi module in prepare_nxos_tests * Refactor nxos_nxapi configure test to use yaml block * Extend nxos_nxapi https & http test cases * Removed NXOS internal release naming * Resolved ansibot sanity errors * Fix typo in prepare_nxos_tests * Address PR comments * Shippable indicates this is no longer needed * Add port change logic and testing (cherry picked from commitpull/43174/headdb7300904d) * add changelog Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> * Add get_capabilities in nxapi module_utils (#42688) Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> (cherry picked from commitd5e9653c96)
parent
306be9f23c
commit
e3993bd01b
@ -0,0 +1,2 @@
|
||||
bugfixes:
|
||||
- get_capabilities in nxapi module_utils should not return empty dictionary (https://github.com/ansible/ansible/pull/42688).
|
||||
@ -0,0 +1,2 @@
|
||||
bugfixes:
|
||||
- Enforcing NXAPI default HTTP behavior (https://github.com/ansible/ansible/pull/41817).
|
||||
@ -1,7 +0,0 @@
|
||||
---
|
||||
- name: Assert configuration changes
|
||||
assert:
|
||||
that:
|
||||
- result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'].l_port
|
||||
- result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'].l_port|string is search("9443")
|
||||
- result.stdout[0]['operation_status'].o_status == 'nxapi enabled'
|
||||
@ -0,0 +1,16 @@
|
||||
---
|
||||
- name: Assert HTTP configuration changes
|
||||
assert:
|
||||
that:
|
||||
- result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'].l_port
|
||||
- result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'].l_port|string is search("80")
|
||||
- result.stdout[0]['operation_status'].o_status == 'nxapi enabled'
|
||||
when: major_version is version('9.2', '<')
|
||||
|
||||
- name: Assert HTTP configuration changes 9.2 or greater
|
||||
assert:
|
||||
that:
|
||||
- result.stdout[0]['http_port']
|
||||
- result.stdout[0]['http_port']|string is search("80")
|
||||
- result.stdout[0]['nxapi_status'] == 'nxapi enabled'
|
||||
when: major_version is version('9.2', '>=')
|
||||
@ -0,0 +1,16 @@
|
||||
---
|
||||
- name: Assert HTTPS configuration changes
|
||||
assert:
|
||||
that:
|
||||
- result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'].l_port
|
||||
- result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'].l_port|string is search("9443")
|
||||
- result.stdout[0]['operation_status'].o_status == 'nxapi enabled'
|
||||
when: major_version is version('9.2', '<')
|
||||
|
||||
- name: Assert HTTPS configuration changes 9.2 or greater
|
||||
assert:
|
||||
that:
|
||||
- result.stdout[0]['https_port']
|
||||
- result.stdout[0]['https_port']|string is search("9443")
|
||||
- result.stdout[0]['nxapi_status'] == 'nxapi enabled'
|
||||
when: major_version is version('9.2', '>=')
|
||||
@ -0,0 +1,20 @@
|
||||
---
|
||||
- name: Assert HTTPS & HTTP configuration changes
|
||||
assert:
|
||||
that:
|
||||
- result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'][1].l_port
|
||||
- result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'][1].l_port|string is search("9443")
|
||||
- result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'][0].l_port
|
||||
- result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'][0].l_port|string is search("80")
|
||||
- result.stdout[0]['operation_status'].o_status == 'nxapi enabled'
|
||||
when: major_version is version('9.2', '<')
|
||||
|
||||
- name: Assert HTTPS & HTTP configuration changes 9.2 or greater
|
||||
assert:
|
||||
that:
|
||||
- result.stdout[0]['https_port']
|
||||
- result.stdout[0]['https_port']|string is search("9443")
|
||||
- result.stdout[0]['http_port']
|
||||
- result.stdout[0]['http_port']|string is search("80")
|
||||
- result.stdout[0]['nxapi_status'] == 'nxapi enabled'
|
||||
when: major_version is version('9.2', '>=')
|
||||
@ -0,0 +1,20 @@
|
||||
---
|
||||
- name: Assert HTTPS & HTTP configuration changes
|
||||
assert:
|
||||
that:
|
||||
- result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'][1].l_port
|
||||
- result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'][1].l_port|string is search("500")
|
||||
- result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'][0].l_port
|
||||
- result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'][0].l_port|string is search("99")
|
||||
- result.stdout[0]['operation_status'].o_status == 'nxapi enabled'
|
||||
when: major_version is version('9.2', '<')
|
||||
|
||||
- name: Assert HTTPS & HTTP configuration changes 9.2 or greater
|
||||
assert:
|
||||
that:
|
||||
- result.stdout[0]['https_port']
|
||||
- result.stdout[0]['https_port']|string is search("500")
|
||||
- result.stdout[0]['http_port']
|
||||
- result.stdout[0]['http_port']|string is search("99")
|
||||
- result.stdout[0]['nxapi_status'] == 'nxapi enabled'
|
||||
when: major_version is version('9.2', '>=')
|
||||
@ -0,0 +1,6 @@
|
||||
---
|
||||
- name: Assert HTTP configuration changes
|
||||
assert:
|
||||
that:
|
||||
- result.stdout[0].https_port is not defined
|
||||
- result.stdout[0].http_port|string is search("80")
|
||||
@ -1,5 +1,5 @@
|
||||
---
|
||||
- name: Assert configuration changes
|
||||
- name: Assert HTTPS configuration changes
|
||||
assert:
|
||||
that:
|
||||
- result.stdout[0].http_port is not defined
|
||||
@ -0,0 +1,8 @@
|
||||
---
|
||||
- name: Assert HTTPS && HTTP configuration changes
|
||||
assert:
|
||||
that:
|
||||
- result.stdout[0].https_port is defined
|
||||
- result.stdout[0].http_port is defined
|
||||
- result.stdout[0].https_port|string is search("9443")
|
||||
- result.stdout[0].http_port|string is search("80")
|
||||
@ -0,0 +1,8 @@
|
||||
---
|
||||
- name: Assert HTTPS && HTTP configuration changes
|
||||
assert:
|
||||
that:
|
||||
- result.stdout[0].https_port is defined
|
||||
- result.stdout[0].http_port is defined
|
||||
- result.stdout[0].https_port|string is search("500")
|
||||
- result.stdout[0].http_port|string is search("99")
|
||||
@ -0,0 +1,7 @@
|
||||
---
|
||||
- name: Assert HTTP configuration changes
|
||||
assert:
|
||||
that:
|
||||
- result.stdout[0].https_port is not defined
|
||||
- result.stdout[0].http_port|string is search("80")
|
||||
- result.stdout[0].sandbox_status == 'Enabled'
|
||||
@ -1,5 +1,5 @@
|
||||
---
|
||||
- name: Assert configuration changes
|
||||
- name: Assert HTTPS configuration changes
|
||||
assert:
|
||||
that:
|
||||
- result.stdout[0].http_port is not defined
|
||||
@ -0,0 +1,9 @@
|
||||
---
|
||||
- name: Assert HTTPS & HTTP configuration changes
|
||||
assert:
|
||||
that:
|
||||
- result.stdout[0].https_port is defined
|
||||
- result.stdout[0].http_port is defined
|
||||
- result.stdout[0].https_port|string is search("9443")
|
||||
- result.stdout[0].http_port|string is search("80")
|
||||
- result.stdout[0].sandbox_status == 'Enabled'
|
||||
@ -0,0 +1,9 @@
|
||||
---
|
||||
- name: Assert HTTPS & HTTP configuration changes
|
||||
assert:
|
||||
that:
|
||||
- result.stdout[0].https_port is defined
|
||||
- result.stdout[0].http_port is defined
|
||||
- result.stdout[0].https_port|string is search("500")
|
||||
- result.stdout[0].http_port|string is search("99")
|
||||
- result.stdout[0].sandbox_status == 'Enabled'
|
||||
Loading…
Reference in New Issue