2
# Copyright 2014 Red Hat, Inc.
4
# Licensed under the Apache License, Version 2.0 (the "License"); you may
5
# not use this file except in compliance with the License. You may obtain
6
# a copy of the License at
8
# http://www.apache.org/licenses/LICENSE-2.0
10
# Unless required by applicable law or agreed to in writing, software
11
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13
# License for the specific language governing permissions and limitations
23
from oslo.messaging._drivers import amqp
24
from oslo.messaging._drivers import common as drivers_common
25
from oslo.messaging._drivers import impl_qpid
26
from oslo.messaging._drivers import impl_rabbit
27
from oslo.messaging._drivers import impl_zmq
28
from oslo.messaging._drivers import matchmaker
29
from oslo.messaging._drivers import matchmaker_redis
30
from oslo.messaging._drivers import matchmaker_ring
31
from oslo.messaging._executors import impl_eventlet
32
from oslo.messaging.notify import notifier
33
from oslo.messaging.rpc import client
34
from oslo.messaging import transport
38
drivers_common._exception_opts,
40
impl_rabbit.rabbit_opts,
42
matchmaker.matchmaker_opts,
43
matchmaker_redis.matchmaker_redis_opts,
44
impl_eventlet._eventlet_opts,
45
notifier._notifier_opts,
47
transport._transport_opts
51
(None, list(itertools.chain(*_global_opt_lists))),
52
('matchmaker_ring', matchmaker_ring.matchmaker_opts),
57
"""Return a list of oslo.config options available in the library.
59
The returned list includes all oslo.config options which may be registered
60
at runtime by the library.
62
Each element of the list is a tuple. The first element is the name of the
63
group under which the list of elements in the second element will be
64
registered. A group name of None corresponds to the [DEFAULT] group in
67
This function is also discoverable via the 'oslo.messaging' entry point
68
under the 'oslo.config.opts' namespace.
70
The purpose of this is to allow tools like the Oslo sample config file
71
generator to discover the options exposed to users by this library.
73
:returns: a list of (group_name, opts) tuples
75
return [(g, copy.deepcopy(o)) for g, o in _opts]