summaryrefslogtreecommitdiff
path: root/keystoneclient/service_catalog.py
diff options
context:
space:
mode:
authorDean Troyer <dtroyer@gmail.com>2012-03-06 12:08:42 -0600
committerDean Troyer <dtroyer@gmail.com>2012-03-06 23:57:06 -0600
commitbdc0abbd81a7988188adaae2af22006274a23801 (patch)
treea31ce384a17d0676e0b867c9211e68508d600b79 /keystoneclient/service_catalog.py
parentca767856b600f2f14243b0979f706b78635996fd (diff)
downloadpython-keystoneclient-bdc0abbd81a7988188adaae2af22006274a23801.tar.gz
Make ec2-credentials-* commands work properly for non-admin user
* Add user id to token-get output * Save authenticated user and tenant IDs in client in Client._extract_service_catalog() * Handle default user and tenant IDs in ec2-credentials-* commands Fixed bug 947011 Change-Id: I97750f666ba03f32f0bb1be0c2df5ad8a321b433
Diffstat (limited to 'keystoneclient/service_catalog.py')
-rw-r--r--keystoneclient/service_catalog.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/keystoneclient/service_catalog.py b/keystoneclient/service_catalog.py
index 91ac170..eb0941b 100644
--- a/keystoneclient/service_catalog.py
+++ b/keystoneclient/service_catalog.py
@@ -31,9 +31,10 @@ class ServiceCatalog(object):
token = {'id': self.catalog['token']['id'],
'expires': self.catalog['token']['expires']}
try:
- token['tenant'] = self.catalog['token']['tenant']['id']
+ token['user_id'] = self.catalog['user']['id']
+ token['tenant_id'] = self.catalog['token']['tenant']['id']
except:
- # just leave the tenant out if it doesn't exist
+ # just leave the tenant and user out if it doesn't exist
pass
return token