ironicclient.client module

ironicclient.client module

ironicclient.client.Client(version, endpoint_override=None, session=None, *args, **kwargs)[source]

Create a client of an appropriate version.

This call requires a session. If you want it to be created, use get_client instead.

Parameters:
  • endpoint_override – A bare metal endpoint to use.

  • session – A keystoneauth session to use. This argument is actually required and is marked optional only for backward compatibility.

  • args – Other arguments to pass to the HTTP client. Not recommended, use kwargs instead.

  • kwargs – Other keyword arguments to pass to the HTTP client (e.g. insecure).

ironicclient.client.get_client(api_version, auth_type=None, os_ironic_api_version=None, max_retries=None, retry_interval=None, session=None, valid_interfaces=None, interface=None, service_type=None, region_name=None, additional_headers=None, global_request_id=None, **kwargs)[source]

Get an authenticated client, based on the credentials.

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

  • auth_type – type of keystoneauth auth plugin loader to use.

  • os_ironic_api_version – ironic 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 – An existing keystoneauth session. Will be created from kwargs if not provided.

  • valid_interfaces – List of valid endpoint interfaces to use if the bare metal endpoint is not provided.

  • interface – An alias for valid_interfaces.

  • service_type – Bare metal endpoint service type.

  • region_name – Name of the region to use when searching the bare metal endpoint.

  • additional_headers – Additional headers that should be attached to every request passing through the client. Headers of the same name specified per request will take priority.

  • global_request_id – A header (in the form of req-$uuid) that will be passed on all requests. Enables cross project request id tracking.

  • kwargs – all the other params that are passed to keystoneauth for session construction.

Creative Commons Attribution 3.0 License

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