From 87e06d97be54698e42c21aa5dc5ee4a487cee47e Mon Sep 17 00:00:00 2001 From: Gauvain Pocentek <gauvain.pocentek@objectif-libre.com> Date: Tue, 5 Jan 2016 18:34:15 +0100 Subject: [PATCH] list_opts: update the notification options group The group is still DEFAULT at the moment, but the correct group is oslo_messaging_notifications. Sample configurations files generated with the oslo.config tools are invalid due to this incorrect group. Change-Id: Idc6c52f4b15dfff6e8d6b4a2ef9f5598bb3468cd Closes-Bug: #1531219 --- oslo_messaging/opts.py | 2 +- oslo_messaging/tests/test_opts.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/oslo_messaging/opts.py b/oslo_messaging/opts.py index 263c59f68..31ced25ce 100644 --- a/oslo_messaging/opts.py +++ b/oslo_messaging/opts.py @@ -36,7 +36,6 @@ _global_opt_lists = [ impl_zmq.zmq_opts, matchmaker_redis.matchmaker_redis_opts, impl_pooledexecutor._pool_opts, - notifier._notifier_opts, client._client_opts, transport._transport_opts, ] @@ -45,6 +44,7 @@ _opts = [ (None, list(itertools.chain(*_global_opt_lists))), ('matchmaker_redis', matchmaker_redis.matchmaker_redis_opts), ('oslo_messaging_amqp', amqp_opts.amqp1_opts), + ('oslo_messaging_notifications', notifier._notifier_opts), ('oslo_messaging_rabbit', list(itertools.chain(amqp.amqp_opts, impl_rabbit.rabbit_opts))), ] diff --git a/oslo_messaging/tests/test_opts.py b/oslo_messaging/tests/test_opts.py index 931ded80f..d5fcf7ff1 100644 --- a/oslo_messaging/tests/test_opts.py +++ b/oslo_messaging/tests/test_opts.py @@ -32,12 +32,13 @@ class OptsTestCase(test_utils.BaseTestCase): super(OptsTestCase, self).setUp() def _test_list_opts(self, result): - self.assertEqual(4, len(result)) + self.assertEqual(5, len(result)) groups = [g for (g, l) in result] self.assertIn(None, groups) self.assertIn('matchmaker_redis', groups) self.assertIn('oslo_messaging_amqp', groups) + self.assertIn('oslo_messaging_notifications', groups) self.assertIn('oslo_messaging_rabbit', groups) opt_names = [o.name for (g, l) in result for o in l]