# ironicclient.common.http module

class ironicclient.common.http.SessionClient(os_ironic_api_version: str | list[str], api_version_select_state: str, max_retries: int | None, retry_interval: int | None, **kwargs: Any)

  Bases: `VersionNegotiationMixin`, `LegacyJsonAdapter`

  HTTP client based on Keystone client session.

  json_request(method: str, url: str, **kwargs: Any) → tuple[Response, dict[str, Any] | list[Any] | bytes | None]
  raw_request(method: str, url: str, **kwargs: dict[str, str]) → Response

class ironicclient.common.http.VersionNegotiationMixin

  Bases: `object`

  api_version_select_state: str
  negotiate_version(conn: Session, resp: Response | None) → str

    Negotiate the server version

    Assumption: Called after receiving a 406 error when doing a request.

    Parameters:

      - conn – A connection object

      - resp – The response object from http request

  os_ironic_api_version: str | list[str]

ironicclient.common.http.get_server(url: str | None) → tuple[str | None, str | None]

  Extract and return the server & port.

ironicclient.common.http.with_retries(func: Callable[[...], _RT]) → Callable[[...], _RT]

  Wrapper for _http_request adding support for retries.

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