Use oslo.utils
Change usage of modules that are deprecated in oslo-incubator. Use the corresponding module from oslo.utils. A followup patch will sync with oslo-incubator and remove the now obsolete modules. Change-Id: I4f949de57e333832dcc7c1e256ce82e2db0144cb Partial-Bug: #1382189
This commit is contained in:
parent
bf78b69297
commit
2ad967a6fd
@ -15,6 +15,7 @@
|
||||
|
||||
import urlparse
|
||||
|
||||
from oslo.utils import strutils
|
||||
import webob
|
||||
|
||||
from manila.api import extensions
|
||||
@ -25,7 +26,6 @@ from manila.db.sqlalchemy import api as sqlalchemy_api
|
||||
from manila import exception
|
||||
from manila.i18n import _
|
||||
from manila.openstack.common import log as logging
|
||||
from manila.openstack.common import strutils
|
||||
from manila import quota
|
||||
|
||||
|
||||
|
@ -17,6 +17,7 @@
|
||||
import os
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import importutils
|
||||
import six
|
||||
import webob.dec
|
||||
import webob.exc
|
||||
@ -26,7 +27,6 @@ from manila.api.openstack import wsgi
|
||||
from manila.api import xmlutil
|
||||
from manila import exception
|
||||
from manila.i18n import _
|
||||
from manila.openstack.common import importutils
|
||||
from manila.openstack.common import log as logging
|
||||
import manila.policy
|
||||
|
||||
|
@ -24,6 +24,7 @@ import math
|
||||
import re
|
||||
import time
|
||||
|
||||
from oslo.utils import importutils
|
||||
import webob.dec
|
||||
import webob.exc
|
||||
|
||||
@ -31,7 +32,6 @@ from manila.api.openstack import wsgi
|
||||
from manila.api.views import limits as limits_views
|
||||
from manila.api import xmlutil
|
||||
from manila.i18n import _
|
||||
from manila.openstack.common import importutils
|
||||
from manila.openstack.common import jsonutils
|
||||
from manila import quota
|
||||
from manila import wsgi as base_wsgi
|
||||
|
@ -15,10 +15,9 @@
|
||||
|
||||
import datetime
|
||||
|
||||
from oslo.utils import timeutils
|
||||
import six
|
||||
|
||||
from manila.openstack.common import timeutils
|
||||
|
||||
|
||||
class ViewBuilder(object):
|
||||
"""OpenStack API base limits view builder."""
|
||||
|
@ -19,13 +19,13 @@
|
||||
|
||||
import copy
|
||||
|
||||
from oslo.utils import timeutils
|
||||
import six
|
||||
|
||||
from manila.i18n import _
|
||||
from manila.openstack.common import context as common_context
|
||||
from manila.openstack.common import local
|
||||
from manila.openstack.common import log as logging
|
||||
from manila.openstack.common import timeutils
|
||||
from manila import policy
|
||||
|
||||
|
||||
|
@ -17,9 +17,7 @@
|
||||
"""Base class for classes that need modular database access."""
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
|
||||
from manila.openstack.common import importutils
|
||||
from oslo.utils import importutils
|
||||
|
||||
db_driver_opt = cfg.StrOpt('db_driver',
|
||||
default='manila.db',
|
||||
|
@ -26,6 +26,7 @@ from oslo.config import cfg
|
||||
from oslo.db import exception as db_exception
|
||||
from oslo.db import options as db_options
|
||||
from oslo.db.sqlalchemy import session
|
||||
from oslo.utils import timeutils
|
||||
import six
|
||||
from sqlalchemy import or_
|
||||
from sqlalchemy.orm import joinedload
|
||||
@ -37,7 +38,6 @@ from manila.db.sqlalchemy import models
|
||||
from manila import exception
|
||||
from manila.i18n import _
|
||||
from manila.openstack.common import log as logging
|
||||
from manila.openstack.common import timeutils
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
@ -21,6 +21,7 @@ SQLAlchemy models for Manila data.
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.db.sqlalchemy import models
|
||||
from oslo.utils import timeutils
|
||||
import six
|
||||
from sqlalchemy import Column, Integer, String
|
||||
from sqlalchemy.ext.declarative import declarative_base
|
||||
@ -28,7 +29,6 @@ from sqlalchemy import orm
|
||||
from sqlalchemy import ForeignKey, DateTime, Boolean, Enum
|
||||
|
||||
from manila.common import constants
|
||||
from manila.openstack.common import timeutils
|
||||
|
||||
CONF = cfg.CONF
|
||||
BASE = declarative_base()
|
||||
|
@ -19,14 +19,14 @@
|
||||
import datetime
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import importutils
|
||||
from oslo.utils import timeutils
|
||||
import six
|
||||
|
||||
from manila import db
|
||||
from manila import exception
|
||||
from manila.i18n import _
|
||||
from manila.openstack.common import importutils
|
||||
from manila.openstack.common import log as logging
|
||||
from manila.openstack.common import timeutils
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
@ -20,11 +20,11 @@ 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 manila import db
|
||||
from manila.i18n import _
|
||||
from manila.openstack.common import importutils
|
||||
from manila.openstack.common import timeutils
|
||||
from manila.share import rpcapi as share_rpcapi
|
||||
from manila import utils
|
||||
|
||||
|
@ -20,6 +20,7 @@ Manage hosts in the current zone.
|
||||
import UserDict
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import timeutils
|
||||
import six
|
||||
|
||||
from manila import db
|
||||
@ -28,7 +29,6 @@ from manila.i18n import _
|
||||
from manila.openstack.common import log as logging
|
||||
from manila.openstack.common.scheduler import filters
|
||||
from manila.openstack.common.scheduler import weights
|
||||
from manila.openstack.common import timeutils
|
||||
from manila import utils
|
||||
|
||||
host_manager_opts = [
|
||||
|
@ -20,14 +20,14 @@ Scheduler Service
|
||||
"""
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import excutils
|
||||
from oslo.utils import importutils
|
||||
|
||||
from manila import context
|
||||
from manila import db
|
||||
from manila import exception
|
||||
from manila.i18n import _
|
||||
from manila import manager
|
||||
from manila.openstack.common import excutils
|
||||
from manila.openstack.common import importutils
|
||||
from manila.openstack.common import log as logging
|
||||
from manila import rpc
|
||||
from manila.share import rpcapi as share_rpcapi
|
||||
|
@ -24,11 +24,11 @@ import datetime
|
||||
import os
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import timeutils
|
||||
|
||||
from manila.i18n import _
|
||||
from manila.openstack.common import jsonutils
|
||||
from manila.openstack.common import log as logging
|
||||
from manila.openstack.common import timeutils
|
||||
|
||||
scheduler_json_config_location_opt = cfg.StrOpt(
|
||||
'scheduler_json_config_location',
|
||||
|
@ -29,12 +29,12 @@ import eventlet
|
||||
import greenlet
|
||||
from oslo.config import cfg
|
||||
from oslo import messaging
|
||||
from oslo.utils import importutils
|
||||
|
||||
from manila import context
|
||||
from manila import db
|
||||
from manila import exception
|
||||
from manila.i18n import _
|
||||
from manila.openstack.common import importutils
|
||||
from manila.openstack.common import log as logging
|
||||
from manila.openstack.common import loopingcall
|
||||
from manila import rpc
|
||||
|
@ -19,15 +19,15 @@ Handles all requests relating to shares.
|
||||
"""
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import excutils
|
||||
from oslo.utils import timeutils
|
||||
import six
|
||||
|
||||
from manila.api import extensions
|
||||
from manila.db import base
|
||||
from manila import exception
|
||||
from manila.i18n import _
|
||||
from manila.openstack.common import excutils
|
||||
from manila.openstack.common import log as logging
|
||||
from manila.openstack.common import timeutils
|
||||
from manila import policy
|
||||
from manila import quota
|
||||
from manila.scheduler import rpcapi as scheduler_rpcapi
|
||||
|
@ -13,13 +13,13 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
"""VNX backend for the EMC Manila driver."""
|
||||
from oslo.utils import excutils
|
||||
from oslo.utils import units
|
||||
import six
|
||||
|
||||
from manila import db as manila_db
|
||||
from manila import exception
|
||||
from manila.i18n import _
|
||||
from manila.openstack.common import excutils
|
||||
from manila.openstack.common import log
|
||||
from manila.share.drivers.emc.plugins import base as driver
|
||||
import manila.share.drivers.emc.plugins.registry
|
||||
|
@ -15,9 +15,9 @@
|
||||
import types
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import timeutils
|
||||
|
||||
from manila.openstack.common import log
|
||||
from manila.openstack.common import timeutils
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
@ -20,6 +20,8 @@ import re
|
||||
import time
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import excutils
|
||||
from oslo.utils import importutils
|
||||
import six
|
||||
|
||||
from manila.common import constants as const
|
||||
@ -27,8 +29,6 @@ from manila import compute
|
||||
from manila import context
|
||||
from manila import exception
|
||||
from manila.i18n import _
|
||||
from manila.openstack.common import excutils
|
||||
from manila.openstack.common import importutils
|
||||
from manila.openstack.common import log as logging
|
||||
from manila.openstack.common import processutils
|
||||
from manila.share import driver
|
||||
|
@ -24,13 +24,13 @@ import hashlib
|
||||
import re
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import excutils
|
||||
from oslo.utils import units
|
||||
import six
|
||||
|
||||
from manila import context
|
||||
from manila import exception
|
||||
from manila.i18n import _
|
||||
from manila.openstack.common import excutils
|
||||
from manila.openstack.common import log
|
||||
from manila.share import driver
|
||||
from manila.share.drivers.netapp import api as naapi
|
||||
|
@ -22,6 +22,7 @@ import time
|
||||
|
||||
import netaddr
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import importutils
|
||||
import six
|
||||
|
||||
from manila.common import constants
|
||||
@ -31,7 +32,6 @@ from manila import exception
|
||||
from manila.i18n import _
|
||||
from manila.network.linux import ip_lib
|
||||
from manila.network.neutron import api as neutron
|
||||
from manila.openstack.common import importutils
|
||||
from manila.openstack.common import log as logging
|
||||
from manila import utils
|
||||
|
||||
|
@ -20,6 +20,9 @@
|
||||
"""
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import excutils
|
||||
from oslo.utils import importutils
|
||||
from oslo.utils import timeutils
|
||||
import six
|
||||
|
||||
from manila.common import constants
|
||||
@ -28,10 +31,7 @@ from manila import exception
|
||||
from manila.i18n import _
|
||||
from manila import manager
|
||||
from manila import network
|
||||
from manila.openstack.common import excutils
|
||||
from manila.openstack.common import importutils
|
||||
from manila.openstack.common import log as logging
|
||||
from manila.openstack.common import timeutils
|
||||
from manila import quota
|
||||
import manila.share.configuration
|
||||
from manila import utils
|
||||
|
@ -29,6 +29,7 @@ import fixtures
|
||||
import mock
|
||||
from oslo.config import cfg
|
||||
from oslo.messaging import conffixture as messaging_conffixture
|
||||
from oslo.utils import timeutils
|
||||
import six
|
||||
import testtools
|
||||
|
||||
@ -36,7 +37,6 @@ from manila.db import migration
|
||||
from manila.db.sqlalchemy import api as db_api
|
||||
from manila.db.sqlalchemy import models as db_models
|
||||
from manila.openstack.common import log as logging
|
||||
from manila.openstack.common import timeutils
|
||||
from manila import rpc
|
||||
from manila import service
|
||||
from manila.tests import conf_fixture
|
||||
|
@ -17,11 +17,12 @@
|
||||
|
||||
import datetime
|
||||
|
||||
from oslo.utils import timeutils
|
||||
|
||||
from manila.api.contrib import services
|
||||
from manila import context
|
||||
from manila import db
|
||||
from manila import exception
|
||||
from manila.openstack.common import timeutils
|
||||
from manila import policy
|
||||
from manila import test
|
||||
from manila.tests.api import fakes
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
import uuid
|
||||
|
||||
from oslo.utils import timeutils
|
||||
import routes
|
||||
import six
|
||||
import webob
|
||||
@ -30,7 +31,6 @@ from manila.api.v1 import router
|
||||
from manila.api import versions
|
||||
from manila import context
|
||||
from manila import exception as exc
|
||||
from manila.openstack.common import timeutils
|
||||
from manila import wsgi
|
||||
|
||||
|
||||
|
@ -13,12 +13,12 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo.utils import timeutils
|
||||
import webob
|
||||
|
||||
from manila.api.v1 import volume_types as types
|
||||
from manila.api.views import types as views_types
|
||||
from manila import exception
|
||||
from manila.openstack.common import timeutils
|
||||
from manila.share import volume_types
|
||||
from manila import test
|
||||
from manila.tests.api import fakes
|
||||
|
@ -16,9 +16,9 @@
|
||||
Fakes For Scheduler tests.
|
||||
"""
|
||||
|
||||
from oslo.utils import timeutils
|
||||
import six
|
||||
|
||||
from manila.openstack.common import timeutils
|
||||
from manila.scheduler import filter_scheduler
|
||||
from manila.scheduler import host_manager
|
||||
|
||||
|
@ -17,11 +17,11 @@ Tests For HostManager
|
||||
"""
|
||||
import mock
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import timeutils
|
||||
|
||||
from manila import db
|
||||
from manila import exception
|
||||
from manila.openstack.common.scheduler import filters
|
||||
from manila.openstack.common import timeutils
|
||||
from manila.scheduler import host_manager
|
||||
from manila import test
|
||||
from manila.tests.scheduler import fakes
|
||||
|
@ -19,11 +19,11 @@ Tests For Scheduler
|
||||
|
||||
import mock
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import timeutils
|
||||
|
||||
from manila import context
|
||||
from manila import db
|
||||
from manila import exception
|
||||
from manila.openstack.common import timeutils
|
||||
from manila.scheduler import driver
|
||||
from manila.scheduler import manager
|
||||
from manila.scheduler import simple
|
||||
|
@ -19,11 +19,11 @@ import uuid
|
||||
|
||||
import mock
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import timeutils
|
||||
|
||||
from manila import context
|
||||
from manila import db as db_driver
|
||||
from manila import exception
|
||||
from manila.openstack.common import timeutils
|
||||
from manila import quota
|
||||
from manila import share
|
||||
from manila.share import api as share_api
|
||||
|
@ -16,13 +16,13 @@
|
||||
"""Test of Share Manager for Manila."""
|
||||
|
||||
import mock
|
||||
from oslo.utils import importutils
|
||||
|
||||
from manila.common import constants
|
||||
from manila import context
|
||||
from manila import db
|
||||
from manila.db.sqlalchemy import models
|
||||
from manila import exception
|
||||
from manila.openstack.common import importutils
|
||||
from manila.share import manager
|
||||
from manila import test
|
||||
from manila import utils
|
||||
|
@ -16,9 +16,9 @@
|
||||
"""Test of Base Manager for Manila."""
|
||||
|
||||
import mock
|
||||
from oslo.utils import importutils
|
||||
|
||||
from manila import manager
|
||||
from manila.openstack.common import importutils
|
||||
from manila import test
|
||||
|
||||
|
||||
|
@ -18,6 +18,7 @@ import datetime
|
||||
|
||||
import mock
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import timeutils
|
||||
import testtools
|
||||
|
||||
from manila import context
|
||||
@ -25,7 +26,6 @@ from manila import db
|
||||
from manila.db.sqlalchemy import api as sqa_api
|
||||
from manila.db.sqlalchemy import models as sqa_models
|
||||
from manila import exception
|
||||
from manila.openstack.common import timeutils
|
||||
from manila import quota
|
||||
from manila import share
|
||||
from manila import test
|
||||
|
@ -26,12 +26,12 @@ import uuid
|
||||
|
||||
import mock
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import timeutils
|
||||
import paramiko
|
||||
import six
|
||||
|
||||
import manila
|
||||
from manila import exception
|
||||
from manila.openstack.common import timeutils
|
||||
from manila import test
|
||||
from manila import utils
|
||||
|
||||
|
@ -39,17 +39,17 @@ from xml.sax import saxutils
|
||||
from eventlet import pools
|
||||
import netaddr
|
||||
from oslo.config import cfg
|
||||
from oslo.utils import excutils
|
||||
from oslo.utils import importutils
|
||||
from oslo.utils import timeutils
|
||||
import paramiko
|
||||
import six
|
||||
|
||||
from manila import exception
|
||||
from manila.i18n import _
|
||||
from manila.openstack.common import excutils
|
||||
from manila.openstack.common import importutils
|
||||
from manila.openstack.common import lockutils
|
||||
from manila.openstack.common import log as logging
|
||||
from manila.openstack.common import processutils
|
||||
from manila.openstack.common import timeutils
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
@ -4,14 +4,17 @@
|
||||
module=config
|
||||
module=context
|
||||
module=eventlet_backdoor
|
||||
# TODO(jaegerandi) remove excutils with next sync of oslo-incubator
|
||||
module=excutils
|
||||
module=fileutils
|
||||
# TODO(jaegerandi) remove importutils with next sync of oslo-incubator
|
||||
module=importutils
|
||||
module=jsonutils
|
||||
module=local
|
||||
module=lockutils
|
||||
module=log
|
||||
module=loopingcall
|
||||
# TODO(jaegerandi) remove network_utils with next sync of oslo-incubator
|
||||
module=network_utils
|
||||
module=policy
|
||||
module=processutils
|
||||
@ -20,9 +23,11 @@ module=scheduler.filters
|
||||
module=scheduler.weights
|
||||
module=service
|
||||
module=sslutils
|
||||
# TODO(jaegerandi) remove strutils with next sync of oslo-incubator
|
||||
module=strutils
|
||||
module=systemd
|
||||
module=threadgroup
|
||||
# TODO(jaegerandi) remove timeutils with next sync of oslo-incubator
|
||||
module=timeutils
|
||||
module=uuidutils
|
||||
module=versionutils
|
||||
|
Loading…
Reference in New Issue
Block a user