Move oslo.config to oslo_config namespace
This is the third in a series of changes to move to using the new oslo_<library> namespace that is being used for oslo libraries. There is currently a shim in place that is allowing the old oslo.<library> imports to work, but we need to be prepared for when the shims go away. Thus, we need patches like this one to move to the new namespace. This patch also updates our hacking check to ensure that no instances of oslo.config sneak back in. Change-Id: I45d24c4330f7c23fc5ad0a0527f1840d09710512
This commit is contained in:
parent
fea2bae001
commit
6a2df86bba
@ -15,7 +15,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
import paste.urlmap
|
import paste.urlmap
|
||||||
|
|
||||||
from cinder.i18n import _LW
|
from cinder.i18n import _LW
|
||||||
|
@ -18,7 +18,7 @@ import os
|
|||||||
import re
|
import re
|
||||||
import urllib
|
import urllib
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
import six.moves.urllib.parse as urlparse
|
import six.moves.urllib.parse as urlparse
|
||||||
import webob
|
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.api import extensions
|
||||||
from cinder.openstack.common import log as logging
|
from cinder.openstack.common import log as logging
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
|
|
||||||
from xml.parsers import expat
|
from xml.parsers import expat
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo.utils import timeutils
|
from oslo.utils import timeutils
|
||||||
|
from oslo_config import cfg
|
||||||
import webob.exc
|
import webob.exc
|
||||||
|
|
||||||
from cinder.api import extensions
|
from cinder.api import extensions
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo.utils import timeutils
|
from oslo.utils import timeutils
|
||||||
|
from oslo_config import cfg
|
||||||
import webob.exc
|
import webob.exc
|
||||||
|
|
||||||
from cinder.api import extensions
|
from cinder.api import extensions
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
from webob import exc
|
from webob import exc
|
||||||
|
|
||||||
from cinder.api import extensions
|
from cinder.api import extensions
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo.utils import importutils
|
from oslo.utils import importutils
|
||||||
|
from oslo_config import cfg
|
||||||
import webob.dec
|
import webob.dec
|
||||||
import webob.exc
|
import webob.exc
|
||||||
|
|
||||||
|
@ -20,8 +20,8 @@ Common Auth Middleware.
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo.serialization import jsonutils
|
from oslo.serialization import jsonutils
|
||||||
|
from oslo_config import cfg
|
||||||
import webob.dec
|
import webob.dec
|
||||||
import webob.exc
|
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.dec
|
||||||
import webob.exc
|
import webob.exc
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
from lxml import etree
|
from lxml import etree
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder.api.openstack import wsgi
|
from cinder.api.openstack import wsgi
|
||||||
from cinder.api.views import versions as views_versions
|
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 eventlet import greenthread
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo.utils import excutils
|
from oslo.utils import excutils
|
||||||
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder.backup import rpcapi as backup_rpcapi
|
from cinder.backup import rpcapi as backup_rpcapi
|
||||||
from cinder import context
|
from cinder import context
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
|
|
||||||
import abc
|
import abc
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo.serialization import jsonutils
|
from oslo.serialization import jsonutils
|
||||||
|
from oslo_config import cfg
|
||||||
import six
|
import six
|
||||||
|
|
||||||
from cinder.db import base
|
from cinder.db import base
|
||||||
|
@ -49,10 +49,10 @@ import subprocess
|
|||||||
import time
|
import time
|
||||||
|
|
||||||
import eventlet
|
import eventlet
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo.utils import encodeutils
|
from oslo.utils import encodeutils
|
||||||
from oslo.utils import excutils
|
from oslo.utils import excutils
|
||||||
from oslo.utils import units
|
from oslo.utils import units
|
||||||
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder.backup.driver import BackupDriver
|
from cinder.backup.driver import BackupDriver
|
||||||
from cinder import exception
|
from cinder import exception
|
||||||
|
@ -37,10 +37,10 @@ import os
|
|||||||
import socket
|
import socket
|
||||||
|
|
||||||
import eventlet
|
import eventlet
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo.utils import excutils
|
from oslo.utils import excutils
|
||||||
from oslo.utils import timeutils
|
from oslo.utils import timeutils
|
||||||
from oslo.utils import units
|
from oslo.utils import units
|
||||||
|
from oslo_config import cfg
|
||||||
import six
|
import six
|
||||||
from swiftclient import client as swift
|
from swiftclient import client as swift
|
||||||
|
|
||||||
|
@ -29,8 +29,8 @@ import json
|
|||||||
import os
|
import os
|
||||||
import stat
|
import stat
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo_concurrency import processutils
|
from oslo_concurrency import processutils
|
||||||
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder.backup.driver import BackupDriver
|
from cinder.backup.driver import BackupDriver
|
||||||
from cinder import exception
|
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 import messaging
|
||||||
from oslo.utils import excutils
|
from oslo.utils import excutils
|
||||||
from oslo.utils import importutils
|
from oslo.utils import importutils
|
||||||
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder.backup import driver
|
from cinder.backup import driver
|
||||||
from cinder.backup import rpcapi as backup_rpcapi
|
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 import messaging
|
||||||
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder.openstack.common import log as logging
|
from cinder.openstack.common import log as logging
|
||||||
from cinder import rpc
|
from cinder import rpc
|
||||||
|
@ -33,7 +33,7 @@ import warnings
|
|||||||
|
|
||||||
warnings.simplefilter('once', DeprecationWarning)
|
warnings.simplefilter('once', DeprecationWarning)
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder import i18n
|
from cinder import i18n
|
||||||
i18n.enable_lazy()
|
i18n.enable_lazy()
|
||||||
|
@ -25,7 +25,7 @@ import warnings
|
|||||||
|
|
||||||
warnings.simplefilter('once', DeprecationWarning)
|
warnings.simplefilter('once', DeprecationWarning)
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder import i18n
|
from cinder import i18n
|
||||||
i18n.enable_lazy()
|
i18n.enable_lazy()
|
||||||
|
@ -23,7 +23,7 @@ import warnings
|
|||||||
warnings.simplefilter('once', DeprecationWarning)
|
warnings.simplefilter('once', DeprecationWarning)
|
||||||
|
|
||||||
import eventlet
|
import eventlet
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
eventlet.monkey_patch()
|
eventlet.monkey_patch()
|
||||||
|
|
||||||
|
@ -61,8 +61,8 @@ import warnings
|
|||||||
|
|
||||||
warnings.simplefilter('once', DeprecationWarning)
|
warnings.simplefilter('once', DeprecationWarning)
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo import messaging
|
from oslo import messaging
|
||||||
|
from oslo_config import cfg
|
||||||
from oslo_db.sqlalchemy import migration
|
from oslo_db.sqlalchemy import migration
|
||||||
|
|
||||||
from cinder import i18n
|
from cinder import i18n
|
||||||
|
@ -25,7 +25,7 @@ import warnings
|
|||||||
|
|
||||||
warnings.simplefilter('once', DeprecationWarning)
|
warnings.simplefilter('once', DeprecationWarning)
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder import i18n
|
from cinder import i18n
|
||||||
i18n.enable_lazy()
|
i18n.enable_lazy()
|
||||||
|
@ -33,7 +33,7 @@ import warnings
|
|||||||
|
|
||||||
warnings.simplefilter('once', DeprecationWarning)
|
warnings.simplefilter('once', DeprecationWarning)
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder import i18n
|
from cinder import i18n
|
||||||
i18n.enable_lazy()
|
i18n.enable_lazy()
|
||||||
|
@ -41,7 +41,7 @@ import warnings
|
|||||||
|
|
||||||
warnings.simplefilter('once', DeprecationWarning)
|
warnings.simplefilter('once', DeprecationWarning)
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder import i18n
|
from cinder import i18n
|
||||||
i18n.enable_lazy()
|
i18n.enable_lazy()
|
||||||
|
@ -27,7 +27,7 @@ stepping stone.
|
|||||||
|
|
||||||
import socket
|
import socket
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder.i18n import _
|
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 import client as nova_client
|
||||||
from novaclient.v1_1.contrib import assisted_volume_snapshots
|
from novaclient.v1_1.contrib import assisted_volume_snapshots
|
||||||
from novaclient.v1_1.contrib import list_extensions
|
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 requests import exceptions as request_exceptions
|
||||||
|
|
||||||
from cinder import context as ctx
|
from cinder import context as ctx
|
||||||
|
@ -20,9 +20,9 @@ Handles all requests relating to consistency groups.
|
|||||||
|
|
||||||
import functools
|
import functools
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo.utils import excutils
|
from oslo.utils import excutils
|
||||||
from oslo.utils import timeutils
|
from oslo.utils import timeutils
|
||||||
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder.db import base
|
from cinder.db import base
|
||||||
from cinder import exception
|
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 concurrency as db_concurrency
|
||||||
from oslo_db import options as db_options
|
from oslo_db import options as db_options
|
||||||
|
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
"""Base class for classes that need modular database access."""
|
"""Base class for classes that need modular database access."""
|
||||||
|
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo.utils import importutils
|
from oslo.utils import importutils
|
||||||
|
from oslo_config import cfg
|
||||||
|
|
||||||
|
|
||||||
db_driver_opt = cfg.StrOpt('db_driver',
|
db_driver_opt = cfg.StrOpt('db_driver',
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
import os
|
import os
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_db import options
|
from oslo_db import options
|
||||||
from stevedore import driver
|
from stevedore import driver
|
||||||
|
|
||||||
|
@ -26,8 +26,8 @@ import time
|
|||||||
import uuid
|
import uuid
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo.utils import timeutils
|
from oslo.utils import timeutils
|
||||||
|
from oslo_config import cfg
|
||||||
from oslo_db import exception as db_exc
|
from oslo_db import exception as db_exc
|
||||||
from oslo_db import options
|
from oslo_db import options
|
||||||
from oslo_db.sqlalchemy import session as db_session
|
from oslo_db.sqlalchemy import session as db_session
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
from sqlalchemy import MetaData, Table
|
from sqlalchemy import MetaData, Table
|
||||||
|
|
||||||
from cinder.i18n import _LE, _LI
|
from cinder.i18n import _LE, _LI
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
from sqlalchemy import MetaData, Table
|
from sqlalchemy import MetaData, Table
|
||||||
|
|
||||||
from cinder.i18n import _
|
from cinder.i18n import _
|
||||||
|
@ -19,8 +19,8 @@
|
|||||||
SQLAlchemy models for cinder data.
|
SQLAlchemy models for cinder data.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo.utils import timeutils
|
from oslo.utils import timeutils
|
||||||
|
from oslo_config import cfg
|
||||||
from oslo_db.sqlalchemy import models
|
from oslo_db.sqlalchemy import models
|
||||||
from sqlalchemy import Column, Integer, String, Text, schema
|
from sqlalchemy import Column, Integer, String, Text, schema
|
||||||
from sqlalchemy.ext.declarative import declarative_base
|
from sqlalchemy.ext.declarative import declarative_base
|
||||||
|
@ -24,7 +24,7 @@ SHOULD include dedicated exception logging.
|
|||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
import six
|
import six
|
||||||
import webob.exc
|
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
|
# NOTE(jsbryant): When other oslo libraries switch over non-namespaced
|
||||||
# imports, we will need to add them to the regex below.
|
# 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):
|
def no_vi_headers(physical_line, line_number, lines):
|
||||||
|
@ -27,9 +27,9 @@ import sys
|
|||||||
import time
|
import time
|
||||||
|
|
||||||
import glanceclient.exc
|
import glanceclient.exc
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo.serialization import jsonutils
|
from oslo.serialization import jsonutils
|
||||||
from oslo.utils import timeutils
|
from oslo.utils import timeutils
|
||||||
|
from oslo_config import cfg
|
||||||
import six.moves.urllib.parse as urlparse
|
import six.moves.urllib.parse as urlparse
|
||||||
|
|
||||||
from cinder import exception
|
from cinder import exception
|
||||||
|
@ -28,10 +28,10 @@ import contextlib
|
|||||||
import os
|
import os
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo.utils import timeutils
|
from oslo.utils import timeutils
|
||||||
from oslo.utils import units
|
from oslo.utils import units
|
||||||
from oslo_concurrency import processutils
|
from oslo_concurrency import processutils
|
||||||
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder import exception
|
from cinder import exception
|
||||||
from cinder.i18n import _
|
from cinder.i18n import _
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo.utils import importutils
|
from oslo.utils import importutils
|
||||||
|
from oslo_config import cfg
|
||||||
|
|
||||||
keymgr_opts = [
|
keymgr_opts = [
|
||||||
cfg.StrOpt('api_class',
|
cfg.StrOpt('api_class',
|
||||||
|
@ -24,8 +24,8 @@ import binascii
|
|||||||
from barbicanclient import client as barbican_client
|
from barbicanclient import client as barbican_client
|
||||||
from keystoneclient.auth import identity
|
from keystoneclient.auth import identity
|
||||||
from keystoneclient import session
|
from keystoneclient import session
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo.utils import excutils
|
from oslo.utils import excutils
|
||||||
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder import exception
|
from cinder import exception
|
||||||
from cinder.i18n import _, _LE
|
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
|
import array
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder import exception
|
from cinder import exception
|
||||||
from cinder.i18n import _, _LW
|
from cinder.i18n import _, _LW
|
||||||
|
@ -19,7 +19,7 @@ Key manager API
|
|||||||
|
|
||||||
import abc
|
import abc
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
import six
|
import six
|
||||||
|
|
||||||
encryption_opts = [
|
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 import messaging
|
||||||
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder.db import base
|
from cinder.db import base
|
||||||
from cinder.openstack.common import log as logging
|
from cinder.openstack.common import log as logging
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
"""Policy Engine For Cinder"""
|
"""Policy Engine For Cinder"""
|
||||||
|
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder import exception
|
from cinder import exception
|
||||||
from cinder.openstack.common import policy
|
from cinder.openstack.common import policy
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo.utils import importutils
|
from oslo.utils import importutils
|
||||||
from oslo.utils import timeutils
|
from oslo.utils import timeutils
|
||||||
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder import context
|
from cinder import context
|
||||||
from cinder import db
|
from cinder import db
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo.utils import importutils
|
from oslo.utils import importutils
|
||||||
|
from oslo_config import cfg
|
||||||
|
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
@ -17,7 +17,7 @@ Handles all requests relating to volume replication.
|
|||||||
"""
|
"""
|
||||||
import functools
|
import functools
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder.db import base
|
from cinder.db import base
|
||||||
from cinder import exception
|
from cinder import exception
|
||||||
|
@ -26,9 +26,9 @@ __all__ = [
|
|||||||
'TRANSPORT_ALIASES',
|
'TRANSPORT_ALIASES',
|
||||||
]
|
]
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo import messaging
|
from oslo import messaging
|
||||||
from oslo.serialization import jsonutils
|
from oslo.serialization import jsonutils
|
||||||
|
from oslo_config import cfg
|
||||||
from osprofiler import profiler
|
from osprofiler import profiler
|
||||||
|
|
||||||
import cinder.context
|
import cinder.context
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
Scheduler base class that all Schedulers should inherit from
|
Scheduler base class that all Schedulers should inherit from
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo.utils import importutils
|
from oslo.utils import importutils
|
||||||
from oslo.utils import timeutils
|
from oslo.utils import timeutils
|
||||||
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder import db
|
from cinder import db
|
||||||
from cinder.i18n import _
|
from cinder.i18n import _
|
||||||
|
@ -20,7 +20,7 @@ You can customize this scheduler by specifying your own volume Filters and
|
|||||||
Weighing Functions.
|
Weighing Functions.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder import exception
|
from cinder import exception
|
||||||
from cinder.i18n import _, _LW
|
from cinder.i18n import _, _LW
|
||||||
|
@ -19,8 +19,8 @@ Manage hosts in the current zone.
|
|||||||
|
|
||||||
import UserDict
|
import UserDict
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo.utils import timeutils
|
from oslo.utils import timeutils
|
||||||
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder import db
|
from cinder import db
|
||||||
from cinder import exception
|
from cinder import exception
|
||||||
|
@ -19,10 +19,10 @@
|
|||||||
Scheduler Service
|
Scheduler Service
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo import messaging
|
from oslo import messaging
|
||||||
from oslo.utils import excutils
|
from oslo.utils import excutils
|
||||||
from oslo.utils import importutils
|
from oslo.utils import importutils
|
||||||
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder import context
|
from cinder import context
|
||||||
from cinder import db
|
from cinder import db
|
||||||
|
@ -16,9 +16,9 @@
|
|||||||
Client side of the scheduler manager RPC API.
|
Client side of the scheduler manager RPC API.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo import messaging
|
from oslo import messaging
|
||||||
from oslo.serialization import jsonutils
|
from oslo.serialization import jsonutils
|
||||||
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder import rpc
|
from cinder import rpc
|
||||||
|
|
||||||
|
@ -24,8 +24,8 @@ import datetime
|
|||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo.utils import timeutils
|
from oslo.utils import timeutils
|
||||||
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder.i18n import _LE
|
from cinder.i18n import _LE
|
||||||
from cinder.openstack.common import log as logging
|
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.
|
with additional benefits of supporting volume types, volume encryption, QoS.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
simple_scheduler_opts = [
|
simple_scheduler_opts = [
|
||||||
cfg.IntOpt("max_gigabytes",
|
cfg.IntOpt("max_gigabytes",
|
||||||
|
@ -35,7 +35,7 @@ and the weighing has the opposite effect of the default.
|
|||||||
|
|
||||||
import math
|
import math
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder.openstack.common.scheduler import weights
|
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 import db
|
||||||
from cinder.openstack.common import log as logging
|
from cinder.openstack.common import log as logging
|
||||||
|
@ -22,10 +22,10 @@ import inspect
|
|||||||
import os
|
import os
|
||||||
import random
|
import random
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo import messaging
|
from oslo import messaging
|
||||||
from oslo.utils import importutils
|
from oslo.utils import importutils
|
||||||
from oslo_concurrency import processutils
|
from oslo_concurrency import processutils
|
||||||
|
from oslo_config import cfg
|
||||||
from oslo_db import exception as db_exc
|
from oslo_db import exception as db_exc
|
||||||
import osprofiler.notifier
|
import osprofiler.notifier
|
||||||
from osprofiler import profiler
|
from osprofiler import profiler
|
||||||
|
@ -22,7 +22,7 @@ import os
|
|||||||
import string
|
import string
|
||||||
|
|
||||||
from eventlet import pools
|
from eventlet import pools
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
import paramiko
|
import paramiko
|
||||||
|
|
||||||
from cinder import exception
|
from cinder import exception
|
||||||
|
@ -29,12 +29,12 @@ import uuid
|
|||||||
import fixtures
|
import fixtures
|
||||||
import mock
|
import mock
|
||||||
import mox
|
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.messaging import conffixture as messaging_conffixture
|
||||||
from oslo.utils import strutils
|
from oslo.utils import strutils
|
||||||
from oslo.utils import timeutils
|
from oslo.utils import timeutils
|
||||||
from oslo_concurrency import lockutils
|
from oslo_concurrency import lockutils
|
||||||
|
from oslo_config import cfg
|
||||||
|
from oslo_config import fixture as config_fixture
|
||||||
import stubout
|
import stubout
|
||||||
import testtools
|
import testtools
|
||||||
|
|
||||||
|
@ -13,11 +13,11 @@
|
|||||||
import ast
|
import ast
|
||||||
|
|
||||||
import fixtures
|
import fixtures
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo.config import fixture as config_fixture
|
|
||||||
from oslo.serialization import jsonutils
|
from oslo.serialization import jsonutils
|
||||||
from oslo.utils import timeutils
|
from oslo.utils import timeutils
|
||||||
from oslo_concurrency import lockutils
|
from oslo_concurrency import lockutils
|
||||||
|
from oslo_config import cfg
|
||||||
|
from oslo_config import fixture as config_fixture
|
||||||
import webob
|
import webob
|
||||||
from webob import exc
|
from webob import exc
|
||||||
|
|
||||||
|
@ -17,9 +17,9 @@ import json
|
|||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo import messaging
|
from oslo import messaging
|
||||||
from oslo.serialization import jsonutils
|
from oslo.serialization import jsonutils
|
||||||
|
from oslo_config import cfg
|
||||||
import webob
|
import webob
|
||||||
|
|
||||||
from cinder.api.contrib import volume_actions
|
from cinder.api.contrib import volume_actions
|
||||||
|
@ -19,7 +19,7 @@ Tests for volume replication API code.
|
|||||||
import json
|
import json
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
import webob
|
import webob
|
||||||
|
|
||||||
from cinder import context
|
from cinder import context
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
import six
|
import six
|
||||||
import webob
|
import webob
|
||||||
|
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
|
|
||||||
import iso8601
|
import iso8601
|
||||||
from lxml import etree
|
from lxml import etree
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo.serialization import jsonutils
|
from oslo.serialization import jsonutils
|
||||||
|
from oslo_config import cfg
|
||||||
import webob
|
import webob
|
||||||
|
|
||||||
from cinder.api import extensions
|
from cinder.api import extensions
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo.serialization import jsonutils
|
from oslo.serialization import jsonutils
|
||||||
|
from oslo_config import cfg
|
||||||
import webob
|
import webob
|
||||||
|
|
||||||
from cinder.api import extensions
|
from cinder.api import extensions
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo.serialization import jsonutils
|
from oslo.serialization import jsonutils
|
||||||
|
from oslo_config import cfg
|
||||||
import webob
|
import webob
|
||||||
|
|
||||||
from cinder.api import extensions
|
from cinder.api import extensions
|
||||||
|
@ -17,7 +17,7 @@ import datetime
|
|||||||
|
|
||||||
from lxml import etree
|
from lxml import etree
|
||||||
import mock
|
import mock
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
import webob
|
import webob
|
||||||
|
|
||||||
from cinder.api import extensions
|
from cinder.api import extensions
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo.serialization import jsonutils
|
from oslo.serialization import jsonutils
|
||||||
|
from oslo_config import cfg
|
||||||
import webob
|
import webob
|
||||||
|
|
||||||
from cinder.api import extensions
|
from cinder.api import extensions
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo.serialization import jsonutils
|
from oslo.serialization import jsonutils
|
||||||
|
from oslo_config import cfg
|
||||||
import webob
|
import webob
|
||||||
|
|
||||||
from cinder.api import extensions
|
from cinder.api import extensions
|
||||||
|
@ -18,7 +18,7 @@ import datetime
|
|||||||
|
|
||||||
from lxml import etree
|
from lxml import etree
|
||||||
import mock
|
import mock
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
import six
|
import six
|
||||||
import six.moves.urllib.parse as urlparse
|
import six.moves.urllib.parse as urlparse
|
||||||
import webob
|
import webob
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
"""Tests for volume name_id."""
|
"""Tests for volume name_id."""
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder import context
|
from cinder import context
|
||||||
from cinder import db
|
from cinder import db
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
@ -18,7 +18,7 @@ import datetime
|
|||||||
|
|
||||||
import glanceclient.exc
|
import glanceclient.exc
|
||||||
import mock
|
import mock
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder import context
|
from cinder import context
|
||||||
from cinder import exception
|
from cinder import exception
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder.openstack.common import log as logging
|
from cinder.openstack.common import log as logging
|
||||||
from cinder.tests.integrated import integrated_helpers
|
from cinder.tests.integrated import integrated_helpers
|
||||||
|
@ -22,7 +22,7 @@ import base64
|
|||||||
import binascii
|
import binascii
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder import exception
|
from cinder import exception
|
||||||
from cinder.keymgr import barbican
|
from cinder.keymgr import barbican
|
||||||
|
@ -19,7 +19,7 @@ Test cases for the conf key manager.
|
|||||||
|
|
||||||
import array
|
import array
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder import context
|
from cinder import context
|
||||||
from cinder import exception
|
from cinder import exception
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
@ -18,7 +18,7 @@ Tests For Allocated Capacity Weigher.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder import context
|
from cinder import context
|
||||||
from cinder.openstack.common.scheduler.weights import HostWeightHandler
|
from cinder.openstack.common.scheduler.weights import HostWeightHandler
|
||||||
|
@ -17,7 +17,7 @@ Tests For Capacity Weigher.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder import context
|
from cinder import context
|
||||||
from cinder.openstack.common.scheduler.weights import HostWeightHandler
|
from cinder.openstack.common.scheduler.weights import HostWeightHandler
|
||||||
|
@ -17,8 +17,8 @@ Tests For HostManager
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo.utils import timeutils
|
from oslo.utils import timeutils
|
||||||
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder import exception
|
from cinder import exception
|
||||||
from cinder.openstack.common.scheduler import filters
|
from cinder.openstack.common.scheduler import filters
|
||||||
|
@ -20,7 +20,7 @@ Unit Tests for cinder.scheduler.rpcapi
|
|||||||
import copy
|
import copy
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder import context
|
from cinder import context
|
||||||
from cinder.scheduler import rpcapi as scheduler_rpcapi
|
from cinder.scheduler import rpcapi as scheduler_rpcapi
|
||||||
|
@ -19,7 +19,7 @@ Tests For Scheduler
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder import context
|
from cinder import context
|
||||||
from cinder import db
|
from cinder import db
|
||||||
|
@ -17,7 +17,7 @@ Tests For Volume Number Weigher.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder import context
|
from cinder import context
|
||||||
from cinder.db.sqlalchemy import api
|
from cinder.db.sqlalchemy import api
|
||||||
|
@ -10,8 +10,8 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo.utils import timeutils
|
from oslo.utils import timeutils
|
||||||
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder import exception
|
from cinder import exception
|
||||||
from cinder import test
|
from cinder import test
|
||||||
|
@ -20,9 +20,9 @@ Tests for Backup code.
|
|||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo.utils import importutils
|
from oslo.utils import importutils
|
||||||
from oslo.utils import timeutils
|
from oslo.utils import timeutils
|
||||||
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder.backup import manager
|
from cinder.backup import manager
|
||||||
from cinder import context
|
from cinder import context
|
||||||
|
@ -24,7 +24,7 @@ import tempfile
|
|||||||
import zlib
|
import zlib
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
from swiftclient import client as swift
|
from swiftclient import client as swift
|
||||||
|
|
||||||
from cinder.backup.drivers.swift import SwiftBackupDriver
|
from cinder.backup.drivers.swift import SwiftBackupDriver
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder import context
|
from cinder import context
|
||||||
from cinder.db.sqlalchemy import api
|
from cinder.db.sqlalchemy import api
|
||||||
|
@ -16,7 +16,7 @@ import StringIO
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
import rtslib
|
import rtslib
|
||||||
|
|
||||||
from cinder.cmd import all as cinder_all
|
from cinder.cmd import all as cinder_all
|
||||||
@ -636,7 +636,7 @@ class TestCinderManageCmd(test.TestCase):
|
|||||||
service_get_all.assert_called_with(ctxt)
|
service_get_all.assert_called_with(ctxt)
|
||||||
service_is_up.assert_called_with(service)
|
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):
|
def test_main_argv_lt_2(self, register_cli_opt):
|
||||||
script_name = 'cinder-manage'
|
script_name = 'cinder-manage'
|
||||||
sys.argv = [script_name]
|
sys.argv = [script_name]
|
||||||
@ -647,9 +647,9 @@ class TestCinderManageCmd(test.TestCase):
|
|||||||
self.assertTrue(register_cli_opt.called)
|
self.assertTrue(register_cli_opt.called)
|
||||||
self.assertEqual(exit.code, 2)
|
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('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,
|
def test_main_sudo_failed(self, register_cli_opt, log_setup,
|
||||||
config_opts_call):
|
config_opts_call):
|
||||||
script_name = 'cinder-manage'
|
script_name = 'cinder-manage'
|
||||||
@ -666,8 +666,8 @@ class TestCinderManageCmd(test.TestCase):
|
|||||||
self.assertFalse(log_setup.called)
|
self.assertFalse(log_setup.called)
|
||||||
self.assertEqual(exit.code, 2)
|
self.assertEqual(exit.code, 2)
|
||||||
|
|
||||||
@mock.patch('oslo.config.cfg.ConfigOpts.__call__')
|
@mock.patch('oslo_config.cfg.ConfigOpts.__call__')
|
||||||
@mock.patch('oslo.config.cfg.ConfigOpts.register_cli_opt')
|
@mock.patch('oslo_config.cfg.ConfigOpts.register_cli_opt')
|
||||||
def test_main(self, register_cli_opt, config_opts_call):
|
def test_main(self, register_cli_opt, config_opts_call):
|
||||||
script_name = 'cinder-manage'
|
script_name = 'cinder-manage'
|
||||||
sys.argv = [script_name, 'config', 'list']
|
sys.argv = [script_name, 'config', 'list']
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder import test
|
from cinder import test
|
||||||
|
|
||||||
|
@ -18,9 +18,9 @@ import math
|
|||||||
|
|
||||||
import mock
|
import mock
|
||||||
import mox
|
import mox
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo.serialization import jsonutils
|
from oslo.serialization import jsonutils
|
||||||
from oslo.utils import units
|
from oslo.utils import units
|
||||||
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder.brick.initiator import connector
|
from cinder.brick.initiator import connector
|
||||||
from cinder import exception
|
from cinder import exception
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder import context
|
from cinder import context
|
||||||
from cinder import db
|
from cinder import db
|
||||||
|
@ -21,9 +21,9 @@ import time
|
|||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo.utils import units
|
from oslo.utils import units
|
||||||
from oslo_concurrency import processutils as putils
|
from oslo_concurrency import processutils as putils
|
||||||
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder import brick
|
from cinder import brick
|
||||||
from cinder import compute
|
from cinder import compute
|
||||||
|
@ -18,9 +18,9 @@ import shutil
|
|||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo.utils import units
|
from oslo.utils import units
|
||||||
from oslo_concurrency import processutils
|
from oslo_concurrency import processutils
|
||||||
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder import context
|
from cinder import context
|
||||||
from cinder import exception
|
from cinder import exception
|
||||||
|
@ -147,3 +147,7 @@ class HackingTestCase(test.TestCase):
|
|||||||
"from oslo.db import foo"))))
|
"from oslo.db import foo"))))
|
||||||
self.assertEqual(0, len(list(checks.check_oslo_namespace_imports(
|
self.assertEqual(0, len(list(checks.check_oslo_namespace_imports(
|
||||||
"from oslo_db import bar"))))
|
"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
|
import ast
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo.utils import units
|
from oslo.utils import units
|
||||||
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder import context
|
from cinder import context
|
||||||
from cinder import exception
|
from cinder import exception
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo.utils import importutils
|
from oslo.utils import importutils
|
||||||
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder import context
|
from cinder import context
|
||||||
from cinder import test
|
from cinder import test
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
import copy
|
import copy
|
||||||
|
|
||||||
import mox
|
import mox
|
||||||
from oslo.config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder import context
|
from cinder import context
|
||||||
from cinder import exception
|
from cinder import exception
|
||||||
|
@ -22,8 +22,8 @@ NAS based IBM GPFS Storage Systems).
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
from oslo.config import cfg
|
|
||||||
from oslo.utils import units
|
from oslo.utils import units
|
||||||
|
from oslo_config import cfg
|
||||||
|
|
||||||
from cinder import context
|
from cinder import context
|
||||||
from cinder import exception
|
from cinder import exception
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user