diff options
-rw-r--r-- | docker/Dockerfile | 2 | ||||
-rw-r--r-- | docs/testing/user/userguide/04-installation.rst | 6 | ||||
-rwxr-xr-x | install.sh | 2 | ||||
-rw-r--r-- | samples/storperf.yaml | 2 | ||||
-rwxr-xr-x | tests/ci/clean_images.sh | 2 | ||||
-rwxr-xr-x | tests/ci/load_images.sh | 6 | ||||
-rwxr-xr-x | tests/ci/yardstick-verify | 15 | ||||
-rw-r--r-- | tests/opnfv/test_cases/opnfv_yardstick_tc074.yaml | 2 | ||||
-rw-r--r-- | tests/unit/benchmark/scenarios/storage/test_storperf.py | 4 | ||||
-rw-r--r-- | yardstick/benchmark/scenarios/storage/storperf.py | 7 |
10 files changed, 16 insertions, 32 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile index 3be28e4b2..52a15df1b 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -38,7 +38,7 @@ RUN echo "daemon off;" >> /etc/nginx/nginx.conf EXPOSE 5000 ADD http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img ${IMAGE_DIR} -ADD http://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img ${IMAGE_DIR} +ADD http://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img ${IMAGE_DIR} COPY ./exec_tests.sh /usr/local/bin/ diff --git a/docs/testing/user/userguide/04-installation.rst b/docs/testing/user/userguide/04-installation.rst index 7ea40eddd..c1325cab5 100644 --- a/docs/testing/user/userguide/04-installation.rst +++ b/docs/testing/user/userguide/04-installation.rst @@ -212,9 +212,9 @@ The created image can be added to OpenStack using the ``glance image-create`` or --file /tmp/workspace/yardstick/yardstick-image.img .. _`Cirros 0.3.5`: http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img -.. _`Ubuntu 14.04`: https://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img +.. _`Ubuntu 16.04`: https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img -Some Yardstick test cases use a `Cirros 0.3.5`_ image and/or a `Ubuntu 14.04`_ image. Add Cirros and Ubuntu images to OpenStack:: +Some Yardstick test cases use a `Cirros 0.3.5`_ image and/or a `Ubuntu 16.04`_ image. Add Cirros and Ubuntu images to OpenStack:: openstack image create \ --disk-format qcow2 \ @@ -226,7 +226,7 @@ Some Yardstick test cases use a `Cirros 0.3.5`_ image and/or a `Ubuntu 14.04`_ i --disk-format qcow2 \ --container-format bare \ --file $ubuntu_image_file \ - Ubuntu-14.04 + Ubuntu-16.04 The third way diff --git a/install.sh b/install.sh index 75618dd27..25a4f5960 100755 --- a/install.sh +++ b/install.sh @@ -59,7 +59,7 @@ git config --global http.sslVerify false # install yardstick + dependencies easy_install -U pip pip install -r requirements.txt -pip install . +pip install -e . /bin/bash "$(pwd)/api/api-prepare.sh" diff --git a/samples/storperf.yaml b/samples/storperf.yaml index d8641fc0c..5000759e0 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-16.04" public_network: "ext-net" volume_size: 2 # target: diff --git a/tests/ci/clean_images.sh b/tests/ci/clean_images.sh index 9e5e61edf..27da9e279 100755 --- a/tests/ci/clean_images.sh +++ b/tests/ci/clean_images.sh @@ -19,7 +19,7 @@ cleanup() return fi - for image in $(openstack image list | grep -e cirros-0.3.5 -e yardstick-image -e Ubuntu-14.04 \ + for image in $(openstack image list | grep -e cirros-0.3.5 -e yardstick-image -e Ubuntu-16.04 \ | awk '{print $2}'); do echo "Deleting image $image..." openstack image delete $image || true diff --git a/tests/ci/load_images.sh b/tests/ci/load_images.sh index 87599100b..2e22b83c2 100755 --- a/tests/ci/load_images.sh +++ b/tests/ci/load_images.sh @@ -193,7 +193,7 @@ load_ubuntu_image() echo echo "========== Loading ubuntu cloud image ==========" - local ubuntu_image_file=/home/opnfv/images/trusty-server-cloudimg-amd64-disk1.img + local ubuntu_image_file=/home/opnfv/images/xenial-server-cloudimg-amd64-disk1.img EXTRA_PARAMS="" # VPP requires guest memory to be backed by large pages @@ -206,7 +206,7 @@ load_ubuntu_image() --container-format bare \ $EXTRA_PARAMS \ --file $ubuntu_image_file \ - Ubuntu-14.04) + Ubuntu-16.04) echo "$output" UBUNTU_IMAGE_ID=$(echo "$output" | grep " id " | awk '{print $(NF-1)}') @@ -265,8 +265,6 @@ main() for filename in tests/opnfv/test_cases/*; do sed -i "s/cidr: '10.0.1.0\/24'/cidr: '10.3.1.0\/24'/g" "${filename}" done - # Update file changes - pip install -U . else load_cirros_image load_ubuntu_image diff --git a/tests/ci/yardstick-verify b/tests/ci/yardstick-verify index 2986c9f2f..096ea534f 100755 --- a/tests/ci/yardstick-verify +++ b/tests/ci/yardstick-verify @@ -97,18 +97,6 @@ error_exit() set -o errexit set -o pipefail -install_yardstick() -{ - echo - echo "========== Installing yardstick ==========" - - # uninstall previous version - pip uninstall -y yardstick || true - - # Install yardstick - pip install . -} - install_storperf() { # Install Storper on huawei-pod1 @@ -320,9 +308,6 @@ main() echo " external network: $net" done - # install yardstick - install_yardstick - source $YARDSTICK_REPO_DIR/tests/ci/clean_images.sh trap "error_exit" EXIT SIGTERM diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc074.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc074.yaml index 14604f844..326fdf53b 100644 --- a/tests/opnfv/test_cases/opnfv_yardstick_tc074.yaml +++ b/tests/opnfv/test_cases/opnfv_yardstick_tc074.yaml @@ -20,7 +20,7 @@ scenarios: type: StorPerf options: agent_count: 1 - agent_image: "Ubuntu-14.04" + agent_image: "Ubuntu-16.04" public_network: {{public_network}} volume_size: 4 block_sizes: "4096" diff --git a/tests/unit/benchmark/scenarios/storage/test_storperf.py b/tests/unit/benchmark/scenarios/storage/test_storperf.py index adc9d47c6..00054d531 100644 --- a/tests/unit/benchmark/scenarios/storage/test_storperf.py +++ b/tests/unit/benchmark/scenarios/storage/test_storperf.py @@ -55,7 +55,7 @@ def mocked_requests_job_get(*args, **kwargs): self.status_code = status_code return MockResponseJobGet( - '{"status": "completed",\ + '{"Status": "Completed",\ "_ssd_preconditioning.queue-depth.8.block-size.16384.duration": 6}', 200) @@ -171,7 +171,7 @@ class StorPerfTestCase(unittest.TestCase): s = storperf.StorPerf(args, self.ctx) s.setup_done = True - sample_output = '{"status": "completed",\ + sample_output = '{"Status": "Completed",\ "_ssd_preconditioning.queue-depth.8.block-size.16384.duration": 6}' expected_result = jsonutils.loads(sample_output) diff --git a/yardstick/benchmark/scenarios/storage/storperf.py b/yardstick/benchmark/scenarios/storage/storperf.py index 6ea035133..672cfaba2 100644 --- a/yardstick/benchmark/scenarios/storage/storperf.py +++ b/yardstick/benchmark/scenarios/storage/storperf.py @@ -117,7 +117,8 @@ class StorPerf(base.Scenario): """Query the status of the supplied job_id and report on metrics""" LOG.info("Fetching report for %s...", job_id) report_res = requests.get('http://{}:5000/api/v1.0/jobs'.format - (self.target), params={'id': job_id}) + (self.target), + params={'id': job_id, 'type': 'status'}) report_res_content = jsonutils.loads( report_res.content) @@ -126,10 +127,10 @@ class StorPerf(base.Scenario): raise RuntimeError("Failed to fetch report, error message:", report_res_content["message"]) else: - job_status = report_res_content["status"] + job_status = report_res_content["Status"] LOG.debug("Job is: %s...", job_status) - self.job_completed = job_status == "completed" + self.job_completed = job_status == "Completed" # TODO: Support using StorPerf ReST API to read Job ETA. |