keystone.trust.backends.base module

class keystone.trust.backends.base.TrustDriverBase[source]

Bases: object

abstract consume_use(trust_id)[source]

Consume one use of a trust.

One use of a trust is consumed when the trust was created with a limitation on its uses, provided there are still uses available.

Raises:
abstract create_trust(trust_id, trust, roles)[source]

Create a new trust.

Returns:

a new trust

abstract delete_trust(trust_id)[source]
abstract delete_trusts_for_project(project_id)[source]

Delete all trusts for a project.

Parameters:

project_id – ID of a project to filter trusts by.

abstract flush_expired_and_soft_deleted_trusts(project_id=None, trustor_user_id=None, trustee_user_id=None, date=None)[source]

Flush expired and non-expired soft deleted trusts from the backend.

Parameters:
  • project_id – ID of a project to filter trusts by.

  • trustor_user_id – ID of a trustor_user_id to filter trusts by.

  • trustee_user_id – ID of a trustee_user_id to filter trusts by.

  • date (datetime) – date to filter trusts by.

abstract get_trust(trust_id, deleted=False)[source]

Get a trust by the trust id.

Parameters:
  • trust_id (string) – the trust identifier

  • deleted (bool) – return the trust even if it is deleted, expired, or has no consumptions left

abstract list_trusts()[source]
abstract list_trusts_for_trustee(trustee)[source]
abstract list_trusts_for_trustor(trustor, redelegated_trust_id=None)[source]