summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorMichael Gundlach <michael.gundlach@rackspace.com>2010-09-01 13:55:38 -0400
committerMichael Gundlach <michael.gundlach@rackspace.com>2010-09-01 13:55:38 -0400
commitb965dde9e95e16a9a207697d5729bd146c2dfd23 (patch)
treef714da896e130ed131153aa2b848e6eaec6b15c9 /nova/api
parent40778d77936cb63decfc56e6b75fa4c31c13a564 (diff)
downloadnova-b965dde9e95e16a9a207697d5729bd146c2dfd23.tar.gz
nova-b965dde9e95e16a9a207697d5729bd146c2dfd23.tar.xz
nova-b965dde9e95e16a9a207697d5729bd146c2dfd23.zip
Fix simple errors to the point where we can run the tests [but not pass]
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/ec2/__init__.py10
-rw-r--r--nova/api/ec2/cloud.py2
-rw-r--r--nova/api/ec2/context.py (renamed from nova/api/ec2/apirequestcontext.py)0
3 files changed, 7 insertions, 5 deletions
diff --git a/nova/api/ec2/__init__.py b/nova/api/ec2/__init__.py
index aee9915d0..3335338e0 100644
--- a/nova/api/ec2/__init__.py
+++ b/nova/api/ec2/__init__.py
@@ -26,9 +26,11 @@ import webob
import webob.dec
import webob.exc
+from nova import exception
+from nova import wsgi
+from nova.api.ec2 import context
from nova.api.ec2 import admin
from nova.api.ec2 import cloud
-from nova import exception
from nova.auth import manager
@@ -74,7 +76,7 @@ class Authenticate(wsgi.Middleware):
raise webob.exc.HTTPForbidden()
# Authenticated!
- req.environ['ec2.context'] = APIRequestContext(user, project)
+ req.environ['ec2.context'] = context.APIRequestContext(user, project)
return self.application
@@ -188,7 +190,7 @@ class Authorization(wsgi.Middleware):
for role in roles)
-class Executor(wsg.Application):
+class Executor(wsgi.Application):
"""
Executes 'ec2.action' upon 'ec2.controller', passing 'ec2.context' and
'ec2.action_args' (all variables in WSGI environ.) Returns an XML
@@ -217,6 +219,6 @@ class Executor(wsg.Application):
resp.body = ('<?xml version="1.0"?>\n'
'<Response><Errors><Error><Code>%s</Code>'
'<Message>%s</Message></Error></Errors>'
- '<RequestID>?</RequestID></Response>') % (code, message))
+ '<RequestID>?</RequestID></Response>') % (code, message)
return resp
diff --git a/nova/api/ec2/cloud.py b/nova/api/ec2/cloud.py
index 566887c1a..fc0eb2711 100644
--- a/nova/api/ec2/cloud.py
+++ b/nova/api/ec2/cloud.py
@@ -357,7 +357,7 @@ class CloudController(object):
'instanceId': instance_id,
'requestId': context.request_id,
'status': volume['attach_status'],
- 'volumeId': volume_id})
+ 'volumeId': volume_id}
def _convert_to_set(self, lst, label):
if lst == None or lst == []:
diff --git a/nova/api/ec2/apirequestcontext.py b/nova/api/ec2/context.py
index fb3118020..fb3118020 100644
--- a/nova/api/ec2/apirequestcontext.py
+++ b/nova/api/ec2/context.py