ironicclient.common.http module

class ironicclient.common.http.SessionClient(os_ironic_api_version, api_version_select_state, max_retries, retry_interval, **kwargs)[source]

Bases: ironicclient.common.http.VersionNegotiationMixin, keystoneauth1.adapter.LegacyJsonAdapter

HTTP client based on Keystone client session.

json_request(method, url, **kwargs)[source]
raw_request(method, url, **kwargs)[source]
class ironicclient.common.http.VersionNegotiationMixin[source]

Bases: object

negotiate_version(conn, resp)[source]

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

ironicclient.common.http.get_server(url)[source]

Extract and return the server & port.

ironicclient.common.http.with_retries(func)[source]

Wrapper for _http_request adding support for retries.