diff options
31 files changed, 271 insertions, 77 deletions
diff --git a/jjb/apex/apex-build.sh b/jjb/apex/apex-build.sh index ca1821abf..f6b2e3214 100755 --- a/jjb/apex/apex-build.sh +++ b/jjb/apex/apex-build.sh @@ -10,41 +10,36 @@ echo [[ -d $CACHE_DIRECTORY ]] || mkdir -p $CACHE_DIRECTORY # set OPNFV_ARTIFACT_VERSION if echo $BUILD_TAG | grep "apex-verify" 1> /dev/null; then - if echo $GERRIT_BRANCH | grep "brahmaputra" 1> /dev/null; then - export OPNFV_ARTIFACT_VERSION=brahmaputra-dev${BUILD_NUMBER} - export BUILD_ARGS="-v $OPNFV_ARTIFACT_VERSION -c file://$CACHE_DIRECTORY $BUILD_DIRECTORY" - else - export OPNFV_ARTIFACT_VERSION=dev${BUILD_NUMBER} - export BUILD_ARGS="-r $OPNFV_ARTIFACT_VERSION -c file://$CACHE_DIRECTORY" - fi + export OPNFV_ARTIFACT_VERSION=dev${BUILD_NUMBER} + export BUILD_ARGS="-r $OPNFV_ARTIFACT_VERSION -c $CACHE_DIRECTORY" elif [ "$ARTIFACT_VERSION" == "daily" ]; then - if echo $GERRIT_BRANCH | grep "brahmaputra" 1> /dev/null; then - export OPNFV_ARTIFACT_VERSION=brahmaputra-$(date -u +"%Y-%m-%d") - export BUILD_ARGS="-v $OPNFV_ARTIFACT_VERSION -c file://$CACHE_DIRECTORY $BUILD_DIRECTORY" - else - export OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d") - export BUILD_ARGS="-r $OPNFV_ARTIFACT_VERSION -c file://$CACHE_DIRECTORY --iso" - fi + export OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d") + export BUILD_ARGS="-r $OPNFV_ARTIFACT_VERSION -c $CACHE_DIRECTORY --iso" else export OPNFV_ARTIFACT_VERSION=${ARTIFACT_VERSION} - if echo $GERRIT_BRANCH | grep "brahmaputra" 1> /dev/null; then - export BUILD_ARGS="-v $OPNFV_ARTIFACT_VERSION -c file://$CACHE_DIRECTORY $BUILD_DIRECTORY" - else - export BUILD_ARGS="-r $OPNFV_ARTIFACT_VERSION -c file://$CACHE_DIRECTORY --iso" - fi -fi -# clean for stable but doesn't matter for master -if echo $GERRIT_BRANCH | grep "brahmaputra" 1> /dev/null; then - sudo opnfv-clean + export BUILD_ARGS="-r $OPNFV_ARTIFACT_VERSION -c $CACHE_DIRECTORY --iso" fi + # start the build cd $WORKSPACE/ci ./build.sh $BUILD_ARGS RPM_VERSION=$(grep Version: $BUILD_DIRECTORY/opnfv-apex.spec | awk '{ print $2 }')-$(echo $OPNFV_ARTIFACT_VERSION | tr -d '_-') # list the contents of BUILD_OUTPUT directory +echo "Build Directory is ${BUILD_DIRECTORY}" +echo "Build Directory Contents:" +echo "-------------------------" ls -al $BUILD_DIRECTORY -# save information regarding artifact into file -( + +# list the contents of CACHE directory +echo "Cache Directory is ${CACHE_DIRECTORY}" +echo "Cache Directory Contents:" +echo "-------------------------" +ls -al $CACHE_DIRECTORY + +if ! echo $BUILD_TAG | grep "apex-verify" 1> /dev/null; then + echo "Writing opnfv.properties file" + # save information regarding artifact into file + ( echo "OPNFV_ARTIFACT_VERSION=$OPNFV_ARTIFACT_VERSION" echo "OPNFV_GIT_URL=$(git config --get remote.origin.url)" echo "OPNFV_GIT_SHA1=$(git rev-parse HEAD)" @@ -54,6 +49,7 @@ ls -al $BUILD_DIRECTORY echo "OPNFV_RPM_URL=$GS_URL/opnfv-apex-$RPM_VERSION.noarch.rpm" echo "OPNFV_RPM_MD5SUM=$(md5sum $BUILD_DIRECTORY/noarch/opnfv-apex-$RPM_VERSION.noarch.rpm | cut -d' ' -f1)" echo "OPNFV_BUILD_URL=$BUILD_URL" -) > $WORKSPACE/opnfv.properties + ) > $WORKSPACE/opnfv.properties +fi echo "--------------------------------------------------------" echo "Done!" diff --git a/jjb/apex/apex-deploy.sh b/jjb/apex/apex-deploy.sh index 0d34f1a7a..47ec57289 100755 --- a/jjb/apex/apex-deploy.sh +++ b/jjb/apex/apex-deploy.sh @@ -84,6 +84,17 @@ if [[ "$BUILD_DIRECTORY" == *verify* ]]; then fi done + # Make sure jinja2 is installed + for python_pkg in jinja2; do + if ! python3.4 -c "import $python_pkg"; then + echo "$python_pkg package not found for python3.4, attempting to install..." + if ! sudo easy_install-3.4 $python_pkg; then + echo -e "Failed to install $python_pkg package for python3.4" + exit 1 + fi + fi + done + if [ -z ${PYTHONPATH:-} ]; then export PYTHONPATH=${WORKSPACE}/lib/python else diff --git a/jjb/cperf/cperf-ci-jobs.yml b/jjb/cperf/cperf-ci-jobs.yml index 884352419..f6a8acabb 100644 --- a/jjb/cperf/cperf-ci-jobs.yml +++ b/jjb/cperf/cperf-ci-jobs.yml @@ -118,8 +118,8 @@ docker pull opnfv/cperf:$DOCKER_TAG robot_cmd="pybot -e exclude -v ODL_SYSTEM_IP:${CONTROLLER_IP} -v switch_count:100 -v loops:10 \ -v TOOLS_SYSTEM_IP:localhost -v duration_in_seconds:60" - robot_suite="/home/opnfv/repos/test/csit/suites/openflowplugin/Performance/010_Cbench.robot" - sudo docker run opnfv/cperf:$DOCKER_TAG ${robot_cmd} ${robot_suite} + robot_suite="/home/opnfv/repos/odl_test/csit/suites/openflowplugin/Performance/010_Cbench.robot" + docker run opnfv/cperf:$DOCKER_TAG ${robot_cmd} ${robot_suite} - builder: name: cperf-cleanup diff --git a/utils/test/result_collection_api/opnfv_testapi/__init__.py b/utils/test/result_collection_api/opnfv_testapi/__init__.py index e69de29bb..363bc388e 100644 --- a/utils/test/result_collection_api/opnfv_testapi/__init__.py +++ b/utils/test/result_collection_api/opnfv_testapi/__init__.py @@ -0,0 +1,8 @@ +############################################################################## +# Copyright (c) 2016 ZTE Corporation +# feng.xiaowei@zte.com.cn +# 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 +############################################################################## diff --git a/utils/test/result_collection_api/opnfv_testapi/cmd/__init__.py b/utils/test/result_collection_api/opnfv_testapi/cmd/__init__.py index e69de29bb..363bc388e 100644 --- a/utils/test/result_collection_api/opnfv_testapi/cmd/__init__.py +++ b/utils/test/result_collection_api/opnfv_testapi/cmd/__init__.py @@ -0,0 +1,8 @@ +############################################################################## +# Copyright (c) 2016 ZTE Corporation +# feng.xiaowei@zte.com.cn +# 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 +############################################################################## diff --git a/utils/test/result_collection_api/opnfv_testapi/resources/dashboard_handlers.py b/utils/test/result_collection_api/opnfv_testapi/resources/dashboard_handlers.py index 82bf8d252..84e7bc1b0 100644 --- a/utils/test/result_collection_api/opnfv_testapi/resources/dashboard_handlers.py +++ b/utils/test/result_collection_api/opnfv_testapi/resources/dashboard_handlers.py @@ -1,3 +1,12 @@ +############################################################################## +# Copyright (c) 2015 Orange +# guyrodrigue.koffi@orange.com / koffirodrigue@gmail.com +# 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 tornado.web import HTTPError from opnfv_testapi.common.constants import HTTP_NOT_FOUND diff --git a/utils/test/result_collection_api/opnfv_testapi/resources/pod_handlers.py b/utils/test/result_collection_api/opnfv_testapi/resources/pod_handlers.py index d9e6686d8..df4112f1b 100644 --- a/utils/test/result_collection_api/opnfv_testapi/resources/pod_handlers.py +++ b/utils/test/result_collection_api/opnfv_testapi/resources/pod_handlers.py @@ -1,3 +1,11 @@ +############################################################################## +# Copyright (c) 2015 Orange +# guyrodrigue.koffi@orange.com / koffirodrigue@gmail.com +# 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 opnfv_testapi.tornado_swagger import swagger from handlers import GenericApiHandler from pod_models import Pod diff --git a/utils/test/result_collection_api/opnfv_testapi/resources/pod_models.py b/utils/test/result_collection_api/opnfv_testapi/resources/pod_models.py index 3e6f5a888..7231806f6 100644 --- a/utils/test/result_collection_api/opnfv_testapi/resources/pod_models.py +++ b/utils/test/result_collection_api/opnfv_testapi/resources/pod_models.py @@ -1,7 +1,13 @@ +############################################################################## +# Copyright (c) 2015 Orange +# guyrodrigue.koffi@orange.com / koffirodrigue@gmail.com +# 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 opnfv_testapi.tornado_swagger import swagger -__author__ = '__serena__' - # name: name of the POD e.g. zte-1 # mode: metal or virtual # details: any detail diff --git a/utils/test/result_collection_api/opnfv_testapi/resources/project_handlers.py b/utils/test/result_collection_api/opnfv_testapi/resources/project_handlers.py index 30fb40247..171ab7695 100644 --- a/utils/test/result_collection_api/opnfv_testapi/resources/project_handlers.py +++ b/utils/test/result_collection_api/opnfv_testapi/resources/project_handlers.py @@ -1,3 +1,11 @@ +############################################################################## +# Copyright (c) 2015 Orange +# guyrodrigue.koffi@orange.com / koffirodrigue@gmail.com +# 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 opnfv_testapi.tornado_swagger import swagger from handlers import GenericApiHandler from opnfv_testapi.common.constants import HTTP_FORBIDDEN diff --git a/utils/test/result_collection_api/opnfv_testapi/resources/project_models.py b/utils/test/result_collection_api/opnfv_testapi/resources/project_models.py index 1014254b8..f70630cda 100644 --- a/utils/test/result_collection_api/opnfv_testapi/resources/project_models.py +++ b/utils/test/result_collection_api/opnfv_testapi/resources/project_models.py @@ -1,7 +1,13 @@ +############################################################################## +# Copyright (c) 2015 Orange +# guyrodrigue.koffi@orange.com / koffirodrigue@gmail.com +# 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 opnfv_testapi.tornado_swagger import swagger -__author__ = '__serena__' - @swagger.model() class ProjectCreateRequest(object): diff --git a/utils/test/result_collection_api/opnfv_testapi/resources/result_handlers.py b/utils/test/result_collection_api/opnfv_testapi/resources/result_handlers.py index 9358c7103..473a38d06 100644 --- a/utils/test/result_collection_api/opnfv_testapi/resources/result_handlers.py +++ b/utils/test/result_collection_api/opnfv_testapi/resources/result_handlers.py @@ -1,3 +1,11 @@ +############################################################################## +# Copyright (c) 2015 Orange +# guyrodrigue.koffi@orange.com / koffirodrigue@gmail.com +# 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 datetime import datetime, timedelta from bson.objectid import ObjectId @@ -71,11 +79,11 @@ class ResultsCLHandler(GenericResultHandler): @param project: project name @type project: L{string} @in project: query - @required project: True + @required project: False @param case: case name @type case: L{string} @in case: query - @required case: True + @required case: False @param version: i.e. Colorado @type version: L{string} @in version: query diff --git a/utils/test/result_collection_api/opnfv_testapi/resources/result_models.py b/utils/test/result_collection_api/opnfv_testapi/resources/result_models.py index b3bb95bbf..fb6a80961 100644 --- a/utils/test/result_collection_api/opnfv_testapi/resources/result_models.py +++ b/utils/test/result_collection_api/opnfv_testapi/resources/result_models.py @@ -1,3 +1,11 @@ +############################################################################## +# Copyright (c) 2015 Orange +# guyrodrigue.koffi@orange.com / koffirodrigue@gmail.com +# 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 opnfv_testapi.tornado_swagger import swagger diff --git a/utils/test/result_collection_api/opnfv_testapi/resources/testcase_handlers.py b/utils/test/result_collection_api/opnfv_testapi/resources/testcase_handlers.py index 4b825f284..b4f9db96d 100644 --- a/utils/test/result_collection_api/opnfv_testapi/resources/testcase_handlers.py +++ b/utils/test/result_collection_api/opnfv_testapi/resources/testcase_handlers.py @@ -1,3 +1,11 @@ +############################################################################## +# Copyright (c) 2015 Orange +# guyrodrigue.koffi@orange.com / koffirodrigue@gmail.com +# 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 opnfv_testapi.common.constants import HTTP_FORBIDDEN from opnfv_testapi.resources.handlers import GenericApiHandler from opnfv_testapi.resources.testcase_models import Testcase diff --git a/utils/test/result_collection_api/opnfv_testapi/resources/testcase_models.py b/utils/test/result_collection_api/opnfv_testapi/resources/testcase_models.py index e3718a6f8..c9dce6088 100644 --- a/utils/test/result_collection_api/opnfv_testapi/resources/testcase_models.py +++ b/utils/test/result_collection_api/opnfv_testapi/resources/testcase_models.py @@ -1,7 +1,13 @@ +############################################################################## +# Copyright (c) 2015 Orange +# guyrodrigue.koffi@orange.com / koffirodrigue@gmail.com +# 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 opnfv_testapi.tornado_swagger import swagger -__author__ = '__serena__' - @swagger.model() class TestcaseCreateRequest(object): diff --git a/utils/test/result_collection_api/opnfv_testapi/router/__init__.py b/utils/test/result_collection_api/opnfv_testapi/router/__init__.py index 3ed9fd0f3..3fc79f1d5 100644 --- a/utils/test/result_collection_api/opnfv_testapi/router/__init__.py +++ b/utils/test/result_collection_api/opnfv_testapi/router/__init__.py @@ -1 +1,9 @@ -__author__ = 'root' +############################################################################## +# Copyright (c) 2016 ZTE Corporation +# feng.xiaowei@zte.com.cn +# 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 +############################################################################## +__author__ = 'serena' diff --git a/utils/test/result_collection_api/opnfv_testapi/router/url_mappings.py b/utils/test/result_collection_api/opnfv_testapi/router/url_mappings.py index c299ada41..874754b91 100644 --- a/utils/test/result_collection_api/opnfv_testapi/router/url_mappings.py +++ b/utils/test/result_collection_api/opnfv_testapi/router/url_mappings.py @@ -1,3 +1,11 @@ +############################################################################## +# Copyright (c) 2015 Orange +# guyrodrigue.koffi@orange.com / koffirodrigue@gmail.com +# 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 opnfv_testapi.resources.handlers import VersionHandler from opnfv_testapi.resources.testcase_handlers import TestcaseCLHandler, \ TestcaseGURHandler diff --git a/utils/test/result_collection_api/opnfv_testapi/tests/unit/__init__.py b/utils/test/result_collection_api/opnfv_testapi/tests/unit/__init__.py index 3ed9fd0f3..3fc79f1d5 100644 --- a/utils/test/result_collection_api/opnfv_testapi/tests/unit/__init__.py +++ b/utils/test/result_collection_api/opnfv_testapi/tests/unit/__init__.py @@ -1 +1,9 @@ -__author__ = 'root' +############################################################################## +# Copyright (c) 2016 ZTE Corporation +# feng.xiaowei@zte.com.cn +# 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 +############################################################################## +__author__ = 'serena' diff --git a/utils/test/result_collection_api/opnfv_testapi/tests/unit/fake_pymongo.py b/utils/test/result_collection_api/opnfv_testapi/tests/unit/fake_pymongo.py index bebb9e8b3..e55696890 100644 --- a/utils/test/result_collection_api/opnfv_testapi/tests/unit/fake_pymongo.py +++ b/utils/test/result_collection_api/opnfv_testapi/tests/unit/fake_pymongo.py @@ -1,10 +1,15 @@ +############################################################################## +# Copyright (c) 2016 ZTE Corporation +# feng.xiaowei@zte.com.cn +# 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 bson.objectid import ObjectId from concurrent.futures import ThreadPoolExecutor -__author__ = 'serena' - - def thread_execute(method, *args, **kwargs): with ThreadPoolExecutor(max_workers=2) as executor: result = executor.submit(method, *args, **kwargs) diff --git a/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_base.py b/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_base.py index 01c43f0f7..ff1a1932c 100644 --- a/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_base.py +++ b/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_base.py @@ -1,3 +1,11 @@ +############################################################################## +# Copyright (c) 2016 ZTE Corporation +# feng.xiaowei@zte.com.cn +# 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 +############################################################################## import json from tornado.web import Application diff --git a/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_dashboard.py b/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_dashboard.py index 16a3140d8..8f729c0d0 100644 --- a/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_dashboard.py +++ b/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_dashboard.py @@ -1,10 +1,16 @@ +############################################################################## +# Copyright (c) 2016 ZTE Corporation +# feng.xiaowei@zte.com.cn +# 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 +############################################################################## import unittest from test_result import TestResultBase from opnfv_testapi.common.constants import HTTP_NOT_FOUND, HTTP_OK -__author__ = '__serena__' - class TestDashboardBase(TestResultBase): def setUp(self): diff --git a/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_fake_pymongo.py b/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_fake_pymongo.py index 6920fcad8..9bc311cf3 100644 --- a/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_fake_pymongo.py +++ b/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_fake_pymongo.py @@ -1,4 +1,13 @@ +############################################################################## +# Copyright (c) 2016 ZTE Corporation +# feng.xiaowei@zte.com.cn +# 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 +############################################################################## import unittest + from tornado.web import Application from tornado import gen from tornado.testing import AsyncHTTPTestCase, gen_test diff --git a/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_pod.py b/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_pod.py index 2f5d84d8d..a1184d554 100644 --- a/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_pod.py +++ b/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_pod.py @@ -1,3 +1,11 @@ +############################################################################## +# Copyright (c) 2016 ZTE Corporation +# feng.xiaowei@zte.com.cn +# 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 +############################################################################## import unittest from test_base import TestBase diff --git a/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_project.py b/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_project.py index 1b4af916c..d47306093 100644 --- a/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_project.py +++ b/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_project.py @@ -1,3 +1,11 @@ +############################################################################## +# Copyright (c) 2016 ZTE Corporation +# feng.xiaowei@zte.com.cn +# 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 +############################################################################## import unittest from test_base import TestBase diff --git a/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_result.py b/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_result.py index 50a0b966e..fc1e9bacd 100644 --- a/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_result.py +++ b/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_result.py @@ -1,3 +1,11 @@ +############################################################################## +# Copyright (c) 2016 ZTE Corporation +# feng.xiaowei@zte.com.cn +# 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 +############################################################################## import unittest import copy @@ -10,8 +18,6 @@ from opnfv_testapi.resources.result_models import ResultCreateRequest, \ from opnfv_testapi.common.constants import HTTP_OK, HTTP_BAD_REQUEST, \ HTTP_NOT_FOUND -__author__ = '__serena__' - class Details(object): def __init__(self, timestart=None, duration=None, status=None): diff --git a/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_testcase.py b/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_testcase.py index dc2082100..a145c00da 100644 --- a/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_testcase.py +++ b/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_testcase.py @@ -1,3 +1,11 @@ +############################################################################## +# Copyright (c) 2016 ZTE Corporation +# feng.xiaowei@zte.com.cn +# 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 +############################################################################## import unittest from test_base import TestBase @@ -8,9 +16,6 @@ from opnfv_testapi.common.constants import HTTP_OK, HTTP_BAD_REQUEST, \ HTTP_FORBIDDEN, HTTP_NOT_FOUND -__author__ = '__serena__' - - class TestCaseBase(TestBase): def setUp(self): super(TestCaseBase, self).setUp() diff --git a/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_version.py b/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_version.py index 13574c70c..b6fbf45dc 100644 --- a/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_version.py +++ b/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_version.py @@ -1,10 +1,16 @@ +############################################################################## +# Copyright (c) 2016 ZTE Corporation +# feng.xiaowei@zte.com.cn +# 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 +############################################################################## import unittest from test_base import TestBase from opnfv_testapi.resources.models import Versions -__author__ = 'serena' - class TestVersionBase(TestBase): def setUp(self): diff --git a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/__init__.py b/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/__init__.py index 031a4a20e..363bc388e 100644 --- a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/__init__.py +++ b/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/__init__.py @@ -1,4 +1,8 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- - -__author__ = 'serena' +############################################################################## +# Copyright (c) 2016 ZTE Corporation +# feng.xiaowei@zte.com.cn +# 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 +############################################################################## diff --git a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/handlers.py b/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/handlers.py index 8bcb9668f..2154b4697 100644 --- a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/handlers.py +++ b/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/handlers.py @@ -1,13 +1,17 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- +############################################################################## +# Copyright (c) 2016 ZTE Corporation +# feng.xiaowei@zte.com.cn +# 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 tornado.web import URLSpec, StaticFileHandler from settings import default_settings, \ SWAGGER_API_DOCS, SWAGGER_API_LIST, SWAGGER_API_SPEC from views import SwaggerUIHandler, SwaggerResourcesHandler, SwaggerApiHandler -__author__ = 'serena' - def swagger_handlers(): prefix = default_settings.get('swagger_prefix', '/swagger') diff --git a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/settings.py b/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/settings.py index 8f43c4a96..001d55820 100644 --- a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/settings.py +++ b/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/settings.py @@ -1,15 +1,17 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- +############################################################################## +# Copyright (c) 2016 ZTE Corporation +# feng.xiaowei@zte.com.cn +# 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 +############################################################################## import os.path -__author__ = 'serena' - SWAGGER_VERSION = '1.2' - SWAGGER_API_DOCS = 'swagger-api-docs' SWAGGER_API_LIST = 'swagger-api-list' SWAGGER_API_SPEC = 'swagger-api-spec' - STATIC_PATH = os.path.join(os.path.dirname(os.path.normpath(__file__)), 'static') diff --git a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/swagger.py b/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/swagger.py index b290e058d..3d21edefb 100644 --- a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/swagger.py +++ b/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/swagger.py @@ -1,16 +1,21 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- - +############################################################################## +# Copyright (c) 2016 ZTE Corporation +# feng.xiaowei@zte.com.cn +# 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 +############################################################################## import inspect from functools import wraps -import epydoc.markup from HTMLParser import HTMLParser + +import epydoc.markup import tornado.web + from settings import default_settings, models from handlers import swagger_handlers -__author__ = 'serena' - class EpytextParser(HTMLParser): a_text = False diff --git a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/views.py b/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/views.py index 7624023e8..7190c671b 100644 --- a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/views.py +++ b/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/views.py @@ -1,16 +1,20 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- +############################################################################## +# Copyright (c) 2016 ZTE Corporation +# feng.xiaowei@zte.com.cn +# 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 +############################################################################## import urlparse import json import inspect + import tornado.web import tornado.template -from settings import SWAGGER_VERSION, \ - SWAGGER_API_LIST, \ - SWAGGER_API_SPEC -from settings import models -__author__ = 'serena' +from settings import SWAGGER_VERSION, SWAGGER_API_LIST, SWAGGER_API_SPEC +from settings import models def json_dumps(obj, pretty=False): |