summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark McLoughlin <markmc@redhat.com>2012-12-11 08:13:53 +0000
committerMark McLoughlin <markmc@redhat.com>2012-12-11 08:14:48 +0000
commitac658aa7d0671fb9b5a0a2c504f4b73dff514da9 (patch)
tree01a35dc478c6d053413eeb7b3956456d7876a963
parentf005a70a6f3cdee0aa0fea9c64e0c5b8bd597ba9 (diff)
downloadnova-ac658aa7d0671fb9b5a0a2c504f4b73dff514da9.tar.gz
nova-ac658aa7d0671fb9b5a0a2c504f4b73dff514da9.tar.xz
nova-ac658aa7d0671fb9b5a0a2c504f4b73dff514da9.zip
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
-rw-r--r--nova/config.py6
-rw-r--r--nova/scheduler/filters/isolated_hosts_filter.py11
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):