Use CONF.import_opt() for nova.config opts
The only reason for importing nova.config now is where one of the options defined in that file is needed. Rather than importing nova.config using an import statement, use CONF.import_opt() so that it is clear which option we actually require. In future, we will move many options out of nova.config so many of these import_opt() calls will either go away or cause a module other than nova.config to be imported. Change-Id: I0646efddecdf2530903afd50c1f4364cb1d5dce1
This commit is contained in:
parent
94d87bce21
commit
e237c86446
bin
nova-allnova-apinova-certnova-computenova-consolenova-dhcpbridgenova-managenova-networknova-scheduler
nova
api
block_device.pycert
cloudpipe
compute
conductor
console
consoleauth
crypto.pydb/sqlalchemy
image
manager.pynetwork
objectstore
scheduler
service.pytests
__init__.py
utils.pyapi
ec2
openstack/compute
cert
compute
console
fake_flags.pyfake_network.pyimage
integrated
network
scheduler
test_imagecache.pytest_libvirt.pytest_objectstore.pytest_pipelib.pytest_quota.pytest_utils.pytest_xenapi.pyutils.pyvirt
@ -50,6 +50,7 @@ from nova.vnc import xvp_proxy
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('enabled_apis', 'nova.config')
|
||||
LOG = logging.getLogger('nova.all')
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
@ -43,6 +43,7 @@ from nova import service
|
||||
from nova import utils
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('enabled_apis', 'nova.config')
|
||||
|
||||
if __name__ == '__main__':
|
||||
config.parse_args(sys.argv)
|
||||
|
@ -39,6 +39,7 @@ from nova import service
|
||||
from nova import utils
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('cert_topic', 'nova.config')
|
||||
|
||||
if __name__ == '__main__':
|
||||
config.parse_args(sys.argv)
|
||||
|
@ -48,6 +48,7 @@ from nova import service
|
||||
from nova import utils
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('compute_topic', 'nova.config')
|
||||
|
||||
if __name__ == '__main__':
|
||||
config.parse_args(sys.argv)
|
||||
|
@ -39,6 +39,7 @@ from nova.openstack.common import log as logging
|
||||
from nova import service
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('console_topic', 'nova.config')
|
||||
|
||||
if __name__ == '__main__':
|
||||
config.parse_args(sys.argv)
|
||||
|
@ -47,6 +47,8 @@ from nova.openstack.common import rpc
|
||||
from nova import utils
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('host', 'nova.config')
|
||||
CONF.import_opt('network_manager', 'nova.config')
|
||||
LOG = logging.getLogger('nova.dhcpbridge')
|
||||
|
||||
|
||||
|
@ -89,6 +89,8 @@ from nova import utils
|
||||
from nova import version
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('network_manager', 'nova.config')
|
||||
CONF.import_opt('service_down_time', 'nova.config')
|
||||
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')
|
||||
|
@ -41,6 +41,7 @@ from nova import service
|
||||
from nova import utils
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('network_topic', 'nova.config')
|
||||
|
||||
if __name__ == '__main__':
|
||||
config.parse_args(sys.argv)
|
||||
|
@ -43,6 +43,7 @@ from nova import service
|
||||
from nova import utils
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('scheduler_topic', 'nova.config')
|
||||
|
||||
if __name__ == '__main__':
|
||||
config.parse_args(sys.argv)
|
||||
|
@ -21,7 +21,6 @@ Common Auth Middleware.
|
||||
import webob.dec
|
||||
import webob.exc
|
||||
|
||||
from nova import config
|
||||
from nova import context
|
||||
from nova.openstack.common import cfg
|
||||
from nova.openstack.common import jsonutils
|
||||
@ -36,6 +35,8 @@ use_forwarded_for_opt = cfg.BoolOpt('use_forwarded_for',
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.register_opt(use_forwarded_for_opt)
|
||||
CONF.import_opt('api_rate_limit', 'nova.config')
|
||||
CONF.import_opt('auth_strategy', 'nova.config')
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
@ -31,7 +31,6 @@ from nova.api.ec2 import apirequest
|
||||
from nova.api.ec2 import ec2utils
|
||||
from nova.api.ec2 import faults
|
||||
from nova.api import validator
|
||||
from nova import config
|
||||
from nova import context
|
||||
from nova import exception
|
||||
from nova.openstack.common import cfg
|
||||
@ -73,6 +72,7 @@ ec2_opts = [
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.register_opts(ec2_opts)
|
||||
CONF.import_opt('memcached_servers', 'nova.config')
|
||||
CONF.import_opt('use_forwarded_for', 'nova.api.auth')
|
||||
|
||||
|
||||
|
@ -33,7 +33,6 @@ from nova import compute
|
||||
from nova.compute import api as compute_api
|
||||
from nova.compute import instance_types
|
||||
from nova.compute import vm_states
|
||||
from nova import config
|
||||
from nova import db
|
||||
from nova import exception
|
||||
from nova.image import s3
|
||||
@ -47,6 +46,13 @@ from nova import volume
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('ec2_host', 'nova.config')
|
||||
CONF.import_opt('ec2_path', 'nova.config')
|
||||
CONF.import_opt('ec2_port', 'nova.config')
|
||||
CONF.import_opt('ec2_scheme', 'nova.config')
|
||||
CONF.import_opt('region_list', 'nova.config')
|
||||
CONF.import_opt('vpn_image_id', 'nova.config')
|
||||
CONF.import_opt('vpn_key_suffix', 'nova.config')
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
@ -16,12 +16,12 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from nova import config
|
||||
from nova import manager
|
||||
from nova.openstack.common import cfg
|
||||
from nova.openstack.common import importutils
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('network_driver', 'nova.config')
|
||||
|
||||
|
||||
class MetadataManager(manager.Manager):
|
||||
|
@ -23,13 +23,13 @@ import webob.dec
|
||||
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 = cfg.CONF
|
||||
CONF.import_opt('memcached_servers', 'nova.config')
|
||||
CONF.import_opt('use_forwarded_for', 'nova.api.auth')
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
@ -28,7 +28,6 @@ from nova.api.openstack import xmlutil
|
||||
from nova.compute import task_states
|
||||
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
|
||||
@ -37,6 +36,8 @@ from nova import quota
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('osapi_compute_link_prefix', 'nova.config')
|
||||
CONF.import_opt('osapi_max_limit', 'nova.config')
|
||||
QUOTAS = quota.QUOTAS
|
||||
|
||||
|
||||
|
@ -22,12 +22,12 @@ 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 = cfg.CONF
|
||||
CONF.import_opt('osapi_compute_ext_list', 'nova.config')
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
@ -21,7 +21,6 @@ from nova.cloudpipe import pipelib
|
||||
from nova import compute
|
||||
from nova.compute import utils as compute_utils
|
||||
from nova.compute import vm_states
|
||||
from nova import config
|
||||
from nova import db
|
||||
from nova import exception
|
||||
from nova import network
|
||||
@ -32,6 +31,7 @@ from nova.openstack.common import timeutils
|
||||
from nova import utils
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('vpn_image_id', 'nova.config')
|
||||
LOG = logging.getLogger(__name__)
|
||||
authorize = extensions.extension_authorizer('compute', 'cloudpipe')
|
||||
|
||||
|
@ -21,12 +21,12 @@ import datetime
|
||||
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 = cfg.CONF
|
||||
CONF.import_opt('compute_topic', 'nova.config')
|
||||
|
||||
|
||||
authorize = extensions.extension_authorizer('compute',
|
||||
|
@ -21,7 +21,6 @@ from nova.api.openstack import common
|
||||
from nova.api.openstack import extensions as exts
|
||||
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
|
||||
@ -29,6 +28,7 @@ from nova import utils
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('password_length', 'nova.config')
|
||||
LOG = logging.getLogger(__name__)
|
||||
authorize = exts.extension_authorizer('compute', 'rescue')
|
||||
|
||||
|
@ -21,7 +21,6 @@ import webob.exc
|
||||
from nova.api.openstack import extensions
|
||||
from nova.api.openstack import wsgi
|
||||
from nova.api.openstack import xmlutil
|
||||
from nova import config
|
||||
from nova import db
|
||||
from nova import exception
|
||||
from nova.openstack.common import cfg
|
||||
@ -33,6 +32,7 @@ from nova import utils
|
||||
LOG = logging.getLogger(__name__)
|
||||
authorize = extensions.extension_authorizer('compute', 'services')
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('service_down_time', 'nova.config')
|
||||
|
||||
|
||||
class ServicesIndexTemplate(xmlutil.TemplateBuilder):
|
||||
|
@ -16,7 +16,6 @@
|
||||
# under the License.
|
||||
|
||||
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
|
||||
@ -24,6 +23,7 @@ from nova.openstack.common.plugin import pluginmanager
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('osapi_compute_extension', 'nova.config')
|
||||
|
||||
|
||||
class ExtensionManager(base_extensions.ExtensionManager):
|
||||
|
@ -30,7 +30,6 @@ from nova.api.openstack import wsgi
|
||||
from nova.api.openstack import xmlutil
|
||||
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
|
||||
@ -43,6 +42,10 @@ from nova import utils
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('enable_instance_password', 'nova.config')
|
||||
CONF.import_opt('network_api_class', 'nova.config')
|
||||
CONF.import_opt('password_length', 'nova.config')
|
||||
CONF.import_opt('reclaim_instance_interval', 'nova.config')
|
||||
|
||||
|
||||
def make_fault(elem):
|
||||
|
@ -18,11 +18,11 @@
|
||||
import os.path
|
||||
|
||||
from nova.api.openstack import common
|
||||
from nova import config
|
||||
from nova.openstack.common import cfg
|
||||
from nova import utils
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('osapi_glance_link_prefix', 'nova.config')
|
||||
|
||||
|
||||
class ViewBuilder(common.ViewBuilder):
|
||||
|
@ -19,11 +19,11 @@ import copy
|
||||
import os
|
||||
|
||||
from nova.api.openstack import common
|
||||
from nova import config
|
||||
from nova.openstack.common import cfg
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('osapi_compute_link_prefix', 'nova.config')
|
||||
|
||||
|
||||
def get_view_builder(req):
|
||||
|
@ -17,10 +17,10 @@
|
||||
|
||||
import re
|
||||
|
||||
from nova import config
|
||||
from nova.openstack.common import cfg
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('compute_driver', 'nova.config')
|
||||
|
||||
DEFAULT_ROOT_DEV_NAME = '/dev/sda1'
|
||||
_DEFAULT_MAPPINGS = {'ami': 'sda1',
|
||||
|
@ -18,11 +18,11 @@
|
||||
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 = cfg.CONF
|
||||
CONF.import_opt('cert_topic', 'nova.config')
|
||||
|
||||
|
||||
class CertAPI(nova.openstack.common.rpc.proxy.RpcProxy):
|
||||
|
@ -28,7 +28,6 @@ import zipfile
|
||||
|
||||
from nova import compute
|
||||
from nova.compute import instance_types
|
||||
from nova import config
|
||||
from nova import crypto
|
||||
from nova import db
|
||||
from nova import exception
|
||||
@ -55,6 +54,11 @@ cloudpipe_opts = [
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.register_opts(cloudpipe_opts)
|
||||
CONF.import_opt('ec2_dmz_host', 'nova.config')
|
||||
CONF.import_opt('ec2_port', 'nova.config')
|
||||
CONF.import_opt('vpn_image_id', 'nova.config')
|
||||
CONF.import_opt('vpn_key_suffix', 'nova.config')
|
||||
CONF.import_opt('pybasedir', 'nova.config')
|
||||
CONF.import_opt('cnt_vpn_clients', 'nova.network.manager')
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
@ -36,7 +36,6 @@ from nova.compute import rpcapi as compute_rpcapi
|
||||
from nova.compute import task_states
|
||||
from nova.compute import utils as compute_utils
|
||||
from nova.compute import vm_states
|
||||
from nova import config
|
||||
from nova.consoleauth import rpcapi as consoleauth_rpcapi
|
||||
from nova import crypto
|
||||
from nova.db import base
|
||||
@ -61,6 +60,12 @@ from nova import volume
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('allow_resize_to_same_host', 'nova.config')
|
||||
CONF.import_opt('compute_topic', 'nova.config')
|
||||
CONF.import_opt('default_schedule_zone', 'nova.config')
|
||||
CONF.import_opt('non_inheritable_image_properties', 'nova.config')
|
||||
CONF.import_opt('null_kernel', 'nova.config')
|
||||
CONF.import_opt('security_group_handler', 'nova.config')
|
||||
CONF.import_opt('consoleauth_topic', 'nova.consoleauth')
|
||||
|
||||
MAX_USERDATA_SIZE = 65535
|
||||
|
@ -23,7 +23,6 @@
|
||||
import re
|
||||
import uuid
|
||||
|
||||
from nova import config
|
||||
from nova import context
|
||||
from nova import db
|
||||
from nova import exception
|
||||
@ -32,6 +31,7 @@ from nova.openstack.common import log as logging
|
||||
from nova import utils
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('default_instance_type', 'nova.config')
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
INVALID_NAME_REGEX = re.compile("[^\w\.\- ]")
|
||||
|
@ -53,7 +53,6 @@ from nova.compute import rpcapi as compute_rpcapi
|
||||
from nova.compute import task_states
|
||||
from nova.compute import utils as compute_utils
|
||||
from nova.compute import vm_states
|
||||
from nova import config
|
||||
import nova.context
|
||||
from nova import exception
|
||||
from nova.image import glance
|
||||
@ -143,6 +142,22 @@ compute_opts = [
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.register_opts(compute_opts)
|
||||
CONF.import_opt('allow_resize_to_same_host', 'nova.config')
|
||||
CONF.import_opt('bandwidth_poll_interval', 'nova.config')
|
||||
CONF.import_opt('compute_driver', 'nova.config')
|
||||
CONF.import_opt('console_topic', 'nova.config')
|
||||
CONF.import_opt('default_access_ip_network_name', 'nova.config')
|
||||
CONF.import_opt('defer_iptables_apply', 'nova.config')
|
||||
CONF.import_opt('host', 'nova.config')
|
||||
CONF.import_opt('my_ip', 'nova.config')
|
||||
CONF.import_opt('network_manager', 'nova.config')
|
||||
CONF.import_opt('password_length', 'nova.config')
|
||||
CONF.import_opt('reclaim_instance_interval', 'nova.config')
|
||||
CONF.import_opt('resume_guests_state_on_host_boot', 'nova.config')
|
||||
CONF.import_opt('start_guests_on_host_boot', 'nova.config')
|
||||
CONF.import_opt('vpn_image_id', 'nova.config')
|
||||
CONF.import_opt('my_ip', 'nova.config')
|
||||
CONF.import_opt('state_path', 'nova.config')
|
||||
|
||||
QUOTAS = quota.QUOTAS
|
||||
|
||||
|
@ -18,7 +18,6 @@
|
||||
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
|
||||
@ -26,6 +25,7 @@ from nova.openstack.common import rpc
|
||||
import nova.openstack.common.rpc.proxy
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('compute_topic', 'nova.config')
|
||||
|
||||
|
||||
def _compute_topic(topic, ctxt, host, instance):
|
||||
|
@ -22,7 +22,6 @@ import traceback
|
||||
|
||||
from nova import block_device
|
||||
from nova.compute import instance_types
|
||||
from nova import config
|
||||
from nova import db
|
||||
from nova import exception
|
||||
from nova.network import model as network_model
|
||||
@ -33,6 +32,8 @@ from nova.openstack.common.notifier import api as notifier_api
|
||||
from nova import utils
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('compute_driver', 'nova.config')
|
||||
CONF.import_opt('host', 'nova.config')
|
||||
LOG = log.getLogger(__name__)
|
||||
|
||||
|
||||
|
@ -13,7 +13,6 @@
|
||||
# under the License.
|
||||
|
||||
from nova.conductor import api as conductor_api
|
||||
import nova.config
|
||||
import nova.openstack.common.cfg
|
||||
import nova.openstack.common.importutils
|
||||
|
||||
|
@ -16,7 +16,6 @@
|
||||
|
||||
from nova.conductor import manager
|
||||
from nova.conductor import rpcapi
|
||||
from nova import config
|
||||
from nova.openstack.common import cfg
|
||||
|
||||
conductor_opts = [
|
||||
|
@ -14,7 +14,6 @@
|
||||
|
||||
"""Client side of the conductor RPC API"""
|
||||
|
||||
from nova import config
|
||||
from nova.openstack.common import cfg
|
||||
import nova.openstack.common.rpc.proxy
|
||||
|
||||
|
@ -18,7 +18,6 @@
|
||||
"""Handles ConsoleProxy API requests."""
|
||||
|
||||
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
|
||||
@ -26,6 +25,7 @@ from nova.openstack.common import rpc
|
||||
from nova.openstack.common import uuidutils
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('console_topic', 'nova.config')
|
||||
|
||||
|
||||
class API(base.Base):
|
||||
|
@ -18,11 +18,11 @@
|
||||
Client side of the console RPC API.
|
||||
"""
|
||||
|
||||
from nova import config
|
||||
from nova.openstack.common import cfg
|
||||
import nova.openstack.common.rpc.proxy
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('console_topic', 'nova.config')
|
||||
|
||||
|
||||
class ConsoleAPI(nova.openstack.common.rpc.proxy.RpcProxy):
|
||||
|
@ -22,7 +22,6 @@ import signal
|
||||
|
||||
from Cheetah import Template
|
||||
|
||||
from nova import config
|
||||
from nova import context
|
||||
from nova import db
|
||||
from nova import exception
|
||||
@ -51,6 +50,8 @@ xvp_opts = [
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.register_opts(xvp_opts)
|
||||
CONF.import_opt('host', 'nova.config')
|
||||
CONF.import_opt('pybasedir', 'nova.config')
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
@ -20,7 +20,6 @@
|
||||
|
||||
import time
|
||||
|
||||
from nova import config
|
||||
from nova import manager
|
||||
from nova.openstack.common import cfg
|
||||
from nova.openstack.common import jsonutils
|
||||
@ -40,6 +39,7 @@ consoleauth_opts = [
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.register_opts(consoleauth_opts)
|
||||
CONF.import_opt('memcached_servers', 'nova.config')
|
||||
|
||||
|
||||
class ConsoleAuthManager(manager.Manager):
|
||||
|
@ -28,7 +28,6 @@ import hashlib
|
||||
import os
|
||||
import string
|
||||
|
||||
from nova import config
|
||||
from nova import context
|
||||
from nova import db
|
||||
from nova import exception
|
||||
@ -74,6 +73,7 @@ crypto_opts = [
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.register_opts(crypto_opts)
|
||||
CONF.import_opt('state_path', 'nova.config')
|
||||
|
||||
|
||||
def ca_folder(project_id=None):
|
||||
|
@ -38,7 +38,6 @@ from sqlalchemy.sql import func
|
||||
from nova import block_device
|
||||
from nova.common.sqlalchemyutils import paginate_query
|
||||
from nova.compute import vm_states
|
||||
from nova import config
|
||||
from nova import db
|
||||
from nova.db.sqlalchemy import models
|
||||
from nova.db.sqlalchemy.session import get_session
|
||||
@ -50,6 +49,8 @@ from nova.openstack.common import uuidutils
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('compute_topic', 'nova.config')
|
||||
CONF.import_opt('sql_connection', 'nova.config')
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
@ -169,13 +169,17 @@ import sqlalchemy.interfaces
|
||||
import sqlalchemy.orm
|
||||
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 = cfg.CONF
|
||||
CONF.import_opt('sql_connection', 'nova.config')
|
||||
CONF.import_opt('sql_idle_timeout', 'nova.config')
|
||||
CONF.import_opt('sqlite_synchronous', 'nova.config')
|
||||
CONF.import_opt('sql_max_retries', 'nova.config')
|
||||
CONF.import_opt('sql_retry_interval', 'nova.config')
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
_ENGINE = None
|
||||
|
@ -29,7 +29,6 @@ import urlparse
|
||||
import glanceclient
|
||||
import glanceclient.exc
|
||||
|
||||
from nova import config
|
||||
from nova import exception
|
||||
from nova.openstack.common import cfg
|
||||
from nova.openstack.common import jsonutils
|
||||
@ -39,6 +38,10 @@ from nova.openstack.common import timeutils
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('auth_strategy', 'nova.config')
|
||||
CONF.import_opt('glance_api_insecure', 'nova.config')
|
||||
CONF.import_opt('glance_api_servers', 'nova.config')
|
||||
CONF.import_opt('glance_num_retries', 'nova.config')
|
||||
|
||||
|
||||
def _parse_image_ref(image_href):
|
||||
|
@ -31,7 +31,6 @@ from lxml import etree
|
||||
|
||||
from nova.api.ec2 import ec2utils
|
||||
import nova.cert.rpcapi
|
||||
from nova import config
|
||||
from nova import exception
|
||||
from nova.image import glance
|
||||
from nova.openstack.common import cfg
|
||||
@ -62,6 +61,8 @@ s3_opts = [
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.register_opts(s3_opts)
|
||||
CONF.import_opt('s3_host', 'nova.config')
|
||||
CONF.import_opt('s3_port', 'nova.config')
|
||||
|
||||
|
||||
class S3ImageService(object):
|
||||
|
@ -55,7 +55,6 @@ This module provides Manager, a base class for managers.
|
||||
|
||||
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
|
||||
@ -65,6 +64,7 @@ from nova.scheduler import rpcapi as scheduler_rpcapi
|
||||
from nova import version
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('host', 'nova.config')
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
@ -24,7 +24,6 @@ import inspect
|
||||
import netaddr
|
||||
import os
|
||||
|
||||
from nova import config
|
||||
from nova import db
|
||||
from nova import exception
|
||||
from nova.openstack.common import cfg
|
||||
@ -89,6 +88,14 @@ linux_net_opts = [
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.register_opts(linux_net_opts)
|
||||
CONF.import_opt('bindir', 'nova.config')
|
||||
CONF.import_opt('fake_network', 'nova.config')
|
||||
CONF.import_opt('host', 'nova.config')
|
||||
CONF.import_opt('metadata_host', 'nova.config')
|
||||
CONF.import_opt('metadata_port', 'nova.config')
|
||||
CONF.import_opt('use_ipv6', 'nova.config')
|
||||
CONF.import_opt('my_ip', 'nova.config')
|
||||
CONF.import_opt('state_path', 'nova.config')
|
||||
|
||||
|
||||
# NOTE(vish): Iptables supports chain names of up to 28 characters, and we
|
||||
|
@ -55,7 +55,6 @@ from eventlet import greenpool
|
||||
import netaddr
|
||||
|
||||
from nova.compute import api as compute_api
|
||||
from nova import config
|
||||
from nova import context
|
||||
from nova import exception
|
||||
from nova import ipv6
|
||||
@ -163,6 +162,13 @@ network_opts = [
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.register_opts(network_opts)
|
||||
CONF.import_opt('fake_network', 'nova.config')
|
||||
CONF.import_opt('floating_ip_dns_manager', 'nova.config')
|
||||
CONF.import_opt('instance_dns_domain', 'nova.config')
|
||||
CONF.import_opt('instance_dns_manager', 'nova.config')
|
||||
CONF.import_opt('network_driver', 'nova.config')
|
||||
CONF.import_opt('use_ipv6', 'nova.config')
|
||||
CONF.import_opt('my_ip', 'nova.config')
|
||||
|
||||
|
||||
class RPCAllocateFixedIP(object):
|
||||
|
@ -17,7 +17,6 @@
|
||||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
||||
|
||||
from nova.compute import api as compute_api
|
||||
from nova import config
|
||||
from nova.db import base
|
||||
from nova import exception
|
||||
from nova.network.api import refresh_cache
|
||||
@ -53,6 +52,7 @@ quantum_opts = [
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.register_opts(quantum_opts)
|
||||
CONF.import_opt('node_availability_zone', 'nova.config')
|
||||
CONF.import_opt('default_floating_pool', 'nova.network.manager')
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
@ -18,13 +18,13 @@
|
||||
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 = cfg.CONF
|
||||
CONF.import_opt('network_topic', 'nova.config')
|
||||
|
||||
|
||||
class NetworkAPI(rpc_proxy.RpcProxy):
|
||||
|
@ -44,7 +44,6 @@ import urllib
|
||||
import routes
|
||||
import webob
|
||||
|
||||
from nova import config
|
||||
from nova.openstack.common import cfg
|
||||
from nova.openstack.common import fileutils
|
||||
from nova import utils
|
||||
@ -65,6 +64,7 @@ s3_opts = [
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.register_opts(s3_opts)
|
||||
CONF.import_opt('state_path', 'nova.config')
|
||||
|
||||
|
||||
def get_wsgi_server():
|
||||
|
@ -23,12 +23,12 @@ Chance (Random) Scheduler implementation
|
||||
|
||||
import random
|
||||
|
||||
from nova import config
|
||||
from nova import exception
|
||||
from nova.openstack.common import cfg
|
||||
from nova.scheduler import driver
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('compute_topic', 'nova.config')
|
||||
|
||||
|
||||
class ChanceScheduler(driver.Scheduler):
|
||||
|
@ -28,7 +28,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 db
|
||||
from nova import exception
|
||||
from nova import notifications
|
||||
@ -54,8 +53,7 @@ scheduler_driver_opts = [
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.register_opts(scheduler_driver_opts)
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('compute_topic', 'nova.config')
|
||||
CONF.import_opt('instances_path', 'nova.compute.manager')
|
||||
CONF.import_opt('libvirt_type', 'nova.virt.libvirt.driver')
|
||||
|
||||
|
@ -13,11 +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.scheduler import filters
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('isolated_hosts', 'nova.config')
|
||||
CONF.import_opt('isolated_images', 'nova.config')
|
||||
|
||||
|
||||
class IsolatedHostsFilter(filters.BaseHostFilter):
|
||||
|
@ -18,12 +18,12 @@
|
||||
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 = cfg.CONF
|
||||
CONF.import_opt('scheduler_topic', 'nova.config')
|
||||
|
||||
|
||||
class SchedulerAPI(nova.openstack.common.rpc.proxy.RpcProxy):
|
||||
|
@ -30,7 +30,6 @@ import time
|
||||
import eventlet
|
||||
import greenlet
|
||||
|
||||
from nova import config
|
||||
from nova import context
|
||||
from nova import db
|
||||
from nova import exception
|
||||
@ -92,6 +91,8 @@ service_opts = [
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.register_opts(service_opts)
|
||||
CONF.import_opt('host', 'nova.config')
|
||||
CONF.import_opt('node_availability_zone', 'nova.config')
|
||||
|
||||
|
||||
class SignalExit(SystemExit):
|
||||
@ -477,8 +478,10 @@ class Service(object):
|
||||
if not topic:
|
||||
topic = binary.rpartition('nova-')[2]
|
||||
if not manager:
|
||||
manager = CONF.get('%s_manager' %
|
||||
binary.rpartition('nova-')[2], None)
|
||||
manager_cls = ('%s_manager' %
|
||||
binary.rpartition('nova-')[2])
|
||||
CONF.import_opt(manager_cls, 'nova.config')
|
||||
manager = CONF.get(manager_cls, None)
|
||||
if report_interval is None:
|
||||
report_interval = CONF.report_interval
|
||||
if periodic_interval is None:
|
||||
|
@ -31,7 +31,6 @@ setattr(__builtin__, '_', lambda x: x)
|
||||
import os
|
||||
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
|
||||
@ -42,6 +41,9 @@ import eventlet
|
||||
eventlet.monkey_patch(os=False)
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('sql_connection', 'nova.config')
|
||||
CONF.import_opt('sqlite_db', 'nova.config')
|
||||
CONF.import_opt('state_path', 'nova.config')
|
||||
CONF.set_override('use_stderr', False)
|
||||
|
||||
logging.setup('nova')
|
||||
|
@ -24,7 +24,6 @@ from nova.api.ec2 import cloud
|
||||
from nova.api.ec2 import ec2utils
|
||||
from nova.compute import api as compute_api
|
||||
from nova.compute import utils as compute_utils
|
||||
from nova import config
|
||||
from nova import context
|
||||
from nova import db
|
||||
from nova import exception
|
||||
@ -38,6 +37,8 @@ from nova.tests import matchers
|
||||
from nova import volume
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('default_instance_type', 'nova.config')
|
||||
CONF.import_opt('use_ipv6', 'nova.config')
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
@ -32,7 +32,6 @@ from nova.compute import api as compute_api
|
||||
from nova.compute import power_state
|
||||
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
|
||||
@ -50,6 +49,9 @@ from nova.virt import fake as fake_virt
|
||||
from nova import volume
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('default_image', 'nova.config')
|
||||
CONF.import_opt('default_instance_type', 'nova.config')
|
||||
CONF.import_opt('use_ipv6', 'nova.config')
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
@ -18,7 +18,6 @@ from lxml import etree
|
||||
from nova.api.openstack.compute.contrib import cloudpipe
|
||||
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
|
||||
@ -29,6 +28,7 @@ from nova.tests import matchers
|
||||
from nova import utils
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('vpn_image_id', 'nova.config')
|
||||
|
||||
|
||||
def fake_vpn_instance():
|
||||
|
@ -15,7 +15,6 @@
|
||||
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
|
||||
@ -23,6 +22,7 @@ from nova import test
|
||||
from nova.tests.api.openstack import fakes
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('password_length', 'nova.config')
|
||||
|
||||
|
||||
def rescue(self, context, instance, rescue_password=None):
|
||||
|
@ -21,7 +21,6 @@ import webob
|
||||
from nova.api.openstack.compute.contrib import volumes
|
||||
from nova.compute import api as compute_api
|
||||
from nova.compute import instance_types
|
||||
from nova import config
|
||||
from nova import context
|
||||
from nova import db
|
||||
from nova.openstack.common import cfg
|
||||
@ -33,6 +32,7 @@ from nova.volume import cinder
|
||||
from webob import exc
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('password_length', 'nova.config')
|
||||
|
||||
FAKE_UUID = 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa'
|
||||
FAKE_UUID_A = '00000000-aaaa-aaaa-aaaa-000000000000'
|
||||
|
@ -25,7 +25,6 @@ from nova.api.openstack.compute import extensions as compute_extensions
|
||||
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
|
||||
@ -33,6 +32,7 @@ from nova.tests.api.openstack import fakes
|
||||
from nova.tests import matchers
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('osapi_compute_extension', 'nova.config')
|
||||
|
||||
NS = "{http://docs.openstack.org/common/api/v1.0}"
|
||||
ATOMNS = "{http://www.w3.org/2005/Atom}"
|
||||
|
@ -23,7 +23,6 @@ from nova.api.openstack.compute import servers
|
||||
from nova.compute import api as compute_api
|
||||
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.image import glance
|
||||
@ -36,6 +35,7 @@ from nova.tests import matchers
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('password_length', 'nova.config')
|
||||
FAKE_UUID = fakes.FAKE_UUID
|
||||
INSTANCE_IDS = {FAKE_UUID: 1}
|
||||
|
||||
|
@ -35,7 +35,6 @@ from nova.compute import api as compute_api
|
||||
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.db.sqlalchemy import models
|
||||
@ -53,6 +52,8 @@ from nova.tests import matchers
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('password_length', 'nova.config')
|
||||
CONF.import_opt('scheduler_topic', 'nova.config')
|
||||
|
||||
FAKE_UUID = fakes.FAKE_UUID
|
||||
NS = "{http://docs.openstack.org/compute/api/v1.1}"
|
||||
|
@ -19,13 +19,13 @@ 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 = cfg.CONF
|
||||
CONF.import_opt('cert_topic', 'nova.config')
|
||||
|
||||
|
||||
class CertRpcAPITestCase(test.TestCase):
|
||||
|
@ -37,7 +37,6 @@ from nova.compute import rpcapi as compute_rpcapi
|
||||
from nova.compute import task_states
|
||||
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
|
||||
@ -70,6 +69,9 @@ from nova.volume import cinder
|
||||
QUOTAS = quota.QUOTAS
|
||||
LOG = logging.getLogger(__name__)
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('compute_manager', 'nova.config')
|
||||
CONF.import_opt('compute_topic', 'nova.config')
|
||||
CONF.import_opt('host', 'nova.config')
|
||||
CONF.import_opt('live_migration_retry_count', 'nova.compute.manager')
|
||||
|
||||
|
||||
|
@ -21,7 +21,6 @@ import string
|
||||
|
||||
from nova.compute import instance_types
|
||||
from nova.compute import utils as compute_utils
|
||||
from nova import config
|
||||
from nova import context
|
||||
from nova import db
|
||||
from nova import exception
|
||||
@ -38,6 +37,7 @@ from nova import utils
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('compute_manager', 'nova.config')
|
||||
|
||||
|
||||
class ComputeValidateDeviceTestCase(test.TestCase):
|
||||
|
@ -18,7 +18,6 @@
|
||||
|
||||
import mox
|
||||
|
||||
from nova import config
|
||||
from nova import context
|
||||
from nova import exception
|
||||
from nova.openstack.common import cfg
|
||||
@ -28,6 +27,7 @@ from nova.virt import fake
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('compute_manager', 'nova.config')
|
||||
|
||||
|
||||
class BaseTestCase(test.TestCase):
|
||||
|
@ -19,7 +19,6 @@ Unit Tests for nova.compute.rpcapi
|
||||
"""
|
||||
|
||||
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
|
||||
@ -28,6 +27,7 @@ from nova.openstack.common import rpc
|
||||
from nova import test
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('compute_topic', 'nova.config')
|
||||
|
||||
|
||||
class ComputeRpcAPITestCase(test.TestCase):
|
||||
|
@ -18,7 +18,6 @@
|
||||
|
||||
"""Tests For Console proxy."""
|
||||
|
||||
from nova import config
|
||||
from nova.console import api as console_api
|
||||
from nova.console import rpcapi as console_rpcapi
|
||||
from nova import context
|
||||
@ -30,6 +29,7 @@ from nova.openstack.common import rpc
|
||||
from nova import test
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('console_manager', 'nova.config')
|
||||
CONF.import_opt('console_driver', 'nova.console.manager')
|
||||
|
||||
|
||||
|
@ -18,7 +18,6 @@
|
||||
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
|
||||
@ -26,6 +25,7 @@ from nova.openstack.common import rpc
|
||||
from nova import test
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('console_topic', 'nova.config')
|
||||
|
||||
|
||||
class ConsoleRpcAPITestCase(test.TestCase):
|
||||
|
@ -16,10 +16,10 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from nova import config
|
||||
from nova.openstack.common import cfg
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('state_path', 'nova.config')
|
||||
|
||||
CONF.import_opt('scheduler_driver', 'nova.scheduler.manager')
|
||||
CONF.import_opt('fake_network', 'nova.network.manager')
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
from nova.compute import api as compute_api
|
||||
from nova.compute import manager as compute_manager
|
||||
from nova import config
|
||||
import nova.context
|
||||
from nova import db
|
||||
from nova import exception
|
||||
@ -32,6 +31,7 @@ from nova.virt.libvirt import config as libvirt_config
|
||||
|
||||
HOST = "testhost"
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('use_ipv6', 'nova.config')
|
||||
|
||||
|
||||
class FakeIptablesFirewallDriver(object):
|
||||
|
@ -22,7 +22,6 @@ import copy
|
||||
import datetime
|
||||
import uuid
|
||||
|
||||
from nova import config
|
||||
from nova import exception
|
||||
import nova.image.glance
|
||||
from nova.openstack.common import cfg
|
||||
@ -30,6 +29,7 @@ from nova.openstack.common import log as logging
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('null_kernel', 'nova.config')
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
@ -24,7 +24,6 @@ from lxml import etree
|
||||
|
||||
from nova.cloudpipe.pipelib import CloudPipe
|
||||
from nova.compute import api
|
||||
from nova import config
|
||||
from nova import context
|
||||
from nova import db
|
||||
from nova.network.manager import NetworkManager
|
||||
@ -40,6 +39,9 @@ from nova.tests.image import fake
|
||||
from nova.tests.integrated import integrated_helpers
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('allow_resize_to_same_host', 'nova.config')
|
||||
CONF.import_opt('osapi_compute_extension', 'nova.config')
|
||||
CONF.import_opt('vpn_image_id', 'nova.config')
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
@ -15,12 +15,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.log import logging
|
||||
from nova.tests.integrated import integrated_helpers
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('osapi_compute_extension', 'nova.config')
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
@ -19,7 +19,6 @@ import os
|
||||
|
||||
import mox
|
||||
|
||||
from nova import config
|
||||
from nova import context
|
||||
from nova import db
|
||||
from nova.network import linux_net
|
||||
@ -31,6 +30,7 @@ from nova import test
|
||||
from nova import utils
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('network_driver', 'nova.config')
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
HOST = "testhost"
|
||||
|
@ -18,7 +18,6 @@
|
||||
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
|
||||
@ -26,6 +25,7 @@ from nova.openstack.common import rpc
|
||||
from nova import test
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('network_topic', 'nova.config')
|
||||
|
||||
|
||||
class NetworkRpcAPITestCase(test.TestCase):
|
||||
|
@ -18,7 +18,6 @@ Tests For Scheduler Host Filters.
|
||||
import httplib
|
||||
import stubout
|
||||
|
||||
from nova import config
|
||||
from nova import context
|
||||
from nova import db
|
||||
from nova import exception
|
||||
@ -32,6 +31,7 @@ from nova.tests.scheduler import fakes
|
||||
from nova import utils
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('my_ip', 'nova.config')
|
||||
DATA = ''
|
||||
|
||||
|
||||
|
@ -18,7 +18,6 @@
|
||||
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
|
||||
@ -26,6 +25,7 @@ from nova.scheduler import rpcapi as scheduler_rpcapi
|
||||
from nova import test
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('scheduler_topic', 'nova.config')
|
||||
|
||||
|
||||
class SchedulerRpcAPITestCase(test.TestCase):
|
||||
|
@ -27,7 +27,6 @@ from nova import test
|
||||
|
||||
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
|
||||
@ -37,6 +36,8 @@ from nova.virt.libvirt import imagecache
|
||||
from nova.virt.libvirt import utils as virtutils
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('compute_manager', 'nova.config')
|
||||
CONF.import_opt('host', 'nova.config')
|
||||
|
||||
LOG = log.getLogger(__name__)
|
||||
|
||||
|
@ -33,7 +33,6 @@ from nova.compute import instance_types
|
||||
from nova.compute import power_state
|
||||
from nova.compute import vm_mode
|
||||
from nova.compute import vm_states
|
||||
from nova import config
|
||||
from nova import context
|
||||
from nova import db
|
||||
from nova import exception
|
||||
@ -71,6 +70,9 @@ libvirt_driver.libvirt = libvirt
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('compute_manager', 'nova.config')
|
||||
CONF.import_opt('host', 'nova.config')
|
||||
CONF.import_opt('my_ip', 'nova.config')
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
_fake_network_info = fake_network.fake_get_instance_nw_info
|
||||
|
@ -28,13 +28,14 @@ import tempfile
|
||||
from boto import exception as boto_exception
|
||||
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 = cfg.CONF
|
||||
CONF.import_opt('s3_host', 'nova.config')
|
||||
CONF.import_opt('s3_port', 'nova.config')
|
||||
|
||||
# Create a unique temporary directory. We don't delete after test to
|
||||
# allow checking the contents after running tests. Users and/or tools
|
||||
|
@ -14,7 +14,6 @@
|
||||
# under the License.
|
||||
|
||||
from nova.cloudpipe import pipelib
|
||||
from nova import config
|
||||
from nova import context
|
||||
from nova import crypto
|
||||
from nova.openstack.common import cfg
|
||||
@ -22,6 +21,7 @@ from nova import test
|
||||
from nova import utils
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('vpn_key_suffix', 'nova.config')
|
||||
|
||||
|
||||
class PipelibTest(test.TestCase):
|
||||
|
@ -20,7 +20,6 @@ import datetime
|
||||
|
||||
from nova import compute
|
||||
from nova.compute import instance_types
|
||||
from nova import config
|
||||
from nova import context
|
||||
from nova import db
|
||||
from nova.db.sqlalchemy import api as sqa_api
|
||||
@ -35,6 +34,7 @@ from nova import test
|
||||
import nova.tests.image.fake
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('scheduler_topic', 'nova.config')
|
||||
|
||||
|
||||
class QuotaIntegrationTestCase(test.TestCase):
|
||||
|
@ -27,7 +27,6 @@ from eventlet import greenpool
|
||||
import mox
|
||||
|
||||
import nova
|
||||
from nova import config
|
||||
from nova import exception
|
||||
from nova.openstack.common import cfg
|
||||
from nova.openstack.common import timeutils
|
||||
@ -35,6 +34,7 @@ from nova import test
|
||||
from nova import utils
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('glance_port', 'nova.config')
|
||||
|
||||
|
||||
class ByteConversionTest(test.TestCase):
|
||||
|
@ -29,7 +29,6 @@ from nova.compute import instance_types
|
||||
from nova.compute import power_state
|
||||
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
|
||||
@ -58,6 +57,10 @@ from nova.virt.xenapi import volume_utils
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('compute_manager', 'nova.config')
|
||||
CONF.import_opt('host', 'nova.config')
|
||||
CONF.import_opt('network_manager', 'nova.config')
|
||||
CONF.import_opt('node_availability_zone', 'nova.config')
|
||||
|
||||
IMAGE_MACHINE = '1'
|
||||
IMAGE_KERNEL = '2'
|
||||
|
@ -22,6 +22,7 @@ from nova.image import glance
|
||||
from nova.openstack.common import cfg
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('use_ipv6', 'nova.config')
|
||||
|
||||
|
||||
def get_test_admin_context():
|
||||
|
@ -46,7 +46,6 @@ from eventlet import greenthread
|
||||
from eventlet import semaphore
|
||||
import netaddr
|
||||
|
||||
from nova import config
|
||||
from nova import exception
|
||||
from nova.openstack.common import cfg
|
||||
from nova.openstack.common import excutils
|
||||
@ -60,6 +59,11 @@ CONF = cfg.CONF
|
||||
CONF.register_opt(
|
||||
cfg.BoolOpt('disable_process_locking', default=False,
|
||||
help='Whether to disable inter-process locks'))
|
||||
CONF.import_opt('glance_port', 'nova.config')
|
||||
CONF.import_opt('instance_usage_audit_period', 'nova.config')
|
||||
CONF.import_opt('monkey_patch', 'nova.config')
|
||||
CONF.import_opt('rootwrap_config', 'nova.config')
|
||||
CONF.import_opt('service_down_time', 'nova.config')
|
||||
|
||||
# Used for looking up extensions of text
|
||||
# to their 'multiplied' byte amount
|
||||
|
@ -19,7 +19,6 @@
|
||||
|
||||
"""Session Handling for SQLAlchemy backend."""
|
||||
|
||||
from nova import config
|
||||
from nova.db.sqlalchemy import session as nova_session
|
||||
from nova.openstack.common import cfg
|
||||
|
||||
@ -32,6 +31,7 @@ opts = [
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.register_opts(opts)
|
||||
CONF.import_opt('sqlite_db', 'nova.config')
|
||||
|
||||
_ENGINE = None
|
||||
_MAKER = None
|
||||
|
@ -32,7 +32,6 @@ import tempfile
|
||||
if os.name != 'nt':
|
||||
import crypt
|
||||
|
||||
from nova import config
|
||||
from nova import exception
|
||||
from nova.openstack.common import cfg
|
||||
from nova.openstack.common import jsonutils
|
||||
@ -78,6 +77,7 @@ disk_opts = [
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.register_opts(disk_opts)
|
||||
CONF.import_opt('pybasedir', 'nova.config')
|
||||
|
||||
_MKFS_COMMAND = {}
|
||||
_DEFAULT_MKFS_COMMAND = None
|
||||
|
@ -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 import network
|
||||
from nova.network import linux_net
|
||||
@ -42,6 +41,7 @@ firewall_opts = [
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.register_opts(firewall_opts)
|
||||
CONF.import_opt('use_ipv6', 'nova.config')
|
||||
|
||||
|
||||
def load_driver(default, *args, **kwargs):
|
||||
|
@ -21,7 +21,6 @@ Management class for live migration VM operations.
|
||||
import os
|
||||
import sys
|
||||
|
||||
from nova import config
|
||||
from nova import exception
|
||||
from nova.openstack.common import cfg
|
||||
from nova.openstack.common import excutils
|
||||
@ -36,6 +35,7 @@ if sys.platform == 'win32':
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('use_cow_images', 'nova.config')
|
||||
|
||||
|
||||
class LiveMigrationOps(baseops.BaseOps):
|
||||
|
@ -22,7 +22,6 @@ import os
|
||||
import uuid
|
||||
|
||||
from nova.api.metadata import base as instance_metadata
|
||||
from nova import config
|
||||
from nova import exception
|
||||
from nova.openstack.common import cfg
|
||||
from nova.openstack.common import lockutils
|
||||
@ -59,6 +58,7 @@ hyperv_opts = [
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.register_opts(hyperv_opts)
|
||||
CONF.import_opt('use_cow_images', 'nova.config')
|
||||
|
||||
|
||||
class VMOps(baseops.BaseOps):
|
||||
|
@ -21,7 +21,6 @@ Management class for Storage-related functions (attach, detach, etc).
|
||||
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
|
||||
@ -42,6 +41,7 @@ hyper_volumeops_opts = [
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.register_opts(hyper_volumeops_opts)
|
||||
CONF.import_opt('my_ip', 'nova.config')
|
||||
|
||||
|
||||
class VolumeOps(baseops.BaseOps):
|
||||
|
@ -25,7 +25,6 @@ import sys
|
||||
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
|
||||
@ -37,6 +36,7 @@ if sys.platform == 'win32':
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('my_ip', 'nova.config')
|
||||
|
||||
|
||||
class VolumeUtils(object):
|
||||
|
@ -59,7 +59,6 @@ from nova.api.metadata import base as instance_metadata
|
||||
from nova import block_device
|
||||
from nova.compute import power_state
|
||||
from nova.compute import vm_mode
|
||||
from nova import config
|
||||
from nova import context as nova_context
|
||||
from nova import exception
|
||||
from nova.image import glance
|
||||
@ -185,6 +184,10 @@ libvirt_opts = [
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.register_opts(libvirt_opts)
|
||||
CONF.import_opt('default_ephemeral_format', 'nova.config')
|
||||
CONF.import_opt('host', 'nova.config')
|
||||
CONF.import_opt('my_ip', 'nova.config')
|
||||
CONF.import_opt('use_cow_images', 'nova.config')
|
||||
CONF.import_opt('live_migration_retry_count', 'nova.compute.manager')
|
||||
CONF.import_opt('vncserver_proxyclient_address', 'nova.vnc')
|
||||
|
||||
|
@ -20,13 +20,14 @@
|
||||
|
||||
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 = cfg.CONF
|
||||
CONF.import_opt('use_ipv6', 'nova.config')
|
||||
CONF.import_opt('vpn_image_id', 'nova.config')
|
||||
|
||||
try:
|
||||
import libvirt
|
||||
|
@ -29,7 +29,6 @@ import time
|
||||
|
||||
from nova.compute import task_states
|
||||
from nova.compute import vm_states
|
||||
from nova import config
|
||||
from nova.openstack.common import cfg
|
||||
from nova.openstack.common import log as logging
|
||||
from nova import utils
|
||||
@ -57,6 +56,7 @@ imagecache_opts = [
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.register_opts(imagecache_opts)
|
||||
CONF.import_opt('host', 'nova.config')
|
||||
CONF.import_opt('instances_path', 'nova.compute.manager')
|
||||
CONF.import_opt('base_dir_name', 'nova.compute.manager')
|
||||
|
||||
|
@ -19,7 +19,6 @@
|
||||
|
||||
"""VIF drivers for libvirt."""
|
||||
|
||||
from nova import config
|
||||
from nova import exception
|
||||
from nova.network import linux_net
|
||||
from nova.openstack.common import cfg
|
||||
@ -44,6 +43,7 @@ libvirt_vif_opts = [
|
||||
CONF = cfg.CONF
|
||||
CONF.register_opts(libvirt_vif_opts)
|
||||
CONF.import_opt('libvirt_type', 'nova.virt.libvirt.driver')
|
||||
CONF.import_opt('use_ipv6', 'nova.config')
|
||||
|
||||
LINUX_DEV_LEN = 14
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user