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:
Mark McLoughlin 2013-02-15 22:30:16 +00:00 committed by Vishvananda Ishaya
parent d62205f316
commit 706a137005
285 changed files with 496 additions and 2226 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 = [

View File

@ -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

View File

@ -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

View File

@ -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 = [

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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',

View File

@ -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 = [

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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(

View File

@ -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 = [

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 = [

View File

@ -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

View File

@ -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

View File

@ -18,7 +18,7 @@
Global cells config options
"""
from nova.openstack.common import cfg
from oslo.config import cfg
cells_opts = [
cfg.BoolOpt('enable',

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 = [

View File

@ -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

View File

@ -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 = [

View File

@ -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',
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)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -17,7 +17,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from nova.openstack.common import cfg
from oslo.config import cfg
from nova.openstack.common.db.sqlalchemy import session as db_session
from nova.openstack.common import rpc
from nova import paths

View File

@ -17,10 +17,11 @@
"""Handles ConsoleProxy API requests."""
from oslo.config import cfg
from nova.compute import rpcapi as compute_rpcapi
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

View File

@ -19,10 +19,11 @@
import socket
from oslo.config import cfg
from nova.compute import rpcapi as compute_rpcapi
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 import utils

View File

@ -18,7 +18,8 @@
Client side of the console RPC API.
"""
from nova.openstack.common import cfg
from oslo.config import cfg
import nova.openstack.common.rpc.proxy
rpcapi_opts = [

View File

@ -19,8 +19,9 @@
import base64
from oslo.config import cfg
from nova import exception
from nova.openstack.common import cfg
from nova.openstack.common import jsonutils
from nova.virt.vmwareapi import vim_util

View File

@ -17,10 +17,11 @@
"""VMRC Console Manager."""
from oslo.config import cfg
from nova.compute import rpcapi as compute_rpcapi
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.virt.vmwareapi import driver as vmwareapi_conn

View File

@ -21,11 +21,11 @@ import os
import signal
from Cheetah import Template
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 import log as logging
from nova import paths
from nova import utils

View File

@ -18,7 +18,7 @@
"""Module to authenticate Consoles."""
from nova.openstack.common import cfg
from oslo.config import cfg
consoleauth_topic_opt = cfg.StrOpt('consoleauth_topic',

View File

@ -20,9 +20,10 @@
import time
from oslo.config import cfg
from nova.common import memorycache
from nova import manager
from nova.openstack.common import cfg
from nova.openstack.common import jsonutils
from nova.openstack.common import log as logging

View File

@ -18,7 +18,8 @@
Client side of the consoleauth RPC API.
"""
from nova.openstack.common import cfg
from oslo.config import cfg
import nova.openstack.common.rpc.proxy
CONF = cfg.CONF

View File

@ -31,13 +31,13 @@ import re
import string
import struct
from oslo.config import cfg
from pyasn1.codec.der import encoder as der_encoder
from pyasn1.type import univ
from nova import context
from nova import db
from nova import exception
from nova.openstack.common import cfg
from nova.openstack.common import fileutils
from nova.openstack.common import log as logging
from nova.openstack.common import timeutils

View File

@ -43,9 +43,10 @@ these objects be simple dictionaries.
"""
from oslo.config import cfg
from nova.cells import rpcapi as cells_rpcapi
from nova import exception
from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova import utils

View File

@ -18,7 +18,8 @@
"""Base class for classes that need modular database access."""
from nova.openstack.common import cfg
from oslo.config import cfg
from nova.openstack.common import importutils
db_driver_opt = cfg.StrOpt('db_driver',

View File

@ -25,6 +25,7 @@ import datetime
import functools
import uuid
from oslo.config import cfg
from sqlalchemy import and_
from sqlalchemy import Boolean
from sqlalchemy.exc import IntegrityError
@ -47,7 +48,6 @@ from nova.compute import vm_states
from nova import db
from nova.db.sqlalchemy import models
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.db.sqlalchemy import utils as sqlalchemyutils
from nova.openstack.common import log as logging

View File

@ -25,13 +25,12 @@ from sqlalchemy import Column, Integer, BigInteger, String, schema
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import ForeignKey, DateTime, Boolean, Text, Float
from sqlalchemy.orm import relationship, backref, object_mapper
from oslo.config import cfg
from nova.db.sqlalchemy import types
from nova.openstack.common import cfg
from nova.openstack.common.db.sqlalchemy import models
from nova.openstack.common import timeutils
CONF = cfg.CONF
BASE = declarative_base()

View File

@ -26,9 +26,9 @@ SHOULD include dedicated exception logging.
import functools
from oslo.config import cfg
import webob.exc
from nova.openstack.common import cfg
from nova.openstack.common import excutils
from nova.openstack.common import log as logging

View File

@ -29,9 +29,9 @@ import urlparse
import glanceclient
import glanceclient.exc
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 log as logging
from nova.openstack.common import timeutils

View File

@ -28,12 +28,12 @@ import tempfile
import boto.s3.connection
import eventlet
from lxml import etree
from oslo.config import cfg
from nova.api.ec2 import ec2utils
import nova.cert.rpcapi
from nova import exception
from nova.image import glance
from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova import utils

View File

@ -14,9 +14,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from nova.openstack.common import cfg
from nova import utils
from oslo.config import cfg
from nova import utils
ipv6_backend_opt = cfg.StrOpt('ipv6_backend',
default='rfc2462',

View File

@ -53,12 +53,13 @@ This module provides Manager, a base class for managers.
"""
import eventlet
import time
import eventlet
from oslo.config import cfg
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.openstack.common.plugin import pluginmanager
from nova.openstack.common.rpc import dispatcher as rpc_dispatcher

View File

@ -19,7 +19,7 @@
import socket
from nova.openstack.common import cfg
from oslo.config import cfg
CONF = cfg.CONF

View File

@ -16,23 +16,24 @@
# 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.network import <foo>' elsewhere.
import nova.openstack.common.cfg
import nova.openstack.common.importutils
_network_opts = [
nova.openstack.common.cfg.StrOpt('network_api_class',
oslo.config.cfg.StrOpt('network_api_class',
default='nova.network.api.API',
help='The full class name of the '
'network API class to use'),
]
nova.openstack.common.cfg.CONF.register_opts(_network_opts)
oslo.config.cfg.CONF.register_opts(_network_opts)
def API():
importutils = nova.openstack.common.importutils
network_api_class = nova.openstack.common.cfg.CONF.network_api_class
network_api_class = oslo.config.cfg.CONF.network_api_class
cls = importutils.import_class(network_api_class)
return cls()

View File

@ -16,7 +16,8 @@
import sys
from nova.openstack.common import cfg
from oslo.config import cfg
from nova.openstack.common import importutils
from nova.openstack.common import log as logging

View File

@ -17,11 +17,12 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.config import cfg
from nova import context
from nova.db import base
from nova import exception
from nova.network import rpcapi as network_rpcapi
from nova.openstack.common import cfg
from nova.openstack.common import excutils
from nova.openstack.common import importutils
from nova.openstack.common import lockutils

View File

@ -15,9 +15,10 @@
import ldap
import time
from oslo.config import cfg
from nova import exception
from nova.network import dns_driver
from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova import utils

View File

@ -25,9 +25,10 @@ import netaddr
import os
import re
from oslo.config import cfg
from nova import db
from nova import exception
from nova.openstack.common import cfg
from nova.openstack.common import fileutils
from nova.openstack.common import importutils
from nova.openstack.common import lockutils
@ -36,7 +37,6 @@ from nova.openstack.common import timeutils
from nova import paths
from nova import utils
LOG = logging.getLogger(__name__)

View File

@ -50,6 +50,7 @@ import uuid
from eventlet import greenpool
import netaddr
from oslo.config import cfg
from nova.compute import api as compute_api
from nova import context
@ -61,7 +62,6 @@ from nova.network import driver
from nova.network import floating_ips
from nova.network import model as network_model
from nova.network import rpcapi as network_rpcapi
from nova.openstack.common import cfg
from nova.openstack.common import excutils
from nova.openstack.common import importutils
from nova.openstack.common import jsonutils
@ -72,7 +72,6 @@ from nova.openstack.common import uuidutils
from nova import servicegroup
from nova import utils
LOG = logging.getLogger(__name__)

View File

@ -16,12 +16,12 @@ import os
import shutil
import tempfile
from oslo.config import cfg
from nova import exception
from nova.network import dns_driver
from nova.openstack.common import cfg
from nova.openstack.common import log as logging
CONF = cfg.CONF
LOG = logging.getLogger(__name__)

View File

@ -15,12 +15,13 @@
# License for the specific language governing permissions and limitations
# under the License.
from nova.openstack.common import cfg
from nova.openstack.common import excutils
from nova.openstack.common import log as logging
from oslo.config import cfg
from quantumclient import client
from quantumclient.v2_0 import client as clientv20
from nova.openstack.common import excutils
from nova.openstack.common import log as logging
CONF = cfg.CONF
LOG = logging.getLogger(__name__)

View File

@ -18,6 +18,8 @@
import time
from oslo.config import cfg
from nova import conductor
from nova import context
from nova.db import base
@ -25,12 +27,10 @@ from nova import exception
from nova.network import api as network_api
from nova.network import model as network_model
from nova.network import quantumv2
from nova.openstack.common import cfg
from nova.openstack.common import excutils
from nova.openstack.common import log as logging
from nova.openstack.common import uuidutils
quantum_opts = [
cfg.StrOpt('quantum_url',
default='http://127.0.0.1:9696',

View File

@ -18,7 +18,8 @@
Client side of the network RPC API.
"""
from nova.openstack.common import cfg
from oslo.config import cfg
from nova.openstack.common import jsonutils
from nova.openstack.common import rpc
from nova.openstack.common.rpc import proxy as rpc_proxy

View File

@ -19,12 +19,13 @@
the system.
"""
from oslo.config import cfg
import nova.context
from nova import db
from nova.image import glance
from nova import network
from nova.network import model as network_model
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

View File

@ -41,10 +41,10 @@ import os
import os.path
import urllib
from oslo.config import cfg
import routes
import webob
from nova.openstack.common import cfg
from nova.openstack.common import fileutils
from nova import paths
from nova import utils

File diff suppressed because it is too large Load Diff

View File

@ -246,13 +246,13 @@ import time
from eventlet import db_pool
from eventlet import greenthread
from oslo.config import cfg
from sqlalchemy.exc import DisconnectionError, OperationalError, IntegrityError
import sqlalchemy.interfaces
import sqlalchemy.orm
from sqlalchemy.pool import NullPool, StaticPool
from sqlalchemy.sql.expression import literal_column
from nova.openstack.common import cfg
from nova.openstack.common import importutils
from nova.openstack.common import log as logging
from nova.openstack.common.gettextutils import _

View File

@ -24,8 +24,7 @@ import traceback
import eventlet
import eventlet.backdoor
import greenlet
from nova.openstack.common import cfg
from oslo.config import cfg
eventlet_backdoor_opts = [
cfg.IntOpt('backdoor_port',

View File

@ -1,130 +0,0 @@
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 OpenStack LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
class ParseError(Exception):
def __init__(self, message, lineno, line):
self.msg = message
self.line = line
self.lineno = lineno
def __str__(self):
return 'at line %d, %s: %r' % (self.lineno, self.msg, self.line)
class BaseParser(object):
lineno = 0
parse_exc = ParseError
def _assignment(self, key, value):
self.assignment(key, value)
return None, []
def _get_section(self, line):
if line[-1] != ']':
return self.error_no_section_end_bracket(line)
if len(line) <= 2:
return self.error_no_section_name(line)
return line[1:-1]
def _split_key_value(self, line):
colon = line.find(':')
equal = line.find('=')
if colon < 0 and equal < 0:
return self.error_invalid_assignment(line)
if colon < 0 or (equal >= 0 and equal < colon):
key, value = line[:equal], line[equal + 1:]
else:
key, value = line[:colon], line[colon + 1:]
value = value.strip()
if ((value and value[0] == value[-1]) and
(value[0] == "\"" or value[0] == "'")):
value = value[1:-1]
return key.strip(), [value]
def parse(self, lineiter):
key = None
value = []
for line in lineiter:
self.lineno += 1
line = line.rstrip()
if not line:
# Blank line, ends multi-line values
if key:
key, value = self._assignment(key, value)
continue
elif line[0] in (' ', '\t'):
# Continuation of previous assignment
if key is None:
self.error_unexpected_continuation(line)
else:
value.append(line.lstrip())
continue
if key:
# Flush previous assignment, if any
key, value = self._assignment(key, value)
if line[0] == '[':
# Section start
section = self._get_section(line)
if section:
self.new_section(section)
elif line[0] in '#;':
self.comment(line[1:].lstrip())
else:
key, value = self._split_key_value(line)
if not key:
return self.error_empty_key(line)
if key:
# Flush previous assignment, if any
self._assignment(key, value)
def assignment(self, key, value):
"""Called when a full assignment is parsed"""
raise NotImplementedError()
def new_section(self, section):
"""Called when a new section is started"""
raise NotImplementedError()
def comment(self, comment):
"""Called when a comment is parsed"""
pass
def error_invalid_assignment(self, line):
raise self.parse_exc("No ':' or '=' found in assignment",
self.lineno, line)
def error_empty_key(self, line):
raise self.parse_exc('Key cannot be empty', self.lineno, line)
def error_unexpected_continuation(self, line):
raise self.parse_exc('Unexpected continuation line',
self.lineno, line)
def error_no_section_end_bracket(self, line):
raise self.parse_exc('Invalid section (must end with ])',
self.lineno, line)
def error_no_section_name(self, line):
raise self.parse_exc('Empty section name', self.lineno, line)

View File

@ -25,14 +25,13 @@ import time
import weakref
from eventlet import semaphore
from oslo.config import cfg
from nova.openstack.common import cfg
from nova.openstack.common import fileutils
from nova.openstack.common.gettextutils import _
from nova.openstack.common import local
from nova.openstack.common import log as logging
LOG = logging.getLogger(__name__)

View File

@ -40,7 +40,8 @@ import stat
import sys
import traceback
from nova.openstack.common import cfg
from oslo.config import cfg
from nova.openstack.common.gettextutils import _
from nova.openstack.common import jsonutils
from nova.openstack.common import local

Some files were not shown because too many files have changed in this diff Show More