From 72e5f4783a74075d9bebdf5f04e44fde7dd170cb Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Tue, 25 Sep 2012 11:21:00 +0100 Subject: Don't deprecate rabbit_host and rabbit_port Where a single RabbitMQ broker node is used (rather than a cluster of nodes) it is simplest for users to just set the rabbit_host option. Often users will not need to specify a port number at all. Similarly, where a cluster is used, it is simplest for the user to just specify a list of node addresses in rabbit_hosts and assume that all nodes are listening on the port specified in rabbit_port. Change-Id: I4227541676dffc50cd6116225de0cec0afa36a41 --- openstack/common/rpc/impl_kombu.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'openstack/common/rpc/impl_kombu.py') diff --git a/openstack/common/rpc/impl_kombu.py b/openstack/common/rpc/impl_kombu.py index 9eaa3cd..580d921 100644 --- a/openstack/common/rpc/impl_kombu.py +++ b/openstack/common/rpc/impl_kombu.py @@ -51,10 +51,10 @@ kombu_opts = [ '(valid only if SSL enabled)')), cfg.StrOpt('rabbit_host', default='localhost', - help='Deprecated: Use rabbit_hosts instead. The RabbitMQ host'), + help='The RabbitMQ broker address where a single node is used'), cfg.IntOpt('rabbit_port', default=5672, - help='Deprecated: Use rabbit_hosts instead. The RabbitMQ port'), + help='The RabbitMQ broker port where a single node is used'), cfg.ListOpt('rabbit_hosts', default=['$rabbit_host:$rabbit_port'], help='RabbitMQ HA cluster host:port pairs'), @@ -393,7 +393,8 @@ class Connection(object): ssl_params = self._fetch_ssl_params() params_list = [] for adr in self.conf.rabbit_hosts: - hostname, port = utils.parse_host_port(adr, default_port=5672) + hostname, port = utils.parse_host_port( + adr, default_port=self.conf.rabbit_port) params = {} -- cgit