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 501a5122e8
commit 038427a541
88 changed files with 150 additions and 1969 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

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

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

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

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

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

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

View File

@ -15,7 +15,8 @@
import uuid
from nova.openstack.common import cfg
from oslo.config import cfg
from nova.openstack.common import context
from nova.openstack.common.gettextutils import _
from nova.openstack.common import importutils

View File

@ -13,12 +13,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.config import cfg
from nova.openstack.common import cfg
from nova.openstack.common import jsonutils
from nova.openstack.common import log as logging
CONF = cfg.CONF

View File

@ -13,8 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.config import cfg
from nova.openstack.common import cfg
from nova.openstack.common import context as req_context
from nova.openstack.common.gettextutils import _
from nova.openstack.common import log as logging

View File

@ -15,7 +15,8 @@
'''messaging based notification driver, with message envelopes'''
from nova.openstack.common import cfg
from oslo.config import cfg
from nova.openstack.common import context as req_context
from nova.openstack.common.gettextutils import _
from nova.openstack.common import log as logging

View File

@ -15,7 +15,8 @@
import pkg_resources
from nova.openstack.common import cfg
from oslo.config import cfg
from nova.openstack.common.gettextutils import _
from nova.openstack.common import log as logging
from nova.openstack.common.notifier import api as notifier_api

View File

@ -28,12 +28,12 @@ For some wrappers that add message versioning to rpc, see:
import inspect
import logging
from nova.openstack.common import cfg
from oslo.config import cfg
from nova.openstack.common.gettextutils import _
from nova.openstack.common import importutils
from nova.openstack.common import local
LOG = logging.getLogger(__name__)

View File

@ -21,7 +21,8 @@ import copy
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 importutils
from nova.openstack.common import jsonutils

View File

@ -28,8 +28,8 @@ import kombu
import kombu.connection
import kombu.entity
import kombu.messaging
from oslo.config import cfg
from nova.openstack.common import cfg
from nova.openstack.common.gettextutils import _
from nova.openstack.common import network_utils
from nova.openstack.common.rpc import amqp as rpc_amqp

View File

@ -22,8 +22,8 @@ import uuid
import eventlet
import greenlet
from oslo.config import cfg
from nova.openstack.common import cfg
from nova.openstack.common.gettextutils import _
from nova.openstack.common import importutils
from nova.openstack.common import jsonutils

View File

@ -23,8 +23,8 @@ import uuid
import eventlet
import greenlet
from oslo.config import cfg
from nova.openstack.common import cfg
from nova.openstack.common.gettextutils import _
from nova.openstack.common import importutils
from nova.openstack.common import jsonutils

View File

@ -22,7 +22,8 @@ import contextlib
import itertools
import json
from nova.openstack.common import cfg
from oslo.config import cfg
from nova.openstack.common.gettextutils import _
from nova.openstack.common import log as logging

View File

@ -19,7 +19,7 @@
import os
from nova.openstack.common import cfg
from oslo.config import cfg
path_opts = [
cfg.StrOpt('pybasedir',

View File

@ -19,8 +19,9 @@
import os.path
from oslo.config import cfg
from nova import exception
from nova.openstack.common import cfg
from nova.openstack.common import policy
from nova import utils

View File

@ -20,14 +20,14 @@
import datetime
from oslo.config import cfg
from nova import db
from nova import exception
from nova.openstack.common import cfg
from nova.openstack.common import importutils
from nova.openstack.common import log as logging
from nova.openstack.common import timeutils
LOG = logging.getLogger(__name__)
quota_opts = [

View File

@ -23,8 +23,9 @@ Chance (Random) Scheduler implementation
import random
from oslo.config import cfg
from nova import exception
from nova.openstack.common import cfg
from nova.scheduler import driver
CONF = cfg.CONF

View File

@ -23,6 +23,8 @@ Scheduler base class that all Schedulers should inherit from
import sys
from oslo.config import cfg
from nova.compute import power_state
from nova.compute import rpcapi as compute_rpcapi
from nova.compute import utils as compute_utils
@ -32,7 +34,6 @@ from nova import db
from nova import exception
from nova.image import glance
from nova import notifications
from nova.openstack.common import cfg
from nova.openstack.common import importutils
from nova.openstack.common import log as logging
from nova.openstack.common.notifier import api as notifier

View File

@ -21,8 +21,9 @@ Weighing Functions.
import random
from oslo.config import cfg
from nova import exception
from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova.openstack.common.notifier import api as notifier
from nova.scheduler import driver

View File

@ -13,12 +13,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.config import cfg
from nova import db
from nova.openstack.common import cfg
from nova.scheduler import filters
CONF = cfg.CONF
CONF.import_opt('default_availability_zone', 'nova.availability_zones')

View File

@ -13,7 +13,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 import log as logging
from nova.scheduler import filters
from nova import servicegroup

View File

@ -15,11 +15,11 @@
# 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 import log as logging
from nova.scheduler import filters
LOG = logging.getLogger(__name__)
cpu_allocation_ratio_opt = cfg.FloatOpt('cpu_allocation_ratio',

View File

@ -13,7 +13,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 import log as logging
from nova.scheduler import filters

View File

@ -13,7 +13,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 import log as logging
from nova.scheduler import filters

View File

@ -13,7 +13,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.scheduler import filters
isolated_opts = [

View File

@ -13,7 +13,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 import log as logging
from nova.scheduler import filters

View File

@ -14,7 +14,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 import log as logging
from nova.scheduler import filters

View File

@ -48,15 +48,15 @@ import httplib
import socket
import ssl
from oslo.config import cfg
from nova import context
from nova import db
from nova.openstack.common import cfg
from nova.openstack.common import jsonutils
from nova.openstack.common import log as logging
from nova.openstack.common import timeutils
from nova.scheduler import filters
LOG = logging.getLogger(__name__)
trusted_opts = [

View File

@ -19,11 +19,12 @@ Manage hosts in the current zone.
import UserDict
from oslo.config import cfg
from nova.compute import task_states
from nova.compute import vm_states
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.scheduler import filters

View File

@ -23,6 +23,8 @@ Scheduler Service
import sys
from oslo.config import cfg
from nova.compute import rpcapi as compute_rpcapi
from nova.compute import task_states
from nova.compute import utils as compute_utils
@ -33,7 +35,6 @@ from nova import db
from nova import exception
from nova import manager
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

@ -27,7 +27,8 @@ schedule requests to compute nodes but provide their own manager and topic.
https://bugs.launchpad.net/nova/+bug/1009681
"""
from nova.openstack.common import cfg
from oslo.config import cfg
from nova.openstack.common import importutils
from nova.scheduler import driver

View File

@ -18,7 +18,8 @@
Client side of the scheduler manager 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

@ -26,7 +26,8 @@ import datetime
import json
import os
from nova.openstack.common import cfg
from oslo.config import cfg
from nova.openstack.common import log as logging
from nova.openstack.common import timeutils

View File

@ -17,8 +17,8 @@
Scheduler host weights
"""
from oslo.config import cfg
from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova.scheduler.weights import least_cost
from nova import weights

View File

@ -25,8 +25,9 @@ NOTE(comstud): This is deprecated. One should use the RAMWeigher and/or
create other weight modules.
"""
from oslo.config import cfg
from nova import exception
from nova.openstack.common import cfg
from nova.openstack.common import importutils
from nova.openstack.common import log as logging

View File

@ -20,9 +20,9 @@ stacking, you can set the 'ram_weight_multiplier' option to a negative
number and the weighing has the opposite effect of the default.
"""
from nova.openstack.common import cfg
from nova.scheduler import weights
from oslo.config import cfg
from nova.scheduler import weights
ram_weight_opts = [
cfg.FloatOpt('ram_weight_multiplier',

View File

@ -29,11 +29,11 @@ import time
import eventlet
import greenlet
from oslo.config import cfg
from nova import conductor
from nova import context
from nova import exception
from nova.openstack.common import cfg
from nova.openstack.common import eventlet_backdoor
from nova.openstack.common import importutils
from nova.openstack.common import log as logging

View File

@ -31,6 +31,7 @@ import uuid
import eventlet
import fixtures
import mox
from oslo.config import cfg
import stubout
import testtools
@ -38,7 +39,6 @@ from nova import context
from nova import db
from nova.db import migration
from nova.network import manager as network_manager
from nova.openstack.common import cfg
from nova.openstack.common.db.sqlalchemy import session
from nova.openstack.common import log as logging
from nova.openstack.common import timeutils

View File

@ -15,8 +15,9 @@
"""Bare-metal DB test base class."""
from oslo.config import cfg
from nova import context as nova_context
from nova.openstack.common import cfg
from nova import test
from nova.virt.baremetal.db import migration as bm_migration
from nova.virt.baremetal.db.sqlalchemy import session as bm_session

View File

@ -20,8 +20,9 @@
"""Tests for the base baremetal driver class."""
from oslo.config import cfg
from nova import exception
from nova.openstack.common import cfg
from nova import test
from nova.tests.baremetal.db import base as bm_db_base
from nova.tests.baremetal.db import utils as bm_db_utils

View File

@ -23,7 +23,8 @@ import os
import stat
import tempfile
from nova.openstack.common import cfg
from oslo.config import cfg
from nova import test
from nova.tests.baremetal.db import utils as bm_db_utils
from nova import utils

View File

@ -21,10 +21,10 @@
import os
from oslo.config import cfg
from testtools import matchers
from nova import exception
from nova.openstack.common import cfg
from nova.openstack.common.db.sqlalchemy import session as db_session
from nova.tests.baremetal.db import base as bm_db_base
from nova.tests.baremetal.db import utils as bm_db_utils

View File

@ -19,16 +19,14 @@
"""Tests for baremetal virtual power driver."""
import mox
from oslo.config import cfg
from nova import exception
from nova.openstack.common import cfg
from nova import utils as nutils
from nova.tests.baremetal.db import base as bm_db_base
from nova.tests.baremetal.db import utils as bm_db_utils
from nova.tests.image import fake as fake_image
from nova.tests import utils
from nova import utils as nutils
from nova.virt.baremetal import db
from nova.virt.baremetal import virtual_power_driver
import nova.virt.powervm.common as connection

View File

@ -15,9 +15,9 @@
"""Tests for baremetal volume driver."""
from nova.openstack.common import cfg
from nova import test
from oslo.config import cfg
from nova import test
from nova.virt.baremetal import volume_driver
CONF = cfg.CONF

View File

@ -17,7 +17,8 @@
import os
import StringIO
from nova.openstack.common import cfg
from oslo.config import cfg
from nova.virt.libvirt import utils as libvirt_utils

View File

@ -16,11 +16,12 @@ Tests For Scheduler Host Filters.
"""
import httplib
from oslo.config import cfg
import stubout
from nova import context
from nova import db
from nova.openstack.common import cfg
from nova.openstack.common import jsonutils
from nova.openstack.common import timeutils
from nova.scheduler import filters

View File

@ -15,14 +15,15 @@
"""
Tests For Least Cost functions.
"""
from oslo.config import cfg
from nova import context
from nova.openstack.common import cfg
from nova.scheduler import weights
from nova.scheduler.weights import least_cost
from nova import test
from nova.tests.scheduler import fakes
test_least_cost_opts = [
cfg.FloatOpt('compute_fake_weigher1_weight',
default=2.0,

View File

@ -18,8 +18,9 @@
Unit Tests for nova.scheduler.rpcapi
"""
from oslo.config import cfg
from nova import context
from nova.openstack.common import cfg
from nova.openstack.common import rpc
from nova.scheduler import rpcapi as scheduler_rpcapi
from nova import test

View File

@ -22,6 +22,7 @@
import datetime
import uuid as stdlib_uuid
from oslo.config import cfg
from sqlalchemy import MetaData
from sqlalchemy.schema import Table
from sqlalchemy.sql.expression import select
@ -29,7 +30,6 @@ from sqlalchemy.sql.expression import select
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 timeutils
from nova import test

View File

@ -26,13 +26,14 @@ import shutil
import time
import uuid
from oslo.config import cfg
from nova.api.metadata import base as instance_metadata
from nova.compute import power_state
from nova.compute import task_states
from nova import context
from nova import db
from nova.image import glance
from nova.openstack.common import cfg
from nova import test
from nova.tests import fake_network
from nova.tests.hyperv import db_fakes

View File

@ -15,10 +15,11 @@
# License for the specific language governing permissions and limitations
# under the License.
import fixtures
import os
from nova.openstack.common import cfg
import fixtures
from oslo.config import cfg
from nova.openstack.common import uuidutils
from nova import test
from nova.tests import fake_libvirt_utils

View File

@ -24,14 +24,14 @@ import logging
import os
import time
from nova import test
from oslo.config import cfg
from nova.compute import vm_states
from nova import conductor
from nova import db
from nova.openstack.common import cfg
from nova.openstack.common import importutils
from nova.openstack.common import log
from nova import test
from nova import utils
from nova.virt.libvirt import imagecache
from nova.virt.libvirt import utils as virtutils

View File

@ -27,6 +27,7 @@ import shutil
import tempfile
from lxml import etree
from oslo.config import cfg
from xml.dom import minidom
from nova.api.ec2 import cloud
@ -38,7 +39,6 @@ from nova.compute import vm_states
from nova import context
from nova import db
from nova import exception
from nova.openstack.common import cfg
from nova.openstack.common import fileutils
from nova.openstack.common import importutils
from nova.openstack.common import jsonutils
@ -63,7 +63,6 @@ from nova.virt.libvirt import firewall
from nova.virt.libvirt import imagebackend
from nova.virt.libvirt import utils as libvirt_utils
try:
import libvirt
except ImportError:

View File

@ -15,10 +15,10 @@
# under the License.
from lxml import etree
from oslo.config import cfg
from nova import exception
from nova.network import model as network_model
from nova.openstack.common import cfg
from nova import test
from nova.tests import fakelibvirt
from nova import utils

View File

@ -17,8 +17,9 @@
import os
from oslo.config import cfg
from nova import exception
from nova.openstack.common import cfg
from nova.storage import linuxscsi
from nova import test
from nova.tests import fake_libvirt_utils

View File

@ -23,6 +23,8 @@ import functools
import os
import re
from oslo.config import cfg
from nova.compute import api as compute_api
from nova.compute import instance_types
from nova.compute import power_state
@ -31,7 +33,6 @@ from nova.compute import vm_states
from nova import context
from nova import db
from nova import exception
from nova.openstack.common import cfg
from nova.openstack.common import importutils
from nova.openstack.common import jsonutils
from nova.openstack.common import log as logging

View File

@ -47,8 +47,9 @@ from eventlet.green import subprocess
from eventlet import greenthread
import netaddr
from oslo.config import cfg
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 log as logging

View File

@ -26,6 +26,7 @@ import sys
import eventlet
import eventlet.wsgi
import greenlet
from oslo.config import cfg
from paste import deploy
import routes.middleware
import ssl
@ -33,7 +34,6 @@ import webob.dec
import webob.exc
from nova import exception
from nova.openstack.common import cfg
from nova.openstack.common import log as logging
wsgi_opts = [

View File

@ -1,7 +1,7 @@
[DEFAULT]
# The list of modules to copy from openstack-common
modules=cfg,cliutils,context,db,db.sqlalchemy,excutils,eventlet_backdoor,fileutils,gettextutils,importutils,iniparser,jsonutils,local,lockutils,log,network_utils,notifier,plugin,policy,rootwrap,setup,timeutils,rpc,uuidutils,install_venv_common,flakes,version
modules=cliutils,context,db,db.sqlalchemy,excutils,eventlet_backdoor,fileutils,gettextutils,importutils,jsonutils,local,lockutils,log,network_utils,notifier,plugin,policy,rootwrap,setup,timeutils,rpc,uuidutils,install_venv_common,flakes,version
# The base module to hold the copy of openstack.common
base=nova

View File

@ -20,6 +20,7 @@ import setuptools
from nova.openstack.common import setup as common_setup
requires = common_setup.parse_requirements()
depend_links = common_setup.parse_dependency_links()
project = 'nova'
setuptools.setup(
@ -42,6 +43,7 @@ setuptools.setup(
cmdclass=common_setup.get_cmdclass(),
packages=setuptools.find_packages(exclude=['bin', 'smoketests']),
install_requires=requires,
dependency_links=depend_links,
include_package_data=True,
test_suite='nose.collector',
setup_requires=['setuptools_git>=0.4'],

View File

@ -15,9 +15,6 @@ sitepackages = True
downloadcache = ~/cache/pip
[testenv:pep8]
deps=
pep8==1.3.3
pyflakes
commands = bash tools/run_pep8.sh
[testenv:pylint]