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:
Ricardo Carrillo Cruz 2017-07-18 00:17:15 +02:00 committed by GitHub
parent 290d84f904
commit 258d2058cd
10 changed files with 68 additions and 62 deletions

View file

@ -10,12 +10,11 @@
- name: enable eapi
eos_eapi:
enable_http: yes
enable_https: yes
enable_local_http: yes
http: yes
https: yes
local_http: no
enable_socket: yes
provider: "{{ cli }}"
# authorize: yes
- name: run test case
include: "{{ test_case_to_run }}"
@ -25,9 +24,4 @@
- name: disable eapi
eos_eapi:
enable_http: no
enable_https: no
enable_local_http: no
enable_socket: no
provider: "{{ cli }}"
# authorize: yes
state: stopped

View file

@ -8,8 +8,20 @@
- name: set test_items
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
include: "{{ test_case_to_run }}"
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run
- name: disable eapi
eos_eapi:
state: stopped

View file

@ -8,8 +8,20 @@
- name: set test_items
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
include: "{{ test_case_to_run }}"
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run
- name: disable eapi
eos_eapi:
state: stopped

View file

@ -8,8 +8,20 @@
- name: set test_items
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
include: "{{ test_case_to_run }}"
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run
- name: disable eapi
eos_eapi:
state: stopped

View file

@ -10,9 +10,9 @@
- name: enable eapi
eos_eapi:
enable_http: yes
enable_https: yes
enable_local_http: yes
http: yes
https: yes
local_http: no
enable_socket: yes
provider: "{{ cli }}"
@ -24,8 +24,4 @@
- name: disable eapi
eos_eapi:
enable_http: no
enable_https: no
enable_local_http: no
enable_socket: no
provider: "{{ cli }}"
state: stopped

View file

@ -8,8 +8,20 @@
- name: set test_items
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
include: "{{ test_case_to_run }}"
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run
- name: disable eapi
eos_eapi:
state: stopped

View file

@ -8,8 +8,20 @@
- name: set test_items
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
include: "{{ test_case_to_run }}"
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run
- name: disable eapi
eos_eapi:
state: stopped

View file

@ -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

View file

@ -1,3 +1,2 @@
---
- { include: cli.yaml, tags: ['cli'] }
- { include: eapi.yaml, tags: ['eapi'] }

View file

@ -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
eos_config:
lines: