summaryrefslogtreecommitdiffstats
path: root/nova
diff options
context:
space:
mode:
authorMichael Gundlach <michael.gundlach@rackspace.com>2010-09-02 15:59:52 -0400
committerMichael Gundlach <michael.gundlach@rackspace.com>2010-09-02 15:59:52 -0400
commit59adf260b59dcdcc6bc2df3260a331a4a05f535c (patch)
tree37bcc8eccb9f6e48f557e27f661d9c019df32b7c /nova
parent43f1e722b633945a8f5dca005e6fd60515bac4ae (diff)
downloadnova-59adf260b59dcdcc6bc2df3260a331a4a05f535c.tar.gz
nova-59adf260b59dcdcc6bc2df3260a331a4a05f535c.tar.xz
nova-59adf260b59dcdcc6bc2df3260a331a4a05f535c.zip
Move nova.endpoint.images to api.ec2 and delete nova.endpoint
Diffstat (limited to 'nova')
-rw-r--r--nova/api/ec2/cloud.py2
-rw-r--r--nova/api/ec2/images.py (renamed from nova/endpoint/images.py)0
-rw-r--r--nova/cloudpipe/pipelib.py4
-rw-r--r--nova/endpoint/__init__.py0
-rw-r--r--nova/endpoint/notes.txt62
5 files changed, 3 insertions, 65 deletions
diff --git a/nova/api/ec2/cloud.py b/nova/api/ec2/cloud.py
index e3122bbfc..5c9e1b170 100644
--- a/nova/api/ec2/cloud.py
+++ b/nova/api/ec2/cloud.py
@@ -35,7 +35,7 @@ from nova import utils
from nova.auth import manager
from nova.compute import model
from nova.compute.instance_types import INSTANCE_TYPES
-from nova.endpoint import images
+from nova.api.ec2 import images
from nova.network import service as network_service
from nova.network import model as network_model
from nova.volume import service
diff --git a/nova/endpoint/images.py b/nova/api/ec2/images.py
index cfea4c20b..cfea4c20b 100644
--- a/nova/endpoint/images.py
+++ b/nova/api/ec2/images.py
diff --git a/nova/cloudpipe/pipelib.py b/nova/cloudpipe/pipelib.py
index 2867bcb21..97272eda6 100644
--- a/nova/cloudpipe/pipelib.py
+++ b/nova/cloudpipe/pipelib.py
@@ -32,7 +32,7 @@ from nova import exception
from nova import flags
from nova import utils
from nova.auth import manager
-from nova.endpoint import api
+from nova.api.ec2 import context
FLAGS = flags.FLAGS
@@ -60,7 +60,7 @@ class CloudPipe(object):
key_name = self.setup_keypair(project.project_manager_id, project_id)
zippy = open(zippath, "r")
- context = api.APIRequestContext(handler=None, user=project.project_manager, project=project)
+ context = context.APIRequestContext(user=project.project_manager, project=project)
reservation = self.controller.run_instances(context,
# run instances expects encoded userdata, it is decoded in the get_metadata_call
diff --git a/nova/endpoint/__init__.py b/nova/endpoint/__init__.py
deleted file mode 100644
index e69de29bb..000000000
--- a/nova/endpoint/__init__.py
+++ /dev/null
diff --git a/nova/endpoint/notes.txt b/nova/endpoint/notes.txt
deleted file mode 100644
index 3e48f1749..000000000
--- a/nova/endpoint/notes.txt
+++ /dev/null
@@ -1,62 +0,0 @@
-bin/nova-api:
- somehow listens for 'cloud_topic' rpc messages and ties them to
- the cloud controller (maybe so internal calls can hit the API
- via Queuing instead of via HTTP?)
- hands CloudController and AdminController to APIServerApplication
- and hands that to Tornado.
-
-
-api.py:
-
-APIServerApplication(tornado.web.Application)
- maps routes to APIRequestHandler, CloudPipRequestHandler, MetadataRequestHandler,
- RootRequestHandler(just lists versions)
- (and to controllers which are passed to __init__)
- magical twisted mapping to it
-
-APIRequestHandler
- execute:
- authenticates request
- picks controller from APIServerApplication's list based on name that was at the
- start of the URL (e.g. /services/Cloud has /services mapped here via
- APIServerApplication then Cloud is controller_name)
- picks action from incoming request arguments
- dict = APIRequest(controller, action).send(Context(user, project))
- _write_callback(dict)
- self.finish()
-
-APIRequest
- send(context, **kwargs):
- dict = controller.action(context, **kwargs)
- return _render_response(dict) # turns into XML
-
-
-CloudController and AdminController:
- actions return dict (or True which is converted into dict(return=True))
- actions have @rbac.allow('list', 'of', 'roles', 'or', '"all"')
- actions can have @defer.inlineCallbacks which is used for yield statements
- can use rpc.cast and then defer a returnValue
-
-
-==== STRATEGY TO CONVERT TO EVENTLET+WSGI ====
-
-* Controllers:
-x move the @rbac.allow data into an auth WSGI that is right above the call
-x to the controller
-x verify @defer.inlineCallbacks is just to allow the yield statements, then
-x remove the yield statements (untangle from twisted)
-
-* nova-api:
- verify that cloud_topic is going away which I seem to remember, so we can ignore rpc
-
-* apiserverapplication:
-x replace with a Router to a wsgi.Controller
-x apirequesthandler stuff is just an entry in api.APIRouter
-
-* apirequesthandler
-x wsgi.Controller pointed to by api.APIRouter
-x - basically it's execute() from old APIRequestHandler
-x change to return data directly instead of _write_callback() and finish()
-
-* apirequest
-x doesn't need to change