aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/common/openstack_utils.py
AgeCommit message (Collapse)AuthorFilesLines
2017-07-05Use "OS_INSECURE" variable as the insecure mode indicatorJingLu51-1/+2
Now we use "OS_CACERT" as the insecure mode indicator, it is better to use "OS_INSECURE". Change-Id: I1406193e27510390b4b8fd8f4751d8361560172f Signed-off-by: JingLu5 <lvjing5@huawei.com> (cherry picked from commit a2176af5514fc55ad8421635ad70ce4f26890ed6)
2017-06-28Bugfix: cacert should suppot insecure mode if neededrexlee87761-0/+1
currently, we use env variable "OS_CACERT" to specify the location of cert file. but if there's no cacert and use for personal verification, it's better to also support insecure mode by set OS_CACERT=False JIRA: YARDSTICK-616 Change-Id: I73b0860863bf6386f9114328c52594ef87e02fa3 Signed-off-by: rexlee8776 <limingjiang@huawei.com> (cherry picked from commit aa477334a3cb2e49c4343f66bff44c89d7edcf24)
2017-05-04Bugfix: fix multi-region supportRoss Brattain1-1/+5
When running with multiple regions we need to specify the region when we select the endpoint. the region is specified in the OS_REGION_NAME env variable Change-Id: I37853dd42f6d9013d4475b5e3b2b9f97b6bdc8d0 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com> (cherry picked from commit 90032ba61345752b014002dda629f84c42780e6c)
2017-03-13Bugfix: yardstick https supportchenjiankun1-15/+6
JIRA: YARDSTICK-587 When run in https environment, there is a bug: error: failed to deploy stack: '_init_() got an unexpected keyword argument 'ca_cert'' The reason is the key pass to Session() is cacert, but the key should be verify. Change-Id: Ia9fc1d7908c2fca9d827a5f64deac7cd333d5c07 Signed-off-by: chenjiankun <chenjiankun1@huawei.com> (cherry picked from commit 747e3c5f8a882b07b6876aae61c84d05a8b832f4)
2017-02-24Add common method of openstack in openstack_utilschenjiankun1-5/+343
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>
2017-02-07more logging fixesRoss Brattain1-1/+1
don't use .format() with logging, use regular %s logginer formatter Change-Id: I1ce0d81cc3f81c35003ef453e82c57faeb46c49f Signed-off-by: Ross Brattain <ross.b.brattain@intel.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>
2016-12-27BugFix: correct Copyright info in openstack_utils.pyJingLu51-1/+0
JIRA:YARDSTICK-513 the copyright info in openstack_utils.py is not accurate. (yardstick: this file is copied from rally and slightly modified) this line should be deleted. Change-Id: I6cf8205ee6b142ae87b268829e5ac7454239dd0d Signed-off-by: JingLu5 <lvjing5@huawei.com>
2016-12-13Add support for OpenSrack NewtonJingLu51-0/+97
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>