ironic_lib.json_rpc package


ironic_lib.json_rpc.client module

A simple JSON RPC client.

This client is compatible with any JSON RPC 2.0 implementation, including ours.

class ironic_lib.json_rpc.client.Client(serializer, version_cap=None)[source]

Bases: object

JSON RPC client with ironic exception handling.

allowed_exception_namespaces = ['ironic_lib.exception.', 'ironic.common.exception.', 'ironic_inspector.utils.']
prepare(topic, version=None)[source]

Prepare the client to transmit a request.

  • topic – Topic which is being addressed. Typically this is the hostname of the remote json-rpc service.

  • version – The RPC API version to utilize.

ironic_lib.json_rpc.server module

Implementation of JSON RPC for communication between API and conductors.

This module implementa a subset of JSON RPC 2.0 as defined in Main differences: * No support for batched requests. * No support for positional arguments passing. * No JSON RPC 1.0 fallback.

class ironic_lib.json_rpc.server.EmptyContext(src)[source]

Bases: object

request_id = None
exception ironic_lib.json_rpc.server.InvalidParams(message=None, **kwargs)[source]

Bases: JsonRpcError

code = -32602
exception ironic_lib.json_rpc.server.InvalidRequest(message=None, **kwargs)[source]

Bases: JsonRpcError

code = -32600
exception ironic_lib.json_rpc.server.JsonRpcError(message=None, **kwargs)[source]

Bases: IronicException

exception ironic_lib.json_rpc.server.MethodNotFound(message=None, **kwargs)[source]

Bases: JsonRpcError

code = -32601
exception ironic_lib.json_rpc.server.ParseError(message=None, **kwargs)[source]

Bases: JsonRpcError

code = -32700
class ironic_lib.json_rpc.server.WSGIService(manager, serializer, context_class=<class 'ironic_lib.json_rpc.server.EmptyContext'>)[source]

Bases: WSGIService

Provides ability to launch JSON RPC as a WSGI application.

Module contents