diff options
-rw-r--r-- | api/swagger/docs/release_action.yaml | 108 | ||||
-rw-r--r-- | api/swagger/docs/results.yaml | 8 | ||||
-rw-r--r-- | api/swagger/docs/testsuites_action.yaml | 8 | ||||
-rw-r--r-- | docker/Dockerfile | 3 | ||||
-rw-r--r-- | samples/storperf.yaml | 2 | ||||
-rwxr-xr-x | tests/ci/clean_images.sh | 1 | ||||
-rwxr-xr-x | tests/ci/load_images.sh | 55 | ||||
-rwxr-xr-x | tests/ci/prepare_storperf_admin-rc.sh | 12 |
8 files changed, 96 insertions, 101 deletions
diff --git a/api/swagger/docs/release_action.yaml b/api/swagger/docs/release_action.yaml index 0e08e582f..0a6968bc5 100644 --- a/api/swagger/docs/release_action.yaml +++ b/api/swagger/docs/release_action.yaml @@ -1,58 +1,50 @@ -############################################################################## -# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others. -# -# 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 -############################################################################## -TestCases Actions
-
-This API may offer many actions, including runTestCase
-
-action: runTestCase
-This api offer the interface to run a test case in yardstick
-we will return a task_id for querying
-you can use the returned task_id to get the result data
----
-tags:
- - Release Action
-parameters:
- - in: body
- name: body
- description: this is the input json dict
- schema:
- id: TestCaseActionModel
- required:
- - action
- - args
- properties:
- action:
- type: string
- description: this is action for testcases
- default: runTestCase
- args:
- schema:
- id: TestCaseActionArgsModel
- required:
- - testcase
- properties:
- testcase:
- type: string
- description: this is the test case name
- default: tc002
- opts:
- schema:
- id: TestCaseActionArgsOptsModel
-responses:
- 200:
- description: A result json dict
- schema:
- id: result
- properties:
- status:
- type: string
- default: success
- result:
- type: string
- description: task_id of this task
+TestCases Actions + +This API may offer many actions, including runTestCase + +action: runTestCase +This api offer the interface to run a test case in yardstick +we will return a task_id for querying +you can use the returned task_id to get the result data +--- +tags: + - Release Action +parameters: + - in: body + name: body + description: this is the input json dict + schema: + id: TestCaseActionModel + required: + - action + - args + properties: + action: + type: string + description: this is action for testcases + default: runTestCase + args: + schema: + id: TestCaseActionArgsModel + required: + - testcase + properties: + testcase: + type: string + description: this is the test case name + default: tc002 + opts: + schema: + id: TestCaseActionArgsOptsModel +responses: + 200: + description: A result json dict + schema: + id: result + properties: + status: + type: string + default: success + result: + type: string + description: task_id of this task diff --git a/api/swagger/docs/results.yaml b/api/swagger/docs/results.yaml index 00b159003..7bdab3eb6 100644 --- a/api/swagger/docs/results.yaml +++ b/api/swagger/docs/results.yaml @@ -1,11 +1,3 @@ -############################################################################## -# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others. -# -# 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 -############################################################################## Query task result data This api offer the interface to get the result data via task_id diff --git a/api/swagger/docs/testsuites_action.yaml b/api/swagger/docs/testsuites_action.yaml index ca8d22738..ebf01e4ec 100644 --- a/api/swagger/docs/testsuites_action.yaml +++ b/api/swagger/docs/testsuites_action.yaml @@ -1,11 +1,3 @@ -############################################################################## -# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others. -# -# 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 -############################################################################## TestSuites Actions This API may offer many actions, including runTestSuite diff --git a/docker/Dockerfile b/docker/Dockerfile index 248a6ab05..551693554 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -16,6 +16,9 @@ ARG BRANCH=master # GIT repo directory ENV REPOS_DIR /home/opnfv/repos +# Set work directory +WORKDIR /home/opnfv/repos + # Yardstick repo ENV YARDSTICK_REPO_DIR ${REPOS_DIR}/yardstick ENV RELENG_REPO_DIR ${REPOS_DIR}/releng diff --git a/samples/storperf.yaml b/samples/storperf.yaml index 5848512ed..d8641fc0c 100644 --- a/samples/storperf.yaml +++ b/samples/storperf.yaml @@ -17,7 +17,7 @@ scenarios: type: StorPerf options: agent_count: 1 - agent_image: "Ubuntu 14.04" + agent_image: "Ubuntu-14.04" public_network: "ext-net" volume_size: 2 # target: diff --git a/tests/ci/clean_images.sh b/tests/ci/clean_images.sh index fcb2bf21f..9e5e61edf 100755 --- a/tests/ci/clean_images.sh +++ b/tests/ci/clean_images.sh @@ -26,6 +26,7 @@ cleanup() done openstack flavor delete yardstick-flavor &> /dev/null || true + openstack flavor delete storperf &> /dev/null || true } main() diff --git a/tests/ci/load_images.sh b/tests/ci/load_images.sh index 16395cb0a..ec3ec4604 100755 --- a/tests/ci/load_images.sh +++ b/tests/ci/load_images.sh @@ -152,32 +152,36 @@ load_yardstick_image() load_cirros_image() { - echo - echo "========== Loading cirros cloud image ==========" + if [[ -n $(openstack image list | grep -e Cirros-0.3.5) ]]; then + echo "Cirros-0.3.5 image already exist, skip loading cirros image" + else + echo + echo "========== Loading cirros cloud image ==========" - local image_file=/home/opnfv/images/cirros-0.3.5-x86_64-disk.img + local image_file=/home/opnfv/images/cirros-0.3.5-x86_64-disk.img - EXTRA_PARAMS="" - # VPP requires guest memory to be backed by large pages - if [[ "$DEPLOY_SCENARIO" == *"-fdio-"* ]]; then - EXTRA_PARAMS=$EXTRA_PARAMS" --property hw_mem_page_size=large" - fi + EXTRA_PARAMS="" + # VPP requires guest memory to be backed by large pages + if [[ "$DEPLOY_SCENARIO" == *"-fdio-"* ]]; then + EXTRA_PARAMS=$EXTRA_PARAMS" --property hw_mem_page_size=large" + fi - output=$(openstack image create \ - --disk-format qcow2 \ - --container-format bare \ - ${EXTRA_PARAMS} \ - --file ${image_file} \ - cirros-0.3.5) - echo "$output" + output=$(openstack image create \ + --disk-format qcow2 \ + --container-format bare \ + ${EXTRA_PARAMS} \ + --file ${image_file} \ + cirros-0.3.5) + echo "$output" - CIRROS_IMAGE_ID=$(echo "$output" | grep " id " | awk '{print $(NF-1)}') - if [ -z "$CIRROS_IMAGE_ID" ]; then - echo 'Failed uploading cirros image to cloud'. - exit 1 - fi + CIRROS_IMAGE_ID=$(echo "$output" | grep " id " | awk '{print $(NF-1)}') + if [ -z "$CIRROS_IMAGE_ID" ]; then + echo 'Failed uploading cirros image to cloud'. + exit 1 + fi - echo "Cirros image id: $CIRROS_IMAGE_ID" + echo "Cirros image id: $CIRROS_IMAGE_ID" + fi } load_ubuntu_image() @@ -215,7 +219,7 @@ create_nova_flavor() { if ! openstack flavor list | grep -q yardstick-flavor; then echo - echo "========== Create nova flavor ==========" + echo "========== Creating yardstick-flavor ==========" # Create the nova flavor used by some sample test cases openstack flavor create --id 100 --ram 512 --disk 3 --vcpus 1 yardstick-flavor # DPDK-enabled OVS requires guest memory to be backed by large pages @@ -227,6 +231,13 @@ create_nova_flavor() openstack flavor set --property hw:mem_page_size=large yardstick-flavor fi fi + + if ! openstack flavor list | grep -q storperf; then + echo + echo "========== Creating storperf flavor ==========" + # Create the nova flavor used by storperf test case + openstack flavor create --id auto --ram 8192 --disk 4 --vcpus 2 storperf + fi } main() diff --git a/tests/ci/prepare_storperf_admin-rc.sh b/tests/ci/prepare_storperf_admin-rc.sh index b3dc2e58e..a6cf97bef 100755 --- a/tests/ci/prepare_storperf_admin-rc.sh +++ b/tests/ci/prepare_storperf_admin-rc.sh @@ -14,10 +14,13 @@ AUTH_URL=${OS_AUTH_URL} USERNAME=${OS_USERNAME:-admin} PASSWORD=${OS_PASSWORD:-console} + TENANT_NAME=${OS_TENANT_NAME:-admin} -VOLUME_API_VERSION=${OS_VOLUME_API_VERSION:-2} -PROJECT_NAME=${OS_PROJECT_NAME:-$TENANT_NAME} TENANT_ID=`openstack project show admin|grep '\bid\b' |awk -F '|' '{print $3}'|sed -e 's/^[[:space:]]*//'` +PROJECT_NAME=${OS_PROJECT_NAME:-$TENANT_NAME} +PROJECT_ID=`openstack project show admin|grep '\bid\b' |awk -F '|' '{print $3}'|sed -e 's/^[[:space:]]*//'` + +USER_DOMAIN_ID=${OS_USER_DOMAIN_ID:-default} rm -f ~/storperf_admin-rc touch ~/storperf_admin-rc @@ -25,7 +28,8 @@ touch ~/storperf_admin-rc echo "OS_AUTH_URL="$AUTH_URL >> ~/storperf_admin-rc echo "OS_USERNAME="$USERNAME >> ~/storperf_admin-rc echo "OS_PASSWORD="$PASSWORD >> ~/storperf_admin-rc -echo "OS_TENANT_NAME="$TENANT_NAME >> ~/storperf_admin-rc -echo "OS_VOLUME_API_VERSION="$VOLUME_API_VERSION >> ~/storperf_admin-rc echo "OS_PROJECT_NAME="$PROJECT_NAME >> ~/storperf_admin-rc +echo "OS_PROJECT_ID="$PROJECT_ID >> ~/storperf_admin-rc +echo "OS_TENANT_NAME="$TENANT_NAME >> ~/storperf_admin-rc echo "OS_TENANT_ID="$TENANT_ID >> ~/storperf_admin-rc +echo "OS_USER_DOMAIN_ID="$USER_DOMAIN_ID >> ~/storperf_admin-rc |