Workaround bad required params in troveclient

troveclient requires username and password as parameters to the Client
object, but if a Session is passed (like we do) that's not needed. A
patch has been submitted to troveclient, but until that has been
released, simply send None to both parameters.

Change-Id: Ie130a4e83cceb7cab69bfbeb559493d195ef35e1
This commit is contained in:
Monty Taylor 2016-05-09 04:59:13 -05:00
parent 16ed02735b
commit 090a265669
No known key found for this signature in database
GPG Key ID: 3390DB68041A12F0

View File

@ -351,6 +351,13 @@ class CloudConfig(object):
constructor_kwargs['api_version'] = version
else:
constructor_kwargs['version'] = version
if service_key == 'database':
# TODO(mordred) Remove when https://review.openstack.org/314032
# has landed and released. We're passing in a Session, but the
# trove Client object has username and password as required
# args
constructor_kwargs['username'] = None
constructor_kwargs['password'] = None
return client_class(**constructor_kwargs)