summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/nova-all3
-rwxr-xr-xbin/nova-api3
-rwxr-xr-xbin/nova-cert3
-rwxr-xr-xbin/nova-clear-rabbit-queues2
-rwxr-xr-xbin/nova-compute3
-rwxr-xr-xbin/nova-conductor3
-rwxr-xr-xbin/nova-console3
-rwxr-xr-xbin/nova-consoleauth3
-rwxr-xr-xbin/nova-dhcpbridge3
-rwxr-xr-xbin/nova-manage2
-rwxr-xr-xbin/nova-network3
-rwxr-xr-xbin/nova-novncproxy2
-rwxr-xr-xbin/nova-rpc-zmq-receiver3
-rwxr-xr-xbin/nova-scheduler3
-rw-r--r--nova/api/auth.py2
-rw-r--r--nova/api/ec2/__init__.py2
-rw-r--r--nova/api/ec2/apirequest.py1
-rw-r--r--nova/api/ec2/cloud.py3
-rw-r--r--nova/api/ec2/ec2utils.py1
-rw-r--r--nova/api/ec2/faults.py4
-rw-r--r--nova/api/manager.py3
-rw-r--r--nova/api/metadata/base.py3
-rw-r--r--nova/api/metadata/handler.py3
-rw-r--r--nova/api/openstack/auth.py4
-rw-r--r--nova/api/openstack/common.py3
-rw-r--r--nova/api/openstack/compute/__init__.py3
-rw-r--r--nova/api/openstack/compute/contrib/__init__.py3
-rw-r--r--nova/api/openstack/compute/contrib/admin_actions.py1
-rw-r--r--nova/api/openstack/compute/contrib/certificates.py1
-rw-r--r--nova/api/openstack/compute/contrib/cloudpipe.py3
-rw-r--r--nova/api/openstack/compute/contrib/config_drive.py1
-rw-r--r--nova/api/openstack/compute/contrib/extended_server_attributes.py1
-rw-r--r--nova/api/openstack/compute/contrib/extended_status.py1
-rw-r--r--nova/api/openstack/compute/contrib/fping.py3
-rw-r--r--nova/api/openstack/compute/contrib/hosts.py1
-rw-r--r--nova/api/openstack/compute/contrib/instance_usage_audit_log.py3
-rw-r--r--nova/api/openstack/compute/contrib/networks.py1
-rw-r--r--nova/api/openstack/compute/contrib/rescue.py3
-rw-r--r--nova/api/openstack/compute/contrib/security_groups.py1
-rw-r--r--nova/api/openstack/compute/contrib/services.py3
-rw-r--r--nova/api/openstack/compute/contrib/simple_tenant_usage.py1
-rw-r--r--nova/api/openstack/compute/contrib/volumes.py1
-rw-r--r--nova/api/openstack/compute/extensions.py3
-rw-r--r--nova/api/openstack/compute/image_metadata.py1
-rw-r--r--nova/api/openstack/compute/images.py1
-rw-r--r--nova/api/openstack/compute/ips.py1
-rw-r--r--nova/api/openstack/compute/servers.py3
-rw-r--r--nova/api/openstack/compute/views/addresses.py1
-rw-r--r--nova/api/openstack/compute/views/images.py3
-rw-r--r--nova/api/openstack/compute/views/versions.py3
-rw-r--r--nova/api/openstack/extensions.py1
-rw-r--r--nova/api/sizelimit.py3
-rw-r--r--nova/block_device.py3
-rw-r--r--nova/cert/manager.py1
-rw-r--r--nova/cert/rpcapi.py3
-rw-r--r--nova/cloudpipe/pipelib.py2
-rw-r--r--nova/compute/__init__.py5
-rw-r--r--nova/compute/api.py3
-rw-r--r--nova/compute/instance_types.py3
-rw-r--r--nova/compute/manager.py2
-rw-r--r--nova/compute/resource_tracker.py3
-rw-r--r--nova/compute/rpcapi.py3
-rw-r--r--nova/compute/utils.py3
-rw-r--r--nova/conductor/__init__.py3
-rw-r--r--nova/conductor/api.py2
-rw-r--r--nova/conductor/rpcapi.py3
-rw-r--r--nova/config.py16
-rw-r--r--nova/console/api.py3
-rw-r--r--nova/console/manager.py3
-rw-r--r--nova/console/rpcapi.py3
-rw-r--r--nova/console/vmrc.py3
-rw-r--r--nova/console/vmrc_manager.py3
-rw-r--r--nova/console/xvp.py2
-rw-r--r--nova/consoleauth/__init__.py3
-rw-r--r--nova/consoleauth/manager.py2
-rw-r--r--nova/consoleauth/rpcapi.py4
-rw-r--r--nova/crypto.py2
-rw-r--r--nova/db/api.py3
-rw-r--r--nova/db/base.py3
-rw-r--r--nova/db/sqlalchemy/api.py3
-rw-r--r--nova/db/sqlalchemy/migration.py1
-rw-r--r--nova/db/sqlalchemy/models.py4
-rw-r--r--nova/db/sqlalchemy/session.py3
-rw-r--r--nova/image/glance.py3
-rw-r--r--nova/image/s3.py2
-rw-r--r--nova/ipv6/api.py3
-rw-r--r--nova/manager.py3
-rw-r--r--nova/network/__init__.py5
-rw-r--r--nova/network/api.py1
-rw-r--r--nova/network/l3.py1
-rw-r--r--nova/network/ldapdns.py3
-rw-r--r--nova/network/linux_net.py2
-rw-r--r--nova/network/manager.py2
-rw-r--r--nova/network/minidns.py4
-rw-r--r--nova/network/quantum/nova_ipam_lib.py1
-rw-r--r--nova/network/quantumv2/__init__.py4
-rw-r--r--nova/network/quantumv2/api.py2
-rw-r--r--nova/network/rpcapi.py3
-rw-r--r--nova/notifications.py3
-rw-r--r--nova/objectstore/s3server.py2
-rw-r--r--nova/policy.py3
-rw-r--r--nova/quota.py3
-rw-r--r--nova/scheduler/chance.py3
-rw-r--r--nova/scheduler/driver.py4
-rw-r--r--nova/scheduler/filter_scheduler.py4
-rw-r--r--nova/scheduler/filters/compute_filter.py4
-rw-r--r--nova/scheduler/filters/core_filter.py3
-rw-r--r--nova/scheduler/filters/disk_filter.py3
-rw-r--r--nova/scheduler/filters/io_ops_filter.py3
-rw-r--r--nova/scheduler/filters/isolated_hosts_filter.py3
-rw-r--r--nova/scheduler/filters/num_instances_filter.py3
-rw-r--r--nova/scheduler/filters/ram_filter.py3
-rw-r--r--nova/scheduler/filters/trusted_filter.py3
-rw-r--r--nova/scheduler/host_manager.py3
-rw-r--r--nova/scheduler/manager.py3
-rw-r--r--nova/scheduler/multi.py3
-rw-r--r--nova/scheduler/rpcapi.py3
-rw-r--r--nova/scheduler/scheduler_options.py3
-rw-r--r--nova/scheduler/weights/__init__.py4
-rw-r--r--nova/scheduler/weights/least_cost.py3
-rw-r--r--nova/scheduler/weights/ram.py3
-rw-r--r--nova/service.py2
-rw-r--r--nova/test.py2
-rw-r--r--nova/tests/__init__.py3
-rw-r--r--nova/tests/api/ec2/test_cinder_cloud.py3
-rw-r--r--nova/tests/api/ec2/test_cloud.py3
-rw-r--r--nova/tests/api/ec2/test_ec2_validate.py4
-rw-r--r--nova/tests/api/ec2/test_middleware.py4
-rw-r--r--nova/tests/api/openstack/compute/contrib/test_admin_actions.py4
-rw-r--r--nova/tests/api/openstack/compute/contrib/test_cloudpipe.py3
-rw-r--r--nova/tests/api/openstack/compute/contrib/test_createserverext.py1
-rw-r--r--nova/tests/api/openstack/compute/contrib/test_disk_config.py1
-rw-r--r--nova/tests/api/openstack/compute/contrib/test_extended_server_attributes.py1
-rw-r--r--nova/tests/api/openstack/compute/contrib/test_extended_status.py1
-rw-r--r--nova/tests/api/openstack/compute/contrib/test_flavor_disabled.py1
-rw-r--r--nova/tests/api/openstack/compute/contrib/test_flavor_rxtx.py1
-rw-r--r--nova/tests/api/openstack/compute/contrib/test_flavor_swap.py1
-rw-r--r--nova/tests/api/openstack/compute/contrib/test_networks.py4
-rw-r--r--nova/tests/api/openstack/compute/contrib/test_rescue.py3
-rw-r--r--nova/tests/api/openstack/compute/contrib/test_security_groups.py4
-rw-r--r--nova/tests/api/openstack/compute/contrib/test_simple_tenant_usage.py1
-rw-r--r--nova/tests/api/openstack/compute/contrib/test_snapshots.py1
-rw-r--r--nova/tests/api/openstack/compute/contrib/test_volumes.py3
-rw-r--r--nova/tests/api/openstack/compute/test_consoles.py1
-rw-r--r--nova/tests/api/openstack/compute/test_extensions.py3
-rw-r--r--nova/tests/api/openstack/compute/test_flavors.py1
-rw-r--r--nova/tests/api/openstack/compute/test_image_metadata.py4
-rw-r--r--nova/tests/api/openstack/compute/test_images.py1
-rw-r--r--nova/tests/api/openstack/compute/test_server_actions.py3
-rw-r--r--nova/tests/api/openstack/compute/test_server_metadata.py4
-rw-r--r--nova/tests/api/openstack/compute/test_servers.py3
-rw-r--r--nova/tests/api/openstack/fakes.py1
-rw-r--r--nova/tests/api/test_sizelimit.py4
-rw-r--r--nova/tests/baremetal/db/base.py4
-rw-r--r--nova/tests/cert/test_rpcapi.py3
-rw-r--r--nova/tests/compute/test_compute.py3
-rw-r--r--nova/tests/compute/test_compute_utils.py3
-rw-r--r--nova/tests/compute/test_multiple_nodes.py3
-rw-r--r--nova/tests/compute/test_rpcapi.py3
-rw-r--r--nova/tests/console/test_console.py3
-rw-r--r--nova/tests/console/test_rpcapi.py3
-rw-r--r--nova/tests/consoleauth/test_consoleauth.py1
-rw-r--r--nova/tests/consoleauth/test_rpcapi.py4
-rw-r--r--nova/tests/declare_flags.py3
-rw-r--r--nova/tests/fake_flags.py3
-rw-r--r--nova/tests/fake_network.py3
-rw-r--r--nova/tests/image/fake.py3
-rw-r--r--nova/tests/integrated/test_api_samples.py3
-rw-r--r--nova/tests/integrated/test_extensions.py3
-rw-r--r--nova/tests/integrated/test_multiprocess_api.py1
-rw-r--r--nova/tests/network/test_linux_net.py3
-rw-r--r--nova/tests/network/test_quantumv2.py4
-rw-r--r--nova/tests/network/test_rpcapi.py3
-rw-r--r--nova/tests/runtime_flags.py3
-rw-r--r--nova/tests/scheduler/test_host_filters.py3
-rw-r--r--nova/tests/scheduler/test_least_cost.py3
-rw-r--r--nova/tests/scheduler/test_rpcapi.py3
-rw-r--r--nova/tests/scheduler/test_scheduler.py1
-rw-r--r--nova/tests/test_api.py1
-rw-r--r--nova/tests/test_configdrive2.py1
-rw-r--r--nova/tests/test_crypto.py1
-rw-r--r--nova/tests/test_db_api.py4
-rw-r--r--nova/tests/test_flags.py2
-rw-r--r--nova/tests/test_hypervapi.py4
-rw-r--r--nova/tests/test_imagebackend.py4
-rw-r--r--nova/tests/test_imagecache.py3
-rw-r--r--nova/tests/test_instance_types.py1
-rw-r--r--nova/tests/test_libvirt.py3
-rw-r--r--nova/tests/test_libvirt_vif.py4
-rw-r--r--nova/tests/test_metadata.py4
-rw-r--r--nova/tests/test_notifications.py1
-rw-r--r--nova/tests/test_objectstore.py3
-rw-r--r--nova/tests/test_pipelib.py3
-rw-r--r--nova/tests/test_policy.py1
-rw-r--r--nova/tests/test_powervm.py1
-rw-r--r--nova/tests/test_quota.py3
-rw-r--r--nova/tests/test_service.py3
-rw-r--r--nova/tests/test_utils.py3
-rw-r--r--nova/tests/test_virt.py1
-rw-r--r--nova/tests/test_vmwareapi.py1
-rw-r--r--nova/tests/test_xenapi.py3
-rw-r--r--nova/tests/utils.py4
-rw-r--r--nova/utils.py2
-rw-r--r--nova/virt/baremetal/db/api.py3
-rw-r--r--nova/virt/baremetal/db/sqlalchemy/migration.py1
-rw-r--r--nova/virt/baremetal/db/sqlalchemy/session.py2
-rw-r--r--nova/virt/configdrive.py3
-rw-r--r--nova/virt/disk/api.py2
-rw-r--r--nova/virt/disk/mount/nbd.py3
-rw-r--r--nova/virt/driver.py1
-rw-r--r--nova/virt/firewall.py2
-rw-r--r--nova/virt/hyperv/hostops.py4
-rw-r--r--nova/virt/hyperv/livemigrationops.py3
-rw-r--r--nova/virt/hyperv/snapshotops.py4
-rw-r--r--nova/virt/hyperv/vmops.py2
-rw-r--r--nova/virt/hyperv/vmutils.py4
-rw-r--r--nova/virt/hyperv/volumeops.py2
-rw-r--r--nova/virt/hyperv/volumeutils.py3
-rw-r--r--nova/virt/images.py3
-rw-r--r--nova/virt/libvirt/driver.py2
-rw-r--r--nova/virt/libvirt/firewall.py3
-rw-r--r--nova/virt/libvirt/imagebackend.py3
-rw-r--r--nova/virt/libvirt/imagecache.py2
-rw-r--r--nova/virt/libvirt/utils.py3
-rw-r--r--nova/virt/libvirt/vif.py2
-rw-r--r--nova/virt/libvirt/volume.py3
-rw-r--r--nova/virt/libvirt/volume_nfs.py2
-rw-r--r--nova/virt/netutils.py3
-rw-r--r--nova/virt/powervm/driver.py3
-rw-r--r--nova/virt/powervm/operator.py4
-rw-r--r--nova/virt/vmwareapi/driver.py3
-rw-r--r--nova/virt/vmwareapi/read_write_util.py1
-rw-r--r--nova/virt/vmwareapi/vif.py4
-rw-r--r--nova/virt/vmwareapi/vim.py3
-rw-r--r--nova/virt/vmwareapi/vmops.py3
-rw-r--r--nova/virt/xenapi/agent.py3
-rw-r--r--nova/virt/xenapi/driver.py2
-rw-r--r--nova/virt/xenapi/firewall.py1
-rw-r--r--nova/virt/xenapi/pool.py2
-rw-r--r--nova/virt/xenapi/vif.py3
-rw-r--r--nova/virt/xenapi/vm_utils.py2
-rw-r--r--nova/virt/xenapi/vmops.py2
-rw-r--r--nova/virt/xenapi/volume_utils.py4
-rw-r--r--nova/vnc/__init__.py3
-rw-r--r--nova/vnc/xvp_proxy.py3
-rw-r--r--nova/volume/__init__.py5
-rw-r--r--nova/volume/cinder.py3
-rw-r--r--nova/wsgi.py2
-rw-r--r--tools/conf/extract_opts.py1
-rw-r--r--tools/xenserver/destroy_cached_images.py2
-rwxr-xr-xtools/xenserver/vm_vdi_cleaner.py3
251 files changed, 323 insertions, 343 deletions
diff --git a/bin/nova-all b/bin/nova-all
index dbbd508872..42c8ffbff7 100755
--- a/bin/nova-all
+++ b/bin/nova-all
@@ -42,13 +42,14 @@ if os.path.exists(os.path.join(possible_topdir, "nova", "__init__.py")):
from nova import config
from nova.objectstore import s3server
+from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova import service
from nova import utils
from nova.vnc import xvp_proxy
-CONF = config.CONF
+CONF = cfg.CONF
LOG = logging.getLogger('nova.all')
if __name__ == '__main__':
diff --git a/bin/nova-api b/bin/nova-api
index 5bb7f31b7b..6d3304a958 100755
--- a/bin/nova-api
+++ b/bin/nova-api
@@ -37,11 +37,12 @@ if os.path.exists(os.path.join(possible_topdir, "nova", "__init__.py")):
from nova import config
+from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova import service
from nova import utils
-CONF = config.CONF
+CONF = cfg.CONF
if __name__ == '__main__':
config.parse_args(sys.argv)
diff --git a/bin/nova-cert b/bin/nova-cert
index ffda0e5473..68d2230586 100755
--- a/bin/nova-cert
+++ b/bin/nova-cert
@@ -33,11 +33,12 @@ if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'nova', '__init__.py')):
from nova import config
+from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova import service
from nova import utils
-CONF = config.CONF
+CONF = cfg.CONF
if __name__ == '__main__':
config.parse_args(sys.argv)
diff --git a/bin/nova-clear-rabbit-queues b/bin/nova-clear-rabbit-queues
index 90e9128f3f..cf595fecc1 100755
--- a/bin/nova-clear-rabbit-queues
+++ b/bin/nova-clear-rabbit-queues
@@ -52,7 +52,7 @@ delete_exchange_opt = cfg.BoolOpt('delete_exchange',
default=False,
help='delete nova exchange too.')
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_cli_opt(delete_exchange_opt)
diff --git a/bin/nova-compute b/bin/nova-compute
index 78f4efd206..c00641423d 100755
--- a/bin/nova-compute
+++ b/bin/nova-compute
@@ -42,11 +42,12 @@ if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'nova', '__init__.py')):
from nova import config
+from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova import service
from nova import utils
-CONF = config.CONF
+CONF = cfg.CONF
if __name__ == '__main__':
config.parse_args(sys.argv)
diff --git a/bin/nova-conductor b/bin/nova-conductor
index 2dba8ee1b1..5d9e355ddb 100755
--- a/bin/nova-conductor
+++ b/bin/nova-conductor
@@ -33,11 +33,12 @@ if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')):
from nova import config
+from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova import service
from nova import utils
-CONF = config.CONF
+CONF = cfg.CONF
CONF.import_opt('topic', 'nova.conductor.api', group='conductor')
if __name__ == '__main__':
diff --git a/bin/nova-console b/bin/nova-console
index 6a363c1e7f..6b5b843431 100755
--- a/bin/nova-console
+++ b/bin/nova-console
@@ -34,10 +34,11 @@ if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')):
from nova import config
+from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova import service
-CONF = config.CONF
+CONF = cfg.CONF
if __name__ == '__main__':
config.parse_args(sys.argv)
diff --git a/bin/nova-consoleauth b/bin/nova-consoleauth
index 791ac2de57..9a6016326d 100755
--- a/bin/nova-consoleauth
+++ b/bin/nova-consoleauth
@@ -33,10 +33,11 @@ if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')):
from nova import config
from nova.consoleauth import manager
+from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova import service
-CONF = config.CONF
+CONF = cfg.CONF
if __name__ == "__main__":
config.parse_args(sys.argv)
diff --git a/bin/nova-dhcpbridge b/bin/nova-dhcpbridge
index 21cd5db00e..b1081937fb 100755
--- a/bin/nova-dhcpbridge
+++ b/bin/nova-dhcpbridge
@@ -40,12 +40,13 @@ from nova import context
from nova import db
from nova.network import linux_net
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 log as logging
from nova.openstack.common import rpc
from nova import utils
-CONF = config.CONF
+CONF = cfg.CONF
LOG = logging.getLogger('nova.dhcpbridge')
diff --git a/bin/nova-manage b/bin/nova-manage
index cca67398cd..565c22a1ce 100755
--- a/bin/nova-manage
+++ b/bin/nova-manage
@@ -88,7 +88,7 @@ from nova.scheduler import rpcapi as scheduler_rpcapi
from nova import utils
from nova import version
-CONF = config.CONF
+CONF = cfg.CONF
CONF.import_opt('flat_network_bridge', 'nova.network.manager')
CONF.import_opt('num_networks', 'nova.network.manager')
CONF.import_opt('multi_host', 'nova.network.manager')
diff --git a/bin/nova-network b/bin/nova-network
index fe90e4cceb..7682b8d07b 100755
--- a/bin/nova-network
+++ b/bin/nova-network
@@ -35,11 +35,12 @@ if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')):
from nova import config
+from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova import service
from nova import utils
-CONF = config.CONF
+CONF = cfg.CONF
if __name__ == '__main__':
config.parse_args(sys.argv)
diff --git a/bin/nova-novncproxy b/bin/nova-novncproxy
index ad901656d8..e774c01ed1 100755
--- a/bin/nova-novncproxy
+++ b/bin/nova-novncproxy
@@ -67,7 +67,7 @@ opts = [
help='Port on which to listen for incoming requests'),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_cli_opts(opts)
LOG = logging.getLogger(__name__)
diff --git a/bin/nova-rpc-zmq-receiver b/bin/nova-rpc-zmq-receiver
index e9093f1a50..f89b0b3ba6 100755
--- a/bin/nova-rpc-zmq-receiver
+++ b/bin/nova-rpc-zmq-receiver
@@ -34,12 +34,13 @@ if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'nova', '__init__.py')):
from nova import config
from nova import exception
+from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova.openstack.common import rpc
from nova.openstack.common.rpc import impl_zmq
from nova import utils
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(rpc.rpc_opts)
CONF.register_opts(impl_zmq.zmq_opts)
diff --git a/bin/nova-scheduler b/bin/nova-scheduler
index 7730c5cb0e..e623b5fcfc 100755
--- a/bin/nova-scheduler
+++ b/bin/nova-scheduler
@@ -37,11 +37,12 @@ if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')):
gettext.install('nova', unicode=1)
from nova import config
+from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova import service
from nova import utils
-CONF = config.CONF
+CONF = cfg.CONF
if __name__ == '__main__':
config.parse_args(sys.argv)
diff --git a/nova/api/auth.py b/nova/api/auth.py
index 167c897cf9..b00be750df 100644
--- a/nova/api/auth.py
+++ b/nova/api/auth.py
@@ -34,7 +34,7 @@ use_forwarded_for_opt = cfg.BoolOpt('use_forwarded_for',
help='Treat X-Forwarded-For as the canonical remote address. '
'Only enable this if you have a sanitizing proxy.')
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opt(use_forwarded_for_opt)
LOG = logging.getLogger(__name__)
diff --git a/nova/api/ec2/__init__.py b/nova/api/ec2/__init__.py
index a4a52a22a7..58c8c5d520 100644
--- a/nova/api/ec2/__init__.py
+++ b/nova/api/ec2/__init__.py
@@ -71,7 +71,7 @@ ec2_opts = [
help='Time in seconds before ec2 timestamp expires'),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(ec2_opts)
CONF.import_opt('use_forwarded_for', 'nova.api.auth')
diff --git a/nova/api/ec2/apirequest.py b/nova/api/ec2/apirequest.py
index c3b2065b4d..7e0f7986af 100644
--- a/nova/api/ec2/apirequest.py
+++ b/nova/api/ec2/apirequest.py
@@ -25,7 +25,6 @@ import datetime
from xml.dom import minidom
from nova.api.ec2 import ec2utils
-from nova import config
from nova import exception
from nova.openstack.common import log as logging
diff --git a/nova/api/ec2/cloud.py b/nova/api/ec2/cloud.py
index a061931b0d..1c43661bbf 100644
--- a/nova/api/ec2/cloud.py
+++ b/nova/api/ec2/cloud.py
@@ -38,6 +38,7 @@ from nova import db
from nova import exception
from nova.image import s3
from nova import network
+from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova.openstack.common import timeutils
from nova import quota
@@ -45,7 +46,7 @@ from nova import utils
from nova import volume
-CONF = config.CONF
+CONF = cfg.CONF
LOG = logging.getLogger(__name__)
diff --git a/nova/api/ec2/ec2utils.py b/nova/api/ec2/ec2utils.py
index 238bbecb94..d5beb017ff 100644
--- a/nova/api/ec2/ec2utils.py
+++ b/nova/api/ec2/ec2utils.py
@@ -18,7 +18,6 @@
import re
-from nova import config
from nova import context
from nova import db
from nova import exception
diff --git a/nova/api/ec2/faults.py b/nova/api/ec2/faults.py
index fd2e46fcd7..9299a946cc 100644
--- a/nova/api/ec2/faults.py
+++ b/nova/api/ec2/faults.py
@@ -15,11 +15,11 @@
import webob.dec
import webob.exc
-from nova import config
from nova import context
+from nova.openstack.common import cfg
from nova import utils
-CONF = config.CONF
+CONF = cfg.CONF
class Fault(webob.exc.HTTPException):
diff --git a/nova/api/manager.py b/nova/api/manager.py
index d74e0ad24c..a3fae4c10e 100644
--- a/nova/api/manager.py
+++ b/nova/api/manager.py
@@ -18,9 +18,10 @@
from nova import config
from nova import manager
+from nova.openstack.common import cfg
from nova.openstack.common import importutils
-CONF = config.CONF
+CONF = cfg.CONF
class MetadataManager(manager.Manager):
diff --git a/nova/api/metadata/base.py b/nova/api/metadata/base.py
index 937938b409..8e5bcb3703 100644
--- a/nova/api/metadata/base.py
+++ b/nova/api/metadata/base.py
@@ -25,7 +25,6 @@ import posixpath
from nova.api.ec2 import ec2utils
from nova import block_device
-from nova import config
from nova import context
from nova import db
from nova import network
@@ -41,7 +40,7 @@ metadata_opts = [
'config drive')),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(metadata_opts)
CONF.import_opt('dhcp_domain', 'nova.network.manager')
diff --git a/nova/api/metadata/handler.py b/nova/api/metadata/handler.py
index 434d8deba0..cca8834056 100644
--- a/nova/api/metadata/handler.py
+++ b/nova/api/metadata/handler.py
@@ -25,10 +25,11 @@ import webob.exc
from nova.api.metadata import base
from nova import config
from nova import exception
+from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova import wsgi
-CONF = config.CONF
+CONF = cfg.CONF
CONF.import_opt('use_forwarded_for', 'nova.api.auth')
LOG = logging.getLogger(__name__)
diff --git a/nova/api/openstack/auth.py b/nova/api/openstack/auth.py
index 4d680fa940..24276b2bd0 100644
--- a/nova/api/openstack/auth.py
+++ b/nova/api/openstack/auth.py
@@ -21,13 +21,13 @@ import webob.dec
import webob.exc
from nova.api.openstack import wsgi
-from nova import config
from nova import context
+from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova import wsgi as base_wsgi
LOG = logging.getLogger(__name__)
-CONF = config.CONF
+CONF = cfg.CONF
CONF.import_opt('use_forwarded_for', 'nova.api.auth')
diff --git a/nova/api/openstack/common.py b/nova/api/openstack/common.py
index 38247a55b5..877fedaa87 100644
--- a/nova/api/openstack/common.py
+++ b/nova/api/openstack/common.py
@@ -30,12 +30,13 @@ from nova.compute import utils as compute_utils
from nova.compute import vm_states
from nova import config
from nova import exception
+from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova import quota
LOG = logging.getLogger(__name__)
-CONF = config.CONF
+CONF = cfg.CONF
QUOTAS = quota.QUOTAS
diff --git a/nova/api/openstack/compute/__init__.py b/nova/api/openstack/compute/__init__.py
index dc18a01a54..f886717338 100644
--- a/nova/api/openstack/compute/__init__.py
+++ b/nova/api/openstack/compute/__init__.py
@@ -31,7 +31,6 @@ from nova.api.openstack.compute import limits
from nova.api.openstack.compute import server_metadata
from nova.api.openstack.compute import servers
from nova.api.openstack.compute import versions
-from nova import config
from nova.openstack.common import cfg
from nova.openstack.common import log as logging
@@ -42,7 +41,7 @@ allow_instance_snapshots_opt = cfg.BoolOpt('allow_instance_snapshots',
default=True,
help='Permit instance snapshot operations.')
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opt(allow_instance_snapshots_opt)
diff --git a/nova/api/openstack/compute/contrib/__init__.py b/nova/api/openstack/compute/contrib/__init__.py
index fc29433808..de912d6d8d 100644
--- a/nova/api/openstack/compute/contrib/__init__.py
+++ b/nova/api/openstack/compute/contrib/__init__.py
@@ -23,10 +23,11 @@ It can't be called 'extensions' because that causes namespacing problems.
from nova.api.openstack import extensions
from nova import config
+from nova.openstack.common import cfg
from nova.openstack.common import log as logging
-CONF = config.CONF
+CONF = cfg.CONF
LOG = logging.getLogger(__name__)
diff --git a/nova/api/openstack/compute/contrib/admin_actions.py b/nova/api/openstack/compute/contrib/admin_actions.py
index 3614d7ba1c..d651ed20ab 100644
--- a/nova/api/openstack/compute/contrib/admin_actions.py
+++ b/nova/api/openstack/compute/contrib/admin_actions.py
@@ -23,7 +23,6 @@ from nova.api.openstack import extensions
from nova.api.openstack import wsgi
from nova import compute
from nova.compute import vm_states
-from nova import config
from nova import exception
from nova.openstack.common import log as logging
diff --git a/nova/api/openstack/compute/contrib/certificates.py b/nova/api/openstack/compute/contrib/certificates.py
index c53fdabd58..11d819315b 100644
--- a/nova/api/openstack/compute/contrib/certificates.py
+++ b/nova/api/openstack/compute/contrib/certificates.py
@@ -20,7 +20,6 @@ from nova.api.openstack import extensions
from nova.api.openstack import wsgi
from nova.api.openstack import xmlutil
import nova.cert.rpcapi
-from nova import config
from nova import network
from nova.openstack.common import log as logging
diff --git a/nova/api/openstack/compute/contrib/cloudpipe.py b/nova/api/openstack/compute/contrib/cloudpipe.py
index 302ff7cf30..c41052ef12 100644
--- a/nova/api/openstack/compute/contrib/cloudpipe.py
+++ b/nova/api/openstack/compute/contrib/cloudpipe.py
@@ -25,12 +25,13 @@ from nova import config
from nova import db
from nova import exception
from nova import network
+from nova.openstack.common import cfg
from nova.openstack.common import fileutils
from nova.openstack.common import log as logging
from nova.openstack.common import timeutils
from nova import utils
-CONF = config.CONF
+CONF = cfg.CONF
LOG = logging.getLogger(__name__)
authorize = extensions.extension_authorizer('compute', 'cloudpipe')
diff --git a/nova/api/openstack/compute/contrib/config_drive.py b/nova/api/openstack/compute/contrib/config_drive.py
index b972cf9b97..efdfe13cae 100644
--- a/nova/api/openstack/compute/contrib/config_drive.py
+++ b/nova/api/openstack/compute/contrib/config_drive.py
@@ -21,7 +21,6 @@ from nova.api.openstack.compute import servers
from nova.api.openstack import extensions
from nova.api.openstack import wsgi
from nova.api.openstack import xmlutil
-from nova import config
authorize = extensions.soft_extension_authorizer('compute', 'config_drive')
diff --git a/nova/api/openstack/compute/contrib/extended_server_attributes.py b/nova/api/openstack/compute/contrib/extended_server_attributes.py
index 06847c727a..51fd7f3751 100644
--- a/nova/api/openstack/compute/contrib/extended_server_attributes.py
+++ b/nova/api/openstack/compute/contrib/extended_server_attributes.py
@@ -18,7 +18,6 @@ from nova.api.openstack import extensions
from nova.api.openstack import wsgi
from nova.api.openstack import xmlutil
from nova import compute
-from nova import config
from nova import db
from nova.openstack.common import log as logging
diff --git a/nova/api/openstack/compute/contrib/extended_status.py b/nova/api/openstack/compute/contrib/extended_status.py
index 55ff930f2f..759e361da3 100644
--- a/nova/api/openstack/compute/contrib/extended_status.py
+++ b/nova/api/openstack/compute/contrib/extended_status.py
@@ -18,7 +18,6 @@ from nova.api.openstack import extensions
from nova.api.openstack import wsgi
from nova.api.openstack import xmlutil
from nova import compute
-from nova import config
from nova.openstack.common import log as logging
LOG = logging.getLogger(__name__)
diff --git a/nova/api/openstack/compute/contrib/fping.py b/nova/api/openstack/compute/contrib/fping.py
index 8901195700..5afc6bc787 100644
--- a/nova/api/openstack/compute/contrib/fping.py
+++ b/nova/api/openstack/compute/contrib/fping.py
@@ -25,7 +25,6 @@ from webob import exc
from nova.api.openstack import common
from nova.api.openstack import extensions
from nova import compute
-from nova import config
from nova import exception
from nova.openstack.common import cfg
from nova.openstack.common import log as logging
@@ -42,7 +41,7 @@ fping_opts = [
help="Full path to fping."),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(fping_opts)
diff --git a/nova/api/openstack/compute/contrib/hosts.py b/nova/api/openstack/compute/contrib/hosts.py
index 32582548c4..cc4144293c 100644
--- a/nova/api/openstack/compute/contrib/hosts.py
+++ b/nova/api/openstack/compute/contrib/hosts.py
@@ -23,7 +23,6 @@ from nova.api.openstack import extensions
from nova.api.openstack import wsgi
from nova.api.openstack import xmlutil
from nova.compute import api as compute_api
-from nova import config
from nova import db
from nova import exception
from nova.openstack.common import log as logging
diff --git a/nova/api/openstack/compute/contrib/instance_usage_audit_log.py b/nova/api/openstack/compute/contrib/instance_usage_audit_log.py
index 31a66b8feb..825d144332 100644
--- a/nova/api/openstack/compute/contrib/instance_usage_audit_log.py
+++ b/nova/api/openstack/compute/contrib/instance_usage_audit_log.py
@@ -23,9 +23,10 @@ import webob.exc
from nova.api.openstack import extensions
from nova import config
from nova import db
+from nova.openstack.common import cfg
from nova import utils
-CONF = config.CONF
+CONF = cfg.CONF
authorize = extensions.extension_authorizer('compute',
diff --git a/nova/api/openstack/compute/contrib/networks.py b/nova/api/openstack/compute/contrib/networks.py
index e7b7ac8a65..0a494ea88a 100644
--- a/nova/api/openstack/compute/contrib/networks.py
+++ b/nova/api/openstack/compute/contrib/networks.py
@@ -21,7 +21,6 @@ import webob
from webob import exc
from nova.api.openstack import extensions
-from nova import config
from nova import exception
from nova import network
from nova.openstack.common import log as logging
diff --git a/nova/api/openstack/compute/contrib/rescue.py b/nova/api/openstack/compute/contrib/rescue.py
index b76b54e8b4..02a961c228 100644
--- a/nova/api/openstack/compute/contrib/rescue.py
+++ b/nova/api/openstack/compute/contrib/rescue.py
@@ -23,11 +23,12 @@ from nova.api.openstack import wsgi
from nova import compute
from nova import config
from nova import exception
+from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova import utils
-CONF = config.CONF
+CONF = cfg.CONF
LOG = logging.getLogger(__name__)
authorize = exts.extension_authorizer('compute', 'rescue')
diff --git a/nova/api/openstack/compute/contrib/security_groups.py b/nova/api/openstack/compute/contrib/security_groups.py
index ac5206a632..c382ce1d5f 100644
--- a/nova/api/openstack/compute/contrib/security_groups.py
+++ b/nova/api/openstack/compute/contrib/security_groups.py
@@ -27,7 +27,6 @@ from nova.api.openstack import wsgi
from nova.api.openstack import xmlutil
from nova import compute
from nova.compute import api as compute_api
-from nova import config
from nova import db
from nova import exception
from nova.openstack.common import log as logging
diff --git a/nova/api/openstack/compute/contrib/services.py b/nova/api/openstack/compute/contrib/services.py
index 6c3a6688d5..793395b0b7 100644
--- a/nova/api/openstack/compute/contrib/services.py
+++ b/nova/api/openstack/compute/contrib/services.py
@@ -24,6 +24,7 @@ from nova.api.openstack import xmlutil
from nova import config
from nova import db
from nova import exception
+from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova.openstack.common import timeutils
from nova import utils
@@ -31,7 +32,7 @@ from nova import utils
LOG = logging.getLogger(__name__)
authorize = extensions.extension_authorizer('compute', 'services')
-CONF = config.CONF
+CONF = cfg.CONF
class ServicesIndexTemplate(xmlutil.TemplateBuilder):
diff --git a/nova/api/openstack/compute/contrib/simple_tenant_usage.py b/nova/api/openstack/compute/contrib/simple_tenant_usage.py
index c51faef1bf..9fc2e97fb1 100644
--- a/nova/api/openstack/compute/contrib/simple_tenant_usage.py
+++ b/nova/api/openstack/compute/contrib/simple_tenant_usage.py
@@ -22,7 +22,6 @@ from nova.api.openstack import extensions
from nova.api.openstack import wsgi
from nova.api.openstack import xmlutil
from nova.compute import api
-from nova import config
from nova import exception
from nova.openstack.common import timeutils
diff --git a/nova/api/openstack/compute/contrib/volumes.py b/nova/api/openstack/compute/contrib/volumes.py
index c58a70d3cb..abdef3a7d3 100644
--- a/nova/api/openstack/compute/contrib/volumes.py
+++ b/nova/api/openstack/compute/contrib/volumes.py
@@ -24,7 +24,6 @@ from nova.api.openstack import extensions
from nova.api.openstack import wsgi
from nova.api.openstack import xmlutil
from nova import compute
-from nova import config
from nova import exception
from nova.openstack.common import log as logging
from nova import utils
diff --git a/nova/api/openstack/compute/extensions.py b/nova/api/openstack/compute/extensions.py
index 4805ba4e6c..c92f8b19f4 100644
--- a/nova/api/openstack/compute/extensions.py
+++ b/nova/api/openstack/compute/extensions.py
@@ -17,12 +17,13 @@
from nova.api.openstack import extensions as base_extensions
from nova import config
+from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova.openstack.common.plugin import pluginmanager
LOG = logging.getLogger(__name__)
-CONF = config.CONF
+CONF = cfg.CONF
class ExtensionManager(base_extensions.ExtensionManager):
diff --git a/nova/api/openstack/compute/image_metadata.py b/nova/api/openstack/compute/image_metadata.py
index 375bbc4d59..0c673f35e1 100644
--- a/nova/api/openstack/compute/image_metadata.py
+++ b/nova/api/openstack/compute/image_metadata.py
@@ -19,7 +19,6 @@ from webob import exc
from nova.api.openstack import common
from nova.api.openstack import wsgi
-from nova import config
from nova import exception
from nova.image import glance
diff --git a/nova/api/openstack/compute/images.py b/nova/api/openstack/compute/images.py
index bdd0e09162..7dda64f87f 100644
--- a/nova/api/openstack/compute/images.py
+++ b/nova/api/openstack/compute/images.py
@@ -19,7 +19,6 @@ from nova.api.openstack import common
from nova.api.openstack.compute.views import images as views_images
from nova.api.openstack import wsgi
from nova.api.openstack import xmlutil
-from nova import config
from nova import exception
import nova.image.glance
from nova.openstack.common import log as logging
diff --git a/nova/api/openstack/compute/ips.py b/nova/api/openstack/compute/ips.py
index a01066d0e1..7b196d956c 100644
--- a/nova/api/openstack/compute/ips.py
+++ b/nova/api/openstack/compute/ips.py
@@ -22,7 +22,6 @@ from nova.api.openstack import common
from nova.api.openstack.compute.views import addresses as view_addresses
from nova.api.openstack import wsgi
from nova.api.openstack import xmlutil
-from nova import config
from nova.openstack.common import log as logging
LOG = logging.getLogger(__name__)
diff --git a/nova/api/openstack/compute/servers.py b/nova/api/openstack/compute/servers.py
index 2c22ccc48f..e105969ddf 100644
--- a/nova/api/openstack/compute/servers.py
+++ b/nova/api/openstack/compute/servers.py
@@ -32,6 +32,7 @@ from nova import compute
from nova.compute import instance_types
from nova import config
from nova import exception
+from nova.openstack.common import cfg
from nova.openstack.common import importutils
from nova.openstack.common import log as logging
from nova.openstack.common.rpc import common as rpc_common
@@ -41,7 +42,7 @@ from nova import utils
LOG = logging.getLogger(__name__)
-CONF = config.CONF
+CONF = cfg.CONF
def make_fault(elem):
diff --git a/nova/api/openstack/compute/views/addresses.py b/nova/api/openstack/compute/views/addresses.py
index c5ccb02fdc..e1d75a9aa7 100644
--- a/nova/api/openstack/compute/views/addresses.py
+++ b/nova/api/openstack/compute/views/addresses.py
@@ -18,7 +18,6 @@
import itertools
from nova.api.openstack import common
-from nova import config
from nova.openstack.common import log as logging
LOG = logging.getLogger(__name__)
diff --git a/nova/api/openstack/compute/views/images.py b/nova/api/openstack/compute/views/images.py
index 228af7c8d7..cf67334318 100644
--- a/nova/api/openstack/compute/views/images.py
+++ b/nova/api/openstack/compute/views/images.py
@@ -19,9 +19,10 @@ import os.path
from nova.api.openstack import common
from nova import config
+from nova.openstack.common import cfg
from nova import utils
-CONF = config.CONF
+CONF = cfg.CONF
class ViewBuilder(common.ViewBuilder):
diff --git a/nova/api/openstack/compute/views/versions.py b/nova/api/openstack/compute/views/versions.py
index 594369490a..d3019ada62 100644
--- a/nova/api/openstack/compute/views/versions.py
+++ b/nova/api/openstack/compute/views/versions.py
@@ -20,9 +20,10 @@ import os
from nova.api.openstack import common
from nova import config
+from nova.openstack.common import cfg
-CONF = config.CONF
+CONF = cfg.CONF
def get_view_builder(req):
diff --git a/nova/api/openstack/extensions.py b/nova/api/openstack/extensions.py
index b44ebefbbb..a94065ab0f 100644
--- a/nova/api/openstack/extensions.py
+++ b/nova/api/openstack/extensions.py
@@ -24,7 +24,6 @@ import webob.exc
import nova.api.openstack
from nova.api.openstack import wsgi
from nova.api.openstack import xmlutil
-from nova import config
from nova import exception
from nova.openstack.common import importutils
from nova.openstack.common import log as logging
diff --git a/nova/api/sizelimit.py b/nova/api/sizelimit.py
index 95fa381ff6..70ff73b2b6 100644
--- a/nova/api/sizelimit.py
+++ b/nova/api/sizelimit.py
@@ -21,7 +21,6 @@ Request Body limiting middleware.
import webob.dec
import webob.exc
-from nova import config
from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova import wsgi
@@ -33,7 +32,7 @@ max_request_body_size_opt = cfg.IntOpt('osapi_max_request_body_size',
help='the maximum body size '
'per each osapi request(bytes)')
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opt(max_request_body_size_opt)
LOG = logging.getLogger(__name__)
diff --git a/nova/block_device.py b/nova/block_device.py
index bf923ecc0a..7c06f4898b 100644
--- a/nova/block_device.py
+++ b/nova/block_device.py
@@ -18,8 +18,9 @@
import re
from nova import config
+from nova.openstack.common import cfg
-CONF = config.CONF
+CONF = cfg.CONF
DEFAULT_ROOT_DEV_NAME = '/dev/sda1'
_DEFAULT_MAPPINGS = {'ami': 'sda1',
diff --git a/nova/cert/manager.py b/nova/cert/manager.py
index 0d0e795c70..2d17a675a9 100644
--- a/nova/cert/manager.py
+++ b/nova/cert/manager.py
@@ -26,7 +26,6 @@ Cert manager manages x509 certificates.
import base64
-from nova import config
from nova import crypto
from nova import manager
from nova.openstack.common import log as logging
diff --git a/nova/cert/rpcapi.py b/nova/cert/rpcapi.py
index 7665f544c0..da64be4360 100644
--- a/nova/cert/rpcapi.py
+++ b/nova/cert/rpcapi.py
@@ -19,9 +19,10 @@ Client side of the cert manager RPC API.
"""
from nova import config
+from nova.openstack.common import cfg
import nova.openstack.common.rpc.proxy
-CONF = config.CONF
+CONF = cfg.CONF
class CertAPI(nova.openstack.common.rpc.proxy.RpcProxy):
diff --git a/nova/cloudpipe/pipelib.py b/nova/cloudpipe/pipelib.py
index 5a74f1f8b0..5fa8dd7027 100644
--- a/nova/cloudpipe/pipelib.py
+++ b/nova/cloudpipe/pipelib.py
@@ -53,7 +53,7 @@ cloudpipe_opts = [
help=_('Netmask to push into openvpn config')),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(cloudpipe_opts)
CONF.import_opt('cnt_vpn_clients', 'nova.network.manager')
diff --git a/nova/compute/__init__.py b/nova/compute/__init__.py
index c52b80e02a..f9e4740352 100644
--- a/nova/compute/__init__.py
+++ b/nova/compute/__init__.py
@@ -18,11 +18,12 @@
# Importing full names to not pollute the namespace and cause possible
# collisions with use of 'from nova.compute import <foo>' elsewhere.
-import nova.config
+import nova.openstack.common.cfg
import nova.openstack.common.importutils
def API(*args, **kwargs):
importutils = nova.openstack.common.importutils
- cls = importutils.import_class(nova.config.CONF.compute_api_class)
+ compute_api_class = nova.openstack.common.cfg.CONF.compute_api_class
+ cls = importutils.import_class(compute_api_class)
return cls(*args, **kwargs)
diff --git a/nova/compute/api.py b/nova/compute/api.py
index 6da04c97b9..4d2e2534f1 100644
--- a/nova/compute/api.py
+++ b/nova/compute/api.py
@@ -44,6 +44,7 @@ from nova import exception
from nova.image import glance
from nova import network
from nova import notifications
+from nova.openstack.common import cfg
from nova.openstack.common import excutils
from nova.openstack.common import importutils
from nova.openstack.common import jsonutils
@@ -59,7 +60,7 @@ from nova import volume
LOG = logging.getLogger(__name__)
-CONF = config.CONF
+CONF = cfg.CONF
CONF.import_opt('consoleauth_topic', 'nova.consoleauth')
MAX_USERDATA_SIZE = 65535
diff --git a/nova/compute/instance_types.py b/nova/compute/instance_types.py
index c35065a8f9..630b86da1b 100644
--- a/nova/compute/instance_types.py
+++ b/nova/compute/instance_types.py
@@ -27,10 +27,11 @@ from nova import config
from nova import context
from nova import db
from nova import exception
+from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova import utils
-CONF = config.CONF
+CONF = cfg.CONF
LOG = logging.getLogger(__name__)
INVALID_NAME_REGEX = re.compile("[^\w\.\- ]")
diff --git a/nova/compute/manager.py b/nova/compute/manager.py
index 18cc91e127..a0bf61697b 100644
--- a/nova/compute/manager.py
+++ b/nova/compute/manager.py
@@ -141,7 +141,7 @@ compute_opts = [
help="Generate periodic compute.instance.exists notifications"),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(compute_opts)
QUOTAS = quota.QUOTAS
diff --git a/nova/compute/resource_tracker.py b/nova/compute/resource_tracker.py
index 8c799573de..e1f8f86535 100644
--- a/nova/compute/resource_tracker.py
+++ b/nova/compute/resource_tracker.py
@@ -23,7 +23,6 @@ from nova.compute import claims
from nova.compute import instance_types
from nova.compute import task_states
from nova.compute import vm_states
-from nova import config
from nova import context
from nova import db
from nova import exception
@@ -44,7 +43,7 @@ resource_tracker_opts = [
help='Class that will manage stats for the local compute host')
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(resource_tracker_opts)
LOG = logging.getLogger(__name__)
diff --git a/nova/compute/rpcapi.py b/nova/compute/rpcapi.py
index 94551ce2a2..52386ef87b 100644
--- a/nova/compute/rpcapi.py
+++ b/nova/compute/rpcapi.py
@@ -20,11 +20,12 @@ Client side of the compute RPC API.
from nova import config
from nova import exception
+from nova.openstack.common import cfg
from nova.openstack.common import jsonutils
from nova.openstack.common import rpc
import nova.openstack.common.rpc.proxy
-CONF = config.CONF
+CONF = cfg.CONF
def _compute_topic(topic, ctxt, host, instance):
diff --git a/nova/compute/utils.py b/nova/compute/utils.py
index d0428d67b7..f2eace6aeb 100644
--- a/nova/compute/utils.py
+++ b/nova/compute/utils.py
@@ -27,11 +27,12 @@ from nova import db
from nova import exception
from nova.network import model as network_model
from nova import notifications
+from nova.openstack.common import cfg
from nova.openstack.common import log
from nova.openstack.common.notifier import api as notifier_api
from nova import utils
-CONF = config.CONF
+CONF = cfg.CONF
LOG = log.getLogger(__name__)
diff --git a/nova/conductor/__init__.py b/nova/conductor/__init__.py
index 036860dbfe..fb1fd26d3a 100644
--- a/nova/conductor/__init__.py
+++ b/nova/conductor/__init__.py
@@ -14,11 +14,12 @@
from nova.conductor import api as conductor_api
import nova.config
+import nova.openstack.common.cfg
import nova.openstack.common.importutils
def API(*args, **kwargs):
- if nova.config.CONF.conductor.use_local:
+ if nova.openstack.common.cfg.CONF.conductor.use_local:
api = conductor_api.LocalAPI
else:
api = conductor_api.API
diff --git a/nova/conductor/api.py b/nova/conductor/api.py
index acb4126258..282005fcde 100644
--- a/nova/conductor/api.py
+++ b/nova/conductor/api.py
@@ -32,7 +32,7 @@ conductor_opts = [
]
conductor_group = cfg.OptGroup(name='conductor',
title='Conductor Options')
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_group(conductor_group)
CONF.register_opts(conductor_opts, conductor_group)
diff --git a/nova/conductor/rpcapi.py b/nova/conductor/rpcapi.py
index 7a6508f12d..123aa0b87d 100644
--- a/nova/conductor/rpcapi.py
+++ b/nova/conductor/rpcapi.py
@@ -15,9 +15,10 @@
"""Client side of the conductor RPC API"""
from nova import config
+from nova.openstack.common import cfg
import nova.openstack.common.rpc.proxy
-CONF = config.CONF
+CONF = cfg.CONF
class ConductorAPI(nova.openstack.common.rpc.proxy.RpcProxy):
diff --git a/nova/config.py b/nova/config.py
index c991e82ea8..613333724f 100644
--- a/nova/config.py
+++ b/nova/config.py
@@ -22,8 +22,6 @@ import socket
from nova.openstack.common import cfg
-CONF = cfg.CONF
-
def _get_my_ip():
"""
@@ -77,8 +75,8 @@ debug_opts = [
help='Add python stack traces to SQL as comment strings'),
]
-CONF.register_cli_opts(core_opts)
-CONF.register_cli_opts(debug_opts)
+cfg.CONF.register_cli_opts(core_opts)
+cfg.CONF.register_cli_opts(debug_opts)
global_opts = [
cfg.StrOpt('my_ip',
@@ -372,11 +370,11 @@ global_opts = [
'vmwareapi.VMWareESXDriver'),
]
-CONF.register_opts(global_opts)
+cfg.CONF.register_opts(global_opts)
def parse_args(argv, default_config_files=None):
- CONF.disable_interspersed_args()
- return argv[:1] + CONF(argv[1:],
- project='nova',
- default_config_files=default_config_files)
+ cfg.CONF.disable_interspersed_args()
+ return argv[:1] + cfg.CONF(argv[1:],
+ project='nova',
+ default_config_files=default_config_files)
diff --git a/nova/console/api.py b/nova/console/api.py
index 0ddea69d8c..ead6a18891 100644
--- a/nova/console/api.py
+++ b/nova/console/api.py
@@ -21,10 +21,11 @@ from nova.compute import rpcapi as compute_rpcapi
from nova import config
from nova.console import rpcapi as console_rpcapi
from nova.db import base
+from nova.openstack.common import cfg
from nova.openstack.common import rpc
from nova.openstack.common import uuidutils
-CONF = config.CONF
+CONF = cfg.CONF
class API(base.Base):
diff --git a/nova/console/manager.py b/nova/console/manager.py
index b4732844a2..6bae3b45c6 100644
--- a/nova/console/manager.py
+++ b/nova/console/manager.py
@@ -20,7 +20,6 @@
import socket
from nova.compute import rpcapi as compute_rpcapi
-from nova import config
from nova import exception
from nova import manager
from nova.openstack.common import cfg
@@ -41,7 +40,7 @@ console_manager_opts = [
help='Publicly visible name for this console host'),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(console_manager_opts)
LOG = logging.getLogger(__name__)
diff --git a/nova/console/rpcapi.py b/nova/console/rpcapi.py
index b401c4c4ee..41258c8bac 100644
--- a/nova/console/rpcapi.py
+++ b/nova/console/rpcapi.py
@@ -19,9 +19,10 @@ Client side of the console RPC API.
"""
from nova import config
+from nova.openstack.common import cfg
import nova.openstack.common.rpc.proxy
-CONF = config.CONF
+CONF = cfg.CONF
class ConsoleAPI(nova.openstack.common.rpc.proxy.RpcProxy):
diff --git a/nova/console/vmrc.py b/nova/console/vmrc.py
index a10bf9951a..fcd733cf9d 100644
--- a/nova/console/vmrc.py
+++ b/nova/console/vmrc.py
@@ -19,7 +19,6 @@
import base64
-from nova import config
from nova import exception
from nova.openstack.common import cfg
from nova.openstack.common import jsonutils
@@ -35,7 +34,7 @@ vmrc_opts = [
help="number of retries for retrieving VMRC information"),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(vmrc_opts)
diff --git a/nova/console/vmrc_manager.py b/nova/console/vmrc_manager.py
index 3990b48b94..e8eab4db22 100644
--- a/nova/console/vmrc_manager.py
+++ b/nova/console/vmrc_manager.py
@@ -18,7 +18,6 @@
"""VMRC Console Manager."""
from nova.compute import rpcapi as compute_rpcapi
-from nova import config
from nova import exception
from nova import manager
from nova.openstack.common import cfg
@@ -29,7 +28,7 @@ from nova.virt.vmwareapi import driver as vmwareapi_conn
LOG = logging.getLogger(__name__)
-CONF = config.CONF
+CONF = cfg.CONF
CONF.import_opt('console_driver', 'nova.console.manager')
CONF.import_opt('console_public_hostname', 'nova.console.manager')
diff --git a/nova/console/xvp.py b/nova/console/xvp.py
index 6bcd853454..5d23efec6a 100644
--- a/nova/console/xvp.py
+++ b/nova/console/xvp.py
@@ -49,7 +49,7 @@ xvp_opts = [
help='port for XVP to multiplex VNC connections on'),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(xvp_opts)
LOG = logging.getLogger(__name__)
diff --git a/nova/consoleauth/__init__.py b/nova/consoleauth/__init__.py
index dbff115ffd..c533043f37 100644
--- a/nova/consoleauth/__init__.py
+++ b/nova/consoleauth/__init__.py
@@ -18,7 +18,6 @@
"""Module to authenticate Consoles."""
-from nova import config
from nova.openstack.common import cfg
@@ -26,5 +25,5 @@ consoleauth_topic_opt = cfg.StrOpt('consoleauth_topic',
default='consoleauth',
help='the topic console auth proxy nodes listen on')
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opt(consoleauth_topic_opt)
diff --git a/nova/consoleauth/manager.py b/nova/consoleauth/manager.py
index 9a3f03e5a4..b4747b1b16 100644
--- a/nova/consoleauth/manager.py
+++ b/nova/consoleauth/manager.py
@@ -38,7 +38,7 @@ consoleauth_opts = [
help='Manager for console auth'),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(consoleauth_opts)
diff --git a/nova/consoleauth/rpcapi.py b/nova/consoleauth/rpcapi.py
index 822f401bc6..f4b4390ac2 100644
--- a/nova/consoleauth/rpcapi.py
+++ b/nova/consoleauth/rpcapi.py
@@ -18,10 +18,10 @@
Client side of the consoleauth RPC API.
"""
-from nova import config
+from nova.openstack.common import cfg
import nova.openstack.common.rpc.proxy
-CONF = config.CONF
+CONF = cfg.CONF
class ConsoleAuthAPI(nova.openstack.common.rpc.proxy.RpcProxy):
diff --git a/nova/crypto.py b/nova/crypto.py
index 52c8923781..b07f4016a8 100644
--- a/nova/crypto.py
+++ b/nova/crypto.py
@@ -72,7 +72,7 @@ crypto_opts = [
'project, timestamp')),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(crypto_opts)
diff --git a/nova/db/api.py b/nova/db/api.py
index 5b401392a5..be5ab31762 100644
--- a/nova/db/api.py
+++ b/nova/db/api.py
@@ -43,7 +43,6 @@ these objects be simple dictionaries.
"""
-from nova import config
from nova import exception
from nova.openstack.common import cfg
from nova import utils
@@ -64,7 +63,7 @@ db_opts = [
help='Template string to be used to generate snapshot names'),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(db_opts)
IMPL = utils.LazyPluggable('db_backend',
diff --git a/nova/db/base.py b/nova/db/base.py
index 650edd42f6..2028e375ee 100644
--- a/nova/db/base.py
+++ b/nova/db/base.py
@@ -18,7 +18,6 @@
"""Base class for classes that need modular database access."""
-from nova import config
from nova.openstack.common import cfg
from nova.openstack.common import importutils
@@ -26,7 +25,7 @@ db_driver_opt = cfg.StrOpt('db_driver',
default='nova.db',
help='driver to use for database access')
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opt(db_driver_opt)
diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py
index 34fbec6d34..0d6dd8b905 100644
--- a/nova/db/sqlalchemy/api.py
+++ b/nova/db/sqlalchemy/api.py
@@ -43,12 +43,13 @@ from nova import db
from nova.db.sqlalchemy import models
from nova.db.sqlalchemy.session import get_session
from nova import exception
+from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova.openstack.common import timeutils
from nova.openstack.common import uuidutils
-CONF = config.CONF
+CONF = cfg.CONF
LOG = logging.getLogger(__name__)
diff --git a/nova/db/sqlalchemy/migration.py b/nova/db/sqlalchemy/migration.py
index 5f17f96f4a..dbc1ed4326 100644
--- a/nova/db/sqlalchemy/migration.py
+++ b/nova/db/sqlalchemy/migration.py
@@ -19,7 +19,6 @@
import distutils.version as dist_version
import os
-from nova import config
from nova.db import migration
from nova.db.sqlalchemy.session import get_engine
from nova import exception
diff --git a/nova/db/sqlalchemy/models.py b/nova/db/sqlalchemy/models.py
index e4980e57b1..fbcfe7668c 100644
--- a/nova/db/sqlalchemy/models.py
+++ b/nova/db/sqlalchemy/models.py
@@ -27,13 +27,13 @@ from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import ForeignKey, DateTime, Boolean, Text, Float
from sqlalchemy.orm import relationship, backref, object_mapper
-from nova import config
from nova.db.sqlalchemy.session import get_session
from nova import exception
+from nova.openstack.common import cfg
from nova.openstack.common import timeutils
-CONF = config.CONF
+CONF = cfg.CONF
BASE = declarative_base()
diff --git a/nova/db/sqlalchemy/session.py b/nova/db/sqlalchemy/session.py
index f16b9d1614..a02be8ee26 100644
--- a/nova/db/sqlalchemy/session.py
+++ b/nova/db/sqlalchemy/session.py
@@ -171,10 +171,11 @@ from sqlalchemy.pool import NullPool, StaticPool
from nova import config
import nova.exception
+from nova.openstack.common import cfg
import nova.openstack.common.log as logging
-CONF = config.CONF
+CONF = cfg.CONF
LOG = logging.getLogger(__name__)
_ENGINE = None
diff --git a/nova/image/glance.py b/nova/image/glance.py
index 6e0a577738..d2f69d12e8 100644
--- a/nova/image/glance.py
+++ b/nova/image/glance.py
@@ -31,13 +31,14 @@ import glanceclient.exc
from nova import config
from nova import exception
+from nova.openstack.common import cfg
from nova.openstack.common import jsonutils
from nova.openstack.common import log as logging
from nova.openstack.common import timeutils
LOG = logging.getLogger(__name__)
-CONF = config.CONF
+CONF = cfg.CONF
def _parse_image_ref(image_href):
diff --git a/nova/image/s3.py b/nova/image/s3.py
index e6ab8bb156..0d93383fbb 100644
--- a/nova/image/s3.py
+++ b/nova/image/s3.py
@@ -60,7 +60,7 @@ s3_opts = [
'when downloading from s3'),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(s3_opts)
diff --git a/nova/ipv6/api.py b/nova/ipv6/api.py
index 23a6a365fa..43a1851017 100644
--- a/nova/ipv6/api.py
+++ b/nova/ipv6/api.py
@@ -14,7 +14,6 @@
# License for the specific language governing permissions and limitations
# under the License.
-from nova import config
from nova.openstack.common import cfg
from nova import utils
@@ -23,7 +22,7 @@ ipv6_backend_opt = cfg.StrOpt('ipv6_backend',
default='rfc2462',
help='Backend to use for IPv6 generation')
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opt(ipv6_backend_opt)
IMPL = None
diff --git a/nova/manager.py b/nova/manager.py
index 8beae2732e..59da6155ae 100644
--- a/nova/manager.py
+++ b/nova/manager.py
@@ -57,13 +57,14 @@ import eventlet
from nova import config
from nova.db import base
+from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova.openstack.common.plugin import pluginmanager
from nova.openstack.common.rpc import dispatcher as rpc_dispatcher
from nova.scheduler import rpcapi as scheduler_rpcapi
from nova import version
-CONF = config.CONF
+CONF = cfg.CONF
LOG = logging.getLogger(__name__)
diff --git a/nova/network/__init__.py b/nova/network/__init__.py
index 79955e1eb4..6ca684f49c 100644
--- a/nova/network/__init__.py
+++ b/nova/network/__init__.py
@@ -18,11 +18,12 @@
# Importing full names to not pollute the namespace and cause possible
# collisions with use of 'from nova.network import <foo>' elsewhere.
-import nova.config
+import nova.openstack.common.cfg
import nova.openstack.common.importutils
def API():
importutils = nova.openstack.common.importutils
- cls = importutils.import_class(nova.config.CONF.network_api_class)
+ network_api_class = nova.openstack.common.cfg.CONF.network_api_class
+ cls = importutils.import_class(network_api_class)
return cls()
diff --git a/nova/network/api.py b/nova/network/api.py
index 049b8c7c0a..2c0ddb05f6 100644
--- a/nova/network/api.py
+++ b/nova/network/api.py
@@ -20,7 +20,6 @@
import functools
import inspect
-from nova import config
from nova.db import base
from nova import exception
from nova.network import model as network_model
diff --git a/nova/network/l3.py b/nova/network/l3.py
index e937245e77..bea1c3e6af 100644
--- a/nova/network/l3.py
+++ b/nova/network/l3.py
@@ -15,7 +15,6 @@
# License for the specific language governing permissions and limitations
# under the License.
-from nova import config
from nova.network import linux_net
from nova.openstack.common import log as logging
from nova import utils
diff --git a/nova/network/ldapdns.py b/nova/network/ldapdns.py
index 15b6ca235b..0cc07aa922 100644
--- a/nova/network/ldapdns.py
+++ b/nova/network/ldapdns.py
@@ -15,13 +15,12 @@
import ldap
import time
-from nova import config
from nova import exception
from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova import utils
-CONF = config.CONF
+CONF = cfg.CONF
LOG = logging.getLogger(__name__)
ldap_dns_opts = [
diff --git a/nova/network/linux_net.py b/nova/network/linux_net.py
index 047c11d34d..158d564639 100644
--- a/nova/network/linux_net.py
+++ b/nova/network/linux_net.py
@@ -87,7 +87,7 @@ linux_net_opts = [
'get default gateway from dhcp server'),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(linux_net_opts)
diff --git a/nova/network/manager.py b/nova/network/manager.py
index f54764d8fd..68ea40c0c8 100644
--- a/nova/network/manager.py
+++ b/nova/network/manager.py
@@ -161,7 +161,7 @@ network_opts = [
help="Indicates underlying L3 management library")
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(network_opts)
diff --git a/nova/network/minidns.py b/nova/network/minidns.py
index 37b85fb66c..a4a945c15a 100644
--- a/nova/network/minidns.py
+++ b/nova/network/minidns.py
@@ -16,10 +16,10 @@ import os
import shutil
import tempfile
-from nova import config
from nova import exception
+from nova.openstack.common import cfg
-CONF = config.CONF
+CONF = cfg.CONF
class MiniDNS(object):
diff --git a/nova/network/quantum/nova_ipam_lib.py b/nova/network/quantum/nova_ipam_lib.py
index 4e6f5dbed3..5c2adf7f1b 100644
--- a/nova/network/quantum/nova_ipam_lib.py
+++ b/nova/network/quantum/nova_ipam_lib.py
@@ -17,7 +17,6 @@
import netaddr
-from nova import config
from nova import db
from nova import exception
from nova import ipv6
diff --git a/nova/network/quantumv2/__init__.py b/nova/network/quantumv2/__init__.py
index 3377a32ab3..151bd6afad 100644
--- a/nova/network/quantumv2/__init__.py
+++ b/nova/network/quantumv2/__init__.py
@@ -15,14 +15,14 @@
# License for the specific language governing permissions and limitations
# under the License.
-from nova import config
from nova import exception
+from nova.openstack.common import cfg
from nova.openstack.common import excutils
from nova.openstack.common import log as logging
from quantumclient import client
from quantumclient.v2_0 import client as clientv20
-CONF = config.CONF
+CONF = cfg.CONF
LOG = logging.getLogger(__name__)
diff --git a/nova/network/quantumv2/api.py b/nova/network/quantumv2/api.py
index 38692351e2..451aab394e 100644
--- a/nova/network/quantumv2/api.py
+++ b/nova/network/quantumv2/api.py
@@ -51,7 +51,7 @@ quantum_opts = [
'quantum in admin context'),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(quantum_opts)
CONF.import_opt('default_floating_pool', 'nova.network.manager')
LOG = logging.getLogger(__name__)
diff --git a/nova/network/rpcapi.py b/nova/network/rpcapi.py
index c0742b1ca0..d676175f97 100644
--- a/nova/network/rpcapi.py
+++ b/nova/network/rpcapi.py
@@ -19,11 +19,12 @@ Client side of the network RPC API.
"""
from nova import config
+from nova.openstack.common import cfg
from nova.openstack.common import jsonutils
from nova.openstack.common import rpc
from nova.openstack.common.rpc import proxy as rpc_proxy
-CONF = config.CONF
+CONF = cfg.CONF
class NetworkAPI(rpc_proxy.RpcProxy):
diff --git a/nova/notifications.py b/nova/notifications.py
index d43aef3c76..b5fc6917f3 100644
--- a/nova/notifications.py
+++ b/nova/notifications.py
@@ -19,7 +19,6 @@
the system.
"""
-from nova import config
import nova.context
from nova import db
from nova import exception
@@ -50,7 +49,7 @@ notify_api_faults = cfg.BoolOpt('notify_api_faults', default=False,
'in the API service.')
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opt(notify_state_opt)
CONF.register_opt(notify_any_opt)
CONF.register_opt(notify_api_faults)
diff --git a/nova/objectstore/s3server.py b/nova/objectstore/s3server.py
index 0975ca76f8..655a3f4d19 100644
--- a/nova/objectstore/s3server.py
+++ b/nova/objectstore/s3server.py
@@ -63,7 +63,7 @@ s3_opts = [
help='port for s3 api to listen'),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(s3_opts)
diff --git a/nova/policy.py b/nova/policy.py
index dc4bc70311..5a300cfb2a 100644
--- a/nova/policy.py
+++ b/nova/policy.py
@@ -19,7 +19,6 @@
import os.path
-from nova import config
from nova import exception
from nova.openstack.common import cfg
from nova.openstack.common import policy
@@ -35,7 +34,7 @@ policy_opts = [
help=_('Rule checked when requested rule is not found')),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(policy_opts)
_POLICY_PATH = None
diff --git a/nova/quota.py b/nova/quota.py
index 730c466d9c..fad1258050 100644
--- a/nova/quota.py
+++ b/nova/quota.py
@@ -20,7 +20,6 @@
import datetime
-from nova import config
from nova import db
from nova import exception
from nova.openstack.common import cfg
@@ -79,7 +78,7 @@ quota_opts = [
help='default driver to use for quota checks'),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(quota_opts)
diff --git a/nova/scheduler/chance.py b/nova/scheduler/chance.py
index 86e21929c0..dc517e94e3 100644
--- a/nova/scheduler/chance.py
+++ b/nova/scheduler/chance.py
@@ -25,9 +25,10 @@ import random
from nova import config
from nova import exception
+from nova.openstack.common import cfg
from nova.scheduler import driver
-CONF = config.CONF
+CONF = cfg.CONF
class ChanceScheduler(driver.Scheduler):
diff --git a/nova/scheduler/driver.py b/nova/scheduler/driver.py
index 39ea555277..6c6beb5e9e 100644
--- a/nova/scheduler/driver.py
+++ b/nova/scheduler/driver.py
@@ -52,10 +52,10 @@ scheduler_driver_opts = [
help='Maximum number of attempts to schedule an instance'),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(scheduler_driver_opts)
-CONF = config.CONF
+CONF = cfg.CONF
CONF.import_opt('instances_path', 'nova.compute.manager')
CONF.import_opt('libvirt_type', 'nova.virt.libvirt.driver')
diff --git a/nova/scheduler/filter_scheduler.py b/nova/scheduler/filter_scheduler.py
index 636818e590..759621d913 100644
--- a/nova/scheduler/filter_scheduler.py
+++ b/nova/scheduler/filter_scheduler.py
@@ -19,14 +19,14 @@ You can customize this scheduler by specifying your own Host Filters and
Weighing Functions.
"""
-from nova import config
from nova import exception
+from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova.openstack.common.notifier import api as notifier
from nova.scheduler import driver
from nova.scheduler import scheduler_options
-CONF = config.CONF
+CONF = cfg.CONF
LOG = logging.getLogger(__name__)
diff --git a/nova/scheduler/filters/compute_filter.py b/nova/scheduler/filters/compute_filter.py
index 93ec7d16ec..93d63c76cf 100644
--- a/nova/scheduler/filters/compute_filter.py
+++ b/nova/scheduler/filters/compute_filter.py
@@ -13,12 +13,12 @@
# License for the specific language governing permissions and limitations
# under the License.
-from nova import config
+from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova.scheduler import filters
from nova import utils
-CONF = config.CONF
+CONF = cfg.CONF
LOG = logging.getLogger(__name__)
diff --git a/nova/scheduler/filters/core_filter.py b/nova/scheduler/filters/core_filter.py
index aec05ecc0b..54561b8119 100644
--- a/nova/scheduler/filters/core_filter.py
+++ b/nova/scheduler/filters/core_filter.py
@@ -15,7 +15,6 @@
# License for the specific language governing permissions and limitations
# under the License.
-from nova import config
from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova.scheduler import filters
@@ -27,7 +26,7 @@ cpu_allocation_ratio_opt = cfg.FloatOpt('cpu_allocation_ratio',
default=16.0,
help='Virtual CPU to Physical CPU allocation ratio')
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opt(cpu_allocation_ratio_opt)
diff --git a/nova/scheduler/filters/disk_filter.py b/nova/scheduler/filters/disk_filter.py
index 77ee75c99f..49fcb47203 100644
--- a/nova/scheduler/filters/disk_filter.py
+++ b/nova/scheduler/filters/disk_filter.py
@@ -13,7 +13,6 @@
# License for the specific language governing permissions and limitations
# under the License.
-from nova import config
from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova.scheduler import filters
@@ -23,7 +22,7 @@ LOG = logging.getLogger(__name__)
disk_allocation_ratio_opt = cfg.FloatOpt("disk_allocation_ratio", default=1.0,
help="virtual disk to physical disk allocation ratio")
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opt(disk_allocation_ratio_opt)
diff --git a/nova/scheduler/filters/io_ops_filter.py b/nova/scheduler/filters/io_ops_filter.py
index 3f04815a0e..4429f20fa1 100644
--- a/nova/scheduler/filters/io_ops_filter.py
+++ b/nova/scheduler/filters/io_ops_filter.py
@@ -13,7 +13,6 @@
# License for the specific language governing permissions and limitations
# under the License.
-from nova import config
from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova.scheduler import filters
@@ -24,7 +23,7 @@ max_io_ops_per_host_opt = cfg.IntOpt("max_io_ops_per_host",
default=8,
help="Ignore hosts that have too many builds/resizes/snaps/migrations")
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opt(max_io_ops_per_host_opt)
diff --git a/nova/scheduler/filters/isolated_hosts_filter.py b/nova/scheduler/filters/isolated_hosts_filter.py
index 213953b183..607c240e50 100644
--- a/nova/scheduler/filters/isolated_hosts_filter.py
+++ b/nova/scheduler/filters/isolated_hosts_filter.py
@@ -14,9 +14,10 @@
# under the License.
from nova import config
+from nova.openstack.common import cfg
from nova.scheduler import filters
-CONF = config.CONF
+CONF = cfg.CONF
class IsolatedHostsFilter(filters.BaseHostFilter):
diff --git a/nova/scheduler/filters/num_instances_filter.py b/nova/scheduler/filters/num_instances_filter.py
index b34e715265..197959a5f4 100644
--- a/nova/scheduler/filters/num_instances_filter.py
+++ b/nova/scheduler/filters/num_instances_filter.py
@@ -13,7 +13,6 @@
# License for the specific language governing permissions and limitations
# under the License.
-from nova import config
from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova.scheduler import filters
@@ -24,7 +23,7 @@ max_instances_per_host_opt = cfg.IntOpt("max_instances_per_host",
default=50,
help="Ignore hosts that have too many instances")
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opt(max_instances_per_host_opt)
diff --git a/nova/scheduler/filters/ram_filter.py b/nova/scheduler/filters/ram_filter.py
index 832a7c41ae..dc43ced29d 100644
--- a/nova/scheduler/filters/ram_filter.py
+++ b/nova/scheduler/filters/ram_filter.py
@@ -14,7 +14,6 @@
# License for the specific language governing permissions and limitations
# under the License.
-from nova import config
from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova.scheduler import filters
@@ -25,7 +24,7 @@ ram_allocation_ratio_opt = cfg.FloatOpt("ram_allocation_ratio",
default=1.5,
help="virtual ram to physical ram allocation ratio")
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opt(ram_allocation_ratio_opt)
diff --git a/nova/scheduler/filters/trusted_filter.py b/nova/scheduler/filters/trusted_filter.py
index 1e0470b61c..4d0f2305fc 100644
--- a/nova/scheduler/filters/trusted_filter.py
+++ b/nova/scheduler/filters/trusted_filter.py
@@ -48,7 +48,6 @@ import httplib
import socket
import ssl
-from nova import config
from nova.openstack.common import cfg
from nova.openstack.common import jsonutils
from nova.openstack.common import log as logging
@@ -81,7 +80,7 @@ trusted_opts = [
help='attestation authorization blob - must change'),
]
-CONF = config.CONF
+CONF = cfg.CONF
trust_group = cfg.OptGroup(name='trusted_computing', title='Trust parameters')
CONF.register_group(trust_group)
CONF.register_opts(trusted_opts, group=trust_group)
diff --git a/nova/scheduler/host_manager.py b/nova/scheduler/host_manager.py
index ba4fa3d34d..58a16b1091 100644
--- a/nova/scheduler/host_manager.py
+++ b/nova/scheduler/host_manager.py
@@ -21,7 +21,6 @@ import UserDict
from nova.compute import task_states
from nova.compute import vm_states
-from nova import config
from nova import db
from nova import exception
from nova.openstack.common import cfg
@@ -53,7 +52,7 @@ host_manager_opts = [
help='Which weight class names to use for weighing hosts'),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(host_manager_opts)
LOG = logging.getLogger(__name__)
diff --git a/nova/scheduler/manager.py b/nova/scheduler/manager.py
index 3ef2992fbb..dbb8845cb1 100644
--- a/nova/scheduler/manager.py
+++ b/nova/scheduler/manager.py
@@ -26,7 +26,6 @@ import sys
from nova.compute import rpcapi as compute_rpcapi
from nova.compute import utils as compute_utils
from nova.compute import vm_states
-from nova import config
import nova.context
from nova import db
from nova import exception
@@ -46,7 +45,7 @@ scheduler_driver_opt = cfg.StrOpt('scheduler_driver',
default='nova.scheduler.filter_scheduler.FilterScheduler',
help='Default driver to use for the scheduler')
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opt(scheduler_driver_opt)
QUOTAS = quota.QUOTAS
diff --git a/nova/scheduler/multi.py b/nova/scheduler/multi.py
index 988881632b..a92e095563 100644
--- a/nova/scheduler/multi.py
+++ b/nova/scheduler/multi.py
@@ -27,7 +27,6 @@ schedule requests to compute nodes but provide their own manager and topic.
https://bugs.launchpad.net/nova/+bug/1009681
"""
-from nova import config
from nova.openstack.common import cfg
from nova.openstack.common import importutils
from nova.scheduler import driver
@@ -43,7 +42,7 @@ multi_scheduler_opts = [
help='Default driver to use for scheduling calls'),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(multi_scheduler_opts)
diff --git a/nova/scheduler/rpcapi.py b/nova/scheduler/rpcapi.py
index b0c83d6957..5ddc65c593 100644
--- a/nova/scheduler/rpcapi.py
+++ b/nova/scheduler/rpcapi.py
@@ -19,10 +19,11 @@ Client side of the scheduler manager RPC API.
"""
from nova import config
+from nova.openstack.common import cfg
from nova.openstack.common import jsonutils
import nova.openstack.common.rpc.proxy
-CONF = config.CONF
+CONF = cfg.CONF
class SchedulerAPI(nova.openstack.common.rpc.proxy.RpcProxy):
diff --git a/nova/scheduler/scheduler_options.py b/nova/scheduler/scheduler_options.py
index 5c253bc4fe..e0840dd014 100644
--- a/nova/scheduler/scheduler_options.py
+++ b/nova/scheduler/scheduler_options.py
@@ -26,7 +26,6 @@ import datetime
import json
import os
-from nova import config
from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova.openstack.common import timeutils
@@ -37,7 +36,7 @@ scheduler_json_config_location_opt = cfg.StrOpt(
default='',
help='Absolute path to scheduler configuration JSON file.')
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opt(scheduler_json_config_location_opt)
LOG = logging.getLogger(__name__)
diff --git a/nova/scheduler/weights/__init__.py b/nova/scheduler/weights/__init__.py
index 55c44b5289..b979b1e556 100644
--- a/nova/scheduler/weights/__init__.py
+++ b/nova/scheduler/weights/__init__.py
@@ -18,13 +18,13 @@ Scheduler host weights
"""
-from nova import config
+from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova.scheduler.weights import least_cost
from nova import weights
LOG = logging.getLogger(__name__)
-CONF = config.CONF
+CONF = cfg.CONF
class WeighedHost(weights.WeighedObject):
diff --git a/nova/scheduler/weights/least_cost.py b/nova/scheduler/weights/least_cost.py
index 2d886f4612..f6702bc1bc 100644
--- a/nova/scheduler/weights/least_cost.py
+++ b/nova/scheduler/weights/least_cost.py
@@ -25,7 +25,6 @@ NOTE(comstud): This is deprecated. One should use the RAMWeigher and/or
create other weight modules.
"""
-from nova import config
from nova import exception
from nova.openstack.common import cfg
from nova.openstack.common import importutils
@@ -48,7 +47,7 @@ least_cost_opts = [
'e.g. spread-first'),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(least_cost_opts)
diff --git a/nova/scheduler/weights/ram.py b/nova/scheduler/weights/ram.py
index 0fe1911c4c..ea4cfab38e 100644
--- a/nova/scheduler/weights/ram.py
+++ b/nova/scheduler/weights/ram.py
@@ -20,7 +20,6 @@ stacking, you can set the 'ram_weight_multiplier' option to a negative
number and the weighing has the opposite effect of the default.
"""
-from nova import config
from nova.openstack.common import cfg
from nova.scheduler import weights
@@ -32,7 +31,7 @@ ram_weight_opts = [
'numbers mean to stack vs spread.'),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(ram_weight_opts)
diff --git a/nova/service.py b/nova/service.py
index 109fbc06c7..5657bdd7ee 100644
--- a/nova/service.py
+++ b/nova/service.py
@@ -90,7 +90,7 @@ service_opts = [
help='Number of workers for metadata service'),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(service_opts)
diff --git a/nova/test.py b/nova/test.py
index 25572600f6..3a52a24939 100644
--- a/nova/test.py
+++ b/nova/test.py
@@ -49,7 +49,7 @@ test_opts = [
help='should we use everything for testing'),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(test_opts)
LOG = logging.getLogger(__name__)
diff --git a/nova/tests/__init__.py b/nova/tests/__init__.py
index f0c117b328..852fbddf1a 100644
--- a/nova/tests/__init__.py
+++ b/nova/tests/__init__.py
@@ -33,6 +33,7 @@ import shutil
from nova import config
from nova.db.sqlalchemy.session import get_engine
+from nova.openstack.common import cfg
from nova.openstack.common import log as logging
import eventlet
@@ -40,7 +41,7 @@ import eventlet
eventlet.monkey_patch(os=False)
-CONF = config.CONF
+CONF = cfg.CONF
CONF.set_override('use_stderr', False)
logging.setup('nova')
diff --git a/nova/tests/api/ec2/test_cinder_cloud.py b/nova/tests/api/ec2/test_cinder_cloud.py
index cbdfc3aee3..f4355a5f0b 100644
--- a/nova/tests/api/ec2/test_cinder_cloud.py
+++ b/nova/tests/api/ec2/test_cinder_cloud.py
@@ -28,6 +28,7 @@ from nova import config
from nova import context
from nova import db
from nova import exception
+from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova.openstack.common import rpc
from nova import test
@@ -36,7 +37,7 @@ from nova.tests.image import fake
from nova.tests import matchers
from nova import volume
-CONF = config.CONF
+CONF = cfg.CONF
LOG = logging.getLogger(__name__)
diff --git a/nova/tests/api/ec2/test_cloud.py b/nova/tests/api/ec2/test_cloud.py
index bdf2cbe7c3..54437e93ec 100644
--- a/nova/tests/api/ec2/test_cloud.py
+++ b/nova/tests/api/ec2/test_cloud.py
@@ -38,6 +38,7 @@ from nova import db
from nova import exception
from nova.image import s3
from nova.network import api as network_api
+from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova.openstack.common import rpc
from nova import test
@@ -48,7 +49,7 @@ from nova import utils
from nova.virt import fake as fake_virt
from nova import volume
-CONF = config.CONF
+CONF = cfg.CONF
LOG = logging.getLogger(__name__)
diff --git a/nova/tests/api/ec2/test_ec2_validate.py b/nova/tests/api/ec2/test_ec2_validate.py
index 0f15c66b80..5efdb97766 100644
--- a/nova/tests/api/ec2/test_ec2_validate.py
+++ b/nova/tests/api/ec2/test_ec2_validate.py
@@ -21,10 +21,10 @@ import datetime
from nova.api.ec2 import cloud
from nova.api.ec2 import ec2utils
from nova.compute import utils as compute_utils
-from nova import config
from nova import context
from nova import db
from nova import exception
+from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova.openstack.common import rpc
from nova.openstack.common import timeutils
@@ -32,7 +32,7 @@ from nova import test
from nova.tests import fake_network
from nova.tests.image import fake
-CONF = config.CONF
+CONF = cfg.CONF
LOG = logging.getLogger(__name__)
diff --git a/nova/tests/api/ec2/test_middleware.py b/nova/tests/api/ec2/test_middleware.py
index 25cba1c4dc..77999e053a 100644
--- a/nova/tests/api/ec2/test_middleware.py
+++ b/nova/tests/api/ec2/test_middleware.py
@@ -22,13 +22,13 @@ import webob.dec
import webob.exc
from nova.api import ec2
-from nova import config
from nova import context
from nova import exception
+from nova.openstack.common import cfg
from nova.openstack.common import timeutils
from nova import test
-CONF = config.CONF
+CONF = cfg.CONF
@webob.dec.wsgify
diff --git a/nova/tests/api/openstack/compute/contrib/test_admin_actions.py b/nova/tests/api/openstack/compute/contrib/test_admin_actions.py
index 9ede7dd17f..c7c4f85647 100644
--- a/nova/tests/api/openstack/compute/contrib/test_admin_actions.py
+++ b/nova/tests/api/openstack/compute/contrib/test_admin_actions.py
@@ -21,16 +21,16 @@ from nova.api.openstack import compute
from nova.api.openstack.compute.contrib import admin_actions
from nova.compute import api as compute_api
from nova.compute import vm_states
-from nova import config
from nova import context
from nova import exception
+from nova.openstack.common import cfg
from nova.openstack.common import jsonutils
from nova.scheduler import rpcapi as scheduler_rpcapi
from nova import test
from nova.tests.api.openstack import fakes
-CONF = config.CONF
+CONF = cfg.CONF
INSTANCE = {
"id": 1,
diff --git a/nova/tests/api/openstack/compute/contrib/test_cloudpipe.py b/nova/tests/api/openstack/compute/contrib/test_cloudpipe.py
index 3488168333..368ede41c0 100644
--- a/nova/tests/api/openstack/compute/contrib/test_cloudpipe.py
+++ b/nova/tests/api/openstack/compute/contrib/test_cloudpipe.py
@@ -20,6 +20,7 @@ from nova.api.openstack import wsgi
from nova.compute import utils as compute_utils
from nova import config
from nova import db
+from nova.openstack.common import cfg
from nova.openstack.common import timeutils
from nova import test
from nova.tests.api.openstack import fakes
@@ -27,7 +28,7 @@ from nova.tests import fake_network
from nova.tests import matchers
from nova import utils
-CONF = config.CONF
+CONF = cfg.CONF
def fake_vpn_instance():
diff --git a/nova/tests/api/openstack/compute/contrib/test_createserverext.py b/nova/tests/api/openstack/compute/contrib/test_createserverext.py
index 07f7f6eec7..a37c6889dc 100644
--- a/nova/tests/api/openstack/compute/contrib/test_createserverext.py
+++ b/nova/tests/api/openstack/compute/contrib/test_createserverext.py
@@ -21,7 +21,6 @@ from xml.dom import minidom
import webob
from nova.compute import api as compute_api
-from nova import config
from nova import db
from nova import exception
from nova.openstack.common import jsonutils
diff --git a/nova/tests/api/openstack/compute/contrib/test_disk_config.py b/nova/tests/api/openstack/compute/contrib/test_disk_config.py
index c79fda9105..208bdbe101 100644
--- a/nova/tests/api/openstack/compute/contrib/test_disk_config.py
+++ b/nova/tests/api/openstack/compute/contrib/test_disk_config.py
@@ -18,7 +18,6 @@
import datetime
from nova.api.openstack import compute
-from nova import config
import nova.db.api
from nova.openstack.common import jsonutils
import nova.openstack.common.rpc
diff --git a/nova/tests/api/openstack/compute/contrib/test_extended_server_attributes.py b/nova/tests/api/openstack/compute/contrib/test_extended_server_attributes.py
index e9c0c0bc83..036c240d4d 100644
--- a/nova/tests/api/openstack/compute/contrib/test_extended_server_attributes.py
+++ b/nova/tests/api/openstack/compute/contrib/test_extended_server_attributes.py
@@ -18,7 +18,6 @@ import webob
from nova.api.openstack.compute.contrib import extended_server_attributes
from nova import compute
-from nova import config
from nova import db
from nova import exception
from nova.openstack.common import jsonutils
diff --git a/nova/tests/api/openstack/compute/contrib/test_extended_status.py b/nova/tests/api/openstack/compute/contrib/test_extended_status.py
index 457b8bd329..f9d4cb43ac 100644
--- a/nova/tests/api/openstack/compute/contrib/test_extended_status.py
+++ b/nova/tests/api/openstack/compute/contrib/test_extended_status.py
@@ -18,7 +18,6 @@ import webob
from nova.api.openstack.compute.contrib import extended_status
from nova import compute
-from nova import config
from nova import exception
from nova.openstack.common import jsonutils
from nova import test
diff --git a/nova/tests/api/openstack/compute/contrib/test_flavor_disabled.py b/nova/tests/api/openstack/compute/contrib/test_flavor_disabled.py
index b2400bc51b..5d15264abd 100644
--- a/nova/tests/api/openstack/compute/contrib/test_flavor_disabled.py
+++ b/nova/tests/api/openstack/compute/contrib/test_flavor_disabled.py
@@ -17,7 +17,6 @@ import webob
from nova.api.openstack.compute.contrib import flavor_disabled
from nova.compute import instance_types
-from nova import config
from nova.openstack.common import jsonutils
from nova import test
from nova.tests.api.openstack import fakes
diff --git a/nova/tests/api/openstack/compute/contrib/test_flavor_rxtx.py b/nova/tests/api/openstack/compute/contrib/test_flavor_rxtx.py
index a6624e88d9..d86f750cf9 100644
--- a/nova/tests/api/openstack/compute/contrib/test_flavor_rxtx.py
+++ b/nova/tests/api/openstack/compute/contrib/test_flavor_rxtx.py
@@ -16,7 +16,6 @@ from lxml import etree
import webob
from nova.compute import instance_types
-from nova import config
from nova.openstack.common import jsonutils
from nova import test
from nova.tests.api.openstack import fakes
diff --git a/nova/tests/api/openstack/compute/contrib/test_flavor_swap.py b/nova/tests/api/openstack/compute/contrib/test_flavor_swap.py
index e8c66962ad..eeb0fe6322 100644
--- a/nova/tests/api/openstack/compute/contrib/test_flavor_swap.py
+++ b/nova/tests/api/openstack/compute/contrib/test_flavor_swap.py
@@ -16,7 +16,6 @@ from lxml import etree
import webob
from nova.compute import instance_types
-from nova import config
from nova.openstack.common import jsonutils
from nova import test
from nova.tests.api.openstack import fakes
diff --git a/nova/tests/api/openstack/compute/contrib/test_networks.py b/nova/tests/api/openstack/compute/contrib/test_networks.py
index 2540904eec..a50e8d89e3 100644
--- a/nova/tests/api/openstack/compute/contrib/test_networks.py
+++ b/nova/tests/api/openstack/compute/contrib/test_networks.py
@@ -23,12 +23,12 @@ import uuid
import webob
from nova.api.openstack.compute.contrib import networks
-from nova import config
from nova import exception
+from nova.openstack.common import cfg
from nova import test
from nova.tests.api.openstack import fakes
-CONF = config.CONF
+CONF = cfg.CONF
FAKE_NETWORKS = [
{
diff --git a/nova/tests/api/openstack/compute/contrib/test_rescue.py b/nova/tests/api/openstack/compute/contrib/test_rescue.py
index 2a7e973ffe..7aeb9465e5 100644
--- a/nova/tests/api/openstack/compute/contrib/test_rescue.py
+++ b/nova/tests/api/openstack/compute/contrib/test_rescue.py
@@ -17,11 +17,12 @@ import webob
from nova import compute
from nova import config
from nova import exception
+from nova.openstack.common import cfg
from nova.openstack.common import jsonutils
from nova import test
from nova.tests.api.openstack import fakes
-CONF = config.CONF
+CONF = cfg.CONF
def rescue(self, context, instance, rescue_password=None):
diff --git a/nova/tests/api/openstack/compute/contrib/test_security_groups.py b/nova/tests/api/openstack/compute/contrib/test_security_groups.py
index 6fdeb0fec6..59cb3f7f78 100644
--- a/nova/tests/api/openstack/compute/contrib/test_security_groups.py
+++ b/nova/tests/api/openstack/compute/contrib/test_security_groups.py
@@ -25,15 +25,15 @@ from nova.api.openstack.compute.contrib import security_groups
from nova.api.openstack import wsgi
from nova.api.openstack import xmlutil
from nova import compute
-from nova import config
import nova.db
from nova import exception
+from nova.openstack.common import cfg
from nova.openstack.common import jsonutils
from nova import quota
from nova import test
from nova.tests.api.openstack import fakes
-CONF = config.CONF
+CONF = cfg.CONF
FAKE_UUID = 'a47ae74e-ab08-447f-8eee-ffd43fc46c16'
diff --git a/nova/tests/api/openstack/compute/contrib/test_simple_tenant_usage.py b/nova/tests/api/openstack/compute/contrib/test_simple_tenant_usage.py
index a10ec208ca..b49a1feb47 100644
--- a/nova/tests/api/openstack/compute/contrib/test_simple_tenant_usage.py
+++ b/nova/tests/api/openstack/compute/contrib/test_simple_tenant_usage.py
@@ -22,7 +22,6 @@ import webob
from nova.api.openstack.compute.contrib import simple_tenant_usage
from nova.compute import api
-from nova import config
from nova import context
from nova.openstack.common import jsonutils
from nova.openstack.common import policy as common_policy
diff --git a/nova/tests/api/openstack/compute/contrib/test_snapshots.py b/nova/tests/api/openstack/compute/contrib/test_snapshots.py
index 319991bfac..a223178fb2 100644
--- a/nova/tests/api/openstack/compute/contrib/test_snapshots.py
+++ b/nova/tests/api/openstack/compute/contrib/test_snapshots.py
@@ -17,7 +17,6 @@ from lxml import etree
import webob
from nova.api.openstack.compute.contrib import volumes
-from nova import config
from nova import context
from nova import exception
from nova.openstack.common import jsonutils
diff --git a/nova/tests/api/openstack/compute/contrib/test_volumes.py b/nova/tests/api/openstack/compute/contrib/test_volumes.py
index 4272b3011c..85ab411a53 100644
--- a/nova/tests/api/openstack/compute/contrib/test_volumes.py
+++ b/nova/tests/api/openstack/compute/contrib/test_volumes.py
@@ -24,6 +24,7 @@ from nova.compute import instance_types
from nova import config
from nova import context
from nova import db
+from nova.openstack.common import cfg
from nova.openstack.common import jsonutils
from nova.openstack.common import timeutils
from nova import test
@@ -31,7 +32,7 @@ from nova.tests.api.openstack import fakes
from nova.volume import cinder
from webob import exc
-CONF = config.CONF
+CONF = cfg.CONF
FAKE_UUID = 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa'
FAKE_UUID_A = '00000000-aaaa-aaaa-aaaa-000000000000'
diff --git a/nova/tests/api/openstack/compute/test_consoles.py b/nova/tests/api/openstack/compute/test_consoles.py
index 6b8d290c42..8f0a02e30f 100644
--- a/nova/tests/api/openstack/compute/test_consoles.py
+++ b/nova/tests/api/openstack/compute/test_consoles.py
@@ -24,7 +24,6 @@ import webob
from nova.api.openstack.compute import consoles
from nova.compute import vm_states
-from nova import config
from nova import console
from nova import db
from nova import exception
diff --git a/nova/tests/api/openstack/compute/test_extensions.py b/nova/tests/api/openstack/compute/test_extensions.py
index fe7f03cd6d..1d0bfcd1a5 100644
--- a/nova/tests/api/openstack/compute/test_extensions.py
+++ b/nova/tests/api/openstack/compute/test_extensions.py
@@ -26,12 +26,13 @@ from nova.api.openstack import extensions as base_extensions
from nova.api.openstack import wsgi
from nova.api.openstack import xmlutil
from nova import config
+from nova.openstack.common import cfg
from nova.openstack.common import jsonutils
from nova import test
from nova.tests.api.openstack import fakes
from nova.tests import matchers
-CONF = config.CONF
+CONF = cfg.CONF
NS = "{http://docs.openstack.org/common/api/v1.0}"
ATOMNS = "{http://www.w3.org/2005/Atom}"
diff --git a/nova/tests/api/openstack/compute/test_flavors.py b/nova/tests/api/openstack/compute/test_flavors.py
index 16bb74801b..da633d371a 100644
--- a/nova/tests/api/openstack/compute/test_flavors.py
+++ b/nova/tests/api/openstack/compute/test_flavors.py
@@ -23,7 +23,6 @@ import urlparse
from nova.api.openstack.compute import flavors
from nova.api.openstack import xmlutil
import nova.compute.instance_types
-from nova import config
from nova import context
from nova import db
from nova import exception
diff --git a/nova/tests/api/openstack/compute/test_image_metadata.py b/nova/tests/api/openstack/compute/test_image_metadata.py
index a5ac184ca7..9a8b75c9e5 100644
--- a/nova/tests/api/openstack/compute/test_image_metadata.py
+++ b/nova/tests/api/openstack/compute/test_image_metadata.py
@@ -18,12 +18,12 @@
import webob
from nova.api.openstack.compute import image_metadata
-from nova import config
+from nova.openstack.common import cfg
from nova.openstack.common import jsonutils
from nova import test
from nova.tests.api.openstack import fakes
-CONF = config.CONF
+CONF = cfg.CONF
class ImageMetaDataTest(test.TestCase):
diff --git a/nova/tests/api/openstack/compute/test_images.py b/nova/tests/api/openstack/compute/test_images.py
index 1ce2c960ef..89a09fa2fb 100644
--- a/nova/tests/api/openstack/compute/test_images.py
+++ b/nova/tests/api/openstack/compute/test_images.py
@@ -28,7 +28,6 @@ import webob
from nova.api.openstack.compute import images
from nova.api.openstack.compute.views import images as images_view
from nova.api.openstack import xmlutil
-from nova import config
from nova import exception
from nova import test
from nova.tests.api.openstack import fakes
diff --git a/nova/tests/api/openstack/compute/test_server_actions.py b/nova/tests/api/openstack/compute/test_server_actions.py
index 002f510103..204979da12 100644
--- a/nova/tests/api/openstack/compute/test_server_actions.py
+++ b/nova/tests/api/openstack/compute/test_server_actions.py
@@ -27,6 +27,7 @@ from nova import config
from nova import db
from nova import exception
from nova.image import glance
+from nova.openstack.common import cfg
from nova.openstack.common import importutils
from nova import test
from nova.tests.api.openstack import fakes
@@ -34,7 +35,7 @@ from nova.tests.image import fake
from nova.tests import matchers
-CONF = config.CONF
+CONF = cfg.CONF
FAKE_UUID = fakes.FAKE_UUID
INSTANCE_IDS = {FAKE_UUID: 1}
diff --git a/nova/tests/api/openstack/compute/test_server_metadata.py b/nova/tests/api/openstack/compute/test_server_metadata.py
index 5f595e3a5d..78e3f866b4 100644
--- a/nova/tests/api/openstack/compute/test_server_metadata.py
+++ b/nova/tests/api/openstack/compute/test_server_metadata.py
@@ -21,15 +21,15 @@ import webob
from nova.api.openstack.compute import server_metadata
from nova.compute import rpcapi as compute_rpcapi
-from nova import config
import nova.db
from nova import exception
+from nova.openstack.common import cfg
from nova.openstack.common import jsonutils
from nova import test
from nova.tests.api.openstack import fakes
-CONF = config.CONF
+CONF = cfg.CONF
def return_create_instance_metadata_max(context, server_id, metadata, delete):
diff --git a/nova/tests/api/openstack/compute/test_servers.py b/nova/tests/api/openstack/compute/test_servers.py
index 0b5f3cf676..3ac10c9681 100644
--- a/nova/tests/api/openstack/compute/test_servers.py
+++ b/nova/tests/api/openstack/compute/test_servers.py
@@ -42,6 +42,7 @@ from nova.db.sqlalchemy import models
from nova import exception
from nova.network import manager
from nova.network.quantumv2 import api as quantum_api
+from nova.openstack.common import cfg
from nova.openstack.common import jsonutils
from nova.openstack.common import rpc
from nova import test
@@ -51,7 +52,7 @@ from nova.tests.image import fake
from nova.tests import matchers
-CONF = config.CONF
+CONF = cfg.CONF
FAKE_UUID = fakes.FAKE_UUID
NS = "{http://docs.openstack.org/compute/api/v1.1}"
diff --git a/nova/tests/api/openstack/fakes.py b/nova/tests/api/openstack/fakes.py
index d84b215b22..6b6e70816d 100644
--- a/nova/tests/api/openstack/fakes.py
+++ b/nova/tests/api/openstack/fakes.py
@@ -35,7 +35,6 @@ from nova.api.openstack import wsgi as os_wsgi
from nova.compute import api as compute_api
from nova.compute import instance_types
from nova.compute import vm_states
-import nova.config
from nova import context
from nova.db.sqlalchemy import models
from nova import exception as exc
diff --git a/nova/tests/api/test_sizelimit.py b/nova/tests/api/test_sizelimit.py
index 0eb46616f0..9c5ab1a278 100644
--- a/nova/tests/api/test_sizelimit.py
+++ b/nova/tests/api/test_sizelimit.py
@@ -15,10 +15,10 @@
import webob
import nova.api.sizelimit
-from nova import config
+from nova.openstack.common import cfg
from nova import test
-CONF = config.CONF
+CONF = cfg.CONF
MAX_REQUEST_BODY_SIZE = CONF.osapi_max_request_body_size
diff --git a/nova/tests/baremetal/db/base.py b/nova/tests/baremetal/db/base.py
index 83abcb58ef..ea5a3b4277 100644
--- a/nova/tests/baremetal/db/base.py
+++ b/nova/tests/baremetal/db/base.py
@@ -15,15 +15,15 @@
"""Bare-metal DB test base class."""
-from nova import config
from nova import context as nova_context
+from nova.openstack.common import cfg
from nova import test
from nova.virt.baremetal.db import migration as bm_migration
from nova.virt.baremetal.db.sqlalchemy import session as bm_session
_DB = None
-CONF = config.CONF
+CONF = cfg.CONF
CONF.import_opt('baremetal_sql_connection',
'nova.virt.baremetal.db.sqlalchemy.session')
diff --git a/nova/tests/cert/test_rpcapi.py b/nova/tests/cert/test_rpcapi.py
index 854c49c9f5..820fe46e48 100644
--- a/nova/tests/cert/test_rpcapi.py
+++ b/nova/tests/cert/test_rpcapi.py
@@ -21,10 +21,11 @@ Unit Tests for nova.cert.rpcapi
from nova.cert import rpcapi as cert_rpcapi
from nova import config
from nova import context
+from nova.openstack.common import cfg
from nova.openstack.common import rpc
from nova import test
-CONF = config.CONF
+CONF = cfg.CONF
class CertRpcAPITestCase(test.TestCase):
diff --git a/nova/tests/compute/test_compute.py b/nova/tests/compute/test_compute.py
index 662a90be47..368bdcbda5 100644
--- a/nova/tests/compute/test_compute.py
+++ b/nova/tests/compute/test_compute.py
@@ -43,6 +43,7 @@ from nova import db
from nova import exception
from nova.network import api as network_api
from nova.network import model as network_model
+from nova.openstack.common import cfg
from nova.openstack.common import importutils
from nova.openstack.common import jsonutils
from nova.openstack.common import log as logging
@@ -68,7 +69,7 @@ from nova.volume import cinder
QUOTAS = quota.QUOTAS
LOG = logging.getLogger(__name__)
-CONF = config.CONF
+CONF = cfg.CONF
CONF.import_opt('live_migration_retry_count', 'nova.compute.manager')
diff --git a/nova/tests/compute/test_compute_utils.py b/nova/tests/compute/test_compute_utils.py
index 53a5b20ae1..ee78ba62f1 100644
--- a/nova/tests/compute/test_compute_utils.py
+++ b/nova/tests/compute/test_compute_utils.py
@@ -26,6 +26,7 @@ from nova import context
from nova import db
from nova import exception
from nova.network import api as network_api
+from nova.openstack.common import cfg
from nova.openstack.common import importutils
from nova.openstack.common import log as logging
from nova.openstack.common.notifier import api as notifier_api
@@ -36,7 +37,7 @@ import nova.tests.image.fake
from nova import utils
LOG = logging.getLogger(__name__)
-CONF = config.CONF
+CONF = cfg.CONF
class ComputeValidateDeviceTestCase(test.TestCase):
diff --git a/nova/tests/compute/test_multiple_nodes.py b/nova/tests/compute/test_multiple_nodes.py
index 830897954b..0b6b05cf18 100644
--- a/nova/tests/compute/test_multiple_nodes.py
+++ b/nova/tests/compute/test_multiple_nodes.py
@@ -21,12 +21,13 @@ import mox
from nova import config
from nova import context
from nova import exception
+from nova.openstack.common import cfg
from nova.openstack.common import importutils
from nova import test
from nova.virt import fake
-CONF = config.CONF
+CONF = cfg.CONF
class BaseTestCase(test.TestCase):
diff --git a/nova/tests/compute/test_rpcapi.py b/nova/tests/compute/test_rpcapi.py
index fac95cc625..cba206f9ee 100644
--- a/nova/tests/compute/test_rpcapi.py
+++ b/nova/tests/compute/test_rpcapi.py
@@ -22,11 +22,12 @@ from nova.compute import rpcapi as compute_rpcapi
from nova import config
from nova import context
from nova import db
+from nova.openstack.common import cfg
from nova.openstack.common import jsonutils
from nova.openstack.common import rpc
from nova import test
-CONF = config.CONF
+CONF = cfg.CONF
class ComputeRpcAPITestCase(test.TestCase):
diff --git a/nova/tests/console/test_console.py b/nova/tests/console/test_console.py
index 372fbd1dfd..d8fd9be1e4 100644
--- a/nova/tests/console/test_console.py
+++ b/nova/tests/console/test_console.py
@@ -24,11 +24,12 @@ from nova.console import rpcapi as console_rpcapi
from nova import context
from nova import db
from nova import exception
+from nova.openstack.common import cfg
from nova.openstack.common import importutils
from nova.openstack.common import rpc
from nova import test
-CONF = config.CONF
+CONF = cfg.CONF
CONF.import_opt('console_driver', 'nova.console.manager')
diff --git a/nova/tests/console/test_rpcapi.py b/nova/tests/console/test_rpcapi.py
index 0df7491c56..e98aee32f5 100644
--- a/nova/tests/console/test_rpcapi.py
+++ b/nova/tests/console/test_rpcapi.py
@@ -21,10 +21,11 @@ Unit Tests for nova.console.rpcapi
from nova import config
from nova.console import rpcapi as console_rpcapi
from nova import context
+from nova.openstack.common import cfg
from nova.openstack.common import rpc
from nova import test
-CONF = config.CONF
+CONF = cfg.CONF
class ConsoleRpcAPITestCase(test.TestCase):
diff --git a/nova/tests/consoleauth/test_consoleauth.py b/nova/tests/consoleauth/test_consoleauth.py
index 5ff15b23b2..9c6368b4c7 100644
--- a/nova/tests/consoleauth/test_consoleauth.py
+++ b/nova/tests/consoleauth/test_consoleauth.py
@@ -22,7 +22,6 @@ Tests for Consoleauth Code.
import time
-from nova import config
from nova.consoleauth import manager
from nova import context
from nova.openstack.common import log as logging
diff --git a/nova/tests/consoleauth/test_rpcapi.py b/nova/tests/consoleauth/test_rpcapi.py
index 428a79e3ad..51a8eda146 100644
--- a/nova/tests/consoleauth/test_rpcapi.py
+++ b/nova/tests/consoleauth/test_rpcapi.py
@@ -18,13 +18,13 @@
Unit Tests for nova.consoleauth.rpcapi
"""
-from nova import config
from nova.consoleauth import rpcapi as consoleauth_rpcapi
from nova import context
+from nova.openstack.common import cfg
from nova.openstack.common import rpc
from nova import test
-CONF = config.CONF
+CONF = cfg.CONF
class ConsoleAuthRpcAPITestCase(test.TestCase):
diff --git a/nova/tests/declare_flags.py b/nova/tests/declare_flags.py
index 615ee35b38..476397261c 100644
--- a/nova/tests/declare_flags.py
+++ b/nova/tests/declare_flags.py
@@ -16,8 +16,7 @@
# License for the specific language governing permissions and limitations
# under the License.
-from nova import config
from nova.openstack.common import cfg
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opt(cfg.IntOpt('answer', default=42, help='test flag'))
diff --git a/nova/tests/fake_flags.py b/nova/tests/fake_flags.py
index 65191641de..e6ef3f7de9 100644
--- a/nova/tests/fake_flags.py
+++ b/nova/tests/fake_flags.py
@@ -17,8 +17,9 @@
# under the License.
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('fake_network', 'nova.network.manager')
diff --git a/nova/tests/fake_network.py b/nova/tests/fake_network.py
index 50c6a55a8a..abbd0be793 100644
--- a/nova/tests/fake_network.py
+++ b/nova/tests/fake_network.py
@@ -25,12 +25,13 @@ from nova.network import api as network_api
from nova.network import manager as network_manager
from nova.network import model as network_model
from nova.network import nova_ipam_lib
+from nova.openstack.common import cfg
from nova import utils
from nova.virt.libvirt import config as libvirt_config
HOST = "testhost"
-CONF = config.CONF
+CONF = cfg.CONF
class FakeIptablesFirewallDriver(object):
diff --git a/nova/tests/image/fake.py b/nova/tests/image/fake.py
index 58c03b1674..d495ee2fb3 100644
--- a/nova/tests/image/fake.py
+++ b/nova/tests/image/fake.py
@@ -25,10 +25,11 @@ import uuid
from nova import config
from nova import exception
import nova.image.glance
+from nova.openstack.common import cfg
from nova.openstack.common import log as logging
-CONF = config.CONF
+CONF = cfg.CONF
LOG = logging.getLogger(__name__)
diff --git a/nova/tests/integrated/test_api_samples.py b/nova/tests/integrated/test_api_samples.py
index 9337644276..b8dbdb99d3 100644
--- a/nova/tests/integrated/test_api_samples.py
+++ b/nova/tests/integrated/test_api_samples.py
@@ -28,6 +28,7 @@ from nova import config
from nova import context
from nova import db
from nova.network.manager import NetworkManager
+from nova.openstack.common import cfg
from nova.openstack.common import importutils
from nova.openstack.common import jsonutils
from nova.openstack.common.log import logging
@@ -38,7 +39,7 @@ from nova.tests import fake_network
from nova.tests.image import fake
from nova.tests.integrated import integrated_helpers
-CONF = config.CONF
+CONF = cfg.CONF
LOG = logging.getLogger(__name__)
diff --git a/nova/tests/integrated/test_extensions.py b/nova/tests/integrated/test_extensions.py
index c5897da125..24ac1750e1 100644
--- a/nova/tests/integrated/test_extensions.py
+++ b/nova/tests/integrated/test_extensions.py
@@ -16,10 +16,11 @@
# under the License.
from nova import config
+from nova.openstack.common import cfg
from nova.openstack.common.log import logging
from nova.tests.integrated import integrated_helpers
-CONF = config.CONF
+CONF = cfg.CONF
LOG = logging.getLogger(__name__)
diff --git a/nova/tests/integrated/test_multiprocess_api.py b/nova/tests/integrated/test_multiprocess_api.py
index fbbf92eece..4f07d9de9b 100644
--- a/nova/tests/integrated/test_multiprocess_api.py
+++ b/nova/tests/integrated/test_multiprocess_api.py
@@ -21,7 +21,6 @@ import signal
import time
import traceback
-from nova import config
from nova.openstack.common.log import logging
from nova import service
from nova.tests.integrated import integrated_helpers
diff --git a/nova/tests/network/test_linux_net.py b/nova/tests/network/test_linux_net.py
index 666ce6dab6..6ebf92f199 100644
--- a/nova/tests/network/test_linux_net.py
+++ b/nova/tests/network/test_linux_net.py
@@ -23,13 +23,14 @@ from nova import config
from nova import context
from nova import db
from nova.network import linux_net
+from nova.openstack.common import cfg
from nova.openstack.common import fileutils
from nova.openstack.common import importutils
from nova.openstack.common import log as logging
from nova import test
from nova import utils
-CONF = config.CONF
+CONF = cfg.CONF
LOG = logging.getLogger(__name__)
HOST = "testhost"
diff --git a/nova/tests/network/test_quantumv2.py b/nova/tests/network/test_quantumv2.py
index 7c19698fba..8ceaa4c997 100644
--- a/nova/tests/network/test_quantumv2.py
+++ b/nova/tests/network/test_quantumv2.py
@@ -19,17 +19,17 @@ import uuid
import mox
-from nova import config
from nova import context
from nova import exception
from nova.network import model
from nova.network import quantumv2
from nova.network.quantumv2 import api as quantumapi
+from nova.openstack.common import cfg
from nova import test
from quantumclient.v2_0 import client
-CONF = config.CONF
+CONF = cfg.CONF
#NOTE: Quantum client raises Exception which is discouraged by HACKING.
# We set this variable here and use it for assertions below to avoid
diff --git a/nova/tests/network/test_rpcapi.py b/nova/tests/network/test_rpcapi.py
index 500cc95838..250dd9d65c 100644
--- a/nova/tests/network/test_rpcapi.py
+++ b/nova/tests/network/test_rpcapi.py
@@ -21,10 +21,11 @@ Unit Tests for nova.network.rpcapi
from nova import config
from nova import context
from nova.network import rpcapi as network_rpcapi
+from nova.openstack.common import cfg
from nova.openstack.common import rpc
from nova import test
-CONF = config.CONF
+CONF = cfg.CONF
class NetworkRpcAPITestCase(test.TestCase):
diff --git a/nova/tests/runtime_flags.py b/nova/tests/runtime_flags.py
index 33d265cf4a..fe5fed1ed8 100644
--- a/nova/tests/runtime_flags.py
+++ b/nova/tests/runtime_flags.py
@@ -16,8 +16,7 @@
# License for the specific language governing permissions and limitations
# under the License.
-from nova import config
from nova.openstack.common import cfg
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opt(cfg.IntOpt('runtime_answer', default=54, help='test flag'))
diff --git a/nova/tests/scheduler/test_host_filters.py b/nova/tests/scheduler/test_host_filters.py
index 84667eb9ec..a052757e8b 100644
--- a/nova/tests/scheduler/test_host_filters.py
+++ b/nova/tests/scheduler/test_host_filters.py
@@ -22,6 +22,7 @@ from nova import config
from nova import context
from nova import db
from nova import exception
+from nova.openstack.common import cfg
from nova.openstack.common import jsonutils
from nova.scheduler import filters
from nova.scheduler.filters import extra_specs_ops
@@ -30,7 +31,7 @@ from nova import test
from nova.tests.scheduler import fakes
from nova import utils
-CONF = config.CONF
+CONF = cfg.CONF
DATA = ''
diff --git a/nova/tests/scheduler/test_least_cost.py b/nova/tests/scheduler/test_least_cost.py
index f8ed20b43d..d159d8f4c5 100644
--- a/nova/tests/scheduler/test_least_cost.py
+++ b/nova/tests/scheduler/test_least_cost.py
@@ -15,7 +15,6 @@
"""
Tests For Least Cost functions.
"""
-from nova import config
from nova import context
from nova.openstack.common import cfg
from nova.scheduler import weights
@@ -33,7 +32,7 @@ test_least_cost_opts = [
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('compute_fill_first_cost_fn_weight',
'nova.scheduler.weights.least_cost')
diff --git a/nova/tests/scheduler/test_rpcapi.py b/nova/tests/scheduler/test_rpcapi.py
index 05a792a536..bb6465d3c8 100644
--- a/nova/tests/scheduler/test_rpcapi.py
+++ b/nova/tests/scheduler/test_rpcapi.py
@@ -20,11 +20,12 @@ Unit Tests for nova.scheduler.rpcapi
from nova import config
from nova import context
+from nova.openstack.common import cfg
from nova.openstack.common import rpc
from nova.scheduler import rpcapi as scheduler_rpcapi
from nova import test
-CONF = config.CONF
+CONF = cfg.CONF
class SchedulerRpcAPITestCase(test.TestCase):
diff --git a/nova/tests/scheduler/test_scheduler.py b/nova/tests/scheduler/test_scheduler.py
index 76d438f2ee..78f2c7b9e2 100644
--- a/nova/tests/scheduler/test_scheduler.py
+++ b/nova/tests/scheduler/test_scheduler.py
@@ -26,7 +26,6 @@ from nova.compute import power_state
from nova.compute import rpcapi as compute_rpcapi
from nova.compute import utils as compute_utils
from nova.compute import vm_states
-from nova import config
from nova import context
from nova import db
from nova import exception
diff --git a/nova/tests/test_api.py b/nova/tests/test_api.py
index 63630325bc..cf6e1de900 100644
--- a/nova/tests/test_api.py
+++ b/nova/tests/test_api.py
@@ -36,7 +36,6 @@ from nova.api import ec2
from nova.api.ec2 import apirequest
from nova.api.ec2 import ec2utils
from nova import block_device
-from nova import config
from nova import context
from nova import exception
from nova.openstack.common import timeutils
diff --git a/nova/tests/test_configdrive2.py b/nova/tests/test_configdrive2.py
index 4973b3712f..b5f36185d9 100644
--- a/nova/tests/test_configdrive2.py
+++ b/nova/tests/test_configdrive2.py
@@ -22,7 +22,6 @@ import tempfile
from nova import test
-from nova import config
from nova.openstack.common import log
from nova import utils
from nova.virt import configdrive
diff --git a/nova/tests/test_crypto.py b/nova/tests/test_crypto.py
index 78fa420aa6..83010cee24 100644
--- a/nova/tests/test_crypto.py
+++ b/nova/tests/test_crypto.py
@@ -20,7 +20,6 @@ import os
import mox
-from nova import config
from nova import crypto
from nova import db
from nova import exception
diff --git a/nova/tests/test_db_api.py b/nova/tests/test_db_api.py
index 193378557d..8308315d2e 100644
--- a/nova/tests/test_db_api.py
+++ b/nova/tests/test_db_api.py
@@ -22,16 +22,16 @@
import datetime
import uuid as stdlib_uuid
-from nova import config
from nova import context
from nova import db
from nova import exception
+from nova.openstack.common import cfg
from nova.openstack.common import timeutils
from nova import test
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_disk_mb', 'nova.compute.resource_tracker')
diff --git a/nova/tests/test_flags.py b/nova/tests/test_flags.py
index b832c95a48..dd83c4ffd8 100644
--- a/nova/tests/test_flags.py
+++ b/nova/tests/test_flags.py
@@ -21,7 +21,7 @@ from nova import config
from nova.openstack.common import cfg
from nova import test
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opt(cfg.StrOpt('flags_unittest',
default='foo',
help='for testing purposes only'))
diff --git a/nova/tests/test_hypervapi.py b/nova/tests/test_hypervapi.py
index dab5d027d6..1c49fe2f50 100644
--- a/nova/tests/test_hypervapi.py
+++ b/nova/tests/test_hypervapi.py
@@ -26,10 +26,10 @@ import sys
import uuid
from nova.compute import power_state
-from nova import config
from nova import context
from nova import db
from nova.image import glance
+from nova.openstack.common import cfg
from nova.tests import fake_network
from nova.tests.hyperv import basetestcase
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 import images
-CONF = config.CONF
+CONF = cfg.CONF
class HyperVAPITestCase(basetestcase.BaseTestCase):
diff --git a/nova/tests/test_imagebackend.py b/nova/tests/test_imagebackend.py
index 224127f54b..59eccdc444 100644
--- a/nova/tests/test_imagebackend.py
+++ b/nova/tests/test_imagebackend.py
@@ -17,13 +17,13 @@
import os
-from nova import config
+from nova.openstack.common import cfg
from nova.openstack.common import fileutils
from nova import test
from nova.tests import fake_libvirt_utils
from nova.virt.libvirt import imagebackend
-CONF = config.CONF
+CONF = cfg.CONF
class _ImageTestCase(test.TestCase):
diff --git a/nova/tests/test_imagecache.py b/nova/tests/test_imagecache.py
index 3a1b40c4f8..3ea99d53b9 100644
--- a/nova/tests/test_imagecache.py
+++ b/nova/tests/test_imagecache.py
@@ -29,13 +29,14 @@ from nova.compute import manager as compute_manager
from nova.compute import vm_states
from nova import config
from nova import db
+from nova.openstack.common import cfg
from nova.openstack.common import importutils
from nova.openstack.common import log
from nova import utils
from nova.virt.libvirt import imagecache
from nova.virt.libvirt import utils as virtutils
-CONF = config.CONF
+CONF = cfg.CONF
LOG = log.getLogger(__name__)
diff --git a/nova/tests/test_instance_types.py b/nova/tests/test_instance_types.py
index deb1656827..db44778f11 100644
--- a/nova/tests/test_instance_types.py
+++ b/nova/tests/test_instance_types.py
@@ -18,7 +18,6 @@ Unit Tests for instance types code
import time
from nova.compute import instance_types
-from nova import config
from nova import context
from nova import db
from nova.db.sqlalchemy import models
diff --git a/nova/tests/test_libvirt.py b/nova/tests/test_libvirt.py
index b2bc887809..1b65afc2a9 100644
--- a/nova/tests/test_libvirt.py
+++ b/nova/tests/test_libvirt.py
@@ -37,6 +37,7 @@ from nova import config
from nova import context
from nova import db
from nova import exception
+from nova.openstack.common import cfg
from nova.openstack.common import fileutils
from nova.openstack.common import importutils
from nova.openstack.common import jsonutils
@@ -69,7 +70,7 @@ except ImportError:
libvirt_driver.libvirt = libvirt
-CONF = config.CONF
+CONF = cfg.CONF
LOG = logging.getLogger(__name__)
_fake_network_info = fake_network.fake_get_instance_nw_info
diff --git a/nova/tests/test_libvirt_vif.py b/nova/tests/test_libvirt_vif.py
index af1c657a70..bd51bf01ac 100644
--- a/nova/tests/test_libvirt_vif.py
+++ b/nova/tests/test_libvirt_vif.py
@@ -16,13 +16,13 @@
from lxml import etree
-from nova import config
+from nova.openstack.common import cfg
from nova import test
from nova import utils
from nova.virt.libvirt import config as vconfig
from nova.virt.libvirt import vif
-CONF = config.CONF
+CONF = cfg.CONF
class LibvirtVifTestCase(test.TestCase):
diff --git a/nova/tests/test_metadata.py b/nova/tests/test_metadata.py
index a68ac40fd3..46cd40c3b9 100644
--- a/nova/tests/test_metadata.py
+++ b/nova/tests/test_metadata.py
@@ -28,15 +28,15 @@ import webob
from nova.api.metadata import base
from nova.api.metadata import handler
from nova import block_device
-from nova import config
from nova import db
from nova.db.sqlalchemy import api
from nova import exception
from nova.network import api as network_api
+from nova.openstack.common import cfg
from nova import test
from nova.tests import fake_network
-CONF = config.CONF
+CONF = cfg.CONF
USER_DATA_STRING = ("This is an encoded string")
ENCODE_USER_DATA_STRING = base64.b64encode(USER_DATA_STRING)
diff --git a/nova/tests/test_notifications.py b/nova/tests/test_notifications.py
index 21f869d5e6..4f5adc99aa 100644
--- a/nova/tests/test_notifications.py
+++ b/nova/tests/test_notifications.py
@@ -22,7 +22,6 @@ import copy
from nova.compute import instance_types
from nova.compute import task_states
from nova.compute import vm_states
-from nova import config
from nova import context
from nova import db
from nova.network import api as network_api
diff --git a/nova/tests/test_objectstore.py b/nova/tests/test_objectstore.py
index 3b148b509b..55490e8607 100644
--- a/nova/tests/test_objectstore.py
+++ b/nova/tests/test_objectstore.py
@@ -30,10 +30,11 @@ from boto.s3 import connection as s3
from nova import config
from nova.objectstore import s3server
+from nova.openstack.common import cfg
from nova import test
from nova import wsgi
-CONF = config.CONF
+CONF = cfg.CONF
# Create a unique temporary directory. We don't delete after test to
# allow checking the contents after running tests. Users and/or tools
diff --git a/nova/tests/test_pipelib.py b/nova/tests/test_pipelib.py
index 62c97db2fe..b52f0d6984 100644
--- a/nova/tests/test_pipelib.py
+++ b/nova/tests/test_pipelib.py
@@ -17,10 +17,11 @@ from nova.cloudpipe import pipelib
from nova import config
from nova import context
from nova import crypto
+from nova.openstack.common import cfg
from nova import test
from nova import utils
-CONF = config.CONF
+CONF = cfg.CONF
class PipelibTest(test.TestCase):
diff --git a/nova/tests/test_policy.py b/nova/tests/test_policy.py
index 531dd97f34..f90854f08d 100644
--- a/nova/tests/test_policy.py
+++ b/nova/tests/test_policy.py
@@ -21,7 +21,6 @@ import os.path
import StringIO
import urllib2
-from nova import config
from nova import context
from nova import exception
from nova.openstack.common import policy as common_policy
diff --git a/nova/tests/test_powervm.py b/nova/tests/test_powervm.py
index e640d7f019..b84bd9fbd1 100644
--- a/nova/tests/test_powervm.py
+++ b/nova/tests/test_powervm.py
@@ -18,7 +18,6 @@
Test suite for PowerVMDriver.
"""
-from nova import config
from nova import context
from nova import db
from nova import test
diff --git a/nova/tests/test_quota.py b/nova/tests/test_quota.py
index bfcc03b0fa..0949239ab4 100644
--- a/nova/tests/test_quota.py
+++ b/nova/tests/test_quota.py
@@ -26,6 +26,7 @@ from nova import db
from nova.db.sqlalchemy import api as sqa_api
from nova.db.sqlalchemy import models as sqa_models
from nova import exception
+from nova.openstack.common import cfg
from nova.openstack.common import rpc
from nova.openstack.common import timeutils
from nova import quota
@@ -33,7 +34,7 @@ from nova.scheduler import driver as scheduler_driver
from nova import test
import nova.tests.image.fake
-CONF = config.CONF
+CONF = cfg.CONF
class QuotaIntegrationTestCase(test.TestCase):
diff --git a/nova/tests/test_service.py b/nova/tests/test_service.py
index a1a28d05a4..eb0c12978e 100644
--- a/nova/tests/test_service.py
+++ b/nova/tests/test_service.py
@@ -23,7 +23,6 @@ Unit Tests for remote procedure calls using queue
import mox
import sys
-from nova import config
from nova import context
from nova import db
from nova import exception
@@ -46,7 +45,7 @@ test_service_opts = [
help="Port number to bind test service to"),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(test_service_opts)
diff --git a/nova/tests/test_utils.py b/nova/tests/test_utils.py
index ed38de8c78..82de6114b5 100644
--- a/nova/tests/test_utils.py
+++ b/nova/tests/test_utils.py
@@ -29,11 +29,12 @@ import mox
import nova
from nova import config
from nova import exception
+from nova.openstack.common import cfg
from nova.openstack.common import timeutils
from nova import test
from nova import utils
-CONF = config.CONF
+CONF = cfg.CONF
class ByteConversionTest(test.TestCase):
diff --git a/nova/tests/test_virt.py b/nova/tests/test_virt.py
index 67c52ed3d0..252b0db554 100644
--- a/nova/tests/test_virt.py
+++ b/nova/tests/test_virt.py
@@ -17,7 +17,6 @@
import os
-from nova import config
from nova import exception
from nova import test
from nova import tests
diff --git a/nova/tests/test_vmwareapi.py b/nova/tests/test_vmwareapi.py
index d6bce87f35..ec0cb8b073 100644
--- a/nova/tests/test_vmwareapi.py
+++ b/nova/tests/test_vmwareapi.py
@@ -20,7 +20,6 @@ Test suite for VMWareAPI.
"""
from nova.compute import power_state
-from nova import config
from nova import context
from nova import db
from nova import exception
diff --git a/nova/tests/test_xenapi.py b/nova/tests/test_xenapi.py
index 53ba9eea7a..bc3c1dd384 100644
--- a/nova/tests/test_xenapi.py
+++ b/nova/tests/test_xenapi.py
@@ -33,6 +33,7 @@ from nova import config
from nova import context
from nova import db
from nova import exception
+from nova.openstack.common import cfg
from nova.openstack.common import importutils
from nova.openstack.common import jsonutils
from nova.openstack.common import log as logging
@@ -56,7 +57,7 @@ from nova.virt.xenapi import volume_utils
LOG = logging.getLogger(__name__)
-CONF = config.CONF
+CONF = cfg.CONF
IMAGE_MACHINE = '1'
IMAGE_KERNEL = '2'
diff --git a/nova/tests/utils.py b/nova/tests/utils.py
index d780edc6f4..9d5eb3144e 100644
--- a/nova/tests/utils.py
+++ b/nova/tests/utils.py
@@ -16,12 +16,12 @@
import platform
-import nova.config
import nova.context
import nova.db
from nova.image import glance
+from nova.openstack.common import cfg
-CONF = nova.config.CONF
+CONF = cfg.CONF
def get_test_admin_context():
diff --git a/nova/utils.py b/nova/utils.py
index 38fdc6f0f9..a872a6c266 100644
--- a/nova/utils.py
+++ b/nova/utils.py
@@ -56,7 +56,7 @@ from nova.openstack.common import timeutils
LOG = logging.getLogger(__name__)
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opt(
cfg.BoolOpt('disable_process_locking', default=False,
help='Whether to disable inter-process locks'))
diff --git a/nova/virt/baremetal/db/api.py b/nova/virt/baremetal/db/api.py
index a9b6b3fe26..0b8cf781c6 100644
--- a/nova/virt/baremetal/db/api.py
+++ b/nova/virt/baremetal/db/api.py
@@ -42,7 +42,6 @@ these objects be simple dictionaries.
"""
-from nova import config
from nova.openstack.common import cfg
from nova import utils
@@ -53,7 +52,7 @@ db_opts = [
help='The backend to use for db'),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(db_opts)
IMPL = utils.LazyPluggable(
diff --git a/nova/virt/baremetal/db/sqlalchemy/migration.py b/nova/virt/baremetal/db/sqlalchemy/migration.py
index d91024a5e8..929793e70d 100644
--- a/nova/virt/baremetal/db/sqlalchemy/migration.py
+++ b/nova/virt/baremetal/db/sqlalchemy/migration.py
@@ -22,7 +22,6 @@ from migrate.versioning import util as migrate_util
import os
import sqlalchemy
-from nova import config
from nova import exception
from nova.openstack.common import log as logging
from nova.virt.baremetal.db import migration
diff --git a/nova/virt/baremetal/db/sqlalchemy/session.py b/nova/virt/baremetal/db/sqlalchemy/session.py
index 2cae17f18c..0fc71562b3 100644
--- a/nova/virt/baremetal/db/sqlalchemy/session.py
+++ b/nova/virt/baremetal/db/sqlalchemy/session.py
@@ -30,7 +30,7 @@ opts = [
'bare-metal database'),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(opts)
_ENGINE = None
diff --git a/nova/virt/configdrive.py b/nova/virt/configdrive.py
index fda9f201fc..ad6e0240ab 100644
--- a/nova/virt/configdrive.py
+++ b/nova/virt/configdrive.py
@@ -21,7 +21,6 @@ import os
import shutil
import tempfile
-from nova import config
from nova import exception
from nova.openstack.common import cfg
from nova.openstack.common import fileutils
@@ -51,7 +50,7 @@ configdrive_opts = [
'ISO image creation')
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(configdrive_opts)
diff --git a/nova/virt/disk/api.py b/nova/virt/disk/api.py
index e34ca58b57..e8d9308a3c 100644
--- a/nova/virt/disk/api.py
+++ b/nova/virt/disk/api.py
@@ -76,7 +76,7 @@ disk_opts = [
'The format is <os_type>=<mkfs command>'),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(disk_opts)
_MKFS_COMMAND = {}
diff --git a/nova/virt/disk/mount/nbd.py b/nova/virt/disk/mount/nbd.py
index a6eb77199c..01d8b66b59 100644
--- a/nova/virt/disk/mount/nbd.py
+++ b/nova/virt/disk/mount/nbd.py
@@ -18,7 +18,6 @@
import os
import time
-from nova import config
from nova.openstack.common import cfg
from nova import utils
from nova.virt.disk.mount import api
@@ -33,7 +32,7 @@ nbd_opts = [
help='maximum number of possible nbd devices'),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(nbd_opts)
diff --git a/nova/virt/driver.py b/nova/virt/driver.py
index 12f19bf3be..4dd7b1c660 100644
--- a/nova/virt/driver.py
+++ b/nova/virt/driver.py
@@ -22,7 +22,6 @@ Driver base-classes:
types that support that contract
"""
-from nova import config
from nova.openstack.common import log as logging
LOG = logging.getLogger(__name__)
diff --git a/nova/virt/firewall.py b/nova/virt/firewall.py
index 7c6e95bebc..d45fbbde18 100644
--- a/nova/virt/firewall.py
+++ b/nova/virt/firewall.py
@@ -40,7 +40,7 @@ firewall_opts = [
help='Whether to allow network traffic from same network'),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(firewall_opts)
diff --git a/nova/virt/hyperv/hostops.py b/nova/virt/hyperv/hostops.py
index 627cf72bca..c07388c355 100644
--- a/nova/virt/hyperv/hostops.py
+++ b/nova/virt/hyperv/hostops.py
@@ -22,11 +22,11 @@ import multiprocessing
import os
import platform
-from nova import config
+from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova.virt.hyperv import baseops
-CONF = config.CONF
+CONF = cfg.CONF
LOG = logging.getLogger(__name__)
diff --git a/nova/virt/hyperv/livemigrationops.py b/nova/virt/hyperv/livemigrationops.py
index 1fb0d14bba..2ecddec769 100644
--- a/nova/virt/hyperv/livemigrationops.py
+++ b/nova/virt/hyperv/livemigrationops.py
@@ -23,6 +23,7 @@ import sys
from nova import config
from nova import exception
+from nova.openstack.common import cfg
from nova.openstack.common import excutils
from nova.openstack.common import log as logging
from nova.virt.hyperv import baseops
@@ -34,7 +35,7 @@ if sys.platform == 'win32':
import wmi
LOG = logging.getLogger(__name__)
-CONF = config.CONF
+CONF = cfg.CONF
class LiveMigrationOps(baseops.BaseOps):
diff --git a/nova/virt/hyperv/snapshotops.py b/nova/virt/hyperv/snapshotops.py
index 39ba25b304..5dc19ebb1c 100644
--- a/nova/virt/hyperv/snapshotops.py
+++ b/nova/virt/hyperv/snapshotops.py
@@ -22,9 +22,9 @@ import os
import shutil
import sys
-from nova import config
from nova import exception
from nova.image import glance
+from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova.virt.hyperv import baseops
from nova.virt.hyperv import constants
@@ -36,7 +36,7 @@ from xml.etree import ElementTree
if sys.platform == 'win32':
import wmi
-CONF = config.CONF
+CONF = cfg.CONF
LOG = logging.getLogger(__name__)
diff --git a/nova/virt/hyperv/vmops.py b/nova/virt/hyperv/vmops.py
index 74e8ca7fd4..5dfdebb47f 100644
--- a/nova/virt/hyperv/vmops.py
+++ b/nova/virt/hyperv/vmops.py
@@ -57,7 +57,7 @@ hyperv_opts = [
'instead of a disk drive')
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(hyperv_opts)
diff --git a/nova/virt/hyperv/vmutils.py b/nova/virt/hyperv/vmutils.py
index 8e509cd28a..2a008e4208 100644
--- a/nova/virt/hyperv/vmutils.py
+++ b/nova/virt/hyperv/vmutils.py
@@ -25,8 +25,8 @@ import sys
import time
import uuid
-from nova import config
from nova import exception
+from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova.virt.hyperv import constants
from nova.virt import images
@@ -35,7 +35,7 @@ from nova.virt import images
if sys.platform == 'win32':
import wmi
-CONF = config.CONF
+CONF = cfg.CONF
LOG = logging.getLogger(__name__)
diff --git a/nova/virt/hyperv/volumeops.py b/nova/virt/hyperv/volumeops.py
index 39bdc5497d..79d35eae8a 100644
--- a/nova/virt/hyperv/volumeops.py
+++ b/nova/virt/hyperv/volumeops.py
@@ -40,7 +40,7 @@ hyper_volumeops_opts = [
help='The seconds to wait between an volume attachment attempt'),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(hyper_volumeops_opts)
diff --git a/nova/virt/hyperv/volumeutils.py b/nova/virt/hyperv/volumeutils.py
index 7146666204..e4368b2f5e 100644
--- a/nova/virt/hyperv/volumeutils.py
+++ b/nova/virt/hyperv/volumeutils.py
@@ -26,6 +26,7 @@ import time
from nova import block_device
from nova import config
+from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova.virt import driver
from nova.virt.hyperv import vmutils
@@ -35,7 +36,7 @@ if sys.platform == 'win32':
import _winreg
LOG = logging.getLogger(__name__)
-CONF = config.CONF
+CONF = cfg.CONF
class VolumeUtils(object):
diff --git a/nova/virt/images.py b/nova/virt/images.py
index bc6b21a7b5..514c8755f8 100644
--- a/nova/virt/images.py
+++ b/nova/virt/images.py
@@ -24,7 +24,6 @@ Handling of VM disk images.
import os
import re
-from nova import config
from nova import exception
from nova.image import glance
from nova.openstack.common import cfg
@@ -40,7 +39,7 @@ image_opts = [
help='Force backing images to raw format'),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(image_opts)
diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py
index 88452f2309..00240913c0 100644
--- a/nova/virt/libvirt/driver.py
+++ b/nova/virt/libvirt/driver.py
@@ -183,7 +183,7 @@ libvirt_opts = [
'before uploading them to image service'),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(libvirt_opts)
CONF.import_opt('live_migration_retry_count', 'nova.compute.manager')
CONF.import_opt('vncserver_proxyclient_address', 'nova.vnc')
diff --git a/nova/virt/libvirt/firewall.py b/nova/virt/libvirt/firewall.py
index 2e73661f6c..e7c4ca64f8 100644
--- a/nova/virt/libvirt/firewall.py
+++ b/nova/virt/libvirt/firewall.py
@@ -21,11 +21,12 @@
from eventlet import tpool
from nova import config
+from nova.openstack.common import cfg
from nova.openstack.common import log as logging
import nova.virt.firewall as base_firewall
LOG = logging.getLogger(__name__)
-CONF = config.CONF
+CONF = cfg.CONF
try:
import libvirt
diff --git a/nova/virt/libvirt/imagebackend.py b/nova/virt/libvirt/imagebackend.py
index 18a8aa910d..8f1e876806 100644
--- a/nova/virt/libvirt/imagebackend.py
+++ b/nova/virt/libvirt/imagebackend.py
@@ -19,7 +19,6 @@ import abc
import contextlib
import os
-from nova import config
from nova.openstack.common import cfg
from nova.openstack.common import excutils
from nova.openstack.common import fileutils
@@ -46,7 +45,7 @@ __imagebackend_opts = [
' if this flag is set to True.'),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(__imagebackend_opts)
diff --git a/nova/virt/libvirt/imagecache.py b/nova/virt/libvirt/imagecache.py
index 7256dcdb01..e9e9fef740 100644
--- a/nova/virt/libvirt/imagecache.py
+++ b/nova/virt/libvirt/imagecache.py
@@ -55,7 +55,7 @@ imagecache_opts = [
help='Write a checksum for files in _base to disk'),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(imagecache_opts)
CONF.import_opt('instances_path', 'nova.compute.manager')
CONF.import_opt('base_dir_name', 'nova.compute.manager')
diff --git a/nova/virt/libvirt/utils.py b/nova/virt/libvirt/utils.py
index 9bda95b447..d1a2ecd6b7 100644
--- a/nova/virt/libvirt/utils.py
+++ b/nova/virt/libvirt/utils.py
@@ -26,7 +26,6 @@ import re
from lxml import etree
-from nova import config
from nova import exception
from nova.openstack.common import cfg
from nova.openstack.common import fileutils
@@ -46,7 +45,7 @@ util_opts = [
'non-standard locations')
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(util_opts)
CONF.import_opt('instances_path', 'nova.compute.manager')
CONF.import_opt('base_dir_name', 'nova.compute.manager')
diff --git a/nova/virt/libvirt/vif.py b/nova/virt/libvirt/vif.py
index 4f51b96a8e..51c8dacd79 100644
--- a/nova/virt/libvirt/vif.py
+++ b/nova/virt/libvirt/vif.py
@@ -41,7 +41,7 @@ libvirt_vif_opts = [
help='Use virtio for bridge interfaces'),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(libvirt_vif_opts)
CONF.import_opt('libvirt_type', 'nova.virt.libvirt.driver')
diff --git a/nova/virt/libvirt/volume.py b/nova/virt/libvirt/volume.py
index b9b88ce219..3f95cecfb1 100644
--- a/nova/virt/libvirt/volume.py
+++ b/nova/virt/libvirt/volume.py
@@ -20,7 +20,6 @@
import os
import time
-from nova import config
from nova import exception
from nova.openstack.common import cfg
from nova.openstack.common import lockutils
@@ -44,7 +43,7 @@ volume_opts = [
'volumes')
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(volume_opts)
diff --git a/nova/virt/libvirt/volume_nfs.py b/nova/virt/libvirt/volume_nfs.py
index b952baffa2..42ea880ac3 100644
--- a/nova/virt/libvirt/volume_nfs.py
+++ b/nova/virt/libvirt/volume_nfs.py
@@ -34,7 +34,7 @@ volume_opts = [
default='$state_path/mnt',
help='Base dir where nfs expected to be mounted on compute'),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(volume_opts)
diff --git a/nova/virt/netutils.py b/nova/virt/netutils.py
index 8caacbc7db..a28e6f19fc 100644
--- a/nova/virt/netutils.py
+++ b/nova/virt/netutils.py
@@ -24,8 +24,9 @@
import netaddr
from nova import config
+from nova.openstack.common import cfg
-CONF = config.CONF
+CONF = cfg.CONF
CONF.import_opt('injected_network_template', 'nova.virt.disk.api')
Template = None
diff --git a/nova/virt/powervm/driver.py b/nova/virt/powervm/driver.py
index 8bed966d60..5c3c1c5df2 100644
--- a/nova/virt/powervm/driver.py
+++ b/nova/virt/powervm/driver.py
@@ -17,7 +17,6 @@
from nova.compute import task_states
from nova.compute import vm_states
-from nova import config
from nova import context as nova_context
from nova.openstack.common import cfg
@@ -50,7 +49,7 @@ powervm_opts = [
help='Local directory to download glance images to'),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(powervm_opts)
diff --git a/nova/virt/powervm/operator.py b/nova/virt/powervm/operator.py
index 59b83af045..adc7bf7d02 100644
--- a/nova/virt/powervm/operator.py
+++ b/nova/virt/powervm/operator.py
@@ -20,11 +20,11 @@ import os
import re
import time
-from nova import config
from nova import exception as nova_exception
from nova import utils
from nova.compute import power_state
+from nova.openstack.common import cfg
from nova.openstack.common import excutils
from nova.openstack.common import log as logging
@@ -37,7 +37,7 @@ from nova.virt.powervm import lpar as LPAR
LOG = logging.getLogger(__name__)
-CONF = config.CONF
+CONF = cfg.CONF
def get_powervm_operator():
diff --git a/nova/virt/vmwareapi/driver.py b/nova/virt/vmwareapi/driver.py
index f0673cba20..0af3d9d02c 100644
--- a/nova/virt/vmwareapi/driver.py
+++ b/nova/virt/vmwareapi/driver.py
@@ -36,7 +36,6 @@ import time
from eventlet import event
-from nova import config
from nova import exception
from nova.openstack.common import cfg
from nova.openstack.common import log as logging
@@ -81,7 +80,7 @@ vmwareapi_opts = [
help='Physical ethernet adapter name for vlan networking'),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(vmwareapi_opts)
TIME_BETWEEN_API_CALL_RETRIES = 2.0
diff --git a/nova/virt/vmwareapi/read_write_util.py b/nova/virt/vmwareapi/read_write_util.py
index a20863d8c7..52d095ad3c 100644
--- a/nova/virt/vmwareapi/read_write_util.py
+++ b/nova/virt/vmwareapi/read_write_util.py
@@ -27,7 +27,6 @@ import urllib
import urllib2
import urlparse
-from nova import config
from nova.openstack.common import log as logging
LOG = logging.getLogger(__name__)
diff --git a/nova/virt/vmwareapi/vif.py b/nova/virt/vmwareapi/vif.py
index ad7c5d536c..dc9c6dead3 100644
--- a/nova/virt/vmwareapi/vif.py
+++ b/nova/virt/vmwareapi/vif.py
@@ -17,8 +17,8 @@
"""VIF drivers for VMWare."""
-from nova import config
from nova import exception
+from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova.virt import vif
from nova.virt.vmwareapi import network_utils
@@ -26,7 +26,7 @@ from nova.virt.vmwareapi import network_utils
LOG = logging.getLogger(__name__)
-CONF = config.CONF
+CONF = cfg.CONF
CONF.set_default('vmwareapi_vlan_interface', 'vmnic0')
diff --git a/nova/virt/vmwareapi/vim.py b/nova/virt/vmwareapi/vim.py
index 2894074d6f..194b78a1d4 100644
--- a/nova/virt/vmwareapi/vim.py
+++ b/nova/virt/vmwareapi/vim.py
@@ -26,7 +26,6 @@ try:
except ImportError:
suds = None
-from nova import config
from nova.openstack.common import cfg
from nova.virt.vmwareapi import error_util
@@ -41,7 +40,7 @@ vmwareapi_wsdl_loc_opt = cfg.StrOpt('vmwareapi_wsdl_loc',
'Due to a bug in vSphere ESX 4.1 default wsdl. '
'Refer readme-vmware to setup')
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opt(vmwareapi_wsdl_loc_opt)
diff --git a/nova/virt/vmwareapi/vmops.py b/nova/virt/vmwareapi/vmops.py
index 4cb5b9af68..97270fc063 100644
--- a/nova/virt/vmwareapi/vmops.py
+++ b/nova/virt/vmwareapi/vmops.py
@@ -27,7 +27,6 @@ import urllib2
import uuid
from nova.compute import power_state
-from nova import config
from nova import exception
from nova.openstack.common import cfg
from nova.openstack.common import importutils
@@ -42,7 +41,7 @@ vmware_vif_driver_opt = cfg.StrOpt('vmware_vif_driver',
default='nova.virt.vmwareapi.vif.VMWareVlanBridgeDriver',
help='The VMWare VIF driver to configure the VIFs.')
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opt(vmware_vif_driver_opt)
LOG = logging.getLogger(__name__)
diff --git a/nova/virt/xenapi/agent.py b/nova/virt/xenapi/agent.py
index bf1ea958d4..45948f06df 100644
--- a/nova/virt/xenapi/agent.py
+++ b/nova/virt/xenapi/agent.py
@@ -21,7 +21,6 @@ import os
import time
import uuid
-from nova import config
from nova.openstack.common import cfg
from nova.openstack.common import jsonutils
from nova.openstack.common import log as logging
@@ -56,7 +55,7 @@ xenapi_agent_opts = [
'that VM does not have the agent installed'),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(xenapi_agent_opts)
diff --git a/nova/virt/xenapi/driver.py b/nova/virt/xenapi/driver.py
index edff6934c0..f25dd82bdd 100644
--- a/nova/virt/xenapi/driver.py
+++ b/nova/virt/xenapi/driver.py
@@ -117,7 +117,7 @@ xenapi_opts = [
help='Timeout in seconds for XenAPI login.'),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(xenapi_opts)
diff --git a/nova/virt/xenapi/firewall.py b/nova/virt/xenapi/firewall.py
index 48f340e993..a393558309 100644
--- a/nova/virt/xenapi/firewall.py
+++ b/nova/virt/xenapi/firewall.py
@@ -17,7 +17,6 @@
# License for the specific language governing permissions and limitations
# under the License.
-from nova import config
from nova import context
from nova.openstack.common import jsonutils
from nova.openstack.common import log as logging
diff --git a/nova/virt/xenapi/pool.py b/nova/virt/xenapi/pool.py
index fe91a762ad..064dcd48ea 100644
--- a/nova/virt/xenapi/pool.py
+++ b/nova/virt/xenapi/pool.py
@@ -39,7 +39,7 @@ xenapi_pool_opts = [
help='To use for hosts with different CPUs'),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(xenapi_pool_opts)
diff --git a/nova/virt/xenapi/vif.py b/nova/virt/xenapi/vif.py
index e0b7f8e07b..ba036a28e0 100644
--- a/nova/virt/xenapi/vif.py
+++ b/nova/virt/xenapi/vif.py
@@ -19,7 +19,6 @@
"""VIF drivers for XenAPI."""
-from nova import config
from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova.virt import vif
@@ -31,7 +30,7 @@ xenapi_ovs_integration_bridge_opt = cfg.StrOpt('xenapi_ovs_integration_bridge',
default='xapi1',
help='Name of Integration Bridge used by Open vSwitch')
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opt(xenapi_ovs_integration_bridge_opt)
LOG = logging.getLogger(__name__)
diff --git a/nova/virt/xenapi/vm_utils.py b/nova/virt/xenapi/vm_utils.py
index 5bf4e1148c..2fc668e8fe 100644
--- a/nova/virt/xenapi/vm_utils.py
+++ b/nova/virt/xenapi/vm_utils.py
@@ -115,7 +115,7 @@ xenapi_vm_utils_opts = [
' within a given dom0. (-1 = no limit)')
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(xenapi_vm_utils_opts)
XENAPI_POWER_STATE = {
diff --git a/nova/virt/xenapi/vmops.py b/nova/virt/xenapi/vmops.py
index cbbd15e1a4..5186a3bb28 100644
--- a/nova/virt/xenapi/vmops.py
+++ b/nova/virt/xenapi/vmops.py
@@ -59,7 +59,7 @@ xenapi_vmops_opts = [
help='The XenAPI VIF driver using XenServer Network APIs.')
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(xenapi_vmops_opts)
CONF.import_opt('vncserver_proxyclient_address', 'nova.vnc')
diff --git a/nova/virt/xenapi/volume_utils.py b/nova/virt/xenapi/volume_utils.py
index 1ca3ea21f7..17c4c33003 100644
--- a/nova/virt/xenapi/volume_utils.py
+++ b/nova/virt/xenapi/volume_utils.py
@@ -22,11 +22,11 @@ and storage repositories
import re
import string
-from nova import config
+from nova.openstack.common import cfg
from nova.openstack.common import log as logging
-CONF = config.CONF
+CONF = cfg.CONF
LOG = logging.getLogger(__name__)
diff --git a/nova/vnc/__init__.py b/nova/vnc/__init__.py
index ffc93abcdb..4b9058eb7a 100644
--- a/nova/vnc/__init__.py
+++ b/nova/vnc/__init__.py
@@ -18,7 +18,6 @@
"""Module for VNC Proxying."""
-from nova import config
from nova.openstack.common import cfg
@@ -46,5 +45,5 @@ vnc_opts = [
help='keymap for vnc'),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(vnc_opts)
diff --git a/nova/vnc/xvp_proxy.py b/nova/vnc/xvp_proxy.py
index 947b91d11c..59b80994b8 100644
--- a/nova/vnc/xvp_proxy.py
+++ b/nova/vnc/xvp_proxy.py
@@ -26,7 +26,6 @@ import eventlet.green
import eventlet.greenio
import eventlet.wsgi
-from nova import config
from nova.consoleauth import rpcapi as consoleauth_rpcapi
from nova import context
from nova.openstack.common import cfg
@@ -46,7 +45,7 @@ xvp_proxy_opts = [
help='Address that the XCP VNC proxy should bind to'),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(xvp_proxy_opts)
diff --git a/nova/volume/__init__.py b/nova/volume/__init__.py
index cc7dcf4d9d..159323dc76 100644
--- a/nova/volume/__init__.py
+++ b/nova/volume/__init__.py
@@ -18,11 +18,12 @@
# Importing full names to not pollute the namespace and cause possible
# collisions with use of 'from nova.volume import <foo>' elsewhere.
-import nova.config
+import nova.openstack.common.cfg
import nova.openstack.common.importutils
def API():
importutils = nova.openstack.common.importutils
- cls = importutils.import_class(nova.config.CONF.volume_api_class)
+ volume_api_class = nova.openstack.common.cfg.CONF.volume_api_class
+ cls = importutils.import_class(volume_api_class)
return cls()
diff --git a/nova/volume/cinder.py b/nova/volume/cinder.py
index 67e303e019..ae7b76e26b 100644
--- a/nova/volume/cinder.py
+++ b/nova/volume/cinder.py
@@ -24,7 +24,6 @@ Handles all requests relating to volumes + cinder.
from cinderclient import service_catalog
from cinderclient.v1 import client as cinder_client
-from nova import config
from nova.db import base
from nova import exception
from nova.openstack.common import cfg
@@ -42,7 +41,7 @@ cinder_opts = [
'endpoint e.g. http://localhost:8776/v1/%(project_id)s'),
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(cinder_opts)
LOG = logging.getLogger(__name__)
diff --git a/nova/wsgi.py b/nova/wsgi.py
index 18c28b87b2..304a8d6685 100644
--- a/nova/wsgi.py
+++ b/nova/wsgi.py
@@ -44,7 +44,7 @@ wsgi_opts = [
'into it: client_ip, date_time, request_line, status_code, '
'body_length, wall_seconds.')
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_opts(wsgi_opts)
LOG = logging.getLogger(__name__)
diff --git a/tools/conf/extract_opts.py b/tools/conf/extract_opts.py
index 836e48578e..00ccfbc2e2 100644
--- a/tools/conf/extract_opts.py
+++ b/tools/conf/extract_opts.py
@@ -24,7 +24,6 @@ import socket
import sys
import textwrap
-from nova.openstack.common import cfg
from nova.openstack.common import importutils
diff --git a/tools/xenserver/destroy_cached_images.py b/tools/xenserver/destroy_cached_images.py
index 88f24f4eff..8bd77ec9a5 100644
--- a/tools/xenserver/destroy_cached_images.py
+++ b/tools/xenserver/destroy_cached_images.py
@@ -43,7 +43,7 @@ destroy_opts = [
help='Don\'t actually delete the VDIs.')
]
-CONF = config.CONF
+CONF = cfg.CONF
CONF.register_cli_opts(destroy_opts)
diff --git a/tools/xenserver/vm_vdi_cleaner.py b/tools/xenserver/vm_vdi_cleaner.py
index 89fc454b19..0371aef5a3 100755
--- a/tools/xenserver/vm_vdi_cleaner.py
+++ b/tools/xenserver/vm_vdi_cleaner.py
@@ -31,11 +31,12 @@ from nova import config
from nova import context
from nova import db
from nova import exception
+from nova.openstack.common import cfg
from nova.openstack.common import timeutils
from nova.virt.xenapi import driver as xenapi_driver
-CONF = config.CONF
+CONF = cfg.CONF
CONF.import_opt("resize_confirm_window", "nova.compute.manager")