config options: centralize section "monitors"

The config for compute has been moved to nova.conf, but
config for compute.monitors has been left behind. This
patch move it to nova.conf.

Change-Id: I2df9df52451b18421d5acc529a6ac9e0bf6fc86f
Implements: blueprint centralize-config-options-newton
This commit is contained in:
Kevin_Zheng 2016-01-27 17:32:33 +08:00
parent c4763d46fe
commit 1f432afde6
3 changed files with 19 additions and 24 deletions

View File

@ -17,34 +17,13 @@
Resource monitor API specification.
"""
from oslo_config import cfg
import nova.conf
from oslo_log import log as logging
from stevedore import enabled
from nova.i18n import _LW
compute_monitors_opts = [
cfg.MultiStrOpt('compute_available_monitors',
deprecated_for_removal=True,
help='Monitor classes available to the compute which may '
'be specified more than once. This option is '
'DEPRECATED and no longer used. Use setuptools entry '
'points to list available monitor plugins.'),
cfg.ListOpt('compute_monitors',
default=[],
help='A list of monitors that can be used for getting '
'compute metrics. You can use the alias/name from '
'the setuptools entry points for nova.compute.monitors.* '
'namespaces. If no namespace is supplied, the "cpu." '
'namespace is assumed for backwards-compatibility. '
'An example value that would enable both the CPU and '
'NUMA memory bandwidth monitors that used the virt '
'driver variant: '
'["cpu.virt_driver", "numa_mem_bw.virt_driver"]'),
]
CONF = cfg.CONF
CONF.register_opts(compute_monitors_opts)
CONF = nova.conf.CONF
LOG = logging.getLogger(__name__)

View File

@ -30,7 +30,6 @@ def list_opts():
nova.compute.manager.interval_opts,
nova.compute.manager.running_deleted_opts,
nova.compute.manager.timeout_opts,
nova.compute.monitors.compute_monitors_opts,
nova.compute.resource_tracker.resource_tracker_opts,
nova.compute.resource_tracker.allocation_ratio_opts,
nova.compute.rpcapi.rpcapi_opts,

View File

@ -55,6 +55,23 @@ compute_opts = [
'that images will be automatically converted to volumes '
'and boot instances from volumes - it just means that all '
'requests that attempt to create a local disk will fail.'),
cfg.MultiStrOpt('compute_available_monitors',
deprecated_for_removal=True,
help='Monitor classes available to the compute which may '
'be specified more than once. This option is '
'DEPRECATED and no longer used. Use setuptools entry '
'points to list available monitor plugins.'),
cfg.ListOpt('compute_monitors',
default=[],
help='A list of monitors that can be used for getting '
'compute metrics. You can use the alias/name from '
'the setuptools entry points for nova.compute.monitors.* '
'namespaces. If no namespace is supplied, the "cpu." '
'namespace is assumed for backwards-compatibility. '
'An example value that would enable both the CPU and '
'NUMA memory bandwidth monitors that used the virt '
'driver variant: '
'["cpu.virt_driver", "numa_mem_bw.virt_driver"]'),
]