]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
s/image/heat in auth code.
authorAngus Salkeld <asalkeld@redhat.com>
Thu, 29 Mar 2012 11:22:33 +0000 (22:22 +1100)
committerAngus Salkeld <asalkeld@redhat.com>
Thu, 29 Mar 2012 11:22:33 +0000 (22:22 +1100)
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
heat/common/auth.py
heat/common/context.py

index 02de27eeadcc2d72512076507e315f83a6f51567..be9c55005d4a84581b76730024b266b30a89fbb9 100644 (file)
@@ -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:
index 8af24d9178cb516807b7155fe755cef75d1f565e..5494793ce0539600f903acc80587cf7c9a2ca5ed 100644 (file)
@@ -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