diff --git a/etc/quantum.conf b/etc/quantum.conf index 9fd2036554..42347c7638 100644 --- a/etc/quantum.conf +++ b/etc/quantum.conf @@ -29,4 +29,4 @@ paste.filter_factory = quantum.common.extensions:plugin_aware_extension_middlewa paste.app_factory = quantum.api.versions:Versions.factory [app:quantumapiapp] -paste.app_factory = quantum.api:APIRouterV01.factory +paste.app_factory = quantum.api:APIRouterV1.factory diff --git a/quantum/api/__init__.py b/quantum/api/__init__.py index 0ff7ea2349..ea02d26779 100644 --- a/quantum/api/__init__.py +++ b/quantum/api/__init__.py @@ -37,7 +37,7 @@ LOG = logging.getLogger('quantum.api') FLAGS = flags.FLAGS -class APIRouterV01(wsgi.Router): +class APIRouterV1(wsgi.Router): """ Routes requests on the Quantum API to the appropriate controller """ @@ -45,7 +45,7 @@ class APIRouterV01(wsgi.Router): def __init__(self, options=None): mapper = routes.Mapper() self._setup_routes(mapper, options) - super(APIRouterV01, self).__init__(mapper) + super(APIRouterV1, self).__init__(mapper) def _setup_routes(self, mapper, options): # Loads the quantum plugin @@ -64,9 +64,7 @@ class APIRouterV01(wsgi.Router): parent_resource=dict(member_name='network', collection_name=uri_prefix +\ 'networks')) - attachments_ctrl = attachments.Controller(plugin) - mapper.connect("get_resource", uri_prefix + 'networks/{network_id}/' \ 'ports/{id}/attachment{.format}', diff --git a/quantum/common/extensions.py b/quantum/common/extensions.py index 79680b2254..cfe6bc786a 100644 --- a/quantum/common/extensions.py +++ b/quantum/common/extensions.py @@ -338,7 +338,7 @@ def plugin_aware_extension_middleware_factory(global_config, **local_config): def _factory(app): extensions_path = global_config.get('api_extensions_path', '') ext_mgr = PluginAwareExtensionManager(extensions_path, - QuantumManager().get_plugin()) + QuantumManager.get_plugin()) return ExtensionMiddleware(app, global_config, ext_mgr=ext_mgr) return _factory diff --git a/quantum/manager.py b/quantum/manager.py index 727a2c8104..782b71cee7 100644 --- a/quantum/manager.py +++ b/quantum/manager.py @@ -26,7 +26,7 @@ The caller should make sure that QuantumManager is a singleton. import gettext import logging import os -import logging + gettext.install('quantum', unicode=1) from common import utils diff --git a/quantum/plugins/cisco/tests/unit/test_cisco_extension.py b/quantum/plugins/cisco/tests/unit/test_cisco_extension.py index e1f2391bf4..9054fd6c30 100644 --- a/quantum/plugins/cisco/tests/unit/test_cisco_extension.py +++ b/quantum/plugins/cisco/tests/unit/test_cisco_extension.py @@ -87,7 +87,7 @@ class PortprofileExtensionTest(unittest.TestCase): options = {} options['plugin_provider'] = 'quantum.plugins.cisco.l2network_plugin'\ '.L2Network' - self.api = server.APIRouterV01(options) + self.api = server.APIRouterV1(options) self._l2network_plugin = l2network_plugin.L2Network() def test_list_portprofile(self): diff --git a/tests/unit/test_api.py b/tests/unit/test_api.py index a374dffceb..2b865cd69c 100644 --- a/tests/unit/test_api.py +++ b/tests/unit/test_api.py @@ -763,7 +763,7 @@ class APITest(unittest.TestCase): def setUp(self): options = {} options['plugin_provider'] = test_config['plugin_name'] - self.api = server.APIRouterV01(options) + self.api = server.APIRouterV1(options) self.tenant_id = "test_tenant" self.network_name = "test_network" self._net_serializer = \