From b9ac4fec23002fc761118e7cf4b2401fc7bbecf9 Mon Sep 17 00:00:00 2001 From: EdLeafe Date: Mon, 16 Nov 2015 11:08:22 -0600 Subject: [PATCH] Config options: centralize section "scheduler" This change moves all of the configuration options previously defined in nova/scheduler to the new centralized nova/conf/scheduler directory. A subsequent patch will then improve the help texts. Blueprint centralize-config-options Change-Id: I08d50e873f71601a26ce768feac635243d0570f4 --- nova/conf/__init__.py | 2 ++ .../filters/aggregate_image_properties_isolation.py | 13 ++----------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/nova/conf/__init__.py b/nova/conf/__init__.py index 33426f4aa..d134d0af6 100644 --- a/nova/conf/__init__.py +++ b/nova/conf/__init__.py @@ -19,8 +19,10 @@ from oslo_config import cfg +from nova.conf import scheduler from nova.conf import serial_console CONF = cfg.CONF +scheduler.register_opts(CONF) serial_console.register_opts(CONF) diff --git a/nova/scheduler/filters/aggregate_image_properties_isolation.py b/nova/scheduler/filters/aggregate_image_properties_isolation.py index af13d268f..bf83c6b50 100644 --- a/nova/scheduler/filters/aggregate_image_properties_isolation.py +++ b/nova/scheduler/filters/aggregate_image_properties_isolation.py @@ -13,23 +13,14 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_config import cfg from oslo_log import log as logging import six +import nova.conf from nova.scheduler import filters from nova.scheduler.filters import utils -opts = [ - cfg.StrOpt('aggregate_image_properties_isolation_namespace', - help='Force the filter to consider only keys matching ' - 'the given namespace.'), - cfg.StrOpt('aggregate_image_properties_isolation_separator', - default=".", - help='The separator used between the namespace and keys'), -] -CONF = cfg.CONF -CONF.register_opts(opts) +CONF = nova.conf.CONF LOG = logging.getLogger(__name__)