keystone.catalog package
Submodules
keystone.catalog.controllers module
-
class keystone.catalog.controllers.Endpoint(*args, **kwargs)[source]
Bases: keystone.common.controller.V2Controller
-
create_endpoint(context, endpoint)[source]
Create three v3 endpoint refs based on a legacy ref.
-
delete_endpoint(context, endpoint_id)[source]
Delete up to three v3 endpoint refs based on a legacy ref ID.
-
get_endpoints(context)[source]
Merge matching v3 endpoint refs into legacy refs.
-
class keystone.catalog.controllers.EndpointV3[source]
Bases: keystone.common.controller.V3Controller
-
collection_name = 'endpoints'
-
create_endpoint(context, *args, **kwargs)[source]
-
delete_endpoint(context, *args, **kwargs)[source]
-
classmethod filter_endpoint(ref)[source]
-
get_endpoint(context, *args, **kwargs)[source]
-
list_endpoints(context, **kwargs)[source]
-
member_name = 'endpoint'
-
update_endpoint(context, *args, **kwargs)[source]
-
classmethod wrap_member(context, ref)[source]
-
class keystone.catalog.controllers.RegionV3(*args, **kwargs)[source]
Bases: keystone.common.controller.V3Controller
-
collection_name = 'regions'
-
create_region(context, *args, **kwargs)[source]
-
create_region_with_id(context, region_id, region)[source]
Create a region with a user-specified ID.
This method is unprotected because it depends on self.create_region
to enforce policy.
-
delete_region(context, *args, **kwargs)[source]
-
get_region(context, *args, **kwargs)[source]
-
list_regions(context, **kwargs)[source]
-
member_name = 'region'
-
update_region(context, *args, **kwargs)[source]
-
class keystone.catalog.controllers.Service(*args, **kwargs)[source]
Bases: keystone.common.controller.V2Controller
-
create_service(context, OS_KSADM_service)[source]
-
delete_service(context, service_id)[source]
-
get_service(context, service_id)[source]
-
get_services(context)[source]
-
class keystone.catalog.controllers.ServiceV3[source]
Bases: keystone.common.controller.V3Controller
-
collection_name = 'services'
-
create_service(context, *args, **kwargs)[source]
-
delete_service(context, *args, **kwargs)[source]
-
get_service(context, *args, **kwargs)[source]
-
list_services(context, **kwargs)[source]
-
member_name = 'service'
-
update_service(context, *args, **kwargs)[source]
keystone.catalog.core module
Main entry point into the Catalog service.
-
class keystone.catalog.core.Driver[source]
Bases: object
Interface description for an Catalog driver.
-
create_endpoint(endpoint_id, endpoint_ref)[source]
Creates a new endpoint for a service.
Raises: | keystone.exception.Conflict,
keystone.exception.ServiceNotFound |
-
create_region(region_ref)[source]
Creates a new region.
Raises: | keystone.exception.Conflict |
Raises: | keystone.exception.RegionNotFound (if parent region invalid) |
-
create_service(service_id, service_ref)[source]
Creates a new service.
Raises: | keystone.exception.Conflict |
-
delete_endpoint(endpoint_id)[source]
Deletes an endpoint for a service.
Raises: | keystone.exception.EndpointNotFound |
-
delete_region(region_id)[source]
Deletes an existing region.
Raises: | keystone.exception.RegionNotFound |
-
delete_service(service_id)[source]
Deletes an existing service.
Raises: | keystone.exception.ServiceNotFound |
-
get_catalog(user_id, tenant_id)[source]
Retrieve and format the current service catalog.
Example:
{ 'RegionOne':
{'compute': {
'adminURL': u'http://host:8774/v1.1/tenantid',
'internalURL': u'http://host:8774/v1.1/tenant_id',
'name': 'Compute Service',
'publicURL': u'http://host:8774/v1.1/tenantid'},
'ec2': {
'adminURL': 'http://host:8773/services/Admin',
'internalURL': 'http://host:8773/services/Cloud',
'name': 'EC2 Service',
'publicURL': 'http://host:8773/services/Cloud'}}
Returns: | A nested dict representing the service catalog or an
empty dict. |
Raises: | keystone.exception.NotFound |
-
get_endpoint(endpoint_id)[source]
Get endpoint by id.
Returns: | endpoint_ref dict |
Raises: | keystone.exception.EndpointNotFound |
-
get_region(region_id)[source]
Get region by id.
Returns: | region_ref dict |
Raises: | keystone.exception.RegionNotFound |
-
get_service(service_id)[source]
Get service by id.
Returns: | service_ref dict |
Raises: | keystone.exception.ServiceNotFound |
-
get_v3_catalog(user_id, tenant_id)[source]
Retrieve and format the current V3 service catalog.
The default implementation builds the V3 catalog from the V2 catalog.
Example:
[
{
"endpoints": [
{
"interface": "public",
"id": "--endpoint-id--",
"region": "RegionOne",
"url": "http://external:8776/v1/--project-id--"
},
{
"interface": "internal",
"id": "--endpoint-id--",
"region": "RegionOne",
"url": "http://internal:8776/v1/--project-id--"
}],
"id": "--service-id--",
"type": "volume"
}]
Returns: | A list representing the service catalog or an empty list |
Raises: | keystone.exception.NotFound |
-
list_endpoints(hints)[source]
List all endpoints.
Parameters: | 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. |
Returns: | list of endpoint_refs or an empty list. |
-
list_regions(hints)[source]
List all regions.
Parameters: | 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. |
Returns: | list of region_refs or an empty list. |
-
list_services(hints)[source]
List all services.
Parameters: | 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. |
Returns: | list of service_refs or an empty list. |
-
update_endpoint(endpoint_id, endpoint_ref)[source]
Get endpoint by id.
Returns: | endpoint_ref dict |
Raises: | keystone.exception.EndpointNotFound
keystone.exception.ServiceNotFound |
-
update_region(region_id, region_ref)[source]
Update region by id.
Returns: | region_ref dict |
Raises: | keystone.exception.RegionNotFound |
-
update_service(service_id, service_ref)[source]
Update service by id.
Returns: | service_ref dict |
Raises: | keystone.exception.ServiceNotFound |
-
class keystone.catalog.core.Manager(*args, **kwargs)[source]
Bases: keystone.common.manager.Manager
Default pivot point for the Catalog backend.
See keystone.common.manager.Manager for more details on how this
dynamically calls the backend.
-
create_endpoint(endpoint_id, endpoint_ref, initiator=None)[source]
-
create_region(region_ref, initiator=None)[source]
-
create_service(service_id, service_ref, initiator=None)[source]
-
delete_endpoint(endpoint_id, initiator=None)[source]
-
delete_region(region_id, initiator=None)[source]
-
delete_service(service_id, initiator=None)[source]
-
get_catalog(user_id, tenant_id)[source]
-
get_endpoint(*arg, **kw)[source]
-
get_region(*arg, **kw)[source]
-
get_service(*arg, **kw)[source]
-
list_endpoints(*args, **kwargs)[source]
-
list_regions(*args, **kwargs)[source]
-
list_services(*args, **kwargs)[source]
-
update_endpoint(endpoint_id, endpoint_ref, initiator=None)[source]
-
update_region(region_id, region_ref, initiator=None)[source]
-
update_service(service_id, service_ref, initiator=None)[source]
-
keystone.catalog.core.format_url(url, substitutions, silent_keyerror_failures=None)[source]
Formats a user-defined URL with the given substitutions.
Parameters: |
- url (string) – the URL to be formatted
- substitutions (dict) – the dictionary used for substitution
- silent_keyerror_failures (list) – keys for which we should be silent
if there is a KeyError exception on substitution attempt
|
Returns: | a formatted URL
|
keystone.catalog.schema module
Module contents