Skip to content

Commit

Permalink
Renamed argument for create_consumer[s]
Browse files Browse the repository at this point in the history
Now that we don't have explicit dispatcher class to pass into RPC layer,
and we pass a list of endpoints instead, fix names for corresponding
arguments of the functions.

blueprint oslo-messaging

Change-Id: I84c6428574c155cdfaf535210b236c58604de268
  • Loading branch information
booxter committed Jun 19, 2014
1 parent 159bb1b commit c3ba2ea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions neutron/agent/rpc.py
Expand Up @@ -27,10 +27,10 @@
LOG = logging.getLogger(__name__)


def create_consumers(dispatcher, prefix, topic_details):
def create_consumers(endpoints, prefix, topic_details):
"""Create agent RPC consumers.
:param dispatcher: The dispatcher to process the incoming messages.
:param endpoints: The list of endpoints to process the incoming messages.
:param prefix: Common prefix for the plugin/agent message queues.
:param topic_details: A list of topics. Each topic has a name, an
operation, and an optional host param keying the
Expand All @@ -45,11 +45,11 @@ def create_consumers(dispatcher, prefix, topic_details):
itertools.chain(details, [None]), 3)

topic_name = topics.get_topic_name(prefix, topic, operation)
connection.create_consumer(topic_name, dispatcher, fanout=True)
connection.create_consumer(topic_name, endpoints, fanout=True)
if node_name:
node_topic_name = '%s.%s' % (topic_name, node_name)
connection.create_consumer(node_topic_name,
dispatcher,
endpoints,
fanout=False)
connection.consume_in_threads()
return connection
Expand Down
4 changes: 2 additions & 2 deletions neutron/common/rpc_compat.py
Expand Up @@ -142,10 +142,10 @@ def __init__(self):
super(Connection, self).__init__()
self.servers = []

def create_consumer(self, topic, proxy, fanout=False):
def create_consumer(self, topic, endpoints, fanout=False):
target = messaging.Target(
topic=topic, server=cfg.CONF.host, fanout=fanout)
server = n_rpc.get_server(target, proxy)
server = n_rpc.get_server(target, endpoints)
self.servers.append(server)

def consume_in_threads(self):
Expand Down

0 comments on commit c3ba2ea

Please sign in to comment.