ClientΒΆ
-
class
novaclient.v2.client.
Client
(username=None, api_key=None, project_id=None, auth_url=None, insecure=False, timeout=None, proxy_tenant_id=None, proxy_token=None, region_name=None, endpoint_type='publicURL', extensions=None, service_type='compute', service_name=None, volume_service_name=None, timings=False, bypass_url=None, os_cache=False, no_cache=True, http_log_debug=False, auth_system='keystone', auth_plugin=None, auth_token=None, cacert=None, tenant_id=None, user_id=None, connection_pool=False, session=None, auth=None, api_version=None, direct_use=True, logger=None, **kwargs) Bases:
object
Top-level object to access the OpenStack Compute API.
Warning
All scripts and projects should not initialize this class directly. It should be done via novaclient.client.Client interface.
Initialization of Client object.
Parameters: - username (str) – Username
- api_key (str) – API Key
- project_id (str) – Project ID
- auth_url (str) – Auth URL
- insecure (bool) – Allow insecure
- timeout (float) – API timeout, None or 0 disables
- proxy_tenant_id (str) – Tenant ID
- proxy_token (str) – Proxy Token
- region_name (str) – Region Name
- endpoint_type (str) – Endpoint Type
- extensions (str) – Extensions
- service_type (str) – Service Type
- service_name (str) – Service Name
- volume_service_name (str) – Volume Service Name
- timings (bool) – Timings
- bypass_url (str) – Bypass URL
- os_cache (bool) – OS cache
- no_cache (bool) – No cache
- http_log_debug (bool) – Enable debugging for HTTP connections
- auth_system (str) – Auth system
- auth_plugin (str) – Auth plugin
- auth_token (str) – Auth token
- cacert (str) – cacert
- tenant_id (str) – Tenant ID
- user_id (str) – User ID
- connection_pool (bool) – Use a connection pool
- session (str) – Session
- auth (str) – Auth
- api_version (novaclient.api_versions.APIVersion) – Compute API version
- direct_use – Inner variable of novaclient. Do not use it outside novaclient. It’s restricted.
- logger – Logger
-
api_version
-
authenticate
(*args, **kwargs) Authenticate against the server.
Normally this is called automatically when you first access the API, but you can call this method to force authentication right now.
Returns on success; raises
exceptions.Unauthorized
if the credentials are wrong.
-
get_timings
()
-
has_neutron
() Check the service catalog to figure out if we have neutron.
This is an intermediary solution for the window of time where we still have nova-network support in the client, but we expect most people have neutron. This ensures that if they have neutron we understand, we talk to it, if they don’t, we fail back to nova proxies.
-
reset_timings
()
-
set_management_url
(*args, **kwargs)