Nxos restore provider to nxapi tests (#41818)

* Quick and dirty sed to add provider

* Manually verify the rest of the cases

* Add missing provider
This commit is contained in:
Nathaniel Case 2018-07-02 09:43:51 -04:00 committed by GitHub
commit a197125954
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
127 changed files with 713 additions and 0 deletions

View file

@ -8,6 +8,7 @@
- show interface mgmt0 | json
wait_for:
- "result[1].TABLE_interface.ROW_interface.state foo up"
provider: "{{ connection }}"
register: result
ignore_errors: yes

View file

@ -9,6 +9,7 @@
wait_for:
- "result[0] contains NX-OS"
- "result[1].TABLE_interface.ROW_interface.interface contains mgmt"
provider: "{{ connection }}"
register: result
- assert:

View file

@ -8,6 +8,7 @@
- show interface mgmt0 | json
wait_for:
- "result[1].TABLE_interface.ROW_interface.state eq up"
provider: "{{ connection }}"
register: result
- assert:
@ -21,6 +22,7 @@
- show interface mgmt0 | json
wait_for:
- "result[1].TABLE_interface.ROW_interface.state == up"
provider: "{{ connection }}"
register: result
- assert:

View file

@ -8,6 +8,7 @@
- show interface mgmt0 | json
wait_for:
- "result[1].TABLE_interface.ROW_interface.eth_ip_mask gt 0"
provider: "{{ connection }}"
register: result
- assert:
@ -21,6 +22,7 @@
- show interface mgmt0 | json
wait_for:
- "result[1].TABLE_interface.ROW_interface.eth_ip_mask > 0"
provider: "{{ connection }}"
register: result
- assert:

View file

@ -8,6 +8,7 @@
- show interface mgmt0 | json
wait_for:
- "result[1].TABLE_interface.ROW_interface.eth_ip_mask ge 0"
provider: "{{ connection }}"
register: result
- assert:
@ -21,6 +22,7 @@
- show interface mgmt0 | json
wait_for:
- "result[1].TABLE_interface.ROW_interface.eth_ip_mask >= 0"
provider: "{{ connection }}"
register: result
- assert:

View file

@ -4,6 +4,7 @@
- name: run invalid command
nxos_command:
commands: ['show foo']
provider: "{{ connection }}"
register: result
ignore_errors: yes
@ -16,6 +17,7 @@
commands:
- show version
- show foo
provider: "{{ connection }}"
register: result
ignore_errors: yes

View file

@ -8,6 +8,7 @@
- show interface mgmt0 | json
wait_for:
- "result[1].TABLE_interface.ROW_interface.eth_ip_mask lt 33"
provider: "{{ connection }}"
register: result
- assert:
@ -21,6 +22,7 @@
- show interface mgmt0 | json
wait_for:
- "result[1].TABLE_interface.ROW_interface.eth_ip_mask lt 33"
provider: "{{ connection }}"
register: result
- assert:

View file

@ -8,6 +8,7 @@
- show interface mgmt0 | json
wait_for:
- "result[1].TABLE_interface.ROW_interface.eth_ip_mask le 32"
provider: "{{ connection }}"
register: result
- assert:
@ -21,6 +22,7 @@
- show interface mgmt0 | json
wait_for:
- "result[1].TABLE_interface.ROW_interface.eth_ip_mask <= 32"
provider: "{{ connection }}"
register: result
- assert:

View file

@ -8,6 +8,7 @@
- show interface mgmt0 | json
wait_for:
- "result[1].TABLE_interface.ROW_interface.state neq down"
provider: "{{ connection }}"
register: result
- assert:
@ -22,6 +23,7 @@
- show interface mgmt0 | json
wait_for:
- "result[1].TABLE_interface.ROW_interface.state != down"
provider: "{{ connection }}"
register: result
- assert:

View file

@ -4,6 +4,7 @@
- name: get output for single command
nxos_command:
commands: ['show version']
provider: "{{ connection }}"
register: result
- assert:
@ -15,6 +16,7 @@
commands:
- show version
- show interface
provider: "{{ connection }}"
register: result
- assert:

View file

@ -7,6 +7,7 @@
- show version
wait_for:
- "result[0] contains bad_value_string"
provider: "{{ connection }}"
register: result
ignore_errors: yes

View file

@ -4,6 +4,7 @@
- name: "Disable feature BGP"
nxos_feature:
feature: bgp
provider: "{{ connection }}"
state: disabled
- block:
@ -21,12 +22,14 @@
- name: "Enable feature BGP"
nxos_feature:
feature: bgp
provider: "{{ connection }}"
state: enabled
- name: "Configure BGP defaults"
nxos_bgp: &configure_default
asn: 65535
router_id: 192.0.2.1
provider: "{{ connection }}"
state: present
register: result
@ -61,6 +64,7 @@
- name: "Disable feature bgp"
nxos_feature:
feature: bgp
provider: "{{ connection }}"
state: disabled
- debug: msg="END nxapi/sanity.yaml on connection={{ ansible_connection }}"