From bf651f4207e81ef47e4495402a82e230f533de43 Mon Sep 17 00:00:00 2001 From: Angus Salkeld Date: Thu, 29 Mar 2012 22:22:33 +1100 Subject: [PATCH] s/image/heat in auth code. Signed-off-by: Angus Salkeld --- heat/common/auth.py | 6 +++--- heat/common/context.py | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/heat/common/auth.py b/heat/common/auth.py index 02de27eead..be9c55005d 100644 --- a/heat/common/auth.py +++ b/heat/common/auth.py @@ -151,7 +151,7 @@ class KeystoneStrategy(BaseStrategy): resp, resp_body = self._do_request(token_url, 'GET', headers=headers) def _management_url(self, resp): - for url_header in ('x-image-management-url', + for url_header in ('x-heat-management-url', 'x-server-management-url', 'x-heat'): try: @@ -184,7 +184,7 @@ class KeystoneStrategy(BaseStrategy): We search the full service catalog for services matching both type and region. If the client - supplied no region then any 'image' endpoint + supplied no region then any 'heat' endpoint is considered a match. There must be one -- and only one -- successful match in the catalog, otherwise we will raise an exception. @@ -200,7 +200,7 @@ class KeystoneStrategy(BaseStrategy): logger.warn(msg) continue - if service_type == 'image': + if service_type == 'heat': for ep in service['endpoints']: if region is None or region == ep['region']: if endpoint is not None: diff --git a/heat/common/context.py b/heat/common/context.py index 8af24d9178..5494793ce0 100644 --- a/heat/common/context.py +++ b/heat/common/context.py @@ -93,8 +93,7 @@ class ContextMiddleware(wsgi.Middleware): tokenauth middleware would have rejected the request, so we must be using NoAuth. In that case, assume that is_admin=True. """ - auth_tok = req.headers.get('X-Auth-Token', - req.headers.get('X-Storage-Token')) + auth_tok = req.headers.get('X-Auth-Token') if auth_tok: if req.headers.get('X-Identity-Status') == 'Confirmed': # 1. Auth-token is passed, check other headers