File: opts.py

package info (click to toggle)
python-oslo.middleware 6.6.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 652 kB
  • sloc: python: 3,573; makefile: 21; sh: 2
file content (83 lines) | stat: -rw-r--r-- 2,533 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

from oslo_config import cfg


HEALTHCHECK_OPTS = [
    cfg.StrOpt(
        'path',
        default='/healthcheck',
        deprecated_for_removal=True,
        help='The path to respond to healtcheck requests on.',
    ),
    cfg.BoolOpt(
        'detailed',
        default=False,
        help='Show more detailed information as part of the response. '
        'Security note: Enabling this option may expose '
        'sensitive details about the service being monitored. '
        'Be sure to verify that it will not violate your '
        'security policies.',
    ),
    cfg.ListOpt(
        'backends',
        default=[],
        help='Additional backends that can perform health checks and '
        'report that information back as part of a request.',
    ),
    cfg.ListOpt(
        'allowed_source_ranges',
        default=[],
        help='A list of network addresses to limit source ip allowed '
        'to access healthcheck information. Any request from ip '
        'outside of these network addresses are ignored.',
    ),
    cfg.BoolOpt(
        'ignore_proxied_requests',
        default=False,
        help='Ignore requests with proxy headers.',
    ),
]


DISABLE_BY_FILE_OPTS = [
    cfg.StrOpt(
        'disable_by_file_path',
        default=None,
        help='Check the presence of a file to determine if an '
        'application is running on a port. Used by '
        'DisableByFileHealthcheck plugin.',
    ),
]


DISABLE_BY_FILES_OPTS = [
    cfg.ListOpt(
        'disable_by_file_paths',
        default=[],
        help='Check the presence of a file based on a port to '
        'determine if an application is running on a port. '
        'Expects a "port:path" list of strings. Used by '
        'DisableByFilesPortsHealthcheck plugin.',
    ),
]


ENABLE_BY_FILES_OPTS = [
    cfg.ListOpt(
        'enable_by_file_paths',
        default=[],
        help='Check the presence of files. Used by '
        'EnableByFilesHealthcheck plugin.',
    ),
]