]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Rename 'newapi' to 'pecan_wsgi'
authorKevin Benton <blak111@gmail.com>
Mon, 31 Aug 2015 17:22:50 +0000 (10:22 -0700)
committerKevin Benton <kevinbenton@buttewifi.com>
Wed, 2 Sep 2015 15:53:34 +0000 (15:53 +0000)
'newapi' was too generic and not really descriptive of the conversion
to pecan. Since there isn't any ambiguity, we will just keep all of
the pecan components in a directory called 'pecan_wsgi'.

Change-Id: I61f1cfcad4ff00582e0a481400642dd656d5245e

19 files changed:
neutron/cmd/eventlet/api.py
neutron/pecan_wsgi/__init__.py [moved from neutron/newapi/__init__.py with 100% similarity]
neutron/pecan_wsgi/app.py [moved from neutron/newapi/app.py with 92% similarity]
neutron/pecan_wsgi/controllers/__init__.py [moved from neutron/newapi/controllers/__init__.py with 100% similarity]
neutron/pecan_wsgi/controllers/root.py [moved from neutron/newapi/controllers/root.py with 100% similarity]
neutron/pecan_wsgi/hooks/__init__.py [moved from neutron/newapi/hooks/__init__.py with 71% similarity]
neutron/pecan_wsgi/hooks/attribute_population.py [moved from neutron/newapi/hooks/attribute_population.py with 100% similarity]
neutron/pecan_wsgi/hooks/context.py [moved from neutron/newapi/hooks/context.py with 100% similarity]
neutron/pecan_wsgi/hooks/notifier.py [moved from neutron/newapi/hooks/notifier.py with 100% similarity]
neutron/pecan_wsgi/hooks/ownership_validation.py [moved from neutron/newapi/hooks/ownership_validation.py with 100% similarity]
neutron/pecan_wsgi/hooks/policy_enforcement.py [moved from neutron/newapi/hooks/policy_enforcement.py with 98% similarity]
neutron/pecan_wsgi/hooks/quota_enforcement.py [moved from neutron/newapi/hooks/quota_enforcement.py with 96% similarity]
neutron/pecan_wsgi/hooks/resource_identifier.py [moved from neutron/newapi/hooks/resource_identifier.py with 100% similarity]
neutron/pecan_wsgi/hooks/translation.py [moved from neutron/newapi/hooks/translation.py with 100% similarity]
neutron/pecan_wsgi/startup.py [moved from neutron/newapi/startup.py with 100% similarity]
neutron/server/wsgi_pecan.py
neutron/tests/functional/pecan_wsgi/__init__.py [moved from neutron/tests/functional/newapi/__init__.py with 100% similarity]
neutron/tests/functional/pecan_wsgi/config.py [moved from neutron/tests/functional/newapi/config.py with 88% similarity]
neutron/tests/functional/pecan_wsgi/test_functional.py [moved from neutron/tests/functional/newapi/test_functional.py with 95% similarity]

index bdedd26903a2fab288bb334a23cd09883506c44e..00a055041f16387d4cbf57a8e5c776364e3bf12f 100644 (file)
@@ -26,7 +26,7 @@ from oslo_log import log as logging
 from six.moves import socketserver
 
 from neutron.common import config
-from neutron.newapi import app
+from neutron.pecan_wsgi import app
 from neutron.i18n import _LI, _LW
 
 
similarity index 92%
rename from neutron/newapi/app.py
rename to neutron/pecan_wsgi/app.py
index 7471c9770c9643c0e94880cca73d9c0087a71221..a369c834a723cfed2a75bd27d5aa185e3f35d074 100644 (file)
@@ -19,8 +19,8 @@ from oslo_middleware import request_id
 import pecan
 
 from neutron.common import exceptions as n_exc
-from neutron.newapi import hooks
-from neutron.newapi import startup
+from neutron.pecan_wsgi import hooks
+from neutron.pecan_wsgi import startup
 
 CONF = cfg.CONF
 CONF.import_opt('bind_host', 'neutron.common.config')
@@ -34,8 +34,8 @@ def setup_app(*args, **kwargs):
             'host': CONF.bind_host
         },
         'app': {
-            'root': 'neutron.newapi.controllers.root.RootController',
-            'modules': ['neutron.newapi'],
+            'root': 'neutron.pecan_wsgi.controllers.root.RootController',
+            'modules': ['neutron.pecan_wsgi'],
         }
         #TODO(kevinbenton): error templates
     }
similarity index 71%
rename from neutron/newapi/hooks/__init__.py
rename to neutron/pecan_wsgi/hooks/__init__.py
index ef5484249b82d340ce9c5719d3ac9b6583f1c675..cfe844c6e39ab487266affd029ff551da1585d0b 100644 (file)
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-from neutron.newapi.hooks import attribute_population
-from neutron.newapi.hooks import context
-from neutron.newapi.hooks import notifier
-from neutron.newapi.hooks import ownership_validation
-from neutron.newapi.hooks import policy_enforcement
-from neutron.newapi.hooks import quota_enforcement
-from neutron.newapi.hooks import resource_identifier
-from neutron.newapi.hooks import translation
+from neutron.pecan_wsgi.hooks import attribute_population
+from neutron.pecan_wsgi.hooks import context
+from neutron.pecan_wsgi.hooks import notifier
+from neutron.pecan_wsgi.hooks import ownership_validation
+from neutron.pecan_wsgi.hooks import policy_enforcement
+from neutron.pecan_wsgi.hooks import quota_enforcement
+from neutron.pecan_wsgi.hooks import resource_identifier
+from neutron.pecan_wsgi.hooks import translation
 
 
 ExceptionTranslationHook = translation.ExceptionTranslationHook
similarity index 98%
rename from neutron/newapi/hooks/policy_enforcement.py
rename to neutron/pecan_wsgi/hooks/policy_enforcement.py
index 4b0696c3339acb752ed7d57e2028f7aba2059e2f..ac151c43560d1822b737b521bd3bb9b076259bed 100644 (file)
@@ -23,7 +23,7 @@ from pecan import hooks
 import webob
 
 from neutron.common import constants as const
-from neutron.newapi.hooks import attribute_population
+from neutron.pecan_wsgi.hooks import attribute_population
 from neutron import policy
 
 
similarity index 96%
rename from neutron/newapi/hooks/quota_enforcement.py
rename to neutron/pecan_wsgi/hooks/quota_enforcement.py
index 43e3c5f9ca2b273b0eec247edaf20fb114818803..1a9240329f64a41f29451438ac9ffe9512a2874b 100644 (file)
@@ -14,7 +14,7 @@
 #    under the License.
 
 from neutron.common import exceptions
-from neutron.newapi.hooks import attribute_population
+from neutron.pecan_wsgi.hooks import attribute_population
 from neutron import quota
 
 from oslo_log import log as logging
index a9d62b69628c66ce7bc25dd894262c55a8fb6257..91677cc2951dae8607207387100a0ba622a337f8 100755 (executable)
@@ -20,7 +20,7 @@ from six.moves import socketserver
 
 from neutron.common import rpc as n_rpc
 from neutron.i18n import _LI, _LW
-from neutron.newapi import app as pecan_app
+from neutron.pecan_wsgi import app as pecan_app
 from neutron import server
 
 LOG = log.getLogger(__name__)
similarity index 88%
rename from neutron/tests/functional/newapi/config.py
rename to neutron/tests/functional/pecan_wsgi/config.py
index 056df2aded13f1fdd9552c7ff6a97429fefa7a26..988961b091c9abd01904c63adda3d35b360b1f8f 100644 (file)
@@ -16,8 +16,8 @@
 # use main app settings except for the port number so testing doesn't need to
 # listen on the main neutron port
 app = {
-    'root': 'neutron.newapi.controllers.root.RootController',
-    'modules': ['neutron.newapi'],
+    'root': 'neutron.pecan_wsgi.controllers.root.RootController',
+    'modules': ['neutron.pecan_wsgi'],
     'errors': {
         400: '/error',
         '__force_dict__': True
similarity index 95%
rename from neutron/tests/functional/newapi/test_functional.py
rename to neutron/tests/functional/pecan_wsgi/test_functional.py
index a7cf4fa92a7f49a1e7fdecef939a9387d7b085b2..ee3d4ed4fe1a5a4f53d2b811ece29918ec607a83 100644 (file)
@@ -28,7 +28,7 @@ from neutron.api.v2 import attributes
 from neutron.common import exceptions as n_exc
 from neutron import context
 from neutron import manager
-from neutron.newapi.controllers import root as controllers
+from neutron.pecan_wsgi.controllers import root as controllers
 from neutron.tests.unit import testlib_api
 
 
@@ -154,15 +154,17 @@ class TestExceptionTranslationHook(PecanFunctionalTest):
         # this endpoint raises a Neutron notfound exception. make sure it gets
         # translated into a 404 error
         with mock.patch(
-                'neutron.newapi.controllers.root.CollectionsController.get',
-                side_effect=n_exc.NotFound()):
+            'neutron.pecan_wsgi.controllers.root.CollectionsController.get',
+            side_effect=n_exc.NotFound()
+        ):
             response = self.app.get('/v2.0/ports.json', expect_errors=True)
             self.assertEqual(response.status_int, 404)
 
     def test_unexpected_exception(self):
         with mock.patch(
-                'neutron.newapi.controllers.root.CollectionsController.get',
-                side_effect=ValueError('secretpassword')):
+            'neutron.pecan_wsgi.controllers.root.CollectionsController.get',
+            side_effect=ValueError('secretpassword')
+        ):
             response = self.app.get('/v2.0/ports.json', expect_errors=True)
             self.assertNotIn(response.body, 'secretpassword')
             self.assertEqual(response.status_int, 500)
@@ -184,7 +186,7 @@ class TestRequestPopulatingHooks(PecanFunctionalTest):
                 'plugin': request.plugin
             }
         mock.patch(
-            'neutron.newapi.controllers.root.CollectionsController.get',
+            'neutron.pecan_wsgi.controllers.root.CollectionsController.get',
             side_effect=capture_request_details
         ).start()