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

The MatchMaker classes should except a Topic or Fanout exchange key and return keys for direct exchanges, per (approximate) AMQP parlance.

class openstack_dashboard.openstack.common.rpc.matchmaker.Binding[source]

Bases: object

A binding on which to perform a lookup.

Binding.test(key)[source]
class openstack_dashboard.openstack.common.rpc.matchmaker.DirectBinding[source]

Bases: openstack_dashboard.openstack.common.rpc.matchmaker.Binding

Specifies a host in the key via a ‘.’ character Although dots are used in the key, the behavior here is that it maps directly to a host, thus direct.

DirectBinding.test(key)[source]
class openstack_dashboard.openstack.common.rpc.matchmaker.DirectExchange[source]

Bases: openstack_dashboard.openstack.common.rpc.matchmaker.Exchange

Exchange where all topic keys are split, sending to second half. i.e. “compute.host” sends a message to “compute.host” running on “host”

DirectExchange.run(key)[source]
class openstack_dashboard.openstack.common.rpc.matchmaker.Exchange[source]

Bases: object

Implements lookups. Subclass this to support hashtables, dns, etc.

Exchange.run(key)[source]
class openstack_dashboard.openstack.common.rpc.matchmaker.FanoutBinding[source]

Bases: openstack_dashboard.openstack.common.rpc.matchmaker.Binding

Match on fanout keys, where key starts with ‘fanout.’ string.

FanoutBinding.test(key)[source]
class openstack_dashboard.openstack.common.rpc.matchmaker.HeartbeatMatchMakerBase[source]

Bases: openstack_dashboard.openstack.common.rpc.matchmaker.MatchMakerBase

Base for a heart-beat capable MatchMaker. Provides common methods for registering, unregistering, and maintaining heartbeats.

HeartbeatMatchMakerBase.ack_alive(key, host)[source]

Acknowledge that a host.topic is alive. Used internally for updating heartbeats, but may also be used publicly to acknowledge a system is alive (i.e. rpc message successfully sent to host)

HeartbeatMatchMakerBase.backend_register(key, host)[source]

Implements registration logic. Called by register(self,key,host)

HeartbeatMatchMakerBase.backend_unregister(key, key_host)[source]

Implements de-registration logic. Called by unregister(self,key,host)

HeartbeatMatchMakerBase.register(key, host)[source]

Register a host on a backend. Heartbeats, if applicable, may keepalive registration.

HeartbeatMatchMakerBase.send_heartbeats()[source]

Send all heartbeats. Use start_heartbeat to spawn a heartbeat greenthread, which loops this method.

HeartbeatMatchMakerBase.start_heartbeat()[source]

Implementation of MatchMakerBase.start_heartbeat Launches greenthread looping send_heartbeats(), yielding for CONF.matchmaker_heartbeat_freq seconds between iterations.

HeartbeatMatchMakerBase.stop_heartbeat()[source]

Destroys the heartbeat greenthread.

HeartbeatMatchMakerBase.unregister(key, host)[source]

Unregister a topic.

class openstack_dashboard.openstack.common.rpc.matchmaker.LocalhostExchange(host='localhost')[source]

Bases: openstack_dashboard.openstack.common.rpc.matchmaker.Exchange

Exchange where all direct topics are local.

LocalhostExchange.run(key)[source]
class openstack_dashboard.openstack.common.rpc.matchmaker.MatchMakerBase[source]

Bases: object

Match Maker Base Class. Build off HeartbeatMatchMakerBase if building a heartbeat-capable MatchMaker.

MatchMakerBase.ack_alive(key, host)[source]

Acknowledge that a key.host is alive. Used internally for updating heartbeats, but may also be used publicly to acknowledge a system is alive (i.e. rpc message successfully sent to host)

MatchMakerBase.add_binding(binding, rule, last=True)[source]
MatchMakerBase.expire(topic, host)[source]

Explicitly expire a host’s registration.

MatchMakerBase.is_alive(topic, host)[source]

Checks if a host is alive.

MatchMakerBase.queues(key)[source]
MatchMakerBase.register(key, host)[source]

Register a host on a backend. Heartbeats, if applicable, may keepalive registration.

MatchMakerBase.send_heartbeats()[source]

Send all heartbeats. Use start_heartbeat to spawn a heartbeat greenthread, which loops this method.

MatchMakerBase.start_heartbeat()[source]

Spawn heartbeat greenthread.

MatchMakerBase.stop_heartbeat()[source]

Destroys the heartbeat greenthread.

MatchMakerBase.unregister(key, host)[source]

Unregister a topic.

exception openstack_dashboard.openstack.common.rpc.matchmaker.MatchMakerException[source]

Bases: exceptions.Exception

Signified a match could not be found.

MatchMakerException.message = u'Match not found by MatchMaker.'
class openstack_dashboard.openstack.common.rpc.matchmaker.MatchMakerLocalhost(host='localhost')[source]

Bases: openstack_dashboard.openstack.common.rpc.matchmaker.MatchMakerBase

Match Maker where all bare topics resolve to localhost. Useful for testing.

class openstack_dashboard.openstack.common.rpc.matchmaker.MatchMakerStub[source]

Bases: openstack_dashboard.openstack.common.rpc.matchmaker.MatchMakerBase

Match Maker where topics are untouched. Useful for testing, or for AMQP/brokered queues. Will not work where knowledge of hosts is known (i.e. zeromq)

class openstack_dashboard.openstack.common.rpc.matchmaker.StubExchange[source]

Bases: openstack_dashboard.openstack.common.rpc.matchmaker.Exchange

Exchange that does nothing.

StubExchange.run(key)[source]
class openstack_dashboard.openstack.common.rpc.matchmaker.TopicBinding[source]

Bases: openstack_dashboard.openstack.common.rpc.matchmaker.Binding

Where a ‘bare’ key without dots. AMQP generally considers topic exchanges to be those with dots, but we deviate here in terminology as the behavior here matches that of a topic exchange (whereas where there are dots, behavior matches that of a direct exchange.

TopicBinding.test(key)[source]

Previous topic

The openstack_dashboard.openstack.common.config Module

Next topic

The openstack_dashboard.openstack.common.rpc.matchmaker_redis Module

This Page