The keystoneclient.service_catalog Module

class keystoneclient.service_catalog.ServiceCatalog(resource_dict)

Bases: object

Helper methods for dealing with a Keystone Service Catalog.

get_endpoints(service_type=None, endpoint_type=None)

Fetch and filter endpoints for the specified service(s).

Returns endpoints for the specified service (or all) and that contain the specified type (or all).

get_token()

Fetch token details from service catalog.

Returns a dictionary containing the following:

- `id`: Token's ID
- `expires`: Token's expiration
- `user_id`: Authenticated user's ID
- `tenant_id`: Authorized project's ID
url_for(attr=None, filter_value=None, service_type='identity', endpoint_type='publicURL')

Fetch an endpoint from the service catalog.

Fetch the specified endpoint from the service catalog for a particular endpoint attribute. If no attribute is given, return the first endpoint of the specified type.

Valid endpoint types: publicURL, internalURL, adminURL

See tests for a sample service catalog.

Previous topic

The keystoneclient.openstack.common.timeutils Module

Next topic

The keystoneclient.shell Module

This Page