Fis issue related to keystone version check
Change-Id: I271f39b320aec080e84c47b41b53d32be6879af2
This commit is contained in:
parent
9ed13036de
commit
6bc81b7b28
|
@ -779,10 +779,10 @@ class Utils(object):
|
||||||
constants.DEFAULT_STAGING_PROJECT_NAME
|
constants.DEFAULT_STAGING_PROJECT_NAME
|
||||||
try:
|
try:
|
||||||
projects = []
|
projects = []
|
||||||
if hasattr(ks_client, 'v2') or hasattr(ks_client, 'v2.0'):
|
if ks_client.version in ['v2', 'v2.0']:
|
||||||
# For keystone V2
|
# For keystone V2
|
||||||
projects = ks_client.tenants.list()
|
projects = ks_client.tenants.list()
|
||||||
elif hasattr(ks_client, 'v3') or hasattr(ks_client, 'v3.0'):
|
elif ks_client.version in ['v3', 'v3.0']:
|
||||||
# For keystone V3
|
# For keystone V3
|
||||||
projects = ks_client.projects.list()
|
projects = ks_client.projects.list()
|
||||||
for tenant in projects:
|
for tenant in projects:
|
||||||
|
|
Loading…
Reference in New Issue