From 46d7a40413373d0c150b48004884ce33227b4d7e Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Thu, 8 Nov 2012 10:52:37 -0500 Subject: Sync rpc from openstack-common. Change-Id: I49771b9bb741f95ccc3ab0e8e8f7ce82849120e2 --- nova/openstack/common/rpc/__init__.py | 2 +- nova/openstack/common/rpc/impl_kombu.py | 5 +++-- nova/openstack/common/rpc/impl_zmq.py | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) (limited to 'nova/openstack') diff --git a/nova/openstack/common/rpc/__init__.py b/nova/openstack/common/rpc/__init__.py index 0f82c47a2..bf2b2e9e0 100644 --- a/nova/openstack/common/rpc/__init__.py +++ b/nova/openstack/common/rpc/__init__.py @@ -250,7 +250,7 @@ def queue_get_for(context, topic, host): Messages sent to the 'foo.' topic are sent to the nova-foo service on . """ - return '%s.%s' % (topic, host) + return '%s.%s' % (topic, host) if host else topic _RPCIMPL = None diff --git a/nova/openstack/common/rpc/impl_kombu.py b/nova/openstack/common/rpc/impl_kombu.py index 7b16e0e19..46295d90f 100644 --- a/nova/openstack/common/rpc/impl_kombu.py +++ b/nova/openstack/common/rpc/impl_kombu.py @@ -31,9 +31,9 @@ import kombu.messaging from nova.openstack.common import cfg from nova.openstack.common.gettextutils import _ +from nova.openstack.common import network_utils from nova.openstack.common.rpc import amqp as rpc_amqp from nova.openstack.common.rpc import common as rpc_common -from nova.openstack.common import network_utils kombu_opts = [ cfg.StrOpt('kombu_ssl_version', @@ -267,6 +267,7 @@ class FanoutConsumer(ConsumerBase): # Default options options = {'durable': False, + 'queue_arguments': _get_queue_arguments(conf), 'auto_delete': True, 'exclusive': True} options.update(kwargs) @@ -776,7 +777,7 @@ def cast_to_server(conf, context, server_params, topic, msg): def fanout_cast_to_server(conf, context, server_params, topic, msg): """Sends a message on a fanout exchange to a specific server.""" - return rpc_amqp.cast_to_server( + return rpc_amqp.fanout_cast_to_server( conf, context, server_params, topic, msg, rpc_amqp.get_connection_pool(conf, Connection)) diff --git a/nova/openstack/common/rpc/impl_zmq.py b/nova/openstack/common/rpc/impl_zmq.py index 4ffb1ae69..0daf07cf4 100644 --- a/nova/openstack/common/rpc/impl_zmq.py +++ b/nova/openstack/common/rpc/impl_zmq.py @@ -546,7 +546,7 @@ def _call(addr, context, msg_id, topic, msg, timeout=None): timeout = timeout or CONF.rpc_response_timeout # The msg_id is used to track replies. - msg_id = str(uuid.uuid4().hex) + msg_id = uuid.uuid4().hex # Replies always come into the reply service. reply_topic = "zmq_replies.%s" % CONF.rpc_zmq_host -- cgit