The ceilometer.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 ceilometer.openstack.common.rpc.amqp.CallbackWrapper(conf, callback, connection_pool)[source]

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

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

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

Bases: ceilometer.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.

close()[source]

Caller is done with this connection.

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

Bases: object

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

Bases: object

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

Bases: eventlet.pools.Pool

Class that implements a Pool of Connections.

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

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

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

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

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

Connection class for RPC replies / callbacks

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

Bases: ceilometer.openstack.common.rpc.common.CommonRpcContext

Context that supports replying to a rpc.call

deepcopy()[source]
reply(reply=None, failure=None, ending=False, connection_pool=None, log_failure=True)[source]

Previous topic

The ceilometer.openstack.common.policy Module

Next topic

The ceilometer.openstack.common.rpc.common Module

This Page