Merge "Move oslo.config to oslo_config namespace"
This commit is contained in:
commit
ae5a7d5ea3
|
@ -15,7 +15,7 @@
|
|||
# under the License.
|
||||
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
import paste.urlmap
|
||||
|
||||
from cinder.i18n import _LW
|
||||
|
|
|
@ -18,7 +18,7 @@ import os
|
|||
import re
|
||||
import urllib
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
import six.moves.urllib.parse as urlparse
|
||||
import webob
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ It can't be called 'extensions' because that causes namespacing problems.
|
|||
|
||||
"""
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder.api import extensions
|
||||
from cinder.openstack.common import log as logging
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
|
||||
from xml.parsers import expat
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import timeutils
|
||||
from oslo_config import cfg
|
||||
import webob.exc
|
||||
|
||||
from cinder.api import extensions
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
# under the License.
|
||||
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import timeutils
|
||||
from oslo_config import cfg
|
||||
import webob.exc
|
||||
|
||||
from cinder.api import extensions
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
from webob import exc
|
||||
|
||||
from cinder.api import extensions
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
|
||||
import os
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import importutils
|
||||
from oslo_config import cfg
|
||||
import webob.dec
|
||||
import webob.exc
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@ Common Auth Middleware.
|
|||
|
||||
import os
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo_config import cfg
|
||||
import webob.dec
|
||||
import webob.exc
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ Request Body limiting middleware.
|
|||
"""
|
||||
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
import webob.dec
|
||||
import webob.exc
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
import datetime
|
||||
|
||||
from lxml import etree
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder.api.openstack import wsgi
|
||||
from cinder.api.views import versions as views_versions
|
||||
|
|
|
@ -19,8 +19,8 @@ Handles all requests relating to the volume backups service.
|
|||
|
||||
|
||||
from eventlet import greenthread
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import excutils
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder.backup import rpcapi as backup_rpcapi
|
||||
from cinder import context
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
|
||||
import abc
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo_config import cfg
|
||||
import six
|
||||
|
||||
from cinder.db import base
|
||||
|
|
|
@ -49,10 +49,10 @@ import subprocess
|
|||
import time
|
||||
|
||||
import eventlet
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import encodeutils
|
||||
from oslo.utils import excutils
|
||||
from oslo.utils import units
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder.backup.driver import BackupDriver
|
||||
from cinder import exception
|
||||
|
|
|
@ -37,10 +37,10 @@ import os
|
|||
import socket
|
||||
|
||||
import eventlet
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import excutils
|
||||
from oslo.utils import timeutils
|
||||
from oslo.utils import units
|
||||
from oslo_config import cfg
|
||||
import six
|
||||
from swiftclient import client as swift
|
||||
|
||||
|
|
|
@ -29,8 +29,8 @@ import json
|
|||
import os
|
||||
import stat
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_concurrency import processutils
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder.backup.driver import BackupDriver
|
||||
from cinder import exception
|
||||
|
|
|
@ -33,10 +33,10 @@ Volume backups can be created, restored, deleted and listed.
|
|||
|
||||
"""
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo import messaging
|
||||
from oslo.utils import excutils
|
||||
from oslo.utils import importutils
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder.backup import driver
|
||||
from cinder.backup import rpcapi as backup_rpcapi
|
||||
|
|
|
@ -18,8 +18,8 @@ Client side of the volume backup RPC API.
|
|||
"""
|
||||
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo import messaging
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder.openstack.common import log as logging
|
||||
from cinder import rpc
|
||||
|
@ -96,4 +96,4 @@ class BackupAPI(object):
|
|||
'host': host})
|
||||
cctxt = self.client.prepare(server=host)
|
||||
return cctxt.cast(ctxt, 'reset_status', backup_id=backup_id,
|
||||
status=status)
|
||||
status=status)
|
||||
|
|
|
@ -33,7 +33,7 @@ import warnings
|
|||
|
||||
warnings.simplefilter('once', DeprecationWarning)
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder import i18n
|
||||
i18n.enable_lazy()
|
||||
|
|
|
@ -25,7 +25,7 @@ import warnings
|
|||
|
||||
warnings.simplefilter('once', DeprecationWarning)
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder import i18n
|
||||
i18n.enable_lazy()
|
||||
|
|
|
@ -23,7 +23,7 @@ import warnings
|
|||
warnings.simplefilter('once', DeprecationWarning)
|
||||
|
||||
import eventlet
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
eventlet.monkey_patch()
|
||||
|
||||
|
|
|
@ -61,8 +61,8 @@ import warnings
|
|||
|
||||
warnings.simplefilter('once', DeprecationWarning)
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo import messaging
|
||||
from oslo_config import cfg
|
||||
from oslo_db.sqlalchemy import migration
|
||||
|
||||
from cinder import i18n
|
||||
|
|
|
@ -25,7 +25,7 @@ import warnings
|
|||
|
||||
warnings.simplefilter('once', DeprecationWarning)
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder import i18n
|
||||
i18n.enable_lazy()
|
||||
|
|
|
@ -33,7 +33,7 @@ import warnings
|
|||
|
||||
warnings.simplefilter('once', DeprecationWarning)
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder import i18n
|
||||
i18n.enable_lazy()
|
||||
|
|
|
@ -41,7 +41,7 @@ import warnings
|
|||
|
||||
warnings.simplefilter('once', DeprecationWarning)
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder import i18n
|
||||
i18n.enable_lazy()
|
||||
|
|
|
@ -27,7 +27,7 @@ stepping stone.
|
|||
|
||||
import socket
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder.i18n import _
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ from novaclient import service_catalog
|
|||
from novaclient.v1_1 import client as nova_client
|
||||
from novaclient.v1_1.contrib import assisted_volume_snapshots
|
||||
from novaclient.v1_1.contrib import list_extensions
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
from requests import exceptions as request_exceptions
|
||||
|
||||
from cinder import context as ctx
|
||||
|
|
|
@ -20,9 +20,9 @@ Handles all requests relating to consistency groups.
|
|||
|
||||
import functools
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import excutils
|
||||
from oslo.utils import timeutils
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder.db import base
|
||||
from cinder import exception
|
||||
|
|
|
@ -41,7 +41,7 @@ these objects be simple dictionaries.
|
|||
|
||||
"""
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
from oslo_db import concurrency as db_concurrency
|
||||
from oslo_db import options as db_options
|
||||
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
"""Base class for classes that need modular database access."""
|
||||
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import importutils
|
||||
from oslo_config import cfg
|
||||
|
||||
|
||||
db_driver_opt = cfg.StrOpt('db_driver',
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
import os
|
||||
import threading
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
from oslo_db import options
|
||||
from stevedore import driver
|
||||
|
||||
|
|
|
@ -26,8 +26,8 @@ import time
|
|||
import uuid
|
||||
import warnings
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import timeutils
|
||||
from oslo_config import cfg
|
||||
from oslo_db import exception as db_exc
|
||||
from oslo_db import options
|
||||
from oslo_db.sqlalchemy import session as db_session
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
import datetime
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
from sqlalchemy import MetaData, Table
|
||||
|
||||
from cinder.i18n import _LE, _LI
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
import datetime
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
from sqlalchemy import MetaData, Table
|
||||
|
||||
from cinder.i18n import _
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
SQLAlchemy models for cinder data.
|
||||
"""
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import timeutils
|
||||
from oslo_config import cfg
|
||||
from oslo_db.sqlalchemy import models
|
||||
from sqlalchemy import Column, Integer, String, Text, schema
|
||||
from sqlalchemy.ext.declarative import declarative_base
|
||||
|
|
|
@ -24,7 +24,7 @@ SHOULD include dedicated exception logging.
|
|||
|
||||
import sys
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
import six
|
||||
import webob.exc
|
||||
|
||||
|
|
|
@ -43,7 +43,8 @@ no_audit_log = re.compile(r"(.)*LOG\.audit(.)*")
|
|||
|
||||
# NOTE(jsbryant): When other oslo libraries switch over non-namespaced
|
||||
# imports, we will need to add them to the regex below.
|
||||
oslo_namespace_imports = re.compile(r"from[\s]*oslo[.](concurrency|db)")
|
||||
oslo_namespace_imports = re.compile(r"from[\s]*oslo[.](concurrency|db"
|
||||
"|config)")
|
||||
|
||||
|
||||
def no_vi_headers(physical_line, line_number, lines):
|
||||
|
|
|
@ -27,9 +27,9 @@ import sys
|
|||
import time
|
||||
|
||||
import glanceclient.exc
|
||||
from oslo.config import cfg
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo.utils import timeutils
|
||||
from oslo_config import cfg
|
||||
import six.moves.urllib.parse as urlparse
|
||||
|
||||
from cinder import exception
|
||||
|
|
|
@ -28,10 +28,10 @@ import contextlib
|
|||
import os
|
||||
import tempfile
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import timeutils
|
||||
from oslo.utils import units
|
||||
from oslo_concurrency import processutils
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder import exception
|
||||
from cinder.i18n import _
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import importutils
|
||||
from oslo_config import cfg
|
||||
|
||||
keymgr_opts = [
|
||||
cfg.StrOpt('api_class',
|
||||
|
|
|
@ -24,8 +24,8 @@ import binascii
|
|||
from barbicanclient import client as barbican_client
|
||||
from keystoneclient.auth import identity
|
||||
from keystoneclient import session
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import excutils
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder import exception
|
||||
from cinder.i18n import _, _LE
|
||||
|
|
|
@ -33,7 +33,7 @@ encryption key so *any* volume can be decrypted once the fixed key is known.
|
|||
|
||||
import array
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder import exception
|
||||
from cinder.i18n import _, _LW
|
||||
|
|
|
@ -19,7 +19,7 @@ Key manager API
|
|||
|
||||
import abc
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
import six
|
||||
|
||||
encryption_opts = [
|
||||
|
|
|
@ -52,8 +52,8 @@ This module provides Manager, a base class for managers.
|
|||
"""
|
||||
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo import messaging
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder.db import base
|
||||
from cinder.openstack.common import log as logging
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"""Policy Engine For Cinder"""
|
||||
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder import exception
|
||||
from cinder.openstack.common import policy
|
||||
|
|
|
@ -19,9 +19,9 @@
|
|||
|
||||
import datetime
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import importutils
|
||||
from oslo.utils import timeutils
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder import context
|
||||
from cinder import db
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
# under the License.
|
||||
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import importutils
|
||||
from oslo_config import cfg
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
|
|
@ -17,7 +17,7 @@ Handles all requests relating to volume replication.
|
|||
"""
|
||||
import functools
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder.db import base
|
||||
from cinder import exception
|
||||
|
|
|
@ -26,9 +26,9 @@ __all__ = [
|
|||
'TRANSPORT_ALIASES',
|
||||
]
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo import messaging
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo_config import cfg
|
||||
from osprofiler import profiler
|
||||
|
||||
import cinder.context
|
||||
|
|
|
@ -19,9 +19,9 @@
|
|||
Scheduler base class that all Schedulers should inherit from
|
||||
"""
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import importutils
|
||||
from oslo.utils import timeutils
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder import db
|
||||
from cinder.i18n import _
|
||||
|
|
|
@ -20,7 +20,7 @@ You can customize this scheduler by specifying your own volume Filters and
|
|||
Weighing Functions.
|
||||
"""
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder import exception
|
||||
from cinder.i18n import _, _LW
|
||||
|
|
|
@ -19,8 +19,8 @@ Manage hosts in the current zone.
|
|||
|
||||
import UserDict
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import timeutils
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder import db
|
||||
from cinder import exception
|
||||
|
|
|
@ -19,10 +19,10 @@
|
|||
Scheduler Service
|
||||
"""
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo import messaging
|
||||
from oslo.utils import excutils
|
||||
from oslo.utils import importutils
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder import context
|
||||
from cinder import db
|
||||
|
|
|
@ -16,9 +16,9 @@
|
|||
Client side of the scheduler manager RPC API.
|
||||
"""
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo import messaging
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder import rpc
|
||||
|
||||
|
|
|
@ -24,8 +24,8 @@ import datetime
|
|||
import json
|
||||
import os
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import timeutils
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder.i18n import _LE
|
||||
from cinder.openstack.common import log as logging
|
||||
|
|
|
@ -50,7 +50,7 @@ With that, FilterScheduler behaves mostly the same as Chance/SimpleScheduler,
|
|||
with additional benefits of supporting volume types, volume encryption, QoS.
|
||||
"""
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
simple_scheduler_opts = [
|
||||
cfg.IntOpt("max_gigabytes",
|
||||
|
|
|
@ -35,7 +35,7 @@ and the weighing has the opposite effect of the default.
|
|||
|
||||
import math
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder.openstack.common.scheduler import weights
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ number and the weighing has the opposite effect of the default.
|
|||
"""
|
||||
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder import db
|
||||
from cinder.openstack.common import log as logging
|
||||
|
|
|
@ -22,10 +22,10 @@ import inspect
|
|||
import os
|
||||
import random
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo import messaging
|
||||
from oslo.utils import importutils
|
||||
from oslo_concurrency import processutils
|
||||
from oslo_config import cfg
|
||||
from oslo_db import exception as db_exc
|
||||
import osprofiler.notifier
|
||||
from osprofiler import profiler
|
||||
|
|
|
@ -22,7 +22,7 @@ import os
|
|||
import string
|
||||
|
||||
from eventlet import pools
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
import paramiko
|
||||
|
||||
from cinder import exception
|
||||
|
|
|
@ -29,12 +29,12 @@ import uuid
|
|||
import fixtures
|
||||
import mock
|
||||
import mox
|
||||
from oslo.config import cfg
|
||||
from oslo.config import fixture as config_fixture
|
||||
from oslo.messaging import conffixture as messaging_conffixture
|
||||
from oslo.utils import strutils
|
||||
from oslo.utils import timeutils
|
||||
from oslo_concurrency import lockutils
|
||||
from oslo_config import cfg
|
||||
from oslo_config import fixture as config_fixture
|
||||
import stubout
|
||||
import testtools
|
||||
|
||||
|
|
|
@ -13,11 +13,11 @@
|
|||
import ast
|
||||
|
||||
import fixtures
|
||||
from oslo.config import cfg
|
||||
from oslo.config import fixture as config_fixture
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo.utils import timeutils
|
||||
from oslo_concurrency import lockutils
|
||||
from oslo_config import cfg
|
||||
from oslo_config import fixture as config_fixture
|
||||
import webob
|
||||
from webob import exc
|
||||
|
||||
|
|
|
@ -17,9 +17,9 @@ import json
|
|||
import uuid
|
||||
|
||||
import mock
|
||||
from oslo.config import cfg
|
||||
from oslo import messaging
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo_config import cfg
|
||||
import webob
|
||||
|
||||
from cinder.api.contrib import volume_actions
|
||||
|
|
|
@ -19,7 +19,7 @@ Tests for volume replication API code.
|
|||
import json
|
||||
|
||||
import mock
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
import webob
|
||||
|
||||
from cinder import context
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
import six
|
||||
import webob
|
||||
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
|
||||
import iso8601
|
||||
from lxml import etree
|
||||
from oslo.config import cfg
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo_config import cfg
|
||||
import webob
|
||||
|
||||
from cinder.api import extensions
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
|
||||
import uuid
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo_config import cfg
|
||||
import webob
|
||||
|
||||
from cinder.api import extensions
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
|
||||
import uuid
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo_config import cfg
|
||||
import webob
|
||||
|
||||
from cinder.api import extensions
|
||||
|
|
|
@ -17,7 +17,7 @@ import datetime
|
|||
|
||||
from lxml import etree
|
||||
import mock
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
import webob
|
||||
|
||||
from cinder.api import extensions
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
|
||||
import uuid
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo_config import cfg
|
||||
import webob
|
||||
|
||||
from cinder.api import extensions
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
|
||||
import uuid
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo_config import cfg
|
||||
import webob
|
||||
|
||||
from cinder.api import extensions
|
||||
|
|
|
@ -18,7 +18,7 @@ import datetime
|
|||
|
||||
from lxml import etree
|
||||
import mock
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
import six
|
||||
import six.moves.urllib.parse as urlparse
|
||||
import webob
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
import os
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
"""Tests for volume name_id."""
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder import context
|
||||
from cinder import db
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
# under the License.
|
||||
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
|
|
@ -18,7 +18,7 @@ import datetime
|
|||
|
||||
import glanceclient.exc
|
||||
import mock
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder import context
|
||||
from cinder import exception
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# under the License.
|
||||
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder.openstack.common import log as logging
|
||||
from cinder.tests.integrated import integrated_helpers
|
||||
|
|
|
@ -22,7 +22,7 @@ import base64
|
|||
import binascii
|
||||
|
||||
import mock
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder import exception
|
||||
from cinder.keymgr import barbican
|
||||
|
|
|
@ -19,7 +19,7 @@ Test cases for the conf key manager.
|
|||
|
||||
import array
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder import context
|
||||
from cinder import exception
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
# under the License.
|
||||
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
|
|
@ -18,7 +18,7 @@ Tests For Allocated Capacity Weigher.
|
|||
"""
|
||||
|
||||
import mock
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder import context
|
||||
from cinder.openstack.common.scheduler.weights import HostWeightHandler
|
||||
|
|
|
@ -17,7 +17,7 @@ Tests For Capacity Weigher.
|
|||
"""
|
||||
|
||||
import mock
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder import context
|
||||
from cinder.openstack.common.scheduler.weights import HostWeightHandler
|
||||
|
|
|
@ -17,8 +17,8 @@ Tests For HostManager
|
|||
"""
|
||||
|
||||
import mock
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import timeutils
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder import exception
|
||||
from cinder.openstack.common.scheduler import filters
|
||||
|
|
|
@ -20,7 +20,7 @@ Unit Tests for cinder.scheduler.rpcapi
|
|||
import copy
|
||||
|
||||
import mock
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder import context
|
||||
from cinder.scheduler import rpcapi as scheduler_rpcapi
|
||||
|
|
|
@ -19,7 +19,7 @@ Tests For Scheduler
|
|||
"""
|
||||
|
||||
import mock
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder import context
|
||||
from cinder import db
|
||||
|
|
|
@ -17,7 +17,7 @@ Tests For Volume Number Weigher.
|
|||
"""
|
||||
|
||||
import mock
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder import context
|
||||
from cinder.db.sqlalchemy import api
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import timeutils
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder import exception
|
||||
from cinder import test
|
||||
|
|
|
@ -20,9 +20,9 @@ Tests for Backup code.
|
|||
import tempfile
|
||||
|
||||
import mock
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import importutils
|
||||
from oslo.utils import timeutils
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder.backup import manager
|
||||
from cinder import context
|
||||
|
|
|
@ -24,7 +24,7 @@ import tempfile
|
|||
import zlib
|
||||
|
||||
import mock
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
from swiftclient import client as swift
|
||||
|
||||
from cinder.backup.drivers.swift import SwiftBackupDriver
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# under the License.
|
||||
|
||||
import mock
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder import context
|
||||
from cinder.db.sqlalchemy import api
|
||||
|
|
|
@ -16,7 +16,7 @@ import StringIO
|
|||
import sys
|
||||
|
||||
import mock
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
import rtslib
|
||||
|
||||
from cinder.cmd import all as cinder_all
|
||||
|
@ -636,7 +636,7 @@ class TestCinderManageCmd(test.TestCase):
|
|||
service_get_all.assert_called_with(ctxt)
|
||||
service_is_up.assert_called_with(service)
|
||||
|
||||
@mock.patch('oslo.config.cfg.ConfigOpts.register_cli_opt')
|
||||
@mock.patch('oslo_config.cfg.ConfigOpts.register_cli_opt')
|
||||
def test_main_argv_lt_2(self, register_cli_opt):
|
||||
script_name = 'cinder-manage'
|
||||
sys.argv = [script_name]
|
||||
|
@ -647,9 +647,9 @@ class TestCinderManageCmd(test.TestCase):
|
|||
self.assertTrue(register_cli_opt.called)
|
||||
self.assertEqual(exit.code, 2)
|
||||
|
||||
@mock.patch('oslo.config.cfg.ConfigOpts.__call__')
|
||||
@mock.patch('oslo_config.cfg.ConfigOpts.__call__')
|
||||
@mock.patch('cinder.openstack.common.log.setup')
|
||||
@mock.patch('oslo.config.cfg.ConfigOpts.register_cli_opt')
|
||||
@mock.patch('oslo_config.cfg.ConfigOpts.register_cli_opt')
|
||||
def test_main_sudo_failed(self, register_cli_opt, log_setup,
|
||||
config_opts_call):
|
||||
script_name = 'cinder-manage'
|
||||
|
@ -666,8 +666,8 @@ class TestCinderManageCmd(test.TestCase):
|
|||
self.assertFalse(log_setup.called)
|
||||
self.assertEqual(exit.code, 2)
|
||||
|
||||
@mock.patch('oslo.config.cfg.ConfigOpts.__call__')
|
||||
@mock.patch('oslo.config.cfg.ConfigOpts.register_cli_opt')
|
||||
@mock.patch('oslo_config.cfg.ConfigOpts.__call__')
|
||||
@mock.patch('oslo_config.cfg.ConfigOpts.register_cli_opt')
|
||||
def test_main(self, register_cli_opt, config_opts_call):
|
||||
script_name = 'cinder-manage'
|
||||
sys.argv = [script_name, 'config', 'list']
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
# under the License.
|
||||
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder import test
|
||||
|
||||
|
|
|
@ -18,9 +18,9 @@ import math
|
|||
|
||||
import mock
|
||||
import mox
|
||||
from oslo.config import cfg
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo.utils import units
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder.brick.initiator import connector
|
||||
from cinder import exception
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
import datetime
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder import context
|
||||
from cinder import db
|
||||
|
|
|
@ -21,9 +21,9 @@ import time
|
|||
import traceback
|
||||
|
||||
import mock
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import units
|
||||
from oslo_concurrency import processutils as putils
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder import brick
|
||||
from cinder import compute
|
||||
|
|
|
@ -18,9 +18,9 @@ import shutil
|
|||
import tempfile
|
||||
|
||||
import mock
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import units
|
||||
from oslo_concurrency import processutils
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder import context
|
||||
from cinder import exception
|
||||
|
|
|
@ -147,3 +147,7 @@ class HackingTestCase(test.TestCase):
|
|||
"from oslo.db import foo"))))
|
||||
self.assertEqual(0, len(list(checks.check_oslo_namespace_imports(
|
||||
"from oslo_db import bar"))))
|
||||
self.assertEqual(1, len(list(checks.check_oslo_namespace_imports(
|
||||
"from oslo.config import foo"))))
|
||||
self.assertEqual(0, len(list(checks.check_oslo_namespace_imports(
|
||||
"from oslo_config import bar"))))
|
||||
|
|
|
@ -19,8 +19,8 @@ import mock
|
|||
|
||||
import ast
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import units
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder import context
|
||||
from cinder import exception
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
# under the License.
|
||||
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import importutils
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder import context
|
||||
from cinder import test
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
import copy
|
||||
|
||||
import mox
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder import context
|
||||
from cinder import exception
|
||||
|
|
|
@ -22,8 +22,8 @@ NAS based IBM GPFS Storage Systems).
|
|||
"""
|
||||
|
||||
import mock
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import units
|
||||
from oslo_config import cfg
|
||||
|
||||
from cinder import context
|
||||
from cinder import exception
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue