Improve consistency in WSGI opts
* Updated header flags * Moved all vars to list * Removed possible values sections where they were not needed Change-Id: If4517425a3c8232b24ec5516f5ecab3ee2c0afa4 Implements: Blueprint centralize-config-options-newton
This commit is contained in:
parent
bdb46ccc9c
commit
b3ab3944f0
@ -1,10 +1,3 @@
|
||||
# needs:fix_opt_description
|
||||
# needs:check_deprecation_status
|
||||
# needs:check_opt_group_and_type
|
||||
# needs:fix_opt_description_indentation
|
||||
# needs:fix_opt_registration_consistency
|
||||
|
||||
|
||||
# Copyright 2015 OpenStack Foundation
|
||||
# All Rights Reserved.
|
||||
#
|
||||
@ -24,9 +17,15 @@ from oslo_config import cfg
|
||||
|
||||
wsgi_group = cfg.OptGroup(
|
||||
'wsgi',
|
||||
title='WSGI Options')
|
||||
title='WSGI Options',
|
||||
help='''
|
||||
Options under this group are used to configure WSGI (Web Server Gateway
|
||||
Interface). WSGI is used to serve API requests.
|
||||
''',
|
||||
)
|
||||
|
||||
api_paste_config = cfg.StrOpt(
|
||||
ALL_OPTS = [
|
||||
cfg.StrOpt(
|
||||
'api_paste_config',
|
||||
default="api-paste.ini",
|
||||
deprecated_group='DEFAULT',
|
||||
@ -34,16 +33,14 @@ api_paste_config = cfg.StrOpt(
|
||||
This option represents a file name for the paste.deploy config for nova-api.
|
||||
|
||||
Possible values:
|
||||
|
||||
* api-paste.ini (default)
|
||||
* A string representing file name for the paste.deploy config.
|
||||
""")
|
||||
"""),
|
||||
|
||||
# TODO(sfinucan): It is not possible to rename this to 'log_format'
|
||||
# yet, as doing so would cause a conflict if '[DEFAULT] log_format'
|
||||
# were used. When 'deprecated_group' is removed after Ocata, this
|
||||
# should be changed.
|
||||
wsgi_log_format = cfg.StrOpt(
|
||||
cfg.StrOpt(
|
||||
'wsgi_log_format',
|
||||
default='%(client_ip)s "%(request_line)s" status: %(status_code)s'
|
||||
' len: %(body_length)s time: %(wall_seconds).7f',
|
||||
@ -60,26 +57,22 @@ Possible values:
|
||||
* '%(client_ip)s "%(request_line)s" status: %(status_code)s'
|
||||
'len: %(body_length)s time: %(wall_seconds).7f' (default)
|
||||
* Any formatted string formed by specific values.
|
||||
""")
|
||||
"""),
|
||||
|
||||
secure_proxy_ssl_header = cfg.StrOpt(
|
||||
cfg.StrOpt(
|
||||
'secure_proxy_ssl_header',
|
||||
deprecated_group='DEFAULT',
|
||||
help="""
|
||||
This option specifies the HTTP header used to determine the scheme for the
|
||||
original request, even if it was removed by an SSL terminating proxy.
|
||||
Typical value is '"HTTP_X_FORWARDED_PROTO".
|
||||
|
||||
It is represented as a tuple with HTTP header/value combination that signifies
|
||||
a request is secure.
|
||||
This option specifies the HTTP header used to determine the protocol scheme
|
||||
for the original request, even if it was removed by a SSL terminating proxy.
|
||||
|
||||
Possible values:
|
||||
|
||||
* None (default)
|
||||
* https
|
||||
""")
|
||||
* None (default) - the request scheme is not influenced by any HTTP headers.
|
||||
* Valid HTTP header, like HTTP_X_FORWARDED_PROTO
|
||||
"""),
|
||||
|
||||
ssl_ca_file = cfg.StrOpt(
|
||||
cfg.StrOpt(
|
||||
'ssl_ca_file',
|
||||
deprecated_group='DEFAULT',
|
||||
help="""
|
||||
@ -93,9 +86,9 @@ Possible values:
|
||||
Related options:
|
||||
|
||||
* enabled_ssl_apis
|
||||
""")
|
||||
"""),
|
||||
|
||||
ssl_cert_file = cfg.StrOpt(
|
||||
cfg.StrOpt(
|
||||
'ssl_cert_file',
|
||||
deprecated_group='DEFAULT',
|
||||
help="""
|
||||
@ -108,9 +101,9 @@ Possible values:
|
||||
Related options:
|
||||
|
||||
* enabled_ssl_apis
|
||||
""")
|
||||
"""),
|
||||
|
||||
ssl_key_file = cfg.StrOpt(
|
||||
cfg.StrOpt(
|
||||
'ssl_key_file',
|
||||
deprecated_group='DEFAULT',
|
||||
help="""
|
||||
@ -124,9 +117,9 @@ Possible values:
|
||||
Related options:
|
||||
|
||||
* enabled_ssl_apis
|
||||
""")
|
||||
"""),
|
||||
|
||||
tcp_keepidle = cfg.IntOpt(
|
||||
cfg.IntOpt(
|
||||
'tcp_keepidle',
|
||||
min=0,
|
||||
default=600,
|
||||
@ -137,16 +130,12 @@ It specifies the duration of time to keep connection active. TCP generates a
|
||||
KEEPALIVE transmission for an application that requests to keep connection
|
||||
active. Not supported on OS X.
|
||||
|
||||
Possible values:
|
||||
|
||||
* 600 (default) or any positive integer representing timeout in seconds.
|
||||
|
||||
Related options:
|
||||
|
||||
* keep_alive
|
||||
""")
|
||||
"""),
|
||||
|
||||
default_pool_size = cfg.IntOpt(
|
||||
cfg.IntOpt(
|
||||
'default_pool_size',
|
||||
min=0,
|
||||
default=1000,
|
||||
@ -156,13 +145,9 @@ default_pool_size = cfg.IntOpt(
|
||||
This option specifies the size of the pool of greenthreads used by wsgi.
|
||||
It is possible to limit the number of concurrent connections using this
|
||||
option.
|
||||
"""),
|
||||
|
||||
Possible values:
|
||||
|
||||
* 1000 (default) or any positive integer.
|
||||
""")
|
||||
|
||||
max_header_line = cfg.IntOpt(
|
||||
cfg.IntOpt(
|
||||
'max_header_line',
|
||||
min=0,
|
||||
default=16384,
|
||||
@ -176,13 +161,9 @@ Since TCP is a stream based protocol, in order to reuse a connection, the HTTP
|
||||
has to have a way to indicate the end of the previous response and beginning
|
||||
of the next. Hence, in a keep_alive case, all messages must have a
|
||||
self-defined message length.
|
||||
"""),
|
||||
|
||||
Possible values:
|
||||
|
||||
* 16384 (default) or any positive integer.
|
||||
""")
|
||||
|
||||
keep_alive = cfg.BoolOpt(
|
||||
cfg.BoolOpt(
|
||||
'keep_alive',
|
||||
default=True,
|
||||
deprecated_group='DEFAULT',
|
||||
@ -194,15 +175,15 @@ request/response pair. HTTP keep-alive indicates HTTP connection reuse.
|
||||
|
||||
Possible values:
|
||||
|
||||
* True (default) : reuse HTTP connection.
|
||||
* True : reuse HTTP connection.
|
||||
* False : closes the client socket connection explicitly.
|
||||
|
||||
Related options:
|
||||
|
||||
* tcp_keepidle
|
||||
""")
|
||||
"""),
|
||||
|
||||
client_socket_timeout = cfg.IntOpt(
|
||||
cfg.IntOpt(
|
||||
'client_socket_timeout',
|
||||
min=0,
|
||||
default=900,
|
||||
@ -211,26 +192,9 @@ client_socket_timeout = cfg.IntOpt(
|
||||
This option specifies the timeout for client connections' socket operations.
|
||||
If an incoming connection is idle for this number of seconds it will be
|
||||
closed. It indicates timeout on individual read/writes on the socket
|
||||
connection.
|
||||
|
||||
Possible values:
|
||||
|
||||
* 900 (default) or any positive integer.
|
||||
* 0 : wait forever.
|
||||
""")
|
||||
|
||||
ALL_OPTS = [api_paste_config,
|
||||
wsgi_log_format,
|
||||
secure_proxy_ssl_header,
|
||||
ssl_ca_file,
|
||||
ssl_cert_file,
|
||||
ssl_key_file,
|
||||
tcp_keepidle,
|
||||
default_pool_size,
|
||||
max_header_line,
|
||||
keep_alive,
|
||||
client_socket_timeout
|
||||
]
|
||||
connection. To wait forever set to 0.
|
||||
"""),
|
||||
]
|
||||
|
||||
|
||||
def register_opts(conf):
|
||||
|
Loading…
Reference in New Issue
Block a user