summaryrefslogtreecommitdiffstats
path: root/nova
diff options
context:
space:
mode:
authorMichael Gundlach <michael.gundlach@rackspace.com>2010-08-17 13:23:20 -0400
committerMichael Gundlach <michael.gundlach@rackspace.com>2010-08-17 13:23:20 -0400
commite8be36d7a7be2ebbf5493766ce909d7913bf61e0 (patch)
treed922e9052fc40c80f166d82b04c8283c91df3324 /nova
parentf92851ba8ffcb530f6f3c4ea354dd89d29146f6c (diff)
downloadnova-e8be36d7a7be2ebbf5493766ce909d7913bf61e0.tar.gz
nova-e8be36d7a7be2ebbf5493766ce909d7913bf61e0.tar.xz
nova-e8be36d7a7be2ebbf5493766ce909d7913bf61e0.zip
Move eventlet-using class out of endpoint/__init__.py into its own submodule, so that twisted-related code using endpoint.[other stuff] wouldn't run eventlet and make unit tests throw crazy errors about eventlet 0.9.10 not playing nicely with twisted.
Diffstat (limited to 'nova')
-rw-r--r--nova/endpoint/__init__.py51
-rw-r--r--nova/endpoint/newapi.py51
2 files changed, 51 insertions, 51 deletions
diff --git a/nova/endpoint/__init__.py b/nova/endpoint/__init__.py
index 9aae933af..e69de29bb 100644
--- a/nova/endpoint/__init__.py
+++ b/nova/endpoint/__init__.py
@@ -1,51 +0,0 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
-# Copyright 2010 United States Government as represented by the
-# Administrator of the National Aeronautics and Space Administration.
-# All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-
-"""
-:mod:`nova.endpoint` -- Main NOVA Api endpoints
-=====================================================
-
-.. automodule:: nova.endpoint
- :platform: Unix
- :synopsis: REST APIs for all nova functions
-.. moduleauthor:: Jesse Andrews <jesse@ansolabs.com>
-.. moduleauthor:: Devin Carlen <devin.carlen@gmail.com>
-.. moduleauthor:: Vishvananda Ishaya <vishvananda@yahoo.com>
-.. moduleauthor:: Joshua McKenty <joshua@cognition.ca>
-.. moduleauthor:: Manish Singh <yosh@gimp.org>
-.. moduleauthor:: Andy Smith <andy@anarkystic.com>
-"""
-
-from nova import wsgi
-import routes
-from nova.endpoint import rackspace
-from nova.endpoint import aws
-
-class APIVersionRouter(wsgi.Router):
- """Routes top-level requests to the appropriate API."""
-
- def __init__(self):
- mapper = routes.Mapper()
-
- rsapi = rackspace.API()
- mapper.connect(None, "/v1.0/{path_info:.*}", controller=rsapi)
-
- mapper.connect(None, "/ec2/{path_info:.*}", controller=aws.API())
-
- super(APIVersionRouter, self).__init__(mapper)
-
diff --git a/nova/endpoint/newapi.py b/nova/endpoint/newapi.py
new file mode 100644
index 000000000..9aae933af
--- /dev/null
+++ b/nova/endpoint/newapi.py
@@ -0,0 +1,51 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2010 United States Government as represented by the
+# Administrator of the National Aeronautics and Space Administration.
+# All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+"""
+:mod:`nova.endpoint` -- Main NOVA Api endpoints
+=====================================================
+
+.. automodule:: nova.endpoint
+ :platform: Unix
+ :synopsis: REST APIs for all nova functions
+.. moduleauthor:: Jesse Andrews <jesse@ansolabs.com>
+.. moduleauthor:: Devin Carlen <devin.carlen@gmail.com>
+.. moduleauthor:: Vishvananda Ishaya <vishvananda@yahoo.com>
+.. moduleauthor:: Joshua McKenty <joshua@cognition.ca>
+.. moduleauthor:: Manish Singh <yosh@gimp.org>
+.. moduleauthor:: Andy Smith <andy@anarkystic.com>
+"""
+
+from nova import wsgi
+import routes
+from nova.endpoint import rackspace
+from nova.endpoint import aws
+
+class APIVersionRouter(wsgi.Router):
+ """Routes top-level requests to the appropriate API."""
+
+ def __init__(self):
+ mapper = routes.Mapper()
+
+ rsapi = rackspace.API()
+ mapper.connect(None, "/v1.0/{path_info:.*}", controller=rsapi)
+
+ mapper.connect(None, "/ec2/{path_info:.*}", controller=aws.API())
+
+ super(APIVersionRouter, self).__init__(mapper)
+