cleanup nova.conf usage

CONF option imports are no longer necessary.

Change-Id: I5d40db4d6253df1797d7846ed993229e06877c4a
This commit is contained in:
Claudiu Belu
2016-07-05 17:53:04 +03:00
parent 73c4be6b1c
commit 68f3803ae7
5 changed files with 3 additions and 9 deletions

View File

@@ -26,6 +26,7 @@ from nova.compute import arch
from nova.compute import hv_type
from nova.compute import vm_mode
from nova.compute import vm_states
import nova.conf
from nova import context
from nova import exception
from nova import objects
@@ -48,9 +49,8 @@ hyper_host_opts = [
'evacuated during host maintenance.'),
]
CONF = cfg.CONF
CONF = nova.conf.CONF
CONF.register_opts(hyper_host_opts, 'hyperv')
CONF.import_opt('enable_remotefx', 'hyperv.nova.vmops', 'hyperv')
LOG = logging.getLogger(__name__)

View File

@@ -35,10 +35,6 @@ from hyperv.nova import pathutils
LOG = logging.getLogger(__name__)
CONF = nova.conf.CONF
CONF.import_opt('use_cow_images', 'nova.virt.driver')
CONF.import_opt('instances_path', 'nova.compute.manager')
CONF.import_opt('remove_unused_original_minimum_age_seconds',
'nova.virt.imagecache')
def synchronize_with_path(f):

View File

@@ -29,7 +29,6 @@ from hyperv.nova import constants
LOG = logging.getLogger(__name__)
CONF = nova.conf.CONF
CONF.import_opt('instances_path', 'nova.compute.manager')
ERROR_INVALID_NAME = 123

View File

@@ -24,7 +24,6 @@ from os_win import utilsfactory
from hyperv.nova import ovsutils
CONF = nova.conf.CONF
CONF.import_opt('network_api_class', 'nova.network')
class HyperVBaseVIFDriver(object):

View File

@@ -55,8 +55,8 @@ from hyperv.nova import volumeops
LOG = logging.getLogger(__name__)
CONF = nova.conf.CONF
CONF.import_opt('use_cow_images', 'nova.virt.driver')
SHUTDOWN_TIME_INCREMENT = 5
REBOOT_TYPE_SOFT = 'SOFT'