]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Renamed argument for create_consumer[s]
authorIhar Hrachyshka <ihrachys@redhat.com>
Mon, 9 Jun 2014 12:42:25 +0000 (14:42 +0200)
committerIhar Hrachyshka <ihrachys@redhat.com>
Thu, 19 Jun 2014 10:58:01 +0000 (12:58 +0200)
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

neutron/agent/rpc.py
neutron/common/rpc_compat.py

index 62b6860c410c17f23d25fd58e6325c1a7aca62c2..1b2533f20643e2e16ac3fbd6653ca46936301e8f 100644 (file)
@@ -27,10 +27,10 @@ from neutron.openstack.common import timeutils
 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
@@ -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
index 45588d9bcf3ea080a43dddb43ddd4c7fc580d1a0..697c72a5a88475621bb263f88ce6b019959fcea8 100644 (file)
@@ -142,10 +142,10 @@ class Connection(object):
         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):