diff options
| author | Russell Bryant <rbryant@redhat.com> | 2012-11-08 10:52:37 -0500 |
|---|---|---|
| committer | Russell Bryant <rbryant@redhat.com> | 2012-11-08 10:53:43 -0500 |
| commit | 46d7a40413373d0c150b48004884ce33227b4d7e (patch) | |
| tree | 06a4cbbf28499c4bd7740482936061071b79283a /nova/openstack | |
| parent | 53edd1ef81820f948ed2ba4818667836be50d0ea (diff) | |
| download | nova-46d7a40413373d0c150b48004884ce33227b4d7e.tar.gz nova-46d7a40413373d0c150b48004884ce33227b4d7e.tar.xz nova-46d7a40413373d0c150b48004884ce33227b4d7e.zip | |
Sync rpc from openstack-common.
Change-Id: I49771b9bb741f95ccc3ab0e8e8f7ce82849120e2
Diffstat (limited to 'nova/openstack')
| -rw-r--r-- | nova/openstack/common/rpc/__init__.py | 2 | ||||
| -rw-r--r-- | nova/openstack/common/rpc/impl_kombu.py | 5 | ||||
| -rw-r--r-- | nova/openstack/common/rpc/impl_zmq.py | 2 |
3 files changed, 5 insertions, 4 deletions
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.<host>' topic are sent to the nova-foo service on <host>. """ - 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 |
