generic Package

generic Package

client Module

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

Bases: keystoneclient.httpclient.HTTPClient

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'
    },
}
discover_extensions(url=None)

Discover Keystone extensions supported.

Parameters:url – optional url to test (should have a version in it)

Returns:

{
    'message': 'Keystone extensions at http://127.0.0.1:35357/v2',
    'OS-KSEC2': 'OpenStack EC2 Credentials Extension',
}

shell Module

keystoneclient.generic.shell.do_discover(cs, args)

Discover Keystone servers, supported API versions and extensions.

Table Of Contents

Previous topic

fixture Package

Next topic

middleware Package

This Page