keystone.identity.mapping_backends.base module

class keystone.identity.mapping_backends.base.MappingDriverBase[source]

Bases: keystone.common.provider_api.ProviderAPIMixin, object

Interface description for an ID Mapping driver.

abstract create_id_mapping(local_entity, public_id=None)[source]

Create and store a mapping to a public_id.

Parameters
  • local_entity (dict) – Containing the entity domain, local ID and type (‘user’ or ‘group’).

  • public_id – If specified, this will be the public ID. If this is not specified, a public ID will be generated.

Returns

public ID

abstract delete_id_mapping(public_id)[source]

Delete an entry for the given public_id.

Parameters

public_id – The public ID for the mapping to be deleted.

The method is silent if no mapping is found.

abstract get_domain_mapping_list(domain_id, entity_type=None)[source]

Return mappings for the domain.

Parameters
  • domain_id – Domain ID to get mappings for.

  • entity_type (String, one of mappings defined in keystone.identity.mapping_backends.mapping.EntityType) – Optional entity_type to get mappings for.

Returns

list of mappings.

abstract get_id_mapping(public_id)[source]

Return the local mapping.

Parameters

public_id – The public ID for the mapping required.

Returns dict

Containing the entity domain, local ID and type. If no mapping is found, it returns None.

abstract get_public_id(local_entity)[source]

Return the public ID for the given local entity.

Parameters

local_entity (dict) – Containing the entity domain, local ID and type (‘user’ or ‘group’).

Returns

public ID, or None if no mapping is found.

abstract purge_mappings(purge_filter)[source]

Purge selected identity mappings.

Parameters

purge_filter (dict) – Containing the attributes of the filter that defines which entries to purge. An empty filter means purge all mappings.