Merge "remove deprecated items from contrib"

This commit is contained in:
Jenkins 2016-10-07 21:13:04 +00:00 committed by Gerrit Code Review
commit b96b217751
26 changed files with 0 additions and 448 deletions

View File

@ -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

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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)

View File

@ -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):

View File

@ -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')

View File

@ -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
@ -3502,16 +3500,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."""

View File

@ -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'

View File

@ -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'

View File

@ -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