Bases: keystone.common.kvs.legacy.Base, keystone.catalog.core.Driver
Bases: keystone.catalog.core.Driver
Retrieve and format the V2 service catalog.
Parameters: |
|
---|---|
Returns: | A nested dict representing the service catalog or an empty dict. |
Retrieve and format the current V3 service catalog.
Parameters: |
|
---|---|
Returns: | A list representing the service catalog or an empty list |
Bases: sqlalchemy.ext.declarative.api.Base, keystone.common.sql.core.DictBase
Bases: sqlalchemy.ext.declarative.api.Base, keystone.common.sql.core.DictBase
Bases: sqlalchemy.ext.declarative.api.Base, keystone.common.sql.core.DictBase
Return a constant True_ construct.
E.g.:
>>> from sqlalchemy import true
>>> print select([t.c.x]).where(true())
SELECT x FROM t WHERE true
A backend which does not support true/false constants will render as an expression against 1 or 0:
>>> print select([t.c.x]).where(true())
SELECT x FROM t WHERE 1 = 1
The true() and false() constants also feature “short circuit” operation within an and_() or or_() conjunction:
>>> print select([t.c.x]).where(or_(t.c.x > 5, true()))
SELECT x FROM t WHERE true
>>> print select([t.c.x]).where(and_(t.c.x > 5, false()))
SELECT x FROM t WHERE false
Changed in version 0.9: true() and false() feature better integrated behavior within conjunctions and on dialects that don’t support true/false constants.
See also
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 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
Retrieve and format the V2 service catalog.
Parameters: |
|
---|---|
Returns: | A nested dict representing the service catalog or an empty dict. |