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>
Kubi [Mon, 13 Feb 2017 05:10:41 +0000 (05:10 +0000)]
Merge "Push yardstick debug log into the artifacts"
Jing Lu [Fri, 10 Feb 2017 06:31:40 +0000 (06:31 +0000)]
Merge "KVMFORNFV: Implementing test suites for kvmfornfv ovs+dpdk+barometer scenarios."
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>
Jing Lu [Fri, 10 Feb 2017 06:19:21 +0000 (06:19 +0000)]
Merge "uwsgi: move init_db to uwsgi entry point"
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>
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>
kubi [Thu, 26 Jan 2017 01:16:41 +0000 (01:16 +0000)]
Proposing Trevor Cooper as a commiter in yardstick
Trevor Cooper has contributed greatly to yardstick D release.
Achievement/Contributions include:
Vsperf integration with yardstick.
NSB integration coordination.
Host US slot yardstick weekly meeting.
Draft Stress Test proposal in testperf.
Draft new Testing Projects Ecosystem graph.
Change-Id: I783335a77cfe3926c0c8ff76174ef3cc4f203fd6
Signed-off-by: kubi <jean.gaoliang@huawei.com>
kubi [Thu, 26 Jan 2017 01:35:03 +0000 (01:35 +0000)]
Proposing Ross Brattain as a commiter in yardstick
Ross has contributed greatly to yardstick D release.
Achievement/Contributions include:
Provided quite many high-quality review comments.
Prepare Yardstick for Python3
Support Vsperf integration with yardstick.
Support NSB integration.
Jenkins verify test evolvement.
Yardstick Architecture Improvement.
LOG system unified.
https://gerrit.opnfv.org/gerrit/#/q/project:yardstick+owner:%22Ross+Brattain+%253Cross.b.brattain%2540intel.com%253E%22
Change-Id: Ided9c95e856269277ff09572e92e9fda7288734e
Signed-off-by: kubi <jean.gaoliang@huawei.com>
Deepak S [Wed, 8 Feb 2017 01:33:16 +0000 (17:33 -0800)]
Pass environment variables of proxy to tox
When a development environment is under a proxy, tox is failed even if
environment variables of the proxy are set.
Change-Id: Ia6f8f2a1f215fc4c861d7dbc7a61dcd6973fb3cb
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Deepak S [Wed, 8 Feb 2017 02:24:57 +0000 (18:24 -0800)]
fix unittests failures due to py3
Traceback (most recent call last):
File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/tests/unit/network_services/vnf_generic/vnf/test_vpe_vnf.py", line 306, in test_instantiate
self.context_cfg))
AssertionError: 0 != None
Traceback (most recent call last):
File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/tests/unit/network_services/vnf_generic/vnf/test_base.py", line 55, in test_clear
self.assertEqual(queue_file_wrapper.q_out.empty(), True)
File "/usr/lib/python3.5/unittest/case.py", line 820, in assertEqual
assertion_func(first, second, msg=msg)
File "/usr/lib/python3.5/unittest/case.py", line 813, in _baseAssertEqual
raise self.failureException(msg)
AssertionError: False != True
Traceback (most recent call last):
File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/tests/unit/network_services/vnf_generic/vnf/test_tg_trex.py", line 321, in test_run_traffic
self.assertEqual(True, result)
File "/usr/lib/python3.5/unittest/case.py", line 820, in assertEqual
assertion_func(first, second, msg=msg)
File "/usr/lib/python3.5/unittest/case.py", line 813, in _baseAssertEqual
raise self.failureException(msg)
AssertionError: True != False
Traceback (most recent call last):
File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_trex.py", line 369, in test_run_traffic
self.assertEqual(True, result)
File "/usr/lib/python3.5/unittest/case.py", line 820, in assertEqual\
assertion_func(first, second, msg=msg)
File "/usr/lib/python3.5/unittest/case.py", line 813, in _baseAssertEqual\
raise self.failureException(msg)
AssertionError: True != False
Change-Id: I68340196b8cc9f0fc2e4e0ef1022e8098fc860f0
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Ross Brattain [Tue, 7 Feb 2017 10:17:43 +0000 (02:17 -0800)]
fix unittests, mock trex_stl_lib, fix raw_input, division
replace raw_input with six.moves.raw_input
fix raw_input mock
force float division in python 2
re-added trex download to try to workaround coverage failing
try installing pyzmq=14.5.0 and see if that helps trex compatibility
======================================================================
ERROR: test__fill_traffic_profile (benchmark.scenarios.networking.test_vnf_generic.TestNetworkServiceTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/tests/unit/benchmark/scenarios/networking/test_vnf_generic.py", line 399, in test__fill_traffic_profile
self.context_cfg))
File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/yardstick/benchmark/scenarios/networking/vnf_generic.py", line 144, in _fill_traffic_profile
return TrafficProfile.get(traffic_profile)
File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/yardstick/network_services/traffic_profile/base.py", line 35, in get
"yardstick.network_services.traffic_profile")
File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/yardstick/common/utils.py", line 86, in import_modules_from_package
try_append_module(module_name, sys.modules)
File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/yardstick/common/utils.py", line 70, in try_append_module
modules[name] = importutils.import_module(name)
File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/.tox/py3/lib/python3.5/site-packages/oslo_utils/importutils.py", line 73, in import_module
__import__(import_str)
File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/yardstick/network_services/traffic_profile/rfc2544.py", line 19, in <module>
from yardstick.network_services.traffic_profile.traffic_profile \
File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/yardstick/network_services/traffic_profile/traffic_profile.py", line 24, in <module>
from stl.trex_stl_lib.trex_stl_client import STLStream
File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/trex/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py", line 7, in <module>
from .trex_stl_jsonrpc_client import JsonRpcClient, BatchMessage
File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/trex/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_jsonrpc_client.py", line 3, in <module>
import zmq
File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/trex/scripts/external_libs/pyzmq-14.5.0/python3/fedora18/64bit/zmq/__init__.py", line 49, in <module>
from zmq import backend
File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/trex/scripts/external_libs/pyzmq-14.5.0/python3/fedora18/64bit/zmq/backend/__init__.py", line 41, in <module>
reraise(*exc_info)
File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/trex/scripts/external_libs/pyzmq-14.5.0/python3/fedora18/64bit/zmq/utils/sixcerpt.py", line 34, in reraise
raise value
File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/trex/scripts/external_libs/pyzmq-14.5.0/python3/fedora18/64bit/zmq/backend/__init__.py", line 29, in <module>
_ns = select_backend(first)
File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/trex/scripts/external_libs/pyzmq-14.5.0/python3/fedora18/64bit/zmq/backend/select.py", line 27, in select_backend
mod = __import__(name, fromlist=public_api)
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'
======================================================================
ERROR: network_services.vnf_generic.vnf.test_tg_trex (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: network_services.vnf_generic.vnf.test_tg_trex
Traceback (most recent call last):
File "/usr/lib/python3.5/unittest/loader.py", line 428, in _find_test_path
module = self._get_module_from_name(name)
File "/usr/lib/python3.5/unittest/loader.py", line 369, in _get_module_from_name
__import__(name)
File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/tests/unit/network_services/vnf_generic/vnf/test_tg_trex.py", line 24, in <module>
from stl.trex_stl_lib.trex_stl_client import STLClient
File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/trex/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py", line 7, in <module>
from .trex_stl_jsonrpc_client import JsonRpcClient, BatchMessage
File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/trex/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_jsonrpc_client.py", line 3, in <module>
import zmq
File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/trex/scripts/external_libs/pyzmq-14.5.0/python3/fedora18/64bit/zmq/__init__.py", line 49, in <module>
from zmq import backend
File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/trex/scripts/external_libs/pyzmq-14.5.0/python3/fedora18/64bit/zmq/backend/__init__.py", line 41, in <module>
reraise(*exc_info)
File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/trex/scripts/external_libs/pyzmq-14.5.0/python3/fedora18/64bit/zmq/utils/sixcerpt.py", line 34, in reraise
raise value
File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/trex/scripts/external_libs/pyzmq-14.5.0/python3/fedora18/64bit/zmq/backend/__init__.py", line 29, in <module>
_ns = select_backend(first)
File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/trex/scripts/external_libs/pyzmq-14.5.0/python3/fedora18/64bit/zmq/backend/select.py", line 27, in select_backend
mod = __import__(name, fromlist=public_api)
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: I832bf8c912dea6d85131ee6603b408b3198cef2f
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
Jing Lu [Tue, 7 Feb 2017 00:16:42 +0000 (00:16 +0000)]
Merge "KVMFORNFV: Implementing test suites for kvmfornfv ovs+dpdk scenarios."
Kubi [Mon, 6 Feb 2017 09:59:08 +0000 (09:59 +0000)]
Merge "Adding simple cmdline to run the Network service testcases"
Kubi [Mon, 6 Feb 2017 09:58:57 +0000 (09:58 +0000)]
Merge "Setup yardstick_virtual environments for Network Service Testing"
Kubi [Mon, 6 Feb 2017 09:58:05 +0000 (09:58 +0000)]
Merge "Adding sample Thoughput Test case for vPE."
Kubi [Mon, 6 Feb 2017 09:57:34 +0000 (09:57 +0000)]
Merge "Adding vPE VNF class aligned with IETS per-deploy senarios"
Kubi [Mon, 6 Feb 2017 09:56:44 +0000 (09:56 +0000)]
Merge "Adding Trex rfc2544 VNF class to initate Traffic for throughput"
Kubi [Mon, 6 Feb 2017 09:56:11 +0000 (09:56 +0000)]
Merge "Adding trex trafficgen example."
Kubi [Mon, 6 Feb 2017 09:51:37 +0000 (09:51 +0000)]
Merge "Adding ping testcase to demonstrate the isb Generic framework"
Kubi [Mon, 6 Feb 2017 09:50:55 +0000 (09:50 +0000)]
Merge "Adding ping based sample VNF appliance"
Kubi [Mon, 6 Feb 2017 09:47:50 +0000 (09:47 +0000)]
Merge "Adding generic traffic profiles for trex traffic generator"
KalyanReddy [Mon, 6 Feb 2017 06:20:41 +0000 (11:50 +0530)]
KVMFORNFV: Implementing test suites for kvmfornfv ovs+dpdk scenarios.
This patch implements test suites for kvmfornfv os-nosdn-kvm_ovs_dpdk-ha
and os-nosdn-kvm_ovs_dpdk-noha scenarios.
Change-Id: Ia7b17dda262df5d81cac87372b70510192044a40
Co-Authored-By: Navya <b.navya4@tcs.com>
Signed-off-by: KalyanReddy <reddyx.gundarapu@intel.com>
rexlee8776 [Thu, 29 Dec 2016 11:03:31 +0000 (11:03 +0000)]
Push yardstick debug log into the artifacts
the log directory should be specific yardstick so
it can be easily pushed into artifacts with the
directory.
JIRA: YARDSTICK-507
Change-Id: If28b0c3938e123c8a55272cb98291fb76aaf6f9e
Signed-off-by: rexlee8776 <limingjiang@huawei.com>
Ross Brattain [Mon, 6 Feb 2017 07:19:55 +0000 (23:19 -0800)]
nfvi: disable failing AMQP unittest
Failures:
test_connect (network_services.nfvi.test_collectd.TestAmqpConsumer) ... ERROR:pika.adapters.base_connection:Connection to 1.1.1.1:5672 failed: timeout
WARNING:pika.connection:Could not connect, 0 attempts left
ERROR:pika.callback:Calling <bound method SelectConnection._on_connection_error of <pika.adapters.select_connection.SelectConnection object at 0x7fe7e2333710>> for "0:_on_connection_error" failed
Traceback (most recent call last):
File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/.tox/py27/local/lib/python2.7/site-packages/pika/callback.py", line 236, in process
callback(*args, **keywords)
File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/.tox/py27/local/lib/python2.7/site-packages/pika/connection.py", line 1265, in _on_connection_error
self.params.connection_attempts)
AMQPConnectionError: Connection to 1.1.1.1:5672 failed: timeout
ok
Firstly, 1.1.1.1 is not an approriate fake address, use 127.0.0.1 so we don't try
to connect to anything external
But 127.0.0.1 won't work anyway, so disable test_connect
replace 152.16.0.0 with 172.16.0.0
Remove network_services.nfvi.test_resource.TestResourceProfile since it
also fails due to same error
Remove test_amqp_collect_nfvi_kpi_exception
Change-Id: I00bb1729658e18b4651129661ad9dd9c0dedcf37
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
Ross Brattain [Wed, 25 Jan 2017 00:30:25 +0000 (16:30 -0800)]
Fix: network_services: decode stdout instead of encode
Fixes unittest on Python 3
stdout is bytes, so we need to decode bytes to unicode using utf-8
bytes.decode(); str.encode()
Change-Id: I4b19d237139f338a648d04aa44cd4f199bb901c3
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
Kubi [Thu, 26 Jan 2017 08:08:02 +0000 (08:08 +0000)]
Merge "Add infrastructure to add the NFVi KPI collections"
Kubi [Thu, 26 Jan 2017 08:07:25 +0000 (08:07 +0000)]
Merge "Adding sample yardstick.conf & pod files to help describe the topology"
Kubi [Thu, 26 Jan 2017 08:06:51 +0000 (08:06 +0000)]
Merge "Introducing Generic framework to do pre-deployment VNF & Network service testing"
Kubi [Wed, 25 Jan 2017 09:18:26 +0000 (09:18 +0000)]
Merge "basic tox.ini for python 2.7 and python 3 unittests"
Rex Lee [Tue, 24 Jan 2017 08:45:19 +0000 (08:45 +0000)]
Merge "Generic helper function to provision and get path from config"
Rex Lee [Mon, 23 Jan 2017 02:52:24 +0000 (02:52 +0000)]
Merge "Record task status if running via CLI"
chenjiankun [Thu, 19 Jan 2017 20:24:48 +0000 (20:24 +0000)]
Record task status if running via CLI
JIRA: YARDSTICK-542
Currently we do not record task status when using CLI to run task.
So I add this function.
If status=0, task is not done.
if status=1, task is done.
if status=2, there is an error.
Change-Id: Ib9b3c8abd233909c04f792115199250419fa8d7a
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
chenjiankun [Thu, 12 Jan 2017 07:50:30 +0000 (07:50 +0000)]
Create API to get a list of all test cases
JIRA: YARDSTICK-456
Currently we do not have a API to get a list of all test cases;
Currently the test case info is from the comment;
So I create a API to get a list of all test cases;
And create a 'description' attribute to record info of a test case;
And use the CLI call this API;
Change-Id: Ife800600446683664097835c7b9f11899c85771d
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
Jing Lu [Fri, 20 Jan 2017 01:09:36 +0000 (01:09 +0000)]
Merge "Bugfix:can not run a test suite if not under yardstick root path"
Jing Lu [Fri, 20 Jan 2017 01:08:39 +0000 (01:08 +0000)]
Merge "Bugfix: task_id parameter from API can not pass to yardstick core"
Ross Brattain [Wed, 11 Jan 2017 21:09:47 +0000 (13:09 -0800)]
basic tox.ini for python 2.7 and python 3 unittests
Nothing fancy for now, just call run_tests.sh
If we want to expand we could add pep8, coverage
to tox. See dovetail tox.ini for example
Change-Id: I8b5897779ed9622dd1b38612cb393fc214ec6300
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
Deepak S [Wed, 18 Jan 2017 06:54:02 +0000 (12:24 +0530)]
Adding simple cmdline to run the Network service testcases
JIRA: YARDSTICK-522
Change-Id: I5000c0ae9cf128f09b273afd85fd797068516484
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Deepak S [Fri, 30 Dec 2016 17:26:57 +0000 (09:26 -0800)]
Setup yardstick_virtual environments for Network Service Testing
JIRA: YARDSTICK-521
Change-Id: Ib91d231120067e58d2e1df7f1b42db216d15c468
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Deepak S [Fri, 30 Dec 2016 17:26:26 +0000 (09:26 -0800)]
Adding sample Thoughput Test case for vPE.
TestCases:
- 64B TC
- 1518B TC
- IMIX TC
JIRA: YARDSTICK-520
Change-Id: Ic7842de8afb0f5c222de42f99bf70af29442c94a
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Deepak S [Fri, 30 Dec 2016 17:25:53 +0000 (09:25 -0800)]
Adding vPE VNF class aligned with IETS per-deploy senarios
VNF life cycle
- instantiate
- collect_kpi
- terminate
JIRA: YARDSTICK-520
Change-Id: Ied6ac79870fa35cc3dd14fd7a99b6bade3b77c81
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Deepak S [Fri, 30 Dec 2016 17:25:26 +0000 (09:25 -0800)]
Adding Trex rfc2544 VNF class to initate Traffic for throughput
JIRA: YARDSTICK-520
Change-Id: I1c683236a7fb946873418fb67f63500e1ba8fc91
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Deepak S [Fri, 30 Dec 2016 17:24:52 +0000 (09:24 -0800)]
Adding trex trafficgen example.
This patch uses trex trafficgen example to define dynamic traffic profiles
and how it can be mapped to real world traffic.
JIRA: YARDSTICK-492
Change-Id: Ica24957ebf43315a8d81adabd4745c27d3c7c36a
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Deepak S [Fri, 30 Dec 2016 17:24:21 +0000 (09:24 -0800)]
Adding ping testcase to demonstrate the isb Generic framework
This patch defines
- 2tg-topology-baremetal.yaml --> Define topology
- pod.yaml -> sample pod.yaml describing TG & VNF unit details
- tc.yaml --> test case in yardstick format (scenarios/context)
- tg_ping_tpl.yaml --> VNF descriptor explaining how units are connected,
eg Host (Xe0) --> Target (Xe0)
Host (Xe1) --> Target (Xe1)
JIRA: YARDSTICK-491
Change-Id:I41b69f457a6caa58d806cac9af8e831752ad314d
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Deepak S [Fri, 30 Dec 2016 17:23:49 +0000 (09:23 -0800)]
Adding ping based sample VNF appliance
This patch defines
- Generic VNF APIs to test Network service
--> instantiate
--> collect_kpi
--> run_traffic
--> listen_traffic
--> terminate
- vnf Descriptor to map the physical NFVi topology of the Test unit.
JIRA: YARDSTICK-491
Change-Id: I6b7e09972fc536977b65d8a19d635a220815e5f3
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Deepak S [Fri, 30 Dec 2016 17:22:51 +0000 (09:22 -0800)]
Adding generic traffic profiles for trex traffic generator
This patch defines Generic traffic profiles
- rfc2544, http etc
JiRA: YARDSTICK-489
Change-Id:I0d8270b4d5f5f2d3415b98182990d8649099dbe3
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Deepak S [Fri, 30 Dec 2016 17:22:25 +0000 (09:22 -0800)]
Add infrastructure to add the NFVi KPI collections
This patches added common function to collect NFVi KPIs for given usecases
- Core KPIs like memory/LLC/IPC etc
- OVS stats
- memory stats etc.
JIRA: YARDSTICK-488
Change-Id: Iab41146392efc47b7313b1846a67728a44d0f1d6
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Deepak S [Fri, 30 Dec 2016 17:21:56 +0000 (09:21 -0800)]
Adding sample yardstick.conf & pod files to help describe the topology
JIRA: YARDSTICK-487
Change-Id:I23dabcf6b4b7d49b8eb0f18778cddd50a1195a05
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Deepak S [Fri, 30 Dec 2016 17:21:22 +0000 (09:21 -0800)]
Introducing Generic framework to do pre-deployment VNF & Network service testing
This patch introduces the framework which is aligned with ETSI-TST001
This patch adds:
1. NetworkServiceTestCase introduces following functions
--> setup
--> Verify if infrastructure mapping can meet topology
--> Load VNF models
--> Fill traffic profile with information from topology
--> Provision VNFs
--> Run experiment (traffic)
--> run -> Yardstick calls run() at intervals defined in the yaml
and produces timestamped samples
--> teardown --> Stop VNFs
2. TrafficProfile is a generic class to get traffic profile for a given
testcase and select the traffic generator for testcase.
3. QueueFileWrapper is a class to send/recive cmds to vnf
4. GenericVNF is a generic class to instantiate VNF
5. GenericTrafficGen is a generic class to run/listen/verify traffic.
JIRA: YARDSTICK-483
Change-Id: Ic453c917d34dcb508a7f3afb459011da85f6402e
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Deepak S [Fri, 30 Dec 2016 17:20:49 +0000 (09:20 -0800)]
Generic helper function to provision and get path from config
This patch adds, generic helper function to provision the tools
and get required fields from yardstick.conf
v2: Added unit tests to keep test coverage :)
JIRA: YARDSTICK-484
Change-Id: Id6701924e3488c7f38f29c82e55c27fba67c0d76
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Deepak S [Fri, 30 Dec 2016 17:20:15 +0000 (09:20 -0800)]
Introducing the collector to subscribe/publish the KPIs for yardstick plot
v2: Added unit tests to keep test coverage :)
JIRA: YARDSTICK-482
Change-Id: I9281b00a4b619cc04550cb623c027ee5765c4974
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Deepak S [Fri, 30 Dec 2016 17:19:34 +0000 (09:19 -0800)]
Introducing Standalone context for running test in non-managed environment.
This patch introduces standalone virtualization context to
deploy/undeploy NFVi infrastructure to run the VNF
Supported NFVi Type:
- vswitch
- ovs
- ovs-dpdk
- sr-iov
- testpmd
- linuxbridge
This patches inits the function stubs to enable the standalone context.
Actual deploy/undeploy code will be added in later check-in
v2: Added unit tests to keep test coverage :)
JIRA: YARDSTICK-479
Change-Id: I6ab3ac3335f40eabc4efb0af7d5addc20c122d65
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Kubi [Thu, 19 Jan 2017 08:27:31 +0000 (08:27 +0000)]
Merge "Verify stdin data before doing encodeutils safe_encode"
Jing Lu [Thu, 19 Jan 2017 07:59:59 +0000 (07:59 +0000)]
Merge "Bugfix: command "openstack image list" failed"
chenjiankun [Thu, 19 Jan 2017 11:07:12 +0000 (11:07 +0000)]
Bugfix: command "openstack image list" failed
JIRA: YARDSTICK-537
Now the openstackclient version is set to 3.3.0, but it cannot support
osc-lib 1.3.0 whose version is automatic set.
So I set openstackclient version to 3.7.0 and osc-lib version to 1.2.0
Change-Id: If4ccd517f6a572f6c463270596d0e1019ba9a1e6
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
Kubi [Thu, 19 Jan 2017 07:45:17 +0000 (07:45 +0000)]
Merge "Bugfix: context not found for server ''node1.LF''"
chenjiankun [Thu, 19 Jan 2017 09:59:58 +0000 (09:59 +0000)]
Bugfix: context not found for server ''node1.LF''
JIRA: YARDSTICK-540
We are adding dynamically generated suffix to server name in the
previous patch.
But in that patch we just change the 'target', 'host' in nodes, but not
'node1', 'node2' ...
This patch will change all this.
Change-Id: Ic7c82c323dea24a40f1fe30871603d30c2689f67
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
Kubi [Thu, 19 Jan 2017 07:35:55 +0000 (07:35 +0000)]
Merge "Re-factor Node.py to use better python inbuilt functions"
Jing Lu [Thu, 19 Jan 2017 07:02:38 +0000 (07:02 +0000)]
Merge "Add unittest framework for Yardstick API"
Deepak S [Tue, 17 Jan 2017 00:37:39 +0000 (06:07 +0530)]
Verify stdin data before doing encodeutils safe_encode
Process running via ssh can return "None" or emtpy data from the
application. To avoid encodutils raise NoneType issue. Check the data before
encode.
JIRA: YARDSTICK-539
Change-Id: I7e86e6a17c0adc95d41714f6fec463dfadc2b81b
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Deepak S [Wed, 18 Jan 2017 09:34:44 +0000 (15:04 +0530)]
Re-factor Node.py to use better python inbuilt functions
1. don't use sys.exit() to exit when there is an exception, it will hide
the underlying error
2. use the Abstract Base Classes for type checking.
3. don't have to build list, can use next
JIRA: YARDSTICK-541
Change-Id: Id4485acb21e7e02bbc22d3e689cbf0699363098a
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Rex Lee [Wed, 18 Jan 2017 10:14:14 +0000 (10:14 +0000)]
Merge "Use """ to replace ''' in docstring"
chenjiankun [Tue, 17 Jan 2017 15:40:17 +0000 (15:40 +0000)]
Add unittest framework for Yardstick API
JIRA: YARDSTICK-538
Currently it is hard to test API, So I add a base class as flask
document do.
In this framework I will mock a temp sqlite database and a server.
Change-Id: If881233cb22655617c07ad018201b8ee08492d06
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
chenjiankun [Tue, 17 Jan 2017 02:54:08 +0000 (02:54 +0000)]
Bugfix: command "openstack image list" failed
JIRA: YARDSTICK-537
Now the openstackclient version is set to 3.3.0, but it cannot support
osc-lib 1.3.0 whose version is automatic set.
So I set openstackclient version to 3.3.0 and osc-lib version to 1.3.0
Change-Id: Ia480feb3621be97a4a97bb027685cc438e01c53e
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
Jing Lu [Tue, 17 Jan 2017 02:48:34 +0000 (02:48 +0000)]
Merge "Adding python package requirement for VNF testing."
chenjiankun [Mon, 16 Jan 2017 09:17:48 +0000 (09:17 +0000)]
Use """ to replace ''' in docstring
JIRA: YARDSTICK-525
For consistency, we always use """triple double quotes""" around
docstrings.
Change-Id: I47a20bbd8b55bc544b4841ea4006929af0a044ac
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
Kubi [Mon, 16 Jan 2017 02:38:50 +0000 (02:38 +0000)]
Merge "remove failing influx testcases"
chenjiankun [Tue, 10 Jan 2017 08:01:41 +0000 (08:01 +0000)]
Bugfix:can not run a test suite if not under yardstick root path
JIRA: YARDSTICK-530
Currently we can not run a test suite if we are not in yardstick root
path.
The reason is that the file in test suite config file use relative path.
So I change it to absolute path when run.
Change-Id: I62758bc67f466ac794d339b597562b3be05574fb
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
Ross Brattain [Mon, 5 Dec 2016 21:11:54 +0000 (16:11 -0500)]
Add support for Python 3
Porting to Python3 using Openstack guidelines:
https://wiki.openstack.org/wiki/Python3
This passes unittests on Python 3.5 and passes opnfv_smoke suite
Updates:
use six for urlparse and urlopen
fix exception.message attribute removal
run unittests on python3
use unitest.mock on python 3
fix open mock for vsperf
fix float division by using delta/eplison comparison
use unicode in StringIO
use plugin/sample_config.yaml relative path from test case
fixed apexlake unittests
upgraded to mock 2.0.0 to match python3 unittest.mock features
fixed flake8 issues
implement safe JSON decode with oslo_serialization.jsonutils.dump_as_bytes()
implement safe unicode encode/decode with oslo_utils.encodeutils
heat: convert pub key file from bytes to unicode
pkg_resources returns raw bytes, in python3
we have to decode this to utf-8 unicode
so JSON can encode it for heat template
JIRA: YARDSTICK-452
Change-Id: Ib80dd1d0c0eb0592acd832b82f6a7f8f7c20bfda
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
Ross Brattain [Thu, 12 Jan 2017 05:59:18 +0000 (21:59 -0800)]
heat: fix key_uuid format
The .format() won't work, since it can't slice the uuid
We have to convert the uuid to string before we slice it.
I thought .format() would implicitly call __str__() before
applying width, but that is not the case.
'files/yardstick_key-{:.{width}}'.format(self.key_uuid, width=8))
We also need to define a constant short uuid lenght, we can't
hardcode the length to 8 everywhere.
Create a helper function to standardize the generation
of the short key uuid and use that helper function everywhere
Change-Id: I59e051bfe697587e967f93f5b8f209e0e7daa5c7
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
Ross Brattain [Thu, 12 Jan 2017 06:32:26 +0000 (22:32 -0800)]
remove failing influx testcases
when influx was refactored these test cases must not
have been removed
> influx._write_data(measurement, field, timestamp, tags)
E AttributeError: 'module' object has no attribute '_write_data'
Change-Id: I78814266fae04bd3b0bc06fe1fe41317ba8aced4
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
chenjiankun [Wed, 11 Jan 2017 10:42:32 +0000 (10:42 +0000)]
Bugfix: task_id parameter from API can not pass to yardstick core
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: I66439660ff116d83104e5ba4f040106ca73142e6
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
Rex Lee [Wed, 11 Jan 2017 03:03:10 +0000 (03:03 +0000)]
Merge "Create API to run test suite"
Rex Lee [Wed, 11 Jan 2017 03:01:14 +0000 (03:01 +0000)]
Merge "associate an uuid to yardstick_key and yardstick_key.pub"
JingLu5 [Thu, 22 Dec 2016 04:07:55 +0000 (12:07 +0800)]
Create API to run test suite
JIRA: YARDSTICK-475
This API will be used to run test suite files in the test/opnfv/test_suites directory
Change-Id: I208edf9abed62fd6436de988ac85bfe99c4d01bd
Signed-off-by: JingLu5 <lvjing5@huawei.com>
JingLu5 [Mon, 9 Jan 2017 11:35:47 +0000 (11:35 +0000)]
associate an uuid to yardstick_key and yardstick_key.pub
JIRA: YARDSTICK-527
This work is to support yardstick parallel tasks in the future.
Currently, the RSA key we generated and used to access the VM is named
'yardstick_key'.
If more than two tasks are running paralleled, the later 'yardstick_key' will
cover the former.
We want associate an uuid to identify differnets for each tasks. So the key
files won't conflict.
The first 8 digits will be used, as there is no need to used a full-length uuid.
Change-Id: If8eaf47ae527cf9b3bd50f37ab3051fbdccf5f03
Signed-off-by: JingLu5 <lvjing5@huawei.com>
Jing Lu [Tue, 10 Jan 2017 09:13:06 +0000 (09:13 +0000)]
Merge "Yardstick framework concurrent support"
Jing Lu [Tue, 10 Jan 2017 09:11:54 +0000 (09:11 +0000)]
Merge "Add API to get the status of async task"
chenjiankun [Wed, 4 Jan 2017 17:41:18 +0000 (17:41 +0000)]
Add API to get the status of async task
JIRA: YARDSTICK-526
Currently there are many API run a task using sub thread.
But we don't know the status of this task.
So we need to offer a API to query the status of this task.
Change-Id: I8d2cc558750bf9270aed4a7abb8bf35d17894d83
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
Rex Lee [Tue, 10 Jan 2017 08:54:16 +0000 (08:54 +0000)]
Merge "Record test case names when run a task using API"
Rex Lee [Tue, 10 Jan 2017 08:48:55 +0000 (08:48 +0000)]
Merge "subprocess.call para stdout=PIPE is risky"
chenjiankun [Fri, 6 Jan 2017 08:01:53 +0000 (08:01 +0000)]
Yardstick framework concurrent support
JIRA: YARDSTICK-528
Currently yardstick framework can not support run the same test case at
the same time.
But actually we need to support it.
The reason why framework can't support it is that openstack do not allow
to create stack with the same name.
So I use the task_id to make the stack different.
Change-Id: I9e853793650066dfc56606464f7826f330a1401c
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
Deepak S [Fri, 30 Dec 2016 17:18:43 +0000 (09:18 -0800)]
Adding python package requirement for VNF testing.
List of packages:
zmq - Py lib helps to publish/subscribe for ZeroMQ for data exchange
pika - Py lib helps setup amqp for data exchange with collectd
JIRA: YARDSTICK-453
Change-Id: Ic537d677622167fdb3aef81fb0c313553fcf087a
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
chenjiankun [Thu, 29 Dec 2016 11:45:12 +0000 (11:45 +0000)]
Split Yardstick CLI with Yardstick core logic
JIRA: YARDSTICK-511
We need to unify yardstick entry. Now the solution is using CLI call API
as nova do.
This is the first step: coupling the yardstick core logic from CLI.
Moving the core logic to yardstick/benchmark/core and the CLI using a
object to call yardstick core logic.
Change-Id: I84f10d2134635880c281cc63212a8533f2dd7d4e
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
Jing Lu [Fri, 30 Dec 2016 07:02:06 +0000 (07:02 +0000)]
Merge "Yardstick Plugin: add support for ssh login using key"
Jing Lu [Fri, 30 Dec 2016 06:22:18 +0000 (06:22 +0000)]
Merge "BugFix: correct Copyright info in openstack_utils.py"
Rex Lee [Fri, 30 Dec 2016 03:32:00 +0000 (03:32 +0000)]
Merge "Create ping_load sample configuration yaml file"
Jing Lu [Thu, 29 Dec 2016 02:16:41 +0000 (02:16 +0000)]
Merge "Fix installation dependency and authentication issue for fuel plugin"
chenjiankun [Wed, 28 Dec 2016 10:27:14 +0000 (10:27 +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 case.
So if we must offer test case name if we want to get result from API.
Regarding future requirement, I create sqlite database and alchemy orm
framework. And record test case name when run a test case. So we needn't
offer test case any more when call for get result API.
Change-Id: I7d7dc24543a33918546267591f7bdcd0742928cb
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
JingLu5 [Wed, 28 Dec 2016 02:07:20 +0000 (10:07 +0800)]
Yardstick Plugin: add support for ssh login using key
JIRA: YARDSTICK-442
Change-Id: I4736e8cb8331d7a74c8c9946e21edd791b0c8ba9
Signed-off-by: JingLu5 <lvjing5@huawei.com>
Jing Lu [Wed, 28 Dec 2016 01:23:09 +0000 (01:23 +0000)]
Merge "enhance test cases description and provide more info(in progress)"
Jing Lu [Wed, 28 Dec 2016 01:07:48 +0000 (01:07 +0000)]
Merge "Use ConfigParser to write yardstick.conf"
Edwin Zhai [Mon, 26 Dec 2016 00:00:06 +0000 (16:00 -0800)]
Fix installation dependency and authentication issue for fuel plugin
JIRA: YARDSTICK-516
Change-Id: I348959c2ea3b6ed586f487cde88a173eb593be4f
Signed-off-by: Edwin Zhai <edwin.zhai@intel.com>
JingLu5 [Tue, 27 Dec 2016 09:11:09 +0000 (17:11 +0800)]
Create ping_load sample configuration yaml file
JIRA: YARDSTICK-514
The ping_load task uses multiple(3 in this case) host VMs to ping one target
VM in parallel. The multiple hosts configuration will be rendered using jinja
syntax. "contexts" is used to specify the target and muiltip host VMs.
Change-Id: I3e36b86d16d0386b4d446a2e252a094926cd97a3
Signed-off-by: JingLu5 <lvjing5@huawei.com>
JingLu5 [Tue, 27 Dec 2016 09:01:06 +0000 (17:01 +0800)]
BugFix: correct Copyright info in openstack_utils.py
JIRA:YARDSTICK-513
the copyright info in openstack_utils.py is not accurate.
(yardstick: this file is copied from rally and slightly modified)
this line should be deleted.
Change-Id: I6cf8205ee6b142ae87b268829e5ac7454239dd0d
Signed-off-by: JingLu5 <lvjing5@huawei.com>
chenjiankun [Thu, 15 Dec 2016 02:31:43 +0000 (02:31 +0000)]
Use ConfigParser to write yardstick.conf
JIRA: YARDSTICK-474
Currently, I use file.write() method to write config in yardstick.conf.
But it is not recommended.
So I change to use ConfigParser to write config in yardstick.conf
Change-Id: Ia789cf09296afd5d1507bcf99f165378bf87c591
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
chenjiankun [Thu, 22 Dec 2016 08:41:08 +0000 (08:41 +0000)]
Add sqlite and SQLAlchemy support for API
JIRA: YARDSTICK-505
Now yardstick API need a database to store API data.
And for future the yardstick GUI also need a self database.
So I choose a light-weight database sqlite.
And use SQLAlchemy to do ORM.
Change-Id: I1edc350ec6f57ad67785de549c2135c86ea60a4a
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
Jing Lu [Sat, 24 Dec 2016 01:21:36 +0000 (01:21 +0000)]
Merge "Bugfix: the load_image.sh script will load a image with the same name"
Jing Lu [Sat, 24 Dec 2016 01:12:49 +0000 (01:12 +0000)]
Merge "Move uwsgi.log and yardstick.sock to proper location"
chenjiankun [Thu, 15 Dec 2016 06:02:50 +0000 (06:02 +0000)]
Bugfix: the load_image.sh script will load a image with the same name
JIRA: YARDSTICK-471
Currently, if we execute the load_image.sh and the openstack already
have this image in the cloud,this script will load another image with
the same name.
This will make yardstick run error.
So I clean this related images before loading.
Change-Id: If5b985ef9b2e890aa10453810fac36867d320a06
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>