From 4a079a4a2290a76f66e6b110ce42ecd6e1601197 Mon Sep 17 00:00:00 2001 From: Steve Martinelli Date: Wed, 21 Sep 2016 22:02:05 -0400 Subject: [PATCH] remove deprecated items from contrib In the Mitaka release several extensions were moved out of contrib and into keystone core, enabling them by default. This patch removes the deprecated portions from that move and updates setup.cfg's entry points accordingly. bp removed-as-of-ocata Change-Id: Ib5edf7b54b877aaa049c67e6e6b5c1a7c0bcbfe2 --- keystone/contrib/admin_crud/__init__.py | 15 --------- keystone/contrib/admin_crud/core.py | 32 ------------------ .../contrib/endpoint_filter/backends/sql.py | 30 ----------------- keystone/contrib/endpoint_filter/routers.py | 33 ------------------- keystone/contrib/federation/__init__.py | 0 .../contrib/federation/backends/__init__.py | 0 keystone/contrib/federation/backends/sql.py | 29 ---------------- keystone/contrib/federation/routers.py | 31 ----------------- keystone/contrib/oauth1/__init__.py | 0 keystone/contrib/oauth1/backends/__init__.py | 0 keystone/contrib/oauth1/backends/sql.py | 30 ----------------- keystone/contrib/oauth1/routers.py | 33 ------------------- keystone/contrib/revoke/__init__.py | 0 keystone/contrib/revoke/backends/__init__.py | 0 keystone/contrib/revoke/backends/sql.py | 28 ---------------- keystone/contrib/revoke/routers.py | 31 ----------------- keystone/contrib/simple_cert/__init__.py | 13 -------- keystone/contrib/simple_cert/routers.py | 33 ------------------- keystone/contrib/user_crud/__init__.py | 15 --------- keystone/contrib/user_crud/core.py | 32 ------------------ ...st_associate_project_endpoint_extension.py | 13 -------- keystone/tests/unit/test_entry_points.py | 7 ---- keystone/tests/unit/test_v3_auth.py | 12 ------- keystone/tests/unit/test_v3_federation.py | 12 ------- keystone/tests/unit/test_v3_oauth1.py | 12 ------- setup.cfg | 7 ---- 26 files changed, 448 deletions(-) delete mode 100644 keystone/contrib/admin_crud/__init__.py delete mode 100644 keystone/contrib/admin_crud/core.py delete mode 100644 keystone/contrib/endpoint_filter/backends/sql.py delete mode 100644 keystone/contrib/endpoint_filter/routers.py delete mode 100644 keystone/contrib/federation/__init__.py delete mode 100644 keystone/contrib/federation/backends/__init__.py delete mode 100644 keystone/contrib/federation/backends/sql.py delete mode 100644 keystone/contrib/federation/routers.py delete mode 100644 keystone/contrib/oauth1/__init__.py delete mode 100644 keystone/contrib/oauth1/backends/__init__.py delete mode 100644 keystone/contrib/oauth1/backends/sql.py delete mode 100644 keystone/contrib/oauth1/routers.py delete mode 100644 keystone/contrib/revoke/__init__.py delete mode 100644 keystone/contrib/revoke/backends/__init__.py delete mode 100644 keystone/contrib/revoke/backends/sql.py delete mode 100644 keystone/contrib/revoke/routers.py delete mode 100644 keystone/contrib/simple_cert/__init__.py delete mode 100644 keystone/contrib/simple_cert/routers.py delete mode 100644 keystone/contrib/user_crud/__init__.py delete mode 100644 keystone/contrib/user_crud/core.py diff --git a/keystone/contrib/admin_crud/__init__.py b/keystone/contrib/admin_crud/__init__.py deleted file mode 100644 index d60209201b..0000000000 --- a/keystone/contrib/admin_crud/__init__.py +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright 2012 OpenStack Foundation -# -# 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. - -from keystone.contrib.admin_crud.core import * # noqa diff --git a/keystone/contrib/admin_crud/core.py b/keystone/contrib/admin_crud/core.py deleted file mode 100644 index 739cc0ff10..0000000000 --- a/keystone/contrib/admin_crud/core.py +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright 2012 OpenStack Foundation -# -# 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. - -from oslo_log import log -from oslo_log import versionutils - -from keystone.common import wsgi -from keystone.i18n import _ - - -LOG = log.getLogger(__name__) - - -class CrudExtension(wsgi.Middleware): - def __init__(self, application): - super(CrudExtension, self).__init__(application) - msg = _("Remove admin_crud_extension from the paste pipeline, the " - "admin_crud extension is now always available. Update" - "the [pipeline:admin_api] section in keystone-paste.ini " - "accordingly, as it will be removed in the O release.") - versionutils.report_deprecated_feature(LOG, msg) diff --git a/keystone/contrib/endpoint_filter/backends/sql.py b/keystone/contrib/endpoint_filter/backends/sql.py deleted file mode 100644 index 484934bb07..0000000000 --- a/keystone/contrib/endpoint_filter/backends/sql.py +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright 2013 OpenStack Foundation -# -# 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. - -from oslo_log import versionutils - -from keystone.catalog.backends import sql - -_OLD = 'keystone.contrib.endpoint_filter.backends.sql.EndpointFilter' -_NEW = 'sql' - - -class EndpointFilter(sql.Catalog): - @versionutils.deprecated( - as_of=versionutils.deprecated.MITAKA, - in_favor_of=_NEW, - what=_OLD, - remove_in=2) - def __init__(self, *args, **kwargs): - super(EndpointFilter, self).__init__(*args, **kwargs) diff --git a/keystone/contrib/endpoint_filter/routers.py b/keystone/contrib/endpoint_filter/routers.py deleted file mode 100644 index f75110f9f4..0000000000 --- a/keystone/contrib/endpoint_filter/routers.py +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright 2013 OpenStack Foundation -# -# 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. - -from oslo_log import log -from oslo_log import versionutils - -from keystone.common import wsgi -from keystone.i18n import _ - - -LOG = log.getLogger(__name__) - - -class EndpointFilterExtension(wsgi.Middleware): - - def __init__(self, *args, **kwargs): - super(EndpointFilterExtension, self).__init__(*args, **kwargs) - msg = _("Remove endpoint_filter_extension from the paste pipeline, " - "the endpoint filter extension is now always available. " - "Update the [pipeline:api_v3] section in keystone-paste.ini " - "accordingly as it will be removed in the O release.") - versionutils.report_deprecated_feature(LOG, msg) diff --git a/keystone/contrib/federation/__init__.py b/keystone/contrib/federation/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/keystone/contrib/federation/backends/__init__.py b/keystone/contrib/federation/backends/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/keystone/contrib/federation/backends/sql.py b/keystone/contrib/federation/backends/sql.py deleted file mode 100644 index 3c24d9c08d..0000000000 --- a/keystone/contrib/federation/backends/sql.py +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright 2014 OpenStack Foundation -# -# 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. - -from oslo_log import versionutils - -from keystone.federation.backends import sql - -_OLD = "keystone.contrib.federation.backends.sql.Federation" -_NEW = "sql" - - -class Federation(sql.Federation): - - @versionutils.deprecated(versionutils.deprecated.MITAKA, - in_favor_of=_NEW, - what=_OLD) - def __init__(self, *args, **kwargs): - super(Federation, self).__init__(*args, **kwargs) diff --git a/keystone/contrib/federation/routers.py b/keystone/contrib/federation/routers.py deleted file mode 100644 index d5857ca61b..0000000000 --- a/keystone/contrib/federation/routers.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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. - -from oslo_log import log -from oslo_log import versionutils - -from keystone.common import wsgi -from keystone.i18n import _ - - -LOG = log.getLogger(__name__) - - -class FederationExtension(wsgi.Middleware): - - def __init__(self, *args, **kwargs): - super(FederationExtension, self).__init__(*args, **kwargs) - msg = _("Remove federation_extension from the paste pipeline, the " - "federation extension is now always available. Update the " - "[pipeline:api_v3] section in keystone-paste.ini accordingly, " - "as it will be removed in the O release.") - versionutils.report_deprecated_feature(LOG, msg) diff --git a/keystone/contrib/oauth1/__init__.py b/keystone/contrib/oauth1/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/keystone/contrib/oauth1/backends/__init__.py b/keystone/contrib/oauth1/backends/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/keystone/contrib/oauth1/backends/sql.py b/keystone/contrib/oauth1/backends/sql.py deleted file mode 100644 index 31b6ce3b83..0000000000 --- a/keystone/contrib/oauth1/backends/sql.py +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright 2013 OpenStack Foundation -# -# 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. - -from oslo_log import versionutils - -from keystone.oauth1.backends import sql - - -_OLD = "keystone.contrib.oauth1.backends.sql.OAuth1" -_NEW = "sql" - - -class OAuth1(sql.OAuth1): - - @versionutils.deprecated(versionutils.deprecated.MITAKA, - in_favor_of=_NEW, - what=_OLD) - def __init__(self, *args, **kwargs): - super(OAuth1, self).__init__(*args, **kwargs) diff --git a/keystone/contrib/oauth1/routers.py b/keystone/contrib/oauth1/routers.py deleted file mode 100644 index 42a26c1099..0000000000 --- a/keystone/contrib/oauth1/routers.py +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright 2013 OpenStack Foundation -# -# 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. - -from oslo_log import log -from oslo_log import versionutils - -from keystone.common import wsgi -from keystone.i18n import _ - - -LOG = log.getLogger(__name__) - - -class OAuth1Extension(wsgi.Middleware): - - def __init__(self, *args, **kwargs): - super(OAuth1Extension, self).__init__(*args, **kwargs) - msg = _("Remove oauth1_extension from the paste pipeline, the " - "oauth1 extension is now always available. Update the " - "[pipeline:api_v3] section in keystone-paste.ini accordingly, " - "as it will be removed in the O release.") - versionutils.report_deprecated_feature(LOG, msg) diff --git a/keystone/contrib/revoke/__init__.py b/keystone/contrib/revoke/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/keystone/contrib/revoke/backends/__init__.py b/keystone/contrib/revoke/backends/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/keystone/contrib/revoke/backends/sql.py b/keystone/contrib/revoke/backends/sql.py deleted file mode 100644 index 0bf493ae76..0000000000 --- a/keystone/contrib/revoke/backends/sql.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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. - -from oslo_log import versionutils - -from keystone.revoke.backends import sql - - -_OLD = "keystone.contrib.revoke.backends.sql.Revoke" -_NEW = "sql" - - -class Revoke(sql.Revoke): - - @versionutils.deprecated(versionutils.deprecated.MITAKA, - in_favor_of=_NEW, - what=_OLD) - def __init__(self, *args, **kwargs): - super(Revoke, self).__init__(*args, **kwargs) diff --git a/keystone/contrib/revoke/routers.py b/keystone/contrib/revoke/routers.py deleted file mode 100644 index a44c619435..0000000000 --- a/keystone/contrib/revoke/routers.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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. - -from oslo_log import log -from oslo_log import versionutils - -from keystone.common import wsgi -from keystone.i18n import _ - - -LOG = log.getLogger(__name__) - - -class RevokeExtension(wsgi.Middleware): - - def __init__(self, *args, **kwargs): - super(RevokeExtension, self).__init__(*args, **kwargs) - msg = _("Remove revoke_extension from the paste pipeline, the " - "revoke extension is now always available. Update the " - "[pipeline:api_v3] section in keystone-paste.ini accordingly, " - "as it will be removed in the O release.") - versionutils.report_deprecated_feature(LOG, msg) diff --git a/keystone/contrib/simple_cert/__init__.py b/keystone/contrib/simple_cert/__init__.py deleted file mode 100644 index 2e5f992825..0000000000 --- a/keystone/contrib/simple_cert/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. - -from keystone.contrib.simple_cert.routers import SimpleCertExtension # noqa diff --git a/keystone/contrib/simple_cert/routers.py b/keystone/contrib/simple_cert/routers.py deleted file mode 100644 index b1d509e777..0000000000 --- a/keystone/contrib/simple_cert/routers.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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. - -from oslo_log import log -from oslo_log import versionutils - -from keystone.common import wsgi -from keystone.i18n import _ - - -LOG = log.getLogger(__name__) - - -class SimpleCertExtension(wsgi.Middleware): - - def __init__(self, application): - super(SimpleCertExtension, self).__init__(application) - msg = _("Remove simple_cert from the paste pipeline, the " - "PKI and PKIz token providers are now deprecated and " - "simple_cert was only used insupport of these token " - "providers. Update the [pipeline:api_v3] section in " - "keystone-paste.ini accordingly, as it will be removed in the " - "O release.") - versionutils.report_deprecated_feature(LOG, msg) diff --git a/keystone/contrib/user_crud/__init__.py b/keystone/contrib/user_crud/__init__.py deleted file mode 100644 index 271ceee6d9..0000000000 --- a/keystone/contrib/user_crud/__init__.py +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright 2012 Red Hat, Inc -# -# 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. - -from keystone.contrib.user_crud.core import * # noqa diff --git a/keystone/contrib/user_crud/core.py b/keystone/contrib/user_crud/core.py deleted file mode 100644 index b37157eaaa..0000000000 --- a/keystone/contrib/user_crud/core.py +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright 2012 Red Hat, Inc -# -# 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. - -from oslo_log import log -from oslo_log import versionutils - -from keystone.common import wsgi -from keystone.i18n import _ - - -LOG = log.getLogger(__name__) - - -class CrudExtension(wsgi.Middleware): - def __init__(self, application): - super(CrudExtension, self).__init__(application) - msg = _("Remove user_crud_extension from the paste pipeline, the " - "user_crud extension is now always available. Update" - "the [pipeline:public_api] section in keystone-paste.ini " - "accordingly, as it will be removed in the O release.") - versionutils.report_deprecated_feature(LOG, msg) diff --git a/keystone/tests/unit/test_associate_project_endpoint_extension.py b/keystone/tests/unit/test_associate_project_endpoint_extension.py index 365190ed8c..13b71d26f4 100644 --- a/keystone/tests/unit/test_associate_project_endpoint_extension.py +++ b/keystone/tests/unit/test_associate_project_endpoint_extension.py @@ -15,12 +15,9 @@ import copy import uuid -import mock -from oslo_log import versionutils from six.moves import http_client from testtools import matchers -from keystone.contrib.endpoint_filter import routers from keystone.tests import unit from keystone.tests.unit import test_v3 @@ -41,16 +38,6 @@ class EndpointFilterTestCase(test_v3.RestfulTestCase): 'endpoint_id': self.endpoint_id}) -class EndpointFilterDeprecateTestCase(test_v3.RestfulTestCase): - - @mock.patch.object(versionutils, 'report_deprecated_feature') - def test_exception_happens(self, mock_deprecator): - routers.EndpointFilterExtension(mock.ANY) - mock_deprecator.assert_called_once_with(mock.ANY, mock.ANY) - args, _kwargs = mock_deprecator.call_args - self.assertIn("Remove endpoint_filter_extension from", args[1]) - - class EndpointFilterCRUDTestCase(EndpointFilterTestCase): def test_create_endpoint_project_association(self): diff --git a/keystone/tests/unit/test_entry_points.py b/keystone/tests/unit/test_entry_points.py index e973e942b0..02870e22eb 100644 --- a/keystone/tests/unit/test_entry_points.py +++ b/keystone/tests/unit/test_entry_points.py @@ -22,23 +22,16 @@ class TestPasteDeploymentEntryPoints(test.TestCase): expected_names = [ 'admin_token_auth', 'build_auth_context', - 'crud_extension', 'cors', 'debug', - 'endpoint_filter_extension', 'ec2_extension', 'ec2_extension_v3', - 'federation_extension', 'json_body', - 'oauth1_extension', 'request_id', - 'revoke_extension', 's3_extension', - 'simple_cert_extension', 'sizelimit', 'token_auth', 'url_normalize', - 'user_crud_extension', ] em = stevedore.ExtensionManager('paste.filter_factory') diff --git a/keystone/tests/unit/test_v3_auth.py b/keystone/tests/unit/test_v3_auth.py index 7cd31b1bc3..03839ecea8 100644 --- a/keystone/tests/unit/test_v3_auth.py +++ b/keystone/tests/unit/test_v3_auth.py @@ -22,7 +22,6 @@ import uuid import freezegun from keystoneclient.common import cms import mock -from oslo_log import versionutils from oslo_serialization import jsonutils as json from oslo_utils import fixture from oslo_utils import timeutils @@ -36,7 +35,6 @@ from keystone import auth from keystone.auth.plugins import totp from keystone.common import utils import keystone.conf -from keystone.contrib.revoke import routers from keystone.credential.providers import fernet as credential_fernet from keystone import exception from keystone.policy.backends import rules @@ -3398,16 +3396,6 @@ class TestTokenRevokeByAssignment(TestTokenRevokeById): self.assertIn(project_token, revoked_tokens) -class RevokeContribTests(test_v3.RestfulTestCase): - - @mock.patch.object(versionutils, 'report_deprecated_feature') - def test_exception_happens(self, mock_deprecator): - routers.RevokeExtension(mock.ANY) - mock_deprecator.assert_called_once_with(mock.ANY, mock.ANY) - args, _kwargs = mock_deprecator.call_args - self.assertIn("Remove revoke_extension from", args[1]) - - class TestTokenRevokeApi(TestTokenRevokeById): """Test token revocation on the v3 Identity API.""" diff --git a/keystone/tests/unit/test_v3_federation.py b/keystone/tests/unit/test_v3_federation.py index f3e9baa2b5..ee0792b78d 100644 --- a/keystone/tests/unit/test_v3_federation.py +++ b/keystone/tests/unit/test_v3_federation.py @@ -20,7 +20,6 @@ import uuid import fixtures from lxml import etree import mock -from oslo_log import versionutils from oslo_serialization import jsonutils from oslo_utils import importutils import saml2 @@ -34,7 +33,6 @@ if not xmldsig: from keystone.auth import controllers as auth_controllers import keystone.conf -from keystone.contrib.federation import routers from keystone import exception from keystone.federation import controllers as federation_controllers from keystone.federation import idp as keystone_idp @@ -58,16 +56,6 @@ def dummy_validator(*args, **kwargs): pass -class FederationTests(test_v3.RestfulTestCase): - - @mock.patch.object(versionutils, 'report_deprecated_feature') - def test_exception_happens(self, mock_deprecator): - routers.FederationExtension(mock.ANY) - mock_deprecator.assert_called_once_with(mock.ANY, mock.ANY) - args, _kwargs = mock_deprecator.call_args - self.assertIn("Remove federation_extension from", args[1]) - - class FederatedSetupMixin(object): ACTION = 'authenticate' diff --git a/keystone/tests/unit/test_v3_oauth1.py b/keystone/tests/unit/test_v3_oauth1.py index 95e14eccc3..186bdb2a69 100644 --- a/keystone/tests/unit/test_v3_oauth1.py +++ b/keystone/tests/unit/test_v3_oauth1.py @@ -17,14 +17,12 @@ import random import uuid import mock -from oslo_log import versionutils from oslo_serialization import jsonutils from pycadf import cadftaxonomy from six.moves import http_client from six.moves import urllib import keystone.conf -from keystone.contrib.oauth1 import routers from keystone import exception from keystone import oauth1 from keystone.oauth1.backends import base @@ -44,16 +42,6 @@ def _urllib_parse_qs_text_keys(content): return {key.decode('utf-8'): value for key, value in results.items()} -class OAuth1ContribTests(test_v3.RestfulTestCase): - - @mock.patch.object(versionutils, 'report_deprecated_feature') - def test_exception_happens(self, mock_deprecator): - routers.OAuth1Extension(mock.ANY) - mock_deprecator.assert_called_once_with(mock.ANY, mock.ANY) - args, _kwargs = mock_deprecator.call_args - self.assertIn("Remove oauth1_extension from", args[1]) - - class OAuth1Tests(test_v3.RestfulTestCase): CONSUMER_URL = '/OS-OAUTH1/consumers' diff --git a/setup.cfg b/setup.cfg index 2d060f2186..d4613d3740 100644 --- a/setup.cfg +++ b/setup.cfg @@ -193,22 +193,15 @@ oslo.config.opts.defaults = paste.filter_factory = admin_token_auth = keystone.middleware:AdminTokenAuthMiddleware.factory build_auth_context = keystone.middleware:AuthContextMiddleware.factory - crud_extension = keystone.contrib.admin_crud:CrudExtension.factory debug = oslo_middleware:Debug.factory - endpoint_filter_extension = keystone.contrib.endpoint_filter.routers:EndpointFilterExtension.factory ec2_extension = keystone.contrib.ec2:Ec2Extension.factory ec2_extension_v3 = keystone.contrib.ec2:Ec2ExtensionV3.factory - federation_extension = keystone.contrib.federation.routers:FederationExtension.factory json_body = keystone.middleware:JsonBodyMiddleware.factory - oauth1_extension = keystone.contrib.oauth1.routers:OAuth1Extension.factory request_id = oslo_middleware:RequestId.factory - revoke_extension = keystone.contrib.revoke.routers:RevokeExtension.factory s3_extension = keystone.contrib.s3:S3Extension.factory - simple_cert_extension = keystone.contrib.simple_cert:SimpleCertExtension.factory sizelimit = oslo_middleware.sizelimit:RequestBodySizeLimiter.factory token_auth = keystone.middleware:TokenAuthMiddleware.factory url_normalize = keystone.middleware:NormalizingFilter.factory - user_crud_extension = keystone.contrib.user_crud:CrudExtension.factory paste.app_factory = admin_service = keystone.version.service:admin_app_factory