From 9fd64373fd07ac63e2674374054160d3bead54b7 Mon Sep 17 00:00:00 2001 From: Eric Windisch Date: Fri, 1 Feb 2013 10:30:28 -0500 Subject: 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 --- openstack/common/rpc/matchmaker.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'openstack/common/rpc/matchmaker.py') 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): -- cgit