From ac658aa7d0671fb9b5a0a2c504f4b73dff514da9 Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Tue, 11 Dec 2012 08:13:53 +0000 Subject: Properly scope isolated hosts config opts The isolated_hosts and isolated_images options are only used by the isolated hosts scheduler filter, so move them there. blueprint: scope-config-opts Change-Id: Ia89b613d7d934a0072f262add039fe14ef236334 --- nova/config.py | 6 ------ nova/scheduler/filters/isolated_hosts_filter.py | 11 +++++++++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/nova/config.py b/nova/config.py index 1acce772f..ec5ac3ba1 100644 --- a/nova/config.py +++ b/nova/config.py @@ -219,12 +219,6 @@ global_opts = [ cfg.IntOpt('service_down_time', default=60, help='maximum time since last check-in for up service'), - cfg.ListOpt('isolated_images', - default=[], - help='Images to run on isolated host'), - cfg.ListOpt('isolated_hosts', - default=[], - help='Host reserved for specific images'), cfg.BoolOpt('use_cow_images', default=True, help='Whether to use cow images'), diff --git a/nova/scheduler/filters/isolated_hosts_filter.py b/nova/scheduler/filters/isolated_hosts_filter.py index b2b97b3a7..37a8f440d 100644 --- a/nova/scheduler/filters/isolated_hosts_filter.py +++ b/nova/scheduler/filters/isolated_hosts_filter.py @@ -16,9 +16,16 @@ from nova.openstack.common import cfg from nova.scheduler import filters +isolated_opts = [ + cfg.ListOpt('isolated_images', + default=[], + help='Images to run on isolated host'), + cfg.ListOpt('isolated_hosts', + default=[], + help='Host reserved for specific images'), +] CONF = cfg.CONF -CONF.import_opt('isolated_hosts', 'nova.config') -CONF.import_opt('isolated_images', 'nova.config') +CONF.register_opts(isolated_opts) class IsolatedHostsFilter(filters.BaseHostFilter): -- cgit