diff options
-rw-r--r-- | os_client_config/cloud_config.py | 7 | ||||
-rw-r--r-- | os_client_config/config.py | 4 |
2 files changed, 9 insertions, 2 deletions
diff --git a/os_client_config/cloud_config.py b/os_client_config/cloud_config.py index 5dfbba9..08c739a 100644 --- a/os_client_config/cloud_config.py +++ b/os_client_config/cloud_config.py @@ -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) diff --git a/os_client_config/config.py b/os_client_config/config.py index 2dd49c3..f1df797 100644 --- a/os_client_config/config.py +++ b/os_client_config/config.py @@ -831,7 +831,7 @@ class OpenStackConfig(object): config['auth']['token'] = 'notused' return loading.get_plugin_loader(config['auth_type']) - def _validate_auth_ksc(self, config): + def _validate_auth_ksc(self, config, cloud): try: import keystoneclient.auth as ksc_auth except ImportError: @@ -1005,7 +1005,7 @@ class OpenStackConfig(object): self.log.debug("Deferring keystone exception: {e}".format(e=e)) auth_plugin = None try: - config = self._validate_auth_ksc(config) + config = self._validate_auth_ksc(config, cloud) except Exception: raise e else: |