From 00bfbb938c6416b55e87dec99d8343b1fde61a2f Mon Sep 17 00:00:00 2001 From: Steve Martinelli Date: Fri, 18 Mar 2016 17:20:03 -0400 Subject: [PATCH] remove endpoint_policy from contrib this has been deprecated for 2 releases and can now be removed. implements bp: removed-as-of-newton Change-Id: I9a7b225d15953cec3f597a04c45020aff0bd60a8 --- keystone/contrib/endpoint_policy/__init__.py | 0 .../endpoint_policy/backends/__init__.py | 0 .../contrib/endpoint_policy/backends/sql.py | 28 ------------------- .../endpoint_policy/migrate_repo/__init__.py | 0 .../endpoint_policy/migrate_repo/migrate.cfg | 25 ----------------- .../versions/001_add_endpoint_policy_table.py | 19 ------------- .../migrate_repo/versions/__init__.py | 0 keystone/contrib/endpoint_policy/routers.py | 28 ------------------- .../tests/unit/test_sql_migrate_extensions.py | 15 ---------- ...removed-as-of-newton-721c06b5dcb1b34a.yaml | 7 +++++ 10 files changed, 7 insertions(+), 115 deletions(-) delete mode 100644 keystone/contrib/endpoint_policy/__init__.py delete mode 100644 keystone/contrib/endpoint_policy/backends/__init__.py delete mode 100644 keystone/contrib/endpoint_policy/backends/sql.py delete mode 100644 keystone/contrib/endpoint_policy/migrate_repo/__init__.py delete mode 100644 keystone/contrib/endpoint_policy/migrate_repo/migrate.cfg delete mode 100644 keystone/contrib/endpoint_policy/migrate_repo/versions/001_add_endpoint_policy_table.py delete mode 100644 keystone/contrib/endpoint_policy/migrate_repo/versions/__init__.py delete mode 100644 keystone/contrib/endpoint_policy/routers.py create mode 100644 releasenotes/notes/removed-as-of-newton-721c06b5dcb1b34a.yaml diff --git a/keystone/contrib/endpoint_policy/__init__.py b/keystone/contrib/endpoint_policy/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/keystone/contrib/endpoint_policy/backends/__init__.py b/keystone/contrib/endpoint_policy/backends/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/keystone/contrib/endpoint_policy/backends/sql.py b/keystone/contrib/endpoint_policy/backends/sql.py deleted file mode 100644 index 933317797a..0000000000 --- a/keystone/contrib/endpoint_policy/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.endpoint_policy.backends import sql - -_OLD = 'keystone.contrib.endpoint_policy.backends.sql.EndpointPolicy' -_NEW = 'keystone.endpoint_policy.backends.sql.EndpointPolicy' - - -class EndpointPolicy(sql.EndpointPolicy): - - @versionutils.deprecated(versionutils.deprecated.LIBERTY, - in_favor_of=_NEW, - remove_in=1, - what=_OLD) - def __init__(self, *args, **kwargs): - super(EndpointPolicy, self).__init__(*args, **kwargs) diff --git a/keystone/contrib/endpoint_policy/migrate_repo/__init__.py b/keystone/contrib/endpoint_policy/migrate_repo/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/keystone/contrib/endpoint_policy/migrate_repo/migrate.cfg b/keystone/contrib/endpoint_policy/migrate_repo/migrate.cfg deleted file mode 100644 index 62895d6fc8..0000000000 --- a/keystone/contrib/endpoint_policy/migrate_repo/migrate.cfg +++ /dev/null @@ -1,25 +0,0 @@ -[db_settings] -# Used to identify which repository this database is versioned under. -# You can use the name of your project. -repository_id=endpoint_policy - -# The name of the database table used to track the schema version. -# This name shouldn't already be used by your project. -# If this is changed once a database is under version control, you'll need to -# change the table name in each database too. -version_table=migrate_version - -# When committing a change script, Migrate will attempt to generate the -# sql for all supported databases; normally, if one of them fails - probably -# because you don't have that database installed - it is ignored and the -# commit continues, perhaps ending successfully. -# Databases in this list MUST compile successfully during a commit, or the -# entire commit will fail. List the databases your application will actually -# be using to ensure your updates to that database work properly. -# This must be a list; example: ['postgres','sqlite'] -required_dbs=[] - -# When creating new change scripts, Migrate will stamp the new script with -# a version number. By default this is latest_version + 1. You can set this -# to 'true' to tell Migrate to use the UTC timestamp instead. -use_timestamp_numbering=False diff --git a/keystone/contrib/endpoint_policy/migrate_repo/versions/001_add_endpoint_policy_table.py b/keystone/contrib/endpoint_policy/migrate_repo/versions/001_add_endpoint_policy_table.py deleted file mode 100644 index 32bdabdd31..0000000000 --- a/keystone/contrib/endpoint_policy/migrate_repo/versions/001_add_endpoint_policy_table.py +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright 2014 IBM Corp. -# -# 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 import exception - - -def upgrade(migrate_engine): - raise exception.MigrationMovedFailure(extension='endpoint_policy') diff --git a/keystone/contrib/endpoint_policy/migrate_repo/versions/__init__.py b/keystone/contrib/endpoint_policy/migrate_repo/versions/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/keystone/contrib/endpoint_policy/routers.py b/keystone/contrib/endpoint_policy/routers.py deleted file mode 100644 index c8f7f15468..0000000000 --- a/keystone/contrib/endpoint_policy/routers.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.common import wsgi - -_OLD = 'keystone.contrib.endpoint_policy.routers.EndpointPolicyExtension' -_NEW = 'keystone.endpoint_policy.routers.Routers' - - -class EndpointPolicyExtension(wsgi.Middleware): - - @versionutils.deprecated(versionutils.deprecated.LIBERTY, - in_favor_of=_NEW, - remove_in=1, - what=_OLD) - def __init__(self, *args, **kwargs): - super(EndpointPolicyExtension, self).__init__(*args, **kwargs) diff --git a/keystone/tests/unit/test_sql_migrate_extensions.py b/keystone/tests/unit/test_sql_migrate_extensions.py index 0155f7874b..125b915055 100644 --- a/keystone/tests/unit/test_sql_migrate_extensions.py +++ b/keystone/tests/unit/test_sql_migrate_extensions.py @@ -30,7 +30,6 @@ WARNING:: """ from keystone.contrib import endpoint_filter -from keystone.contrib import endpoint_policy from keystone.contrib import federation from keystone.contrib import oauth1 from keystone.contrib import revoke @@ -68,20 +67,6 @@ class EndpointFilterExtension(test_sql_upgrade.SqlMigrateBase): repository=self.repo_path) -class EndpointPolicyExtension(test_sql_upgrade.SqlMigrateBase): - - ENDPOINT_POLICY_MIGRATIONS = 1 - - def repo_package(self): - return endpoint_policy - - def test_upgrade(self): - self.assertRaises(exception.MigrationMovedFailure, - self.upgrade, - version=self.ENDPOINT_POLICY_MIGRATIONS, - repository=self.repo_path) - - class FederationExtension(test_sql_upgrade.SqlMigrateBase): FEDERATION_MIGRATIONS = 8 diff --git a/releasenotes/notes/removed-as-of-newton-721c06b5dcb1b34a.yaml b/releasenotes/notes/removed-as-of-newton-721c06b5dcb1b34a.yaml new file mode 100644 index 0000000000..0cee451987 --- /dev/null +++ b/releasenotes/notes/removed-as-of-newton-721c06b5dcb1b34a.yaml @@ -0,0 +1,7 @@ +--- +other: + - > + [`blueprint removed-as-of-newton `_] + Removed the backend and route from ``keystone.contrib.endpoint_policy``. + The package has been moved to ``keystone.endpoint_policy``. This was + deprecated in the Liberty release. \ No newline at end of file