summaryrefslogtreecommitdiffstats
path: root/openstack/common
diff options
context:
space:
mode:
authorRussell Bryant <rbryant@redhat.com>2012-12-05 10:35:25 -0500
committerRussell Bryant <rbryant@redhat.com>2012-12-05 15:27:05 -0500
commit3f8df660030a078db2c295e7ae74a32c88c7af02 (patch)
tree3041decfd1c89a72052d108d9b5270823b1e3c32 /openstack/common
parent2f7a7edc41d0e7b663877592aeda14e766a64241 (diff)
downloadoslo-3f8df660030a078db2c295e7ae74a32c88c7af02.tar.gz
oslo-3f8df660030a078db2c295e7ae74a32c88c7af02.tar.xz
oslo-3f8df660030a078db2c295e7ae74a32c88c7af02.zip
Fix qpid cast_to_server regression.
This patches addresses a regression in the qpid driver for the cast_to_server and fanout_cast_to_server methods. The regression was introduced in 86952852c1dadd54f1294ae0adba01cfe827b8ce. There are test cases that cover this code, but unfortunately they are not being run by jenkins because python-qpid is not available in pypi. Fix bug 1086848. Change-Id: I89d4f81149f9a05c578b5ec544c5e34311484c6c
Diffstat (limited to 'openstack/common')
-rw-r--r--openstack/common/rpc/impl_qpid.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/openstack/common/rpc/impl_qpid.py b/openstack/common/rpc/impl_qpid.py
index fc8a382..7f21461 100644
--- a/openstack/common/rpc/impl_qpid.py
+++ b/openstack/common/rpc/impl_qpid.py
@@ -279,6 +279,13 @@ class Connection(object):
self.consumer_thread = None
self.conf = conf
+ if server_params and 'hostname' in server_params:
+ # NOTE(russellb) This enables support for cast_to_server.
+ server_params['qpid_hosts'] = [
+ '%s:%d' % (server_params['hostname'],
+ server_params.get('port', 5672))
+ ]
+
params = {
'qpid_hosts': self.conf.qpid_hosts,
'username': self.conf.qpid_username,