aboutsummaryrefslogtreecommitdiffstats
path: root/api/database
AgeCommit message (Collapse)AuthorFilesLines
2017-08-24Add function to upload image from local/url in GUIchenjiankun2-3/+5
JIRA: YARDSTICK-782 As user, we need to upload image from local/url. If upload image from local, user need to choose local image, then we will load it to openstack. If upload image from url, we will download it and load it to openstack. Change-Id: Ia9a42fda15a1dfc91476643635343a2f77a94a6b Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-07-27Yardstick GUI & GUI deploymentchenjiankun1-1/+1
JIRA: YARDSTICK-758 As E release plan, we have the need of yardstick GUI. This patch is GUI front end code and deployment. The backend code is yardstick API. Change-Id: Ib15f78bcc50168c7828beff97256e9939c6da809 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-07-21Add API(v2) to get all task infochenjiankun1-0/+3
JIRA: YARDSTICK-754 API: /api/v2/yardstick/tasks METHOD: GET Change-Id: I556b0880674d78d67e0a556c4d95f902131cd027 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-07-21Merge changes from topics 'get_project', 'get_projects'Rex Lee1-0/+3
* changes: Add API(V2) to get certain project info Add API(v2) to get all projects info
2017-07-19Add API(v2) to get all projects infochenjiankun1-0/+3
JIRA: YARDSTICK-732 API: /api/v2/yardstick/projects METHOD: GET Change-Id: Ifd67f11f516270d96c0e80b5b8c76a939583d9e5 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-07-17Add API(v2) to create grafanachenjiankun1-0/+6
JIRA: YARDSTICK-727 API: /api/v2/yardstick/containers/action METHOD: POST PARAMS: { 'action': 'create_influxdb', 'args': { 'environment_id': environment_id } } Change-Id: I12fc23261ba62df6f923a4d34455ad8b46c4aa8f Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-07-13Add API to get environmentschenjiankun1-0/+3
JIRA: YARDSTICK-716 API: /api/v2/yardstick/environments METHOD: GET Change-Id: I46b7fb2b143fe76b6a0edbf1ecc8281187b85918 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-07-12Yardstick api database v2 modelchenjiankun3-0/+285
JIRA: YARDSTICK-713 We have api v2 for gui, and they are all based on the database model. Change-Id: I51b127588b0b84316acff8acf4a7886339646060 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-06-30Change prepareYardstickEnv to prepare_env and add log infochenjiankun1-17/+11
JIRA: YARDSTICK-697 Currently the action in env like prepareYardstickEnv, createGrafanaContainer, createInfluxDBContainer, this is not python style. So I do some change: prepareYardstickEnv->prepare_env createGrafanaContainer->create_grafana createInfluxDBContainer->create_influxdb And also add some log info in env_action. Change-Id: Ia91576b975f3de76b96e312779fda4911e7cac24 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-06-29Call core code directly in the API of run test casechenjiankun4-31/+34
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-01-17Add unittest framework for Yardstick APIchenjiankun1-1/+3
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 Brattain2-0/+2
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-10Merge "Add API to get the status of async task"Jing Lu3-6/+41
2017-01-10Add API to get the status of async taskchenjiankun3-6/+41
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-28Record test case names when run a task using APIchenjiankun1-0/+31
JIRA: YARDSTICK-509 Currently we use influxdb as database and will not record test case name when run a test case. So if we must offer test case name if we want to get result from API. Regarding future requirement, I create sqlite database and alchemy orm framework. And record test case name when run a test case. So we needn't offer test case any more when call for get result API. Change-Id: I7d7dc24543a33918546267591f7bdcd0742928cb Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2016-12-24Add sqlite and SQLAlchemy support for APIchenjiankun2-0/+54
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>