diff --git a/CHANGELOG.md b/CHANGELOG.md index 944eb2f6f55..98f2fa815c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 wait_for on non-Linux systems with newer versions of psutil * 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 diff --git a/test/integration/targets/eos_banner/tasks/eapi.yaml b/test/integration/targets/eos_banner/tasks/eapi.yaml index 994d1a7c7da..abca2c7ba12 100644 --- a/test/integration/targets/eos_banner/tasks/eapi.yaml +++ b/test/integration/targets/eos_banner/tasks/eapi.yaml @@ -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,5 @@ - name: disable eapi eos_eapi: - enable_http: no - enable_https: no - enable_local_http: no - enable_socket: no + state: stopped provider: "{{ cli }}" -# authorize: yes diff --git a/test/integration/targets/eos_command/tasks/eapi.yaml b/test/integration/targets/eos_command/tasks/eapi.yaml index 068881ab1b6..00a159a98e5 100644 --- a/test/integration/targets/eos_command/tasks/eapi.yaml +++ b/test/integration/targets/eos_command/tasks/eapi.yaml @@ -8,8 +8,21 @@ - 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 + provider: "{{ cli }}" diff --git a/test/integration/targets/eos_config/tasks/eapi.yaml b/test/integration/targets/eos_config/tasks/eapi.yaml index 068881ab1b6..76cf2a04dad 100644 --- a/test/integration/targets/eos_config/tasks/eapi.yaml +++ b/test/integration/targets/eos_config/tasks/eapi.yaml @@ -8,8 +8,21 @@ - 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 + provider: "{{ cli }}" diff --git a/test/integration/targets/eos_facts/tasks/eapi.yaml b/test/integration/targets/eos_facts/tasks/eapi.yaml index 068881ab1b6..00a159a98e5 100644 --- a/test/integration/targets/eos_facts/tasks/eapi.yaml +++ b/test/integration/targets/eos_facts/tasks/eapi.yaml @@ -8,8 +8,21 @@ - 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 + provider: "{{ cli }}" diff --git a/test/integration/targets/eos_system/tasks/eapi.yaml b/test/integration/targets/eos_system/tasks/eapi.yaml index f39b09baefd..abca2c7ba12 100644 --- a/test/integration/targets/eos_system/tasks/eapi.yaml +++ b/test/integration/targets/eos_system/tasks/eapi.yaml @@ -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,5 @@ - name: disable eapi eos_eapi: - enable_http: no - enable_https: no - enable_local_http: no - enable_socket: no + state: stopped provider: "{{ cli }}" diff --git a/test/integration/targets/eos_template/tasks/eapi.yaml b/test/integration/targets/eos_template/tasks/eapi.yaml index 068881ab1b6..00a159a98e5 100644 --- a/test/integration/targets/eos_template/tasks/eapi.yaml +++ b/test/integration/targets/eos_template/tasks/eapi.yaml @@ -8,8 +8,21 @@ - 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 + provider: "{{ cli }}" diff --git a/test/integration/targets/prepare_eos_tests/tasks/main.yml b/test/integration/targets/prepare_eos_tests/tasks/main.yml index 1f75bdb2c90..f2bbc5c4097 100644 --- a/test/integration/targets/prepare_eos_tests/tasks/main.yml +++ b/test/integration/targets/prepare_eos_tests/tasks/main.yml @@ -1,10 +1,17 @@ - - name: enable cli on remote device - eos_eapi: - enable_http: yes - enable_https: yes - enable_local_http: yes - enable_socket: yes - authorize: yes - provider: "{{ cli }}" - register: eos_eapi_output - connection: local +- name: Enable Ethernet1 interface and disable switchport + eos_config: + lines: + - no shutdown + - no switchport + parents: int Ethernet1 + authorize: yes + connection: local + +- name: Enable Ethernet2 interface and disable switchport + eos_config: + lines: + - no shutdown + - no switchport + parents: int Ethernet2 + authorize: yes + connection: local