From: Bin Yang Date: Tue, 31 Oct 2017 05:14:50 +0000 (+0800) Subject: Workaround for keystone url without version X-Git-Tag: v1.0.0~3 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=a82078106731ac4a627577147057c651ca8073b0;p=multicloud%2Fopenstack.git Workaround for keystone url without version Append v3 to end of keystone url if version is missing Change-Id: Ic0d2ad254b4cf542b5040fed189ad85fe5176e84 Issue-Id: MULTICLOUD-123 Signed-off-by: Bin Yang --- diff --git a/newton/newton/requests/views/util.py b/newton/newton/requests/views/util.py index 59eed5ab..ba383475 100644 --- a/newton/newton/requests/views/util.py +++ b/newton/newton/requests/views/util.py @@ -68,7 +68,8 @@ class VimDriverUtils(object): password=vim["password"], user_domain_name=vim["domain"], project_id=tenantid) - elif '/identity' in vim["url"]: + #elif '/identity' in vim["url"]: + else: auth = keystone_v3.Password(auth_url=vim["url"]+"/v3", username=vim["userName"], password=vim["password"], @@ -87,7 +88,8 @@ class VimDriverUtils(object): project_name=tenant_name, user_domain_name=vim["domain"], project_domain_name=vim["domain"]) - elif '/identity' in vim["url"]: + #elif '/identity' in vim["url"]: + else: auth = keystone_v3.Password(auth_url=vim["url"]+"/v3", username=vim["userName"], password=vim["password"],