Merge "Make the base options definitions consistent"
This commit is contained in:
commit
5b0773f53a
@ -17,39 +17,33 @@
|
|||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
|
notify_decorator = 'nova.notifications.notify_decorator'
|
||||||
|
|
||||||
password_length = cfg.IntOpt(
|
base_options = [
|
||||||
'password_length',
|
cfg.IntOpt('password_length',
|
||||||
default=12,
|
default=12,
|
||||||
help='Length of generated instance admin passwords')
|
help='Length of generated instance admin passwords'),
|
||||||
|
cfg.StrOpt('instance_usage_audit_period',
|
||||||
instance_usage_audit_period = cfg.StrOpt(
|
default='month',
|
||||||
'instance_usage_audit_period',
|
help='Time period to generate instance usages for. '
|
||||||
default='month',
|
'Time period must be hour, day, month or year'),
|
||||||
help='Time period to generate instance usages for. '
|
cfg.BoolOpt('use_rootwrap_daemon',
|
||||||
'Time period must be hour, day, month or year')
|
default=False,
|
||||||
|
help="Start and use a daemon that can run the commands that "
|
||||||
use_rootwrap_daemon = cfg.BoolOpt(
|
"need to be run with root privileges. This option is "
|
||||||
'use_rootwrap_daemon',
|
"usually enabled on nodes that run nova compute "
|
||||||
default=False,
|
"processes"),
|
||||||
help="Start and use a daemon that can run the commands that "
|
cfg.StrOpt('rootwrap_config',
|
||||||
"need to be run with root privileges. This option is "
|
default="/etc/nova/rootwrap.conf",
|
||||||
"usually enabled on nodes that run nova compute "
|
help='Path to the rootwrap configuration file to use for '
|
||||||
"processes")
|
'running commands as root'),
|
||||||
|
cfg.StrOpt(
|
||||||
rootwrap_config = cfg.StrOpt('rootwrap_config',
|
'tempdir',
|
||||||
default="/etc/nova/rootwrap.conf",
|
help='Explicitly specify the temporary working directory'),
|
||||||
help='Path to the rootwrap configuration file to use for '
|
cfg.BoolOpt(
|
||||||
'running commands as root')
|
'monkey_patch',
|
||||||
|
default=False,
|
||||||
tempdir = cfg.StrOpt(
|
help="""Determine if monkey patching should be applied.
|
||||||
'tempdir',
|
|
||||||
help='Explicitly specify the temporary working directory')
|
|
||||||
|
|
||||||
monkey_patch = cfg.BoolOpt(
|
|
||||||
'monkey_patch',
|
|
||||||
default=False,
|
|
||||||
help="""Determine if monkey patching should be applied.
|
|
||||||
|
|
||||||
Possible values:
|
Possible values:
|
||||||
|
|
||||||
@ -64,16 +58,13 @@ Interdependencies to other options:
|
|||||||
|
|
||||||
* ``monkey_patch_modules``: This must have values set for this option to have
|
* ``monkey_patch_modules``: This must have values set for this option to have
|
||||||
any effect
|
any effect
|
||||||
""")
|
"""),
|
||||||
|
cfg.ListOpt(
|
||||||
notify_decorator = 'nova.notifications.notify_decorator'
|
'monkey_patch_modules',
|
||||||
|
default=[
|
||||||
monkey_patch_modules = cfg.ListOpt(
|
'nova.compute.api:%s' % (notify_decorator)
|
||||||
'monkey_patch_modules',
|
],
|
||||||
default=[
|
help="""List of modules/decorators to monkey patch.
|
||||||
'nova.compute.api:%s' % (notify_decorator)
|
|
||||||
],
|
|
||||||
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.
|
||||||
@ -88,22 +79,13 @@ Interdependencies to other 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
|
||||||
""")
|
"""),
|
||||||
|
]
|
||||||
|
|
||||||
ALL_OPTS = [
|
|
||||||
password_length,
|
|
||||||
instance_usage_audit_period,
|
|
||||||
use_rootwrap_daemon,
|
|
||||||
rootwrap_config,
|
|
||||||
tempdir,
|
|
||||||
monkey_patch,
|
|
||||||
monkey_patch_modules]
|
|
||||||
|
|
||||||
|
|
||||||
def register_opts(conf):
|
def register_opts(conf):
|
||||||
conf.register_opts(ALL_OPTS)
|
conf.register_opts(base_options)
|
||||||
|
|
||||||
|
|
||||||
def list_opts():
|
def list_opts():
|
||||||
return {'DEFAULT': ALL_OPTS}
|
return {'DEFAULT': base_options}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user