summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/nova-rsapi5
-rw-r--r--nova/endpoint/__init__.py51
-rw-r--r--nova/endpoint/newapi.py51
3 files changed, 53 insertions, 54 deletions
diff --git a/bin/nova-rsapi b/bin/nova-rsapi
index a35936eff..e2722422e 100755
--- a/bin/nova-rsapi
+++ b/bin/nova-rsapi
@@ -21,15 +21,14 @@
Daemon for the Rackspace API endpoint.
"""
-import nova.endpoint
-
from nova import flags
from nova import utils
from nova import wsgi
+from nova.endpoint import newapi
FLAGS = flags.FLAGS
flags.DEFINE_integer('cc_port', 8773, 'cloud controller port')
if __name__ == '__main__':
utils.default_flagfile()
- wsgi.run_server(nova.endpoint.APIVersionRouter(), FLAGS.cc_port)
+ wsgi.run_server(newapi.APIVersionRouter(), FLAGS.cc_port)
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)
+