Generic client

Use the generic client to obtain access to a specific endpoint version.

class keystoneclient.generic.client.Client(endpoint=None, **kwargs)

Client for the OpenStack Keystone pre-version calls API.

Parameters:
  • endpoint (string) – A user-supplied endpoint URL for the keystone service.
  • timeout (integer) – Allows customization of the timeout for client http requests. (optional)

Example:

>>> from keystoneclient.generic import client
>>> root = client.Client(auth_url=KEYSTONE_URL)
>>> versions = root.discover()
...
>>> from keystoneclient.v2_0 import client as v2client
>>> keystone = v2client.Client(auth_url=versions['v2.0']['url'])
...
>>> user = keystone.users.get(USER_ID)
>>> user.delete()
discover(url=None)

Discover Keystone servers and return API versions supported.

Parameters:url – optional url to test (without version)

Returns:

{
    'message': 'Keystone found at http://127.0.0.1:5000/',
    'v2.0': {
        'status': 'beta',
        'url': 'http://127.0.0.1:5000/v2.0/',
        'id': 'v2.0'
    },
}

Previous topic

Client

Next topic

Tenant Manager and Tenants

This Page