config options: Improve help for base

This patch improves help text for base related configuration options.

Implements blueprint centralize-config-options-newton

Change-Id: I178d94e5748b572764d4d270c0eabb91d9cb9f0a
This commit is contained in:
Maciej Szankin 2016-06-02 09:18:46 -05:00 committed by John Garbutt
parent 11ee1471a4
commit ce271509ca

View File

@ -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 2010 United States Government as represented by the # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration. # Administrator of the National Aeronautics and Space Administration.
# Copyright 2011 Justin Santa Barbara # Copyright 2011 Justin Santa Barbara
@ -24,67 +17,77 @@
from oslo_config import cfg from oslo_config import cfg
notify_decorator = 'nova.notifications.notify_decorator'
base_options = [ base_options = [
cfg.IntOpt('password_length', cfg.IntOpt(
'password_length',
default=12, default=12,
help='Length of generated instance admin passwords'), min=0,
cfg.StrOpt('instance_usage_audit_period', help='Length of generated instance admin passwords.'),
cfg.StrOpt(
'instance_usage_audit_period',
default='month', default='month',
help='Time period to generate instance usages for. ' regex='(hour|month|day|year)(@([0-9]+))?',
'Time period must be hour, day, month or year'), help='''
cfg.BoolOpt('use_rootwrap_daemon', Time period to generate instance usages for. It is possible to define optional
offset to given period by appending @ character followed by a number defining
offset.
Possible values:
* period, example: ``hour``, ``day``, ``month` or ``year``
* period with offset, example: ``month@15``
will result in monthly audits starting on 15th day of month.
'''),
cfg.BoolOpt(
'use_rootwrap_daemon',
default=False, default=False,
help="Start and use a daemon that can run the commands that " help='''
"need to be run with root privileges. This option is " Start and use a daemon that can run the commands that need to be run with
"usually enabled on nodes that run nova compute " root privileges. This option is usually enabled on nodes that run nova compute
"processes"), processes.
cfg.StrOpt('rootwrap_config', '''),
cfg.StrOpt(
'rootwrap_config',
default="/etc/nova/rootwrap.conf", default="/etc/nova/rootwrap.conf",
help='Path to the rootwrap configuration file to use for ' help='''
'running commands as root'), Path to the rootwrap configuration file.
Goal of the root wrapper is to allow a service-specific unprivileged user to
run a number of actions as the root user in the safest manner possible.
The configuration file used here must match the one defined in the sudoers
entry.
'''),
cfg.StrOpt( cfg.StrOpt(
'tempdir', 'tempdir',
help='Explicitly specify the temporary working directory'), help='Explicitly specify the temporary working directory.'),
cfg.BoolOpt( cfg.BoolOpt(
'monkey_patch', 'monkey_patch',
default=False, default=False,
help="""Determine if monkey patching should be applied. help="""
Determine if monkey patching should be applied.
Possible values: Related options:
* True: Functions specified in ``monkey_patch_modules`` will be patched. * ``monkey_patch_modules``: This must have values set for this option to have
* False: No monkey patching will occur.
Services which consume this:
* All
Interdependencies to other options:
* ``monkey_patch_modules``: This must have values set for this option to have
any effect any effect
"""), """),
cfg.ListOpt( cfg.ListOpt(
'monkey_patch_modules', 'monkey_patch_modules',
default=[ default=['nova.compute.api:nova.notifications.notify_decorator'],
'nova.compute.api:%s' % (notify_decorator) help="""
], List of modules/decorators to monkey patch.
help="""List of modules/decorators to monkey patch.
This option allows you to patch a decorator for all functions in specified This option allows you to patch a decorator for all functions in specified
modules. modules.
Possible values: Possible values:
* nova.compute.api:nova.notifications.notify_decorator * nova.compute.api:nova.notifications.notify_decorator
* nova.api.ec2.cloud:nova.notifications.notify_decorator * nova.api.ec2.cloud:nova.notifications.notify_decorator
* [...] * [...]
Interdependencies to other options: Related options:
* ``monkey_patch``: This must be set to ``True`` for this option to * ``monkey_patch``: This must be set to ``True`` for this option to
have any effect have any effect
"""), """),
] ]