summaryrefslogtreecommitdiffstats
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
2017-01-19Adding Trex rfc2544 VNF class to initate Traffic for throughputDeepak S2-0/+381
JIRA: YARDSTICK-520 Change-Id: I1c683236a7fb946873418fb67f63500e1ba8fc91 Signed-off-by: Deepak S <deepak.s@linux.intel.com>
2017-01-19Adding trex trafficgen example.Deepak S2-3/+305
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>
2017-01-19Adding ping based sample VNF applianceDeepak S2-0/+361
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>
2017-01-19Adding generic traffic profiles for trex traffic generatorDeepak S4-2/+497
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>
2017-01-19Add infrastructure to add the NFVi KPI collectionsDeepak S3-0/+331
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>
2017-01-19Introducing Generic framework to do pre-deployment VNF & Network service testingDeepak S12-0/+1245
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>
2017-01-19Generic helper function to provision and get path from configDeepak S1-0/+57
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>
2017-01-19Introducing the collector to subscribe/publish the KPIs for yardstick plotDeepak S4-0/+110
v2: Added unit tests to keep test coverage :) JIRA: YARDSTICK-482 Change-Id: I9281b00a4b619cc04550cb623c027ee5765c4974 Signed-off-by: Deepak S <deepak.s@linux.intel.com>
2017-01-19Introducing Standalone context for running test in non-managed environment.Deepak S3-0/+378
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>
2017-01-19Merge "Re-factor Node.py to use better python inbuilt functions"Kubi1-2/+2
2017-01-19Re-factor Node.py to use better python inbuilt functionsDeepak S1-2/+2
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>
2017-01-17Add unittest framework for Yardstick APIchenjiankun5-0/+67
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>
2017-01-16Merge "remove failing influx testcases"Kubi1-29/+0
2017-01-12Add support for Python 3Ross Brattain63-353/+609
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>
2017-01-12heat: fix key_uuid formatRoss Brattain1-0/+26
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>
2017-01-11remove failing influx testcasesRoss Brattain1-29/+0
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>
2017-01-11Merge "associate an uuid to yardstick_key and yardstick_key.pub"Rex Lee1-1/+15
2017-01-10associate an uuid to yardstick_key and yardstick_key.pubJingLu51-1/+15
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>
2017-01-10Add API to get the status of async taskchenjiankun3-3/+48
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>
2016-12-30Split Yardstick CLI with Yardstick core logicchenjiankun8-62/+87
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>
2016-12-24Merge "Bugfix: the load_image.sh script will load a image with the same name"Jing Lu2-2/+7
2016-12-22Bugfix: the load_image.sh script will load a image with the same namechenjiankun2-2/+7
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>
2016-12-22Merge "ssh: don't quote ~ in remotepaths"Jing Lu1-5/+31
2016-12-22Merge "Add smoke, components, features and performance test suite for Yatdstick"Rex Lee4-0/+144
2016-12-22Merge "Replace heat, keystone and nova command with openstack command"Rex Lee3-29/+32
2016-12-22Merge "Use openstack command instead keystone command in ↵Jing Lu2-2/+14
prepare_storperf_admin-rc.sh"
2016-12-20ssh: don't quote ~ in remotepathsRoss Brattain1-5/+31
~ is not expanded in double quotes, so we have a dilemma. We need to quote in order to preserve filenames with spaces, but we have to make sure we don't quote the ~ so it can be expanded. To resolve this we use a regex to search for tidle-prefixes and excluded them from quotes. Added unittests for the cases: path with tilde path with space path with tilde and space see bash man page for details of tidle expansion Tilde Expansion If a word begins with an unquoted tilde character (`~'), all of the characters preceding the first unquoted slash (or all characters, if there is no unquoted slash) are considered a tilde-prefix. If none of the characters in the tilde-prefix are quoted, the characters in the tilde-prefix following the tilde are treated as a possible login name. If this login name is the null string, the tilde is replaced with the value of the shell parameter HOME. If HOME is unset, the home directory of the user executing the shell is substituted instead. Otherwise, the tilde-prefix is replaced with the home directory associated with the specified login name. JIRA: YARDSTICK-501 Change-Id: I324be20aba0dbd50434fbd8081685c598ebd8a84 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2016-12-20Replace heat, keystone and nova command with openstack commandJingLu53-29/+32
JIRA: YARDSTICK-486 In future Openstack release, 'heat', 'keystone', 'nova' command will be deprecated. So we need to use 'openstack' command instead. Change-Id: I7070f8aaf0d235705b65e0760c845f843ad79719 Signed-off-by: JingLu5 <lvjing5@huawei.com>
2016-12-20BugFix: remotepath cannot be foundJingLu51-1/+1
JIRA: YARDSTICK-501 An redundant pair of quotation in ssh.py causes remotepath cannot be found. Change-Id: I2df8ab59830fd28d8ad8882a93a8efbd4d1f7cb7 Signed-off-by: JingLu5 <lvjing5@huawei.com>
2016-12-19change m1.* flavor to "yardstick-flavor"JingLu57-7/+7
JIRA: YARDSTICK-485 In OpenStack Newton, the 'm1.tiny', 'm1.small', 'm1.medium' and 'm1.large' will not be automatic created. This may cause errors as some Yardstick testcases are using one of these flavor. Therefore, it's better change all the flavor option in task configuration file to 'yardstick-flavor'. Change-Id: Ibb29a77ef331bbf728dec9894a2e9f17c19d5ebd Signed-off-by: JingLu5 <lvjing5@huawei.com>
2016-12-16Use openstack command instead keystone command in prepare_storperf_admin-rc.shJingLu52-2/+14
JIRA: YARDSTICK-476 In Openstack Newton, the ”tenant“ is deprecated and "project" is used. The prepare_storperf_admin-rc.sh uses keystone command to get "tenant id". So for newton, we need to use openstack command to get "project id". This patch also add a copy right header in tests/ci/scp_storperf_admin-rc.sh. Change-Id: Ic69cb07f684ccb557866a4141e9d2724fc054f29 Signed-off-by: JingLu5 <lvjing5@huawei.com>
2016-12-16Add smoke, components, features and performance test suite for YatdstickJingLu54-0/+144
JIRA: YARDSTICK-417 This patch adds a smoke test suite for Yardstick. The smoke test suite consists of 3 test cases: TC002 Ping, TC005 Fio, TC012 LMbench. 3 test suites for components, features and performance tiers are also provided. Change-Id: Ic5223c1401270d126aabb4bf062e40da9464e18f Signed-off-by: JingLu5 <lvjing5@huawei.com>
2016-12-13Add support for OpenSrack NewtonJingLu51-0/+41
JIRA: YARDSTICK-410 This patch uses keystoneauth1.session to initialize the client for Heat The keystoneauth1.session.Session class was introduced into keystoneauth1 as an attempt to bring a unified interface to the various OpenStack clients that share common authentication and request parameters between a variety of services. Change-Id: Ie6287b50a36cf03950fa1174791df826e9bdafd3 Signed-off-by: JingLu5 <lvjing5@huawei.com>
2016-12-12Merge "Add support for Storperf job status"Rex Lee1-2/+2
2016-12-05Merge "import new _put_file_shell method from upstream rally"Rex Lee1-2/+58
2016-12-05Merge "Bugfix: debug should be default off"Jing Lu1-1/+1
2016-12-01Merge "vsperf: Enhanced vswitchperf configuration"Rex Lee1-5/+5
2016-12-01Merge "ssh.py: add flag to keep stdin open"Rex Lee1-0/+19
2016-11-30import new _put_file_shell method from upstream rallyRoss Brattain1-2/+58
upstream openstack rally added new _put_file_* methods we should use these https://github.com/openstack/rally/blob/0.7.0/rally/common/sshutils.py#L270 Updates: imported rally test__put_file_shell unittests quote to prevent word split use -- guard only chmod on cat success Change-Id: I357d1a66b5beddad8042958f4e55d67fc68929f6 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2016-11-30vsperf: Enhanced vswitchperf configurationMartin Klozik1-5/+5
Original implementation of vsperf specific class was changed to relfect recent vsperf changes. It is now possible to modify any of vsperf's configuration parameters via --test-param CLI argument. It means, that it is possible to write a yardstick TC, which will define all required vsperf configuration inside the YAML TC definition. Vsperf documentation related to yardstick usage and sample TC files are located inside vsperf repository and they were updated by a separate patch. JIRA: VSPERF-422 Change-Id: I978d1c85ffeb3c90d9d47a20c6c0e0f68b437123 Signed-off-by: Martin Klozik <martinx.klozik@intel.com> Reviewed-by: <sunshine.wang@huawei.com> Reviewed-by: <lvjing5@huawei.com> Reviewed-by: <jean.gaoliang@huawei.com> Reviewed-by: <david.j.chou@intel.com>
2016-11-30Bugfix: debug should be default offrexlee87761-1/+1
JIRA: YARDSTICK-398 Change-Id: I8b2f776a9cf6d577150633999354db762fcb93ae Signed-off-by: rexlee8776 <limingjiang@huawei.com>
2016-11-30Use flask jsonify method to return json resultchenjiankun6-232/+0
JIRA: YARDSTICK-433 Python json lib is very hard to parse when transport via network. Flask jsonfiy is more easier to use. Change-Id: I2afd5238d65bc474170c57d2f9307dc881ea4990 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2016-11-30Merge "Create API and command to create a influxDB container"Jing Lu4-0/+124
2016-11-30Merge "Decoupling prepare_env.sh and load_images.sh"Rex Lee2-10/+12
2016-11-30Create API and command to create a influxDB containerchenjiankun4-0/+124
JIRA: YARDSTICK-425 This API is used to create a influxDB Container Add command line to create a influxDB Container, too Change-Id: If9c2d04b779924d492a5d5ea91f7968fa959570e Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2016-11-29Merge "Move requirement.txt from tests/ci/ to project root path"Rex Lee1-79/+0
2016-11-29Add support for Storperf job statusJingLu51-2/+2
JIRA: YARDSTICK-419 The StorPerf now supports query the job "status", Yardstick's StorPerf testcase need to support this feature. The "status" will be used for determining whether a StorPerf workload is finished. Change-Id: I9d8bca5f8cd209653204740df63fef4091ca43f5 Signed-off-by: JingLu5 <lvjing5@huawei.com>
2016-11-29Decoupling prepare_env.sh and load_images.shJingLu52-10/+12
JIRA: YARDSTICK-430 The "prepare_env.sh" and “load_images.sh” have serious dependency. The “load_images.sh” uses the "YARD_IMG_ARCH" variable which is defined in the "prepare_env.sh" to choose the base ubuntu image version. We want to decoupling these two scripts, so they can be invoked separately. Change-Id: I30c1b4a65f73b1550fa5eb96366fe8b1d59251d7 Signed-off-by: JingLu5 <lvjing5@huawei.com>
2016-11-28Merge "Create API to get test case result"Rex Lee6-2/+126
2016-11-24Create API to get test case resultchenjiankun6-2/+126
JIRA: YARDSTICK-416 Change-Id: I722566bb0e5bc5288cd6302559e56a3f92ebbeca Signed-off-by: chenjiankun <chenjiankun1@huawei.com>