mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
nxos tests to use network_cli (#34474)
* Fix over-byte * Fix nxos_l2_interface docs * Update connections for tasks * Add default ssh port * Only report provider when using connection=local * Send empty provider when connection=network_cli * Fix find tasks
This commit is contained in:
parent
a0ad7ffedf
commit
c371ed8d30
199 changed files with 1589 additions and 684 deletions
|
@ -31,7 +31,7 @@ options:
|
|||
- Full name of the interface excluding any logical
|
||||
unit number, i.e. Ethernet1/1.
|
||||
required: true
|
||||
aliases: interface
|
||||
aliases: ['interface']
|
||||
mode:
|
||||
description:
|
||||
- Mode in which interface needs to be configured.
|
||||
|
@ -49,7 +49,7 @@ options:
|
|||
- List of VLANs to be configured in trunk port.
|
||||
If C(mode=trunk), used as the VLAN range to ADD or REMOVE
|
||||
from the trunk.
|
||||
aliases: trunk_add_vlans
|
||||
aliases: ['trunk_add_vlans']
|
||||
trunk_allowed_vlans:
|
||||
description:
|
||||
- List of allowed VLANs in a given trunk port.
|
||||
|
|
|
@ -33,9 +33,9 @@ class Cliconf(CliconfBase):
|
|||
device_info = {}
|
||||
|
||||
device_info['network_os'] = 'nxos'
|
||||
reply = self.get(b'show version | json')
|
||||
reply = self.get('show version | json')
|
||||
data = json.loads(reply)
|
||||
platform_reply = self.get(b'show inventory | json')
|
||||
platform_reply = self.get('show inventory | json')
|
||||
platform_info = json.loads(platform_reply)
|
||||
|
||||
device_info['network_os_version'] = data.get('sys_ver_str') or data.get('kickstart_ver_str')
|
||||
|
@ -53,7 +53,7 @@ class Cliconf(CliconfBase):
|
|||
def get_config(self, source='running', flags=None):
|
||||
lookup = {'running': 'running-config', 'startup': 'startup-config'}
|
||||
|
||||
cmd = b'show {} '.format(lookup[source])
|
||||
cmd = 'show {} '.format(lookup[source])
|
||||
cmd += ' '.join(flags)
|
||||
cmd = cmd.strip()
|
||||
|
||||
|
@ -61,7 +61,7 @@ class Cliconf(CliconfBase):
|
|||
|
||||
def edit_config(self, command):
|
||||
responses = []
|
||||
for cmd in chain([b'configure'], to_list(command), [b'end']):
|
||||
for cmd in chain(['configure'], to_list(command), ['end']):
|
||||
responses.append(self.send_command(cmd))
|
||||
|
||||
return json.dumps(responses)
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect cli test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/cli"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: cli_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,14 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ cli }}"
|
||||
- name: run test cases (connection=network_cli)
|
||||
include: "{{ test_case_to_run }} ansible_connection=network_cli connection={}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
||||
- name: run test case (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ cli }}"
|
||||
with_first_found: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect nxapi test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/nxapi"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: nxapi_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,21 +20,8 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: enable nxapi
|
||||
nxos_config:
|
||||
lines:
|
||||
- feature nxapi
|
||||
- nxapi http port 80
|
||||
provider: "{{ cli }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ nxapi }}"
|
||||
- name: run test cases (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
||||
- name: disable nxapi
|
||||
nxos_config:
|
||||
lines:
|
||||
- no feature nxapi
|
||||
provider: "{{ cli }}"
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
- debug: msg="START TRANSPORT:{{ connection.transport }} nxos_aaa_server radius.yaml sanity test"
|
||||
- debug: msg="START connection={{ ansible_connection }} nxos_aaa_server radius.yaml sanity test"
|
||||
- debug: msg="Using provider={{ connection.transport }}"
|
||||
when: ansible_connection == "local"
|
||||
|
||||
- name: "Setup"
|
||||
nxos_aaa_server: &remove
|
||||
|
@ -85,11 +87,11 @@
|
|||
|
||||
rescue:
|
||||
|
||||
- debug: msg="TRANSPORT:{{ connection.transport }} nxos_aaa_server failure detected"
|
||||
- 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 TRANSPORT:{{ connection.transport }} nxos_aaa_server radius.yaml sanity test"
|
||||
- debug: msg="END connection={{ ansible_connection }} nxos_aaa_server radius.yaml sanity test"
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
- debug: msg="START TRANSPORT:{{ connection.transport }} nxos_aaa_server tacacs.yaml sanity test"
|
||||
- debug: msg="START connection={{ ansible_connection }} nxos_aaa_server tacacs.yaml sanity test"
|
||||
- debug: msg="Using provider={{ connection.transport }}"
|
||||
when: ansible_connection == "local"
|
||||
|
||||
- name: "Enable feature tacacs+"
|
||||
nxos_feature:
|
||||
|
@ -84,7 +86,7 @@
|
|||
|
||||
rescue:
|
||||
|
||||
- debug: msg="TRANSPORT:{{ connection.transport }} nxos_aaa_server failure detected"
|
||||
- debug: msg="connection={{ ansible_connection }} nxos_aaa_server failure detected"
|
||||
|
||||
always:
|
||||
|
||||
|
@ -98,4 +100,4 @@
|
|||
state: disabled
|
||||
provider: "{{ connection }}"
|
||||
|
||||
- debug: msg="END TRANSPORT:{{ connection.transport }} nxos_aaa_server tacacs.yaml sanity test"
|
||||
- debug: msg="END connection={{ ansible_connection }} nxos_aaa_server tacacs.yaml sanity test"
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect cli test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/cli"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: cli_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,14 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ cli }}"
|
||||
- name: run test cases (connection=network_cli)
|
||||
include: "{{ test_case_to_run }} ansible_connection=network_cli connection={}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
||||
- name: run test case (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ cli }}"
|
||||
with_first_found: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect nxapi test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/nxapi"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: nxapi_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,21 +20,8 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: enable nxapi
|
||||
nxos_config:
|
||||
lines:
|
||||
- feature nxapi
|
||||
- nxapi http port 80
|
||||
provider: "{{ cli }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ nxapi }}"
|
||||
- name: run test cases (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
||||
- name: disable nxapi
|
||||
nxos_config:
|
||||
lines:
|
||||
- no feature nxapi
|
||||
provider: "{{ cli }}"
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
- debug: msg="START TRANSPORT:{{ connection.transport }} nxos_aaa_server_host radius.yaml sanity test"
|
||||
- debug: msg="START connection={{ ansible_connection }} nxos_aaa_server_host radius.yaml sanity test"
|
||||
- debug: msg="Using provider={{ connection.transport }}"
|
||||
when: ansible_connection == "local"
|
||||
|
||||
- name: "Setup"
|
||||
nxos_aaa_server_host: &remove
|
||||
|
@ -117,7 +119,7 @@
|
|||
|
||||
rescue:
|
||||
|
||||
- debug: msg="TRANSPORT:{{ connection.transport }} nxos_aaa_server_host failure detected"
|
||||
- debug: msg="connection={{ ansible_connection }} nxos_aaa_server_host failure detected"
|
||||
|
||||
always:
|
||||
|
||||
|
@ -125,4 +127,4 @@
|
|||
nxos_aaa_server_host: *remove
|
||||
register: result
|
||||
|
||||
- debug: msg="END TRANSPORT:{{ connection.transport }} nxos_aaa_server_host radius.yaml sanity test"
|
||||
- debug: msg="END connection={{ ansible_connection }} nxos_aaa_server_host radius.yaml sanity test"
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
- debug: msg="START TRANSPORT:{{ connection.transport }} nxos_aaa_server_host tacacs.yaml sanity test"
|
||||
- debug: msg="START connection={{ ansible_connection }} nxos_aaa_server_host tacacs.yaml sanity test"
|
||||
- debug: msg="Using provider={{ connection.transport }}"
|
||||
when: ansible_connection == "local"
|
||||
|
||||
- name: "Enable feature tacacs+"
|
||||
nxos_feature:
|
||||
|
@ -121,7 +123,7 @@
|
|||
|
||||
rescue:
|
||||
|
||||
- debug: msg="TRANSPORT:{{ connection.transport }} nxos_aaa_server_host failure detected"
|
||||
- debug: msg="connection={{ ansible_connection }} nxos_aaa_server_host failure detected"
|
||||
|
||||
always:
|
||||
|
||||
|
@ -135,4 +137,4 @@
|
|||
state: disabled
|
||||
provider: "{{ connection }}"
|
||||
|
||||
- debug: msg="END TRANSPORT:{{ connection.transport }} nxos_aaa_server_host tacacs.yaml sanity test"
|
||||
- debug: msg="END connection={{ ansible_connection }} nxos_aaa_server_host tacacs.yaml sanity test"
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect cli test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/cli"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: cli_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,14 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ cli }}"
|
||||
- name: run test cases (connection=network_cli)
|
||||
include: "{{ test_case_to_run }} ansible_connection=network_cli connection={}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
||||
- name: run test case (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ cli }}"
|
||||
with_first_found: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect nxapi test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/nxapi"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: nxapi_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,8 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ nxapi }}"
|
||||
- name: run test cases (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
- debug: msg="START TRANSPORT:{{ connection.transport }} nxos_acl sanity test"
|
||||
- debug: msg="START connection={{ ansible_connection }} nxos_acl sanity test"
|
||||
- debug: msg="Using provider={{ connection.transport }}"
|
||||
when: ansible_connection == "local"
|
||||
|
||||
- set_fact: time_range="ans-range"
|
||||
when: not ( platform is match("N5K"))
|
||||
|
@ -61,4 +63,4 @@
|
|||
|
||||
- assert: *false
|
||||
|
||||
- debug: msg="END TRANSPORT:{{ connection.transport }} nxos_acl sanity test"
|
||||
- debug: msg="END connection={{ ansible_connection }} nxos_acl sanity test"
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect cli test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/cli"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: cli_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,14 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ cli }}"
|
||||
- name: run test cases (connection=network_cli)
|
||||
include: "{{ test_case_to_run }} ansible_connection=network_cli connection={}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
||||
- name: run test case (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ cli }}"
|
||||
with_first_found: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect nxapi test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/nxapi"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: nxapi_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,8 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ nxapi }}"
|
||||
- name: run test cases (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
- debug: msg="START TRANSPORT:{{ connection.transport}} nxos_acl_interface sanity test"
|
||||
- debug: msg="START connection={{ ansible_connection }} nxos_acl_interface sanity test"
|
||||
- debug: msg="Using provider={{ connection.transport }}"
|
||||
when: ansible_connection == "local"
|
||||
|
||||
# Select interface for test
|
||||
- set_fact: intname="{{ nxos_int1 }}"
|
||||
|
@ -115,4 +117,4 @@
|
|||
ignore_errors: yes
|
||||
|
||||
always:
|
||||
- debug: msg="END TRANSPORT:{{ connection.transport}} nxos_acl_interface sanity test"
|
||||
- debug: msg="END connection={{ ansible_connection }} nxos_acl_interface sanity test"
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect cli test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/cli"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: cli_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,14 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ cli }}"
|
||||
- name: run test cases (connection=network_cli)
|
||||
include: "{{ test_case_to_run }} ansible_connection=network_cli connection={}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
||||
- name: run test case (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ cli }}"
|
||||
with_first_found: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect nxapi test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/nxapi"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: nxapi_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,8 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ nxapi }}"
|
||||
- name: run test cases (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect cli test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/cli"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: cli_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,14 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ cli }}"
|
||||
- name: run test cases (connection=network_cli)
|
||||
include: "{{ test_case_to_run }} ansible_connection=network_cli connection={}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
||||
- name: run test case (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ cli }}"
|
||||
with_first_found: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect nxapi test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/nxapi"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: nxapi_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,8 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ nxapi }}"
|
||||
- name: run test cases (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
- debug: msg="START TRANSPORT:{{ connection.transport }} nxos_bgp sanity test"
|
||||
- debug: msg="START connection={{ ansible_connection }} nxos_bgp sanity test"
|
||||
- debug: msg="Using provider={{ connection.transport }}"
|
||||
when: ansible_connection == "local"
|
||||
|
||||
- set_fact: neighbor_down_fib_accelerate="true"
|
||||
when: not titanium
|
||||
|
@ -132,4 +134,4 @@
|
|||
ignore_errors: yes
|
||||
|
||||
always:
|
||||
- debug: msg="END TRANSPORT:{{ connection.transport }} nxos_bgp sanity test"
|
||||
- debug: msg="END connection={{ ansible_connection }} nxos_bgp sanity test"
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect cli test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/cli"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: cli_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,14 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ cli }}"
|
||||
- name: run test cases (connection=network_cli)
|
||||
include: "{{ test_case_to_run }} ansible_connection=network_cli connection={}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
||||
- name: run test case (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ cli }}"
|
||||
with_first_found: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect nxapi test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/nxapi"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: nxapi_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,8 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ nxapi }}"
|
||||
- name: run test cases (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
- debug: msg="START TRANSPORT:{{ connection.transport }} nxos_bgp_af sanity test"
|
||||
- debug: msg="START connection={{ ansible_connection }} nxos_bgp_af sanity test"
|
||||
- debug: msg="Using provider={{ connection.transport }}"
|
||||
when: ansible_connection == "local"
|
||||
|
||||
- set_fact: advertise_l2vpn_evpn="true"
|
||||
when: platform is search('N9K')
|
||||
|
@ -146,4 +148,4 @@
|
|||
provider: "{{ connection }}"
|
||||
when: platform is search('N9K')
|
||||
|
||||
- debug: msg="END TRANSPORT:{{ connection.transport }} nxos_bgp_af sanity test"
|
||||
- debug: msg="END connection={{ ansible_connection }} nxos_bgp_af sanity test"
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect cli test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/cli"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: cli_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,14 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ cli }}"
|
||||
- name: run test cases (connection=network_cli)
|
||||
include: "{{ test_case_to_run }} ansible_connection=network_cli connection={}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
||||
- name: run test case (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ cli }}"
|
||||
with_first_found: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect nxapi test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/nxapi"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: nxapi_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,8 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ nxapi }}"
|
||||
- name: run test cases (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
- debug: msg="START TRANSPORT:{{ connection.transport}} nxos_bgp_neighbor sanity test"
|
||||
- debug: msg="START connection={{ ansible_connection }} nxos_bgp_neighbor sanity test"
|
||||
- debug: msg="Using provider={{ connection.transport }}"
|
||||
when: ansible_connection == "local"
|
||||
|
||||
- set_fact: intname="{{ nxos_int1 }}"
|
||||
|
||||
|
@ -200,4 +202,4 @@
|
|||
state: disabled
|
||||
provider: "{{ connection }}"
|
||||
|
||||
- debug: msg="END TRANSPORT:{{ connection.transport}} nxos_bgp_neighbor sanity test"
|
||||
- debug: msg="END connection={{ ansible_connection }} nxos_bgp_neighbor sanity test"
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect cli test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/cli"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: cli_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,14 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ cli }}"
|
||||
- name: run test cases (connection=network_cli)
|
||||
include: "{{ test_case_to_run }} ansible_connection=network_cli connection={}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
||||
- name: run test case (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ cli }}"
|
||||
with_first_found: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect nxapi test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/nxapi"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: nxapi_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,8 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ nxapi }}"
|
||||
- name: run test cases (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
- debug: msg="START TRANSPORT:{{ connection.transport }} nxos_bgp_neighbor_af sanity test"
|
||||
- debug: msg="START connection={{ ansible_connection }} nxos_bgp_neighbor_af sanity test"
|
||||
- debug: msg="Using provider={{ connection.transport }}"
|
||||
when: ansible_connection == "local"
|
||||
|
||||
- name: "Disable feature BGP"
|
||||
nxos_feature: &disable_bgp
|
||||
|
@ -201,4 +203,4 @@
|
|||
- name: "Disable feature bgp"
|
||||
nxos_feature: *disable_bgp
|
||||
|
||||
- debug: msg="END TRANSPORT:{{ connection.transport }} nxos_bgp_neighbor_af sanity test"
|
||||
- debug: msg="END connection={{ ansible_connection }} nxos_bgp_neighbor_af sanity test"
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect cli test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/cli"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: cli_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,14 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ cli }}"
|
||||
- name: run test cases (connection=network_cli)
|
||||
include: "{{ test_case_to_run }} ansible_connection=network_cli connection={}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
||||
- name: run test case (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ cli }}"
|
||||
with_first_found: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect nxapi test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/nxapi"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: nxapi_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,8 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ nxapi }}"
|
||||
- name: run test cases (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
- debug: msg="START TRANSPORT:CLI nxos_command sanity test"
|
||||
- debug: msg="Using provider={{ connection.transport }}"
|
||||
when: ansible_connection == "local"
|
||||
|
||||
- name: "Disable feature BGP"
|
||||
nxos_feature:
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
- debug: msg="START TRANSPORT:NXAPI nxos_command sanity test"
|
||||
- debug: msg="Using provider={{ connection.transport }}"
|
||||
when: ansible_connection == "local"
|
||||
|
||||
- name: "Disable feature BGP"
|
||||
nxos_feature:
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect cli test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/cli"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: cli_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,14 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ cli }}"
|
||||
- name: run test cases (connection=network_cli)
|
||||
include: "{{ test_case_to_run }} ansible_connection=network_cli connection={}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
||||
- name: run test case (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ cli }}"
|
||||
with_first_found: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect nxapi test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/nxapi"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: nxapi_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,8 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ nxapi }}"
|
||||
- name: run test cases (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
- debug: msg="START TRANSPORT:{{ connection.transport }} nxos_config sanity test"
|
||||
- debug: msg="START connection={{ ansible_connection }} nxos_config sanity test"
|
||||
- debug: msg="Using provider={{ connection.transport }}"
|
||||
when: ansible_connection == "local"
|
||||
|
||||
- name: setup
|
||||
nxos_config:
|
||||
|
@ -38,4 +40,4 @@
|
|||
provider: "{{ connection }}"
|
||||
match: none
|
||||
|
||||
- debug: msg="END TRANSPORT:{{ connection.transport }} nxos_config sanity test"
|
||||
- debug: msg="END connection={{ ansible_connection }} nxos_config sanity test"
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect cli test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/cli"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: cli_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,14 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ cli }}"
|
||||
- name: run test cases (connection=network_cli)
|
||||
include: "{{ test_case_to_run }} ansible_connection=network_cli connection={}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
||||
- name: run test case (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ cli }}"
|
||||
with_first_found: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect nxapi test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/nxapi"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: nxapi_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,8 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ nxapi }}"
|
||||
- name: run test cases (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
- debug: msg="START TRANSPORT:{{ connection.transport }} nxos_evpn_global sanity test"
|
||||
- debug: msg="START connection={{ ansible_connection }} nxos_evpn_global sanity test"
|
||||
- debug: msg="Using provider={{ connection.transport }}"
|
||||
when: ansible_connection == "local"
|
||||
|
||||
- name: "Setup"
|
||||
nxos_config: &remove_evpn_config
|
||||
|
@ -58,7 +60,7 @@
|
|||
when: not ( platform is search('N3K'))
|
||||
|
||||
rescue:
|
||||
- debug: msg="TRANSPORT:{{ connection.transport }} nxos_evpn_global sanity test - FALURE ENCOUNTERED"
|
||||
- debug: msg="connection={{ ansible_connection }} nxos_evpn_global sanity test - FALURE ENCOUNTERED"
|
||||
|
||||
always:
|
||||
|
||||
|
@ -70,4 +72,4 @@
|
|||
nxos_feature: *disable_feature_nv_overlay
|
||||
ignore_errors: yes
|
||||
|
||||
- debug: msg="END TRANSPORT:{{ connection.transport }} nxos_evpn_global sanity test"
|
||||
- debug: msg="END connection={{ ansible_connection }} nxos_evpn_global sanity test"
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect cli test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/cli"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: cli_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,14 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ cli }}"
|
||||
- name: run test cases (connection=network_cli)
|
||||
include: "{{ test_case_to_run }} ansible_connection=network_cli connection={}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
||||
- name: run test case (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ cli }}"
|
||||
with_first_found: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect nxapi test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/nxapi"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: nxapi_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,8 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ nxapi }}"
|
||||
- name: run test cases (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
- debug: msg="START TRANSPORT:{{ connection.transport }} nxos_evpn_vni sanity test"
|
||||
- debug: msg="START connection={{ ansible_connection }} nxos_evpn_vni sanity test"
|
||||
- debug: msg="Using provider={{ connection.transport }}"
|
||||
when: ansible_connection == "local"
|
||||
|
||||
- name: "Setup"
|
||||
nxos_config: &remove_evpn
|
||||
|
@ -71,4 +73,4 @@
|
|||
provider: "{{ connection }}"
|
||||
ignore_errors: yes
|
||||
|
||||
- debug: msg="END TRANSPORT:{{ connection.transport }} nxos_evpn_vni sanity test"
|
||||
- debug: msg="END connection={{ ansible_connection }} nxos_evpn_vni sanity test"
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect cli test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/cli"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: cli_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,14 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ cli }}"
|
||||
- name: run test cases (connection=network_cli)
|
||||
include: "{{ test_case_to_run }} ansible_connection=network_cli connection={}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
||||
- name: run test case (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ cli }}"
|
||||
with_first_found: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect nxapi test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/nxapi"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: nxapi_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,8 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ nxapi }}"
|
||||
- name: run test cases (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
- debug: msg="START TRANSPORT:{{ connection.transport }} nxos_facts sanity test"
|
||||
- debug: msg="START connection={{ ansible_connection }} nxos_facts sanity test"
|
||||
- debug: msg="Using provider={{ connection.transport }}"
|
||||
when: ansible_connection == "local"
|
||||
|
||||
- name: "nxos_facts gather hardware facts"
|
||||
nxos_facts:
|
||||
|
@ -75,4 +77,4 @@
|
|||
- "result.ansible_facts.ansible_net_memfree_mb > 1"
|
||||
- "result.ansible_facts.ansible_net_memtotal_mb > 1"
|
||||
|
||||
- debug: msg="END TRANSPORT:{{ connection.transport }} nxos_facts sanity test"
|
||||
- debug: msg="END connection={{ ansible_connection }} nxos_facts sanity test"
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect cli test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/cli"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: cli_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,14 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ cli }}"
|
||||
- name: run test cases (connection=network_cli)
|
||||
include: "{{ test_case_to_run }} ansible_connection=network_cli connection={}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
||||
- name: run test case (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ cli }}"
|
||||
with_first_found: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect nxapi test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/nxapi"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: nxapi_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,8 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ nxapi }}"
|
||||
- name: run test cases (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect cli test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/cli"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: cli_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,14 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ cli }}"
|
||||
- name: run test cases (connection=network_cli)
|
||||
include: "{{ test_case_to_run }} ansible_connection=network_cli connection={}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
||||
- name: run test case (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ cli }}"
|
||||
with_first_found: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect nxapi test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/nxapi"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: nxapi_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,21 +20,8 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: enable nxapi
|
||||
nxos_config:
|
||||
lines:
|
||||
- feature nxapi
|
||||
- nxapi http port 80
|
||||
provider: "{{ cli }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ nxapi }}"
|
||||
- name: run test cases (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
||||
- name: disable nxapi
|
||||
nxos_config:
|
||||
lines:
|
||||
- no feature nxapi
|
||||
provider: "{{ cli }}"
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
- debug: msg="START TRANSPORT:CLI nxos_file_copy sanity test"
|
||||
- debug: msg="Using provider={{ connection.transport }}"
|
||||
when: ansible_connection == "local"
|
||||
|
||||
- name: "Setup - Remove existing file"
|
||||
nxos_command: &remove_file
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
- debug: msg="START TRANSPORT:NXAPI nxos_file_copy sanity test"
|
||||
- debug: msg="Using provider={{ connection.transport }}"
|
||||
when: ansible_connection == "local"
|
||||
|
||||
- name: "Setup - Remove existing file"
|
||||
nxos_command: &remove_file
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect cli test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/cli"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: cli_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,14 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ cli }}"
|
||||
- name: run test cases (connection=network_cli)
|
||||
include: "{{ test_case_to_run }} ansible_connection=network_cli connection={}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
||||
- name: run test case (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ cli }}"
|
||||
with_first_found: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect nxapi test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/nxapi"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: nxapi_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,21 +20,8 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: enable nxapi
|
||||
nxos_config:
|
||||
lines:
|
||||
- feature nxapi
|
||||
- nxapi http port 80
|
||||
provider: "{{ cli }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ nxapi }}"
|
||||
- name: run test cases (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
||||
- name: disable nxapi
|
||||
nxos_config:
|
||||
lines:
|
||||
- no feature nxapi
|
||||
provider: "{{ cli }}"
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#---
|
||||
#- debug: msg="START TRANSPORT:{{ connection.transport }} nxos_gir sanity test"
|
||||
#- debug: msg="START connection={{ ansible_connection }} nxos_gir sanity test"
|
||||
- debug: msg="Using provider={{ connection.transport }}"
|
||||
when: ansible_connection == "local"
|
||||
#
|
||||
#- name: "Setup"
|
||||
# nxos_gir: &setup
|
||||
|
@ -92,7 +94,7 @@
|
|||
#
|
||||
# rescue:
|
||||
#
|
||||
# - debug: msg="TRANSPORT:{{ connection.transport }} nxos_gir failure detected"
|
||||
# - debug: msg="connection={{ ansible_connection }} nxos_gir failure detected"
|
||||
#
|
||||
# always:
|
||||
#
|
||||
|
@ -100,4 +102,4 @@
|
|||
# nxos_gir: *setup
|
||||
# register: result
|
||||
#
|
||||
# - debug: msg="END TRANSPORT:{{ connection.transport }} nxos_gir sanity test"
|
||||
# - debug: msg="END connection={{ ansible_connection }} nxos_gir sanity test"
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect cli test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/cli"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: cli_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,14 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ cli }}"
|
||||
- name: run test cases (connection=network_cli)
|
||||
include: "{{ test_case_to_run }} ansible_connection=network_cli connection={}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
||||
- name: run test case (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ cli }}"
|
||||
with_first_found: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect nxapi test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/nxapi"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: nxapi_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,21 +20,8 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: enable nxapi
|
||||
nxos_config:
|
||||
lines:
|
||||
- feature nxapi
|
||||
- nxapi http port 80
|
||||
provider: "{{ cli }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ nxapi }}"
|
||||
- name: run test cases (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
||||
- name: disable nxapi
|
||||
nxos_config:
|
||||
lines:
|
||||
- no feature nxapi
|
||||
provider: "{{ cli }}"
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
- debug: msg="START TRANSPORT:{{ connection.transport }} nxos_gir_profile_management sanity test"
|
||||
- debug: msg="START connection={{ ansible_connection }} nxos_gir_profile_management sanity test"
|
||||
- debug: msg="Using provider={{ connection.transport }}"
|
||||
when: ansible_connection == "local"
|
||||
|
||||
- name: "Setup - Remove maintenace mode profiles"
|
||||
nxos_gir_profile_management: &remove_maintenance
|
||||
|
@ -91,7 +93,7 @@
|
|||
|
||||
rescue:
|
||||
|
||||
- debug: msg="TRANSPORT:{{ connection.transport }} nxos_gir_profile_management failure detected"
|
||||
- debug: msg="connection={{ ansible_connection }} nxos_gir_profile_management failure detected"
|
||||
|
||||
always:
|
||||
|
||||
|
@ -107,4 +109,4 @@
|
|||
state: disabled
|
||||
provider: "{{ connection }}"
|
||||
|
||||
- debug: msg="END TRANSPORT:{{ connection.transport }} nxos_gir_profile_management sanity test"
|
||||
- debug: msg="END connection={{ ansible_connection }} nxos_gir_profile_management sanity test"
|
||||
|
|
|
@ -1,15 +1,33 @@
|
|||
---
|
||||
- name: collect all cli test cases
|
||||
- name: collect common cli test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect cli test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/cli"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
register: test_cases
|
||||
connection: local
|
||||
register: cli_cases
|
||||
|
||||
- set_fact:
|
||||
test_cases:
|
||||
files: "{{ test_cases.files }} + {{ cli_cases.files }}"
|
||||
|
||||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }}"
|
||||
- name: run test cases (connection=network_cli)
|
||||
include: "{{ test_case_to_run }} ansible_connection=network_cli connection={}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
||||
- name: run test case (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ cli }}"
|
||||
with_first_found: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -1,28 +1,27 @@
|
|||
---
|
||||
- name: collect all nxapi test cases
|
||||
- name: collect common nxapi test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect nxapi test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/nxapi"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
register: test_cases
|
||||
connection: local
|
||||
register: nxapi_cases
|
||||
|
||||
- set_fact:
|
||||
test_cases:
|
||||
files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
|
||||
|
||||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: enable nxapi
|
||||
nxos_config:
|
||||
lines:
|
||||
- feature nxapi
|
||||
- nxapi http port 80
|
||||
provider: "{{ cli }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }}"
|
||||
- name: run test cases (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
||||
- name: disable nxapi
|
||||
nxos_config:
|
||||
lines:
|
||||
- no feature nxapi
|
||||
provider: "{{ cli }}"
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
- debug: msg="START TRANSPORT:{{ connection.transport }} nxos_hsrp sanity test"
|
||||
- debug: msg="START connection={{ ansible_connection }} nxos_hsrp sanity test"
|
||||
- debug: msg="Using provider={{ connection.transport }}"
|
||||
when: ansible_connection == "local"
|
||||
|
||||
# Select interface for test
|
||||
- set_fact: intname="{{ nxos_int1 }}"
|
||||
|
@ -89,4 +91,4 @@
|
|||
provider: "{{ connection }}"
|
||||
ignore_errors: yes
|
||||
|
||||
- debug: msg="END TRANSPORT:{{ connection.transport }} nxos_hsrp sanity test"
|
||||
- debug: msg="END connection={{ ansible_connection }} nxos_hsrp sanity test"
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect cli test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/cli"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: cli_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,14 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ cli }}"
|
||||
- name: run test cases (connection=network_cli)
|
||||
include: "{{ test_case_to_run }} ansible_connection=network_cli connection={}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
||||
- name: run test case (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ cli }}"
|
||||
with_first_found: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect nxapi test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/nxapi"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: nxapi_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,8 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ nxapi }}"
|
||||
- name: run test cases (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
- debug: msg="START TRANSPORT:{{ connection.transport }} nxos_igmp sanity test"
|
||||
- debug: msg="START connection={{ ansible_connection }} nxos_igmp sanity test"
|
||||
- debug: msg="Using provider={{ connection.transport }}"
|
||||
when: ansible_connection == "local"
|
||||
|
||||
- block:
|
||||
|
||||
|
@ -43,4 +45,4 @@
|
|||
nxos_igmp: *default
|
||||
register: result
|
||||
|
||||
- debug: msg="END TRANSPORT:{{ connection.transport }} nxos_igmp sanity test"
|
||||
- debug: msg="END connection={{ ansible_connection }} nxos_igmp sanity test"
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect cli test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/cli"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: cli_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,14 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ cli }}"
|
||||
- name: run test cases (connection=network_cli)
|
||||
include: "{{ test_case_to_run }} ansible_connection=network_cli connection={}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
||||
- name: run test case (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ cli }}"
|
||||
with_first_found: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect nxapi test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/nxapi"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: nxapi_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,21 +20,8 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: enable nxapi
|
||||
nxos_config:
|
||||
lines:
|
||||
- feature nxapi
|
||||
- nxapi http port 80
|
||||
provider: "{{ cli }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ nxapi }}"
|
||||
- name: run test cases (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
||||
- name: disable nxapi
|
||||
nxos_config:
|
||||
lines:
|
||||
- no feature nxapi
|
||||
provider: "{{ cli }}"
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
- debug: msg="START TRANSPORT:{{ connection.transport }} nxos_igmp_interface sanity test"
|
||||
- debug: msg="START connection={{ ansible_connection }} nxos_igmp_interface sanity test"
|
||||
- debug: msg="Using provider={{ connection.transport }}"
|
||||
when: ansible_connection == "local"
|
||||
|
||||
# Select interface for test
|
||||
- set_fact: intname="{{ nxos_int1 }}"
|
||||
|
@ -87,4 +89,4 @@
|
|||
state: disabled
|
||||
provider: "{{ connection }}"
|
||||
|
||||
- debug: msg="END TRANSPORT:{{ connection.transport }} nxos_igmp_interface sanity test"
|
||||
- debug: msg="END connection={{ ansible_connection }} nxos_igmp_interface sanity test"
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect cli test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/cli"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: cli_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,14 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ cli }}"
|
||||
- name: run test cases (connection=network_cli)
|
||||
include: "{{ test_case_to_run }} ansible_connection=network_cli connection={}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
||||
- name: run test case (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ cli }}"
|
||||
with_first_found: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect nxapi test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/nxapi"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: nxapi_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,21 +20,8 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: enable nxapi
|
||||
nxos_config:
|
||||
lines:
|
||||
- feature nxapi
|
||||
- nxapi http port 80
|
||||
provider: "{{ cli }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ nxapi }}"
|
||||
- name: run test cases (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
||||
- name: disable nxapi
|
||||
nxos_config:
|
||||
lines:
|
||||
- no feature nxapi
|
||||
provider: "{{ cli }}"
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
- debug: msg="START TRANSPORT:{{ connection.transport }} nxos_igmp_snooping sanity test"
|
||||
- debug: msg="START connection={{ ansible_connection }} nxos_igmp_snooping sanity test"
|
||||
- debug: msg="Using provider={{ connection.transport }}"
|
||||
when: ansible_connection == "local"
|
||||
|
||||
- block:
|
||||
|
||||
|
@ -45,4 +47,4 @@
|
|||
nxos_igmp_snooping: *default
|
||||
register: result
|
||||
|
||||
- debug: msg="END TRANSPORT:{{ connection.transport }} nxos_igmp_snooping sanity test"
|
||||
- debug: msg="END connection={{ ansible_connection }} nxos_igmp_snooping sanity test"
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect cli test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/cli"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: cli_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,14 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ cli }}"
|
||||
- name: run test cases (connection=network_cli)
|
||||
include: "{{ test_case_to_run }} ansible_connection=network_cli connection={}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
||||
- name: run test case (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ cli }}"
|
||||
with_first_found: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect nxapi test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/nxapi"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: nxapi_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,8 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ nxapi }}"
|
||||
- name: run test cases (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
- debug: msg="START TRANSPORT:{{ connection.transport }} nxos_interface intent test"
|
||||
- debug: msg="START connection={{ ansible_connection }} nxos_interface intent test"
|
||||
- debug: msg="Using provider={{ connection.transport }}"
|
||||
when: ansible_connection == "local"
|
||||
|
||||
- set_fact: testint1="{{ nxos_int1 }}"
|
||||
- set_fact: testint2="{{ nxos_int2 }}"
|
||||
|
@ -60,4 +62,4 @@
|
|||
provider: "{{ connection }}"
|
||||
ignore_errors: yes
|
||||
|
||||
- debug: msg="END TRANSPORT:{{ connection.transport }} nxos_interface intent test"
|
||||
- debug: msg="END connection={{ ansible_connection }} nxos_interface intent test"
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
- debug: msg="START TRANSPORT:{{ connection.transport }} nxos_interface sanity test"
|
||||
- debug: msg="START connection={{ ansible_connection }} nxos_interface sanity test"
|
||||
- debug: msg="Using provider={{ connection.transport }}"
|
||||
when: ansible_connection == "local"
|
||||
|
||||
- set_fact: testint="{{ nxos_int1 }}"
|
||||
|
||||
|
@ -128,4 +130,4 @@
|
|||
ignore_errors: yes
|
||||
|
||||
always:
|
||||
- debug: msg="END TRANSPORT:{{ connection.transport }} nxos_interface sanity test"
|
||||
- debug: msg="END connection={{ ansible_connection }} nxos_interface sanity test"
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect cli test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/cli"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: cli_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,14 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ cli }}"
|
||||
- name: run test cases (connection=network_cli)
|
||||
include: "{{ test_case_to_run }} ansible_connection=network_cli connection={}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
||||
- name: run test case (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ cli }}"
|
||||
with_first_found: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect nxapi test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/nxapi"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: nxapi_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,8 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ nxapi }}"
|
||||
- name: run test cases (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
- debug: msg="START TRANSPORT:{{ connection.transport }} nxos_interface_ospf sanity test"
|
||||
- debug: msg="START connection={{ ansible_connection }} nxos_interface_ospf sanity test"
|
||||
- debug: msg="Using provider={{ connection.transport }}"
|
||||
when: ansible_connection == "local"
|
||||
|
||||
- set_fact: testint="{{ nxos_int1 }}"
|
||||
|
||||
|
@ -232,4 +234,4 @@
|
|||
nxos_config: *removepcandlb
|
||||
|
||||
always:
|
||||
- debug: msg="END TRANSPORT:{{ connection.transport }} nxos_interface_ospf sanity test"
|
||||
- debug: msg="END connection={{ ansible_connection }} nxos_interface_ospf sanity test"
|
||||
|
|
|
@ -1,15 +1,33 @@
|
|||
---
|
||||
- name: collect all cli test cases
|
||||
- name: collect common cli test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect cli test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/cli"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
register: test_cases
|
||||
connection: local
|
||||
register: cli_cases
|
||||
|
||||
- set_fact:
|
||||
test_cases:
|
||||
files: "{{ test_cases.files }} + {{ cli_cases.files }}"
|
||||
|
||||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }}"
|
||||
- name: run test cases (connection=network_cli)
|
||||
include: "{{ test_case_to_run }} ansible_connection=network_cli connection={}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
||||
- name: run test case (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ cli }}"
|
||||
with_first_found: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -1,15 +1,27 @@
|
|||
---
|
||||
- name: collect all nxapi test cases
|
||||
- name: collect common nxapi test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect nxapi test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/nxapi"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
register: test_cases
|
||||
connection: local
|
||||
register: nxapi_cases
|
||||
|
||||
- set_fact:
|
||||
test_cases:
|
||||
files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
|
||||
|
||||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }}"
|
||||
- name: run test cases (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
- debug: msg="START TRANSPORT:CLI nxos_ip_interface sanity test"
|
||||
- debug: msg="Using provider={{ connection.transport }}"
|
||||
when: ansible_connection == "local"
|
||||
|
||||
- set_fact: testint1="{{ nxos_int1 }}"
|
||||
- set_fact: testint2="{{ nxos_int2 }}"
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
- debug: msg="START TRANSPORT:NXAPI nxos_ip_interface sanity test"
|
||||
- debug: msg="Using provider={{ connection.transport }}"
|
||||
when: ansible_connection == "local"
|
||||
|
||||
- set_fact: testint1="{{ nxos_int1 }}"
|
||||
- set_fact: testint2="{{ nxos_int2 }}"
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect cli test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/cli"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: cli_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,14 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ cli }}"
|
||||
- name: run test cases (connection=network_cli)
|
||||
include: "{{ test_case_to_run }} ansible_connection=network_cli connection={}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
||||
- name: run test case (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ cli }}"
|
||||
with_first_found: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
- debug: msg="START TRANSPORT:{{ connection.transport }} nxos_l2_interface aggregate test"
|
||||
- debug: msg="START connection={{ ansible_connection }} nxos_l2_interface aggregate test"
|
||||
- debug: msg="Using provider={{ connection.transport }}"
|
||||
when: ansible_connection == "local"
|
||||
|
||||
# Select interface for test
|
||||
- set_fact: intname1="{{ nxos_int1 }}"
|
||||
|
@ -68,4 +70,4 @@
|
|||
provider: "{{ connection }}"
|
||||
ignore_errors: yes
|
||||
|
||||
- debug: msg="END TRANSPORT:{{ connection.transport }} nxos_l2_interface aggregate test"
|
||||
- debug: msg="END connection={{ ansible_connection }} nxos_l2_interface aggregate test"
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
- debug: msg="START TRANSPORT:{{ connection.transport }} nxos_l2_interface sanity test"
|
||||
- debug: msg="START connection={{ ansible_connection }} nxos_l2_interface sanity test"
|
||||
- debug: msg="Using provider={{ connection.transport }}"
|
||||
when: ansible_connection == "local"
|
||||
|
||||
# Select interface for test
|
||||
- set_fact: intname="{{ nxos_int1 }}"
|
||||
|
@ -121,4 +123,4 @@
|
|||
nxos_config: *default
|
||||
ignore_errors: yes
|
||||
|
||||
- debug: msg="END TRANSPORT:{{ connection.transport }} nxos_l2_interface sanity test"
|
||||
- debug: msg="END connection={{ ansible_connection }} nxos_l2_interface sanity test"
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect cli test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/cli"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: cli_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,14 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ cli }}"
|
||||
- name: run test cases (connection=network_cli)
|
||||
include: "{{ test_case_to_run }} ansible_connection=network_cli connection={}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
||||
- name: run test case (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ cli }}"
|
||||
with_first_found: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect nxapi test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/nxapi"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: nxapi_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,8 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ nxapi }}"
|
||||
- name: run test cases (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
- debug: msg="START TRANSPORT:CLI nxos_l3_interface sanity test"
|
||||
- debug: msg="Using provider={{ connection.transport }}"
|
||||
when: ansible_connection == "local"
|
||||
|
||||
# Select interface for test
|
||||
- set_fact: testint2="{{ nxos_int2 }}"
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
- debug: msg="START TRANSPORT:NXAPI nxos_l3_interface sanity test"
|
||||
- debug: msg="Using provider={{ connection.transport }}"
|
||||
when: ansible_connection == "local"
|
||||
|
||||
# Select interface for test
|
||||
- set_fact: testint2="{{ nxos_int2 }}"
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect cli test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/cli"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: cli_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,14 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ cli }}"
|
||||
- name: run test cases (connection=network_cli)
|
||||
include: "{{ test_case_to_run }} ansible_connection=network_cli connection={}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
||||
- name: run test case (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ cli }}"
|
||||
with_first_found: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect nxapi test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/nxapi"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: nxapi_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,8 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ nxapi }}"
|
||||
- name: run test cases (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
- debug: msg="START TRANSPORT:{{ connection.transport }} nxos_linkagg sanity test"
|
||||
- debug: msg="START connection={{ ansible_connection }} nxos_linkagg sanity test"
|
||||
- debug: msg="Using provider={{ connection.transport }}"
|
||||
when: ansible_connection == "local"
|
||||
|
||||
- set_fact: testint1="{{ nxos_int1 }}"
|
||||
- set_fact: testint2="{{ nxos_int2 }}"
|
||||
|
@ -190,4 +192,4 @@
|
|||
timeout: 60
|
||||
provider: "{{ connection }}"
|
||||
|
||||
- debug: msg="END TRANSPORT:{{ connection.transport }} nxos_linkagg sanity test"
|
||||
- debug: msg="END connection={{ ansible_connection }} nxos_linkagg sanity test"
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect cli test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/cli"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: cli_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,14 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ cli }}"
|
||||
- name: run test cases (connection=network_cli)
|
||||
include: "{{ test_case_to_run }} ansible_connection=network_cli connection={}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
||||
- name: run test case (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ cli }}"
|
||||
with_first_found: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
- debug: msg="START TRANSPORT:CLI nxos_lldp sanity test"
|
||||
- debug: msg="Using provider={{ connection.transport }}"
|
||||
when: ansible_connection == "local"
|
||||
|
||||
- name: Make sure LLDP is not running before tests
|
||||
nxos_config:
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
- debug: msg="START TRANSPORT:NXAPI nxos_lldp sanity test"
|
||||
- debug: msg="Using provider={{ connection.transport }}"
|
||||
when: ansible_connection == "local"
|
||||
|
||||
- name: Make sure LLDP is not running before tests
|
||||
nxos_config:
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect cli test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/cli"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: cli_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,14 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ cli }}"
|
||||
- name: run test cases (connection=network_cli)
|
||||
include: "{{ test_case_to_run }} ansible_connection=network_cli connection={}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
||||
- name: run test case (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ cli }}"
|
||||
with_first_found: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect nxapi test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/nxapi"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: nxapi_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,8 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ nxapi }}"
|
||||
- name: run test cases (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect cli test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/cli"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: cli_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,14 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ cli }}"
|
||||
- name: run test cases (connection=network_cli)
|
||||
include: "{{ test_case_to_run }} ansible_connection=network_cli connection={}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
||||
- name: run test case (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ cli }}"
|
||||
with_first_found: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect nxapi test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/nxapi"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: nxapi_cases
|
||||
|
||||
- set_fact:
|
||||
|
@ -18,8 +20,8 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }} connection={{ nxapi }}"
|
||||
- name: run test cases (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -1,15 +1,33 @@
|
|||
---
|
||||
- name: collect all cli test cases
|
||||
- name: collect common cli test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect cli test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/cli"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
register: test_cases
|
||||
connection: local
|
||||
register: cli_cases
|
||||
|
||||
- set_fact:
|
||||
test_cases:
|
||||
files: "{{ test_cases.files }} + {{ cli_cases.files }}"
|
||||
|
||||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }}"
|
||||
- name: run test cases (connection=network_cli)
|
||||
include: "{{ test_case_to_run }} ansible_connection=network_cli connection={}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
||||
- name: run test case (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ cli }}"
|
||||
with_first_found: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -1,15 +1,27 @@
|
|||
---
|
||||
- name: collect all nxapi test cases
|
||||
- name: collect common nxapi test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
connection: local
|
||||
register: test_cases
|
||||
|
||||
- name: collect nxapi test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/nxapi"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
register: test_cases
|
||||
connection: local
|
||||
register: nxapi_cases
|
||||
|
||||
- set_fact:
|
||||
test_cases:
|
||||
files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
|
||||
|
||||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }}"
|
||||
- name: run test cases (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue