Client(api_version=None, auth=None, auth_token=None, auth_url=None, cacert=None, cert=None, direct_use=True, endpoint_override=None, endpoint_type='publicURL', extensions=None, http_log_debug=False, insecure=False, logger=None, os_cache=False, password=None, project_domain_id=None, project_domain_name=None, project_id=None, project_name=None, region_name=None, service_name=None, service_type='compute', session=None, timeout=None, timings=False, user_domain_id=None, user_domain_name=None, user_id=None, username=None, **kwargs)
Top-level object to access the OpenStack Compute API.
All scripts and projects should not initialize this class directly. It should be done via novaclient.client.Client interface.
Initialization of Client object.
- api_version (novaclient.api_versions.APIVersion) – Compute API version
- auth (str) – Auth
- auth_token (str) – Auth token
- auth_url (str) – Auth URL
- cacert (str) – ca-certificate
- cert (str) – certificate
- direct_use (bool) – Inner variable of novaclient. Do not use it outside novaclient. It’s restricted.
- endpoint_override (str) – Bypass URL
- endpoint_type (str) – Endpoint Type
- extensions (str) – Extensions
- http_log_debug (bool) – Enable debugging for HTTP connections
- insecure (bool) – Allow insecure
- logger (logging.Logger) – Logger instance to be used for all logging stuff
- password (str) – User password
- os_cache (bool) – OS cache
- project_domain_id (str) – ID of project domain
- project_domain_name (str) – Name of project domain
- project_id (str) – Project/Tenant ID
- project_name (str) – Project/Tenant name
- region_name (str) – Region Name
- service_name (str) – Service Name
- service_type (str) – Service Type
- session (str) – Session
- timeout (float) – API timeout, None or 0 disables
- timings (bool) – Timings
- user_domain_id (str) – ID of user domain
- user_domain_name (str) – Name of user domain
- user_id (str) – User ID
- username (str) – Username
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.Unauthorizedif the credentials are wrong.
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.