mirror of https://github.com/ansible/ansible.git
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 testingpull/42208/head
parent
b87e1a023d
commit
db7300904d
@ -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