Merge "make the DHCP agent use a unique queue name" into stable/folsom

This commit is contained in:
Jenkins 2012-12-17 03:22:25 +00:00 committed by Gerrit Code Review
commit b15099c78f
2 changed files with 4 additions and 0 deletions
quantum

@ -16,6 +16,7 @@
import logging
import eventlet
import uuid
from quantum.common import topics
@ -87,7 +88,9 @@ class NotificationDispatcher(object):
self.connection = rpc.create_connection(new=True)
topic = '%s.%s' % (rabbit_notifier.CONF.notification_topics[0],
api.CONF.default_notification_level.lower())
queue_name = 'notification_listener_%s' % str(uuid.uuid4())
self.connection.declare_topic_consumer(topic=topic,
queue_name=queue_name,
callback=self._add_to_queue)
self.connection.consume_in_thread()

@ -57,6 +57,7 @@ class AgentRPCNotificationDispatcher(unittest.TestCase):
expected = [
mock.call(new=True),
mock.call().declare_topic_consumer(topic='notifications.info',
queue_name=mock.ANY,
callback=nd._add_to_queue),
mock.call().consume_in_thread()
]