Previous topic

The cinder.openstack.common.rpc.impl_zmq Module

Next topic

The cinder.openstack.common.rpc.proxy Module

This Page

Psst... hey. You're reading the latest content, but it might be out of sync with code. You can read Cinder 2011.2 docs or all OpenStack docs too.

The cinder.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 Binding

Bases: object

A binding on which to perform a lookup.

test(key)
class DirectBinding

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

test(key)
class DirectExchange

Bases: cinder.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” running on “host”

run(key)
class Exchange

Bases: object

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

run(key)
class FanoutBinding

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

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

test(key)
class FanoutRingExchange(ring=None)

Bases: cinder.openstack.common.rpc.matchmaker.RingExchange

Fanout Exchange based on a hashmap.

run(key)
class LocalhostExchange

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

Exchange where all direct topics are local.

run(key)
class MatchMakerBase

Bases: object

Match Maker Base Class.

add_binding(binding, rule, last=True)
queues(key)
exception MatchMakerException

Bases: exceptions.Exception

Signified a match could not be found.

message = u'Match not found by MatchMaker.'
class MatchMakerLocalhost

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

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

class MatchMakerRing(ring=None)

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

Match Maker where hosts are loaded from a static hashmap.

class MatchMakerStub

Bases: cinder.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 RingExchange(ring=None)

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

Match Maker where hosts are loaded from a static file containing a hashmap (JSON formatted).

__init__ takes optional ring dictionary argument, otherwise loads the ringfile from CONF.mathcmaker_ringfile.

class RoundRobinRingExchange(ring=None)

Bases: cinder.openstack.common.rpc.matchmaker.RingExchange

A Topic Exchange based on a hashmap.

run(key)
class StubExchange

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

Exchange that does nothing.

run(key)
class TopicBinding

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

test(key)