keystone.catalog.backends package

Submodules

keystone.catalog.backends.sql module

class keystone.catalog.backends.sql.Catalog[source]

Bases: keystone.catalog.core.CatalogDriverV8

add_endpoint_group_to_project(*args, **kwargs)[source]
add_endpoint_to_project(*args, **kwargs)[source]
check_endpoint_in_project(endpoint_id, project_id)[source]
create_endpoint(endpoint_id, endpoint_ref)[source]
create_endpoint_group(endpoint_group_id, endpoint_group)[source]
create_region(*args, **kwargs)[source]
create_service(service_id, service_ref)[source]
delete_association_by_endpoint(endpoint_id)[source]
delete_association_by_project(project_id)[source]
delete_endpoint(endpoint_id)[source]
delete_endpoint_group(endpoint_group_id)[source]
delete_endpoint_group_association_by_project(project_id)[source]
delete_region(region_id)[source]
delete_service(service_id)[source]
get_catalog(user_id, tenant_id)[source]

Retrieve and format the V2 service catalog.

Parameters:
  • user_id – The id of the user who has been authenticated for creating service catalog.
  • tenant_id – The id of the project. ‘tenant_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 tenant_id as part of their URL will be skipped (as would a whole service if, as a consequence, it has no valid endpoints).
Returns:

A nested dict representing the service catalog or an empty dict.

get_endpoint(endpoint_id)[source]
get_endpoint_group(endpoint_group_id)[source]
get_endpoint_group_in_project(endpoint_group_id, project_id)[source]
get_region(region_id)[source]
get_service(service_id)[source]
get_v3_catalog(user_id, tenant_id)[source]

Retrieve and format the current V3 service catalog.

Parameters:
  • user_id – The id of the user who has been authenticated for creating service catalog.
  • tenant_id – The id of the project. ‘tenant_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 tenant_id as part of their URL will be skipped.
Returns:

A list representing the service catalog or an empty list

list_endpoint_groups()[source]
list_endpoint_groups_for_project(project_id)[source]
list_endpoints(hints, *args, **kwargs)[source]
list_endpoints_for_project(project_id)[source]
list_projects_associated_with_endpoint_group(endpoint_group_id)[source]
list_projects_for_endpoint(endpoint_id)[source]
list_regions(hints)[source]
list_services(hints, *args, **kwargs)[source]
remove_endpoint_from_project(endpoint_id, project_id)[source]
remove_endpoint_group_from_project(endpoint_group_id, project_id)[source]
update_endpoint(endpoint_id, endpoint_ref)[source]
update_endpoint_group(endpoint_group_id, endpoint_group)[source]
update_region(region_id, region_ref)[source]
update_service(service_id, service_ref)[source]
class keystone.catalog.backends.sql.Endpoint(*args, **kwargs)[source]

Bases: sqlalchemy.ext.declarative.api.Base, keystone.common.sql.core.DictBase

attributes = ['id', 'interface', 'region_id', 'service_id', 'url', 'legacy_endpoint_id', 'enabled']
enabled
extra
id
interface
legacy_endpoint_id
region_id
service_id
url
class keystone.catalog.backends.sql.EndpointGroup(*args, **kwargs)[source]

Bases: sqlalchemy.ext.declarative.api.Base, keystone.common.sql.core.ModelDictMixin

Endpoint Groups table.

attributes = ['id', 'name', 'description', 'filters']
description
filters
id
mutable_attributes = frozenset(['name', 'filters', 'description'])
name
class keystone.catalog.backends.sql.ProjectEndpoint(*args, **kwargs)[source]

Bases: sqlalchemy.ext.declarative.api.Base, keystone.common.sql.core.ModelDictMixin

project-endpoint relationship table.

attributes = ['endpoint_id', 'project_id']
endpoint_id
project_id
class keystone.catalog.backends.sql.ProjectEndpointGroupMembership(*args, **kwargs)[source]

Bases: sqlalchemy.ext.declarative.api.Base, keystone.common.sql.core.ModelDictMixin

Project to Endpoint group relationship table.

attributes = ['endpoint_group_id', 'project_id']
endpoint_group_id
project_id
class keystone.catalog.backends.sql.Region(*args, **kwargs)[source]

Bases: sqlalchemy.ext.declarative.api.Base, keystone.common.sql.core.DictBase

attributes = ['id', 'description', 'parent_region_id']
description
endpoints
extra
id
parent_region_id
class keystone.catalog.backends.sql.Service(*args, **kwargs)[source]

Bases: sqlalchemy.ext.declarative.api.Base, keystone.common.sql.core.DictBase

attributes = ['id', 'type', 'enabled']
enabled
endpoints
extra
id
type

keystone.catalog.backends.templated module

class keystone.catalog.backends.templated.Catalog(templates=None)[source]

Bases: keystone.common.manager.Driver

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 $ due to paste attempting to interpolate on its own:

When expanding the template it will pass in a dict made up of the conf instance plus a few additional key-values, notably tenant_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_endpoint_group_to_project(endpoint_group_id, project_id)[source]
add_endpoint_to_project(endpoint_id, project_id)[source]
check_endpoint_in_project(endpoint_id, project_id)[source]
create_endpoint(endpoint_id, endpoint_ref)[source]
create_endpoint_group(endpoint_group)[source]
create_region(region_ref)[source]
create_service(service_id, service_ref)[source]
delete_association_by_endpoint(endpoint_id)[source]
delete_association_by_project(project_id)[source]
delete_endpoint(endpoint_id)[source]
delete_endpoint_group(endpoint_group_id)[source]
delete_endpoint_group_association_by_project(project_id)[source]
delete_region(region_id)[source]
delete_service(service_id)[source]
get_catalog(user_id, tenant_id)[source]

Retrieve and format the V2 service catalog.

Parameters:
  • user_id – The id of the user who has been authenticated for creating service catalog.
  • tenant_id – The id of the project. ‘tenant_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 tenant_id as part of their URL will be skipped.
Returns:

A nested dict representing the service catalog or an empty dict.

get_endpoint(endpoint_id)[source]
get_endpoint_group(endpoint_group_id)[source]
get_endpoint_group_in_project(endpoint_group_id, project_id)[source]
get_region(region_id)[source]
get_service(service_id)[source]
list_endpoint_groups()[source]
list_endpoint_groups_for_project(project_id)[source]
list_endpoints(hints)[source]
list_endpoints_for_project(project_id)[source]
list_projects_associated_with_endpoint_group(endpoint_group_id)[source]
list_projects_for_endpoint(endpoint_id)[source]
list_regions(hints)[source]
list_services(hints)[source]
remove_endpoint_from_project(endpoint_id, project_id)[source]
remove_endpoint_group_from_project(endpoint_group_id, project_id)[source]
update_endpoint(endpoint_id, endpoint_ref)[source]
update_endpoint_group(endpoint_group_id, endpoint_group)[source]
update_region(region_id, region_ref)[source]
update_service(service_id, service_ref)[source]
keystone.catalog.backends.templated.parse_templates(template_lines)[source]

Module contents

Table Of Contents

Previous topic

keystone.catalog package

Next topic

keystone.cmd package

Project Source

This Page