Fix client could not init glance client
Now the client can not initialise glance client, give the warning msg like: # murano environment-create test-env Could not initialise glance client. Image creation will be unavailable. Have two issue about this: 1. can not get the endpoint correctly, the get endpoint are all murano's endpoint. This is due to when get the endpoint, if have the endpoint, will return this endpoint directly. 2. Get the correctly endpoint, init the glance client, give the error: TypeError: "__init__() got an unexpected keyword argument 'endpoint_type'" This is due to 'endpoint_type' argument. Change-Id: I87df369eecc9b79cb7173967729351f7e601edc0 Closes-bug: #1594731
This commit is contained in:
parent
5ff2902456
commit
df7ecbc290
|
@ -369,7 +369,7 @@ class MuranoShell(object):
|
|||
|
||||
# make args compatible with DefaultCLI/AuthCLI
|
||||
args.os_token = args.os_auth_token
|
||||
args.os_endpoint = endpoint
|
||||
args.os_endpoint = ''
|
||||
# avoid password prompt if no password given
|
||||
args.os_password = args.os_password or '<no password>'
|
||||
(v2_auth_url, v3_auth_url) = self._discover_auth_versions(
|
||||
|
@ -399,6 +399,7 @@ class MuranoShell(object):
|
|||
'region_name': args.os_region_name,
|
||||
}
|
||||
glance_kwargs = kwargs.copy()
|
||||
del glance_kwargs['endpoint_type']
|
||||
|
||||
if args.api_timeout:
|
||||
kwargs['timeout'] = args.api_timeout
|
||||
|
|
Loading…
Reference in New Issue