aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/common/constants.py
AgeCommit message (Collapse)AuthorFilesLines
2017-07-14yardstick env influxdb/grafana cmd support centoschenjiankun1-0/+2
JIRA: YARDSTICK-714 Currently yardstick env influxdb/grafana command do not support centos. Because we use the gateway ip to get the service of influxdb and grafana. But in centos, we can not access influxdb/grafana service via gateway ip. In this patch, I use docker inspect to get the ip of influxdb and grafana. So these command can support centos. Change-Id: I4599cbbd0fe43de9cf08e5d9e74d31edbb742998 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-04-22Yardstick virtualenv supportchenjiankun1-1/+1
JIRA: YARDSTICK-620 In the patch, I separate python-setuptools from install.sh and separate appdirs from requirements.txt because there will be error when install them in virtualenv. Also I will update the documentation when this patch merged; Change-Id: I99a532d1851983775869e7c5e8e65fd0229e86df Signed-off-by: chenjiankun <chenjiankun1@huawei.com> (cherry picked from commit bb365d411d88a71871993b4ed803c2ffbbcb79bf)
2017-04-06Yardstick virtualenv supportchenjiankun1-42/+59
JIRA: YARDSTICK-620 Currently we recommend using docker to run yardstick. And it is hard to use virtualenv to install yardstick. So I modify install.sh in yardstick root path. It will support using virtualenv to install yardstick(including API) in linux. In this patch, I make yardstick support read yardstick configuration have priority over constants. Change-Id: I9ea1241b228532a6497451e6c8f232173ddb783e Signed-off-by: chenjiankun <chenjiankun1@huawei.com> (cherry picked from commit b74d875134b988a26441d559a9e700aaa68d6a0c)
2017-03-30Yardstick: User interface for Yardstick.rajesh_4k1-0/+2
Currently Yardstick doesnt have any UI which gives detail analysis of the test-results. This commit generates a HTML page after the execution of a command "yardstick report generate <task-ID> <TC-name>" which intern can be executed after the execution of test-case. Used: Highcharts.js for the graphs. JIRA: YARDSTICK-280 Change-Id: Ic98cc348719f3922bff178f52e7944a4a931763a Signed-off-by: Rajesh K <4k.rajesh@gmail.com> (cherry picked from commit 25b21add71fcf7c2c795bd950b5117d69fac68fb)
2017-02-23Record test case names when run a task using APIchenjiankun1-0/+2
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>
2017-02-06Push yardstick debug log into the artifactsrexlee87761-0/+2
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>
2017-01-23Merge "Record task status if running via CLI"Rex Lee1-0/+2
2017-01-20Record task status if running via CLIchenjiankun1-0/+2
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>
2017-01-20Create API to get a list of all test caseschenjiankun1-0/+2
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>
2017-01-17Add unittest framework for Yardstick APIchenjiankun1-0/+2
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-12Add support for Python 3Ross Brattain1-0/+1
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-10Add API to get the status of async taskchenjiankun1-1/+3
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-26Use ConfigParser to write yardstick.confchenjiankun1-2/+16
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-22Bugfix: the load_image.sh script will load a image with the same namechenjiankun1-0/+2
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-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-04Add API and command support for yardstick env preparechenjiankun1-3/+25
JIRA: YARDSTICK-406 Change-Id: Icf837a6f34a22158203566a43a6446fc269c096f Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2016-12-02Add API to create Grafana containerchenjiankun1-0/+6
JIRA: YARDSTICK-441 Change-Id: Ia848c4af072915ef252e8e03100dd7a4e4a6c3c2 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2016-11-30Create API and command to create a influxDB containerchenjiankun1-0/+7
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-08Create a constants.py to manage constant variable consistentlychenjiankun1-0/+3
JIRA: YARDSTICK-378 Change-Id: I527d4f60f2a2081730118bdbbea6c19fc093672f Signed-off-by: chenjiankun <chenjiankun1@huawei.com>