mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-28 11:10:21 -07:00
Remove enable EAPI from prepare_eos_tests (#26910)
Enabling EAPI is not common on CLI *and* EAPI tests, therefore enabling it should be put at the eapi.yaml task level.
This commit is contained in:
parent
290d84f904
commit
258d2058cd
10 changed files with 68 additions and 62 deletions
|
@ -10,12 +10,11 @@
|
||||||
|
|
||||||
- name: enable eapi
|
- name: enable eapi
|
||||||
eos_eapi:
|
eos_eapi:
|
||||||
enable_http: yes
|
http: yes
|
||||||
enable_https: yes
|
https: yes
|
||||||
enable_local_http: yes
|
local_http: no
|
||||||
enable_socket: yes
|
enable_socket: yes
|
||||||
provider: "{{ cli }}"
|
provider: "{{ cli }}"
|
||||||
# authorize: yes
|
|
||||||
|
|
||||||
- name: run test case
|
- name: run test case
|
||||||
include: "{{ test_case_to_run }}"
|
include: "{{ test_case_to_run }}"
|
||||||
|
@ -25,9 +24,4 @@
|
||||||
|
|
||||||
- name: disable eapi
|
- name: disable eapi
|
||||||
eos_eapi:
|
eos_eapi:
|
||||||
enable_http: no
|
state: stopped
|
||||||
enable_https: no
|
|
||||||
enable_local_http: no
|
|
||||||
enable_socket: no
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
# authorize: yes
|
|
||||||
|
|
|
@ -8,8 +8,20 @@
|
||||||
- name: set test_items
|
- name: set test_items
|
||||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||||
|
|
||||||
|
- name: enable eapi
|
||||||
|
eos_eapi:
|
||||||
|
http: yes
|
||||||
|
https: yes
|
||||||
|
local_http: no
|
||||||
|
enable_socket: yes
|
||||||
|
provider: "{{ cli }}"
|
||||||
|
|
||||||
- name: run test case
|
- name: run test case
|
||||||
include: "{{ test_case_to_run }}"
|
include: "{{ test_case_to_run }}"
|
||||||
with_items: "{{ test_items }}"
|
with_items: "{{ test_items }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
loop_var: test_case_to_run
|
loop_var: test_case_to_run
|
||||||
|
|
||||||
|
- name: disable eapi
|
||||||
|
eos_eapi:
|
||||||
|
state: stopped
|
||||||
|
|
|
@ -8,8 +8,20 @@
|
||||||
- name: set test_items
|
- name: set test_items
|
||||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||||
|
|
||||||
|
- name: enable eapi
|
||||||
|
eos_eapi:
|
||||||
|
http: yes
|
||||||
|
https: yes
|
||||||
|
local_http: no
|
||||||
|
socket: yes
|
||||||
|
provider: "{{ cli }}"
|
||||||
|
|
||||||
- name: run test case
|
- name: run test case
|
||||||
include: "{{ test_case_to_run }}"
|
include: "{{ test_case_to_run }}"
|
||||||
with_items: "{{ test_items }}"
|
with_items: "{{ test_items }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
loop_var: test_case_to_run
|
loop_var: test_case_to_run
|
||||||
|
|
||||||
|
- name: disable eapi
|
||||||
|
eos_eapi:
|
||||||
|
state: stopped
|
||||||
|
|
|
@ -8,8 +8,20 @@
|
||||||
- name: set test_items
|
- name: set test_items
|
||||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||||
|
|
||||||
|
- name: enable eapi
|
||||||
|
eos_eapi:
|
||||||
|
http: yes
|
||||||
|
https: yes
|
||||||
|
local_http: no
|
||||||
|
enable_socket: yes
|
||||||
|
provider: "{{ cli }}"
|
||||||
|
|
||||||
- name: run test case
|
- name: run test case
|
||||||
include: "{{ test_case_to_run }}"
|
include: "{{ test_case_to_run }}"
|
||||||
with_items: "{{ test_items }}"
|
with_items: "{{ test_items }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
loop_var: test_case_to_run
|
loop_var: test_case_to_run
|
||||||
|
|
||||||
|
- name: disable eapi
|
||||||
|
eos_eapi:
|
||||||
|
state: stopped
|
||||||
|
|
|
@ -10,9 +10,9 @@
|
||||||
|
|
||||||
- name: enable eapi
|
- name: enable eapi
|
||||||
eos_eapi:
|
eos_eapi:
|
||||||
enable_http: yes
|
http: yes
|
||||||
enable_https: yes
|
https: yes
|
||||||
enable_local_http: yes
|
local_http: no
|
||||||
enable_socket: yes
|
enable_socket: yes
|
||||||
provider: "{{ cli }}"
|
provider: "{{ cli }}"
|
||||||
|
|
||||||
|
@ -24,8 +24,4 @@
|
||||||
|
|
||||||
- name: disable eapi
|
- name: disable eapi
|
||||||
eos_eapi:
|
eos_eapi:
|
||||||
enable_http: no
|
state: stopped
|
||||||
enable_https: no
|
|
||||||
enable_local_http: no
|
|
||||||
enable_socket: no
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
|
|
|
@ -8,8 +8,20 @@
|
||||||
- name: set test_items
|
- name: set test_items
|
||||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||||
|
|
||||||
|
- name: enable eapi
|
||||||
|
eos_eapi:
|
||||||
|
http: yes
|
||||||
|
https: yes
|
||||||
|
local_http: no
|
||||||
|
enable_socket: yes
|
||||||
|
provider: "{{ cli }}"
|
||||||
|
|
||||||
- name: run test case
|
- name: run test case
|
||||||
include: "{{ test_case_to_run }}"
|
include: "{{ test_case_to_run }}"
|
||||||
with_items: "{{ test_items }}"
|
with_items: "{{ test_items }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
loop_var: test_case_to_run
|
loop_var: test_case_to_run
|
||||||
|
|
||||||
|
- name: disable eapi
|
||||||
|
eos_eapi:
|
||||||
|
state: stopped
|
||||||
|
|
|
@ -8,8 +8,20 @@
|
||||||
- name: set test_items
|
- name: set test_items
|
||||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||||
|
|
||||||
|
- name: enable eapi
|
||||||
|
eos_eapi:
|
||||||
|
http: yes
|
||||||
|
https: yes
|
||||||
|
local_http: no
|
||||||
|
enable_socket: yes
|
||||||
|
provider: "{{ cli }}"
|
||||||
|
|
||||||
- name: run test case
|
- name: run test case
|
||||||
include: "{{ test_case_to_run }}"
|
include: "{{ test_case_to_run }}"
|
||||||
with_items: "{{ test_items }}"
|
with_items: "{{ test_items }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
loop_var: test_case_to_run
|
loop_var: test_case_to_run
|
||||||
|
|
||||||
|
- name: disable eapi
|
||||||
|
eos_eapi:
|
||||||
|
state: stopped
|
||||||
|
|
|
@ -1,33 +0,0 @@
|
||||||
---
|
|
||||||
- name: collect all eapi test cases
|
|
||||||
find:
|
|
||||||
paths: "{{ role_path }}/tests/eapi"
|
|
||||||
patterns: "{{ testcase }}.yaml"
|
|
||||||
register: test_cases
|
|
||||||
|
|
||||||
- name: set test_items
|
|
||||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" #"
|
|
||||||
|
|
||||||
- name: enable eapi
|
|
||||||
eos_eapi:
|
|
||||||
enable_http: yes
|
|
||||||
enable_https: yes
|
|
||||||
enable_local_http: yes
|
|
||||||
enable_socket: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
# authorize: yes
|
|
||||||
|
|
||||||
- name: run test case
|
|
||||||
include: "{{ test_case_to_run }}"
|
|
||||||
with_items: "{{ test_items }}"
|
|
||||||
loop_control:
|
|
||||||
loop_var: test_case_to_run
|
|
||||||
|
|
||||||
- name: disable eapi
|
|
||||||
eos_eapi:
|
|
||||||
enable_http: no
|
|
||||||
enable_https: no
|
|
||||||
enable_local_http: no
|
|
||||||
enable_socket: no
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
# authorize: yes
|
|
|
@ -1,3 +1,2 @@
|
||||||
---
|
---
|
||||||
- { include: cli.yaml, tags: ['cli'] }
|
- { include: cli.yaml, tags: ['cli'] }
|
||||||
- { include: eapi.yaml, tags: ['eapi'] }
|
|
||||||
|
|
|
@ -1,13 +1,3 @@
|
||||||
- name: enable cli on remote device
|
|
||||||
eos_eapi:
|
|
||||||
enable_http: yes
|
|
||||||
enable_https: yes
|
|
||||||
enable_local_http: yes
|
|
||||||
enable_socket: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: eos_eapi_output
|
|
||||||
connection: local
|
|
||||||
|
|
||||||
- name: Enable Ethernet1 interface and disable switchport
|
- name: Enable Ethernet1 interface and disable switchport
|
||||||
eos_config:
|
eos_config:
|
||||||
lines:
|
lines:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue