Cherry pick eapi tearup down changes (#26935)

* 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.
(cherry picked from commit 258d2058cd)

* Add missing provider on disable eapi tasks (#26928)

(cherry picked from commit 4532c791fd)

* Add CHANGELOG entry
pull/26938/head
Ricardo Carrillo Cruz 7 years ago committed by GitHub
parent 32b4342209
commit 4490cc9e9e

@ -47,6 +47,7 @@ Ansible Changes By Release
* fix for win_regedit always changing a reg key if the dword values set is a hex * fix for win_regedit always changing a reg key if the dword values set is a hex
* fix for wait_for on non-Linux systems with newer versions of psutil * fix for wait_for on non-Linux systems with newer versions of psutil
* fix eos_banner code and test issues * fix eos_banner code and test issues
* run tearup and teardown of EAPI service only on EAPI tests
## 2.3.1 "Ramble On" - 2017-06-01 ## 2.3.1 "Ramble On" - 2017-06-01

@ -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,5 @@
- 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 }}" provider: "{{ cli }}"
# authorize: yes

@ -8,8 +8,21 @@
- 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
provider: "{{ cli }}"

@ -8,8 +8,21 @@
- 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
provider: "{{ cli }}"

@ -8,8 +8,21 @@
- 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
provider: "{{ cli }}"

@ -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,5 @@
- 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 }}" provider: "{{ cli }}"

@ -8,8 +8,21 @@
- 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
provider: "{{ cli }}"

@ -1,10 +1,17 @@
- name: enable cli on remote device - name: Enable Ethernet1 interface and disable switchport
eos_eapi: eos_config:
enable_http: yes lines:
enable_https: yes - no shutdown
enable_local_http: yes - no switchport
enable_socket: yes parents: int Ethernet1
authorize: yes authorize: yes
provider: "{{ cli }}" connection: local
register: eos_eapi_output
connection: local - name: Enable Ethernet2 interface and disable switchport
eos_config:
lines:
- no shutdown
- no switchport
parents: int Ethernet2
authorize: yes
connection: local

Loading…
Cancel
Save