diff --git a/keystone/trust/backends/base.py b/keystone/trust/backends/base.py index 4e11979253..557268926a 100644 --- a/keystone/trust/backends/base.py +++ b/keystone/trust/backends/base.py @@ -79,3 +79,19 @@ class TrustDriverBase(object): """ raise exception.NotImplemented() # pragma: no cover + + @abc.abstractmethod + def flush_expired_and_soft_deleted_trusts(self, project_id=None, + trustor_user_id=None, + trustee_user_id=None, + date=None): + """Flush expired and non-expired soft deleted trusts from the backend. + + :param project_id: ID of a project to filter trusts by. + :param trustor_user_id: ID of a trustor_user_id to filter trusts by. + :param trustee_user_id: ID of a trustee_user_id to filter trusts by. + :param date: date to filter trusts by. + :type date: datetime + + """ + raise exception.NotImplemented() # pragma: no cover diff --git a/releasenotes/notes/bug-1473292-c21481e6aec29ec2.yaml b/releasenotes/notes/bug-1473292-c21481e6aec29ec2.yaml index c35581187b..8228e59751 100644 --- a/releasenotes/notes/bug-1473292-c21481e6aec29ec2.yaml +++ b/releasenotes/notes/bug-1473292-c21481e6aec29ec2.yaml @@ -1,7 +1,7 @@ --- feature: - | - [`Bug 1473292 `_] + [`bug 1473292 `_] As trusts created by user are stored in database resulting it to grow larger as trusts that are expired and soft deleted non-expired are not automatically purged by keystone.Thus this implements TrustFlush via keystone-manage to delete @@ -18,6 +18,8 @@ feature: --trustee-user-id : To purge trusts of given trustee-id. --date : To purge trusts older than date. It will purge trusts older than current if date not given. - - - +other: + - > + [`bug 1473292 `_] + If you're relying on a custom implementation of the trust backend, please be sure to + implement the new method prior to upgrading.