Debian Codegraph @

masakarimonitors/conf/base.py

raw
1 # Copyright(c) 2016 Nippon Telegraph and Telephone Corporation
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 from oslo_config import cfg
16
17 base_options = [
18 cfg.StrOpt(
19 'tempdir',
20 help='Explicitly specify the temporary working directory.'),
21 cfg.BoolOpt(
22 'monkey_patch',
23 default=False,
24 help="""
25 Determine if monkey patching should be applied.
26
27 Related options:
28
29 * ``monkey_patch_modules``: This must have values set for this option to have
30 any effect
31 """),
32 cfg.ListOpt(
33 'monkey_patch_modules',
34 default=[],
35 help="""
36 List of modules/decorators to monkey patch.
37
38 This option allows you to patch a decorator for all functions in specified
39 modules.
40
41 Related options:
42
43 * ``monkey_patch``: This must be set to ``True`` for this option to
44 have any effect
45 """),
46 ]
47
48
49 def register_opts(conf):
50 conf.register_opts(base_options)
51
52
53 def list_opts():
54 return {'DEFAULT': base_options}