summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorRick Harris <rick.harris@rackspace.com>2010-12-20 17:36:10 -0600
committerRick Harris <rick.harris@rackspace.com>2010-12-20 17:36:10 -0600
commit40c8a8a1a1e834c4e5bb61c853397a90475d83ff (patch)
tree58ae88f9fdf840c366be949cecf7bede199f574f /nova/api
parent650a0cdbc854d37fd62348ce34a14ef91ccbabad (diff)
downloadnova-40c8a8a1a1e834c4e5bb61c853397a90475d83ff.tar.gz
nova-40c8a8a1a1e834c4e5bb61c853397a90475d83ff.tar.xz
nova-40c8a8a1a1e834c4e5bb61c853397a90475d83ff.zip
Typo fix, stubbing out to use admin project for now
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/__init__.py4
-rw-r--r--nova/api/openstack/images.py3
2 files changed, 5 insertions, 2 deletions
diff --git a/nova/api/openstack/__init__.py b/nova/api/openstack/__init__.py
index b9ecbd9b8..178838dfd 100644
--- a/nova/api/openstack/__init__.py
+++ b/nova/api/openstack/__init__.py
@@ -89,7 +89,9 @@ class AuthMiddleware(wsgi.Middleware):
if not user:
return faults.Fault(webob.exc.HTTPUnauthorized())
- req.environ['nova.context'] = context.RequestContext(user, user)
+ #FIXME(sirp): stubbing project to admin for now
+ project = manager.AuthManager().get_project('admin')
+ req.environ['nova.context'] = context.RequestContext(user, project)
return self.application
diff --git a/nova/api/openstack/images.py b/nova/api/openstack/images.py
index 4a0a8e6f1..78849223d 100644
--- a/nova/api/openstack/images.py
+++ b/nova/api/openstack/images.py
@@ -46,8 +46,9 @@ class Controller(wsgi.Controller):
def detail(self, req):
"""Return all public images in detail."""
+ ctxt = req.environ['nova.context']
try:
- images = self._service.detail(req.environ['nova.context'])
+ images = self._service.detail(ctxt)
images = nova.api.openstack.limited(images, req)
except NotImplementedError:
# Emulate detail() using repeated calls to show()