1 # Copyright (c) 2014 OpenStack Foundation.
3 # Licensed under the Apache License, Version 2.0 (the "License"); you may
4 # not use this file except in compliance with the License. You may obtain
5 # a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 # License for the specific language governing permissions and limitations
18 import escalator.api.middleware.context
19 import escalator.api.versions
20 import escalator.common.config
21 import escalator.common.rpc
22 import escalator.common.wsgi
23 import escalator.notifier
31 (None, list(itertools.chain(
32 escalator.api.middleware.context.context_opts,
33 escalator.api.versions.versions_opts,
34 escalator.common.config.common_opts,
35 escalator.common.rpc.rpc_opts,
36 escalator.common.wsgi.bind_opts,
37 escalator.common.wsgi.eventlet_opts,
38 escalator.common.wsgi.socket_opts,
39 escalator.notifier.notifier_opts))),
40 ('task', escalator.common.config.task_opts),
41 ('paste_deploy', escalator.common.config.paste_deploy_opts)
46 """Return a list of oslo_config options available in Escalator API service.
48 Each element of the list is a tuple. The first element is the name of the
49 group under which the list of elements in the second element will be
50 registered. A group name of None corresponds to the [DEFAULT] group in
53 This function is also discoverable via the 'escalator.api' entry point
54 under the 'oslo_config.opts' namespace.
56 The purpose of this is to allow tools like the Oslo sample config file
57 generator to discover the options exposed to users by escalator.
59 :returns: a list of (group_name, opts) tuples
62 return [(g, copy.deepcopy(o)) for g, o in _api_opts]