Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ansible-test-network-integration-eos job
This now adds support to run eos tests against ansible/ansible. Signed-off-by: Paul Belanger <pabelanger@redhat.com>
- Loading branch information
1 parent
77ecd01
commit 6ae85b9
Showing
7 changed files
with
60 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
playbooks/ansible-test-network-integration-eos/files/bootstrap.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
- hosts: appliance | ||
gather_facts: false | ||
tasks: | ||
# TODO(pabelanger): The eos network-integration tests assume eAPI access | ||
# is enabled. | ||
- name: Enable eAPI access with default configuration | ||
become: true | ||
become_method: enable | ||
eos_eapi: | ||
http: true | ||
https: true | ||
state: started | ||
|
||
- name: Setup new user | ||
become: true | ||
eos_config: | ||
save_when: always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
- hosts: controller | ||
tasks: | ||
- name: Setup tox role | ||
include_role: | ||
name: tox | ||
vars: | ||
tox_extra_args: -- ansible-playbook -v -c network_cli playbooks/ansible-test-network-integration-eos/files/bootstrap.yaml | ||
zuul_work_dir: "{{ zuul.projects['github.com/ansible/ansible-zuul-jobs'].src_dir }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
- hosts: controller | ||
tasks: | ||
- name: Create inventory file | ||
template: | ||
src: inventory.j2 | ||
dest: ~/inventory | ||
mode: 0644 | ||
|
||
- name: Run the integration test suite | ||
args: | ||
chdir: "{{ ansible_user_dir }}/{{ zuul.projects['github.com/ansible/ansible'].src_dir }}" | ||
shell: ./test/runner/ansible-test network-integration --diff --tox --tox-sitepackages --python 3.7 --inventory /home/zuul/inventory eos_.* -vv |
9 changes: 9 additions & 0 deletions
9
playbooks/ansible-test-network-integration-eos/templates/inventory.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# This file is generated by Ansible | ||
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN | ||
# | ||
[eos] | ||
eos-4.20.10 ansible_port=22 ansible_python_interpreter=python ansible_host={{ hostvars['eos-4.20.10'].ansible_host }} ansible_network_os=eos ansible_user=zuul ansible_connection=network_cli ansible_become_method=enable | ||
|
||
[eos:vars] | ||
cli={'transport': 'cli', 'authorize': 'yes':} | ||
eapi={'transport': 'eapi', 'use_ssl': 'no', 'port': '80', 'authorize': 'yes'} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters