summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Prince <dprince@redhat.com>2012-02-25 16:43:34 -0500
committerDan Prince <dprince@redhat.com>2012-02-25 16:46:30 -0500
commite2be2d8238c906de430611d4d0c1187b8699e87b (patch)
treef32849a5baf3b4b76e2deb02f1de5304343509ba
parente60398ba2ce95a0cd36ecfedb5a2df57552b2f82 (diff)
Update EC2KeystoneAuth to grab tenant 'id'.
Updates the EC2KeystoneAuth middleware so that it supports formatting changes to the Keystone /ec2tokens extension. Instead of setting project_id to a tenant dict this change correctly sets it to an id. Fixes LP Bug #941119. Change-Id: I318ed594929162eafb5d7c3d8b9583cb109b73d4
-rw-r--r--nova/api/ec2/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/api/ec2/__init__.py b/nova/api/ec2/__init__.py
index 15501f4ff..87fea6b2c 100644
--- a/nova/api/ec2/__init__.py
+++ b/nova/api/ec2/__init__.py
@@ -307,7 +307,7 @@ class EC2KeystoneAuth(wsgi.Middleware):
try:
token_id = result['access']['token']['id']
user_id = result['access']['user']['id']
- project_id = result['access']['token']['tenant']
+ project_id = result['access']['token']['tenant']['id']
roles = [role['name'] for role
in result['access']['user']['roles']]
except (AttributeError, KeyError), e: