Bases: CatalogDriverBase
A backend that generates endpoints for the Catalog based on templates.
It is usually configured via config entries that look like:
catalog.$REGION.$SERVICE.$key = $value
and is stored in a similar looking hierarchy. Where a value can contain values to be interpolated by standard python string interpolation that look like (the % is replaced by a $):
When expanding the template it will pass in a dict made up of the conf instance plus a few additional key-values, notably project_id and user_id.
It does not care what the keys and values are but it is worth noting that keystone_compat will expect certain keys to be there so that it can munge them into the output format keystone expects. These keys are:
- name - the name of the service, most likely repeated for all services of
the same type, across regions.
adminURL - the url of the admin endpoint
publicURL - the url of the public endpoint
internalURL - the url of the internal endpoint
Add an endpoint group to project association.
endpoint_group_id (string) – identity of endpoint to associate
project_id (string) – identity of project to associate
keystone.exception.Conflict – If the endpoint group was already added to the project.
None.
Create an endpoint to project association.
endpoint_id (string) – identity of endpoint to associate
project_id (string) – identity of the project to be associated with
keystone.exception.Conflict: If the endpoint was already added to project.
None.
Check if an endpoint is associated with a project.
endpoint_id (string) – identity of endpoint to check
project_id (string) – identity of the project associated with
keystone.exception.NotFound – If the endpoint was not found in the project.
None.
Create a new endpoint for a service.
keystone.exception.Conflict – If a duplicate endpoint exists.
keystone.exception.ServiceNotFound – If the service doesn’t exist.
Create an endpoint group.
endpoint_group (dictionary) – endpoint group to create
keystone.exception.Conflict: If a duplicate endpoint group already exists.
an endpoint group representation.
Create a new region.
keystone.exception.Conflict – If the region already exists.
keystone.exception.RegionNotFound – If the parent region is invalid.
Create a new service.
keystone.exception.Conflict – If a duplicate service exists.
Remove all the endpoints to project association with endpoint.
endpoint_id (string) – identity of endpoint to check
None
Remove all the endpoints to project association with project.
project_id (string) – identity of the project to check
None
Delete an endpoint for a service.
keystone.exception.EndpointNotFound – If the endpoint doesn’t exist.
Delete an endpoint group.
endpoint_group_id (string) – identity of endpoint group to delete
keystone.exception.NotFound – If the endpoint group was not found.
None.
Remove endpoint group to project associations.
project_id (string) – identity of the project to check
None
Delete an existing region.
keystone.exception.RegionNotFound – If the region doesn’t exist.
Delete an existing service.
keystone.exception.ServiceNotFound – If the service doesn’t exist.
Retrieve and format the V2 service catalog.
user_id – The id of the user who has been authenticated for creating service catalog.
project_id – The id of the project. ‘project_id’ will be None in the case this being called to create a catalog to go in a domain scoped token. In this case, any endpoint that requires a project_id as part of their URL will be skipped.
A nested dict representing the service catalog or an empty dict.
Get endpoint by id.
endpoint_ref dict
keystone.exception.EndpointNotFound – If the endpoint doesn’t exist.
Get an endpoint group.
endpoint_group_id (string) – identity of endpoint group to retrieve
keystone.exception.NotFound – If the endpoint group was not found.
an endpoint group representation.
Get endpoint group to project association.
endpoint_group_id (string) – identity of endpoint group to retrieve
project_id (string) – identity of project to associate
keystone.exception.NotFound – If the endpoint group to the project association was not found.
a project endpoint group representation.
Get region by id.
region_ref dict
keystone.exception.RegionNotFound – If the region doesn’t exist.
Get service by id.
service_ref dict
keystone.exception.ServiceNotFound – If the service doesn’t exist.
Retrieve and format the current V3 service catalog.
This implementation builds the V3 catalog from the V2 catalog.
user_id – The id of the user who has been authenticated for creating service catalog.
project_id – The id of the project. ‘project_id’ will be None in the case this being called to create a catalog to go in a domain scoped token. In this case, any endpoint that requires a project_id as part of their URL will be skipped.
A list representing the service catalog or an empty list
List all endpoint group to project associations for a project.
project_id (string) – identity of project to associate
None.
List all endpoints.
hints – contains the list of filters yet to be satisfied. Any filters satisfied here will be removed so that the caller will know if any filters remain.
list of endpoint_refs or an empty list.
List all endpoints associated with a project.
project_id (string) – identity of the project to check
a list of identity endpoint ids or an empty list.
List all projects associated with endpoint group.
endpoint_group_id (string) – identity of endpoint to associate
None.
List all projects associated with an endpoint.
endpoint_id (string) – identity of endpoint to check
a list of projects or an empty list.
List all regions.
hints – contains the list of filters yet to be satisfied. Any filters satisfied here will be removed so that the caller will know if any filters remain.
list of region_refs or an empty list.
List all services.
hints – contains the list of filters yet to be satisfied. Any filters satisfied here will be removed so that the caller will know if any filters remain.
list of service_refs or an empty list.
Remove an endpoint to project association.
endpoint_id (string) – identity of endpoint to remove
project_id (string) – identity of the project associated with
keystone.exception.NotFound – If the endpoint was not found in the project.
None.
Remove an endpoint to project association.
endpoint_group_id (string) – identity of endpoint to associate
project_id (string) – identity of project to associate
keystone.exception.NotFound – If endpoint group project association was not found.
None.
Get endpoint by id.
endpoint_ref dict
keystone.exception.EndpointNotFound – If the endpoint doesn’t exist.
keystone.exception.ServiceNotFound – If the service doesn’t exist.
Update an endpoint group.
endpoint_group_id (string) – identity of endpoint group to retrieve
endpoint_group (dictionary) – A full or partial endpoint_group
keystone.exception.NotFound – If the endpoint group was not found.
an endpoint group representation.
Update region by id.
region_ref dict
keystone.exception.RegionNotFound – If the region doesn’t exist.
Update service by id.
service_ref dict
keystone.exception.ServiceNotFound – If the service doesn’t exist.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.