diff --git a/neutron/api/v2/router.py b/neutron/api/v2/router.py index 7f9d4f7318e..65308a54278 100644 --- a/neutron/api/v2/router.py +++ b/neutron/api/v2/router.py @@ -67,9 +67,8 @@ class APIRouter(base_wsgi.Router): @classmethod def factory(cls, global_config, **local_config): - if cfg.CONF.web_framework == 'pecan': - return pecan_app.v2_factory(global_config, **local_config) - return cls(**local_config) + # TODO(kevinbenton): dump this whole class + return pecan_app.v2_factory(global_config, **local_config) def __init__(self, **local_config): mapper = routes_mapper.Mapper() diff --git a/neutron/api/versions.py b/neutron/api/versions.py index 5c85f9c6cdf..48f9f16321f 100644 --- a/neutron/api/versions.py +++ b/neutron/api/versions.py @@ -13,7 +13,6 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_config import cfg import oslo_i18n import webob.dec @@ -27,9 +26,8 @@ class Versions(object): @classmethod def factory(cls, global_config, **local_config): - if cfg.CONF.web_framework == 'pecan': - return pecan_app.versions_factory(global_config, **local_config) - return cls(app=None) + # TODO(kevinbenton): get rid of whole class + return pecan_app.versions_factory(global_config, **local_config) @webob.dec.wsgify(RequestClass=wsgi.Request) def __call__(self, req): diff --git a/neutron/conf/common.py b/neutron/conf/common.py index d67cea65b0e..a1a46570148 100644 --- a/neutron/conf/common.py +++ b/neutron/conf/common.py @@ -117,12 +117,6 @@ core_opts = [ cfg.BoolOpt('vlan_transparent', default=False, help=_('If True, then allow plugins that support it to ' 'create VLAN transparent networks.')), - cfg.StrOpt('web_framework', default='pecan', - deprecated_for_removal=True, - choices=('legacy', 'pecan'), - help=_("This will choose the web framework in which to run " - "the Neutron API server. 'pecan' is a new " - "rewrite of the API routing components.")), cfg.IntOpt('global_physnet_mtu', default=constants.DEFAULT_NETWORK_MTU, deprecated_name='segment_mtu', deprecated_group='ml2', help=_('MTU of the underlying physical network. Neutron uses ' diff --git a/neutron/tests/contrib/hooks/pecan b/neutron/tests/contrib/hooks/pecan deleted file mode 100644 index 9988a321c20..00000000000 --- a/neutron/tests/contrib/hooks/pecan +++ /dev/null @@ -1,4 +0,0 @@ -[[post-config|/etc/neutron/neutron.conf]] - -[DEFAULT] -web_framework=pecan diff --git a/neutron/tests/functional/pecan_wsgi/test_functional.py b/neutron/tests/functional/pecan_wsgi/test_functional.py index 67310498328..4c50ef3322f 100644 --- a/neutron/tests/functional/pecan_wsgi/test_functional.py +++ b/neutron/tests/functional/pecan_wsgi/test_functional.py @@ -85,7 +85,6 @@ class PecanFunctionalTest(testlib_api.SqlTestCase): self.app = create_test_app() def set_config_overrides(self): - cfg.CONF.set_override('web_framework', 'pecan') cfg.CONF.set_override('auth_strategy', 'noauth') def do_request(self, url, tenant_id=None, admin=False, diff --git a/neutron/tests/unit/api/test_versions.py b/neutron/tests/unit/api/test_versions.py index edccbfceac9..5929d385bb8 100644 --- a/neutron/tests/unit/api/test_versions.py +++ b/neutron/tests/unit/api/test_versions.py @@ -11,7 +11,6 @@ # under the License. import mock -from oslo_config import cfg from neutron.api import versions from neutron.tests import base @@ -21,14 +20,7 @@ from neutron.tests import base @mock.patch('neutron.pecan_wsgi.app.versions_factory') class TestVersions(base.BaseTestCase): - def test_legacy_factory(self, pecan_mock, legacy_mock): - cfg.CONF.set_override('web_framework', 'legacy') - versions.Versions.factory({}) - pecan_mock.assert_not_called() - legacy_mock.assert_called_once_with(app=None) - def test_pecan_factory(self, pecan_mock, legacy_mock): - cfg.CONF.set_override('web_framework', 'pecan') versions.Versions.factory({}) pecan_mock.assert_called_once_with({}) legacy_mock.assert_not_called() diff --git a/neutron/tests/unit/api/v2/test_router.py b/neutron/tests/unit/api/v2/test_router.py index 33cecc3ae05..8fc2c31437e 100644 --- a/neutron/tests/unit/api/v2/test_router.py +++ b/neutron/tests/unit/api/v2/test_router.py @@ -11,7 +11,6 @@ # under the License. import mock -from oslo_config import cfg from neutron.api.v2 import router from neutron.tests import base @@ -21,14 +20,7 @@ from neutron.tests import base @mock.patch('neutron.pecan_wsgi.app.v2_factory') class TestRouter(base.BaseTestCase): - def test_legacy_factory(self, pecan_mock, legacy_mock): - cfg.CONF.set_override('web_framework', 'legacy') - router.APIRouter.factory({}) - pecan_mock.assert_not_called() - legacy_mock.assert_called_once_with() - def test_pecan_factory(self, pecan_mock, legacy_mock): - cfg.CONF.set_override('web_framework', 'pecan') router.APIRouter.factory({}) pecan_mock.assert_called_once_with({}) legacy_mock.assert_not_called() diff --git a/releasenotes/notes/web_framework_removed-6e4c5c7ca506523a.yaml b/releasenotes/notes/web_framework_removed-6e4c5c7ca506523a.yaml new file mode 100644 index 00000000000..43d0188e320 --- /dev/null +++ b/releasenotes/notes/web_framework_removed-6e4c5c7ca506523a.yaml @@ -0,0 +1,6 @@ +--- +upgrade: + - | + The web_framework option has been removed. This should have no impact on + operators/users since it was just an option used for development of the + new web framework.