keystone.trust.backends.base module¶
- class keystone.trust.backends.base.TrustDriverBase[source]¶
基类:
object- abstract consume_use(trust_id)[source]¶
消耗信任的一次使用次数。
当信任创建时带有对其使用次数的限制时,将消耗信任的一次使用次数,前提是仍有可用的使用次数。
- 引发:
keystone.exception.TrustUseLimitReached – 如果信任没有剩余的使用次数。
keystone.exception.TrustNotFound – 如果信任不存在。
- abstract flush_expired_and_soft_deleted_trusts(project_id=None, trustor_user_id=None, trustee_user_id=None, date=None)[source]¶
从后端清除过期的和未过期的软删除信任。
- 参数:
project_id – 用于筛选信任的项目 ID。
trustor_user_id – 用于筛选信任的 trustor_user_id。
trustee_user_id – 用于筛选信任的 trustee_user_id。
date (datetime) – 用于筛选信任的日期。