aboutsummaryrefslogtreecommitdiffstats
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
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>
2016-11-24Fix the conflict in yardstick.conf between API and CIchenjiankun1-1/+1
JIRA: YARDSTICK-421 In the Docker image, the default dispatcher value in yardstick.conf is local influxDB. But the CI will set another. It will cause a conflict. So I '>' to cover yardstick.conf file. Change-Id: I7088682e952ee7bb84f6872a49a24296d676a9cb Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2016-11-24Merge "Upgrade yardstick VM image from Ubuntu 14.04 to 16.04"Jing Lu16-20/+20
2016-11-21ssh.py: add flag to keep stdin openRoss Brattain1-0/+19
For some VNFs we may want to send periodic commands, for example to print statistics, but otherwise not write anything for long periods of time. Currently when we can no longer read from stdin we close it. A workaround is to constantly spam stdin with newlines to keep forcing stdin open. We don't want to have to do this, so add an enable flag to keep stdin open. If the caller wants to close stdin at some point it can. Change-Id: I9496022295dfd19804572e484fe4f170ca7d4ac3 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2016-11-21Create API to run test caseschenjiankun5-0/+193
JIRA: YARDSTICK-413 Change-Id: Ibf58b50b568fae3f2eea985b25ee33be0a3666b7 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2016-11-17Move requirement.txt from tests/ci/ to project root pathchenjiankun1-79/+0
JIRA: YARDSTICK-414 Change-Id: I63e4fe1f8cb11ce3d7d94ba999aa3d0597a7c28e Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2016-11-16Merge "Add os-odl_l2-fdio-ha scenario support"Kubi1-0/+30
2016-11-16Merge "convert networkcapacity to LF"Kubi1-56/+56
2016-11-14Merge "Create a constants.py to manage constant variable consistently"Kubi2-0/+29