# ironicclient.client module

ironicclient.client.Client(version: str, endpoint_override: str | None = None, session: Session | None = None, *args: Any, **kwargs: Any) → Client

  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: str, auth_type: str | None = None, os_ironic_api_version: str | None = None, max_retries: int | None = None, retry_interval: int | None = None, session: Session | None = None, valid_interfaces: str | list[str] | None = None, interface: str | list[str] | None = None, service_type: str | None = None, region_name: str | None = None, additional_headers: dict[str, str] | None = None, global_request_id: str | None = None, **kwargs: Any) → Client

  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.

this page last updated: 2026-07-16 03:09:15

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