From 4ef495ec0821bf1508b9305423de70ba87216552 Mon Sep 17 00:00:00 2001 From: Eric Windisch Date: Thu, 10 Jan 2013 11:41:26 -0500 Subject: call() to accept serialize and force_envelope The serialize and force_envelope options were being stripped from call(). Now, when call() is invoked, these options are passed and respected. Change-Id: I69355606b06ab2ec87765fe6ddba7baaa68e5754 --- openstack/common/rpc/impl_zmq.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'openstack') diff --git a/openstack/common/rpc/impl_zmq.py b/openstack/common/rpc/impl_zmq.py index c147b27..725f34b 100644 --- a/openstack/common/rpc/impl_zmq.py +++ b/openstack/common/rpc/impl_zmq.py @@ -551,7 +551,8 @@ def _cast(addr, context, msg_id, topic, msg, timeout=None, serialize=True, conn.close() -def _call(addr, context, msg_id, topic, msg, timeout=None): +def _call(addr, context, msg_id, topic, msg, timeout=None, + serialize=True, force_envelope=False): # timeout_response is how long we wait for a response timeout = timeout or CONF.rpc_response_timeout @@ -586,7 +587,8 @@ def _call(addr, context, msg_id, topic, msg, timeout=None): ) LOG.debug(_("Sending cast")) - _cast(addr, context, msg_id, topic, payload) + _cast(addr, context, msg_id, topic, payload, + serialize=serialize, force_envelope=force_envelope) LOG.debug(_("Cast sent; Waiting reply")) # Blocks until receives reply @@ -642,7 +644,8 @@ def _multi_send(method, context, topic, msg, timeout=None, serialize=True, _topic, _topic, msg, timeout, serialize, force_envelope) return - return method(_addr, context, _topic, _topic, msg, timeout) + return method(_addr, context, _topic, _topic, msg, timeout, + serialize, force_envelope) def create_connection(conf, new=True): -- cgit