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

Shared code between AMQP based openstack.common.rpc implementations.

The code in this module is shared between the rpc implemenations based on AMQP. Specifically, this includes impl_kombu and impl_qpid. impl_carrot also uses AMQP, but is deprecated and predates this code.

class openstack_dashboard.openstack.common.rpc.amqp.CallbackWrapper(conf, callback, connection_pool)[source]

Bases: openstack_dashboard.openstack.common.rpc.amqp._ThreadPoolWithWait

Wraps a straight callback to allow it to be invoked in a green thread.

class openstack_dashboard.openstack.common.rpc.amqp.ConnectionContext(conf, connection_pool, pooled=True, server_params=None)[source]

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

The class that is actually returned to the caller of create_connection(). This is essentially a wrapper around Connection that supports ‘with’. It can also return a new Connection, or one from a pool. The function will also catch when an instance of this class is to be deleted. With that we can return Connections to the pool on exceptions and so forth without making the caller be responsible for catching them. If possible the function makes sure to return a connection to the pool.

ConnectionContext.close()[source]

Caller is done with this connection.

ConnectionContext.consume_in_thread()[source]
ConnectionContext.create_consumer(topic, proxy, fanout=False)[source]
ConnectionContext.create_worker(topic, proxy, pool_name)[source]
ConnectionContext.join_consumer_pool(callback, pool_name, topic, exchange_name)[source]
class openstack_dashboard.openstack.common.rpc.amqp.MulticallProxyWaiter(conf, msg_id, timeout, connection_pool)[source]

Bases: object

MulticallProxyWaiter.done()[source]
MulticallProxyWaiter.put(data)[source]
class openstack_dashboard.openstack.common.rpc.amqp.MulticallWaiter(conf, connection, timeout)[source]

Bases: object

MulticallWaiter.done()[source]
class openstack_dashboard.openstack.common.rpc.amqp.Pool(conf, connection_cls, *args, **kwargs)[source]

Bases: eventlet.pools.Pool

Class that implements a Pool of Connections.

Pool.create()[source]
Pool.empty()[source]
class openstack_dashboard.openstack.common.rpc.amqp.ProxyCallback(conf, proxy, connection_pool)[source]

Bases: openstack_dashboard.openstack.common.rpc.amqp._ThreadPoolWithWait

Calls methods on a proxy object based on method and args.

class openstack_dashboard.openstack.common.rpc.amqp.ReplyProxy(conf, connection_pool)[source]

Bases: openstack_dashboard.openstack.common.rpc.amqp.ConnectionContext

Connection class for RPC replies / callbacks.

ReplyProxy.add_call_waiter(waiter, msg_id)[source]
ReplyProxy.del_call_waiter(msg_id)[source]
ReplyProxy.get_reply_q()[source]
class openstack_dashboard.openstack.common.rpc.amqp.RpcContext(**kwargs)[source]

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

Context that supports replying to a rpc.call.

RpcContext.deepcopy()[source]
RpcContext.reply(reply=None, failure=None, ending=False, connection_pool=None, log_failure=True)[source]
openstack_dashboard.openstack.common.rpc.amqp.call(conf, context, topic, msg, timeout, connection_pool)[source]

Sends a message on a topic and wait for a response.

openstack_dashboard.openstack.common.rpc.amqp.cast(conf, context, topic, msg, connection_pool)[source]

Sends a message on a topic without waiting for a response.

openstack_dashboard.openstack.common.rpc.amqp.cast_to_server(conf, context, server_params, topic, msg, connection_pool)[source]

Sends a message on a topic to a specific server.

openstack_dashboard.openstack.common.rpc.amqp.cleanup(connection_pool)[source]
openstack_dashboard.openstack.common.rpc.amqp.create_connection(conf, new, connection_pool)[source]

Create a connection.

openstack_dashboard.openstack.common.rpc.amqp.fanout_cast(conf, context, topic, msg, connection_pool)[source]

Sends a message on a fanout exchange without waiting for a response.

openstack_dashboard.openstack.common.rpc.amqp.fanout_cast_to_server(conf, context, server_params, topic, msg, connection_pool)[source]

Sends a message on a fanout exchange to a specific server.

openstack_dashboard.openstack.common.rpc.amqp.get_connection_pool(conf, connection_cls)[source]
openstack_dashboard.openstack.common.rpc.amqp.get_control_exchange(conf)[source]
openstack_dashboard.openstack.common.rpc.amqp.msg_reply(conf, msg_id, reply_q, connection_pool, reply=None, failure=None, ending=False, log_failure=True)[source]

Sends a reply or an error on the channel signified by msg_id.

Failure should be a sys.exc_info() tuple.

openstack_dashboard.openstack.common.rpc.amqp.multicall(conf, context, topic, msg, timeout, connection_pool)[source]

Make a call that returns multiple times.

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

Sends a notification event on a topic.

openstack_dashboard.openstack.common.rpc.amqp.pack_context(msg, context)[source]

Pack context into msg.

Values for message keys need to be less than 255 chars, so we pull context out into a bunch of separate keys. If we want to support more arguments in rabbit messages, we may want to do the same for args at some point.

openstack_dashboard.openstack.common.rpc.amqp.unpack_context(conf, msg)[source]

Unpack context from msg.

Previous topic

The openstack_dashboard.openstack.common.rpc.zmq_receiver Module

Next topic

The openstack_dashboard.openstack.common.rpc.impl_fake Module

This Page