Table Of Contents

Previous topic

catalog Package

Next topic

common Package

This Page

backends Package

kvs Module

class keystone.catalog.backends.kvs.Catalog(db=None)

Bases: keystone.common.kvs.Base, keystone.catalog.core.Driver

create_service(service_id, service)
delete_service(service_id)
get_catalog(user_id, tenant_id, metadata=None)
get_service(service_id)
list_services()
update_service(service_id, service)

sql Module

class keystone.catalog.backends.sql.Catalog

Bases: keystone.common.sql.core.Base, keystone.catalog.core.Driver

create_endpoint(endpoint_id, endpoint_ref)
create_service(service_id, service_ref)
db_sync()
delete_endpoint(endpoint_id)
delete_service(service_id)
get_catalog(user_id, tenant_id, metadata=None)
get_endpoint(endpoint_id)
get_service(service_id)
list_endpoints()
list_services()
class keystone.catalog.backends.sql.Endpoint(**kwargs)

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

extra
classmethod from_dict(endpoint_dict)
id
region
service_id
to_dict()
class keystone.catalog.backends.sql.Service(**kwargs)

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

extra
classmethod from_dict(service_dict)
id
to_dict()
type

templated Module

class keystone.catalog.backends.templated.TemplatedCatalog(templates=None)

Bases: keystone.catalog.backends.kvs.Catalog

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 attmepting 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

get_catalog(user_id, tenant_id, metadata=None)
keystone.catalog.backends.templated.parse_templates(template_lines)