diff options
author | Eric Windisch <eric@cloudscaling.com> | 2013-02-01 10:30:28 -0500 |
---|---|---|
committer | Eric Windisch <eric@cloudscaling.com> | 2013-02-01 10:39:00 -0500 |
commit | 9fd64373fd07ac63e2674374054160d3bead54b7 (patch) | |
tree | 7124280726e2bc661697bca18a2a54e7f72a1d18 /openstack/common/rpc/matchmaker.py | |
parent | c29263c4a81d2e71a3d6e36eb32e5df9d2c8fb05 (diff) | |
download | oslo-9fd64373fd07ac63e2674374054160d3bead54b7.tar.gz oslo-9fd64373fd07ac63e2674374054160d3bead54b7.tar.xz oslo-9fd64373fd07ac63e2674374054160d3bead54b7.zip |
Exchanges should return directed topics.
Exchanges in the matchmaker are supposed
to return a directed topic as the first
element in returned tuples.
Adds a test to ensure this is so.
Change-Id: I6c62f325914faa19216d5362c6d8ed0288942110
Diffstat (limited to 'openstack/common/rpc/matchmaker.py')
-rw-r--r-- | openstack/common/rpc/matchmaker.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/openstack/common/rpc/matchmaker.py b/openstack/common/rpc/matchmaker.py index 48270ba..d68799b 100644 --- a/openstack/common/rpc/matchmaker.py +++ b/openstack/common/rpc/matchmaker.py @@ -211,14 +211,14 @@ class LocalhostExchange(Exchange): class DirectExchange(Exchange): """ Exchange where all topic keys are split, sending to second half. - i.e. "compute.host" sends a message to "compute" running on "host" + i.e. "compute.host" sends a message to "compute.host" running on "host" """ def __init__(self): super(Exchange, self).__init__() def run(self, key): - b, e = key.split('.', 1) - return [(b, e)] + e = key.split('.', 1)[1] + return [(key, e)] class MatchMakerRing(MatchMakerBase): |