yardstick.git
7 years agoBugfix: don't use jsonutils.load, use loads() 33/29533/3
Ross Brattain [Wed, 1 Mar 2017 06:50:40 +0000 (22:50 -0800)]
Bugfix: don't use jsonutils.load, use loads()

It looks like jsonutils.load uses a codec reader
to read from the file, but we already are using
Python 3.5 open() which should already do the UTF-8
decode itself.

    return json.load(codecs.getreader(encoding)(fp), **kwargs)C

When we use jsonutils.load() we get a TypeErorr when concating
str and bytes

2017-02-28 16:42:38,431 yardstick.cmd.commands.task task.py:61 ERROR
Traceback (most recent call last):
  File "yardstick/yardstick/cmd/commands/task.py", line 58, in do_start
    self._finish()
  File "yardstick/yardstick/cmd/commands/task.py", line 69, in _finish
    result = read_json_from_file(self.output_file).get('result')
  File "yardstick/yardstick/common/utils.py", line 136, in read_json_from_file
    return jsonutils.load(f)
  File "yardstick_venv3/lib/python3.5/site-packages/oslo_serialization/jsonutils.py", line 241, in load
    return json.load(codecs.getreader(encoding)(fp), **kwargs)
  File "/usr/lib/python3.5/json/__init__.py", line 265, in load
    return loads(fp.read(),
  File "yardstick_venv3/lib/python3.5/codecs.py", line 497, in read
    data = self.bytebuffer + newdata
TypeError: can't concat bytes to str

So switch back to jsonutils.loads() which does nothing if the
bytes are already decoded.

JIRA: YARDSTICK-584

Change-Id: I36acfda3df2b46d16a87f2741a04fe7ee8e8d89b
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
7 years agoMerge "Add uefi image support for yardstick"
Rex Lee [Wed, 8 Mar 2017 07:17:05 +0000 (07:17 +0000)]
Merge "Add uefi image support for yardstick"

7 years agoYardstick Preliminary Documentation 13/30013/1
rexlee8776 [Wed, 8 Mar 2017 07:12:55 +0000 (07:12 +0000)]
Yardstick Preliminary Documentation

JIRA: YARDSTICK-554

align with opnfvdocs path structure about testing projects

Change-Id: I6c2f2d37e41447dccd76b9f4426d00fd85cb1e3b
Signed-off-by: rexlee8776 <limingjiang@huawei.com>
7 years agoupdate trex version for constants.so import bug 27/29827/1
Ross Brattain [Mon, 6 Mar 2017 07:30:13 +0000 (23:30 -0800)]
update trex version for constants.so import bug

Previously before we disabled Trex in the unittests
we were hitting an error when running Python3.5,
see full description in 28209

https://gerrit.opnfv.org/gerrit/#/c/28209/

File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/trex/scripts/external_libs/pyzmq-14.5.0/python3/fedora18/64bit/zmq/backend/cython/__init__.py", line 6, in <module>
    from . import (constants, error, message, context,
ImportError: cannot import name 'constants'

It looks like this was an actual upstream Trex bug
and it was fixed in

https://github.com/cisco-system-traffic-generator/trex-core/commit/9808fce2b0b3b5b7c9b28303e99486501a1cc10d
zmq: fix wrong constants.so (was used from 3.5 to both versions)
Yaroslav Brustinov <ybrustin@cisco.com>

This Trex fix should be in v2.20.

We don't test Trex in unitests, but people running
Trex on Python3 should hit this issue.

Change-Id: Ic914e48819d7fd3e951628f7c3d3778849da7d94
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
7 years agoAdd uefi image support for yardstick 73/29073/3
Catalina Focsa [Mon, 20 Feb 2017 12:55:23 +0000 (13:55 +0100)]
Add uefi image support for yardstick

Add support for downloading and building an uefi single part image.
Keep three part image support if needed.
Keep modifications required for arm64, when using vivid.
Install and use parted required for GPT partitioning.

Change-Id: I1a9a20701e2fe1f6f644f2c687c5da2e09b69d89
Signed-off-by: Catalina Focsa <catalina.focsa@enea.com>
7 years agoMerge "Split reporting_target from http_target in yardstick_verify"
Rex Lee [Fri, 3 Mar 2017 06:54:07 +0000 (06:54 +0000)]
Merge "Split reporting_target from http_target in yardstick_verify"

7 years agoenv prepare check openrc already sourced 35/29535/2
rexlee8776 [Wed, 1 Mar 2017 06:55:55 +0000 (06:55 +0000)]
env prepare check openrc already sourced

env prepare should check if openrc is sourced before
using os_fetch_utils to fetch openrc

JIRA: YARDSTICK-577

Change-Id: I0efb0bae3b408156b1133812c29583ab8c58d94b
Signed-off-by: rexlee8776 <limingjiang@huawei.com>
7 years agoMerge "fix: remove headers from generated files"
Kubi [Wed, 1 Mar 2017 01:55:56 +0000 (01:55 +0000)]
Merge "fix: remove headers from generated files"

7 years agoMerge "heat: replace dict key checking with .get()"
Kubi [Wed, 1 Mar 2017 01:55:28 +0000 (01:55 +0000)]
Merge "heat: replace dict key checking with .get()"

7 years agoMerge "Re-enable floating IP tests for bgpvpn"
Rex Lee [Wed, 1 Mar 2017 01:27:41 +0000 (01:27 +0000)]
Merge "Re-enable floating IP tests for bgpvpn"

7 years agomove external_network auto-assign to Heat context 31/28731/4
Ross Brattain [Mon, 13 Feb 2017 19:30:47 +0000 (11:30 -0800)]
move external_network auto-assign to Heat context

if there are no external networks defined
then assign the external network to the first
network as determined by standard sorting

Change-Id: I9d32eca258f8e7de3d44cec4124c0e8c020c0b85
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
7 years agoSplit reporting_target from http_target in yardstick_verify 67/29467/2
chenjiankun [Tue, 28 Feb 2017 03:42:48 +0000 (03:42 +0000)]
Split reporting_target from http_target in yardstick_verify

JIRA: YARDSTICK-576

Currently the reporting_target reuse the http_target.
But if we want to custom reporting_target, the http_target is also change,
and the yardstick result will store in mongoDB.
So I add reporting_target to split them.

Change-Id: Ib0e4e8ec9a55f49027f9776931fdaa7dc194654b
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
7 years agostream default INFO, filehdr default DEBUG 27/29427/3
rexlee8776 [Mon, 27 Feb 2017 10:49:57 +0000 (10:49 +0000)]
stream default INFO, filehdr default DEBUG

The DEBUG log can be stored as file and pushed into artifacts.
Default sys.out level should be INFO. Stream level can be
changed to DEBUG if cli "-d" is enabled.
remove "-v" since it's not useful for a test framework

JIRA: YARDSTICK-507

Change-Id: I3caafd31a2caac73b0e3f33c2762c090e76c707e
Signed-off-by: rexlee8776 <limingjiang@huawei.com>
7 years agoRe-enable floating IP tests for bgpvpn 49/29349/2
Romanos Skiadas [Fri, 24 Feb 2017 10:17:42 +0000 (12:17 +0200)]
Re-enable floating IP tests for bgpvpn

Change-Id: I46e4e21787a9b0a3104b2a684d62f50681258205
Signed-off-by: Romanos Skiadas <rski@intracom-telecom.com>
7 years agoheat: replace dict key checking with .get() 09/29409/1
Ross Brattain [Mon, 27 Feb 2017 02:57:46 +0000 (18:57 -0800)]
heat: replace dict key checking with .get()

We init all the fields to None, so the default value
is None, which is what .get() returns when the key
is not present it the dictionary.

Replace

  if key in dict:
    self.val = dict[key]

with

  self.val = dict.get(key)

This also has the added beneifit of re-initializing
default values to None.

In idiomatic Python we do not check a dictionary twice
if we can avoid it.  Either use dict.get() with a default
value or catch the KeyError and do the correct thing.

Change-Id: If8d1caeb7288f888f02622d62e8db9f59f50717a
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
7 years agofix: remove headers from generated files 07/29407/1
Ross Brattain [Mon, 27 Feb 2017 03:26:46 +0000 (19:26 -0800)]
fix: remove headers from generated files

experiment_[12].yaml are generated from templates
during the unittest, so they will be overwritten.

yardstick/vTC/apexlake/tests/data/generated_templates/vTC.yaml
was submitted by Vincenzo Riccobene in gerrit
https://gerrit.opnfv.org/gerrit/#/c/11333/
so assign copyright to Intel instead of invalid
user@TRAFCLASS-PACKET1.fuel.local

Change-Id: If516037c4f4c859e417ca12e6d5300e4e0a3817c
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
7 years agoMerge "BugFix: Adopt to latest result structure while parsing the results"
Rex Lee [Mon, 27 Feb 2017 03:12:35 +0000 (03:12 +0000)]
Merge "BugFix: Adopt to latest result structure while parsing the results"

7 years agoMerge "ci in huawei-pod1 do not run test case after tc074"
Rex Lee [Mon, 27 Feb 2017 03:10:35 +0000 (03:10 +0000)]
Merge "ci in huawei-pod1 do not run test case after tc074"

7 years agoMerge "BugFix: update to paramiko 1.18.0 to fix TypeError"
Kubi [Mon, 27 Feb 2017 03:08:37 +0000 (03:08 +0000)]
Merge "BugFix: update to paramiko 1.18.0 to fix TypeError"

7 years agoheat context support affinity and anti-affinity 97/28897/10
rexlee8776 [Tue, 14 Feb 2017 02:53:25 +0000 (02:53 +0000)]
heat context support affinity and anti-affinity

JIRA: YARDSTICK-566

Current Heat context support affinity and availability arguments
but not support affinity and anti-affinity.
Enhance Heat context to support affinity and anti-affinity:
1. can create heat server group with affinity/anti-affinity
2. each server could be specified which server group they are in

Change-Id: I46e7376fd116c6e109cb5dcb1c168460918e6d43
Signed-off-by: rexlee8776 <limingjiang@huawei.com>
7 years agoAdd common method of openstack in openstack_utils 59/29059/9
chenjiankun [Mon, 20 Feb 2017 16:05:29 +0000 (16:05 +0000)]
Add common method of openstack in openstack_utils

JIRA: YARDSTICK-569

We have much redundancy code when using nova/neutron/glance... python client.
So I write this code in openstack_utils for calling.

Change-Id: I322b7577de4933246a15e6742ae5a28bea16eb02
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
7 years agoRecord test case names when run a task using API 09/27009/5
chenjiankun [Mon, 16 Jan 2017 02:42:14 +0000 (02:42 +0000)]
Record test case names when run a task using API

JIRA: YARDSTICK-509

Currently we use influxdb as database and will not record test case name
when run a test suite. So if we must offer test case name if we want to
get result from API.
I will record test case name when run a test suite. So we needn't
offer test case any more when call for get result API.

Change-Id: I87ea4770422cbc46aa6671bfcc53bd4498825eef
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
7 years agoMerge "Update missing license headers"
Rex Lee [Thu, 23 Feb 2017 02:09:06 +0000 (02:09 +0000)]
Merge "Update missing license headers"

7 years agoMerge "improving if conditions :)"
Rex Lee [Thu, 23 Feb 2017 01:38:11 +0000 (01:38 +0000)]
Merge "improving if conditions :)"

7 years agoMerge "collectd: typo and call super()"
Rex Lee [Thu, 23 Feb 2017 01:33:48 +0000 (01:33 +0000)]
Merge "collectd: typo and call super()"

7 years agoMerge "Add python-pip & flake8 package to install.sh"
Rex Lee [Thu, 23 Feb 2017 01:19:28 +0000 (01:19 +0000)]
Merge "Add python-pip & flake8 package to install.sh"

7 years agoBugFix: update to paramiko 1.18.0 to fix TypeError 45/29245/1
Ross Brattain [Wed, 22 Feb 2017 17:03:16 +0000 (09:03 -0800)]
BugFix: update to paramiko 1.18.0 to fix TypeError

with python 3 there is a paramiko error
due to .keys() usages in python 3

File "python3.5/site-packages/paramiko/ssh_exception.py", line 166, in __init__
  body = ', '.join([x[0] for x in addrs[:-1]
TypeError: 'dict_keys' object is not subscriptable

paramiko 1.16.0 tries to index addr.keys() but
addr.keys() is not a dict view in Python 3 and not a list
so we need to convert .keys() to a list, using sorted()

This was most recently fixed in
https://github.com/paramiko/paramiko/commit/0411010d55755913fa7bd5b0a9c719c8548549f4

which should be in paramiko 1.18.0

Change-Id: I6b10664611cab3b21d3aa33ecf1343ff134f59a1
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
7 years agoMerge "add grafana dashboard for os-nosdn-nofeature-ha"
Jing Lu [Wed, 22 Feb 2017 02:53:03 +0000 (02:53 +0000)]
Merge "add grafana dashboard for os-nosdn-nofeature-ha"

7 years agoadd grafana dashboard for os-nosdn-nofeature-ha 39/29139/2
rexlee8776 [Tue, 21 Feb 2017 10:57:51 +0000 (10:57 +0000)]
add grafana dashboard for os-nosdn-nofeature-ha

JIRA: YARDSTICK-401

Change-Id: Ibe8eaaf6bf9d283e51ee3fb2a3062344179a11c6
Signed-off-by: rexlee8776 <limingjiang@huawei.com>
Signed-off-by: root <limingjiang@huawei.com>
7 years agoCreate Grafana dashboards according config file under root_path/dashboard 17/29117/5
chenjiankun [Tue, 21 Feb 2017 07:26:51 +0000 (07:26 +0000)]
Create Grafana dashboards according config file under root_path/dashboard

JIRA: YARDSTICK-570

Currently we only create ping Grafana dashboard when create Grafana
docker container.
Actually we need to create some default dashboards.

Change-Id: Icee975ad8c1c960b27625274c775f1716edfa03e
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
7 years agobottlenecks: stress ping yaml file bug fix 33/29133/1
liyin [Tue, 21 Feb 2017 09:36:44 +0000 (17:36 +0800)]
bottlenecks: stress ping yaml file bug fix

JIRA:YARDSTICK-565

This will remove the limit of "sla"
The "sla" will cause a error of bottlenecks.
so this patch will change it,
so bottlenecks could find the system bottleneck.

Change-Id: I8634e34841677a2032cebd26f1b40f6a0cb2bd39
Signed-off-by: liyin <liyin11@huawei.com>
7 years agoci in huawei-pod1 do not run test case after tc074 29/29129/1
chenjiankun [Tue, 21 Feb 2017 08:27:28 +0000 (08:27 +0000)]
ci in huawei-pod1 do not run test case after tc074

JIRA: YARDSTICK-568

https://build.opnfv.org/ci/view/yardstick/job/yardstick-compass-baremetal-daily-master/814/consoleFull
the test case tc075 and tc027 after tc074 does not run in the ci, which
is not correct.
the logs shows the suite quit after tc074 finishes.

The reason is:
In this patch: https://gerrit.opnfv.org/gerrit/#/c/26763/
I add a task_id to the context name, but in tc074, it do not have a
name.
It will cause a keyError.

Change-Id: I09608675d9dadcc3ff0d825ca63db3be5e414120
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
7 years agoimproving if conditions :) 15/29015/2
Deepak S [Sat, 18 Feb 2017 12:36:56 +0000 (18:06 +0530)]
improving if conditions :)

Change-Id: I2fad46b07b252f898acfe116dd6542946b8a26a8
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
7 years agoMerge "Docs: Adding preliminary documentation for Network Service Benchmarking."
Kubi [Mon, 20 Feb 2017 10:43:54 +0000 (10:43 +0000)]
Merge "Docs: Adding preliminary documentation for Network Service Benchmarking."

7 years agoAdd python-pip & flake8 package to install.sh 13/29013/1
Deepak S [Sat, 18 Feb 2017 12:14:16 +0000 (17:44 +0530)]
Add python-pip & flake8 package to install.sh

On a fresh system, we need "python-pip & flake8" to run
yardstick. Adding same to install.sh

Change-Id: I3e13ffdf53eed7e976e55e2b23afd1b1ea50ec33
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
7 years agoDocs: Adding preliminary documentation for Network Service Benchmarking. 27/28527/9
Deepak S [Mon, 13 Feb 2017 08:35:33 +0000 (00:35 -0800)]
Docs: Adding preliminary documentation for Network Service Benchmarking.

This patch adds overview & installation instruction to get started on
VNF testing.

Change-Id: I73c9616d7154f701f542ff9a49c32a9516902ff4
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
7 years agoMerge "yardstick ping testcase yaml update"
Kubi [Sat, 18 Feb 2017 06:40:45 +0000 (06:40 +0000)]
Merge "yardstick ping testcase yaml update"

7 years agoUpdate missing license headers 33/28833/4
Deepak S [Fri, 17 Feb 2017 12:39:49 +0000 (18:09 +0530)]
Update missing license headers

Change-Id: I063fd37fe25754c94d164ae5a209d15b69322093
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
7 years agoMerge " add scenario to solve apex ci fail"
Kubi [Fri, 17 Feb 2017 07:31:38 +0000 (07:31 +0000)]
Merge " add scenario to solve apex ci fail"

7 years agoMerge "solve apex ci problem (new scenario)"
Kubi [Fri, 17 Feb 2017 07:31:34 +0000 (07:31 +0000)]
Merge "solve apex ci problem (new scenario)"

7 years agoMerge "tc076 rst documentation"
Kubi [Fri, 17 Feb 2017 07:31:25 +0000 (07:31 +0000)]
Merge "tc076 rst documentation"

7 years ago add scenario to solve apex ci fail 09/28809/2
rexlee8776 [Thu, 16 Feb 2017 11:13:02 +0000 (11:13 +0000)]
 add scenario to solve apex ci fail

due to https://gerrit.opnfv.org/gerrit/#/c/27605/
os-odl_l2-bgpvpn-ha in apex has already been renamed to
be os-odl-bgpvpn-ha, so add a new one.

Change-Id: I167bf295b67b2dddbd3da2aa5a2dca666b3fa152
Signed-off-by: rexlee8776 <limingjiang@huawei.com>
7 years agosolve apex ci problem (new scenario) 13/28813/2
rexlee8776 [Thu, 16 Feb 2017 11:33:46 +0000 (11:33 +0000)]
solve apex ci problem (new scenario)

new scenario os-odl-gluon-noha in apex pod

Change-Id: I0151ce227e2a3ff476044f0b5c8d4ed61d20b21a
Signed-off-by: rexlee8776 <limingjiang@huawei.com>
7 years agoyardstick ping testcase yaml update 15/28815/3
liyin [Thu, 16 Feb 2017 11:29:41 +0000 (19:29 +0800)]
yardstick ping testcase yaml update

JIRA:YARDSTICK-565

this patch will add a yaml file to sample floder.
This yaml will as the yaml file of bottlenecks stress test.
some ping test code will be update.

Change-Id: Icc336d5857f4484334bab61870b8568be887ec30
Signed-off-by: liyin <liyin11@huawei.com>
7 years agotc076 rst documentation 99/28799/2
rexlee8776 [Thu, 16 Feb 2017 09:33:26 +0000 (09:33 +0000)]
tc076 rst documentation

JIRA: YARDSTICK-534

Change-Id: Idcd8fb600d64c0300b5aaf9bd4108eca6c866526
Signed-off-by: rexlee8776 <limingjiang@huawei.com>
7 years agoMerge "This Patch is used to add grafana config to opnfv dashboard for kvmfornfv_cycl...
Kubi [Thu, 16 Feb 2017 10:20:41 +0000 (10:20 +0000)]
Merge "This Patch is used to add grafana config to opnfv dashboard for kvmfornfv_cyclictest_cpustress_idle,kvmfornfv_cyclictest_memorystress_idle and kvmfornfv_cyclictest_iostress_idle testcases"

7 years agoMerge "Scenario is reporting result for last test only"
Rex Lee [Thu, 16 Feb 2017 09:38:29 +0000 (09:38 +0000)]
Merge "Scenario is reporting result for last test only"

7 years agoMerge "Bugfix: report date format wrong when upload result data to mongoDB"
Jing Lu [Thu, 16 Feb 2017 09:38:02 +0000 (09:38 +0000)]
Merge "Bugfix: report date format wrong when upload result data to mongoDB"

7 years agoBugfix: report date format wrong when upload result data to mongoDB 71/28771/1
chenjiankun [Thu, 16 Feb 2017 11:09:11 +0000 (11:09 +0000)]
Bugfix: report date format wrong when upload result data to mongoDB

JIRA: YARDSTICK-562

Currently we use the follow code to upload data to mongoDB:
report $scenario_status $start_date $stop_date
And the date format will be '%Y-%m-%d' while we want to it be '%Y-%m-%d
%H:%M:%S'ã

Change-Id: I07e601a6362c844a77f9b15a6bcd225ac2ab3f95
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
7 years agoMerge "Context improvement: add support for configing node environment"
Rex Lee [Thu, 16 Feb 2017 09:37:16 +0000 (09:37 +0000)]
Merge "Context improvement: add support for configing node environment"

7 years agoContext improvement: add support for configing node environment 09/28509/7
chenjiankun [Mon, 13 Feb 2017 11:24:20 +0000 (11:24 +0000)]
Context improvement: add support for configing node environment

JIRA: YARDSTICK-556

Currently we do can not config the node environment before heat create a
stack.
But in lots of scene, we need to config node environment before heat.
So I add support for it.

Change-Id: Iac1b74dc780eb40e6ab2c9cf04ed14e2b8f91ca8
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
7 years agoMerge "Bugfix: AttributeError: 'dict' object has no attribute 'encode'"
Jing Lu [Thu, 16 Feb 2017 09:36:46 +0000 (09:36 +0000)]
Merge "Bugfix: AttributeError: 'dict' object has no attribute 'encode'"

7 years agoMerge "New reliability/availability testcase - IP datagram error rate and etc."
Rex Lee [Thu, 16 Feb 2017 09:06:49 +0000 (09:06 +0000)]
Merge "New reliability/availability testcase - IP datagram error rate and etc."

7 years agoMerge "NSBPerf: fix indent"
Rex Lee [Thu, 16 Feb 2017 06:49:53 +0000 (06:49 +0000)]
Merge "NSBPerf: fix indent"

7 years agoMerge "load_images: update flavor for _ovs_ scenarios"
Kubi [Thu, 16 Feb 2017 06:44:57 +0000 (06:44 +0000)]
Merge "load_images: update flavor for _ovs_ scenarios"

7 years agoMerge "pylint fixes: remove redundant parens, fix comparison order"
Rex Lee [Thu, 16 Feb 2017 06:30:28 +0000 (06:30 +0000)]
Merge "pylint fixes: remove redundant parens, fix comparison order"

7 years agoMerge "Update Openstack CLI Command in yardstick ha test framework configuration...
Rex Lee [Thu, 16 Feb 2017 02:40:17 +0000 (02:40 +0000)]
Merge "Update Openstack CLI Command in yardstick ha test framework configuration files and TC052"

7 years agoMerge "set log file to store debug info"
Rex Lee [Thu, 16 Feb 2017 02:39:54 +0000 (02:39 +0000)]
Merge "set log file to store debug info"

7 years agoBugfix: AttributeError: 'dict' object has no attribute 'encode' 67/28567/5
chenjiankun [Tue, 14 Feb 2017 10:06:25 +0000 (10:06 +0000)]
Bugfix: AttributeError: 'dict' object has no attribute 'encode'

JIRA: YARDSTICK-557

If we run task with sample/ping.yaml
We will encounter below error, here is the log:
Traceback (most recent call last):
File "/usr/local/bin/yardstick", line 11, in <module>
load_entry_point('yardstick==0.1.dev0', 'console_scripts',
        'yardstick')()
File "/usr/local/lib/python2.7/dist-packages/yardstick/main.py",
line 49, in main
YardstickCLI().main(sys.argv[1:])
File "/usr/local/lib/python2.7/dist-packages/yardstick/cmd/cli.py",
line 167, in main
self._dispath_func_notask()
File "/usr/local/lib/python2.7/dist-packages/yardstick/cmd/cli.py",
line 145, in _dispath_func_notask
func(CONF.category)
File
"/usr/local/lib/python2.7/dist-packages/yardstick/cmd/commands/task.py",
line 45, in do_start
Task().start(param, **kwargs)
File
"/usr/local/lib/python2.7/dist-packages/yardstick/benchmark/core/task.py",
line 83, in start
self._run(scenarios, run_in_parallel, args.output_file)
File
"/usr/local/lib/python2.7/dist-packages/yardstick/benchmark/core/task.py",
line 131, in _run
runner = run_one_scenario(scenario, output_file)
File
"/usr/local/lib/python2.7/dist-packages/yardstick/benchmark/core/task.py",
line 410, in run_one_scenario
if is_ip_addr(scenario_cfg["target"]):
    File
    "/usr/local/lib/python2.7/dist-packages/yardstick/benchmark/core/task.py",
    line 358, in is_ip_addr
    ipaddress.ip_address(addr.encode('utf-8'))
    AttributeError: 'dict' object has no attribute 'encode'

Change-Id: Iba1570416bd8614e38c9e847de730a31d9ddedc2
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
7 years agoScenario is reporting result for last test only 95/28195/4
chenjiankun [Tue, 7 Feb 2017 17:41:38 +0000 (17:41 +0000)]
Scenario is reporting result for last test only

JIRA: YARDSTICK-548

If executing Yardstick scenario with multiple tests, result to file is
reported only for the last test.
In attachment screen output and yardstick.out from following command
yardstick task start --suite tests/opnfv/test_suites/opnfv_smoke.yaml
--output-file /mnt/log/yardstick.out

Change-Id: I8aa446b284dca1bbd1667de2f476ddadfad1337f
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
7 years agoNSBPerf: fix indent 55/28655/1
Ross Brattain [Tue, 7 Feb 2017 10:18:43 +0000 (02:18 -0800)]
NSBPerf: fix indent

Change-Id: Ic51168aa786a5ac5ed589c2c4d23882d76253343
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
7 years agoload_images: update flavor for _ovs_ scenarios 25/28625/2
Maryam Tahhan [Tue, 14 Feb 2017 14:30:21 +0000 (14:30 +0000)]
load_images: update flavor for _ovs_ scenarios

Update the nova flavor used for the following scenarios:
* os-nosdn-kvm_ovs_dpdk_bar-ha
* os-nosdn-kvm_ovs_dpdk-ha
without interfering with older scenario os-nosdn-ovs-noha.

Change-Id: Id641e57a5f41413a891d4335ce2d119a5e8088e9
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
7 years agocollectd: typo and call super() 53/28653/1
Ross Brattain [Thu, 26 Jan 2017 23:43:21 +0000 (15:43 -0800)]
collectd: typo and call super()

by convention is it good to always call super() even
when inheriting from object

Change-Id: I0618a4957c9a3e9858b0fd964d7c9e663b31b97f
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
7 years agoUpdate Openstack CLI Command in yardstick ha test framework configuration files and... 13/28613/1
tjuyinkanglin [Tue, 14 Feb 2017 12:37:24 +0000 (07:37 -0500)]
Update Openstack CLI Command in yardstick ha test framework configuration files and TC052

JIRA: YARDSTICK-547

Change-Id: Idde2dc56436c9cf4b8696bfd0056ab4e47c97c9a
Signed-off-by: tjuyinkanglin <14_ykl@tongji.edu.cn>
7 years agoMerge "Update Openstack CLI Command for Scenario-based HA Testcases which have multip...
Kubi [Tue, 14 Feb 2017 09:24:29 +0000 (09:24 +0000)]
Merge "Update Openstack CLI Command for Scenario-based HA Testcases which have multiple commands: yardstick tc025, tc050 ,tc051,  tc053, tc054"

7 years agoMerge "Update CLI Command in yardstick TC019, TC045~TC048"
Kubi [Tue, 14 Feb 2017 09:23:33 +0000 (09:23 +0000)]
Merge "Update CLI Command in yardstick TC019, TC045~TC048"

7 years agoMerge "heat: minor fixes, don't use len > 0 and use next instead of [0]"
Kubi [Tue, 14 Feb 2017 09:23:17 +0000 (09:23 +0000)]
Merge "heat: minor fixes, don't use len > 0 and use next instead of [0]"

7 years agoThis Patch is used to add grafana config to opnfv dashboard for 91/28591/1
Shravani [Tue, 14 Feb 2017 08:54:18 +0000 (14:24 +0530)]
This Patch is used to add grafana config to opnfv dashboard for
kvmfornfv_cyclictest_cpustress_idle,kvmfornfv_cyclictest_memorystress_idle
and kvmfornfv_cyclictest_iostress_idle testcases

Change-Id: Ia49c33a658f342e96cb9cb3fbc499e56bb08ebd6
Co-Authored by:Rajitha <y.rajitha@tcs.com>
Signed-off-by:Shravani <shravani.p@tcs.com>

7 years agoMerge "Bux: task_id parameter from API can not pass to yardstick core"
Rex Lee [Tue, 14 Feb 2017 08:45:58 +0000 (08:45 +0000)]
Merge "Bux: task_id parameter from API can not pass to yardstick core"

7 years agoUpdate Openstack CLI Command for Scenario-based HA Testcases which have multiple... 89/28589/1
tjuyinkanglin [Tue, 14 Feb 2017 08:12:41 +0000 (03:12 -0500)]
Update Openstack CLI Command for Scenario-based HA Testcases which have multiple commands: yardstick tc025, tc050 ,tc051,  tc053, tc054

JIRA: YARDSTICK-546

Change-Id: Id94b32f5e053f3f6a7c78980dce22b3aab7bbd13
Signed-off-by: tjuyinkanglin <14_ykl@tongji.edu.cn>
7 years agoMerge "fix super() calls, must use explicit class name"
Rex Lee [Tue, 14 Feb 2017 07:30:56 +0000 (07:30 +0000)]
Merge "fix super() calls, must use explicit class name"

7 years agoMerge "more logging fixes"
Rex Lee [Tue, 14 Feb 2017 07:27:40 +0000 (07:27 +0000)]
Merge "more logging fixes"

7 years agoMerge "remove trex install from run_tests.sh."
Rex Lee [Tue, 14 Feb 2017 06:42:53 +0000 (06:42 +0000)]
Merge "remove trex install from run_tests.sh."

7 years agoMerge "heat: convert open to context manager"
Rex Lee [Tue, 14 Feb 2017 06:36:14 +0000 (06:36 +0000)]
Merge "heat: convert open to context manager"

7 years agoMerge "heat: close file before parsing template"
Rex Lee [Tue, 14 Feb 2017 06:34:18 +0000 (06:34 +0000)]
Merge "heat: close file before parsing template"

7 years agoMerge "vnf_generic: replace list comprehension with generator expression"
Jing Lu [Tue, 14 Feb 2017 06:05:28 +0000 (06:05 +0000)]
Merge "vnf_generic: replace list comprehension with generator expression"

7 years agoMerge "Bugfix: write_json_to_file: use json.dump with files"
Jing Lu [Tue, 14 Feb 2017 06:05:22 +0000 (06:05 +0000)]
Merge "Bugfix: write_json_to_file: use json.dump with files"

7 years agoMerge "nsb: move NSB root to constant, add unittest"
Jing Lu [Tue, 14 Feb 2017 06:05:01 +0000 (06:05 +0000)]
Merge "nsb: move NSB root to constant, add unittest"

7 years agoMerge "vnf_generic: convert sshmanager to class"
Jing Lu [Tue, 14 Feb 2017 06:04:53 +0000 (06:04 +0000)]
Merge "vnf_generic: convert sshmanager to class"

7 years agoMerge "test_tg_text: fix indentation"
Jing Lu [Tue, 14 Feb 2017 06:04:31 +0000 (06:04 +0000)]
Merge "test_tg_text: fix indentation"

7 years agoMerge "vnfdgen: replace six.iteritems() with .items()"
Jing Lu [Tue, 14 Feb 2017 06:04:13 +0000 (06:04 +0000)]
Merge "vnfdgen: replace six.iteritems() with .items()"

7 years agoMerge "test_vnf_generic: fix unitests when files are present"
Jing Lu [Tue, 14 Feb 2017 06:03:57 +0000 (06:03 +0000)]
Merge "test_vnf_generic: fix unitests when files are present"

7 years agoMerge "Bugfix: apex_lake: sort json keys for git"
Jing Lu [Tue, 14 Feb 2017 06:03:40 +0000 (06:03 +0000)]
Merge "Bugfix: apex_lake: sort json keys for git"

7 years agoMerge "test_env_action: use dict literal"
Jing Lu [Tue, 14 Feb 2017 06:03:22 +0000 (06:03 +0000)]
Merge "test_env_action: use dict literal"

7 years agoset log file to store debug info 75/28575/1
rexlee8776 [Tue, 14 Feb 2017 03:13:56 +0000 (03:13 +0000)]
set log file to store debug info

so the debug info can be pushed into artifacts

JIRA: YARDSTICK-507

Change-Id: I35f50e69adc0125f6136aab3ca0e35e2d9500112
Signed-off-by: rexlee8776 <limingjiang@huawei.com>
7 years agoUpdate CLI Command in yardstick TC019, TC045~TC048 57/28057/2
tjuyinkanglin [Sun, 5 Feb 2017 07:32:59 +0000 (02:32 -0500)]
Update CLI Command in yardstick TC019, TC045~TC048

JIRA: YARDSTICK-545

Change-Id: Ifd3348e029f0ddbfa0117b4eef4493d443a4de4d
Signed-off-by: tjuyinkanglin <14_ykl@tongji.edu.cn>
7 years agoMerge "Push yardstick debug log into the artifacts"
Kubi [Mon, 13 Feb 2017 05:10:41 +0000 (05:10 +0000)]
Merge "Push yardstick debug log into the artifacts"

7 years agoBugFix: Adopt to latest result structure while parsing the results 03/28503/3
Deepak S [Sun, 12 Feb 2017 23:34:57 +0000 (15:34 -0800)]
BugFix: Adopt to latest result structure while parsing the results

Change-Id: I298ea69c86019936585df4bae30ce8ea12d179f4
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
7 years agoNew reliability/availability testcase - IP datagram error rate and etc. 63/26963/8
JingLu5 [Fri, 13 Jan 2017 14:48:25 +0000 (14:48 +0000)]
New reliability/availability testcase - IP datagram error rate and etc.

JIRA: YARDSTICK-534

This test case uses nstat to monitor network metrics provided by the kernel in
a host and calculate IP datagram error rate, ICMP message error rate, TCP
segment error rate and UDP datagram error rate.

Change-Id: I2fe6457bb5c95d0446c1463991ae31cc664b09f8
Signed-off-by: JingLu5 <lvjing5@huawei.com>
7 years agoBux: task_id parameter from API can not pass to yardstick core 61/28161/2
chenjiankun [Tue, 7 Feb 2017 09:13:17 +0000 (09:13 +0000)]
Bux: task_id parameter from API can not pass to yardstick core

JIRA: JIRA: YARDSTICK-531

Now in API entry the task_id parameter will not pass to yardstick core.
I fix it by pass task_id to yardstick.benchmark.core.task.start() method.

Change-Id: Icf58f2f68549ca3314d6ec0f118b360537126d41
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
7 years agoMerge "KVMFORNFV: Implementing test suites for kvmfornfv ovs+dpdk+barometer scenarios."
Jing Lu [Fri, 10 Feb 2017 06:31:40 +0000 (06:31 +0000)]
Merge "KVMFORNFV: Implementing test suites for kvmfornfv ovs+dpdk+barometer scenarios."

7 years agoKVMFORNFV: Implementing test suites for kvmfornfv ovs+dpdk+barometer scenarios. 09/28409/1
Navya [Fri, 10 Feb 2017 06:23:32 +0000 (11:53 +0530)]
KVMFORNFV: Implementing test suites for kvmfornfv ovs+dpdk+barometer scenarios.

This patch implements test suites for kvmfornfv os-nosdn-kvm_ovs_dpdk_bar-ha
and os-nosdn-kvm_ovs_dpdk_bar-noha scenarios.

Change-Id: Idb7d360aa5b91a15d1c69566418a9da4b68db7ab
Signed-off-by: Navya Bathula <navyax.bathula@intel.com>
7 years agoMerge "uwsgi: move init_db to uwsgi entry point"
Jing Lu [Fri, 10 Feb 2017 06:19:21 +0000 (06:19 +0000)]
Merge "uwsgi: move init_db to uwsgi entry point"

7 years agofix super() calls, must use explicit class name 05/28305/2
Ross Brattain [Wed, 8 Feb 2017 22:42:08 +0000 (14:42 -0800)]
fix super() calls, must use explicit class name

self.__class__ is not correct.  For Python 2 we have to
explicitly use the class name

see http://stackoverflow.com/questions/4235078/how-to-avoid-infinite-recursion-with-super

Change-Id: I584ca565707b7331c1742fb33c8b524f7b7c9bf9
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
7 years agoFix: yardstick-docker-build-push-master failure 43/28343/1
JingLu5 [Thu, 9 Feb 2017 07:53:10 +0000 (07:53 +0000)]
Fix: yardstick-docker-build-push-master failure

JIRA: YARDSTICK-552

Change-Id: I5c006b2fcbffb6a3904c378ab0557b5ce437d9ed
Signed-off-by: JingLu5 <lvjing5@huawei.com>
7 years agoremove trex install from run_tests.sh. 71/28271/2
Ross Brattain [Tue, 7 Feb 2017 10:17:43 +0000 (02:17 -0800)]
remove trex install from run_tests.sh.

We have mocked out all the Trex imports, so we don't need to download
the Trex library

It doesn't really make sense to down external libraries
each time we run unittests.  Trex is a large stand-alone package
and shouldn't really be used during unittests

Importing Trex caused some odd pyzmq import errors on Python 3

File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master
  /trex/scripts/external_libs/pyzmq-14.5.0/python3/fedora18
  /64bit/zmq/backend/cython/__init__.py", line 6, in <module>
    from . import (constants, error, message, context,
ImportError: cannot import name 'constants'

Change-Id: I2ed06c0f88061baeff9ec96534cc59cca81924cc
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
7 years agouwsgi: move init_db to uwsgi entry point 71/27471/9
Ross Brattain [Tue, 24 Jan 2017 21:12:21 +0000 (13:12 -0800)]
uwsgi: move init_db to uwsgi entry point

uwsgi will call the 'callable' function which should normally be
Flask.__call__().

But we need to init the db first, so make a wrapper function that inits
the db and then calls app()

Also refactor add_resource into for loop instead of reduce.  reduce is
not really approriate here since we aren't consuming the return value

JIRA: YARDSTICK-543

Change-Id: I692d6d42de09f7d6ecf1a67a22e3019d97a4f3ca
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
7 years agomore logging fixes 75/27575/4
Ross Brattain [Thu, 26 Jan 2017 00:15:24 +0000 (16:15 -0800)]
more logging fixes

don't use .format() with logging, use regular %s logginer formatter

Change-Id: I1ce0d81cc3f81c35003ef453e82c57faeb46c49f
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
7 years agotest_env_action: use dict literal 81/27481/3
Ross Brattain [Wed, 25 Jan 2017 01:12:16 +0000 (17:12 -0800)]
test_env_action: use dict literal

use literal forms when possible

Change-Id: I2d815f40007aa2259f3f3bcb2b9cd84a11027422
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
7 years agoBugfix: apex_lake: sort json keys for git 77/27477/3
Ross Brattain [Wed, 25 Jan 2017 00:46:05 +0000 (16:46 -0800)]
Bugfix: apex_lake: sort json keys for git

experiment_1.yaml.json are in git
and everytime the unnitests are run the
json file is re-generated with a slightly different
key order so it make the git directory dirty.

use sort_keys=True to try to maintain a consistent
json file so git doesn't detect a difference

Change-Id: I7859664e00561e8db032849a6664fb933a36702b
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>