# watcherclient.client module

watcherclient.client.Client(version, *args, **kwargs)

  Initialize client object based on given version.

  HOW-TO: The simplest way to create a client instance is initialization with your credentials:

      >>> from watcherclient import client
      >>> watcher = client.Client(VERSION, USERNAME, PASSWORD,
      ...                      PROJECT_ID, AUTH_URL)

  Here `VERSION` can be a string or `watcherclient.api_versions.APIVersion` obj. If you prefer string value, you can use `1` or `1.X` (where X is a microversion).

  Alternatively, you can create a client instance using the keystoneauth session API. See “The watcherclient Python API” page at python-watcherclient’s doc.

watcherclient.client.get_client(api_version, os_auth_token=None, watcher_url=None, os_username=None, os_password=None, os_auth_url=None, os_project_id=None, os_project_name=None, os_tenant_id=None, os_tenant_name=None, os_region_name=None, os_user_domain_id=None, os_user_domain_name=None, os_project_domain_id=None, os_project_domain_name=None, os_service_type=None, os_endpoint_type=None, insecure=None, timeout=None, os_cacert=None, ca_file=None, os_cert=None, cert_file=None, os_key=None, key_file=None, os_infra_optim_api_version=None, max_retries=None, retry_interval=None, session=None, os_endpoint_override=None, **ignored_kwargs)

  Get an authenticated client, based on the credentials.

  Parameters

    - api_version – the API version to use. Valid value: ‘1’.

    - os_auth_token – pre-existing token to re-use

    - watcher_url – watcher API endpoint

    - os_username – name of a user

    - os_password – user’s password

    - os_auth_url – endpoint to authenticate against

    - os_project_id – ID of a project

    - os_project_name – name of a project

    - os_tenant_id – ID of a tenant (deprecated in favour of os_project_id)

    - os_tenant_name – name of a tenant (deprecated in favour of os_project_name)

    - os_region_name – name of a keystone region

    - os_user_domain_id – ID of a domain the user belongs to

    - os_user_domain_name – name of a domain the user belongs to

    - os_project_domain_id – ID of a domain the project belongs to

    - os_project_domain_name – name of a domain the project belongs to

    - os_service_type – the type of service to lookup the endpoint for

    - os_endpoint_type – the type (exposure) of the endpoint

    - insecure – allow insecure SSL (no cert verification)

    - timeout – allows customization of the timeout for client HTTP requests

    - os_cacert – path to cacert file

    - ca_file – path to cacert file, deprecated in favour of os_cacert

    - os_cert – path to cert file

    - cert_file – path to cert file, deprecated in favour of os_cert

    - os_key – path to key file

    - key_file – path to key file, deprecated in favour of os_key

    - os_infra_optim_api_version – watcher API version to use

    - max_retries – Maximum number of retries in case of conflict error

    - retry_interval – Amount of time (in seconds) between retries in case of conflict error

    - session – Keystone session to use

    - os_endpoint_override – watcher API endpoint

    - ignored_kwargs – all the other params that are passed. Left for backwards compatibility. They are ignored.

this page last updated: 2021-12-01 21:05:37

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.

found an error? report a bug