Use oslo-config-2013.1b4
The cfg API is now available via the oslo-config library, so switch to it and remove the copied-and-pasted version. Add the 2013.1b4 tarball to tools/pip-requires - this will be changed to 'oslo-config>=2013.1' when oslo-config is published to pypi. This will happen in time for grizzly final. Add dependency_links to setup.py so that oslo-config can be installed from the tarball URL specified in pip-requires. Remove the 'deps = pep8==1.3.3' from tox.ini as it means all the other deps get installed with easy_install which can't install oslo-config from the URL. Make tools/hacking.py include oslo in IMPORT_EXCEPTIONS like it already does for paste. It turns out imp.find_module() doesn't correct handle namespace packages. Retain dummy cfg.py file until keystoneclient middleware has been updated (I18c450174277c8e2d15ed93879da6cd92074c27a). Change-Id: I4815aeb8a9341a31a250e920157f15ee15cfc5bc
This commit is contained in:
parent
d62205f316
commit
706a137005
@ -33,6 +33,7 @@ eventlet.monkey_patch(os=False)
|
||||
import os
|
||||
import sys
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
possible_topdir = os.path.normpath(os.path.join(os.path.abspath(
|
||||
sys.argv[0]), os.pardir, os.pardir))
|
||||
@ -42,7 +43,6 @@ 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
|
||||
|
@ -29,6 +29,7 @@ eventlet.monkey_patch(os=False)
|
||||
import os
|
||||
import sys
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
possible_topdir = os.path.normpath(os.path.join(os.path.abspath(
|
||||
sys.argv[0]), os.pardir, os.pardir))
|
||||
@ -37,7 +38,6 @@ 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
|
||||
|
@ -58,6 +58,7 @@ import gettext
|
||||
import os
|
||||
import sys
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
# If ../nova/__init__.py exists, add ../ to Python search path, so that
|
||||
# it will override what happens to be installed in /usr/(local/)lib/python...
|
||||
@ -70,7 +71,6 @@ 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 cliutils
|
||||
from nova.openstack.common import log as logging
|
||||
from nova import version
|
||||
|
@ -24,6 +24,8 @@ eventlet.monkey_patch()
|
||||
import os
|
||||
import sys
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
# If ../nova/__init__.py exists, add ../ to Python search path, so that
|
||||
# it will override what happens to be installed in /usr/(local/)lib/python...
|
||||
possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
|
||||
@ -33,7 +35,6 @@ if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')):
|
||||
sys.path.insert(0, possible_topdir)
|
||||
|
||||
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
|
||||
|
@ -23,6 +23,8 @@ eventlet.monkey_patch()
|
||||
import os
|
||||
import sys
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
# If ../nova/__init__.py exists, add ../ to Python search path, so that
|
||||
# it will override what happens to be installed in /usr/(local/)lib/python...
|
||||
POSSIBLE_TOPDIR = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
|
||||
@ -33,7 +35,6 @@ 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
|
||||
|
@ -27,6 +27,8 @@ import gettext
|
||||
import os
|
||||
import sys
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
# If ../nova/__init__.py exists, add ../ to Python search path, so that
|
||||
# it will override what happens to be installed in /usr/(local/)lib/python...
|
||||
POSSIBLE_TOPDIR = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
|
||||
@ -39,7 +41,6 @@ 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.openstack.common import rpc
|
||||
|
||||
|
@ -33,6 +33,8 @@ import os
|
||||
import sys
|
||||
import traceback
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
# If ../nova/__init__.py exists, add ../ to Python search path, so that
|
||||
# it will override what happens to be installed in /usr/(local/)lib/python...
|
||||
POSSIBLE_TOPDIR = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
|
||||
@ -45,7 +47,6 @@ if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'nova', '__init__.py')):
|
||||
from nova import config
|
||||
import nova.db.api
|
||||
from nova import exception
|
||||
from nova.openstack.common import cfg
|
||||
from nova.openstack.common import log as logging
|
||||
from nova import service
|
||||
from nova import utils
|
||||
|
@ -23,6 +23,8 @@ eventlet.monkey_patch()
|
||||
import os
|
||||
import sys
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
# If ../nova/__init__.py exists, add ../ to Python search path, so that
|
||||
# it will override what happens to be installed in /usr/(local/)lib/python...
|
||||
possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
|
||||
@ -33,7 +35,6 @@ 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
|
||||
|
@ -24,6 +24,8 @@ eventlet.monkey_patch()
|
||||
import os
|
||||
import sys
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
# If ../nova/__init__.py exists, add ../ to Python search path, so that
|
||||
# it will override what happens to be installed in /usr/(local/)lib/python...
|
||||
possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
|
||||
@ -34,7 +36,6 @@ 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
|
||||
|
||||
|
@ -24,6 +24,8 @@ eventlet.monkey_patch()
|
||||
import os
|
||||
import sys
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
|
||||
os.pardir,
|
||||
os.pardir))
|
||||
@ -33,7 +35,6 @@ 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
|
||||
|
||||
|
@ -25,6 +25,8 @@ import gettext
|
||||
import os
|
||||
import sys
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
# If ../nova/__init__.py exists, add ../ to Python search path, so that
|
||||
# it will override what happens to be installed in /usr/(local/)lib/python...
|
||||
possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
|
||||
@ -39,7 +41,6 @@ from nova import config
|
||||
from nova import context
|
||||
from nova import db
|
||||
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
|
||||
|
@ -59,6 +59,8 @@ import netaddr
|
||||
import os
|
||||
import sys
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
# If ../nova/__init__.py exists, add ../ to Python search path, so that
|
||||
# it will override what happens to be installed in /usr/(local/)lib/python...
|
||||
POSSIBLE_TOPDIR = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
|
||||
@ -77,7 +79,6 @@ from nova import context
|
||||
from nova import db
|
||||
from nova.db import migration
|
||||
from nova import exception
|
||||
from nova.openstack.common import cfg
|
||||
from nova.openstack.common import cliutils
|
||||
from nova.openstack.common.db.sqlalchemy import session as db_session
|
||||
from nova.openstack.common import importutils
|
||||
|
@ -25,6 +25,8 @@ eventlet.monkey_patch()
|
||||
import os
|
||||
import sys
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
# If ../nova/__init__.py exists, add ../ to Python search path, so that
|
||||
# it will override what happens to be installed in /usr/(local/)lib/python...
|
||||
possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
|
||||
@ -35,7 +37,6 @@ 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
|
||||
|
@ -24,9 +24,10 @@ noVNC consoles. Leverages websockify.py by Joel Martin
|
||||
import os
|
||||
import sys
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from nova import config
|
||||
from nova.console import websocketproxy
|
||||
from nova.openstack.common import cfg
|
||||
|
||||
|
||||
opts = [
|
||||
|
@ -22,6 +22,7 @@ import contextlib
|
||||
import os
|
||||
import sys
|
||||
|
||||
from oslo.config import cfg
|
||||
import zmq
|
||||
|
||||
# If ../nova/__init__.py exists, add ../ to Python search path, so that
|
||||
@ -34,7 +35,6 @@ 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
|
||||
|
@ -26,6 +26,8 @@ import gettext
|
||||
import os
|
||||
import sys
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
# If ../nova/__init__.py exists, add ../ to Python search path, so that
|
||||
# it will override what happens to be installed in /usr/(local/)lib/python...
|
||||
possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
|
||||
@ -37,7 +39,6 @@ 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
|
||||
|
@ -24,9 +24,10 @@ SPICE HTML5 consoles. Leverages websockify.py by Joel Martin
|
||||
import os
|
||||
import sys
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from nova import config
|
||||
from nova.console import websocketproxy
|
||||
from nova.openstack.common import cfg
|
||||
|
||||
|
||||
opts = [
|
||||
|
@ -18,11 +18,11 @@ Common Auth Middleware.
|
||||
|
||||
"""
|
||||
|
||||
from oslo.config import cfg
|
||||
import webob.dec
|
||||
import webob.exc
|
||||
|
||||
from nova import context
|
||||
from nova.openstack.common import cfg
|
||||
from nova.openstack.common import jsonutils
|
||||
from nova.openstack.common import log as logging
|
||||
from nova import wsgi
|
||||
|
@ -23,6 +23,7 @@ Starting point for routing EC2 requests.
|
||||
import urlparse
|
||||
|
||||
from eventlet.green import httplib
|
||||
from oslo.config import cfg
|
||||
import webob
|
||||
import webob.dec
|
||||
import webob.exc
|
||||
@ -34,7 +35,6 @@ from nova.api import validator
|
||||
from nova.common import memorycache
|
||||
from nova import context
|
||||
from nova import exception
|
||||
from nova.openstack.common import cfg
|
||||
from nova.openstack.common import importutils
|
||||
from nova.openstack.common import jsonutils
|
||||
from nova.openstack.common import log as logging
|
||||
|
@ -25,6 +25,8 @@ datastore.
|
||||
import base64
|
||||
import time
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from nova.api.ec2 import ec2utils
|
||||
from nova.api.ec2 import inst_state
|
||||
from nova.api.metadata import password
|
||||
@ -40,7 +42,6 @@ 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
|
||||
|
@ -12,11 +12,11 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo.config import cfg
|
||||
import webob.dec
|
||||
import webob.exc
|
||||
|
||||
from nova import context
|
||||
from nova.openstack.common import cfg
|
||||
from nova import utils
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
@ -23,13 +23,14 @@ import json
|
||||
import os
|
||||
import posixpath
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from nova.api.ec2 import ec2utils
|
||||
from nova.api.metadata import password
|
||||
from nova import block_device
|
||||
from nova import conductor
|
||||
from nova import context
|
||||
from nova import network
|
||||
from nova.openstack.common import cfg
|
||||
from nova.openstack.common import timeutils
|
||||
from nova.virt import netutils
|
||||
|
||||
|
@ -21,6 +21,7 @@ import hashlib
|
||||
import hmac
|
||||
import os
|
||||
|
||||
from oslo.config import cfg
|
||||
import webob.dec
|
||||
import webob.exc
|
||||
|
||||
@ -28,7 +29,6 @@ from nova.api.metadata import base
|
||||
from nova.common import memorycache
|
||||
from nova import conductor
|
||||
from nova import exception
|
||||
from nova.openstack.common import cfg
|
||||
from nova.openstack.common import log as logging
|
||||
from nova import wsgi
|
||||
|
||||
|
@ -17,12 +17,12 @@
|
||||
|
||||
import os
|
||||
|
||||
from oslo.config import cfg
|
||||
import webob.dec
|
||||
import webob.exc
|
||||
|
||||
from nova.api.openstack import wsgi
|
||||
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
|
||||
|
||||
|
@ -20,6 +20,7 @@ import os
|
||||
import re
|
||||
import urlparse
|
||||
|
||||
from oslo.config import cfg
|
||||
import webob
|
||||
|
||||
from nova.api.openstack import wsgi
|
||||
@ -28,7 +29,6 @@ from nova.compute import task_states
|
||||
from nova.compute import utils as compute_utils
|
||||
from nova.compute import vm_states
|
||||
from nova import exception
|
||||
from nova.openstack.common import cfg
|
||||
from nova.openstack.common import log as logging
|
||||
from nova import quota
|
||||
from nova import utils
|
||||
|
@ -20,6 +20,8 @@
|
||||
WSGI middleware for OpenStack Compute API.
|
||||
"""
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
import nova.api.openstack
|
||||
from nova.api.openstack.compute import consoles
|
||||
from nova.api.openstack.compute import extensions
|
||||
@ -31,10 +33,8 @@ 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.openstack.common import cfg
|
||||
from nova.openstack.common import log as logging
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
allow_instance_snapshots_opt = cfg.BoolOpt('allow_instance_snapshots',
|
||||
|
@ -21,8 +21,9 @@ It can't be called 'extensions' because that causes namespacing problems.
|
||||
|
||||
"""
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from nova.api.openstack import extensions
|
||||
from nova.openstack.common import cfg
|
||||
from nova.openstack.common import log as logging
|
||||
|
||||
ext_opts = [
|
||||
|
@ -14,17 +14,17 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from nova.api.openstack import common
|
||||
from nova.api.openstack import extensions
|
||||
from nova.api.openstack import wsgi
|
||||
from nova.api.openstack import xmlutil
|
||||
from nova import availability_zones
|
||||
from nova import db
|
||||
from nova.openstack.common import cfg
|
||||
from nova.openstack.common import log as logging
|
||||
from nova import servicegroup
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
@ -16,9 +16,10 @@
|
||||
# under the License.
|
||||
|
||||
"""The cells extension."""
|
||||
from xml.parsers import expat
|
||||
|
||||
from oslo.config import cfg
|
||||
from webob import exc
|
||||
from xml.parsers import expat
|
||||
|
||||
from nova.api.openstack import common
|
||||
from nova.api.openstack import extensions
|
||||
@ -28,7 +29,6 @@ from nova.cells import rpcapi as cells_rpcapi
|
||||
from nova.compute import api as compute
|
||||
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
|
||||
|
@ -14,6 +14,8 @@
|
||||
|
||||
"""Connect your vlan to the world."""
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from nova.api.openstack import extensions
|
||||
from nova.api.openstack import wsgi
|
||||
from nova.api.openstack import xmlutil
|
||||
@ -24,7 +26,6 @@ from nova.compute import vm_states
|
||||
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
|
||||
|
@ -16,12 +16,12 @@
|
||||
# under the License.
|
||||
|
||||
import netaddr
|
||||
from oslo.config import cfg
|
||||
import webob.exc
|
||||
|
||||
from nova.api.openstack import extensions
|
||||
from nova import db
|
||||
from nova import exception
|
||||
from nova.openstack.common import cfg
|
||||
from nova.openstack.common import log as logging
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
@ -19,17 +19,16 @@
|
||||
import itertools
|
||||
import os
|
||||
|
||||
from oslo.config import cfg
|
||||
from webob import exc
|
||||
|
||||
from nova.api.openstack import common
|
||||
from nova.api.openstack import extensions
|
||||
from nova import compute
|
||||
from nova import exception
|
||||
from nova.openstack.common import cfg
|
||||
from nova.openstack.common import log as logging
|
||||
from nova import utils
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
authorize = extensions.extension_authorizer('compute', 'fping')
|
||||
authorize_all_tenants = extensions.extension_authorizer(
|
||||
|
@ -15,11 +15,11 @@
|
||||
|
||||
"""Extension for hiding server addresses in certain states."""
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from nova.api.openstack import extensions
|
||||
from nova.api.openstack import wsgi
|
||||
from nova.compute import vm_states
|
||||
from nova.openstack.common import cfg
|
||||
from nova.openstack.common import log as logging
|
||||
|
||||
opts = [
|
||||
|
@ -18,11 +18,11 @@
|
||||
|
||||
import datetime
|
||||
|
||||
from oslo.config import cfg
|
||||
import webob.exc
|
||||
|
||||
from nova.api.openstack import extensions
|
||||
from nova import compute
|
||||
from nova.openstack.common import cfg
|
||||
from nova import utils
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
@ -18,13 +18,13 @@
|
||||
|
||||
import netaddr
|
||||
import netaddr.core as netexc
|
||||
from oslo.config import cfg
|
||||
from webob import exc
|
||||
|
||||
from nova.api.openstack import extensions
|
||||
from nova import context as nova_context
|
||||
from nova import exception
|
||||
import nova.network
|
||||
from nova.openstack.common import cfg
|
||||
from nova.openstack.common import log as logging
|
||||
from nova import quota
|
||||
|
||||
|
@ -14,6 +14,7 @@
|
||||
|
||||
"""The rescue mode extension."""
|
||||
|
||||
from oslo.config import cfg
|
||||
import webob
|
||||
from webob import exc
|
||||
|
||||
@ -22,7 +23,6 @@ from nova.api.openstack import extensions as exts
|
||||
from nova.api.openstack import wsgi
|
||||
from nova import compute
|
||||
from nova import exception
|
||||
from nova.openstack.common import cfg
|
||||
from nova.openstack.common import log as logging
|
||||
from nova import utils
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
|
||||
from oslo.config import cfg
|
||||
import webob.exc
|
||||
|
||||
from nova.api.openstack import extensions
|
||||
@ -24,12 +24,10 @@ from nova.api.openstack import xmlutil
|
||||
from nova import availability_zones
|
||||
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
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
authorize = extensions.extension_authorizer('compute', 'services')
|
||||
CONF = cfg.CONF
|
||||
|
@ -15,8 +15,9 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from nova.api.openstack import extensions as base_extensions
|
||||
from nova.openstack.common import cfg
|
||||
from nova.openstack.common import log as logging
|
||||
from nova.openstack.common.plugin import pluginmanager
|
||||
|
||||
|
@ -19,6 +19,7 @@ import os
|
||||
import re
|
||||
import socket
|
||||
|
||||
from oslo.config import cfg
|
||||
import webob
|
||||
from webob import exc
|
||||
|
||||
@ -30,7 +31,6 @@ from nova.api.openstack import xmlutil
|
||||
from nova import compute
|
||||
from nova.compute import instance_types
|
||||
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
|
||||
|
@ -18,10 +18,10 @@ Request Body limiting middleware.
|
||||
|
||||
"""
|
||||
|
||||
from oslo.config import cfg
|
||||
import webob.dec
|
||||
import webob.exc
|
||||
|
||||
from nova.openstack.common import cfg
|
||||
from nova.openstack.common import log as logging
|
||||
from nova import wsgi
|
||||
|
||||
|
@ -15,8 +15,9 @@
|
||||
|
||||
"""Availability zone helper functions."""
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from nova import db
|
||||
from nova.openstack.common import cfg
|
||||
from nova.openstack.common import log as logging
|
||||
|
||||
availability_zone_opts = [
|
||||
|
@ -19,13 +19,14 @@ Cells Service Manager
|
||||
import datetime
|
||||
import time
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from nova.cells import messaging
|
||||
from nova.cells import state as cells_state
|
||||
from nova.cells import utils as cells_utils
|
||||
from nova import context
|
||||
from nova import exception
|
||||
from nova import manager
|
||||
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 timeutils
|
||||
|
@ -25,6 +25,7 @@ The interface into this module is the MessageRunner class.
|
||||
import sys
|
||||
|
||||
from eventlet import queue
|
||||
from oslo.config import cfg
|
||||
|
||||
from nova.cells import state as cells_state
|
||||
from nova.cells import utils as cells_utils
|
||||
@ -32,7 +33,6 @@ from nova import compute
|
||||
from nova import context
|
||||
from nova.db import base
|
||||
from nova import exception
|
||||
from nova.openstack.common import cfg
|
||||
from nova.openstack.common import excutils
|
||||
from nova.openstack.common import importutils
|
||||
from nova.openstack.common import jsonutils
|
||||
|
@ -18,7 +18,7 @@
|
||||
Global cells config options
|
||||
"""
|
||||
|
||||
from nova.openstack.common import cfg
|
||||
from oslo.config import cfg
|
||||
|
||||
cells_opts = [
|
||||
cfg.BoolOpt('enable',
|
||||
|
@ -16,8 +16,9 @@
|
||||
"""
|
||||
Cells RPC Communication Driver
|
||||
"""
|
||||
from oslo.config import cfg
|
||||
|
||||
from nova.cells import driver
|
||||
from nova.openstack.common import cfg
|
||||
from nova.openstack.common import rpc
|
||||
from nova.openstack.common.rpc import dispatcher as rpc_dispatcher
|
||||
from nova.openstack.common.rpc import proxy as rpc_proxy
|
||||
|
@ -22,7 +22,8 @@ services. That communication is handled by the cells driver via the
|
||||
messging module.
|
||||
"""
|
||||
|
||||
from nova.openstack.common import cfg
|
||||
from oslo.config import cfg
|
||||
|
||||
from nova.openstack.common import jsonutils
|
||||
from nova.openstack.common import log as logging
|
||||
from nova.openstack.common.rpc import proxy as rpc_proxy
|
||||
|
@ -19,11 +19,12 @@ Cells Scheduler
|
||||
import random
|
||||
import time
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from nova import compute
|
||||
from nova.compute import vm_states
|
||||
from nova.db import base
|
||||
from nova import exception
|
||||
from nova.openstack.common import cfg
|
||||
from nova.openstack.common import log as logging
|
||||
from nova.scheduler import rpcapi as scheduler_rpcapi
|
||||
|
||||
|
@ -20,10 +20,11 @@ import copy
|
||||
import datetime
|
||||
import functools
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from nova.cells import rpc_driver
|
||||
from nova import context
|
||||
from nova.db import base
|
||||
from nova.openstack.common import cfg
|
||||
from nova.openstack.common import lockutils
|
||||
from nova.openstack.common import log as logging
|
||||
from nova.openstack.common import timeutils
|
||||
|
@ -18,7 +18,8 @@
|
||||
Client side of the cert manager RPC API.
|
||||
"""
|
||||
|
||||
from nova.openstack.common import cfg
|
||||
from oslo.config import cfg
|
||||
|
||||
import nova.openstack.common.rpc.proxy
|
||||
|
||||
rpcapi_opts = [
|
||||
|
@ -26,12 +26,13 @@ import os
|
||||
import string
|
||||
import zipfile
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from nova import compute
|
||||
from nova.compute import instance_types
|
||||
from nova import crypto
|
||||
from nova import db
|
||||
from nova import exception
|
||||
from nova.openstack.common import cfg
|
||||
from nova.openstack.common import fileutils
|
||||
from nova.openstack.common import log as logging
|
||||
from nova import paths
|
||||
|
@ -18,7 +18,8 @@
|
||||
|
||||
"""Super simple fake memcache client."""
|
||||
|
||||
from nova.openstack.common import cfg
|
||||
from oslo.config import cfg
|
||||
|
||||
from nova.openstack.common import timeutils
|
||||
|
||||
memcache_opts = [
|
||||
|
@ -16,24 +16,25 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import oslo.config.cfg
|
||||
|
||||
# Importing full names to not pollute the namespace and cause possible
|
||||
# collisions with use of 'from nova.compute import <foo>' elsewhere.
|
||||
import nova.openstack.common.cfg
|
||||
import nova.openstack.common.importutils
|
||||
|
||||
_compute_opts = [
|
||||
nova.openstack.common.cfg.StrOpt('compute_api_class',
|
||||
default='nova.compute.api.API',
|
||||
help='The full class name of the '
|
||||
'compute API class to use'),
|
||||
oslo.config.cfg.StrOpt('compute_api_class',
|
||||
default='nova.compute.api.API',
|
||||
help='The full class name of the '
|
||||
'compute API class to use'),
|
||||
]
|
||||
|
||||
nova.openstack.common.cfg.CONF.register_opts(_compute_opts)
|
||||
oslo.config.cfg.CONF.register_opts(_compute_opts)
|
||||
|
||||
|
||||
def API(*args, **kwargs):
|
||||
importutils = nova.openstack.common.importutils
|
||||
class_name = nova.openstack.common.cfg.CONF.compute_api_class
|
||||
class_name = oslo.config.cfg.CONF.compute_api_class
|
||||
return importutils.import_object(class_name, *args, **kwargs)
|
||||
|
||||
|
||||
@ -43,7 +44,7 @@ def HostAPI(*args, **kwargs):
|
||||
api
|
||||
"""
|
||||
importutils = nova.openstack.common.importutils
|
||||
compute_api_class_name = nova.openstack.common.cfg.CONF.compute_api_class
|
||||
compute_api_class_name = oslo.config.cfg.CONF.compute_api_class
|
||||
compute_api_class = importutils.import_class(compute_api_class_name)
|
||||
class_name = compute_api_class.__module__ + ".HostAPI"
|
||||
return importutils.import_object(class_name, *args, **kwargs)
|
||||
|
@ -29,6 +29,8 @@ import time
|
||||
import urllib
|
||||
import uuid
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from nova import availability_zones
|
||||
from nova import block_device
|
||||
from nova.compute import instance_actions
|
||||
@ -46,7 +48,6 @@ from nova import hooks
|
||||
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
|
||||
|
@ -23,10 +23,11 @@
|
||||
import re
|
||||
import uuid
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from nova import context
|
||||
from nova import db
|
||||
from nova import exception
|
||||
from nova.openstack.common import cfg
|
||||
from nova.openstack.common.db.sqlalchemy import session as db_session
|
||||
from nova.openstack.common import log as logging
|
||||
from nova import utils
|
||||
|
@ -37,6 +37,7 @@ import traceback
|
||||
import uuid
|
||||
|
||||
from eventlet import greenthread
|
||||
from oslo.config import cfg
|
||||
|
||||
from nova import block_device
|
||||
from nova.cloudpipe import pipelib
|
||||
@ -56,7 +57,6 @@ from nova.image import glance
|
||||
from nova import manager
|
||||
from nova import network
|
||||
from nova.network import model as network_model
|
||||
from nova.openstack.common import cfg
|
||||
from nova.openstack.common import excutils
|
||||
from nova.openstack.common import jsonutils
|
||||
from nova.openstack.common import lockutils
|
||||
|
@ -19,6 +19,8 @@ scheduler with useful information about availability through the ComputeNode
|
||||
model.
|
||||
"""
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from nova.compute import claims
|
||||
from nova.compute import instance_types
|
||||
from nova.compute import task_states
|
||||
@ -26,7 +28,6 @@ from nova.compute import vm_states
|
||||
from nova import conductor
|
||||
from nova import context
|
||||
from nova import exception
|
||||
from nova.openstack.common import cfg
|
||||
from nova.openstack.common import importutils
|
||||
from nova.openstack.common import jsonutils
|
||||
from nova.openstack.common import lockutils
|
||||
|
@ -18,8 +18,9 @@
|
||||
Client side of the compute RPC API.
|
||||
"""
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
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
|
||||
|
@ -20,12 +20,13 @@ import re
|
||||
import string
|
||||
import traceback
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from nova import block_device
|
||||
from nova.compute import instance_types
|
||||
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.openstack.common import timeutils
|
||||
|
@ -12,14 +12,14 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import oslo.config.cfg
|
||||
|
||||
from nova.conductor import api as conductor_api
|
||||
import nova.openstack.common.cfg
|
||||
import nova.openstack.common.importutils
|
||||
|
||||
|
||||
def API(*args, **kwargs):
|
||||
use_local = kwargs.pop('use_local', False)
|
||||
if nova.openstack.common.cfg.CONF.conductor.use_local or use_local:
|
||||
if oslo.config.cfg.CONF.conductor.use_local or use_local:
|
||||
api = conductor_api.LocalAPI
|
||||
else:
|
||||
api = conductor_api.API
|
||||
|
@ -14,10 +14,11 @@
|
||||
|
||||
"""Handles all requests to the conductor service."""
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from nova.conductor import manager
|
||||
from nova.conductor import rpcapi
|
||||
from nova import exception as exc
|
||||
from nova.openstack.common import cfg
|
||||
from nova.openstack.common import log as logging
|
||||
from nova.openstack.common.rpc import common as rpc_common
|
||||
from nova import utils
|
||||
|
@ -14,7 +14,8 @@
|
||||
|
||||
"""Client side of the conductor RPC API."""
|
||||
|
||||
from nova.openstack.common import cfg
|
||||
from oslo.config import cfg
|
||||
|
||||
from nova.openstack.common import jsonutils
|
||||
import nova.openstack.common.rpc.proxy
|
||||
|
||||
|
@ -17,7 +17,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from nova.openstack.common import cfg
|