Remove nova.config.CONF
Modules import nova.config for two reasons right now - firstly, to reference nova.config.CONF and, secondly, if they use one of the options defined in nova.config. Often modules import nova.openstack.common.cfg and nova.config which is a bit pointless since they could just use cfg.CONF if they just want to nova.config in order to reference CONF. Let's just use cfg.CONF everywhere and we can explicitly state where we actually require options defined in nova.config. Change-Id: Ie4184a74e3e78c99658becb18dce1c2087e450bb
This commit is contained in:
parent
e60d593b5e
commit
94d87bce21
@ -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__':
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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__':
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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')
|
||||
|
||||
|
||||
|
@ -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')
|
||||
|
@ -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)
|
||||
|
@ -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__)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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__)
|
||||
|
||||
|
@ -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')
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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__)
|
||||
|
||||
|
@ -18,7 +18,6 @@
|
||||
|
||||
import re
|
||||
|
||||
from nova import config
|
||||
from nova import context
|
||||
from nova import db
|
||||
from nova import exception
|
||||
|
@ -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):
|
||||
|
@ -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):
|
||||
|
@ -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')
|
||||
|
||||
|
@ -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__)
|
||||
|
@ -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')
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
||||
|
@ -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__)
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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')
|
||||
|
||||
|
@ -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')
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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__)
|
||||
|
@ -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)
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
@ -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',
|
||||
|
@ -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
|
||||
|
@ -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')
|
||||
|
||||
|
@ -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
|
||||
|
@ -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):
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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):
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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__)
|
||||
|
@ -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):
|
||||
|
@ -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__)
|
||||
|
@ -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):
|
||||
|
@ -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):
|
||||
|
@ -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
|
||||
|
@ -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__)
|
||||
|
||||
|
@ -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',
|
||||
|
@ -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
|
||||
|
@ -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):
|
||||
|
@ -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')
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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\.\- ]")
|
||||
|
@ -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
|
||||
|
@ -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__)
|
||||
|
@ -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):
|
||||
|
@ -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__)
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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):
|
||||
|
@ -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)
|
||||
|
@ -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):
|
||||
|
@ -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__)
|
||||
|
||||
|
@ -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):
|
||||
|
@ -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)
|
||||
|
||||
|
||||
|
@ -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')
|
||||
|
||||
|
@ -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__)
|
||||
|
||||
|
@ -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)
|
||||
|
@ -38,7 +38,7 @@ consoleauth_opts = [
|
||||
help='Manager for console auth'),
|
||||
]
|
||||
|
||||
CONF = config.CONF
|
||||
CONF = cfg.CONF
|
||||
CONF.register_opts(consoleauth_opts)
|
||||
|
||||
|
||||
|
@ -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):
|
||||
|
@ -72,7 +72,7 @@ crypto_opts = [
|
||||
'project, timestamp')),
|
||||
]
|
||||
|
||||
CONF = config.CONF
|
||||
CONF = cfg.CONF
|
||||
CONF.register_opts(crypto_opts)
|
||||
|
||||
|
||||
|
@ -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',
|
||||
|
@ -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)
|
||||
|
||||
|
||||
|
@ -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__)
|
||||
|
||||
|
@ -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
|
||||
|
@ -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()
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
@ -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):
|
||||
|
@ -60,7 +60,7 @@ s3_opts = [
|
||||
'when downloading from s3'),
|
||||
]
|
||||
|
||||
CONF = config.CONF
|
||||
CONF = cfg.CONF
|
||||
CONF.register_opts(s3_opts)
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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__)
|
||||
|
||||
|
||||
|
@ -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()
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 = [
|
||||
|
@ -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)
|
||||
|
||||
|
||||
|
@ -161,7 +161,7 @@ network_opts = [
|
||||
help="Indicates underlying L3 management library")
|
||||
]
|
||||
|
||||
CONF = config.CONF
|
||||
CONF = cfg.CONF
|
||||
CONF.register_opts(network_opts)
|
||||
|
||||
|
||||
|
@ -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):
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
import netaddr
|
||||
|
||||
from nova import config
|
||||
from nova import db
|
||||
from nova import exception
|
||||
from nova import ipv6
|
||||
|
@ -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__)
|
||||
|
||||
|
||||
|
@ -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__)
|
||||
|
@ -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):
|
||||
|
@ -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)
|
||||
|
@ -63,7 +63,7 @@ s3_opts = [
|
||||
help='port for s3 api to listen'),
|
||||
]
|
||||
|
||||
CONF = config.CONF
|
||||
CONF = cfg.CONF
|
||||
CONF.register_opts(s3_opts)
|
||||
|
||||
|
||||
|
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