VOL-2642 Add a Makefile, tests, and virtualenv
Convert common python and robot into a CORDRobot python module that can
be installed via standard python tools (pip) and from PyPI
Uses a fork of https://github.com/rasjani/robotframework-importresource,
which has been backported to Python 3.5 (used in Ubuntu 16.04
executors).
Reformatted and moved keywords so resource files are scoped to a
specific topic.
Added tox tests for library consistency
- flake8
- pylint
- robotframework-lint
- Ran robot against installed library to verify it can be loaded and
used
Added basic lint and tests to whole repo
Removed old tests:
- CORD <6.x era: SanityPhyPOD.robot, and onosUtils.py
Change-Id: I61265a9fb04034a086e20be1f7236a8793a218aa
diff --git a/roles/prereq/tasks/main.yml b/roles/prereq/tasks/main.yml
index 32ce311..baf0e8e 100644
--- a/roles/prereq/tasks/main.yml
+++ b/roles/prereq/tasks/main.yml
@@ -1,4 +1,4 @@
-
+---
# Copyright 2017-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,11 +13,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-
----
- name: Install Cord tester prerequisites
- become: yes
- apt: name={{ item }} state=latest force=yes
+ become: true
+ apt: name={{ item }} state=latest force=true
with_items:
- wget
- python
@@ -31,7 +29,7 @@
- libffi-dev
- name: Install Python Prerequisites for cord tester
- become: yes
+ become: true
pip: name={{ item }} state=latest
with_items:
- nose
@@ -59,20 +57,20 @@
pip: name=paramiko version=1.10.1 state=present
- name: Download Openvswitch {{ openvswitch_version }}
- become: yes
+ become: true
get_url:
url: "{{ openvswitch_url }}/openvswitch-{{ openvswitch_version }}.tar.gz"
dest: "/home/{{ ansible_user }}/openvswitch-{{ openvswitch_version }}.tar.gz"
- force: yes
+ force: true
-- name: Untar Openvswitch {{ openvswitch_version }}
- become: yes
+- name: Untar Openvswitch {{ openvswitch_version }}
+ become: true
unarchive:
src=openvswitch-{{ openvswitch_version }}.tar.gz
dest=/home/{{ ansible_user }}
- name: Build Openvswitch {{ openvswitch_version }}
- become: yes
+ become: true
shell: "{{ item }}"
args:
chdir: "/home/{{ ansible_user }}/openvswitch-{{ openvswitch_version }}"
@@ -90,15 +88,15 @@
- "openvswitch-{{ openvswitch_version }}"
- name: install Pipework
- sudo: True
+ sudo: true
get_url:
url: "{{ docker_tools_pipework_exe_url }}"
dest: "{{ docker_tools_path }}/pipework"
- force: yes
+ force: true
mode: "a+x"
- name: Pull cord test container
- become: yes
+ become: true
docker:
name: cord-test
image: "{{ docker.registry }}/cordtest/nose:{{ docker.image_version }}"
@@ -106,7 +104,7 @@
state: absent
- name: Pull test radius container
- become: yes
+ become: true
docker:
name: cord-radius
image: "{{ docker.registry }}/cordtest/radius:{{ docker.image_version }}"
@@ -114,7 +112,7 @@
state: absent
- name: Pull test quagga container
- become: yes
+ become: true
docker:
name: cord-quagga
image: "{{ docker.registry }}/cordtest/quagga:{{ docker.image_version }}"
@@ -122,7 +120,7 @@
state: absent
- name: Pull onosproject
- become: yes
+ become: true
docker:
name: cord-test-onos
image: "{{ docker.registry }}/onosproject/onos:{{ docker.image_version }}"