mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-23 08:40:22 -07:00
Deprecate nxos_switchport and Add nxos_l2_interface DI module (#33813)
* Deprecate nxos_switchport Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> * Add nxos_l2_interface DI module Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> * pep8 fixes * aggregate test for nxos_l2_interface Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> * revert nxos_switchport test change * gundalow's comment Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
This commit is contained in:
parent
e9a5ff912a
commit
9d2182bcf8
16 changed files with 869 additions and 7 deletions
25
test/integration/targets/nxos_l2_interface/tasks/cli.yaml
Normal file
25
test/integration/targets/nxos_l2_interface/tasks/cli.yaml
Normal file
|
@ -0,0 +1,25 @@
|
|||
---
|
||||
- name: collect common cli test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
register: test_cases
|
||||
|
||||
- name: collect cli test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/cli"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
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 }} connection={{ cli }}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
- { include: cli.yaml, tags: ['cli'] }
|
||||
- { include: nxapi.yaml, tags: ['nxapi'] }
|
25
test/integration/targets/nxos_l2_interface/tasks/nxapi.yaml
Normal file
25
test/integration/targets/nxos_l2_interface/tasks/nxapi.yaml
Normal file
|
@ -0,0 +1,25 @@
|
|||
---
|
||||
- name: collect common nxapi test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
register: test_cases
|
||||
|
||||
- name: collect nxapi test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/nxapi"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
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 }} connection={{ nxapi }}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
Loading…
Add table
Add a link
Reference in a new issue