summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMark McLoughlin <markmc@redhat.com>2012-11-17 22:50:21 +0000
committerMark McLoughlin <markmc@redhat.com>2012-11-20 00:04:49 +0000
commite237c86446ba4ecba95cf65a2609733707aab68e (patch)
treee6a7ae4235de5faaf6f0cae383fe126b3cf5dd0b /tools
parent94d87bce212f91c54370784a5544f1a07625938a (diff)
Use CONF.import_opt() for nova.config opts
The only reason for importing nova.config now is where one of the options defined in that file is needed. Rather than importing nova.config using an import statement, use CONF.import_opt() so that it is clear which option we actually require. In future, we will move many options out of nova.config so many of these import_opt() calls will either go away or cause a module other than nova.config to be imported. Change-Id: I0646efddecdf2530903afd50c1f4364cb1d5dce1
Diffstat (limited to 'tools')
-rw-r--r--tools/xenserver/destroy_cached_images.py1
-rwxr-xr-xtools/xenserver/vm_vdi_cleaner.py2
2 files changed, 1 insertions, 2 deletions
diff --git a/tools/xenserver/destroy_cached_images.py b/tools/xenserver/destroy_cached_images.py
index 8bd77ec9a..fa71c0a68 100644
--- a/tools/xenserver/destroy_cached_images.py
+++ b/tools/xenserver/destroy_cached_images.py
@@ -26,7 +26,6 @@ if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'nova', '__init__.py')):
sys.path.insert(0, POSSIBLE_TOPDIR)
from nova import config
-from nova import config
from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova import utils
diff --git a/tools/xenserver/vm_vdi_cleaner.py b/tools/xenserver/vm_vdi_cleaner.py
index 0371aef5a..d0ec2d6a8 100755
--- a/tools/xenserver/vm_vdi_cleaner.py
+++ b/tools/xenserver/vm_vdi_cleaner.py
@@ -27,7 +27,6 @@ if os.path.exists(os.path.join(possible_topdir, "nova", "__init__.py")):
sys.path.insert(0, possible_topdir)
-from nova import config
from nova import context
from nova import db
from nova import exception
@@ -37,6 +36,7 @@ from nova.virt.xenapi import driver as xenapi_driver
CONF = cfg.CONF
+CONF.import_opt('zombie_instance_updated_at_window', 'nova.config')
CONF.import_opt("resize_confirm_window", "nova.compute.manager")