From e237c86446ba4ecba95cf65a2609733707aab68e Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Sat, 17 Nov 2012 22:50:21 +0000 Subject: 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 --- tools/xenserver/destroy_cached_images.py | 1 - tools/xenserver/vm_vdi_cleaner.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'tools') 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 @@ -25,7 +25,6 @@ POSSIBLE_TOPDIR = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]), 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 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") -- cgit