summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2016-12-28Yardstick Plugin: add support for ssh login using keyJingLu52-25/+52
JIRA: YARDSTICK-442 Change-Id: I4736e8cb8331d7a74c8c9946e21edd791b0c8ba9 Signed-off-by: JingLu5 <lvjing5@huawei.com>
2016-12-28Merge "enhance test cases description and provide more info(in progress)"Jing Lu11-269/+738
2016-12-28Merge "Use ConfigParser to write yardstick.conf"Jing Lu4-38/+42
2016-12-26Use ConfigParser to write yardstick.confchenjiankun4-38/+42
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>
2016-12-24Add sqlite and SQLAlchemy support for APIchenjiankun4-0/+64
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>
2016-12-24Merge "Bugfix: the load_image.sh script will load a image with the same name"Jing Lu4-2/+19
2016-12-24Merge "Move uwsgi.log and yardstick.sock to proper location"Jing Lu3-3/+9
2016-12-22Bugfix: the load_image.sh script will load a image with the same namechenjiankun4-2/+19
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-22Yardstick API refactorchenjiankun8-46/+72
JIRA: YARDSTICK-503 Now in api/views.py there are many redundant code. So I do some refactoring and make it to be a lightweight framework. Change-Id: Id7cecc95e60f5403b2d26239a3ef41d01bbb542a Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2016-12-22Merge "ssh: don't quote ~ in remotepaths"Jing Lu2-11/+41
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-21Move uwsgi.log and yardstick.sock to proper locationchenjiankun3-3/+9
JIRA: YARDSTICK-504 Now yardstick.sock and uwsgi.log is in yardstick/api directory. But it is not standard for they should not be put in the code path. So I move yardstick.sock to /var/run/yardstick.sock and move uwsgi.log to /var/log/yardstick/uwsgi.log Change-Id: I526ab011c0222255dfbae037f494edb5d8a88add Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2016-12-21restore the yardstick-img-modify cleanup() funcRyan.RCS1-3/+5
There is a result failed again after last update. So i restore the clean() function to its original codes and avoid CI failed. But i'm not sure something about the clean() function, and I will check this failed clearly in future. Change-Id: I8f49533788c7ccb2016e7a484368a72028579fa8 JIRA: YARDSTICK-502 Signed-off-by: Ryan.RCS <lihainong@huawei.com>
2016-12-20ssh: don't quote ~ in remotepathsRoss Brattain2-11/+41
~ 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-21Merge "fixed issue in yardstick-img-modify cleanup() fun"Jing Lu1-1/+5
2016-12-21fixed issue in yardstick-img-modify cleanup() funRyan.RCS1-1/+5
1. when run yardstick-img-modify script, sometimes it show below error. + '[' -f /tmp/workspace/yardstick/yardstick-xenial-server.raw ']' + kpartx -dv /tmp/workspace/yardstick/yardstick-xenial-server.raw ioctl: LOOP_CLR_FD: No such device or address del devmap : loop0p1 can't del loop : /dev/loop0 + test 1 -eq 1 -o 1 -eq 2 2. so i added a expression to check if the .raw file map deleted or not 3. if the devmap not deleted, then we delete it, otherwise, we do nothing JIRA: YARDSTICK-502 Change-Id: Ia050121ed6bf837bab05e38f2e9e9628ca31627a Signed-off-by: Ryan.RCS <lihainong@huawei.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 foundJingLu52-4/+4
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-20Merge "change m1.* flavor to "yardstick-flavor""Rex Lee19-20/+20
2016-12-19Merge "Update Yardstick README file"Rex Lee1-51/+19
2016-12-19change m1.* flavor to "yardstick-flavor"JingLu519-20/+20
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-15Merge "Add support for OpenSrack Newton"Rex Lee3-23/+146
2016-12-15Merge "Bugfixed:run command: "yardstick-img-modify" fail!"Rex Lee1-1/+1
2016-12-15Update Yardstick README fileJingLu51-51/+19
JIRA: YARDSTICK-443 Change-Id: Iecd56e257513ca2d1217fd44aaaf377a3c04104d Signed-off-by: JingLu5 <lvjing5@huawei.com>
2016-12-15Bugfixed:run command: "yardstick-img-modify" fail!Ryan.RCS1-1/+1
Avoid incorrect deletion of $raw_imgfile when the command: "kpartx -dv $raw_imgfile" execute failed. JIRA: YARDSTICK-424 Change-Id: I34dac60bda6c028c4b0f0bfd9ad077e2d5dbb0ff Signed-off-by: Ryan.RCS <lihainong@huawei.com>
2016-12-14Merge "BugFix: Upgrade python-novaclient and other dependencies"Rex Lee1-9/+9
2016-12-13Add support for OpenSrack NewtonJingLu53-23/+146
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-13Merge "ssh.py: add flag to request for a pseudo terminal (pty) for ssh ↵Rex Lee1-3/+9
connection"
2016-12-13Merge "env: convert file open to context manager"Jing Lu1-1/+2
2016-12-12Merge "Increase Ping scenario ssh timeout limit to 600 seconds"Rex Lee1-1/+1
2016-12-12Merge "Bugfix: update Yardstick custom VM image name in user guide"Rex Lee1-2/+2
2016-12-12Merge "use context manager for stdin files and use _put_file_shell"Rex Lee25-121/+126
2016-12-12Merge "Add support for Storperf job status"Rex Lee2-30/+29
2016-12-08ssh.py: add flag to request for a pseudo terminal (pty) for ssh connectionDeepak S1-3/+9
For some VNFs we may want to send periodic commands, for example to print statistics etc. When you open a SSH connection, request a pseudo terminal (pty) which allows passing of control characters to the connection. JIRA: YARDSTICK-453 Change-Id: Ibfd4164e745f005d0e29f6efdc63076e1e220b60 Signed-off-by: Deepak S <deepak.s@linux.intel.com>
2016-12-08BugFix: Upgrade python-novaclient and other dependenciesJingLu51-9/+9
JIRA: YARDSTICK-454 The python-novalient need to upgraded to fix the error in jenkin CI joid environment. Related dependencies also need to be updated. Change-Id: I63ce57aadbd46f159df2b5371caf3725e311ab34 Signed-off-by: JingLu5 <lvjing5@huawei.com>
2016-12-07env: convert file open to context managerRoss Brattain1-1/+2
always use context managers to open file Change-Id: I2c894ea87a94789edbed4a4da1fa906b28556664 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2016-12-07Bugfix: update Yardstick custom VM image name in user guideJingLu51-2/+2
JIRA: YARDSTICK-451 Change-Id: Ie6e4a0b924f4ee047756b954e88c50621e0b596f Signed-off-by: JingLu5 <lvjing5@huawei.com>
2016-12-06Merge "update grafana dashboard opnfv_yardstick_tc002"Rex Lee1-1/+1
2016-12-06update grafana dashboard opnfv_yardstick_tc002rexlee87761-1/+1
JIRA: YARDSTICK-447 Change-Id: Iba97948eb9db2d8f22b31fdfc6e09570ed6b11b9 Signed-off-by: rexlee8776 <limingjiang@huawei.com>
2016-12-06Bugfix: create stack failed due to not export EXTERNAL_NETWORK environment ↵chenjiankun1-0/+3
viarable JIRA: YARDSTICK-449 Now if we run prepare env, we will not source the EXTERNAL_NETWORK. I will source the EXTERNAL_NETWORK after I get it. Change-Id: I917fcecae2cac13b7511667c0687d10eccfac751 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2016-12-05Change grafana default dashboard from ping to opnfv_yardstick_tc002chenjiankun1-1/+1
JIRA: YARDSTICK-447 Now the grafana default dashboard use the sample/ping.yaml test case. I will change it to opnfv_yardstick_tc002 because it is the release test case. Change-Id: If20ca123d0407ad92b49f7d2dac98faa2a01e195 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2016-12-05use context manager for stdin files and use _put_file_shellRoss Brattain25-121/+126
requires https://gerrit.opnfv.org/gerrit/#/c/25183/ use new ssh method _put_file_shell to upload files. We have to use _put_file_shell because we rely on ~/ path expansions. Eventually we should move to remote absolute paths so we can use sftp upload. For ssh.execute() replace open() with context manager context managers were invented partly to control freeing resources. Opening files without closing them will leak file descriptors. The old standard method for closing files: f = open('data.txt') try: data = f.read() finally: f.close() was replaced with a context manager with open('data.txt') as f: data = f.read() Reference: Raymond Hettinger's Pycon 2013 presentation: https://speakerdeck.com/pyconslides/transforming-code-into-beautiful-idiomatic-python-by-raymond-hettinger-1 Video: https://youtu.be/OSGv2VnC0go?t=2522 Always use context managers for files Update: rebased now that _put_file_shell was merged Change-Id: Iabfc0e43aa3b7766d7c658115e13d21c31efb2a9 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2016-12-05Bugfix: create yardstick.conf file failed due to wrong config file pathchenjiankun1-1/+1
JIRA: YARDSTICK-446 now the yardstick dispatcher config path is set to /etc/yardstick/config.yaml which is wrong. I will change it to /etc/yardstick/yardstick.conf Change-Id: I4cd5436bf64f3b764f6bb102eff3443e765fffe9 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2016-12-05Bugfix: easy_install -U setuptools go wrong due to the setuptools versionchenjiankun1-1/+1
JIRA: YARDSTICK-445 Currently we do not set the setuptools version. Now the setuptools version update to the 30.2.0, but when run easy_install -U setuptools, it goes wrong. So I set the setuptools version to 30.0.0 Change-Id: Id7ae232cce6d088355f71a7124688cb625d18457 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2016-12-05Merge "argsAlreadyParsedError: arguments already parsed: cannot register CLI ↵Rex Lee1-12/+14
option"
2016-12-05Merge "fix SSH object examples to use correct context manager form"Rex Lee1-8/+13