Age | Commit message (Collapse) | Author | Files | Lines |
|
JIRA: YARDSTICK-609
In the patch:
https://gerrit.opnfv.org/gerrit/#/c/28833/
It update the license header, but it is improper to swagger yaml file.
The license information will show in swagger docs.
So I remove it.
Change-Id: Ib87f0f43a95e3b2145c4b59059c4573000f1997c
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
|
|
|
|
env prepare should check if openrc is sourced before
using os_fetch_utils to fetch openrc
JIRA: YARDSTICK-577
Change-Id: I0efb0bae3b408156b1133812c29583ab8c58d94b
Signed-off-by: rexlee8776 <limingjiang@huawei.com>
|
|
JIRA: YARDSTICK-569
We have much redundancy code when using nova/neutron/glance... python client.
So I write this code in openstack_utils for calling.
Change-Id: I322b7577de4933246a15e6742ae5a28bea16eb02
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
|
|
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>
|
|
|
|
JIRA: YARDSTICK-570
Currently we only create ping Grafana dashboard when create Grafana
docker container.
Actually we need to create some default dashboards.
Change-Id: Icee975ad8c1c960b27625274c775f1716edfa03e
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
|
|
Change-Id: I063fd37fe25754c94d164ae5a209d15b69322093
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
|
|
|
|
uwsgi will call the 'callable' function which should normally be
Flask.__call__().
But we need to init the db first, so make a wrapper function that inits
the db and then calls app()
Also refactor add_resource into for loop instead of reduce. reduce is
not really approriate here since we aren't consuming the return value
JIRA: YARDSTICK-543
Change-Id: I692d6d42de09f7d6ecf1a67a22e3019d97a4f3ca
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
|
|
removed redundant parens in if and while clauses
use var != constant, not constant != var.
Python doesn't allow for assignment in if statements, so we don't have
to use the old C workarounds
remove unwanted commas
use raw strings for regexps with backslashes, e.g. r'\s' instead of '\s'
Change-Id: I7aad645dd3d7f4b4b62f4e4510a425611c9d28f2
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
|
|
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>
|
|
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>
|
|
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>
|
|
|
|
JIRA: YARDSTICK-475
This API will be used to run test suite files in the test/opnfv/test_suites directory
Change-Id: I208edf9abed62fd6436de988ac85bfe99c4d01bd
Signed-off-by: JingLu5 <lvjing5@huawei.com>
|
|
|
|
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>
|
|
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>
|
|
|
|
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>
|
|
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>
|
|
|
|
|
|
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>
|
|
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>
|
|
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>
|
|
always use context managers to open file
Change-Id: I2c894ea87a94789edbed4a4da1fa906b28556664
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
|
|
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>
|
|
|
|
|
|
JIRA: YARDSTICK-406
Change-Id: Icf837a6f34a22158203566a43a6446fc269c096f
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
|
|
JIRA: YARDSTICK-444
We need web service start when docker run.
But now we add command in bashrc, so the web service start only if we
login in docker container.
So I use supervisor to make the web service start when docker run.
Change-Id: Ic77eb0e130ae7dbd82039c312649fed76b128513
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
|
|
JIRA: YARDSTICK-441
Change-Id: Ia848c4af072915ef252e8e03100dd7a4e4a6c3c2
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
|
|
JIRA: YARDSTICK-440
Change-Id: I15234e833353a33b063993b96f1f787ddf649720
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
|
|
JIRA: YARDSTICK-439
Change-Id: I36ad0663455c51d635c4329f5cbb9da25d8042e1
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
|
|
JIRA: YARDSTICK-432
Change-Id: I8ca6409449e2b960ac9f48c8eb8a6ae9959a4fc8
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
|
|
|
|
|
|
JIRA: YARDSTICK-398
Change-Id: I8b2f776a9cf6d577150633999354db762fcb93ae
Signed-off-by: rexlee8776 <limingjiang@huawei.com>
|
|
JIRA: YARDSTICK-435
Change-Id: Ief767ceca2979494ec0b4ea4d197fd399352b856
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
|
|
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>
|
|
If we setup root logger correctly and have each
module logger propogate we shouldn't need individual
logger configuration
updates:
lower paramiko to WARN level
dispatcher/file.py was missing logging.handlers import
purge all existing handlers and add our own handlers
move everything back into yardstick/__init__.py so API can use it
make _LOG_STREAM_HDLR global, so we can set loglevel on it whenever
added api/server.py call to _init_logging
removed old LOG_FORMATTER from cli.py
only setLevel on yardstick logger
Change-Id: If000799590379d3407655a7d54378481a96ea3d4
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
|
|
|
|
|
|
JIRA: YARDSTICK-429
The API to get result use $ to prevent sql injection. But it doesn't
work.
Change-Id: I130a847297f209fe26062317261f884c5665f5df
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
|
|
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>
|
|
JIRA: YARDSTICK-431
When use API to run test case and set the task-args args, it will
encounter a error of dict object do not have startwith method.
The reason is yardstick will only accept the str type.
So we need to change the dict to str.
Change-Id: I26aac35c477842ab9cd692bdacd401e68673b01d
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
|
|
|
|
JIRA: YARDSTICK-416
Change-Id: I722566bb0e5bc5288cd6302559e56a3f92ebbeca
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
|