diff options
author | Mark McLoughlin <markmc@redhat.com> | 2012-12-11 08:09:41 +0000 |
---|---|---|
committer | Mark McLoughlin <markmc@redhat.com> | 2012-12-11 08:10:36 +0000 |
commit | f005a70a6f3cdee0aa0fea9c64e0c5b8bd597ba9 (patch) | |
tree | 71320b97a2001a52ec501e59bd1773fa7da96451 /nova/utils.py | |
parent | 79ac64dd3295544d0a3fd3ad061284509528ba63 (diff) | |
download | nova-f005a70a6f3cdee0aa0fea9c64e0c5b8bd597ba9.tar.gz nova-f005a70a6f3cdee0aa0fea9c64e0c5b8bd597ba9.tar.xz nova-f005a70a6f3cdee0aa0fea9c64e0c5b8bd597ba9.zip |
Move monkey patch config opts into nova.utils
The monkey_patch and monkey_patch_modules configuration options are
only used in nova.utils, so move them there.
blueprint: scope-config-opts
Change-Id: Ibfc34be46306041951ab0142ab737686eacae9da
Diffstat (limited to 'nova/utils.py')
-rw-r--r-- | nova/utils.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/nova/utils.py b/nova/utils.py index fcdc65243..2491c5fcb 100644 --- a/nova/utils.py +++ b/nova/utils.py @@ -53,9 +53,20 @@ from nova.openstack.common import importutils from nova.openstack.common import log as logging from nova.openstack.common import timeutils - +monkey_patch_opts = [ + cfg.BoolOpt('monkey_patch', + default=False, + help='Whether to log monkey patching'), + cfg.ListOpt('monkey_patch_modules', + default=[ + 'nova.api.ec2.cloud:nova.notifier.api.notify_decorator', + 'nova.compute.api:nova.notifier.api.notify_decorator' + ], + help='List of modules/decorators to monkey patch'), +] LOG = logging.getLogger(__name__) CONF = cfg.CONF +CONF.register_opts(monkey_patch_opts) CONF.register_opt( cfg.BoolOpt('disable_process_locking', default=False, help='Whether to disable inter-process locks')) @@ -63,7 +74,6 @@ CONF.import_opt('glance_host', 'nova.config') CONF.import_opt('glance_port', 'nova.config') CONF.import_opt('glance_protocol', 'nova.config') CONF.import_opt('instance_usage_audit_period', 'nova.config') -CONF.import_opt('monkey_patch', 'nova.config') CONF.import_opt('rootwrap_config', 'nova.config') CONF.import_opt('service_down_time', 'nova.config') |