From e2be2d8238c906de430611d4d0c1187b8699e87b Mon Sep 17 00:00:00 2001 From: Dan Prince Date: Sat, 25 Feb 2012 16:43:34 -0500 Subject: 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 --- nova/api/ec2/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: -- cgit