The openstack_dashboard.openstack.common.rpc.impl_zmq ModuleΒΆ

class openstack_dashboard.openstack.common.rpc.impl_zmq.Connection(conf)[source]

Bases: openstack_dashboard.openstack.common.rpc.common.Connection

Manages connections and threads.

Connection.close()[source]
Connection.consume_in_thread()[source]
Connection.create_consumer(topic, proxy, fanout=False)[source]
Connection.wait()[source]
class openstack_dashboard.openstack.common.rpc.impl_zmq.ConsumerBase[source]

Bases: object

Base Consumer.

classmethod ConsumerBase.normalize_reply(result, replies)[source]
ConsumerBase.process(proxy, ctx, data)[source]
class openstack_dashboard.openstack.common.rpc.impl_zmq.InternalContext(proxy)[source]

Bases: object

Used by ConsumerBase as a private context for - methods.

InternalContext.reply(ctx, proxy, msg_id=None, context=None, topic=None, msg=None)[source]

Reply to a casted call.

class openstack_dashboard.openstack.common.rpc.impl_zmq.RpcContext(**kwargs)[source]

Bases: openstack_dashboard.openstack.common.rpc.common.CommonRpcContext

Context that supports replying to a rpc.call.

RpcContext.deepcopy()[source]
classmethod RpcContext.marshal(ctx)[source]
RpcContext.reply(reply=None, failure=None, ending=False)[source]
classmethod RpcContext.unmarshal(data)[source]
class openstack_dashboard.openstack.common.rpc.impl_zmq.ZmqBaseReactor(conf)[source]

Bases: openstack_dashboard.openstack.common.rpc.impl_zmq.ConsumerBase

A consumer class implementing a centralized casting broker (PULL-PUSH) for RoundRobin requests.

ZmqBaseReactor.close()[source]
ZmqBaseReactor.consume_in_thread()[source]
ZmqBaseReactor.register(proxy, in_addr, zmq_type_in, out_addr=None, zmq_type_out=None, in_bind=True, out_bind=True, subscribe=None)[source]
ZmqBaseReactor.wait()[source]
class openstack_dashboard.openstack.common.rpc.impl_zmq.ZmqClient(addr, socket_type=None, bind=False)[source]

Bases: object

Client for ZMQ sockets.

ZmqClient.cast(msg_id, topic, data, envelope=False)[source]
ZmqClient.close()[source]
class openstack_dashboard.openstack.common.rpc.impl_zmq.ZmqProxy(conf)[source]

Bases: openstack_dashboard.openstack.common.rpc.impl_zmq.ZmqBaseReactor

A consumer class implementing a topic-based proxy, forwarding to IPC sockets.

ZmqProxy.consume(sock)[source]
ZmqProxy.consume_in_thread()[source]

Runs the ZmqProxy service.

class openstack_dashboard.openstack.common.rpc.impl_zmq.ZmqReactor(conf)[source]

Bases: openstack_dashboard.openstack.common.rpc.impl_zmq.ZmqBaseReactor

A consumer class implementing a consumer for messages. Can also be used as a 1:1 proxy

ZmqReactor.consume(sock)[source]
class openstack_dashboard.openstack.common.rpc.impl_zmq.ZmqSocket(addr, zmq_type, bind=True, subscribe=None)[source]

Bases: object

A tiny wrapper around ZeroMQ to simplify the send/recv protocol and connection management.

Can be used as a Context (supports the ‘with’ statement).

ZmqSocket.close()[source]
ZmqSocket.recv(**kwargs)[source]
ZmqSocket.send(data, **kwargs)[source]
ZmqSocket.socket_s()[source]

Get socket type as string.

ZmqSocket.subscribe(msg_filter)[source]

Subscribe.

ZmqSocket.unsubscribe(msg_filter)[source]

Unsubscribe.

openstack_dashboard.openstack.common.rpc.impl_zmq.call(conf, *args, **kwargs)[source]

Send a message, expect a response.

openstack_dashboard.openstack.common.rpc.impl_zmq.cast(conf, *args, **kwargs)[source]

Send a message expecting no reply.

openstack_dashboard.openstack.common.rpc.impl_zmq.cleanup()[source]

Clean up resources in use by implementation.

openstack_dashboard.openstack.common.rpc.impl_zmq.create_connection(conf, new=True)[source]
openstack_dashboard.openstack.common.rpc.impl_zmq.fanout_cast(conf, context, topic, msg, **kwargs)[source]

Send a message to all listening and expect no reply.

openstack_dashboard.openstack.common.rpc.impl_zmq.multicall(conf, *args, **kwargs)[source]

Multiple calls.

openstack_dashboard.openstack.common.rpc.impl_zmq.notify(conf, context, topic, msg, envelope)[source]

Send notification event. Notifications are sent to topic-priority. This differs from the AMQP drivers which send to topic.priority.

openstack_dashboard.openstack.common.rpc.impl_zmq.unflatten_envelope(packenv)[source]

Unflattens the RPC envelope. Takes a list and returns a dictionary. i.e. [1,2,3,4] => {1: 2, 3: 4}

Previous topic

The openstack_dashboard.openstack.common.rpc.impl_fake Module

Next topic

The openstack_dashboard.openstack.common.rpc.impl_kombu Module

This Page