novaclient.client module¶
OpenStack Client interface. Handles the REST calls and responses.
- novaclient.client.Client(version, username=None, password=None, project_id=None, auth_url=None, **kwargs)¶
Initialize client object based on given version.
HOW-TO: The simplest way to create a client instance is initialization with your credentials:
>>> from novaclient import client >>> nova = client.Client(VERSION, USERNAME, PASSWORD, ... PROJECT_ID, AUTH_URL)
Here
VERSION
can be a string ornovaclient.api_versions.APIVersion
obj. If you prefer string value, you can use1.1
(deprecated now),2
or2.X
(where X is a microversion).Alternatively, you can create a client instance using the keystoneauth session API. See “The novaclient Python API” page at python-novaclient’s doc.
- class novaclient.client.SessionClient(*args, **kwargs)¶
Bases:
LegacyJsonAdapter
- client_name = 'python-novaclient'¶
- client_version = '18.4.1'¶
- get_timings()¶
- request(url, method, **kwargs)¶
- reset_timings()¶
- novaclient.client.discover_extensions(*args, **kwargs)¶
Returns the list of extensions, which can be discovered by python path and by entry-point ‘novaclient.extension’.