Merge "Fixed test description for snaps_smoke."
authorJose Lausuch <jose.lausuch@ericsson.com>
Tue, 1 Aug 2017 09:09:35 +0000 (09:09 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Tue, 1 Aug 2017 09:09:35 +0000 (09:09 +0000)
24 files changed:
build.sh [new file with mode: 0644]
docker/Dockerfile
docker/Dockerfile.aarch64 [deleted file]
docker/Dockerfile.aarch64.patch [new file with mode: 0644]
docker/add_images.sh [deleted file]
docker/core/Dockerfile
docker/healthcheck/Dockerfile
docker/healthcheck/hooks/build [new file with mode: 0644]
docker/smoke/Dockerfile
docker/smoke/hooks/build [new file with mode: 0644]
docs/release/release-notes/functest-release.rst
functest/ci/config_aarch64_patch.yaml
functest/ci/download_images.sh
functest/ci/testcases.yaml
functest/opnfv_tests/openstack/refstack_client/refstack_client.py
functest/opnfv_tests/openstack/snaps/snaps_utils.py
functest/opnfv_tests/openstack/tempest/conf_utils.py
functest/opnfv_tests/openstack/tempest/custom_tests/test_list.txt
functest/opnfv_tests/openstack/vping/vping_userdata.py
functest/opnfv_tests/sdn/odl/odl.py
functest/tests/unit/odl/test_odl.py
functest/tests/unit/utils/test_openstack_utils.py
functest/utils/openstack_utils.py
setup.cfg

diff --git a/build.sh b/build.sh
new file mode 100644 (file)
index 0000000..dbc79e0
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+set -e
+
+repo=${repo:-opnfv}
+
+(cd docker && docker build -t "${repo}/functest" .)
+docker push "${repo}/functest"
+
+for dir in docker/core docker/healthcheck docker/smoke; do
+    (cd ${dir} && docker build -t "${repo}/functest-${dir##**/}" .)
+    docker push "${repo}/functest-${dir##**/}"
+done
+
+exit $?
index accbf5e..924da68 100644 (file)
@@ -97,8 +97,6 @@ RUN git clone --depth 1 -b $VIMS_TAG https://github.com/boucherv-orange/clearwat
 RUN git clone --depth 1 -b $VROUTER_TAG https://github.com/oolorg/opnfv-functest-vrouter.git ${REPOS_VNFS_DIR}/vrouter
 RUN git clone --depth 1 https://github.com/wuwenbin2/OnosSystemTest.git ${REPOS_DIR}/onos
 
-RUN add_images.sh
-
 RUN gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
 RUN curl -L https://get.rvm.io | bash -s stable
 
diff --git a/docker/Dockerfile.aarch64 b/docker/Dockerfile.aarch64
deleted file mode 100644 (file)
index abd4d1a..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-########################################
-#  Aarch64 Docker container for FUNCTEST
-########################################
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-
-FROM aarch64/ubuntu:14.04
-MAINTAINER Armband team <armband@enea.com>
-LABEL version="0.1" description="OPNFV Functest Aarch64 Docker container"
-
-# Environment variables
-ARG BRANCH=master
-ARG RALLY_TAG=0.8.1
-ARG ODL_TAG=release/beryllium-sr4
-ARG OPENSTACK_TAG=stable/ocata
-ARG KINGBIRD_TAG=0.2.2
-ARG VIMS_TAG=stable
-ARG REPOS_DIR=/home/opnfv/repos
-ARG FUNCTEST_BASE_DIR=/home/opnfv/functest
-ARG FUNCTEST_CONF_DIR=${FUNCTEST_BASE_DIR}/conf
-ARG FUNCTEST_DATA_DIR=${FUNCTEST_BASE_DIR}/data
-ARG FUNCTEST_IMAGES_DIR=${FUNCTEST_BASE_DIR}/images
-ARG FUNCTEST_RESULTS_DIR=${FUNCTEST_BASE_DIR}/results
-ARG FUNCTEST_DIR=/usr/local/lib/python2.7/dist-packages/functest/
-ARG REPOS_VNFS_DIR=${REPOS_DIR}/vnfs
-
-# Environment variables
-ENV CONFIG_FUNCTEST_YAML ${FUNCTEST_DIR}/functest/ci/config_functest.yaml
-ENV REPOS_DIR ${REPOS_DIR}
-ENV creds ${FUNCTEST_CONF_DIR}/openstack.creds
-
-# Packaged dependencies
-RUN apt-get update && apt-get install -y \
-build-essential \
-bundler \
-crudini \
-curl \
-gcc \
-git \
-libffi-dev \
-libgmp3-dev \
-libjpeg-dev \
-libpq-dev \
-libssl-dev \
-libxml2-dev \
-libxslt-dev \
-python-dev \
-python-mock \
-python-pip \
-postgresql \
-ruby1.9.1-dev \
-ssh \
-sshpass \
-wget \
---no-install-recommends
-
-RUN pip install --upgrade pip && easy_install -U setuptools==30.0.0
-
-RUN mkdir -p ${REPOS_VNFS_DIR} \
-    && mkdir -p ${FUNCTEST_BASE_DIR}/results \
-    && mkdir -p ${FUNCTEST_BASE_DIR}/conf \
-    && mkdir -p ${FUNCTEST_DATA_DIR} \
-    && mkdir -p ${FUNCTEST_IMAGES_DIR} \
-    && mkdir -p /root/.ssh \
-    && chmod 700 /root/.ssh
-
-RUN git config --global http.sslVerify false
-
-COPY thirdparty-requirements.txt thirdparty-requirements.txt
-RUN wget -q -O- https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=$OPENSTACK_TAG | \
-        sed -E s/^tempest==+\(.*\)$/-e\ git+https:\\/\\/github.com\\/openstack\\/tempest@\\1#egg=tempest/ \
-        > upper-constraints.txt && \
-    pip install --src /src -cupper-constraints.txt \
-        -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
-        git+https://gerrit.opnfv.org/gerrit/functest@$BRANCH#egg=functest \
-        -rthirdparty-requirements.txt && \
-    mkdir -p /etc/rally && \
-    printf "[database]\nconnection = 'sqlite:////var/lib/rally/database/rally.sqlite'" > /etc/rally/rally.conf && \
-    mkdir -p /var/lib/rally/database && rally-manage db create && \
-    rm thirdparty-requirements.txt upper-constraints.txt
-
-# OPNFV repositories
-RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/copper ${REPOS_DIR}/copper
-RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/domino ${REPOS_DIR}/domino
-RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/doctor ${REPOS_DIR}/doctor
-RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/promise ${REPOS_DIR}/promise
-
-# other repositories
-RUN git clone --depth 1 -b $ODL_TAG https://git.opendaylight.org/gerrit/p/integration/test.git ${REPOS_DIR}/odl_test
-RUN git clone --depth 1 -b $VIMS_TAG https://github.com/boucherv-orange/clearwater-live-test ${REPOS_VNFS_DIR}/vims-test
-RUN git clone --depth 1 https://github.com/wuwenbin2/OnosSystemTest.git ${REPOS_DIR}/onos
-
-RUN add_images.sh
-
-RUN gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
-RUN curl -L https://get.rvm.io | bash -s stable
-
-# SFC integration
-RUN /bin/bash -c ". /usr/local/lib/python2.7/dist-packages/sfc/tests/functest/setup_scripts/tacker_client_install.sh"
-
-# Install tempest venv and create symlink for running refstack-client
-RUN ln -s /src/tempest /src/refstack-client/.tempest \
-    && virtualenv --system-site-packages /src/tempest/.venv
-
-RUN /bin/bash -c ". /etc/profile.d/rvm.sh \
-    && cd ${REPOS_VNFS_DIR}/vims-test \
-    && rvm autolibs enable"
-RUN /bin/bash -c ". /etc/profile.d/rvm.sh \
-    && cd ${REPOS_VNFS_DIR}/vims-test \
-    && rvm install 1.9.3"
-RUN /bin/bash -c ". /etc/profile.d/rvm.sh \
-    && cd ${REPOS_VNFS_DIR}/vims-test \
-    && rvm use 1.9.3"
-RUN /bin/bash -c ". /etc/profile.d/rvm.sh \
-    && gem install bundler \
-    && cd ${REPOS_VNFS_DIR}/vims-test \
-    && bundle config build.nokogiri --use-system-libraries \
-    && bundle install"
-
-RUN sh -c 'wget -qO- https://nodejs.org/dist/v4.7.2/node-v4.7.2-linux-arm64.tar.gz | \
-    tar -xz -C /usr/local --exclude=CHANGELOG.md --exclude=LICENSE --exclude=README.md --strip-components 1 '\
-    && cd ${REPOS_DIR}/promise && sudo npm -g install npm@latest \
-    && cd ${REPOS_DIR}/promise/source && npm install
-
-RUN echo ". ${FUNCTEST_DIR}/cli/functest-complete.sh" >> /root/.bashrc
diff --git a/docker/Dockerfile.aarch64.patch b/docker/Dockerfile.aarch64.patch
new file mode 100644 (file)
index 0000000..1b553b1
--- /dev/null
@@ -0,0 +1,61 @@
+From: Delia Popescu <delia.popescu@enea.com>
+Date: Thu, 20 Jul 2017 17:36:13 +0300
+Subject: [PATCH] Modified Dockerfile.aarch to a patch
+
+Docker image for functest on ARM was build using a different Dockerfile.
+Now the ARM Dockerfile is created with a patch,
+in order to avoid modifying both files.
+This Dockerfile.aarch64.patch is applied by opnfv-docker.sh from releng project.
+
+Signed-off-by: Delia Popescu <delia.popescu@enea.com>
+---
+ docker/Dockerfile | 15 +++++++++------
+ 1 file changed, 9 insertions(+), 6 deletions(-)
+
+diff --git a/docker/Dockerfile b/docker/Dockerfile
+index 924da68..dd87e6c 100644
+--- a/docker/Dockerfile
++++ b/docker/Dockerfile
+@@ -1,5 +1,5 @@
+ ########################################
+-#   Docker container for FUNCTEST
++#  Aarch64 Docker container for FUNCTEST
+ ########################################
+ # All rights reserved. This program and the accompanying materials
+ # are made available under the terms of the Apache License, Version 2.0
+@@ -7,9 +7,9 @@
+ # http://www.apache.org/licenses/LICENSE-2.0
+ #
+
+-FROM ubuntu:14.04
+-MAINTAINER Jose Lausuch <jose.lausuch@ericsson.com>
+-LABEL version="0.1" description="OPNFV Functest Docker container"
++FROM aarch64/ubuntu:14.04
++MAINTAINER Armband team <armband@enea.com>
++LABEL version="0.1" description="OPNFV Functest Aarch64 Docker container"
+
+ # Environment variables
+ ARG BRANCH=master
+@@ -43,6 +43,7 @@ gcc \
+ git \
+ libffi-dev \
+ libgmp3-dev \
++libjpeg-dev \
+ libpq-dev \
+ libssl-dev \
+ libxml2-dev \
+@@ -117,11 +118,13 @@ RUN /bin/bash -c ". /etc/profile.d/rvm.sh \
+     && cd ${REPOS_VNFS_DIR}/vims-test \
+     && rvm use 1.9.3"
+ RUN /bin/bash -c ". /etc/profile.d/rvm.sh \
++    && gem install bundler \
+     && cd ${REPOS_VNFS_DIR}/vims-test \
++    && bundle config build.nokogiri --use-system-libraries \
+     && bundle install"
+
+-RUN sh -c 'curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -' \
+-    && sudo apt-get install -y nodejs \
++RUN sh -c 'wget -qO- https://nodejs.org/dist/v4.7.2/node-v4.7.2-linux-arm64.tar.gz | \
++    tar -xz -C /usr/local --exclude=CHANGELOG.md --exclude=LICENSE --exclude=README.md --strip-components 1 '\
+     && cd ${REPOS_DIR}/promise && sudo npm -g install npm@latest \
+     && cd ${REPOS_DIR}/promise/source && npm install
diff --git a/docker/add_images.sh b/docker/add_images.sh
deleted file mode 100644 (file)
index 93afbd2..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/env bash
-#
-# This script downloads the images that are used for testing
-# and places them in the functest docker image
-set -e
-
-FUNCTEST_IMAGES_DIR=${FUNCTEST_IMAGES_DIR:-/home/opnfv/functest/images}
-
-CIRROS_REPO_URL=https://download.cirros-cloud.net
-CIRROS_AARCH64_TAG=161201
-CIRROS_X86_64_TAG=0.3.5
-
-wget ${CIRROS_REPO_URL}/${CIRROS_X86_64_TAG}/cirros-${CIRROS_X86_64_TAG}-x86_64-disk.img -P ${FUNCTEST_IMAGES_DIR}
-wget ${CIRROS_REPO_URL}/${CIRROS_X86_64_TAG}/cirros-${CIRROS_X86_64_TAG}-x86_64-lxc.tar.gz -P ${FUNCTEST_IMAGES_DIR}
-wget http://artifacts.opnfv.org/onosfw/images/firewall_block_image.img -P ${FUNCTEST_IMAGES_DIR}
-
-# Add the 3-part image for aarch64, since functest can be run from an x86 machine to test an aarch64 POD
-wget ${CIRROS_REPO_URL}/daily/20${CIRROS_AARCH64_TAG}/cirros-d${CIRROS_AARCH64_TAG}-aarch64-disk.img -P ${FUNCTEST_IMAGES_DIR}
-wget ${CIRROS_REPO_URL}/daily/20${CIRROS_AARCH64_TAG}/cirros-d${CIRROS_AARCH64_TAG}-aarch64-initramfs -P ${FUNCTEST_IMAGES_DIR}
-wget ${CIRROS_REPO_URL}/daily/20${CIRROS_AARCH64_TAG}/cirros-d${CIRROS_AARCH64_TAG}-aarch64-kernel -P ${FUNCTEST_IMAGES_DIR}
index 574de9b..ebd76a2 100644 (file)
@@ -12,7 +12,7 @@ RUN apk --no-cache add --update \
     wget -q -O- https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=$OPENSTACK_TAG | \
         sed -E s/^tempest==+\(.*\)$/-e\ git+https:\\/\\/github.com\\/openstack\\/tempest@\\1#egg=tempest/ \
         > upper-constraints.txt && \
-    pip install --src /src -cupper-constraints.txt \
+    pip install --no-cache-dir --src /src -cupper-constraints.txt \
         -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
         git+https://gerrit.opnfv.org/gerrit/functest@$BRANCH#egg=functest && \
     rm upper-constraints.txt && \
index 6dfea7f..8923e4c 100644 (file)
@@ -1,4 +1,4 @@
-FROM ollivier/functest-core
+FROM opnfv/functest-core
 
 COPY testcases.yaml /usr/lib/python2.7/site-packages/functest/ci/testcases.yaml
 CMD ["bash","-c","prepare_env start && run_tests -t all"]
diff --git a/docker/healthcheck/hooks/build b/docker/healthcheck/hooks/build
new file mode 100644 (file)
index 0000000..e5d15b5
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+from="${DOCKER_REPO%/*}/functest-core"
+sed -i "s|^FROM.*$|FROM ${from}|" Dockerfile &&
+    docker build -t "${IMAGE_NAME}" .
+
+exit $?
index b6f84b6..22ff2eb 100644 (file)
@@ -1,4 +1,4 @@
-FROM ollivier/functest-core
+FROM opnfv/functest-core
 
 ARG BRANCH=master
 ARG OPENSTACK_TAG=stable/ocata
@@ -7,13 +7,13 @@ COPY thirdparty-requirements.txt thirdparty-requirements.txt
 RUN apk --no-cache add --virtual .build-deps --update \
         python-dev build-base linux-headers libffi-dev \
         openssl-dev libjpeg-turbo-dev git && \
-    pip install --src /src \
+    pip install --no-cache-dir --src /src \
         -chttps://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=$OPENSTACK_TAG \
         -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
         -rthirdparty-requirements.txt && \
     ln -s /src/tempest /src/refstack-client/.tempest && \
     virtualenv --system-site-packages /src/tempest/.venv && \
-    rm thirdparty-requirements.txt && \
+    rm -r thirdparty-requirements.txt /src/refstack-client/.git && \
     apk del .build-deps
 COPY testcases.yaml /usr/lib/python2.7/site-packages/functest/ci/testcases.yaml
 CMD ["bash","-c","prepare_env start && run_tests -t all"]
diff --git a/docker/smoke/hooks/build b/docker/smoke/hooks/build
new file mode 100644 (file)
index 0000000..e5d15b5
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+from="${DOCKER_REPO%/*}/functest-core"
+sed -i "s|^FROM.*$|FROM ${from}|" Dockerfile &&
+    docker build -t "${IMAGE_NAME}" .
+
+exit $?
index fe49657..1ddaf70 100644 (file)
@@ -30,16 +30,24 @@ Version history
 | **Date**   | **Ver.** | **Author**       | **Comment**            |
 |            |          |                  |                        |
 +------------+----------+------------------+------------------------+
-| 2016-08-17 | 1.0.0    | Morgan Richomme  | Functest for Colorado  |
-|            |          | (Orange)         | release                |
+| 2016-08-17 | 1.0.0    | Morgan Richomme  | Functest for           |
+|            |          | (Orange)         | Colorado.1.0 release   |
 +------------+----------+------------------+------------------------+
-| 2017-03-29 | 4.0.0    | Jose Lausuch     | Functest for Danube    |
-|            |          | (Ericsson)       | release                |
+| 2016-10-24 | 2.0.0    | Morgan Richomme  | Functest for           |
+|            |          | (Orange)         | Colorado.2.0 release   |
 +------------+----------+------------------+------------------------+
-| 2017-05-04 | 5.0.0    | Jose Lausuch     | Functest for Danube.2.0|
-|            |          | (Ericsson)       | release                |
+| 2016-08-17 | 3.0.0    | Morgan Richomme  | Functest for           |
+|            |          | (Orange)         | Colorado.3.0 release   |
++------------+----------+------------------+------------------------+
+| 2017-03-29 | 4.0.0    | Jose Lausuch     | Functest for           |
+|            |          | (Ericsson)       | Danube.1.0 release     |
++------------+----------+------------------+------------------------+
+| 2017-05-04 | 5.0.0    | Jose Lausuch     | Functest for           |
+|            |          | (Ericsson)       | Danube.2.0 release     |
++------------+----------+------------------+------------------------+
+| 2017-07-12 | 6.0.0    | Jose Lausuch     | Functest for           |
+|            |          | (Ericsson)       | Danube.3.0 release     |
 +------------+----------+------------------+------------------------+
-
 
 OPNFV Danube Release
 ======================
@@ -96,16 +104,16 @@ Release Data
 | **Project**                          | functest                             |
 |                                      |                                      |
 +--------------------------------------+--------------------------------------+
-| **Repo/tag**                         | danube.2.0                           |
+| **Repo/tag**                         | danube.3.0                           |
 |                                      |                                      |
 +--------------------------------------+--------------------------------------+
 | **Release designation**              | Danube service release               |
 |                                      |                                      |
 +--------------------------------------+--------------------------------------+
-| **Release date**                     | May 4st 2017                         |
+| **Release date**                     | July 14th 2017                       |
 |                                      |                                      |
 +--------------------------------------+--------------------------------------+
-| **Purpose of the delivery**          | Danube second release                |
+| **Purpose of the delivery**          | Danube third release                 |
 |                                      |                                      |
 +--------------------------------------+--------------------------------------+
 
@@ -115,87 +123,42 @@ Deliverables
 Software
 --------
 
- - The Functest Docker image: https://hub.docker.com/r/opnfv/functest (tag: danube.2.0)
+ - The Functest Docker image: https://hub.docker.com/r/opnfv/functest (tag: danube.3.0)
 
- - The TestAPI Docker image: https://hub.docker.com/r/opnfv/testapi (tag:danube.2.0)
+ - The TestAPI Docker image: https://hub.docker.com/r/opnfv/testapi (tag:danube.3.0)
 
 
 Documents
 ---------
 
- - Installation/configuration guide: http://docs.opnfv.org/en/latest/submodules/functest/docs/testing/user/configguide/index.html
+ - Installation/configuration guide: http://docs.opnfv.org/en/stable-danube/submodules/functest/docs/testing/user/configguide/index.html
 
- - User Guide: http://docs.opnfv.org/en/latest/submodules/functest/docs/testing/user/userguide/index.html
+ - User Guide: http://docs.opnfv.org/en/stable-danube/submodules/functest/docs/testing/user/userguide/index.html
 
- - Developer Guide: http://docs.opnfv.org/en/latest/submodules/functest/docs/testing/developer/devguide/index.html
+ - Developer Guide: http://docs.opnfv.org/en/stable-danube/submodules/functest/docs/testing/developer/devguide/index.html
 
 
 Version change
 ==============
 
-Feature evolution
------------------
 
-- Adoption of SNAPS as middleware in 4 new test cases (connection_check, api_check,
-   snaps_health_check and snaps_smoke)
+- Bugfixes in refstack client
 
-- Introduction of refstack suite
+- Fixed vIMS onboarding and ims deployment
 
-- Support new odl suites (odl-netvirt, fds)
+- Increased timeout of OpenBaton installation
 
-- Introduction of VNF onboarding capabilities
+- Switched to mitaka-eol in openstack repositories, as stable/mitake is not longer existing
 
-- Support of new feature projects (fds, netready, barometer, orchestra, vyos_vrouter)
-
-
-
-Framework
----------
+- Minor fixes in logging and test cases
 
- - Harmonization of the naming, better adoption of OpenStack coding conventions
-
- - Enhanced code to be more Object Oriented, removed bash scripts
-
- - Introduction of abstraction classes to ease and harmonize the integration of
-    test cases (internal or from feature projects)
-
- - New management of logger, env variables and configuration files
-
- - Creation of unit tests on the whole framework to ensure stability
-
- - Creation or ARM Functest docker
-
-
-Test API
----------
-
-- Automatic documentation (html & pdf)
-
-- Full dockerization and automation of the deployment on testresults.opnfv.org
-
-- Automation of test database backup on artifact
-
-
-New internal tests cases
-------------------------
-
-- connection_check
-
-- api_check
-
-- snaps_health_check (replacing shell script healtcheck)
-
-- refstack_defcore
-
-- snaps_smoke
-
-- vyos_vrouter
+- 3 scenarios have been successfully executed on aarch64 architectures on Fuel deployments (nosdn, odl_l2 and odl_l3)
 
 
 Scenario Matrix
 ===============
 
-For Danube 2.0, Functest was tested on the following HA scenarios (new
+For Danube 3.0, Functest was tested on the following HA scenarios (new
 dabube scenarios in bold):
 
 +---------------------+---------+---------+---------+---------+
@@ -314,23 +277,23 @@ Apex
 |  Scenario        | Scoring | Success |    Results      |
 |                  |         | rate    |                 |
 +==================+=========+=========+=================+
-| nosdn            |  30/33  |    91%  | `apex-res-1`_   |
+| nosdn            |  20/30  |    67%  | `apex-res-1`_   |
 +------------------+---------+---------+-----------------+
-| odl_l3           |  23/33  |    70%  | `apex-res-2`_   |
+| odl_l3           |  16/30  |    53%  | `apex-res-2`_   |
 +------------------+---------+---------+-----------------+
-| odl-bgpvpn       |  16/36  |    44%  | `apex-res-3`_   |
+| odl-bgpvpn       |  18/33  |    56%  | `apex-res-3`_   |
 +------------------+---------+---------+-----------------+
-| odl-gluon        |  18/36  |    50%  | `apex-res-4`_   |
+| odl-gluon        |  20/33  |    61%  | `apex-res-4`_   |
 +------------------+---------+---------+-----------------+
-| kvm              |  30/33  |    91%  | `apex-res-5`_   |
+| kvm              |  20/30  |    67%  | `apex-res-5`_   |
 +------------------+---------+---------+-----------------+
-| odl_l2-fdio      |  30/36  |    83%  | `apex-res-6`_   |
+| odl_l2-fdio      |  25/33  |    76%  | `apex-res-6`_   |
 +------------------+---------+---------+-----------------+
-| odl_l2-fdio-noha |  29/36  |    81%  | `apex-res-7`_   |
+| odl_l2-fdio-noha |  24/33  |    73%  |   local push    |
 +------------------+---------+---------+-----------------+
-| odl_l3-fdio-noha |  23/30  |    77%  | `apex-res-8`_   |
+| odl_l3-fdio-noha |  18/30  |    60%  |   local push    |
 +------------------+---------+---------+-----------------+
-| fdio             |   6/30  |    20%  | `apex-res-9`_   |
+| fdio             |  25/27  |    93%  |   local push    |
 +------------------+---------+---------+-----------------+
 
 Compass
@@ -344,13 +307,11 @@ Compass
 +------------------+---------+---------+------------------+
 | odl_l2           |  29/33  |    88%  | `compass-res-2`_ |
 +------------------+---------+---------+------------------+
-| odl_l3           |  25/30  |    83%  | `compass-res-3`_ |
-+------------------+---------+---------+------------------+
-| onos             |  28/33  |    84%  | `compass-res-4`_ |
+| odl_l3           |  23/30  |    77%  | `compass-res-3`_ |
 +------------------+---------+---------+------------------+
-| openo            |  29/30  |    97%  | `compass-res-5`_ |
+| onos             |  29/30  |    97%  | `compass-res-4`_ |
 +------------------+---------+---------+------------------+
-| ocl              |   3/30  |    10%  | `compass-res-6`_ |
+| onos-sfc         |  20/36  |    56%  | `compass-res-5`_ |
 +------------------+---------+---------+------------------+
 
 Note: all the Compass tests for Danube have been executed on virtual
@@ -364,7 +325,7 @@ Fuel
 |  Scenario            | Scoring | Success |  Results       |
 |                      |         | rate    |                |
 +======================+=========+=========+================+
-| nosdn                |  38/39  |   97%   | `fuel-res-1`_  |
+| nosdn                |  39/39  |  100%   | `fuel-res-1`_  |
 +----------------------+---------+---------+----------------+
 | nosdn-noha           |  36/36  |  100%   | `fuel-res-2`_  |
 +----------------------+---------+---------+----------------+
@@ -376,25 +337,25 @@ Fuel
 +----------------------+---------+---------+----------------+
 | nosdn-ovs-noha       |  36/36  |  100%   | `fuel-res-6`_  |
 +----------------------+---------+---------+----------------+
-| odl_l2               |  40/42  |   95%   | `fuel-res-7`_  |
+| odl_l2               |  42/42  |  100%   | `fuel-res-7`_  |
 +----------------------+---------+---------+----------------+
-| odl_l2-noha          |  37/39  |   95%   | `fuel-res-8`_  |
+| odl_l2-noha          |  39/39  |  100%   | `fuel-res-8`_  |
 +----------------------+---------+---------+----------------+
 | odl_l2-sfc           |  45/45  |  100%   | `fuel-res-9`_  |
 +----------------------+---------+---------+----------------+
-| odl_l2-sfc-noha      |  36/42  |   86%   | `fuel-res-10`_ |
+| odl_l2-sfc-noha      |  35/42  |   83%   | `fuel-res-10`_ |
 +----------------------+---------+---------+----------------+
-| odl_l3               |  38/39  |   97%   | `fuel-res-11`_ |
+| odl_l3               |  36/39  |   92%   | `fuel-res-11`_ |
 +----------------------+---------+---------+----------------+
 | odl_l3-noha          |  36/36  |  100%   | `fuel-res-12`_ |
 +----------------------+---------+---------+----------------+
-| kvm_ovs_dpdk         |   6/39  |   15%   | `fuel-res-13`_ |
+| kvm_ovs_dpdk         |  39/39  |  100%   | `fuel-res-13`_ |
 +----------------------+---------+---------+----------------+
-| kvm_ovs_dpdk_noha    |  36/36  |  100%   | `fuel-res-14`_ |
+| kvm_ovs_dpdk_noha    |  35/36  |   97%   | `fuel-res-14`_ |
 +----------------------+---------+---------+----------------+
-| kvm_ovs_dpdk_bar     |   6/42  |   14%   | `fuel-res-15`_ |
+| kvm_ovs_dpdk_bar     |  42/42  |  100%   | `fuel-res-15`_ |
 +----------------------+---------+---------+----------------+
-| kvm_ovs_dpdk_bar_noha|  38/39  |   97%   | `fuel-res-16`_ |
+| kvm_ovs_dpdk_bar_noha|  36/39  |   92%   | `fuel-res-16`_ |
 +----------------------+---------+---------+----------------+
 
 
@@ -407,15 +368,15 @@ Joid
 |  Scenario           | Scoring | Success |  Results      |
 |                     |         | rate    |               |
 +=====================+=========+=========+===============+
-| nosdn               |  29/33  |   97%   | `joid-res-1`_ |
+| nosdn               |  30/30  |  100%   | `joid-res-1`_ |
 +---------------------+---------+---------+---------------+
-| nosdn-noha          |  33/33  |  100%   | `joid-res-2`_ |
+| nosdn-noha          |  10/30  |   33%   | `joid-res-2`_ |
 +---------------------+---------+---------+---------------+
-| nosdn-lxd           |  18/24  |   75%   | `joid-res-3`_ |
+| nosdn-lxd           |  19/21  |   90%   | `joid-res-3`_ |
 +---------------------+---------+---------+---------------+
-| nosdn-lxd-noha      |  18/24  |   71%   | `joid-res-4`_ |
+| nosdn-lxd-noha      |  15/21  |   71%   | `joid-res-4`_ |
 +---------------------+---------+---------+---------------+
-| odl_l2              |   9/36  |   25%   | `joid-res-5`_ |
+| odl_l2              |   6/33  |   18%   | `joid-res-5`_ |
 +---------------------+---------+---------+---------------+
 
 It is highly recommended to install a json viewer in your browser
@@ -525,75 +486,70 @@ Useful links
 
 .. _`gluon-bug`: https://bugs.opendaylight.org/show_bug.cgi?id=5586
 
-.. _`apex-res-1`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-apex-apex-daily-danube-daily-danube-222
-
-.. _`apex-res-2`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-apex-apex-daily-danube-daily-danube-211
 
-.. _`apex-res-3`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-apex-apex-daily-danube-daily-danube-224
+.. _`apex-res-1`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-apex-baremetal-daily-danube-455
 
-.. _`apex-res-4`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-apex-apex-daily-danube-daily-danube-225
+.. _`apex-res-2`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-apex-baremetal-daily-danube-466
 
-.. _`apex-res-5`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-apex-apex-daily-danube-daily-danube-216
+.. _`apex-res-3`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-apex-baremetal-daily-danube-449
 
-.. _`apex-res-6`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-apex-apex-daily-danube-daily-danube-215
+.. _`apex-res-4`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-apex-baremetal-daily-danube-450
 
-.. _`apex-res-7`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-apex-apex-daily-danube-daily-danube-214
+.. _`apex-res-5`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-apex-baremetal-daily-danube-461
 
-.. _`apex-res-8`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-apex-apex-daily-danube-daily-danube-217
+.. _`apex-res-6`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-apex-baremetal-daily-danube-485
 
-.. _`apex-res-9`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-apex-apex-daily-danube-daily-danube-218
 
-.. _`compass-res-1`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-compass-virtual-daily-danube-216
+.. _`compass-res-1`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-compass-virtual-daily-danube-484
 
-.. _`compass-res-2`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-compass-virtual-daily-danube-221
+.. _`compass-res-2`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-compass-virtual-daily-danube-454
 
-.. _`compass-res-3`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-compass-baremetal-daily-danube-214
+.. _`compass-res-3`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-compass-baremetal-daily-danube-482
 
-.. _`compass-res-4`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-compass-virtual-daily-danube-213
+.. _`compass-res-4`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-compass-virtual-daily-danube-481
 
-.. _`compass-res-5`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-compass-baremetal-daily-danube-212
+.. _`compass-res-5`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-compass-baremetal-daily-danube-453
 
-.. _`compass-res-6`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-compass-baremetal-daily-danube-222
 
 .. _`fuel-res-1`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-fuel-baremetal-daily-danube-54
 
-.. _`fuel-res-2`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-fuel-virtual-daily-danube-357
+.. _`fuel-res-2`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-fuel-virtual-daily-danube-937
 
-.. _`fuel-res-3`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-fuel-baremetal-daily-danube-53
+.. _`fuel-res-3`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-fuel-baremetal-daily-danube-873
 
-.. _`fuel-res-4`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-fuel-virtual-daily-danube-355
+.. _`fuel-res-4`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-fuel-virtual-daily-danube-935
 
-.. _`fuel-res-5`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-fuel-baremetal-daily-danube-335
+.. _`fuel-res-5`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-fuel-baremetal-daily-danube-875
 
-.. _`fuel-res-6`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-fuel-virtual-daily-danube-356
+.. _`fuel-res-6`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-fuel-virtual-daily-danube-936
 
-.. _`fuel-res-7`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-fuel-zte-pod1-daily-danube-337
+.. _`fuel-res-7`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-fuel-baremetal-daily-danube-867
 
-.. _`fuel-res-8`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-fuel-virtual-daily-danube-358
+.. _`fuel-res-8`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-fuel-virtual-daily-danube-939
 
-.. _`fuel-res-9`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-fuel-baremetal-daily-danube-340
+.. _`fuel-res-9`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-fuel-baremetal-daily-danube-870
 
-.. _`fuel-res-10`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-fuel-virtual-daily-danube-353
+.. _`fuel-res-10`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-fuel-virtual-daily-danube-933
 
-.. _`fuel-res-11`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-fuel-baremetal-daily-danube-338
+.. _`fuel-res-11`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-fuel-baremetal-daily-danube-868
 
-.. _`fuel-res-12`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-fuel-virtual-daily-danube-360
+.. _`fuel-res-12`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-fuel-virtual-daily-danube-940
 
-.. _`fuel-res-13`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-fuel-baremetal-daily-danube-341
+.. _`fuel-res-13`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-fuel-baremetal-daily-danube-871
 
-.. _`fuel-res-14`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-fuel-virtual-daily-danube-359
+.. _`fuel-res-14`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-fuel-virtual-daily-danube-938
 
-.. _`fuel-res-15`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-fuel-baremetal-daily-danube-339
+.. _`fuel-res-15`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-fuel-baremetal-daily-danube-869
 
-.. _`fuel-res-16`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-fuel-virtual-daily-danube-361
+.. _`fuel-res-16`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-fuel-virtual-daily-danube-941
 
 
-.. _`joid-res-1`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-joid-baremetal-daily-danube-164
+.. _`joid-res-1`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-joid-baremetal-daily-danube-298
 
-.. _`joid-res-2`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-joid-baremetal-daily-danube-150
+.. _`joid-res-2`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-joid-baremetal-daily-danube-260
 
-.. _`joid-res-3`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-joid-baremetal-daily-danube-162
+.. _`joid-res-3`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-joid-baremetal-daily-danube-281
 
-.. _`joid-res-4`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-joid-baremetal-daily-danube-167
+.. _`joid-res-4`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-joid-baremetal-daily-danube-301
 
-.. _`joid-res-5`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-joid-baremetal-daily-danube-165
+.. _`joid-res-5`: http://testresults.opnfv.org/test/api/v1/results?build_tag=jenkins-functest-joid-baremetal-daily-danube-291 
index 45af8d7..27b2706 100644 (file)
@@ -4,7 +4,22 @@ os:
             image_name: TestVM
             image_file_name:  cirros-d161201-aarch64-disk.img
             image_password:  gocubsgo
-
+    snaps:
+        images:
+          glance_tests:
+            disk_file: /home/opnfv/functest/images/cirros-d161201-aarch64-disk.img
+            kernel_file: /home/opnfv/functest/images/cirros-d161201-aarch64-kernel
+            ramdisk_file: /home/opnfv/functest/images/cirros-d161201-aarch64-initramfs
+            extra_properties:
+              os_command_line: root=/dev/vdb1 rw rootwait console=tty0 console=ttyS0 console=ttyAMA0
+              hw_video_model: vga
+          cirros:
+            disk_file: /home/opnfv/functest/images/cirros-d161201-aarch64-disk.img
+            kernel_file: /home/opnfv/functest/images/cirros-d161201-aarch64-kernel
+            ramdisk_file: /home/opnfv/functest/images/cirros-d161201-aarch64-initramfs
+            extra_properties:
+              os_command_line: root=/dev/vdb1 rw rootwait console=tty0 console=ttyS0 console=ttyAMA0
+              hw_video_model: vga
     vping:
         image_name: TestVM
 
index 23e09c1..dd3e378 100644 (file)
@@ -8,31 +8,55 @@ RED='\033[1;31m'
 NC='\033[0m' # No Color
 
 function usage(){
-    echo -e "${RED}USAGE: $script <destination_folder>${NC}"
+    echo -e "${RED}USAGE: $script <destination_folder> <scenario_name> [arch]${NC}"
     exit 0
 }
 
 script=`basename "$0"`
 IMAGES_FOLDER_DIR=$1
+SCENARIO=$2
+ARCH=$3
 
 if [[ -z $IMAGES_FOLDER_DIR ]]; then usage; fi;
 
 set -ex
 mkdir -p ${IMAGES_FOLDER_DIR}
 
+
+####################
+# MANDATORY IMAGES #
+####################
+# These images should be present in Functest for the tests to work
+
+# Functest:
 wget -nc ${CIRROS_REPO_URL}/${CIRROS_X86_64_TAG}/cirros-${CIRROS_X86_64_TAG}-x86_64-disk.img -P ${IMAGES_FOLDER_DIR}
 wget -nc ${CIRROS_REPO_URL}/${CIRROS_X86_64_TAG}/cirros-${CIRROS_X86_64_TAG}-x86_64-lxc.tar.gz -P ${IMAGES_FOLDER_DIR}
-wget -nc http://artifacts.opnfv.org/sdnvpn/ubuntu-16.04-server-cloudimg-amd64-disk1.img -P ${IMAGES_FOLDER_DIR}
-
-# Add 3rd-party images for aarch64, since Functest can be run on an x86 machine to test an aarch64 POD
-wget -nc ${CIRROS_REPO_URL}/daily/20${CIRROS_AARCH64_TAG}/cirros-d${CIRROS_AARCH64_TAG}-aarch64-disk.img -P ${IMAGES_FOLDER_DIR}
-wget -nc ${CIRROS_REPO_URL}/daily/20${CIRROS_AARCH64_TAG}/cirros-d${CIRROS_AARCH64_TAG}-aarch64-initramfs -P ${IMAGES_FOLDER_DIR}
-wget -nc ${CIRROS_REPO_URL}/daily/20${CIRROS_AARCH64_TAG}/cirros-d${CIRROS_AARCH64_TAG}-aarch64-kernel -P ${IMAGES_FOLDER_DIR}
 
-# Add Ubuntu 14 qcow2 image
+# SNAPS:
 wget -nc http://uec-images.ubuntu.com/releases/trusty/14.04/ubuntu-14.04-server-cloudimg-amd64-disk1.img -P ${IMAGES_FOLDER_DIR}
-
-# Add Centos 7 qcow2 image
 wget -nc http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2 -P ${IMAGES_FOLDER_DIR}
 
+
+###################
+# OPTIONAL IMAGES #
+###################
+# Optional images can be commented if they are not going to be used by the tests
+
+# SDNVPN (odl-bgpvpn scenarios):
+if [[ ${SCENARIO} == *"bgpvpn"* ]]; then
+    wget -nc http://artifacts.opnfv.org/sdnvpn/ubuntu-16.04-server-cloudimg-amd64-disk1.img -P ${IMAGES_FOLDER_DIR}
+fi
+
+# ONOS (onos-sfc scenarios):
+if [[ ${SCENARIO} == *"onos-sfc"* ]]; then
+    wget -nc http://artifacts.opnfv.org/onosfw/images/firewall_block_image.img -P ${IMAGES_FOLDER_DIR}
+fi
+
+if [[ ${ARCH} == "arm" ]] || [[ ${ARCH} == "aarch64" ]]; then
+    # ARM (aarch64 cirros images):
+    wget -nc ${CIRROS_REPO_URL}/daily/20${CIRROS_AARCH64_TAG}/cirros-d${CIRROS_AARCH64_TAG}-aarch64-disk.img -P ${IMAGES_FOLDER_DIR}
+    wget -nc ${CIRROS_REPO_URL}/daily/20${CIRROS_AARCH64_TAG}/cirros-d${CIRROS_AARCH64_TAG}-aarch64-initramfs -P ${IMAGES_FOLDER_DIR}
+    wget -nc ${CIRROS_REPO_URL}/daily/20${CIRROS_AARCH64_TAG}/cirros-d${CIRROS_AARCH64_TAG}-aarch64-kernel -P ${IMAGES_FOLDER_DIR}
+fi
+
 set +ex
\ No newline at end of file
index d0b2785..6a589c9 100644 (file)
@@ -382,7 +382,6 @@ tiers:
 
             -
                 case_name: parser-basics
-                enabled: false
                 project_name: parser
                 criteria: 100
                 blocking: false
index 6ac7217..76bee19 100644 (file)
@@ -65,39 +65,26 @@ class RefstackClient(testcase.OSGCTestCase):
         ft_utils.execute_command(cmd)
 
     def run_defcore_default(self):
-        """Run default defcare sys command."""
-        cmd = ("refstack-client test {0} -c {1} -v --test-list {2}"
-               .format(self.insecure, self.confpath, self.defcorelist))
+        """Run default defcore sys command."""
+        options = ["-v"] if not self.insecure else ["-v", self.insecure]
+        cmd = (["refstack-client", "test", "-c", self.confpath] +
+               options + ["--test-list",  self.defcorelist])
         LOGGER.info("Starting Refstack_defcore test case: '%s'.", cmd)
 
-        header = ("Refstack environment:\n"
-                  "  SUT: %s\n  Scenario: %s\n  Node: %s\n  Date: %s\n" %
-                  (CONST.__getattribute__('INSTALLER_TYPE'),
-                   CONST.__getattribute__('DEPLOY_SCENARIO'),
-                   CONST.__getattribute__('NODE_NAME'),
-                   time.strftime("%a %b %d %H:%M:%S %Z %Y")))
-
-        f_stdout = open(
-            os.path.join(conf_utils.REFSTACK_RESULTS_DIR,
-                         "refstack.log"), 'w+')
-        f_env = open(os.path.join(conf_utils.REFSTACK_RESULTS_DIR,
-                                  "environment.log"), 'w+')
-        f_env.write(header)
-
-        process = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,
-                                   stderr=subprocess.STDOUT, bufsize=1)
-
-        with process.stdout:
-            for line in iter(process.stdout.readline, b''):
-                if 'Tests' in line:
-                    break
-                if re.search(r"\} tempest\.", line):
-                    LOGGER.info(line.replace('\n', ''))
-                f_stdout.write(line)
-        process.wait()
-
-        f_stdout.close()
-        f_env.close()
+        with open(os.path.join(conf_utils.REFSTACK_RESULTS_DIR,
+                               "environment.log"), 'w+') as f_env:
+            f_env.write(
+                ("Refstack environment:\n"
+                 "  SUT: {}\n  Scenario: {}\n  Node: {}\n  Date: {}\n").format(
+                    CONST.__getattribute__('INSTALLER_TYPE'),
+                    CONST.__getattribute__('DEPLOY_SCENARIO'),
+                    CONST.__getattribute__('NODE_NAME'),
+                    time.strftime("%a %b %d %H:%M:%S %Z %Y")))
+
+        with open(os.path.join(conf_utils.REFSTACK_RESULTS_DIR,
+                               "refstack.log"), 'w+') as f_stdout:
+            subprocess.call(cmd, shell=False, stdout=f_stdout,
+                            stderr=subprocess.STDOUT)
 
     def parse_refstack_result(self):
         """Parse Refstact results."""
index 327ba07..309f9db 100644 (file)
@@ -16,4 +16,4 @@ def get_ext_net_name(os_creds):
     """
     neutron = neutron_utils.neutron_client(os_creds)
     ext_nets = neutron_utils.get_external_networks(neutron)
-    return ext_nets[0]['network']['name']
+    return ext_nets[0].name
index fa8f00f..d494db5 100644 (file)
@@ -28,12 +28,12 @@ GLANCE_IMAGE_PATH = os.path.join(
 TEMPEST_RESULTS_DIR = os.path.join(CONST.__getattribute__('dir_results'),
                                    'tempest')
 TEMPEST_CUSTOM = pkg_resources.resource_filename(
-        'functest', 'opnfv_tests/openstack/tempest/custom_tests/test_list.txt')
+    'functest', 'opnfv_tests/openstack/tempest/custom_tests/test_list.txt')
 TEMPEST_BLACKLIST = pkg_resources.resource_filename(
-        'functest', 'opnfv_tests/openstack/tempest/custom_tests/blacklist.txt')
+    'functest', 'opnfv_tests/openstack/tempest/custom_tests/blacklist.txt')
 TEMPEST_DEFCORE = pkg_resources.resource_filename(
-        'functest',
-        'opnfv_tests/openstack/tempest/custom_tests/defcore_req.txt')
+    'functest',
+    'opnfv_tests/openstack/tempest/custom_tests/defcore_req.txt')
 TEMPEST_RAW_LIST = os.path.join(TEMPEST_RESULTS_DIR, 'test_raw_list.txt')
 TEMPEST_LIST = os.path.join(TEMPEST_RESULTS_DIR, 'test_list.txt')
 REFSTACK_RESULTS_DIR = os.path.join(CONST.__getattribute__('dir_results'),
@@ -243,6 +243,11 @@ def configure_tempest_defcore(deployment_dir, img_flavor_dict):
     logger.debug("Updating selected tempest.conf parameters for defcore...")
     config = ConfigParser.RawConfigParser()
     config.read(conf_file)
+    config.set('DEFAULT', 'log_file', '{}/tempest.log'.format(deployment_dir))
+    config.set('oslo_concurrency', 'lock_path',
+               '{}/lock_files'.format(deployment_dir))
+    config.set('scenario', 'img_dir', '{}'.format(deployment_dir))
+    config.set('scenario', 'img_file', 'tempest-image')
     config.set('compute', 'image_ref', img_flavor_dict.get("image_id"))
     config.set('compute', 'image_ref_alt',
                img_flavor_dict['image_id_alt'])
index ac4e372..df2c312 100644 (file)
@@ -1,4 +1,4 @@
 # This is an empty file to be filled up with the desired tempest test cases
 # Examples:
-#tempest.scenario.test_server_basic_ops.TestServerBasicOps.test_server_basic_ops
-#tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_network_basic_ops
\ No newline at end of file
+#tempest.scenario.test_server_basic_ops.TestServerBasicOps.test_server_basic_ops[compute,id-7fff3fb3-91d8-4fd0-bd7d-0204f1f180ba,network,smoke]
+#tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_network_basic_ops[compute,id-f323b3ba-82f8-4db7-8ea6-6a895869ec49,network,smoke]
index 9aed4c1..8088a4d 100644 (file)
@@ -94,7 +94,7 @@ class VPingUserdata(vping_base.VPingBase):
 
         while True:
             time.sleep(1)
-            p_console = vm_creator.get_os_vm_server_obj().get_console_output()
+            p_console = vm_creator.get_console_output()
             if "vPing OK" in p_console:
                 self.logger.info("vPing detected!")
                 exit_code = TestCase.EX_OK
index ede0fc5..5724012 100644 (file)
@@ -234,7 +234,7 @@ class ODLTests(testcase.TestCase):
             elif installer_type == 'joid':
                 kwargs['odlip'] = os.environ['SDN_CONTROLLER']
             elif installer_type == 'compass':
-                kwargs['odlwebport'] = '8181'
+                kwargs['odlrestconfport'] = '8080'
             elif installer_type == 'daisy':
                 kwargs['odlip'] = os.environ['SDN_CONTROLLER_IP']
                 kwargs['odlwebport'] = '8181'
index 8c8a6ce..8aeea41 100644 (file)
@@ -511,7 +511,7 @@ class ODLRunTesting(ODLTesting):
     def test_compass(self):
         os.environ["INSTALLER_TYPE"] = "compass"
         self._test_run(testcase.TestCase.EX_OK,
-                       odlip=self._neutron_ip, odlwebport='8181')
+                       odlip=self._neutron_ip, odlrestconfport='8080')
 
     def test_daisy_no_controller_ip(self):
         with mock.patch('functest.utils.openstack_utils.get_endpoint',
index 828fb3d..cabd18e 100644 (file)
@@ -390,8 +390,6 @@ class OSUtilsTesting(unittest.TestCase):
         self._test_source_credentials('export OS_TENANT_NAME =admin')
         self._test_source_credentials('export OS_TENANT_NAME = admin')
         self._test_source_credentials('export OS_TENANT_NAME = "admin"')
-        self._test_source_credentials('OS_TENANT_NAME', value='')
-        self._test_source_credentials('export OS_TENANT_NAME', value='')
         # This test will fail as soon as rc_file is fixed
         self._test_source_credentials(
             'export "\'OS_TENANT_NAME\'" = "\'admin\'"')
index 4f8d6c3..1bdfa25 100644 (file)
@@ -117,13 +117,15 @@ def get_credentials(other_creds={}):
 def source_credentials(rc_file):
     with open(rc_file, "r") as f:
         for line in f:
-            var = line.rstrip('"\n').replace('export ', '').split("=")
+            var = (line.rstrip('"\n').replace('export ', '').split("=")
+                   if re.search(r'(.*)=(.*)', line) else None)
             # The two next lines should be modified as soon as rc_file
             # conforms with common rules. Be aware that it could induce
             # issues if value starts with '
-            key = re.sub(r'^["\' ]*|[ \'"]*$', '', var[0])
-            value = re.sub(r'^["\' ]*|[ \'"]*$', '', "".join(var[1:]))
-            os.environ[key] = value
+            if var:
+                key = re.sub(r'^["\' ]*|[ \'"]*$', '', var[0])
+                value = re.sub(r'^["\' ]*|[ \'"]*$', '', "".join(var[1:]))
+                os.environ[key] = value
 
 
 def get_credentials_for_rally():
index e29259f..7630a17 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -7,7 +7,6 @@ home-page = https://wiki.opnfv.org/display/functest
 packages = functest
 scripts =
     docker/docker_remote_api/enable_remote_api.sh
-    docker/add_images.sh
     docker/config_install_env.sh
     functest/ci/download_images.sh