Remove nova.config.CONF
Modules import nova.config for two reasons right now - firstly, to reference nova.config.CONF and, secondly, if they use one of the options defined in nova.config. Often modules import nova.openstack.common.cfg and nova.config which is a bit pointless since they could just use cfg.CONF if they just want to nova.config in order to reference CONF. Let's just use cfg.CONF everywhere and we can explicitly state where we actually require options defined in nova.config. Change-Id: Ie4184a74e3e78c99658becb18dce1c2087e450bb
This commit is contained in:
@@ -42,13 +42,14 @@ if os.path.exists(os.path.join(possible_topdir, "nova", "__init__.py")):
|
|||||||
|
|
||||||
from nova import config
|
from nova import config
|
||||||
from nova.objectstore import s3server
|
from nova.objectstore import s3server
|
||||||
|
from nova.openstack.common import cfg
|
||||||
from nova.openstack.common import log as logging
|
from nova.openstack.common import log as logging
|
||||||
from nova import service
|
from nova import service
|
||||||
from nova import utils
|
from nova import utils
|
||||||
from nova.vnc import xvp_proxy
|
from nova.vnc import xvp_proxy
|
||||||
|
|
||||||
|
|
||||||
CONF = config.CONF
|
CONF = cfg.CONF
|
||||||
LOG = logging.getLogger('nova.all')
|
LOG = logging.getLogger('nova.all')
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
@@ -37,11 +37,12 @@ if os.path.exists(os.path.join(possible_topdir, "nova", "__init__.py")):
|
|||||||
|
|
||||||
|
|
||||||
from nova import config
|
from nova import config
|
||||||
|
from nova.openstack.common import cfg
|
||||||
from nova.openstack.common import log as logging
|
from nova.openstack.common import log as logging
|
||||||
from nova import service
|
from nova import service
|
||||||
from nova import utils
|
from nova import utils
|
||||||
|
|
||||||
CONF = config.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
config.parse_args(sys.argv)
|
config.parse_args(sys.argv)
|
||||||
|
@@ -33,11 +33,12 @@ if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'nova', '__init__.py')):
|
|||||||
|
|
||||||
|
|
||||||
from nova import config
|
from nova import config
|
||||||
|
from nova.openstack.common import cfg
|
||||||
from nova.openstack.common import log as logging
|
from nova.openstack.common import log as logging
|
||||||
from nova import service
|
from nova import service
|
||||||
from nova import utils
|
from nova import utils
|
||||||
|
|
||||||
CONF = config.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
config.parse_args(sys.argv)
|
config.parse_args(sys.argv)
|
||||||
|
@@ -52,7 +52,7 @@ delete_exchange_opt = cfg.BoolOpt('delete_exchange',
|
|||||||
default=False,
|
default=False,
|
||||||
help='delete nova exchange too.')
|
help='delete nova exchange too.')
|
||||||
|
|
||||||
CONF = config.CONF
|
CONF = cfg.CONF
|
||||||
CONF.register_cli_opt(delete_exchange_opt)
|
CONF.register_cli_opt(delete_exchange_opt)
|
||||||
|
|
||||||
|
|
||||||
|
@@ -42,11 +42,12 @@ if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'nova', '__init__.py')):
|
|||||||
|
|
||||||
|
|
||||||
from nova import config
|
from nova import config
|
||||||
|
from nova.openstack.common import cfg
|
||||||
from nova.openstack.common import log as logging
|
from nova.openstack.common import log as logging
|
||||||
from nova import service
|
from nova import service
|
||||||
from nova import utils
|
from nova import utils
|
||||||
|
|
||||||
CONF = config.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
config.parse_args(sys.argv)
|
config.parse_args(sys.argv)
|
||||||
|
@@ -33,11 +33,12 @@ if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')):
|
|||||||
|
|
||||||
|
|
||||||
from nova import config
|
from nova import config
|
||||||
|
from nova.openstack.common import cfg
|
||||||
from nova.openstack.common import log as logging
|
from nova.openstack.common import log as logging
|
||||||
from nova import service
|
from nova import service
|
||||||
from nova import utils
|
from nova import utils
|
||||||
|
|
||||||
CONF = config.CONF
|
CONF = cfg.CONF
|
||||||
CONF.import_opt('topic', 'nova.conductor.api', group='conductor')
|
CONF.import_opt('topic', 'nova.conductor.api', group='conductor')
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
@@ -34,10 +34,11 @@ if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')):
|
|||||||
|
|
||||||
|
|
||||||
from nova import config
|
from nova import config
|
||||||
|
from nova.openstack.common import cfg
|
||||||
from nova.openstack.common import log as logging
|
from nova.openstack.common import log as logging
|
||||||
from nova import service
|
from nova import service
|
||||||
|
|
||||||
CONF = config.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
config.parse_args(sys.argv)
|
config.parse_args(sys.argv)
|
||||||
|
@@ -33,10 +33,11 @@ if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')):
|
|||||||
|
|
||||||
from nova import config
|
from nova import config
|
||||||
from nova.consoleauth import manager
|
from nova.consoleauth import manager
|
||||||
|
from nova.openstack.common import cfg
|
||||||
from nova.openstack.common import log as logging
|
from nova.openstack.common import log as logging
|
||||||
from nova import service
|
from nova import service
|
||||||
|
|
||||||
CONF = config.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
config.parse_args(sys.argv)
|
config.parse_args(sys.argv)
|
||||||
|
@@ -40,12 +40,13 @@ from nova import context
|
|||||||
from nova import db
|
from nova import db
|
||||||
from nova.network import linux_net
|
from nova.network import linux_net
|
||||||
from nova.network import rpcapi as network_rpcapi
|
from nova.network import rpcapi as network_rpcapi
|
||||||
|
from nova.openstack.common import cfg
|
||||||
from nova.openstack.common import importutils
|
from nova.openstack.common import importutils
|
||||||
from nova.openstack.common import log as logging
|
from nova.openstack.common import log as logging
|
||||||
from nova.openstack.common import rpc
|
from nova.openstack.common import rpc
|
||||||
from nova import utils
|
from nova import utils
|
||||||
|
|
||||||
CONF = config.CONF
|
CONF = cfg.CONF
|
||||||
LOG = logging.getLogger('nova.dhcpbridge')
|
LOG = logging.getLogger('nova.dhcpbridge')
|
||||||
|
|
||||||
|
|
||||||
|
@@ -88,7 +88,7 @@ from nova.scheduler import rpcapi as scheduler_rpcapi
|
|||||||
from nova import utils
|
from nova import utils
|
||||||
from nova import version
|
from nova import version
|
||||||
|
|
||||||
CONF = config.CONF
|
CONF = cfg.CONF
|
||||||
CONF.import_opt('flat_network_bridge', 'nova.network.manager')
|
CONF.import_opt('flat_network_bridge', 'nova.network.manager')
|
||||||
CONF.import_opt('num_networks', 'nova.network.manager')
|
CONF.import_opt('num_networks', 'nova.network.manager')
|
||||||
CONF.import_opt('multi_host', 'nova.network.manager')
|
CONF.import_opt('multi_host', 'nova.network.manager')
|
||||||
|
@@ -35,11 +35,12 @@ if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')):
|
|||||||
|
|
||||||
|
|
||||||
from nova import config
|
from nova import config
|
||||||
|
from nova.openstack.common import cfg
|
||||||
from nova.openstack.common import log as logging
|
from nova.openstack.common import log as logging
|
||||||
from nova import service
|
from nova import service
|
||||||
from nova import utils
|
from nova import utils
|
||||||
|
|
||||||
CONF = config.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
config.parse_args(sys.argv)
|
config.parse_args(sys.argv)
|
||||||
|
@@ -67,7 +67,7 @@ opts = [
|
|||||||
help='Port on which to listen for incoming requests'),
|
help='Port on which to listen for incoming requests'),
|
||||||
]
|
]
|
||||||
|
|
||||||
CONF = config.CONF
|
CONF = cfg.CONF
|
||||||
CONF.register_cli_opts(opts)
|
CONF.register_cli_opts(opts)
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@@ -34,12 +34,13 @@ if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'nova', '__init__.py')):
|
|||||||
|
|
||||||
from nova import config
|
from nova import config
|
||||||
from nova import exception
|
from nova import exception
|
||||||
|
from nova.openstack.common import cfg
|
||||||
from nova.openstack.common import log as logging
|
from nova.openstack.common import log as logging
|
||||||
from nova.openstack.common import rpc
|
from nova.openstack.common import rpc
|
||||||
from nova.openstack.common.rpc import impl_zmq
|
from nova.openstack.common.rpc import impl_zmq
|
||||||
from nova import utils
|
from nova import utils
|
||||||
|
|
||||||
CONF = config.CONF
|
CONF = cfg.CONF
|
||||||
CONF.register_opts(rpc.rpc_opts)
|
CONF.register_opts(rpc.rpc_opts)
|
||||||
CONF.register_opts(impl_zmq.zmq_opts)
|
CONF.register_opts(impl_zmq.zmq_opts)
|
||||||
|
|
||||||
|
@@ -37,11 +37,12 @@ if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')):
|
|||||||
gettext.install('nova', unicode=1)
|
gettext.install('nova', unicode=1)
|
||||||
|
|
||||||
from nova import config
|
from nova import config
|
||||||
|
from nova.openstack.common import cfg
|
||||||
from nova.openstack.common import log as logging
|
from nova.openstack.common import log as logging
|
||||||
from nova import service
|
from nova import service
|
||||||
from nova import utils
|
from nova import utils
|
||||||
|
|
||||||
CONF = config.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
config.parse_args(sys.argv)
|
config.parse_args(sys.argv)
|
||||||
|
@@ -27,7 +27,6 @@ schedule requests to compute nodes but provide their own manager and topic.
|
|||||||
https://bugs.launchpad.net/nova/+bug/1009681
|
https://bugs.launchpad.net/nova/+bug/1009681
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from nova import config
|
|
||||||
from nova.openstack.common import cfg
|
from nova.openstack.common import cfg
|
||||||
from nova.openstack.common import importutils
|
from nova.openstack.common import importutils
|
||||||
from nova.scheduler import driver
|
from nova.scheduler import driver
|
||||||
@@ -43,7 +42,7 @@ multi_scheduler_opts = [
|
|||||||
help='Default driver to use for scheduling calls'),
|
help='Default driver to use for scheduling calls'),
|
||||||
]
|
]
|
||||||
|
|
||||||
CONF = config.CONF
|
CONF = cfg.CONF
|
||||||
CONF.register_opts(multi_scheduler_opts)
|
CONF.register_opts(multi_scheduler_opts)
|
||||||
|
|
||||||
|
|
||||||
|
@@ -19,10 +19,11 @@ Client side of the scheduler manager RPC API.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
from nova import config
|
from nova import config
|
||||||
|
from nova.openstack.common import cfg
|
||||||
from nova.openstack.common import jsonutils
|
from nova.openstack.common import jsonutils
|
||||||
import nova.openstack.common.rpc.proxy
|
import nova.openstack.common.rpc.proxy
|
||||||
|
|
||||||
CONF = config.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
|
|
||||||
class SchedulerAPI(nova.openstack.common.rpc.proxy.RpcProxy):
|
class SchedulerAPI(nova.openstack.common.rpc.proxy.RpcProxy):
|
||||||
|
@@ -15,15 +15,15 @@
|
|||||||
|
|
||||||
"""Bare-metal DB test base class."""
|
"""Bare-metal DB test base class."""
|
||||||
|
|
||||||
from nova import config
|
|
||||||
from nova import context as nova_context
|
from nova import context as nova_context
|
||||||
|
from nova.openstack.common import cfg
|
||||||
from nova import test
|
from nova import test
|
||||||
from nova.virt.baremetal.db import migration as bm_migration
|
from nova.virt.baremetal.db import migration as bm_migration
|
||||||
from nova.virt.baremetal.db.sqlalchemy import session as bm_session
|
from nova.virt.baremetal.db.sqlalchemy import session as bm_session
|
||||||
|
|
||||||
_DB = None
|
_DB = None
|
||||||
|
|
||||||
CONF = config.CONF
|
CONF = cfg.CONF
|
||||||
CONF.import_opt('baremetal_sql_connection',
|
CONF.import_opt('baremetal_sql_connection',
|
||||||
'nova.virt.baremetal.db.sqlalchemy.session')
|
'nova.virt.baremetal.db.sqlalchemy.session')
|
||||||
|
|
||||||
|
@@ -16,8 +16,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from nova import config
|
|
||||||
from nova.openstack.common import cfg
|
from nova.openstack.common import cfg
|
||||||
|
|
||||||
CONF = config.CONF
|
CONF = cfg.CONF
|
||||||
CONF.register_opt(cfg.IntOpt('answer', default=42, help='test flag'))
|
CONF.register_opt(cfg.IntOpt('answer', default=42, help='test flag'))
|
||||||
|
@@ -17,8 +17,9 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from nova import config
|
from nova import config
|
||||||
|
from nova.openstack.common import cfg
|
||||||
|
|
||||||
CONF = config.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
CONF.import_opt('scheduler_driver', 'nova.scheduler.manager')
|
CONF.import_opt('scheduler_driver', 'nova.scheduler.manager')
|
||||||
CONF.import_opt('fake_network', 'nova.network.manager')
|
CONF.import_opt('fake_network', 'nova.network.manager')
|
||||||
|
@@ -16,8 +16,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from nova import config
|
|
||||||
from nova.openstack.common import cfg
|
from nova.openstack.common import cfg
|
||||||
|
|
||||||
CONF = config.CONF
|
CONF = cfg.CONF
|
||||||
CONF.register_opt(cfg.IntOpt('runtime_answer', default=54, help='test flag'))
|
CONF.register_opt(cfg.IntOpt('runtime_answer', default=54, help='test flag'))
|
||||||
|
@@ -15,7 +15,6 @@
|
|||||||
"""
|
"""
|
||||||
Tests For Least Cost functions.
|
Tests For Least Cost functions.
|
||||||
"""
|
"""
|
||||||
from nova import config
|
|
||||||
from nova import context
|
from nova import context
|
||||||
from nova.openstack.common import cfg
|
from nova.openstack.common import cfg
|
||||||
from nova.scheduler import weights
|
from nova.scheduler import weights
|
||||||
@@ -33,7 +32,7 @@ test_least_cost_opts = [
|
|||||||
help='How much weight to give the fake_weigher2 function'),
|
help='How much weight to give the fake_weigher2 function'),
|
||||||
]
|
]
|
||||||
|
|
||||||
CONF = config.CONF
|
CONF = cfg.CONF
|
||||||
CONF.import_opt('least_cost_functions', 'nova.scheduler.weights.least_cost')
|
CONF.import_opt('least_cost_functions', 'nova.scheduler.weights.least_cost')
|
||||||
CONF.import_opt('compute_fill_first_cost_fn_weight',
|
CONF.import_opt('compute_fill_first_cost_fn_weight',
|
||||||
'nova.scheduler.weights.least_cost')
|
'nova.scheduler.weights.least_cost')
|
||||||
|
@@ -20,11 +20,12 @@ Unit Tests for nova.scheduler.rpcapi
|
|||||||
|
|
||||||
from nova import config
|
from nova import config
|
||||||
from nova import context
|
from nova import context
|
||||||
|
from nova.openstack.common import cfg
|
||||||
from nova.openstack.common import rpc
|
from nova.openstack.common import rpc
|
||||||
from nova.scheduler import rpcapi as scheduler_rpcapi
|
from nova.scheduler import rpcapi as scheduler_rpcapi
|
||||||
from nova import test
|
from nova import test
|
||||||
|
|
||||||
CONF = config.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
|
|
||||||
class SchedulerRpcAPITestCase(test.TestCase):
|
class SchedulerRpcAPITestCase(test.TestCase):
|
||||||
|
@@ -36,7 +36,6 @@ from nova.api import ec2
|
|||||||
from nova.api.ec2 import apirequest
|
from nova.api.ec2 import apirequest
|
||||||
from nova.api.ec2 import ec2utils
|
from nova.api.ec2 import ec2utils
|
||||||
from nova import block_device
|
from nova import block_device
|
||||||
from nova import config
|
|
||||||
from nova import context
|
from nova import context
|
||||||
from nova import exception
|
from nova import exception
|
||||||
from nova.openstack.common import timeutils
|
from nova.openstack.common import timeutils
|
||||||
|
@@ -22,16 +22,16 @@
|
|||||||
import datetime
|
import datetime
|
||||||
import uuid as stdlib_uuid
|
import uuid as stdlib_uuid
|
||||||
|
|
||||||
from nova import config
|
|
||||||
from nova import context
|
from nova import context
|
||||||
from nova import db
|
from nova import db
|
||||||
from nova import exception
|
from nova import exception
|
||||||
|
from nova.openstack.common import cfg
|
||||||
from nova.openstack.common import timeutils
|
from nova.openstack.common import timeutils
|
||||||
from nova import test
|
from nova import test
|
||||||
from nova.tests import matchers
|
from nova.tests import matchers
|
||||||
|
|
||||||
|
|
||||||
CONF = config.CONF
|
CONF = cfg.CONF
|
||||||
CONF.import_opt('reserved_host_memory_mb', 'nova.compute.resource_tracker')
|
CONF.import_opt('reserved_host_memory_mb', 'nova.compute.resource_tracker')
|
||||||
CONF.import_opt('reserved_host_disk_mb', 'nova.compute.resource_tracker')
|
CONF.import_opt('reserved_host_disk_mb', 'nova.compute.resource_tracker')
|
||||||
|
|
||||||
|
@@ -21,7 +21,7 @@ from nova import config
|
|||||||
from nova.openstack.common import cfg
|
from nova.openstack.common import cfg
|
||||||
from nova import test
|
from nova import test
|
||||||
|
|
||||||
CONF = config.CONF
|
CONF = cfg.CONF
|
||||||
CONF.register_opt(cfg.StrOpt('flags_unittest',
|
CONF.register_opt(cfg.StrOpt('flags_unittest',
|
||||||
default='foo',
|
default='foo',
|
||||||
help='for testing purposes only'))
|
help='for testing purposes only'))
|
||||||
|
@@ -26,10 +26,10 @@ import sys
|
|||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from nova.compute import power_state
|
from nova.compute import power_state
|
||||||
from nova import config
|
|
||||||
from nova import context
|
from nova import context
|
||||||
from nova import db
|
from nova import db
|
||||||
from nova.image import glance
|
from nova.image import glance
|
||||||
|
from nova.openstack.common import cfg
|
||||||
from nova.tests import fake_network
|
from nova.tests import fake_network
|
||||||
from nova.tests.hyperv import basetestcase
|
from nova.tests.hyperv import basetestcase
|
||||||
from nova.tests.hyperv import db_fakes
|
from nova.tests.hyperv import db_fakes
|
||||||
@@ -41,7 +41,7 @@ from nova.virt.hyperv import driver as driver_hyperv
|
|||||||
from nova.virt.hyperv import vmutils
|
from nova.virt.hyperv import vmutils
|
||||||
from nova.virt import images
|
from nova.virt import images
|
||||||
|
|
||||||
CONF = config.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
|
|
||||||
class HyperVAPITestCase(basetestcase.BaseTestCase):
|
class HyperVAPITestCase(basetestcase.BaseTestCase):
|
||||||
|
@@ -17,13 +17,13 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from nova import config
|
from nova.openstack.common import cfg
|
||||||
from nova.openstack.common import fileutils
|
from nova.openstack.common import fileutils
|
||||||
from nova import test
|
from nova import test
|
||||||
from nova.tests import fake_libvirt_utils
|
from nova.tests import fake_libvirt_utils
|
||||||
from nova.virt.libvirt import imagebackend
|
from nova.virt.libvirt import imagebackend
|
||||||
|
|
||||||
CONF = config.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
|
|
||||||
class _ImageTestCase(test.TestCase):
|
class _ImageTestCase(test.TestCase):
|
||||||
|
@@ -29,13 +29,14 @@ from nova.compute import manager as compute_manager
|
|||||||
from nova.compute import vm_states
|
from nova.compute import vm_states
|
||||||
from nova import config
|
from nova import config
|
||||||
from nova import db
|
from nova import db
|
||||||
|
from nova.openstack.common import cfg
|
||||||
from nova.openstack.common import importutils
|
from nova.openstack.common import importutils
|
||||||
from nova.openstack.common import log
|
from nova.openstack.common import log
|
||||||
from nova import utils
|
from nova import utils
|
||||||
from nova.virt.libvirt import imagecache
|
from nova.virt.libvirt import imagecache
|
||||||
from nova.virt.libvirt import utils as virtutils
|
from nova.virt.libvirt import utils as virtutils
|
||||||
|
|
||||||
CONF = config.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
LOG = log.getLogger(__name__)
|
LOG = log.getLogger(__name__)
|
||||||
|
|
||||||
|
@@ -18,7 +18,6 @@ Unit Tests for instance types code
|
|||||||
import time
|
import time
|
||||||
|
|
||||||
from nova.compute import instance_types
|
from nova.compute import instance_types
|
||||||
from nova import config
|
|
||||||
from nova import context
|
from nova import context
|
||||||
from nova import db
|
from nova import db
|
||||||
from nova.db.sqlalchemy import models
|
from nova.db.sqlalchemy import models
|
||||||
|
@@ -37,6 +37,7 @@ from nova import config
|
|||||||
from nova import context
|
from nova import context
|
||||||
from nova import db
|
from nova import db
|
||||||
from nova import exception
|
from nova import exception
|
||||||
|
from nova.openstack.common import cfg
|
||||||
from nova.openstack.common import fileutils
|
from nova.openstack.common import fileutils
|
||||||
from nova.openstack.common import importutils
|
from nova.openstack.common import importutils
|
||||||
from nova.openstack.common import jsonutils
|
from nova.openstack.common import jsonutils
|
||||||
@@ -69,7 +70,7 @@ except ImportError:
|
|||||||
libvirt_driver.libvirt = libvirt
|
libvirt_driver.libvirt = libvirt
|
||||||
|
|
||||||
|
|
||||||
CONF = config.CONF
|
CONF = cfg.CONF
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
_fake_network_info = fake_network.fake_get_instance_nw_info
|
_fake_network_info = fake_network.fake_get_instance_nw_info
|
||||||
|
@@ -16,13 +16,13 @@
|
|||||||
|
|
||||||
from lxml import etree
|
from lxml import etree
|
||||||
|
|
||||||
from nova import config
|
from nova.openstack.common import cfg
|
||||||
from nova import test
|
from nova import test
|
||||||
from nova import utils
|
from nova import utils
|
||||||
from nova.virt.libvirt import config as vconfig
|
from nova.virt.libvirt import config as vconfig
|
||||||
from nova.virt.libvirt import vif
|
from nova.virt.libvirt import vif
|
||||||
|
|
||||||
CONF = config.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
|
|
||||||
class LibvirtVifTestCase(test.TestCase):
|
class LibvirtVifTestCase(test.TestCase):
|
||||||
|
@@ -18,7 +18,6 @@
|
|||||||
Test suite for PowerVMDriver.
|
Test suite for PowerVMDriver.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from nova import config
|
|
||||||
from nova import context
|
from nova import context
|
||||||
from nova import db
|
from nova import db
|
||||||
from nova import test
|
from nova import test
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from nova import config
|
|
||||||
from nova import exception
|
from nova import exception
|
||||||
from nova import test
|
from nova import test
|
||||||
from nova import tests
|
from nova import tests
|
||||||
|
@@ -20,7 +20,6 @@ Test suite for VMWareAPI.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
from nova.compute import power_state
|
from nova.compute import power_state
|
||||||
from nova import config
|
|
||||||
from nova import context
|
from nova import context
|
||||||
from nova import db
|
from nova import db
|
||||||
from nova import exception
|
from nova import exception
|
||||||
|
@@ -33,6 +33,7 @@ from nova import config
|
|||||||
from nova import context
|
from nova import context
|
||||||
from nova import db
|
from nova import db
|
||||||
from nova import exception
|
from nova import exception
|
||||||
|
from nova.openstack.common import cfg
|
||||||
from nova.openstack.common import importutils
|
from nova.openstack.common import importutils
|
||||||
from nova.openstack.common import jsonutils
|
from nova.openstack.common import jsonutils
|
||||||
from nova.openstack.common import log as logging
|
from nova.openstack.common import log as logging
|
||||||
@@ -56,7 +57,7 @@ from nova.virt.xenapi import volume_utils
|
|||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
CONF = config.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
IMAGE_MACHINE = '1'
|
IMAGE_MACHINE = '1'
|
||||||
IMAGE_KERNEL = '2'
|
IMAGE_KERNEL = '2'
|
||||||
|
Reference in New Issue
Block a user