summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.rst70
-rw-r--r--samples/ping-ext-ip.yaml2
-rw-r--r--samples/ping-ext-stimuli.yaml2
-rw-r--r--samples/ping-heat-context.yaml2
-rw-r--r--samples/ping-hot.yaml2
-rwxr-xr-xsamples/ping-iteration.yaml2
-rw-r--r--samples/ping-multiple-context.yaml4
-rw-r--r--samples/ping-multiple-vm.yaml2
-rw-r--r--samples/ping-option-list.yaml2
-rw-r--r--samples/ping-parallel.yaml2
-rw-r--r--samples/ping-serial.yaml2
-rw-r--r--samples/ping-template.yaml2
-rw-r--r--samples/ping.yaml2
-rw-r--r--tests/opnfv/test_cases/opnfv_yardstick_tc005.yaml2
-rw-r--r--tests/opnfv/test_cases/opnfv_yardstick_tc006.yaml2
-rw-r--r--tests/opnfv/test_cases/opnfv_yardstick_tc007.yaml2
-rw-r--r--tests/opnfv/test_cases/opnfv_yardstick_tc010.yaml2
-rw-r--r--tests/opnfv/test_cases/opnfv_yardstick_tc012.yaml2
-rw-r--r--tests/opnfv/test_cases/opnfv_yardstick_tc020.yaml2
-rw-r--r--tests/opnfv/test_cases/opnfv_yardstick_tc021.yaml2
-rw-r--r--tests/unit/test_ssh.py2
-rwxr-xr-xtools/yardstick-img-modify8
-rw-r--r--yardstick/ssh.py6
23 files changed, 50 insertions, 76 deletions
diff --git a/README.rst b/README.rst
index 36d3d2563..c6ff99185 100644
--- a/README.rst
+++ b/README.rst
@@ -3,12 +3,13 @@
.. http://creativecommons.org/licenses/by/4.0
.. (c) OPNFV, Ericsson AB and others.
-=========
+
Yardstick
=========
+
Overview
-========
+--------
Yardstick is a framework to test non functional characteristics of an NFV
Infrastructure as perceived by an application.
@@ -19,36 +20,14 @@ the target cloud, for example OpenStack Heat.
Yardstick measures a certain service performance but can also validate the
service performance to be within a certain level of agreement.
-Yardstick is _not_ about testing OpenStack functionality (tempest) or
-benchmarking OpenStack APIs (rally).
-
-Concepts
-========
-
-Benchmark - assess the relative performance of something
+For more information on Yardstick project, please visit:
-Benchmark configuration file - describes a single test case in yaml format
+ https://wiki.opnfv.org/display/yardstick/Yardstick
+ http://artifacts.opnfv.org/yardstick/colorado/3.0/docs/userguide/index.html#document-01-introduction
-Context
-- The set of cloud resources used by a benchmark (scenario)
-– Is a simplified Heat template (context is converted into a Heat template)
-
-Data
-- Output produced by running a benchmark, written to a file in json format
-
-Runner
-- Logic that determines how the test is run
-– For example number of iterations, input value stepping, duration etc
-
-Scenario
-- Type/class of measurement for example Ping, Pktgen, (Iperf, LmBench, ...)
-
-SLA
-- Some limit to be verified (specific to scenario), for example max_latency
-– Associated action to automatically take: assert, monitor etc
Architecture
-============
+------------
Yardstick is a command line tool written in python inspired by Rally. Yardstick
is intended to run on a computer with access and credentials to a cloud. The
@@ -61,35 +40,24 @@ serially or in parallel. Each runner runs in its own subprocess executing
commands in a VM using SSH. The output of each command is written as json
records to a file.
-Install
-=======
-
-TBD
+For more information on Yardstick architecture, please read:
-Run
-===
+ http://artifacts.opnfv.org/yardstick/colorado/3.0/docs/userguide/index.html#document-03-architecture
-TBD
-Custom Image
-============
+Installation
+------------
-pktgen test requires a ubuntu server cloud image
-TBD
+Yardstick supports installation on Ubuntu 14.04 or via a Docker image.
-Development Environment
-=======================
+To learn how to install Yardstick, consult the documentation available online
+at:
-Example setup known to work for development and test:
-- Development environment: Ubuntu14.04, eclipse, virtual environment
-- Cloud: Mirantis OpenStack 6.0 deployed using Virtualbox
+ http://artifacts.opnfv.org/yardstick/colorado/3.0/docs/userguide/index.html#document-07-installation
-Install dependencies:
-$ sudo apt-get install python-virtualenv python-dev libffi-dev libssl-dev libxml2-dev libxslt1-dev
-Create a virtual environment:
-$ virtualenv ~/yardstick_venv
-$ source ~/yardstick_venv/bin/activate
-$ easy_install -U setuptools
-$ python setup.py develop
+Developers
+----------
+For information on how to contribute to Yardstick, please visit:
+ https://wiki.opnfv.org/display/yardstick/Get+started+as+a+Yardstick+developer
diff --git a/samples/ping-ext-ip.yaml b/samples/ping-ext-ip.yaml
index d36c29544..3ce71e8a7 100644
--- a/samples/ping-ext-ip.yaml
+++ b/samples/ping-ext-ip.yaml
@@ -24,7 +24,7 @@ scenarios:
context:
name: demo
image: cirros-0.3.3
- flavor: m1.tiny
+ flavor: yardstick-flavor
user: cirros
servers:
hermes:
diff --git a/samples/ping-ext-stimuli.yaml b/samples/ping-ext-stimuli.yaml
index 451f0105f..d7efe063f 100644
--- a/samples/ping-ext-stimuli.yaml
+++ b/samples/ping-ext-stimuli.yaml
@@ -37,7 +37,7 @@ scenarios:
context:
name: demo
image: cirros-0.3.3
- flavor: m1.tiny
+ flavor: yardstick-flavor
user: cirros
servers:
goofy:
diff --git a/samples/ping-heat-context.yaml b/samples/ping-heat-context.yaml
index 5a8d09fbe..913912e50 100644
--- a/samples/ping-heat-context.yaml
+++ b/samples/ping-heat-context.yaml
@@ -25,7 +25,7 @@ context:
type: Heat
name: demo
image: cirros-0.3.3
- flavor: m1.tiny
+ flavor: yardstick-flavor
user: cirros
placement_groups:
diff --git a/samples/ping-hot.yaml b/samples/ping-hot.yaml
index b4b8f5228..1619a561f 100644
--- a/samples/ping-hot.yaml
+++ b/samples/ping-hot.yaml
@@ -33,7 +33,7 @@ context:
heat_template: /tmp/heat-templates/hot/servers_in_new_neutron_net.yaml
heat_parameters:
image: cirros-0.3.3
- flavor: m1.tiny
+ flavor: yardstick-flavor
key_name: yardstick
public_net: "660fc7c3-7a56-4faf-91e5-3c9ebdda0104"
private_net_name: "test"
diff --git a/samples/ping-iteration.yaml b/samples/ping-iteration.yaml
index a5e90941b..d399b399a 100755
--- a/samples/ping-iteration.yaml
+++ b/samples/ping-iteration.yaml
@@ -24,7 +24,7 @@ scenarios:
context:
name: demo
image: cirros-0.3.3
- flavor: m1.tiny
+ flavor: yardstick-flavor
user: cirros
placement_groups:
diff --git a/samples/ping-multiple-context.yaml b/samples/ping-multiple-context.yaml
index 1c27e1bf1..71b7994ff 100644
--- a/samples/ping-multiple-context.yaml
+++ b/samples/ping-multiple-context.yaml
@@ -24,7 +24,7 @@ contexts:
-
name: demo1
image: cirros-0.3.3
- flavor: m1.tiny
+ flavor: yardstick-flavor
user: cirros
placement_groups:
pgrp1:
@@ -39,7 +39,7 @@ contexts:
-
name: demo2
image: cirros-0.3.3
- flavor: m1.tiny
+ flavor: yardstick-flavor
user: cirros
placement_groups:
pgrp1:
diff --git a/samples/ping-multiple-vm.yaml b/samples/ping-multiple-vm.yaml
index 4055af14b..e8ebf495e 100644
--- a/samples/ping-multiple-vm.yaml
+++ b/samples/ping-multiple-vm.yaml
@@ -28,7 +28,7 @@ scenarios:
context:
name: demo
image: cirros-0.3.3
- flavor: m1.tiny
+ flavor: yardstick-flavor
user: cirros
servers:
diff --git a/samples/ping-option-list.yaml b/samples/ping-option-list.yaml
index 30d133eb8..1c31677ac 100644
--- a/samples/ping-option-list.yaml
+++ b/samples/ping-option-list.yaml
@@ -22,7 +22,7 @@ scenarios:
context:
name: demo
image: cirros-0.3.3
- flavor: m1.tiny
+ flavor: yardstick-flavor
user: cirros
placement_groups:
diff --git a/samples/ping-parallel.yaml b/samples/ping-parallel.yaml
index 00d261383..5761543b4 100644
--- a/samples/ping-parallel.yaml
+++ b/samples/ping-parallel.yaml
@@ -36,7 +36,7 @@ scenarios:
context:
name: demo
image: cirros-0.3.3
- flavor: m1.tiny
+ flavor: yardstick-flavor
user: cirros
placement_groups:
diff --git a/samples/ping-serial.yaml b/samples/ping-serial.yaml
index 9c492e481..59653db34 100644
--- a/samples/ping-serial.yaml
+++ b/samples/ping-serial.yaml
@@ -35,7 +35,7 @@ scenarios:
context:
name: demo
image: cirros-0.3.3
- flavor: m1.tiny
+ flavor: yardstick-flavor
user: cirros
servers:
diff --git a/samples/ping-template.yaml b/samples/ping-template.yaml
index cfc79206a..825dde285 100644
--- a/samples/ping-template.yaml
+++ b/samples/ping-template.yaml
@@ -29,7 +29,7 @@ scenarios:
context:
name: demo
image: cirros-0.3.3
- flavor: m1.tiny
+ flavor: yardstick-flavor
user: cirros
placement_groups:
diff --git a/samples/ping.yaml b/samples/ping.yaml
index 845d10dcc..5e922ea56 100644
--- a/samples/ping.yaml
+++ b/samples/ping.yaml
@@ -24,7 +24,7 @@ scenarios:
context:
name: demo
image: cirros-0.3.3
- flavor: m1.tiny
+ flavor: yardstick-flavor
user: cirros
placement_groups:
diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc005.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc005.yaml
index 732d73af7..f5a2778e8 100644
--- a/tests/opnfv/test_cases/opnfv_yardstick_tc005.yaml
+++ b/tests/opnfv/test_cases/opnfv_yardstick_tc005.yaml
@@ -36,7 +36,7 @@ scenarios:
context:
name: yardstick-TC005
image: yardstick-image
- flavor: m1.small
+ flavor: yardstick-flavor
user: ubuntu
servers:
diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc006.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc006.yaml
index 8b21c5bf1..7221518ab 100644
--- a/tests/opnfv/test_cases/opnfv_yardstick_tc006.yaml
+++ b/tests/opnfv/test_cases/opnfv_yardstick_tc006.yaml
@@ -16,7 +16,7 @@ scenarios:
vlan_net_2_name: apexlake_outbound_network
vlan_subnet_2_name: apexlake_outbound_subnet
vnic_type: direct
- vtc_flavor: m1.large
+ vtc_flavor: yardstick-flavor
runner:
type: Iteration
diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc007.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc007.yaml
index 107c28d1d..6f99ea6f2 100644
--- a/tests/opnfv/test_cases/opnfv_yardstick_tc007.yaml
+++ b/tests/opnfv/test_cases/opnfv_yardstick_tc007.yaml
@@ -19,7 +19,7 @@ scenarios:
vlan_net_2_name: apexlake_outbound_network
vlan_subnet_2_name: apexlake_outbound_subnet
vnic_type: direct
- vtc_flavor: m1.large
+ vtc_flavor: yardstick-flavor
num_of_neighbours: 2
amount_of_ram: 1G
number_of_cores: 2
diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc010.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc010.yaml
index f64968cb1..6c7f96799 100644
--- a/tests/opnfv/test_cases/opnfv_yardstick_tc010.yaml
+++ b/tests/opnfv/test_cases/opnfv_yardstick_tc010.yaml
@@ -26,7 +26,7 @@ scenarios:
context:
name: yardstick-TC010
image: yardstick-image
- flavor: m1.small
+ flavor: yardstick-flavor
user: ubuntu
servers:
diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc012.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc012.yaml
index a86943a51..ba246ff11 100644
--- a/tests/opnfv/test_cases/opnfv_yardstick_tc012.yaml
+++ b/tests/opnfv/test_cases/opnfv_yardstick_tc012.yaml
@@ -27,7 +27,7 @@ scenarios:
context:
name: demo
image: yardstick-image
- flavor: m1.small
+ flavor: yardstick-flavor
user: ubuntu
servers:
diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc020.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc020.yaml
index 7e5756001..cbdaf3970 100644
--- a/tests/opnfv/test_cases/opnfv_yardstick_tc020.yaml
+++ b/tests/opnfv/test_cases/opnfv_yardstick_tc020.yaml
@@ -15,7 +15,7 @@ scenarios:
vlan_net_2_name: apexlake_outbound_network
vlan_subnet_2_name: apexlake_outbound_subnet
vnic_type: direct
- vtc_flavor: m1.large
+ vtc_flavor: yardstick-flavor
runner:
type: Iteration
diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc021.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc021.yaml
index 769d75618..17249785a 100644
--- a/tests/opnfv/test_cases/opnfv_yardstick_tc021.yaml
+++ b/tests/opnfv/test_cases/opnfv_yardstick_tc021.yaml
@@ -15,7 +15,7 @@ scenarios:
vlan_net_2_name: apexlake_outbound_network
vlan_subnet_2_name: apexlake_outbound_subnet
vnic_type: direct
- vtc_flavor: m1.large
+ vtc_flavor: yardstick-flavor
num_of_neighbours: 2
amount_of_ram: 1G
number_of_cores: 2
diff --git a/tests/unit/test_ssh.py b/tests/unit/test_ssh.py
index 88638a0a8..8b828ed7c 100644
--- a/tests/unit/test_ssh.py
+++ b/tests/unit/test_ssh.py
@@ -314,7 +314,7 @@ class SSHRunTestCase(unittest.TestCase):
self.test_client._put_file_shell("localfile", "remotefile", 0o42)
self.test_client.run.assert_called_once_with(
- 'cat > "remotefile"&& chmod -- 042 "remotefile"',
+ 'cat > remotefile && chmod -- 042 remotefile',
stdin=mock_open.return_value.__enter__.return_value)
@mock.patch("yardstick.ssh.os.stat")
diff --git a/tools/yardstick-img-modify b/tools/yardstick-img-modify
index 0033383ef..68ce6e223 100755
--- a/tools/yardstick-img-modify
+++ b/tools/yardstick-img-modify
@@ -152,9 +152,15 @@ cleanup() {
mount | grep $mountdir/proc && umount $mountdir/proc
mount | grep $mountdir && umount $mountdir
mount | grep "/mnt/vivid" && umount "/mnt/vivid"
+
if [ -f $raw_imgfile ]; then
- kpartx -dv $raw_imgfile
+ #kpartx -dv $raw_imgfile sometimes failed, we should checked it agein.
+ #if [ -z "$(kpartx -l $raw_imgfile | grep 'loop deleted')" ]; then
+ # kpartx -dv $raw_imgfile
+ #fi
+ kpartx -dv $raw_imgfile || true
fi
+
rm -f $raw_imgfile
rm -rf $mountdir
}
diff --git a/yardstick/ssh.py b/yardstick/ssh.py
index 2ba6de92e..3081001b6 100644
--- a/yardstick/ssh.py
+++ b/yardstick/ssh.py
@@ -313,14 +313,14 @@ class SSH(object):
def _put_file_shell(self, localpath, remotepath, mode=None):
# quote to stop wordpslit
- cmd = ['cat > "%s"' % remotepath]
+ cmd = ['cat > %s' % remotepath]
if mode is not None:
# use -- so no options
- cmd.append('chmod -- 0%o "%s"' % (mode, remotepath))
+ cmd.append('chmod -- 0%o %s' % (mode, remotepath))
with open(localpath, "rb") as localfile:
# only chmod on successful cat
- cmd = "&& ".join(cmd)
+ cmd = " && ".join(cmd)
self.run(cmd, stdin=localfile)
def put_file(self, localpath, remotepath, mode=None):