From 38c1f26102a5456c43da2bec0ec55362d74eff8f Mon Sep 17 00:00:00 2001
From: Ihar Hrachyshka <ihrachys@redhat.com>
Date: Fri, 20 Jun 2014 17:35:30 +0200
Subject: [PATCH] Set correct group for matchmaker_redis options

Before the change, config generator put those options into DEFAULT
section.

Change-Id: I1e8e746cde4627ddf79632ce8255e268de8bd3c3
Closes-Bug: 1332588
---
 oslo/messaging/opts.py | 2 +-
 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 065885825..603156e04 100644
--- a/oslo/messaging/opts.py
+++ b/oslo/messaging/opts.py
@@ -38,7 +38,6 @@ _global_opt_lists = [
     impl_rabbit.rabbit_opts,
     impl_zmq.zmq_opts,
     matchmaker.matchmaker_opts,
-    matchmaker_redis.matchmaker_redis_opts,
     impl_eventlet._eventlet_opts,
     notifier._notifier_opts,
     client._client_opts,
@@ -47,6 +46,7 @@ _global_opt_lists = [
 
 _opts = [
     (None, list(itertools.chain(*_global_opt_lists))),
+    ('matchmaker_redis', matchmaker_redis.matchmaker_redis_opts),
     ('matchmaker_ring', matchmaker_ring.matchmaker_opts),
 ]
 
diff --git a/tests/test_opts.py b/tests/test_opts.py
index 6b71ceb68..759e2e93a 100644
--- a/tests/test_opts.py
+++ b/tests/test_opts.py
@@ -22,11 +22,12 @@ from tests import utils as test_utils
 class OptsTestCase(test_utils.BaseTestCase):
 
     def _test_list_opts(self, result):
-        self.assertEqual(2, len(result))
+        self.assertEqual(3, len(result))
 
         groups = [g for (g, l) in result]
         self.assertIn(None, groups)
         self.assertIn('matchmaker_ring', groups)
+        self.assertIn('matchmaker_redis', groups)
 
         opt_names = [o.name for (g, l) in result for o in l]
         self.assertIn('rpc_backend', opt_names)