aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/common/constants.py
AgeCommit message (Collapse)AuthorFilesLines
2017-07-17Kubernetes (k8s) supportchenjiankun1-0/+1
JIRA: YARDSTICK-682 We decide to support k8s in E release. We need to discuss with openretriver team and then rewrite the ping test case under k8s as the first step. Change-Id: I3f81ebca8de5c1f3a8b7d42581cd7342dc320239 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-07-14Add API(v2) to upload openrcchenjiankun1-0/+2
JIRA: YARDSTICK-719 API: /api/v2/yardstick/environments/openrcs/action METHOD: POST PARAMS: { 'action': 'upload_openrc', 'args': { 'file': file, 'environment_id': environment_id } } Change-Id: If367904a2d0c2d4a192fdc87a8da21ac6549269e Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-07-12Change endpoint to url in APIchenjiankun1-0/+1
There are come conflict with new architecture. Also it is more proper to use url as endpoint. Change-Id: Idce331e36d85d0720bbf3255dca29ba6022e18b2 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-07-12constants: default SERVER_IP to 127.0.0.1Ross Brattain1-1/+9
When running unittest while connected to P2P VPN, their is no default route, so we get None. Instead of using None, default to 127.0.0.1 Not sure why this was renamed to SERVER_IP either, what do we use this value for? Still getting py.test unittest failures all the time. The problem is we lookup influxdb.ip but SERVER_IP is None, so the lookup fails. INFLUXDB_IP = get_param('influxdb.ip', SERVER_IP) SERVER_IP can't ever be None Change-Id: Iedb09dc541137f7cdc6ef8d26dd312807985bfa8 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-06-30Add API to show test case documentationchenjiankun1-0/+1
JIRA: YARDSTICK-694 We need API to show test case documentation. API: /yardstick/testcases/<testcase_name>/docs method: GET example: http://192.168.131.2:8888/yardstick/testcases/opnfv_yardstick_tc002/docs Change-Id: Ib8d591f0ff5f91c4d0a740539727ec73ddd86249 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-06-29Merge "Call core code directly in the API of run test case"Rex Lee1-0/+3
2017-06-29Call core code directly in the API of run test casechenjiankun1-0/+3
JIRA: YARDSTICK-688 We need to call core code directly in the API of runTestCase. It would be more stable. Change-Id: I431a85ded7cd3b20da0462f947c25d91bb99decd Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-06-25Add API to update hosts info about SUTrexlee87761-0/+1
JIRA: YARDSTICK-674 For some SUT which use domain name as endpoint and AUTH_URL, yardstick restAPI should support to add "ip domain_name" info into /etc/hosts so that it can use the ip_address to access the SUT. api: /yardstick/env/action description: update hosts info for domain name method: POST parameters: { "action": "update_hosts", "args": {"opnfv.org": "1.1.1.1", "openstack.org": "2.2.2.2" } } Change-Id: Iaca9c846f02b1d53e2408d6a21f9201b599717d4 Signed-off-by: rexlee8776 <limingjiang@huawei.com>
2017-06-24Add API to upload pod.yaml filechenjiankun1-0/+1
JIRA: YARDSTICK-687 We need a API to upload a pod.yaml file to /etc/yardstick/pod.yaml. API: /yardstick/env/action method: POST param: { 'action': 'upload_pod_file', 'file': file object } Change-Id: I3d25df364da10aaf34f995e948e1704235a40f6f Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-06-24Add API to update openrc variablechenjiankun1-0/+3
JIRA: YARDSTICK-651 Currently we source openrc variable manually or use yardstick env prepare to get openrc file. We need API to update the openrc variable. api: /yardstick/env/action description: source environment variable method: POST parameters: { 'action': 'update_openrc', 'args':{ 'openrc': { 'OS_USERNAME': 'admin', 'OS_PASSWORD': 'console', 'OS_TENANT_NAME': 'admin', 'OS_AUTH_URL': 'http://192.168.131.222:5000/v2.0', 'EXTERNAL_NETWORK': 'ext-net' } } } Change-Id: I680a7249116c8ff0c1a9e7d5089538d935240c80 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-04-20Yardstick 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>
2017-04-01Yardstick 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>
2017-03-17Yardstick: 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>
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>