summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdocs/userguide/03-architecture.rst (renamed from docs/userguide/architecture.rst)0
-rw-r--r--docs/userguide/05-apexlake_installation.rst (renamed from docs/userguide/apexlake_installation.rst)0
-rw-r--r--docs/userguide/06-apexlake_api.rst (renamed from docs/userguide/apexlake_api.rst)0
-rw-r--r--docs/userguide/07-installation.rst (renamed from docs/userguide/03-installation.rst)68
-rw-r--r--docs/userguide/08-yardstick_plugin.rst144
-rw-r--r--docs/userguide/09-result-store-InfluxDB.rst86
-rw-r--r--docs/userguide/10-list-of-tcs.rst (renamed from docs/userguide/03-list-of-tcs.rst)1
-rw-r--r--docs/userguide/images/Grafana_config.pngbin0 -> 143507 bytes
-rw-r--r--docs/userguide/images/InfluxDB_store.pngbin0 -> 1623955 bytes
-rw-r--r--docs/userguide/images/results_visualization.pngbin0 -> 41905 bytes
-rw-r--r--docs/userguide/index.rst12
-rw-r--r--docs/userguide/opnfv_yardstick_tc075.rst60
-rw-r--r--plugin/CI/storperf.yaml2
-rwxr-xr-xsetup.py1
-rw-r--r--tests/ci/docker/yardstick-ci/Dockerfile1
-rwxr-xr-xtests/ci/prepare_env.sh5
-rw-r--r--tests/ci/scp_storperf_admin-rc.sh5
-rwxr-xr-xtests/ci/yardstick-verify30
-rw-r--r--tests/opnfv/test_cases/opnfv_yardstick_tc002.yaml2
-rw-r--r--tests/opnfv/test_cases/opnfv_yardstick_tc074.yaml2
-rw-r--r--tests/opnfv/test_cases/opnfv_yardstick_tc075.yaml23
-rw-r--r--tests/opnfv/test_suites/opnfv_ericsson-pod1_daily.yaml22
-rw-r--r--tests/opnfv/test_suites/opnfv_ericsson-pod2_daily.yaml22
-rw-r--r--tests/opnfv/test_suites/opnfv_ericsson-virtual1_daily.yaml22
-rw-r--r--tests/opnfv/test_suites/opnfv_huawei-pod1_daily.yaml26
-rw-r--r--tests/opnfv/test_suites/opnfv_huawei-pod1_weekly.yaml28
-rw-r--r--tests/opnfv/test_suites/opnfv_huawei-pod2_daily.yaml22
-rw-r--r--tests/opnfv/test_suites/opnfv_huawei-pod3_daily.yaml22
-rw-r--r--tests/opnfv/test_suites/opnfv_huawei-pod4_daily.yaml22
-rw-r--r--tests/opnfv/test_suites/opnfv_huawei-virtual1_daily.yaml22
-rw-r--r--tests/opnfv/test_suites/opnfv_huawei-virtual2_daily.yaml22
-rw-r--r--tests/opnfv/test_suites/opnfv_huawei-virtual3_daily.yaml22
-rw-r--r--tests/opnfv/test_suites/opnfv_huawei-virtual4_daily.yaml22
-rw-r--r--tests/opnfv/test_suites/opnfv_intel-pod2_daily.yaml22
-rw-r--r--tests/opnfv/test_suites/opnfv_intel-pod5_daily.yaml22
-rw-r--r--tests/opnfv/test_suites/opnfv_intel-pod6_daily.yaml22
-rw-r--r--tests/opnfv/test_suites/opnfv_intel-pod8_daily.yaml22
-rw-r--r--tests/opnfv/test_suites/opnfv_lf-pod1_daily.yaml22
-rw-r--r--tests/opnfv/test_suites/opnfv_lf-pod2_daily.yaml22
-rw-r--r--tests/opnfv/test_suites/opnfv_orange-pod2_daily.yaml18
-rw-r--r--tests/opnfv/test_suites/opnfv_os-nosdn-kvm-ha_daily.yaml8
-rw-r--r--tests/opnfv/test_suites/opnfv_os-nosdn-kvm_ovs-ha_daily.yaml8
-rw-r--r--tests/opnfv/test_suites/opnfv_os-nosdn-lxd-ha_daily.yaml8
-rw-r--r--tests/opnfv/test_suites/opnfv_os-nosdn-lxd-noha_daily.yaml8
-rw-r--r--tests/opnfv/test_suites/opnfv_os-nosdn-nofeature-ha_daily.yaml11
-rw-r--r--tests/opnfv/test_suites/opnfv_os-nosdn-nofeature-noha_daily.yaml8
-rw-r--r--tests/opnfv/test_suites/opnfv_os-nosdn-ovs-ha_daily.yaml8
-rw-r--r--tests/opnfv/test_suites/opnfv_os-ocl-nofeature-ha_daily.yaml8
-rw-r--r--tests/opnfv/test_suites/opnfv_os-ocl-nofeature-noha_daily.yaml8
-rw-r--r--tests/opnfv/test_suites/opnfv_os-odl_l2-bgpvpn-ha_daily.yaml8
-rw-r--r--tests/opnfv/test_suites/opnfv_os-odl_l2-moon-ha_daily.yaml54
-rw-r--r--tests/opnfv/test_suites/opnfv_os-odl_l2-nofeature-ha_daily.yaml8
-rw-r--r--tests/opnfv/test_suites/opnfv_os-odl_l2-nofeature-noha_daily.yaml8
-rw-r--r--tests/opnfv/test_suites/opnfv_os-odl_l2-sfc-ha_daily.yaml8
-rw-r--r--tests/opnfv/test_suites/opnfv_os-odl_l2-sfc-noha_daily.yaml8
-rw-r--r--tests/opnfv/test_suites/opnfv_os-odl_l3-nofeature-ha_daily.yaml8
-rw-r--r--tests/opnfv/test_suites/opnfv_os-onos-nofeature-ha_daily.yaml8
-rw-r--r--tests/opnfv/test_suites/opnfv_os-onos-nofeature-noha_daily.yaml8
-rw-r--r--tests/opnfv/test_suites/opnfv_os-onos-sfc-ha_daily.yaml8
-rw-r--r--tests/opnfv/test_suites/opnfv_zte-pod1_daily.yaml22
-rw-r--r--tests/unit/benchmark/scenarios/networking/test_pktgen_dpdk.py173
-rw-r--r--tests/unit/test_ssh.py13
-rwxr-xr-xyardstick/benchmark/scenarios/availability/serviceha.py4
-rw-r--r--yardstick/benchmark/scenarios/networking/pktgen_dpdk.py162
-rw-r--r--yardstick/benchmark/scenarios/networking/pktgen_dpdk_latency_benchmark.bash147
-rw-r--r--yardstick/benchmark/scenarios/networking/testpmd_fwd.bash55
-rw-r--r--yardstick/ssh.py9
67 files changed, 1190 insertions, 462 deletions
diff --git a/docs/userguide/architecture.rst b/docs/userguide/03-architecture.rst
index 3abb67b7d..3abb67b7d 100755
--- a/docs/userguide/architecture.rst
+++ b/docs/userguide/03-architecture.rst
diff --git a/docs/userguide/apexlake_installation.rst b/docs/userguide/05-apexlake_installation.rst
index d4493e0f8..d4493e0f8 100644
--- a/docs/userguide/apexlake_installation.rst
+++ b/docs/userguide/05-apexlake_installation.rst
diff --git a/docs/userguide/apexlake_api.rst b/docs/userguide/06-apexlake_api.rst
index 35a1dbe3e..35a1dbe3e 100644
--- a/docs/userguide/apexlake_api.rst
+++ b/docs/userguide/06-apexlake_api.rst
diff --git a/docs/userguide/03-installation.rst b/docs/userguide/07-installation.rst
index a3144ef2c..25c125851 100644
--- a/docs/userguide/03-installation.rst
+++ b/docs/userguide/07-installation.rst
@@ -251,3 +251,71 @@ More info about the tool can be found by executing:
::
yardstick-plot -h
+
+
+Deploy InfluxDB and Grafana locally
+------------------------------------
+
+.. pull docker images
+
+Pull docker images
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+::
+
+ docker pull tutum/influxdb
+ docker pull grafana/grafana
+
+Run influxdb and config
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Run influxdb
+::
+
+ docker run -d --name influxdb -p 8083:8083 -p 8086:8086 --expose 8090 --expose 8099 tutum/influxdb
+ docker exec -it influxdb bash
+
+Config influxdb
+::
+
+ influx
+ >CREATE USER root WITH PASSWORD 'root' WITH ALL PRIVILEGES
+ >CREATE DATABASE yardstick;
+ >use yardstick;
+ >show MEASUREMENTS;
+
+Run grafana and config
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Run grafana
+::
+
+ docker run -d --name grafana -p 3000:3000 grafana/grafana
+
+Config grafana
+::
+
+ http://{YOUR_IP_HERE}:3000
+ log on using admin/admin and config database resource to be {YOUR_IP_HERE}:8086
+
+.. image:: images/Grafana_config.png
+
+Config yardstick conf
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+cp ./etc/yardstick/yardstick.conf.sample /etc/yardstick/yardstick.conf
+
+vi /etc/yardstick/yardstick.conf
+Config yardstick.conf
+::
+
+ [DEFAULT]
+ debug = True
+ dispatcher = influxdb
+
+ [dispatcher_influxdb]
+ timeout = 5
+ target = http://{YOUR_IP_HERE}:8086
+ db_name = yardstick
+ username = root
+ password = root
+
+Now you can run yardstick test case and store the results in influxdb
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/docs/userguide/08-yardstick_plugin.rst b/docs/userguide/08-yardstick_plugin.rst
new file mode 100644
index 000000000..e68db650d
--- /dev/null
+++ b/docs/userguide/08-yardstick_plugin.rst
@@ -0,0 +1,144 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International
+.. License.
+.. http://creativecommons.org/licenses/by/4.0
+.. (c) OPNFV, Ericsson AB, Huawei Technologies Co.,Ltd and others.
+
+===================================
+Installing a plug-in into yardstick
+===================================
+
+Abstract
+========
+
+Yardstick currently provides a ``plugin`` CLI command to support integration
+with other OPNFV testing projects. Below is an example invocation of yardstick
+plugin command and Storperf plug-in sample.
+
+
+Installing Storperf into yardstick
+==================================
+
+Storperf is delivered as a Docker container from
+https://hub.docker.com/r/opnfv/storperf/tags/.
+
+There are two possible methods for installation in your environment:
+
+* Run container on Jump Host
+* Run container in a VM
+
+In this introduction we will install Storperf on Jump Host.
+
+
+Step 0: Environment preparation
+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+
+Running Storperf on Jump Host
+Requirements:
+
+* Docker must be installed
+* Jump Host must have access to the OpenStack Controller API
+* Jump Host must have internet connectivity for downloading docker image
+* Enough floating IPs must be available to match your agent count
+
+Before installing Storperf into yardstick you need to check your openstack
+environment and other dependencies:
+
+1. Make sure docker is installed.
+2. Make sure Keystone, Nova, Neutron, Glance, Heat are installed correctly.
+3. Make sure Jump Host have access to the OpenStack Controller API.
+4. Make sure Jump Host must have internet connectivity for downloading docker image.
+5. You need to know where to get basic openstack Keystone authorization info, such as
+OS_PASSWORD, OS_TENANT_NAME, OS_AUTH_URL, OS_USERNAME.
+6. To run a Storperf container, you need to have OpenStack Controller environment
+variables defined and passed to Storperf container. The best way to do this is to
+put environment variables in a "storperf_admin-rc" file. The storperf_admin-rc
+should include credential environment variables at least:
+
+* OS_AUTH_URL
+* OS_TENANT_ID
+* OS_TENANT_NAME
+* OS_PROJECT_NAME
+* OS_USERNAME
+* OS_PASSWORD
+* OS_REGION_NAME
+
+For this storperf_admin-rc file, during environment preparation a "prepare_storperf_admin-rc.sh"
+script can be used to generate it.
+::
+
+ #!/bin/bash
+ 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=`keystone tenant-get admin|grep 'id'|awk -F '|' '{print $3}'|sed -e 's/^[[:space:]]*//'`
+ rm -f ~/storperf_admin-rc
+ 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_TENANT_ID="$TENANT_ID >> ~/storperf_admin-rc
+
+
+Step 1: Plug-in configuration file preparation
+++++++++++++++++++++++++++++++++++++++++++++++
+
+To install a plug-in, first you need to prepare a plug-in configuration file in
+YAML format and store it in the "plugin" directory. The plugin configration file
+work as the input of yardstick "plugin" command. Below is the Storperf plug-in
+configuration file sample:
+::
+
+ ---
+ # StorPerf plugin configuration file
+ # Used for integration StorPerf into Yardstick as a plugin
+ schema: "yardstick:plugin:0.1"
+ plugins:
+ name: storperf
+ deployment:
+ ip: 192.168.23.2
+ user: root
+ password: root
+
+In the plug-in configuration file, you need to specify the plug-in name and the
+plug-in deployment info, including node ip, node login username and password.
+Here the Storperf will be installed on IP 192.168.23.2 which is the Jump Host
+in my local environment.
+
+Step 2: Plug-in install/remove scripts preparation
+++++++++++++++++++++++++++++++++++++++++++++++++++
+
+Under "yardstick/resource/scripts directory", there are two folders: a "install"
+folder and a "remove" folder. You need to store the plug-in install/remove script
+in these two folders respectively.
+
+The detailed installation or remove operation should de defined in these two scripts.
+The name of both install and remove scripts should match the plugin-in name that you
+specified in the plug-in configuration file.
+For example, the install and remove scripts for Storperf are both named to "storperf.bash".
+
+
+Step 3: Install and remove Storperf
++++++++++++++++++++++++++++++++++++
+
+To install Storperf, simply execute the following command
+::
+
+ # Install Storperf
+ yardstick plugin install plugin/storperf.yaml
+
+removing Storperf from yardstick
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+To remove Storperf, simply execute the following command
+::
+
+ # Remove Storperf
+ yardstick plugin remove plugin/storperf.yaml
+
+What yardstick plugin command does is using the username and password to log into the deployment target and then execute the corresponding install or remove script.
diff --git a/docs/userguide/09-result-store-InfluxDB.rst b/docs/userguide/09-result-store-InfluxDB.rst
new file mode 100644
index 000000000..5c49e9f7c
--- /dev/null
+++ b/docs/userguide/09-result-store-InfluxDB.rst
@@ -0,0 +1,86 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International
+.. License.
+.. http://creativecommons.org/licenses/by/4.0
+.. (c) OPNFV, 2016 Huawei Technologies Co.,Ltd and others.
+
+==============================================
+Store Other Project's Test Results in InfluxDB
+==============================================
+
+Abstract
+========
+
+.. _Framework: https://wiki.opnfv.org/download/attachments/6827660/wiki.png?version=1&modificationDate=1470298075000&api=v2
+
+This chapter illustrates how to run plug-in test cases and store test results
+into community's InfluxDB. The framework is shown in Framework_.
+
+
+.. image:: images/InfluxDB_store.png
+ :width: 1200px
+ :alt: Store Other Project's Test Results in InfluxDB
+
+Store Storperf Test Results into Community's InfluxDB
+=====================================================
+
+.. _Influxdb: https://git.opnfv.org/cgit/yardstick/tree/yardstick/dispatcher/influxdb.py
+.. _Mingjiang: limingjiang@huawei.com
+.. _Visual: https://wiki.opnfv.org/download/attachments/6827660/tc074.PNG?version=1&modificationDate=1470298075000&api=v2
+.. _Login: http://testresults.opnfv.org/grafana/login
+
+As shown in Framework_, there are two ways to store Storperf test results
+into community's InfluxDB:
+
+1. Yardstick asks Storperf to run the test case. After the test case is
+ completed, Yardstick reads test results via ReST API from Storperf and
+ posts test data to the influxDB.
+
+2. Additionally, Storperf can run tests by itself and post the test result
+ directly to the InfluxDB. The method for posting data directly to influxDB
+ will be supported in the future.
+
+Our plan is to support rest-api in D release so that other testing projects can
+call the rest-api to use yardstick dispatcher service to push data to yardstick's
+influxdb database.
+
+For now, influxdb only support line protocol, and the json protocol is deprecated.
+
+Take ping test case for example, the raw_result is json format like this:
+::
+
+ "benchmark": {
+ "timestamp": 1470315409.868095,
+ "errors": "",
+ "data": {
+ "rtt": {
+ "ares": 1.125
+ }
+ },
+ "sequence": 1
+ },
+ "runner_id": 2625
+ }
+
+With the help of "influxdb_line_protocol", the json is transform to like below as a line string:
+::
+
+ 'ping,deploy_scenario=unknown,host=athena.demo,installer=unknown,pod_name=unknown,
+ runner_id=2625,scenarios=Ping,target=ares.demo,task_id=77755f38-1f6a-4667-a7f3-
+ 301c99963656,version=unknown rtt.ares=1.125 1470315409868094976'
+
+So, for data output of json format, you just need to transform json into line format and call
+influxdb api to post the data into the database. All this function has been implemented in Influxdb_.
+If you need support on this, please contact Mingjiang_.
+::
+
+ curl -i -XPOST 'http://104.197.68.199:8086/write?db=yardstick' --
+ data-binary 'ping,deploy_scenario=unknown,host=athena.demo,installer=unknown, ...'
+
+Grafana will be used for visualizing the collected test data, which is shown in Visual_. Grafana
+can be accessed by Login_.
+
+
+.. image:: images/results_visualization.png
+ :width: 1200px
+ :alt: results visualization
+
diff --git a/docs/userguide/03-list-of-tcs.rst b/docs/userguide/10-list-of-tcs.rst
index 96e5297a1..7e8c85433 100644
--- a/docs/userguide/03-list-of-tcs.rst
+++ b/docs/userguide/10-list-of-tcs.rst
@@ -49,6 +49,7 @@ Generic NFVI Test Case Descriptions
opnfv_yardstick_tc070.rst
opnfv_yardstick_tc071.rst
opnfv_yardstick_tc072.rst
+ opnfv_yardstick_tc075.rst
OPNFV Feature Test Cases
========================
diff --git a/docs/userguide/images/Grafana_config.png b/docs/userguide/images/Grafana_config.png
new file mode 100644
index 000000000..cb63098dc
--- /dev/null
+++ b/docs/userguide/images/Grafana_config.png
Binary files differ
diff --git a/docs/userguide/images/InfluxDB_store.png b/docs/userguide/images/InfluxDB_store.png
new file mode 100644
index 000000000..1770fd255
--- /dev/null
+++ b/docs/userguide/images/InfluxDB_store.png
Binary files differ
diff --git a/docs/userguide/images/results_visualization.png b/docs/userguide/images/results_visualization.png
new file mode 100644
index 000000000..cd092808b
--- /dev/null
+++ b/docs/userguide/images/results_visualization.png
Binary files differ
diff --git a/docs/userguide/index.rst b/docs/userguide/index.rst
index 72a92a69f..0aa112a45 100644
--- a/docs/userguide/index.rst
+++ b/docs/userguide/index.rst
@@ -12,11 +12,13 @@ Yardstick Overview
01-introduction
02-methodology
- architecture
+ 03-architecture
04-vtc-overview
- apexlake_installation
- apexlake_api
- 03-installation
- 03-list-of-tcs
+ 05-apexlake_installation
+ 06-apexlake_api
+ 07-installation
+ 08-yardstick_plugin
+ 09-result-store-InfluxDB
+ 10-list-of-tcs
glossary
references
diff --git a/docs/userguide/opnfv_yardstick_tc075.rst b/docs/userguide/opnfv_yardstick_tc075.rst
new file mode 100644
index 000000000..a6ff34447
--- /dev/null
+++ b/docs/userguide/opnfv_yardstick_tc075.rst
@@ -0,0 +1,60 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International
+.. License.
+.. http://creativecommons.org/licenses/by/4.0
+.. (c) OPNFV, Huawei Technologies Co.,Ltd and others.
+
+*************************************
+Yardstick Test Case Description TC075
+*************************************
+
+
++-----------------------------------------------------------------------------+
+|Network Capacity and Scale Testing |
+| |
++--------------+--------------------------------------------------------------+
+|test case id | OPNFV_YARDSTICK_TC075_Network_Capacity_and_Scale_testing |
+| | |
++--------------+--------------------------------------------------------------+
+|metric | Number of connections, Number of frames sent/received |
+| | |
++--------------+--------------------------------------------------------------+
+|test purpose | To evaluate the network capacity and scale with regards to |
+| | connections and frmaes. |
+| | |
++--------------+--------------------------------------------------------------+
+|configuration | file: opnfv_yardstick_tc075.yaml |
+| | |
+| | There is no additional configuration to be set for this TC. |
+| | |
++--------------+--------------------------------------------------------------+
+|test tool | netstar |
+| | |
+| | Netstat is normally part of any Linux distribution, hence it |
+| | doesn't need to be installed. |
+| | |
++--------------+--------------------------------------------------------------+
+|references | Netstat man page |
+| | |
+| | ETSI-NFV-TST001 |
+| | |
++--------------+--------------------------------------------------------------+
+|applicability | This test case is mainly for evaluating network performance. |
+| | |
++--------------+--------------------------------------------------------------+
+|pre_test | Each pod node must have netstat included in it. |
+|conditions | |
+| | |
++--------------+--------------------------------------------------------------+
+|test sequence | description and expected result |
+| | |
++--------------+--------------------------------------------------------------+
+|step 1 | The pod is available. |
+| | Netstat is invoked and logs are produced and stored. |
+| | |
+| | Result: Logs are stored. |
+| | |
++--------------+--------------------------------------------------------------+
+|test verdict | None. Number of connections and frames are fetched and |
+| | stored. |
+| | |
++--------------+--------------------------------------------------------------+
diff --git a/plugin/CI/storperf.yaml b/plugin/CI/storperf.yaml
index 4407ddf8c..65ebe51e1 100644
--- a/plugin/CI/storperf.yaml
+++ b/plugin/CI/storperf.yaml
@@ -8,6 +8,6 @@ plugins:
name: storperf
deployment:
- ip: local
+ ip: 192.168.200.1
user: root
password: root
diff --git a/setup.py b/setup.py
index 35037382c..a2131cf0b 100755
--- a/setup.py
+++ b/setup.py
@@ -11,6 +11,7 @@ setup(
'benchmark/scenarios/availability/*.yaml',
'benchmark/scenarios/availability/attacker/*.yaml',
'benchmark/scenarios/availability/ha_tools/*.bash',
+ 'benchmark/scenarios/availability/ha_tools/*/*.bash',
'benchmark/scenarios/availability/attacker/scripts/*.bash',
'benchmark/scenarios/availability/monitor/*.yaml',
'benchmark/scenarios/availability/monitor/script_tools/*.bash',
diff --git a/tests/ci/docker/yardstick-ci/Dockerfile b/tests/ci/docker/yardstick-ci/Dockerfile
index 684f47122..da755d11d 100644
--- a/tests/ci/docker/yardstick-ci/Dockerfile
+++ b/tests/ci/docker/yardstick-ci/Dockerfile
@@ -20,6 +20,7 @@ ENV RELENG_REPO_DIR ${REPOS_DIR}/releng
RUN apt-get update && apt-get install -y \
wget \
+ expect \
curl \
git \
sshpass \
diff --git a/tests/ci/prepare_env.sh b/tests/ci/prepare_env.sh
index 35118b12c..d9f8257ae 100755
--- a/tests/ci/prepare_env.sh
+++ b/tests/ci/prepare_env.sh
@@ -56,6 +56,11 @@ export EXTERNAL_NETWORK INSTALLER_TYPE DEPLOY_TYPE NODE_NAME
# Prepare a admin-rc file for StorPerf integration
$YARDSTICK_REPO_DIR/tests/ci/prepare_storperf_admin-rc.sh
+# copy a admin-rc file for StorPerf integration to the deployment location
+if [ "$NODE_NAME" == "huawei-pod1" ]; then
+ bash $YARDSTICK_REPO_DIR/tests/ci/scp_storperf_admin-rc.sh
+fi
+
# Fetching id_rsa file from jump_server..."
verify_connectivity() {
local ip=$1
diff --git a/tests/ci/scp_storperf_admin-rc.sh b/tests/ci/scp_storperf_admin-rc.sh
new file mode 100644
index 000000000..af2885b01
--- /dev/null
+++ b/tests/ci/scp_storperf_admin-rc.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
+sshpass -p root scp 2>/dev/null $ssh_options ~/storperf_admin-rc \
+ root@192.168.200.1:/root/ &> /dev/null
diff --git a/tests/ci/yardstick-verify b/tests/ci/yardstick-verify
index bdb91003d..eafadf987 100755
--- a/tests/ci/yardstick-verify
+++ b/tests/ci/yardstick-verify
@@ -133,8 +133,21 @@ install_storperf()
exit 1
fi
+ fi
+}
+
+remove_storperf()
+{
+ # remove Storper from huawei-pod1
+ if [ "$NODE_NAME" == "huawei-pod1" ]; then
echo
- echo "========== Installed storperf container =========="
+ echo "========== Removing storperf =========="
+
+ if ! yardstick -d plugin remove plugin/CI/storperf.yaml; then
+ echo "Remove storperf plugin FAILED";
+ exit 1
+ fi
+
fi
}
@@ -267,15 +280,17 @@ password = 0pnfv2015
EOF
local failed=0
+ local start_date
+ local stop_date
if [ ${#SUITE_FILES[@]} -gt 0 ]; then
+ start_date=$(date '+%Y-%m-%d %H:%M:%S')
for suite in ${SUITE_FILES[*]}; do
echo "---------------------------"
echo "Running test suite: $suite"
echo "---------------------------"
-
if ! yardstick task start --suite $suite; then
echo "test suite $suite FAILED";
@@ -293,8 +308,10 @@ EOF
echo "Test result file ${DISPATCHER_FILE_NAME} is not exist"
fi
fi
-
done
+ stop_date=$(date '+%Y-%m-%d %H:%M:%S')
+
+
local sceanrio_status="SUCCESS"
@@ -303,12 +320,14 @@ EOF
fi
curl -i -H 'content-type: application/json' -X POST -d \
"{\"project_name\": \"yardstick\",
+ \"case_name\": \"scenario_status\",
\"pod_name\":\"${NODE_NAME}\",
\"installer\":\"${INSTALLER_TYPE}\",
- \"description\": \"yardstick ci scenario status\",
- \"case_name\": \"scenario_status\",
\"version\":\"${YARDSTICK_BRANCH}\",
\"scenario\":\"${DEPLOY_SCENARIO}\",
+ \"description\": \"yardstick ci scenario status\",
+ \"start_date\":\"${start_date}\",
+ \"stop_date\":\"${stop_date}\",
\"details\":\"${sceanrio_status}\"}" \
${DISPATCHER_HTTP_TARGET}
@@ -422,6 +441,7 @@ main()
install_storperf
run_test
+ remove_storperf
}
main
diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc002.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc002.yaml
index c0cff7d76..1942bb54f 100644
--- a/tests/opnfv/test_cases/opnfv_yardstick_tc002.yaml
+++ b/tests/opnfv/test_cases/opnfv_yardstick_tc002.yaml
@@ -13,7 +13,7 @@ scenarios:
runner:
type: Duration
- duration: 600
+ duration: 60
interval: 10
sla:
diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc074.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc074.yaml
index d506ccc1e..6dda2d436 100644
--- a/tests/opnfv/test_cases/opnfv_yardstick_tc074.yaml
+++ b/tests/opnfv/test_cases/opnfv_yardstick_tc074.yaml
@@ -4,7 +4,7 @@
schema: "yardstick:task:0.1"
{% set public_network = public_network or "ext-net" %}
-{% set StorPerf_ip = StorPerf_ip or "192.168.200.2" %}
+{% set StorPerf_ip = StorPerf_ip or "192.168.200.1" %}
scenarios:
-
type: StorPerf
diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc075.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc075.yaml
new file mode 100644
index 000000000..d4a978c1d
--- /dev/null
+++ b/tests/opnfv/test_cases/opnfv_yardstick_tc075.yaml
@@ -0,0 +1,23 @@
+---
+# Yardstick TC075 config file
+# Measure compute capacity and scale.
+# Including number of cores, number of threads, available memory size and
+# cache size.
+
+schema: "yardstick:task:0.1"
+{% set host = host or "node1.LF" %}
+{% set pod_info = pod_info or "etc/yardstick/nodes/compass_sclab_virtual/pod.yaml" %}
+
+scenarios:
+-
+ type: NetworkCapacity
+ host: {{host}}
+
+ runner:
+ type: Iteration
+ iterations: 1
+
+context:
+ type: Node
+ name: LF
+ file: {{pod_info}}
diff --git a/tests/opnfv/test_suites/opnfv_ericsson-pod1_daily.yaml b/tests/opnfv/test_suites/opnfv_ericsson-pod1_daily.yaml
deleted file mode 100644
index 66f2f8d98..000000000
--- a/tests/opnfv/test_suites/opnfv_ericsson-pod1_daily.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
----
-# ERICSSON POD1 daily task suite
-
-schema: "yardstick:suite:0.1"
-
-name: "opnfv_ericsson_daily"
-test_cases_dir: "tests/opnfv/test_cases/"
-test_cases:
--
- file_name: opnfv_yardstick_tc002.yaml
--
- file_name: opnfv_yardstick_tc005.yaml
--
- file_name: opnfv_yardstick_tc010.yaml
--
- file_name: opnfv_yardstick_tc011.yaml
--
- file_name: opnfv_yardstick_tc012.yaml
--
- file_name: opnfv_yardstick_tc014.yaml
--
- file_name: opnfv_yardstick_tc037.yaml
diff --git a/tests/opnfv/test_suites/opnfv_ericsson-pod2_daily.yaml b/tests/opnfv/test_suites/opnfv_ericsson-pod2_daily.yaml
deleted file mode 100644
index c420271b8..000000000
--- a/tests/opnfv/test_suites/opnfv_ericsson-pod2_daily.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
----
-# ERICSSON POD2 daily task suite
-
-schema: "yardstick:suite:0.1"
-
-name: "opnfv_ericsson_daily"
-test_cases_dir: "tests/opnfv/test_cases/"
-test_cases:
--
- file_name: opnfv_yardstick_tc002.yaml
--
- file_name: opnfv_yardstick_tc005.yaml
--
- file_name: opnfv_yardstick_tc010.yaml
--
- file_name: opnfv_yardstick_tc011.yaml
--
- file_name: opnfv_yardstick_tc012.yaml
--
- file_name: opnfv_yardstick_tc014.yaml
--
- file_name: opnfv_yardstick_tc037.yaml
diff --git a/tests/opnfv/test_suites/opnfv_ericsson-virtual1_daily.yaml b/tests/opnfv/test_suites/opnfv_ericsson-virtual1_daily.yaml
deleted file mode 100644
index 62a5001ac..000000000
--- a/tests/opnfv/test_suites/opnfv_ericsson-virtual1_daily.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
----
-# ERICSSON VIRTUAL1 daily task suite
-
-schema: "yardstick:suite:0.1"
-
-name: "opnfv_ericsson_virtual1_daily"
-test_cases_dir: "tests/opnfv/test_cases/"
-test_cases:
--
- file_name: opnfv_yardstick_tc002.yaml
--
- file_name: opnfv_yardstick_tc005.yaml
--
- file_name: opnfv_yardstick_tc010.yaml
--
- file_name: opnfv_yardstick_tc011.yaml
--
- file_name: opnfv_yardstick_tc012.yaml
--
- file_name: opnfv_yardstick_tc014.yaml
--
- file_name: opnfv_yardstick_tc037.yaml
diff --git a/tests/opnfv/test_suites/opnfv_huawei-pod1_daily.yaml b/tests/opnfv/test_suites/opnfv_huawei-pod1_daily.yaml
deleted file mode 100644
index 35eeb34a7..000000000
--- a/tests/opnfv/test_suites/opnfv_huawei-pod1_daily.yaml
+++ /dev/null
@@ -1,26 +0,0 @@
----
-# Huawei US bare daily task suite
-
-schema: "yardstick:suite:0.1"
-
-name: "opnfv_huawei_daily"
-test_cases_dir: "tests/opnfv/test_cases/"
-test_cases:
--
- file_name: opnfv_yardstick_tc002.yaml
--
- file_name: opnfv_yardstick_tc005.yaml
--
- file_name: opnfv_yardstick_tc010.yaml
--
- file_name: opnfv_yardstick_tc011.yaml
--
- file_name: opnfv_yardstick_tc012.yaml
--
- file_name: opnfv_yardstick_tc014.yaml
--
- file_name: opnfv_yardstick_tc027.yaml
--
- file_name: opnfv_yardstick_tc037.yaml
--
- file_name: opnfv_yardstick_tc043.yaml
diff --git a/tests/opnfv/test_suites/opnfv_huawei-pod1_weekly.yaml b/tests/opnfv/test_suites/opnfv_huawei-pod1_weekly.yaml
deleted file mode 100644
index 8a9ce4dc0..000000000
--- a/tests/opnfv/test_suites/opnfv_huawei-pod1_weekly.yaml
+++ /dev/null
@@ -1,28 +0,0 @@
----
-# Huawei US bare weekly task suite
-
-schema: "yardstick:suite:0.1"
-
-name: "opnfv_huawei_weekly"
-test_cases_dir: "tests/opnfv/test_cases/"
-test_cases:
--
- file_name: opnfv_yardstick_tc002.yaml
--
- file_name: opnfv_yardstick_tc005.yaml
--
- file_name: opnfv_yardstick_tc010.yaml
--
- file_name: opnfv_yardstick_tc011.yaml
--
- file_name: opnfv_yardstick_tc012.yaml
--
- file_name: opnfv_yardstick_tc014.yaml
--
- file_name: opnfv_yardstick_tc027.yaml
--
- file_name: opnfv_yardstick_tc037.yaml
--
- file_name: opnfv_yardstick_tc040.yaml
--
- file_name: opnfv_yardstick_tc043.yaml
diff --git a/tests/opnfv/test_suites/opnfv_huawei-pod2_daily.yaml b/tests/opnfv/test_suites/opnfv_huawei-pod2_daily.yaml
deleted file mode 100644
index 435d21c9e..000000000
--- a/tests/opnfv/test_suites/opnfv_huawei-pod2_daily.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
----
-# Huawei US bare daily task suite
-
-schema: "yardstick:suite:0.1"
-
-name: "opnfv_huawei_daily"
-test_cases_dir: "tests/opnfv/test_cases/"
-test_cases:
--
- file_name: opnfv_yardstick_tc002.yaml
--
- file_name: opnfv_yardstick_tc005.yaml
--
- file_name: opnfv_yardstick_tc010.yaml
--
- file_name: opnfv_yardstick_tc011.yaml
--
- file_name: opnfv_yardstick_tc012.yaml
--
- file_name: opnfv_yardstick_tc014.yaml
--
- file_name: opnfv_yardstick_tc037.yaml
diff --git a/tests/opnfv/test_suites/opnfv_huawei-pod3_daily.yaml b/tests/opnfv/test_suites/opnfv_huawei-pod3_daily.yaml
deleted file mode 100644
index 5569a0912..000000000
--- a/tests/opnfv/test_suites/opnfv_huawei-pod3_daily.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
----
-# Huawei Shanghai bare daily task suite
-
-schema: "yardstick:suite:0.1"
-
-name: "opnfv_huawei_daily"
-test_cases_dir: "tests/opnfv/test_cases/"
-test_cases:
--
- file_name: opnfv_yardstick_tc002.yaml
--
- file_name: opnfv_yardstick_tc005.yaml
--
- file_name: opnfv_yardstick_tc010.yaml
--
- file_name: opnfv_yardstick_tc011.yaml
--
- file_name: opnfv_yardstick_tc012.yaml
--
- file_name: opnfv_yardstick_tc014.yaml
--
- file_name: opnfv_yardstick_tc037.yaml
diff --git a/tests/opnfv/test_suites/opnfv_huawei-pod4_daily.yaml b/tests/opnfv/test_suites/opnfv_huawei-pod4_daily.yaml
deleted file mode 100644
index 486425f1b..000000000
--- a/tests/opnfv/test_suites/opnfv_huawei-pod4_daily.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
----
-# Huawei Shanghai bare POD6 daily task suite
-
-schema: "yardstick:suite:0.1"
-
-name: "opnfv_huawei_daily"
-test_cases_dir: "tests/opnfv/test_cases/"
-test_cases:
--
- file_name: opnfv_yardstick_tc002.yaml
--
- file_name: opnfv_yardstick_tc005.yaml
--
- file_name: opnfv_yardstick_tc010.yaml
--
- file_name: opnfv_yardstick_tc011.yaml
--
- file_name: opnfv_yardstick_tc012.yaml
--
- file_name: opnfv_yardstick_tc014.yaml
--
- file_name: opnfv_yardstick_tc037.yaml
diff --git a/tests/opnfv/test_suites/opnfv_huawei-virtual1_daily.yaml b/tests/opnfv/test_suites/opnfv_huawei-virtual1_daily.yaml
deleted file mode 100644
index bb87fc363..000000000
--- a/tests/opnfv/test_suites/opnfv_huawei-virtual1_daily.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
----
-# Huawei US virtual daily task suite
-
-schema: "yardstick:suite:0.1"
-
-name: "opnfv_huawei_daily"
-test_cases_dir: "tests/opnfv/test_cases/"
-test_cases:
--
- file_name: opnfv_yardstick_tc002.yaml
--
- file_name: opnfv_yardstick_tc005.yaml
--
- file_name: opnfv_yardstick_tc010.yaml
--
- file_name: opnfv_yardstick_tc011.yaml
--
- file_name: opnfv_yardstick_tc012.yaml
--
- file_name: opnfv_yardstick_tc014.yaml
--
- file_name: opnfv_yardstick_tc037.yaml
diff --git a/tests/opnfv/test_suites/opnfv_huawei-virtual2_daily.yaml b/tests/opnfv/test_suites/opnfv_huawei-virtual2_daily.yaml
deleted file mode 100644
index bb87fc363..000000000
--- a/tests/opnfv/test_suites/opnfv_huawei-virtual2_daily.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
----
-# Huawei US virtual daily task suite
-
-schema: "yardstick:suite:0.1"
-
-name: "opnfv_huawei_daily"
-test_cases_dir: "tests/opnfv/test_cases/"
-test_cases:
--
- file_name: opnfv_yardstick_tc002.yaml
--
- file_name: opnfv_yardstick_tc005.yaml
--
- file_name: opnfv_yardstick_tc010.yaml
--
- file_name: opnfv_yardstick_tc011.yaml
--
- file_name: opnfv_yardstick_tc012.yaml
--
- file_name: opnfv_yardstick_tc014.yaml
--
- file_name: opnfv_yardstick_tc037.yaml
diff --git a/tests/opnfv/test_suites/opnfv_huawei-virtual3_daily.yaml b/tests/opnfv/test_suites/opnfv_huawei-virtual3_daily.yaml
deleted file mode 100644
index bb87fc363..000000000
--- a/tests/opnfv/test_suites/opnfv_huawei-virtual3_daily.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
----
-# Huawei US virtual daily task suite
-
-schema: "yardstick:suite:0.1"
-
-name: "opnfv_huawei_daily"
-test_cases_dir: "tests/opnfv/test_cases/"
-test_cases:
--
- file_name: opnfv_yardstick_tc002.yaml
--
- file_name: opnfv_yardstick_tc005.yaml
--
- file_name: opnfv_yardstick_tc010.yaml
--
- file_name: opnfv_yardstick_tc011.yaml
--
- file_name: opnfv_yardstick_tc012.yaml
--
- file_name: opnfv_yardstick_tc014.yaml
--
- file_name: opnfv_yardstick_tc037.yaml
diff --git a/tests/opnfv/test_suites/opnfv_huawei-virtual4_daily.yaml b/tests/opnfv/test_suites/opnfv_huawei-virtual4_daily.yaml
deleted file mode 100644
index bb87fc363..000000000
--- a/tests/opnfv/test_suites/opnfv_huawei-virtual4_daily.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
----
-# Huawei US virtual daily task suite
-
-schema: "yardstick:suite:0.1"
-
-name: "opnfv_huawei_daily"
-test_cases_dir: "tests/opnfv/test_cases/"
-test_cases:
--
- file_name: opnfv_yardstick_tc002.yaml
--
- file_name: opnfv_yardstick_tc005.yaml
--
- file_name: opnfv_yardstick_tc010.yaml
--
- file_name: opnfv_yardstick_tc011.yaml
--
- file_name: opnfv_yardstick_tc012.yaml
--
- file_name: opnfv_yardstick_tc014.yaml
--
- file_name: opnfv_yardstick_tc037.yaml
diff --git a/tests/opnfv/test_suites/opnfv_intel-pod2_daily.yaml b/tests/opnfv/test_suites/opnfv_intel-pod2_daily.yaml
deleted file mode 100644
index 5191cae7a..000000000
--- a/tests/opnfv/test_suites/opnfv_intel-pod2_daily.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
----
-# INTEL POD2 daily task suite
-
-schema: "yardstick:suite:0.1"
-
-name: "opnfv_intel_daily"
-test_cases_dir: "tests/opnfv/test_cases/"
-test_cases:
--
- file_name: opnfv_yardstick_tc002.yaml
--
- file_name: opnfv_yardstick_tc005.yaml
--
- file_name: opnfv_yardstick_tc010.yaml
--
- file_name: opnfv_yardstick_tc011.yaml
--
- file_name: opnfv_yardstick_tc012.yaml
--
- file_name: opnfv_yardstick_tc014.yaml
--
- file_name: opnfv_yardstick_tc037.yaml
diff --git a/tests/opnfv/test_suites/opnfv_intel-pod5_daily.yaml b/tests/opnfv/test_suites/opnfv_intel-pod5_daily.yaml
deleted file mode 100644
index 824da2d35..000000000
--- a/tests/opnfv/test_suites/opnfv_intel-pod5_daily.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
----
-# INTEL POD5 daily task suite
-
-schema: "yardstick:suite:0.1"
-
-name: "opnfv_intel_daily"
-test_cases_dir: "tests/opnfv/test_cases/"
-test_cases:
--
- file_name: opnfv_yardstick_tc002.yaml
--
- file_name: opnfv_yardstick_tc005.yaml
--
- file_name: opnfv_yardstick_tc010.yaml
--
- file_name: opnfv_yardstick_tc011.yaml
--
- file_name: opnfv_yardstick_tc012.yaml
--
- file_name: opnfv_yardstick_tc014.yaml
--
- file_name: opnfv_yardstick_tc037.yaml
diff --git a/tests/opnfv/test_suites/opnfv_intel-pod6_daily.yaml b/tests/opnfv/test_suites/opnfv_intel-pod6_daily.yaml
deleted file mode 100644
index cf68e64f2..000000000
--- a/tests/opnfv/test_suites/opnfv_intel-pod6_daily.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
----
-# INTEL POD6 daily task suite
-
-schema: "yardstick:suite:0.1"
-
-name: "opnfv_intel_daily"
-test_cases_dir: "tests/opnfv/test_cases/"
-test_cases:
--
- file_name: opnfv_yardstick_tc002.yaml
--
- file_name: opnfv_yardstick_tc005.yaml
--
- file_name: opnfv_yardstick_tc010.yaml
--
- file_name: opnfv_yardstick_tc011.yaml
--
- file_name: opnfv_yardstick_tc012.yaml
--
- file_name: opnfv_yardstick_tc014.yaml
--
- file_name: opnfv_yardstick_tc037.yaml
diff --git a/tests/opnfv/test_suites/opnfv_intel-pod8_daily.yaml b/tests/opnfv/test_suites/opnfv_intel-pod8_daily.yaml
deleted file mode 100644
index 2e626c067..000000000
--- a/tests/opnfv/test_suites/opnfv_intel-pod8_daily.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
----
-# INTEL POD8 daily task suite
-
-schema: "yardstick:suite:0.1"
-
-name: "opnfv_intel_daily"
-test_cases_dir: "tests/opnfv/test_cases/"
-test_cases:
--
- file_name: opnfv_yardstick_tc002.yaml
--
- file_name: opnfv_yardstick_tc005.yaml
--
- file_name: opnfv_yardstick_tc010.yaml
--
- file_name: opnfv_yardstick_tc011.yaml
--
- file_name: opnfv_yardstick_tc012.yaml
--
- file_name: opnfv_yardstick_tc014.yaml
--
- file_name: opnfv_yardstick_tc037.yaml
diff --git a/tests/opnfv/test_suites/opnfv_lf-pod1_daily.yaml b/tests/opnfv/test_suites/opnfv_lf-pod1_daily.yaml
deleted file mode 100644
index 85147a00b..000000000
--- a/tests/opnfv/test_suites/opnfv_lf-pod1_daily.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
----
-# LF POD 1 daily task suite
-
-schema: "yardstick:suite:0.1"
-
-name: "opnfv_lf_daily"
-test_cases_dir: "tests/opnfv/test_cases/"
-test_cases:
--
- file_name: opnfv_yardstick_tc002.yaml
--
- file_name: opnfv_yardstick_tc005.yaml
--
- file_name: opnfv_yardstick_tc010.yaml
--
- file_name: opnfv_yardstick_tc011.yaml
--
- file_name: opnfv_yardstick_tc012.yaml
--
- file_name: opnfv_yardstick_tc014.yaml
--
- file_name: opnfv_yardstick_tc037.yaml
diff --git a/tests/opnfv/test_suites/opnfv_lf-pod2_daily.yaml b/tests/opnfv/test_suites/opnfv_lf-pod2_daily.yaml
deleted file mode 100644
index bda46c026..000000000
--- a/tests/opnfv/test_suites/opnfv_lf-pod2_daily.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
----
-# LF POD 2 daily task suite
-
-schema: "yardstick:suite:0.1"
-
-name: "opnfv_lf_daily"
-test_cases_dir: "tests/opnfv/test_cases/"
-test_cases:
--
- file_name: opnfv_yardstick_tc002.yaml
--
- file_name: opnfv_yardstick_tc005.yaml
--
- file_name: opnfv_yardstick_tc010.yaml
--
- file_name: opnfv_yardstick_tc011.yaml
--
- file_name: opnfv_yardstick_tc012.yaml
--
- file_name: opnfv_yardstick_tc014.yaml
--
- file_name: opnfv_yardstick_tc037.yaml
diff --git a/tests/opnfv/test_suites/opnfv_orange-pod2_daily.yaml b/tests/opnfv/test_suites/opnfv_orange-pod2_daily.yaml
deleted file mode 100644
index 90b52e20c..000000000
--- a/tests/opnfv/test_suites/opnfv_orange-pod2_daily.yaml
+++ /dev/null
@@ -1,18 +0,0 @@
----
-# Orange POD2 daily task suite
-
-schema: "yardstick:suite:0.1"
-
-name: "orange-pod2_daily"
-test_cases_dir: "tests/opnfv/test_cases/"
-test_cases:
--
- file_name: opnfv_yardstick_tc001.yaml
--
- file_name: opnfv_yardstick_tc002.yaml
--
- file_name: opnfv_yardstick_tc005.yaml
--
- file_name: opnfv_yardstick_tc012.yaml
--
- file_name: opnfv_yardstick_tc037.yaml
diff --git a/tests/opnfv/test_suites/opnfv_os-nosdn-kvm-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-nosdn-kvm-ha_daily.yaml
index 331cb1074..eb1226f80 100644
--- a/tests/opnfv/test_suites/opnfv_os-nosdn-kvm-ha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-nosdn-kvm-ha_daily.yaml
@@ -44,3 +44,11 @@ test_cases:
file_name: opnfv_yardstick_tc071.yaml
-
file_name: opnfv_yardstick_tc072.yaml
+-
+ file_name: opnfv_yardstick_tc075.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+ task_args:
+ huawei-pod1: '{"pod_info": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node1.LF"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-nosdn-kvm_ovs-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-nosdn-kvm_ovs-ha_daily.yaml
index 8a840a902..27accf49c 100644
--- a/tests/opnfv/test_suites/opnfv_os-nosdn-kvm_ovs-ha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-nosdn-kvm_ovs-ha_daily.yaml
@@ -44,3 +44,11 @@ test_cases:
file_name: opnfv_yardstick_tc071.yaml
-
file_name: opnfv_yardstick_tc072.yaml
+-
+ file_name: opnfv_yardstick_tc075.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+ task_args:
+ huawei-pod1: '{"pod_info": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node1.LF"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-nosdn-lxd-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-nosdn-lxd-ha_daily.yaml
index 5a158156c..cbb2069f9 100644
--- a/tests/opnfv/test_suites/opnfv_os-nosdn-lxd-ha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-nosdn-lxd-ha_daily.yaml
@@ -44,3 +44,11 @@ test_cases:
file_name: opnfv_yardstick_tc071.yaml
-
file_name: opnfv_yardstick_tc072.yaml
+-
+ file_name: opnfv_yardstick_tc075.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+ task_args:
+ huawei-pod1: '{"pod_info": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node1.LF"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-nosdn-lxd-noha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-nosdn-lxd-noha_daily.yaml
index 4a0cb9b01..cbbf8c13e 100644
--- a/tests/opnfv/test_suites/opnfv_os-nosdn-lxd-noha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-nosdn-lxd-noha_daily.yaml
@@ -44,3 +44,11 @@ test_cases:
file_name: opnfv_yardstick_tc071.yaml
-
file_name: opnfv_yardstick_tc072.yaml
+-
+ file_name: opnfv_yardstick_tc075.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+ task_args:
+ huawei-pod1: '{"pod_info": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node1.LF"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-nosdn-nofeature-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-nosdn-nofeature-ha_daily.yaml
index f53ef098f..ebe7a0513 100644
--- a/tests/opnfv/test_suites/opnfv_os-nosdn-nofeature-ha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-nosdn-nofeature-ha_daily.yaml
@@ -102,4 +102,13 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"public_network": "ext-net",
- "StorPerf_ip": "192.168.200.2"}'
+ "StorPerf_ip": "192.168.200.1"}'
+-
+ file_name: opnfv_yardstick_tc075.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+ task_args:
+ huawei-pod1: '{"pod_info": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node1.LF"}'
+
diff --git a/tests/opnfv/test_suites/opnfv_os-nosdn-nofeature-noha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-nosdn-nofeature-noha_daily.yaml
index 78cd55844..567e8bf73 100644
--- a/tests/opnfv/test_suites/opnfv_os-nosdn-nofeature-noha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-nosdn-nofeature-noha_daily.yaml
@@ -44,3 +44,11 @@ test_cases:
file_name: opnfv_yardstick_tc071.yaml
-
file_name: opnfv_yardstick_tc072.yaml
+-
+ file_name: opnfv_yardstick_tc075.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+ task_args:
+ huawei-pod1: '{"pod_info": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node1.LF"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-nosdn-ovs-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-nosdn-ovs-ha_daily.yaml
index cac5bfc69..6cf5b38d3 100644
--- a/tests/opnfv/test_suites/opnfv_os-nosdn-ovs-ha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-nosdn-ovs-ha_daily.yaml
@@ -44,3 +44,11 @@ test_cases:
file_name: opnfv_yardstick_tc071.yaml
-
file_name: opnfv_yardstick_tc072.yaml
+-
+ file_name: opnfv_yardstick_tc075.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+ task_args:
+ huawei-pod1: '{"pod_info": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node1.LF"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-ocl-nofeature-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-ocl-nofeature-ha_daily.yaml
index d289cb498..7106a1335 100644
--- a/tests/opnfv/test_suites/opnfv_os-ocl-nofeature-ha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-ocl-nofeature-ha_daily.yaml
@@ -44,3 +44,11 @@ test_cases:
file_name: opnfv_yardstick_tc071.yaml
-
file_name: opnfv_yardstick_tc072.yaml
+-
+ file_name: opnfv_yardstick_tc075.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+ task_args:
+ huawei-pod1: '{"pod_info": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node1.LF"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-ocl-nofeature-noha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-ocl-nofeature-noha_daily.yaml
index 691c14670..42781a841 100644
--- a/tests/opnfv/test_suites/opnfv_os-ocl-nofeature-noha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-ocl-nofeature-noha_daily.yaml
@@ -44,3 +44,11 @@ test_cases:
file_name: opnfv_yardstick_tc071.yaml
-
file_name: opnfv_yardstick_tc072.yaml
+-
+ file_name: opnfv_yardstick_tc075.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+ task_args:
+ huawei-pod1: '{"pod_info": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node1.LF"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-odl_l2-bgpvpn-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-odl_l2-bgpvpn-ha_daily.yaml
index dc823b3e6..639e18e85 100644
--- a/tests/opnfv/test_suites/opnfv_os-odl_l2-bgpvpn-ha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-odl_l2-bgpvpn-ha_daily.yaml
@@ -36,3 +36,11 @@ test_cases:
task_args:
huawei-pod1: '{"pod_info": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
"host": "node5.yardstick-TC063"}'
+-
+ file_name: opnfv_yardstick_tc075.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+ task_args:
+ huawei-pod1: '{"pod_info": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node1.LF"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-odl_l2-moon-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-odl_l2-moon-ha_daily.yaml
new file mode 100644
index 000000000..dadcb2f22
--- /dev/null
+++ b/tests/opnfv/test_suites/opnfv_os-odl_l2-moon-ha_daily.yaml
@@ -0,0 +1,54 @@
+---
+# Huawei US bare daily task suite
+
+schema: "yardstick:suite:0.1"
+
+name: "os-odl_l2-moon-ha"
+test_cases_dir: "tests/opnfv/test_cases/"
+test_cases:
+-
+ file_name: opnfv_yardstick_tc002.yaml
+-
+ file_name: opnfv_yardstick_tc005.yaml
+-
+ file_name: opnfv_yardstick_tc010.yaml
+-
+ file_name: opnfv_yardstick_tc011.yaml
+-
+ file_name: opnfv_yardstick_tc012.yaml
+-
+ file_name: opnfv_yardstick_tc014.yaml
+-
+ file_name: opnfv_yardstick_tc037.yaml
+-
+ file_name: opnfv_yardstick_tc055.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+ task_args:
+ huawei-pod1: '{"pod_info": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node5.yardstick-TC055"}'
+-
+ file_name: opnfv_yardstick_tc063.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+ task_args:
+ huawei-pod1: '{"pod_info": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node5.yardstick-TC063"}'
+-
+ file_name: opnfv_yardstick_tc069.yaml
+-
+ file_name: opnfv_yardstick_tc070.yaml
+-
+ file_name: opnfv_yardstick_tc071.yaml
+-
+ file_name: opnfv_yardstick_tc072.yaml
+-
+ file_name: opnfv_yardstick_tc075.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+ task_args:
+ huawei-pod1: '{"pod_info": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node1.LF"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-odl_l2-nofeature-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-odl_l2-nofeature-ha_daily.yaml
index f1845ca14..1de157a37 100644
--- a/tests/opnfv/test_suites/opnfv_os-odl_l2-nofeature-ha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-odl_l2-nofeature-ha_daily.yaml
@@ -44,3 +44,11 @@ test_cases:
file_name: opnfv_yardstick_tc071.yaml
-
file_name: opnfv_yardstick_tc072.yaml
+-
+ file_name: opnfv_yardstick_tc075.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+ task_args:
+ huawei-pod1: '{"pod_info": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node1.LF"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-odl_l2-nofeature-noha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-odl_l2-nofeature-noha_daily.yaml
index e7e168166..1661e08f1 100644
--- a/tests/opnfv/test_suites/opnfv_os-odl_l2-nofeature-noha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-odl_l2-nofeature-noha_daily.yaml
@@ -44,3 +44,11 @@ test_cases:
file_name: opnfv_yardstick_tc071.yaml
-
file_name: opnfv_yardstick_tc072.yaml
+-
+ file_name: opnfv_yardstick_tc075.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+ task_args:
+ huawei-pod1: '{"pod_info": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node1.LF"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-odl_l2-sfc-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-odl_l2-sfc-ha_daily.yaml
index dbdd63d6b..9e0e4186e 100644
--- a/tests/opnfv/test_suites/opnfv_os-odl_l2-sfc-ha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-odl_l2-sfc-ha_daily.yaml
@@ -44,3 +44,11 @@ test_cases:
file_name: opnfv_yardstick_tc071.yaml
-
file_name: opnfv_yardstick_tc072.yaml
+-
+ file_name: opnfv_yardstick_tc075.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+ task_args:
+ huawei-pod1: '{"pod_info": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node1.LF"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-odl_l2-sfc-noha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-odl_l2-sfc-noha_daily.yaml
index c5752981e..1ebd73216 100644
--- a/tests/opnfv/test_suites/opnfv_os-odl_l2-sfc-noha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-odl_l2-sfc-noha_daily.yaml
@@ -44,3 +44,11 @@ test_cases:
file_name: opnfv_yardstick_tc071.yaml
-
file_name: opnfv_yardstick_tc072.yaml
+-
+ file_name: opnfv_yardstick_tc075.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+ task_args:
+ huawei-pod1: '{"pod_info": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node1.LF"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-odl_l3-nofeature-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-odl_l3-nofeature-ha_daily.yaml
index c5dcf95a0..4bcf81b45 100644
--- a/tests/opnfv/test_suites/opnfv_os-odl_l3-nofeature-ha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-odl_l3-nofeature-ha_daily.yaml
@@ -44,3 +44,11 @@ test_cases:
file_name: opnfv_yardstick_tc071.yaml
-
file_name: opnfv_yardstick_tc072.yaml
+-
+ file_name: opnfv_yardstick_tc075.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+ task_args:
+ huawei-pod1: '{"pod_info": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node1.LF"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-onos-nofeature-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-onos-nofeature-ha_daily.yaml
index ba907616e..48718abb7 100644
--- a/tests/opnfv/test_suites/opnfv_os-onos-nofeature-ha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-onos-nofeature-ha_daily.yaml
@@ -44,3 +44,11 @@ test_cases:
file_name: opnfv_yardstick_tc071.yaml
-
file_name: opnfv_yardstick_tc072.yaml
+-
+ file_name: opnfv_yardstick_tc075.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+ task_args:
+ huawei-pod1: '{"pod_info": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node1.LF"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-onos-nofeature-noha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-onos-nofeature-noha_daily.yaml
index 0a3bc14d9..0e9ff81d9 100644
--- a/tests/opnfv/test_suites/opnfv_os-onos-nofeature-noha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-onos-nofeature-noha_daily.yaml
@@ -44,3 +44,11 @@ test_cases:
file_name: opnfv_yardstick_tc071.yaml
-
file_name: opnfv_yardstick_tc072.yaml
+-
+ file_name: opnfv_yardstick_tc075.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+ task_args:
+ huawei-pod1: '{"pod_info": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node1.LF"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-onos-sfc-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-onos-sfc-ha_daily.yaml
index 8933846bc..bfb02cf48 100644
--- a/tests/opnfv/test_suites/opnfv_os-onos-sfc-ha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-onos-sfc-ha_daily.yaml
@@ -44,3 +44,11 @@ test_cases:
file_name: opnfv_yardstick_tc071.yaml
-
file_name: opnfv_yardstick_tc072.yaml
+-
+ file_name: opnfv_yardstick_tc075.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+ task_args:
+ huawei-pod1: '{"pod_info": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node1.LF"}'
diff --git a/tests/opnfv/test_suites/opnfv_zte-pod1_daily.yaml b/tests/opnfv/test_suites/opnfv_zte-pod1_daily.yaml
deleted file mode 100644
index 2a88f82fb..000000000
--- a/tests/opnfv/test_suites/opnfv_zte-pod1_daily.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
----
-# ZTE POD 1 daily task suite
-
-schema: "yardstick:suite:0.1"
-
-name: "opnfv_zte_daily"
-test_cases_dir: "tests/opnfv/test_cases/"
-test_cases:
--
- file_name: opnfv_yardstick_tc002.yaml
--
- file_name: opnfv_yardstick_tc005.yaml
--
- file_name: opnfv_yardstick_tc010.yaml
--
- file_name: opnfv_yardstick_tc011.yaml
--
- file_name: opnfv_yardstick_tc012.yaml
--
- file_name: opnfv_yardstick_tc014.yaml
--
- file_name: opnfv_yardstick_tc037.yaml
diff --git a/tests/unit/benchmark/scenarios/networking/test_pktgen_dpdk.py b/tests/unit/benchmark/scenarios/networking/test_pktgen_dpdk.py
new file mode 100644
index 000000000..afc87abfb
--- /dev/null
+++ b/tests/unit/benchmark/scenarios/networking/test_pktgen_dpdk.py
@@ -0,0 +1,173 @@
+#!/usr/bin/env python
+
+##############################################################################
+# Copyright (c) 2015 ZTE 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
+##############################################################################
+
+# Unittest for yardstick.benchmark.scenarios.networking.pktgen.Pktgen
+
+import mock
+import unittest
+import json
+
+from yardstick.benchmark.scenarios.networking import pktgen_dpdk
+
+@mock.patch('yardstick.benchmark.scenarios.networking.pktgen_dpdk.ssh')
+class PktgenDPDKLatencyTestCase(unittest.TestCase):
+
+ def setUp(self):
+ self.ctx = {
+ 'host': {
+ 'ip': '172.16.0.137',
+ 'user': 'root',
+ 'key_filename': 'mykey.key'
+ },
+ 'target': {
+ 'ip': '172.16.0.138',
+ 'user': 'root',
+ 'key_filename': 'mykey.key',
+ 'ipaddr': '172.16.0.138'
+ }
+ }
+
+ def test_pktgen_dpdk_successful_setup(self, mock_ssh):
+
+ args = {
+ 'options': {'packetsize': 60},
+ }
+ p = pktgen_dpdk.PktgenDPDKLatency(args, self.ctx)
+ p.setup()
+
+ mock_ssh.SSH().execute.return_value = (0, '', '')
+ self.assertIsNotNone(p.server)
+ self.assertIsNotNone(p.client)
+ self.assertEqual(p.setup_done, True)
+
+ def test_pktgen_dpdk_successful_get_port_ip(self, mock_ssh):
+
+ args = {
+ 'options': {'packetsize': 60},
+ }
+ p = pktgen_dpdk.PktgenDPDKLatency(args, self.ctx)
+ p.server = mock_ssh.SSH()
+
+ mock_ssh.SSH().execute.return_value = (0, '', '')
+
+ p.get_port_ip(p.server, "eth1")
+
+ mock_ssh.SSH().execute.assert_called_with(
+ "ifconfig eth1 |grep 'inet addr' |awk '{print $2}' \
+ |cut -d ':' -f2 ")
+
+ def test_pktgen_dpdk_unsuccessful_get_port_ip(self, mock_ssh):
+
+ args = {
+ 'options': {'packetsize': 60},
+ }
+
+ p = pktgen_dpdk.PktgenDPDKLatency(args, self.ctx)
+ p.server = mock_ssh.SSH()
+
+ mock_ssh.SSH().execute.return_value = (1, '', 'FOOBAR')
+ self.assertRaises(RuntimeError, p.get_port_ip, p.server, "eth1")
+
+ def test_pktgen_dpdk_successful_get_port_mac(self, mock_ssh):
+
+ args = {
+ 'options': {'packetsize': 60},
+ }
+ p = pktgen_dpdk.PktgenDPDKLatency(args, self.ctx)
+ p.server = mock_ssh.SSH()
+
+ mock_ssh.SSH().execute.return_value = (0, '', '')
+
+ p.get_port_mac(p.server, "eth1")
+
+ mock_ssh.SSH().execute.assert_called_with(
+ "ifconfig |grep HWaddr |grep eth1 |awk '{print $5}' ")
+
+ def test_pktgen_dpdk_unsuccessful_get_port_mac(self, mock_ssh):
+
+ args = {
+ 'options': {'packetsize': 60},
+ }
+
+ p = pktgen_dpdk.PktgenDPDKLatency(args, self.ctx)
+ p.server = mock_ssh.SSH()
+
+ mock_ssh.SSH().execute.return_value = (1, '', 'FOOBAR')
+ self.assertRaises(RuntimeError, p.get_port_mac, p.server, "eth1")
+
+ def test_pktgen_dpdk_successful_no_sla(self, mock_ssh):
+
+ args = {
+ 'options': {'packetsize': 60},
+ }
+
+ result = {}
+ p = pktgen_dpdk.PktgenDPDKLatency(args, self.ctx)
+
+ sample_output = '100\n110\n112\n130\n149\n150\n90\n150\n200\n162\n'
+ mock_ssh.SSH().execute.return_value = (0, sample_output, '')
+
+ p.run(result)
+ self.assertEqual(result, {"avg_latency": 132})
+
+ def test_pktgen_dpdk_successful_sla(self, mock_ssh):
+
+ args = {
+ 'options': {'packetsize': 60},
+ 'sla': {'max_latency': 100}
+ }
+ result = {}
+
+ p = pktgen_dpdk.PktgenDPDKLatency(args, self.ctx)
+
+ sample_output = '100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n'
+ mock_ssh.SSH().execute.return_value = (0, sample_output, '')
+
+ p.run(result)
+
+ self.assertEqual(result, {"avg_latency": 100})
+
+ def test_pktgen_dpdk_unsuccessful_sla(self, mock_ssh):
+
+ args = {
+ 'options': {'packetsize': 60},
+ 'sla': {'max_latency': 100}
+ }
+ result = {}
+
+ p = pktgen_dpdk.PktgenDPDKLatency(args, self.ctx)
+
+ p.server = mock_ssh.SSH()
+ p.client = mock_ssh.SSH()
+
+ sample_output = '100\n110\n112\n130\n149\n150\n90\n150\n200\n162\n'
+ mock_ssh.SSH().execute.return_value = (0, sample_output, '')
+ self.assertRaises(AssertionError, p.run, result)
+
+ def test_pktgen_dpdk_unsuccessful_script_error(self, mock_ssh):
+
+ args = {
+ 'options': {'packetsize': 60},
+ 'sla': {'max_latency': 100}
+ }
+ result = {}
+
+ p = pktgen_dpdk.PktgenDPDKLatency(args, self.ctx)
+
+ mock_ssh.SSH().execute.return_value = (1, '', 'FOOBAR')
+ self.assertRaises(RuntimeError, p.run, result)
+
+
+def main():
+ unittest.main()
+
+if __name__ == '__main__':
+ main()
diff --git a/tests/unit/test_ssh.py b/tests/unit/test_ssh.py
index 4260b39bc..a27052462 100644
--- a/tests/unit/test_ssh.py
+++ b/tests/unit/test_ssh.py
@@ -108,7 +108,9 @@ class SSHTestCase(unittest.TestCase):
mock.call.set_missing_host_key_policy("autoadd"),
mock.call.connect("example.net", username="admin",
port=22, pkey="key", key_filename=None,
- password=None, timeout=1),
+ password=None,
+ allow_agent=False, look_for_keys=False,
+ timeout=1),
]
self.assertEqual(client_calls, client.mock_calls)
@@ -156,6 +158,15 @@ class SSHTestCase(unittest.TestCase):
self.assertEqual([mock.call("uname")] * 3,
self.test_client.execute.mock_calls)
+ @mock.patch("yardstick.ssh.paramiko")
+ def test_send_command(self, mock_paramiko):
+ paramiko_sshclient = self.test_client._get_client()
+ with mock.patch.object(paramiko_sshclient, "exec_command") \
+ as mock_paramiko_exec_command:
+ self.test_client.send_command('cmd')
+ mock_paramiko_exec_command.assert_called_once_with('cmd',
+ get_pty=True)
+
class SSHRunTestCase(unittest.TestCase):
"""Test SSH.run method in different aspects.
diff --git a/yardstick/benchmark/scenarios/availability/serviceha.py b/yardstick/benchmark/scenarios/availability/serviceha.py
index aee94ee09..10f2c4f45 100755
--- a/yardstick/benchmark/scenarios/availability/serviceha.py
+++ b/yardstick/benchmark/scenarios/availability/serviceha.py
@@ -66,6 +66,10 @@ class ServiceHA(base.Scenario):
LOG.info("monitor stop!")
sla_pass = self.monitorMgr.verify_SLA()
+ if sla_pass:
+ result['sla_pass'] = 1
+ else:
+ result['sla_pass'] = 0
assert sla_pass is True, "the test cases is not pass the SLA"
return
diff --git a/yardstick/benchmark/scenarios/networking/pktgen_dpdk.py b/yardstick/benchmark/scenarios/networking/pktgen_dpdk.py
new file mode 100644
index 000000000..86585eca3
--- /dev/null
+++ b/yardstick/benchmark/scenarios/networking/pktgen_dpdk.py
@@ -0,0 +1,162 @@
+##############################################################################
+# Copyright (c) 2016 ZTE corporation 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
+##############################################################################
+import pkg_resources
+import logging
+import time
+
+import yardstick.ssh as ssh
+from yardstick.benchmark.scenarios import base
+
+LOG = logging.getLogger(__name__)
+
+
+class PktgenDPDKLatency(base.Scenario):
+ """Execute pktgen-dpdk on one vm and execute testpmd on the other vm
+
+ Parameters
+ packetsize - packet size in bytes without the CRC
+ type: int
+ unit: bytes
+ default: 64
+ """
+ __scenario_type__ = "PktgenDPDKLatency"
+
+ PKTGEN_DPDK_SCRIPT = 'pktgen_dpdk_latency_benchmark.bash'
+ TESTPMD_SCRIPT = 'testpmd_fwd.bash'
+
+ def __init__(self, scenario_cfg, context_cfg):
+ self.scenario_cfg = scenario_cfg
+ self.context_cfg = context_cfg
+ self.setup_done = False
+
+ def setup(self):
+ '''scenario setup'''
+ self.pktgen_dpdk_script = pkg_resources.resource_filename(
+ 'yardstick.benchmark.scenarios.networking',
+ PktgenDPDKLatency.PKTGEN_DPDK_SCRIPT)
+ self.testpmd_script = pkg_resources.resource_filename(
+ 'yardstick.benchmark.scenarios.networking',
+ PktgenDPDKLatency.TESTPMD_SCRIPT)
+ host = self.context_cfg['host']
+ host_user = host.get('user', 'ubuntu')
+ host_ip = host.get('ip', None)
+ host_key_filename = host.get('key_filename', '~/.ssh/id_rsa')
+ target = self.context_cfg['target']
+ target_user = target.get('user', 'ubuntu')
+ target_ip = target.get('ip', None)
+ target_key_filename = target.get('key_filename', '~/.ssh/id_rsa')
+ LOG.info("user:%s, target:%s", target_user, target_ip)
+ self.server = ssh.SSH(target_user, target_ip,
+ key_filename=target_key_filename)
+ self.server.wait(timeout=600)
+
+ # copy script to host
+ self.server.run("cat > ~/testpmd_fwd.sh",
+ stdin=open(self.testpmd_script, "rb"))
+
+ LOG.info("user:%s, host:%s", host_user, host_ip)
+ self.client = ssh.SSH(host_user, host_ip,
+ key_filename=host_key_filename)
+ self.client.wait(timeout=600)
+
+ # copy script to host
+ self.client.run("cat > ~/pktgen_dpdk.sh",
+ stdin=open(self.pktgen_dpdk_script, "rb"))
+
+ self.setup_done = True
+ self.testpmd_args = ''
+ self.pktgen_args = []
+
+ @staticmethod
+ def get_port_mac(sshclient, port):
+ cmd = "ifconfig |grep HWaddr |grep %s |awk '{print $5}' " % port
+ LOG.debug("Executing command: %s", cmd)
+ status, stdout, stderr = sshclient.execute(cmd)
+
+ if status:
+ raise RuntimeError(stderr)
+ else:
+ return stdout.rstrip()
+
+ @staticmethod
+ def get_port_ip(sshclient, port):
+ cmd = "ifconfig %s |grep 'inet addr' |awk '{print $2}' \
+ |cut -d ':' -f2 " % port
+ LOG.debug("Executing command: %s", cmd)
+ status, stdout, stderr = sshclient.execute(cmd)
+
+ if status:
+ raise RuntimeError(stderr)
+ else:
+ return stdout.rstrip()
+
+ def run(self, result):
+ """execute the benchmark"""
+
+ if not self.setup_done:
+ self.setup()
+
+ if not self.testpmd_args:
+ self.testpmd_args = self.get_port_mac(self.client, 'eth2')
+
+ if not self.pktgen_args:
+ server_rev_mac = self.get_port_mac(self.server, 'eth1')
+ server_send_mac = self.get_port_mac(self.server, 'eth2')
+ client_src_ip = self.get_port_ip(self.client, 'eth1')
+ client_dst_ip = self.get_port_ip(self.client, 'eth2')
+
+ self.pktgen_args = [client_src_ip, client_dst_ip,
+ server_rev_mac, server_send_mac]
+
+ options = self.scenario_cfg['options']
+ packetsize = options.get("packetsize", 64)
+ rate = options.get("rate", 100)
+
+ cmd = "screen sudo -E bash ~/testpmd_fwd.sh %s " % (self.testpmd_args)
+ LOG.debug("Executing command: %s", cmd)
+ self.server.send_command(cmd)
+
+ time.sleep(1)
+
+ cmd = "screen sudo -E bash ~/pktgen_dpdk.sh %s %s %s %s %s %s" % \
+ (self.pktgen_args[0], self.pktgen_args[1], self.pktgen_args[2],
+ self.pktgen_args[3], rate, packetsize)
+ LOG.debug("Executing command: %s", cmd)
+ self.client.send_command(cmd)
+
+ # wait for finishing test
+ time.sleep(1)
+
+ cmd = "cat ~/result.log -vT \
+ |awk '{match($0,/\[8;40H +[0-9]+/)} \
+ {print substr($0,RSTART,RLENGTH)}' \
+ |grep -v ^$ |awk '{if ($2 != 0) print $2}'"
+ client_status, client_stdout, client_stderr = self.client.execute(cmd)
+
+ if client_status:
+ raise RuntimeError(client_stderr)
+
+ avg_latency = 0
+ if client_stdout:
+ latency_list = client_stdout.split('\n')[0:-2]
+ LOG.info("10 samples of latency: %s", latency_list)
+ latency_sum = 0
+ for i in latency_list:
+ latency_sum += int(i)
+ avg_latency = latency_sum/len(latency_list)
+
+ result.update({"avg_latency": avg_latency})
+
+ if avg_latency and "sla" in self.scenario_cfg:
+ sla_max_latency = int(self.scenario_cfg["sla"]["max_latency"])
+ LOG.info("avg_latency : %d ", avg_latency)
+ LOG.info("sla_max_latency: %d", sla_max_latency)
+ debug_info = "avg_latency %d > sla_max_latency %d" \
+ % (avg_latency, sla_max_latency)
+ assert avg_latency <= sla_max_latency, debug_info
diff --git a/yardstick/benchmark/scenarios/networking/pktgen_dpdk_latency_benchmark.bash b/yardstick/benchmark/scenarios/networking/pktgen_dpdk_latency_benchmark.bash
new file mode 100644
index 000000000..f6f361e80
--- /dev/null
+++ b/yardstick/benchmark/scenarios/networking/pktgen_dpdk_latency_benchmark.bash
@@ -0,0 +1,147 @@
+!/bin/sh
+
+set -e
+
+# Commandline arguments
+SRC_IP=$1 # source IP address of sender in VM A
+DST_IP=$2 # destination IP address of receiver in VM A
+FWD_REV_MAC=$3 # MAC address of forwarding receiver in VM B
+FWD_SEND_MAC=$4 # MAC address of forwarding sender in VM B
+RATE=$5 # packet rate in percentage
+PKT_SIZE=$6 # packet size
+
+
+load_modules()
+{
+ if lsmod | grep "uio" &> /dev/null ; then
+ echo "uio module is loaded"
+ else
+ modprobe uio
+ fi
+
+ if lsmod | grep "igb_uio" &> /dev/null ; then
+ echo "igb_uio module is loaded"
+ else
+ insmod /dpdk/x86_64-native-linuxapp-gcc/kmod/igb_uio.ko
+ fi
+
+ if lsmod | grep "rte_kni" &> /dev/null ; then
+ echo "rte_kni module is loaded"
+ else
+ insmod /dpdk/x86_64-native-linuxapp-gcc/kmod/rte_kni.ko
+ fi
+}
+
+change_permissions()
+{
+ chmod 777 /sys/bus/pci/drivers/virtio-pci/*
+ chmod 777 /sys/bus/pci/drivers/igb_uio/*
+}
+
+add_interface_to_dpdk(){
+ interfaces=$(lspci |grep Eth |tail -n +2 |awk '{print $1}')
+ /dpdk/tools/dpdk-devbind.py --bind=igb_uio $interfaces
+
+}
+
+create_pktgen_config_lua()
+{
+ touch /home/ubuntu/pktgen_latency.lua
+ lua_file="/home/ubuntu/pktgen_latency.lua"
+ chmod 777 $lua_file
+ echo $lua_file
+
+ cat << EOF > "/home/ubuntu/pktgen_latency.lua"
+package.path = package.path ..";?.lua;test/?.lua;app/?.lua;"
+
+ -- require "Pktgen";
+function pktgen_config()
+
+ pktgen.screen("off");
+
+ pktgen.set_ipaddr("0", "dst", "$DST_IP");
+ pktgen.set_ipaddr("0", "src", "$SRC_IP/24");
+ pktgen.set_mac("0", "$FWD_REV_MAC");
+ pktgen.set_ipaddr("1", "dst", "$SRC_IP");
+ pktgen.set_ipaddr("1", "src", "$DST_IP/24");
+ pktgen.set_mac("1", "$FWD_SEND_MAC");
+ pktgen.set(0, "rate", $RATE);
+ pktgen.set(0, "size", $PKT_SIZE);
+ pktgen.set_proto("all", "udp");
+ pktgen.latency("all","enable");
+ pktgen.latency("all","on");
+
+ pktgen.start(0);
+ end
+
+pktgen_config()
+EOF
+}
+
+
+create_expect_file()
+{
+ touch /home/ubuntu/pktgen.exp
+ expect_file="/home/ubuntu/pktgen.exp"
+ chmod 777 $expect_file
+ echo $expect_file
+
+ cat << 'EOF' > "/home/ubuntu/pktgen.exp"
+#!/usr/bin/expect
+
+set blacklist [lindex $argv 0]
+set log [lindex $argv 1]
+set result {}
+set timeout 15
+spawn ./app/app/x86_64-native-linuxapp-gcc/pktgen -c 0x07 -n 4 -b $blacklist -- -P -m "1.0, 2.1" -f /home/ubuntu/pktgen_latency.lua
+expect "Pktgen>"
+send "\n"
+expect "Pktgen>"
+send "screen on\n"
+expect "Pktgen>"
+set count 10
+while { $count } {
+ send "page latency\n"
+ expect {
+ timeout { send "\n" }
+ -regexp {..*} {
+ set result "${result}$expect_out(0,string)"
+ set timeout 1
+ exp_continue
+ }
+ "Pktgen>"
+ }
+ set count [expr $count-1]
+}
+send "stop 0\n"
+expect "Pktgen>"
+send "quit\n"
+expect "#"
+
+set file [ open $log w ]
+puts $file $result
+EOF
+
+}
+
+run_pktgen()
+{
+ blacklist=$(lspci |grep Eth |awk '{print $1}'|head -1)
+ cd /pktgen-dpdk
+ touch /home/ubuntu/result.log
+ result_log="/home/ubuntu/result.log"
+ sudo expect /home/ubuntu/pktgen.exp $blacklist $result_log
+}
+
+main()
+{
+ load_modules
+ change_permissions
+ create_pktgen_config_lua
+ create_expect_file
+ add_interface_to_dpdk
+ run_pktgen
+}
+
+main
+
diff --git a/yardstick/benchmark/scenarios/networking/testpmd_fwd.bash b/yardstick/benchmark/scenarios/networking/testpmd_fwd.bash
new file mode 100644
index 000000000..ac18db491
--- /dev/null
+++ b/yardstick/benchmark/scenarios/networking/testpmd_fwd.bash
@@ -0,0 +1,55 @@
+#!/bin/sh
+
+set -e
+
+# Commandline arguments
+DST_MAC=$1 # MAC address of the peer port
+
+load_modules()
+{
+ if lsmod | grep "uio" &> /dev/null ; then
+ echo "uio module is loaded"
+ else
+ modprobe uio
+ fi
+
+ if lsmod | grep "igb_uio" &> /dev/null ; then
+ echo "igb_uio module is loaded"
+ else
+ insmod /dpdk/x86_64-native-linuxapp-gcc/kmod/igb_uio.ko
+ fi
+
+ if lsmod | grep "rte_kni" &> /dev/null ; then
+ echo "rte_kni module is loaded"
+ else
+ insmod /dpdk/x86_64-native-linuxapp-gcc/kmod/rte_kni.ko
+ fi
+}
+
+change_permissions()
+{
+ chmod 777 /sys/bus/pci/drivers/virtio-pci/*
+ chmod 777 /sys/bus/pci/drivers/igb_uio/*
+}
+
+add_interface_to_dpdk(){
+ interfaces=$(lspci |grep Eth |tail -n +2 |awk '{print $1}')
+ /dpdk/tools/dpdk-devbind.py --bind=igb_uio $interfaces
+}
+
+run_testpmd()
+{
+ blacklist=$(lspci |grep Eth |awk '{print $1}'|head -1)
+ cd /dpdk
+ sudo ./destdir/bin/testpmd -c 0x07 -n 4 -b $blacklist -- -a --eth-peer=1,$DST_MAC --forward-mode=mac
+}
+
+main()
+{
+ load_modules
+ change_permissions
+ add_interface_to_dpdk
+ run_testpmd
+}
+
+main
diff --git a/yardstick/ssh.py b/yardstick/ssh.py
index 339f834b7..cf890df6f 100644
--- a/yardstick/ssh.py
+++ b/yardstick/ssh.py
@@ -121,7 +121,9 @@ class SSH(object):
self._client.connect(self.host, username=self.user,
port=self.port, pkey=self.pkey,
key_filename=self.key_filename,
- password=self.password, timeout=1)
+ password=self.password,
+ allow_agent=False, look_for_keys=False,
+ timeout=1)
return self._client
except Exception as e:
message = ("Exception %(exception_type)s was raised "
@@ -261,3 +263,8 @@ class SSH(object):
with SCPClient(client.get_transport()) as scp:
scp.put(files, remote_path, recursive)
+
+ # keep shell running in the background, e.g. screen
+ def send_command(self, command):
+ client = self._get_client()
+ client.exec_command(command, get_pty=True)