[cfg] Introduce rally.common.cfg

As for config options we are using oslo_config library.
It limits us to override config options based on used deployment/env.

To get control of all options and how they are obtained, let's restrict
usage of oslo_config directly and force everyone to use rally.common.cfg
which has the same interface.

Change-Id: Ia845958b50b62d971f1343c03da2552049aa4363
This commit is contained in:
Andrey Kurilin 2018-02-12 15:41:43 +02:00
parent a62b98fa23
commit 28df7861bb
92 changed files with 186 additions and 122 deletions

View File

@ -794,3 +794,8 @@
# Neutron create loadbalancer poll interval (floating point value)
#neutron_create_loadbalancer_poll_interval = 2.0
# Whether Neutron API is older then OpenStack Newton or not. Based in
# this option, some external fields for identifying resources can be
# applied. (boolean value)
#pre_newton_neutron = false

View File

@ -22,10 +22,10 @@ import time
import jinja2
import jinja2.meta
from oslo_config import cfg
import requests
from requests.packages import urllib3
from rally.common import cfg
from rally.common import logging
from rally.common import objects
from rally.common import opts

View File

@ -25,13 +25,13 @@ import warnings
import decorator
import jsonschema
from oslo_config import cfg
from oslo_utils import encodeutils
import prettytable
import six
import sqlalchemy.exc
from rally import api
from rally.common import cfg
from rally.common import logging
from rally.common.plugin import info
from rally import exceptions

View File

@ -17,10 +17,9 @@ from __future__ import print_function
import re
from oslo_config import cfg
from rally.cli import cliutils
from rally.cli import envutils
from rally.common import cfg
from rally.common import db

63
rally/common/cfg.py Normal file
View File

@ -0,0 +1,63 @@
# All Rights Reserved.
#
# 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.
# NOTE(andreykurilin): In near future we are planning to get rid of
# oslo_config. As a first step, let's hardcode the interface of it
from oslo_config import cfg
from oslo_config import fixture # noqa
CONF = cfg.CONF
ConfigOpts = cfg.ConfigOpts
find_config_dirs = cfg.find_config_dirs
find_config_files = cfg.find_config_files
set_defaults = cfg.set_defaults
# exceptions
ArgsAlreadyParsedError = cfg.ArgsAlreadyParsedError
ConfigDirNotFoundError = cfg.ConfigDirNotFoundError
ConfigFileParseError = cfg.ConfigFileParseError
ConfigFileValueError = cfg.ConfigFileValueError
ConfigFilesNotFoundError = cfg.ConfigFilesNotFoundError
ConfigFilesPermissionDeniedError = cfg.ConfigFilesPermissionDeniedError
DefaultValueError = cfg.DefaultValueError
DuplicateOptError = cfg.DuplicateOptError
Error = cfg.Error
NoSuchGroupError = cfg.NoSuchGroupError
NoSuchOptError = cfg.NoSuchOptError
NotInitializedError = cfg.NotInitializedError
ParseError = cfg.ParseError
RequiredOptError = cfg.RequiredOptError
TemplateSubstitutionError = cfg.TemplateSubstitutionError
# option types
Opt = cfg.Opt
OptGroup = cfg.OptGroup
BoolOpt = cfg.BoolOpt
DeprecatedOpt = cfg.DeprecatedOpt
DictOpt = cfg.DictOpt
FloatOpt = cfg.FloatOpt
HostAddressOpt = cfg.HostAddressOpt
HostnameOpt = cfg.HostnameOpt
IPOpt = cfg.IPOpt
IntOpt = cfg.IntOpt
ListOpt = cfg.ListOpt
MultiOpt = cfg.MultiOpt
MultiStrOpt = cfg.MultiStrOpt
PortOpt = cfg.PortOpt
StrOpt = cfg.StrOpt
SubCommandOpt = cfg.SubCommandOpt
URIOpt = cfg.URIOpt

View File

@ -40,10 +40,10 @@ these objects be simple dictionaries.
"""
from oslo_config import cfg
from oslo_db import api as db_api
from oslo_db import options as db_options
from rally.common import cfg
CONF = cfg.CONF

View File

@ -25,13 +25,13 @@ import alembic
from alembic import config as alembic_config
import alembic.migration as alembic_migration
from alembic import script as alembic_script
from oslo_config import cfg
from oslo_db import exception as db_exc
from oslo_db.sqlalchemy import session as db_session
import six
import sqlalchemy as sa
import sqlalchemy.orm # noqa
from rally.common import cfg
from rally.common.db.sqlalchemy import models
from rally import consts
from rally import exceptions

View File

@ -16,11 +16,12 @@
import functools
import traceback
from oslo_config import cfg
from oslo_log import handlers
from oslo_log import log as oslogging
import six
from rally.common import cfg
log = __import__("logging")

View File

@ -12,8 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from rally.common import cfg
from rally.common import logging
from rally.plugins.openstack.cfg import opts as openstack_opts
from rally.task import engine

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from rally.common import cfg
OPTS = {"openstack": [
cfg.FloatOpt("cinder_volume_create_prepoll_delay",

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from rally.common import cfg
OPTS = {"openstack": [
cfg.IntOpt("resource_deletion_timeout",

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from rally.common import cfg
OPTS = {"openstack": [
cfg.FloatOpt(

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from rally.common import cfg
OPTS = {"openstack": [
cfg.FloatOpt("glance_image_delete_timeout",

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from rally.common import cfg
OPTS = {"openstack": [
cfg.FloatOpt("heat_stack_create_prepoll_delay",

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from rally.common import cfg
OPTS = {"openstack": [
cfg.FloatOpt("ironic_node_create_poll_interval",

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from rally.common import cfg
OPTS = {"openstack": [
cfg.IntOpt("roles_context_resource_management_workers",

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from rally.common import cfg
OPTS = {"openstack": [

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from rally.common import cfg
OPTS = {"openstack": [
cfg.FloatOpt("magnum_cluster_create_prepoll_delay",

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from rally.common import cfg
OPTS = {"openstack": [
cfg.FloatOpt(

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from rally.common import cfg
OPTS = {"openstack": [
cfg.IntOpt(

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from rally.common import cfg
OPTS = {"openstack": [
cfg.FloatOpt(

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from rally.common import cfg
OPTS = {"openstack": [
cfg.IntOpt("murano_deploy_environment_timeout",

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from rally.common import cfg
OPTS = {"openstack": [
cfg.FloatOpt("neutron_create_loadbalancer_timeout",

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from rally.common import cfg
OPTS = {"openstack": [
# prepoll delay, timeout, poll interval

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from rally.common import cfg
OPTS = {

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from rally.common import cfg
OPTS = {"openstack": [
cfg.BoolOpt("enable_profiler",

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from rally.common import cfg
OPTS = {"openstack": [
cfg.IntOpt("sahara_cluster_create_timeout",

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from rally.common import cfg
OPTS = {"openstack": [
cfg.FloatOpt("senlin_action_timeout",

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from rally.common import cfg
OPTS = {"openstack": [
cfg.StrOpt("img_url",

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from rally.common import cfg
OPTS = {"openstack": [
cfg.FloatOpt("vm_ping_poll_interval",

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from rally.common import cfg
OPTS = {"openstack": [
cfg.FloatOpt("watcher_audit_launch_poll_interval",

View File

@ -14,8 +14,7 @@
# under the License.
from oslo_config import cfg
from rally.common import cfg
from rally.task import utils
CONF = cfg.CONF

View File

@ -16,9 +16,9 @@
from boto import exception as boto_exception
from neutronclient.common import exceptions as neutron_exceptions
from novaclient import exceptions as nova_exc
from oslo_config import cfg
from saharaclient.api import base as saharaclient_base
from rally.common import cfg
from rally.common import logging
from rally.plugins.openstack.cleanup import base
from rally.plugins.openstack.services.identity import identity

View File

@ -12,8 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from rally.common import cfg
from rally.common import logging
from rally.common import utils as rutils
from rally.common import validation

View File

@ -13,9 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from rally.common import broker
from rally.common import cfg
from rally.common import logging
from rally.common import validation
from rally import consts

View File

@ -16,9 +16,8 @@
import collections
import uuid
from oslo_config import cfg
from rally.common import broker
from rally.common import cfg
from rally.common import logging
from rally.common import utils as rutils
from rally.common import validation

View File

@ -13,8 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from rally.common import cfg
from rally.common import utils
from rally.common import validation
from rally import consts as rally_consts

View File

@ -13,8 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from rally.common import cfg
from rally.common import logging
from rally.common import utils
from rally.common import validation

View File

@ -13,8 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from rally.common import cfg
from rally.common import utils
from rally.common import validation
from rally import consts as rally_consts

View File

@ -13,8 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from rally.common import cfg
from rally.common import utils as rutils
from rally.common import validation
from rally import consts

View File

@ -16,10 +16,10 @@
import abc
import os
from oslo_config import cfg
from six.moves.urllib import parse
from rally.cli import envutils
from rally.common import cfg
from rally.common import logging
from rally.common.plugin import plugin
from rally.common import utils

View File

@ -16,8 +16,7 @@ import copy
import json
import traceback
from oslo_config import cfg
from rally.common import cfg
from rally.common import logging
from rally.env import platform
from rally.plugins.openstack import osclients

View File

@ -16,8 +16,9 @@
import functools
import random
from oslo_config import cfg
from osprofiler import profiler
from rally.common import cfg
from rally.common.plugin import plugin
from rally.plugins.openstack import osclients
from rally.task import context

View File

@ -15,8 +15,7 @@
import random
from oslo_config import cfg
from rally.common import cfg
from rally.common import logging
from rally import exceptions
from rally.plugins.openstack import scenario

View File

@ -13,8 +13,7 @@
# under the License.
from oslo_config import cfg
from rally.common import cfg
from rally.plugins.openstack import scenario
from rally.task import atomic
from rally.task import utils

View File

@ -13,8 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from rally.common import cfg
from rally.common import logging
from rally.plugins.openstack import scenario
from rally.plugins.openstack.wrappers import glance as glance_wrapper

View File

@ -13,9 +13,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import requests
from rally.common import cfg
from rally.common import logging
from rally import exceptions
from rally.plugins.openstack import scenario

View File

@ -15,8 +15,7 @@
import string
from oslo_config import cfg
from rally.common import cfg
from rally.plugins.openstack import scenario
from rally.task import atomic
from rally.task import utils

View File

@ -17,12 +17,12 @@ import random
import string
import time
from oslo_config import cfg
from kubernetes import client as k8s_config
from kubernetes.client import api_client
from kubernetes.client.apis import core_v1_api
from kubernetes.client.rest import ApiException
from rally.common import cfg
from rally.common import utils as common_utils
from rally import exceptions
from rally.plugins.openstack import scenario

View File

@ -15,8 +15,7 @@
import random
from oslo_config import cfg
from rally.common import cfg
from rally import exceptions
from rally.plugins.openstack.context.manila import consts
from rally.plugins.openstack import scenario

View File

@ -14,9 +14,9 @@
# under the License.
from oslo_config import cfg
import yaml
from rally.common import cfg
from rally.plugins.openstack import scenario
from rally.task import atomic
from rally.task import utils

View File

@ -16,8 +16,7 @@ import random
import time
import uuid
from oslo_config import cfg
from rally.common import cfg
from rally.plugins.openstack import scenario
from rally.task import atomic

View File

@ -19,9 +19,9 @@ import tempfile
import uuid
import zipfile
from oslo_config import cfg
import yaml
from rally.common import cfg
from rally.common import fileutils
from rally.common import utils as common_utils
from rally.plugins.openstack import scenario

View File

@ -15,8 +15,7 @@
import random
from oslo_config import cfg
from rally.common import cfg
from rally.common import logging
from rally import exceptions
from rally.plugins.openstack import scenario

View File

@ -14,8 +14,7 @@
# under the License.
from oslo_config import cfg
from rally.common import cfg
from rally.common import logging
from rally import exceptions
from rally.plugins.openstack import scenario

View File

@ -15,10 +15,10 @@
import random
from oslo_config import cfg
from oslo_utils import uuidutils
from saharaclient.api import base as sahara_base
from rally.common import cfg
from rally.common import logging
from rally.common import utils as rutils
from rally import consts

View File

@ -10,8 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from rally.common import cfg
from rally import exceptions
from rally.plugins.openstack import scenario
from rally.task import atomic

View File

@ -18,9 +18,9 @@ import subprocess
import sys
import netaddr
from oslo_config import cfg
import six
from rally.common import cfg
from rally.common import logging
from rally.common import sshutils
from rally.plugins.openstack.scenarios.nova import utils as nova_utils

View File

@ -10,8 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from rally.common import cfg
from rally.plugins.openstack import scenario
from rally.task import atomic
from rally.task import utils

View File

@ -11,8 +11,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from rally.common import cfg
from rally.common import utils as common_utils
from rally.task import atomic
from rally.task import utils

View File

@ -14,8 +14,7 @@
import os
from oslo_config import cfg
from rally.common import cfg
from rally.common import utils as rutils
from rally.plugins.openstack import service
from rally.plugins.openstack.services.image import glance_common

View File

@ -15,9 +15,9 @@
import os
import time
from oslo_config import cfg
import requests
from rally.common import cfg
from rally.common import utils as rutils
from rally.plugins.openstack import service
from rally.plugins.openstack.services.image import glance_common

View File

@ -11,10 +11,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from rally.common import cfg
from rally import exceptions
from rally.task import service
from oslo_config import cfg
CONF = cfg.CONF

View File

@ -12,8 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from rally.common import cfg
from rally.task import service

View File

@ -16,10 +16,10 @@
import inspect
import os
from oslo_config import cfg
import six
from six.moves import configparser
from rally.common import cfg
from rally.common import logging
from rally import exceptions
from rally.verification import utils

View File

@ -17,15 +17,16 @@ import abc
import os
import time
from glanceclient import exc as glance_exc
import requests
import six
from rally.common import cfg
from rally.common import logging
from rally.common import utils as rutils
from rally import exceptions
from rally.task import utils
from glanceclient import exc as glance_exc
from oslo_config import cfg
import requests
import six
LOG = logging.getLogger(__name__)

View File

@ -16,9 +16,9 @@
import abc
import netaddr
from oslo_config import cfg
import six
from rally.common import cfg
from rally.common import logging
from rally.common import utils
from rally import consts

View File

@ -16,9 +16,9 @@
import abc
import collections
from oslo_config import cfg
import six
from rally.common import cfg
from rally.common import logging
from rally.common.plugin import plugin
from rally.common import utils

View File

@ -20,8 +20,8 @@ import time
import traceback
import jsonschema
from oslo_config import cfg
from rally.common import cfg
from rally.common import logging
from rally.common import objects
from rally.common import utils

View File

@ -16,10 +16,8 @@
import copy
import random
from oslo_config import cfg
from rally.common import cfg
from rally.common import logging
from rally.common.objects import task # noqa
from rally.common.plugin import plugin
from rally.common import utils
from rally.common import validation

View File

@ -177,6 +177,25 @@ def check_import_of_logging(logical_line, physical_line, filename):
"use `rally.common.logging` instead.")
@skip_ignored_lines
def check_import_of_config(logical_line, physical_line, filename):
"""Check correctness import of config module
N311
"""
excluded_files = ["./rally/common/cfg.py"]
forbidden_imports = ["from oslo_config",
"import oslo_config"]
if filename not in excluded_files:
for forbidden_import in forbidden_imports:
if logical_line.startswith(forbidden_import):
yield (0, "N311 Wrong module for config is imported. Please "
"use `rally.common.cfg` instead.")
@skip_ignored_lines
def no_use_conf_debug_check(logical_line, physical_line, filename):
"""Check for "cfg.CONF.debug"
@ -572,8 +591,7 @@ def check_opts_import_path(logical_line, physical_line, filename):
N342
"""
excluded_files = ["./rally/osclients.py",
"./rally/task/engine.py",
excluded_files = ["./rally/task/engine.py",
"./rally/task/context.py",
"./rally/task/scenario.py",
"./rally/common/opts.py"]
@ -590,6 +608,7 @@ def check_opts_import_path(logical_line, physical_line, filename):
def factory(register):
register(check_assert_methods_from_mock)
register(check_import_of_logging)
register(check_import_of_config)
register(no_use_conf_debug_check)
register(assert_true_instance)
register(assert_equal_type)

View File

@ -16,7 +16,6 @@
import ddt
from keystoneclient import exceptions as keystone_exc
import mock
from oslo_config import cfg
import six
import sqlalchemy.exc
@ -24,6 +23,7 @@ from rally.cli import cliutils
from rally.cli.commands import deployment
from rally.cli.commands import task
from rally.cli.commands import verify
from rally.common import cfg
from rally import exceptions
from tests.unit import test

View File

@ -28,8 +28,8 @@ from alembic import command
from alembic import config as alembic_config
from alembic import migration
from alembic import script as alembic_script
from oslo_config import cfg
from rally.common import cfg
import rally.common.db.sqlalchemy.api as s_api
from rally.common import logging

View File

@ -13,8 +13,8 @@
# under the License.
import mock
from oslo_config import cfg
from rally.common import cfg
from rally import exceptions
from rally.plugins.openstack.context.sahara import sahara_cluster
from rally.plugins.openstack.scenarios.sahara import utils as sahara_utils

View File

@ -14,8 +14,8 @@
# under the License.
import mock
from oslo_config import cfg
from rally.common import cfg
from rally import exceptions
from rally.plugins.openstack import osclients
from rally.plugins.openstack.scenarios.cinder import utils

View File

@ -13,8 +13,8 @@
# under the License.
import mock
from oslo_config import cfg
from rally.common import cfg
from rally.plugins.openstack.scenarios.ec2 import utils
from tests.unit import test

View File

@ -14,8 +14,8 @@
# under the License.
import mock
from oslo_config import cfg
from rally.common import cfg
from rally.plugins.openstack.scenarios.murano import utils
from tests.unit import test

View File

@ -15,8 +15,8 @@
import ddt
import mock
from oslo_config import cfg
from rally.common import cfg
from rally import exceptions as rally_exceptions
from rally.plugins.openstack.scenarios.nova import utils
from tests.unit import fakes

View File

@ -14,8 +14,8 @@
# under the License.
import mock
from oslo_config import cfg
from rally.common import cfg
from rally.plugins.openstack.scenarios.sahara import jobs
from tests.unit import test

View File

@ -14,10 +14,10 @@
# under the License.
import mock
from oslo_config import cfg
from oslo_utils import uuidutils
from saharaclient.api import base as sahara_base
from rally.common import cfg
from rally import consts
from rally import exceptions
from rally.plugins.openstack.scenarios.sahara import utils

View File

@ -11,8 +11,8 @@
# under the License.
import mock
from oslo_config import cfg
from rally.common import cfg
from rally import exceptions
from rally.plugins.openstack.scenarios.senlin import utils
from tests.unit import test

View File

@ -18,8 +18,8 @@ import subprocess
import mock
import netaddr
from oslo_config import cfg
from rally.common import cfg
from rally.plugins.openstack.scenarios.vm import utils
from tests.unit import test

View File

@ -14,8 +14,8 @@
# under the License.
import mock
from oslo_config import cfg
from rally.common import cfg
from rally.plugins.openstack.scenarios.watcher import utils
from tests.unit import test

View File

@ -16,8 +16,8 @@ import uuid
import ddt
import mock
from oslo_config import cfg
from rally.common import cfg
from rally import exceptions
from rally.plugins.openstack import service
from rally.plugins.openstack.services.storage import block

View File

@ -13,8 +13,8 @@
# under the License.
import mock
from oslo_config import cfg
from rally.common import cfg
from rally.plugins.openstack.services.storage import cinder_v1
from tests.unit import fakes
from tests.unit import test

View File

@ -13,8 +13,8 @@
# under the License.
import mock
from oslo_config import cfg
from rally.common import cfg
from rally.plugins.openstack.services.storage import cinder_v2
from tests.unit import fakes
from tests.unit import test

View File

@ -15,8 +15,8 @@
import ddt
import mock
from oslo_config import cfg
from rally.common import cfg
from rally import consts
from rally import exceptions
from rally import osclients as deprecated_osclients # noqa

View File

@ -15,8 +15,8 @@
import ddt
import mock
from oslo_config import cfg
from rally.common import cfg
from rally.plugins.openstack import osclients
from rally.plugins.openstack.verification.tempest import config
from tests.unit import fakes

View File

@ -17,9 +17,9 @@ import os
import ddt
import mock
from oslo_config import cfg
import requests
from rally.common import cfg
from rally import exceptions
from rally.plugins.openstack.verification.tempest import config
from rally.plugins.openstack.verification.tempest import context

View File

@ -18,8 +18,8 @@ import tempfile
import ddt
from glanceclient import exc as glance_exc
import mock
from oslo_config import cfg
from rally.common import cfg
from rally import exceptions
from rally.plugins.openstack.wrappers import glance as glance_wrapper
from tests.unit import test

View File

@ -18,15 +18,15 @@ import os
import uuid
import mock
from oslo_config import fixture
from oslotest import base
from rally.common import cfg
from rally.common import db
from rally import plugins
from tests.unit import fakes
class DatabaseFixture(fixture.Config):
class DatabaseFixture(cfg.fixture.Config):
"""Create clean DB before starting test."""
def setUp(self):
super(DatabaseFixture, self).setUp()

View File

@ -20,9 +20,9 @@ import os
import ddt
import mock
from oslo_config import cfg
from rally import api
from rally.common import cfg
from rally.common import objects
from rally import consts
from rally import exceptions