aboutsummaryrefslogtreecommitdiffstats
path: root/functest/utils
diff options
context:
space:
mode:
authorhelenyao <yaohelan@huawei.com>2016-12-08 05:31:49 -0500
committerJose Lausuch <jose.lausuch@ericsson.com>2016-12-12 09:45:23 +0000
commit6e6b26748351888ebc0b8213c5b0583a23418b6e (patch)
treed7c736454e216fb40a35b592d6d302dbba1bc1a8 /functest/utils
parent14f2b4917411bb24a03f04a210627f144873a995 (diff)
Support rally configuration for both Newton and Mitaka
JIRA: FUNCTEST-644 As the RC file is different between Newton and Mitaka, the rally configuration file differs in two versions of openstack. Change-Id: Ibf06b7d1f0da87f155a95a152bb78ee7c2b9eb7d Signed-off-by: helenyao <yaohelan@huawei.com>
Diffstat (limited to 'functest/utils')
-rwxr-xr-xfunctest/utils/openstack_utils.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/functest/utils/openstack_utils.py b/functest/utils/openstack_utils.py
index 10aaf503..1aac869e 100755
--- a/functest/utils/openstack_utils.py
+++ b/functest/utils/openstack_utils.py
@@ -133,7 +133,14 @@ def source_credentials(rc_file):
def get_credentials_for_rally():
creds = get_credentials("keystone")
- admin_keys = ['username', 'tenant_name', 'password']
+ keystone_api_version = os.getenv('OS_IDENTITY_API_VERSION')
+ if (keystone_api_version is None or
+ keystone_api_version == '2'):
+ admin_keys = ['username', 'tenant_name', 'password']
+ else:
+ admin_keys = ['username', 'password', 'user_domain_name',
+ 'project_name', 'project_domain_name']
+
endpoint_types = [('internalURL', 'internal'),
('publicURL', 'public'), ('adminURL', 'admin')]
if 'endpoint_type' in creds.keys():