Fix for cinder api memoize issue

cinder api (api/cinder.py) cinderclient returns an
UnashableKeyWarning for client api_version param.

This patch fixes the bug by removing the api_version param from the
memoized with request function.

Change-Id: I11f3ca8642fb746bd725f059f089f9b3900c6f66
Closes-Bug: #1606020
This commit is contained in:
Luis Daniel Castellanos 2016-07-25 10:57:30 -05:00
parent 09b745a4bb
commit 14f7b015ea

View File

@ -183,7 +183,6 @@ def get_auth_params_from_request(request):
raise
return(
api_version,
request.user.username,
request.user.token.id,
request.user.tenant_id,
@ -194,10 +193,11 @@ def get_auth_params_from_request(request):
@memoized_with_request(get_auth_params_from_request)
def cinderclient(request_auth_params):
api_version = VERSIONS.get_active_version()
insecure = getattr(settings, 'OPENSTACK_SSL_NO_VERIFY', False)
cacert = getattr(settings, 'OPENSTACK_SSL_CACERT', None)
api_version, username, token_id, tenant_id, cinder_url, auth_url =\
username, token_id, tenant_id, cinder_url, auth_url =\
request_auth_params
c = api_version['client'].Client(username,
token_id,