diff options
author | Jamie Lennox <jamielennox@gmail.com> | 2016-01-16 14:04:54 +1100 |
---|---|---|
committer | Jamie Lennox <jamielennox@gmail.com> | 2016-06-17 11:46:00 +1000 |
commit | 87a37f5db26b7cf6cc1e6240a7ebef4900983825 (patch) | |
tree | 15c33580edb2cd4bd812e6c967907cea314ca837 /contrib | |
parent | 98dec2c9de98e73e85ef5d2ffb6a4e3ec398f688 (diff) | |
download | heat-87a37f5db26b7cf6cc1e6240a7ebef4900983825.tar.gz |
Sync context with oslo.context
Heat makes a lot of variations to the basic oslo.context which are going
to make it very hard to reuse with features added to the base
oslo.context.
There are a number of changes here that will make the heat context
options more like those from oslo.context.
*) context.user and context.tenant are IDs, not names. This will be
important for policy credentials.
*) kwargs should be passed through to base context so it can be extended
in the base class.
Change-Id: Ib0d60c6af196ba5c00459110b7a6190cff916d6f
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/rackspace/heat_keystoneclient_v2/client.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/rackspace/heat_keystoneclient_v2/client.py b/contrib/rackspace/heat_keystoneclient_v2/client.py index 64f028e5d..c7b6d8b14 100644 --- a/contrib/rackspace/heat_keystoneclient_v2/client.py +++ b/contrib/rackspace/heat_keystoneclient_v2/client.py @@ -92,12 +92,12 @@ class KeystoneClientV2(object): auth_kwargs['trust_id'] = self.context.trust_id auth_kwargs['tenant_id'] = self.context.tenant_id elif self.context.auth_token is not None: - kwargs['tenant_name'] = self.context.tenant + kwargs['tenant_name'] = self.context.project_name kwargs['token'] = self.context.auth_token elif self.context.password is not None: kwargs['username'] = self.context.username kwargs['password'] = self.context.password - kwargs['tenant_name'] = self.context.tenant + kwargs['tenant_name'] = self.context.project_name kwargs['tenant_id'] = self.context.tenant_id else: LOG.error(_LE("Keystone v2 API connection failed, no password " |