Use oslo_utils instead of deprecated oslo.utils
oslo.utils 1.2.0 has changed its namespace from oslo.utils to oslo_utils, the old import style of oslo.utils still can work but it is deprecated. Change-Id: Ifab8a092fab84609598052008457cdd83633513a
This commit is contained in:
parent
7e29efb9aa
commit
ac17de979e
|
@ -40,7 +40,7 @@ Base utilities to build API operation managers and objects on top of.
|
|||
import abc
|
||||
import copy
|
||||
|
||||
from oslo.utils import strutils
|
||||
from oslo_utils import strutils
|
||||
import six
|
||||
from six.moves.urllib import parse
|
||||
|
||||
|
|
|
@ -34,8 +34,8 @@ try:
|
|||
except ImportError:
|
||||
import json
|
||||
|
||||
from oslo.utils import encodeutils
|
||||
from oslo.utils import importutils
|
||||
from oslo_utils import encodeutils
|
||||
from oslo_utils import importutils
|
||||
import requests
|
||||
|
||||
from openstack.common._i18n import _
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#
|
||||
########################################################################
|
||||
|
||||
from oslo.utils import encodeutils
|
||||
from oslo_utils import encodeutils
|
||||
from oslo_utils import uuidutils
|
||||
import six
|
||||
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
|
||||
import collections
|
||||
|
||||
from oslo.utils import timeutils
|
||||
from oslo_concurrency import lockutils
|
||||
from oslo_utils import timeutils
|
||||
|
||||
from openstack.common.cache import backends
|
||||
|
||||
|
|
|
@ -24,8 +24,8 @@ import os
|
|||
import sys
|
||||
import textwrap
|
||||
|
||||
from oslo.utils import encodeutils
|
||||
from oslo.utils import strutils
|
||||
from oslo_utils import encodeutils
|
||||
from oslo_utils import strutils
|
||||
import prettytable
|
||||
import six
|
||||
from six import moves
|
||||
|
|
|
@ -29,7 +29,7 @@ import base64
|
|||
|
||||
from Crypto.Hash import HMAC
|
||||
from Crypto import Random
|
||||
from oslo.utils import importutils
|
||||
from oslo_utils import importutils
|
||||
import six
|
||||
|
||||
from openstack.common._i18n import _
|
||||
|
|
|
@ -20,7 +20,7 @@ import os
|
|||
import stat
|
||||
import tempfile
|
||||
|
||||
from oslo.utils import excutils
|
||||
from oslo_utils import excutils
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ Helper methods to deal with images.
|
|||
|
||||
import re
|
||||
|
||||
from oslo.utils import strutils
|
||||
from oslo_utils import strutils
|
||||
|
||||
from openstack.common._i18n import _
|
||||
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
|
||||
import copy
|
||||
|
||||
from oslo.utils import timeutils
|
||||
from oslo_config import cfg
|
||||
from oslo_utils import timeutils
|
||||
|
||||
memcache_opts = [
|
||||
cfg.ListOpt('memcached_servers',
|
||||
|
|
|
@ -20,9 +20,9 @@ import copy
|
|||
import datetime
|
||||
import logging
|
||||
|
||||
from oslo.utils import importutils
|
||||
from oslo.utils import timeutils
|
||||
from oslo_config import cfg
|
||||
from oslo_utils import importutils
|
||||
from oslo_utils import timeutils
|
||||
import six
|
||||
|
||||
from openstack.common._i18n import _, _LE
|
||||
|
|
|
@ -56,7 +56,7 @@ import os
|
|||
import signal
|
||||
import sys
|
||||
|
||||
from oslo.utils import timeutils
|
||||
from oslo_utils import timeutils
|
||||
|
||||
from openstack.common.report.generators import conf as cgen
|
||||
from openstack.common.report.generators import threading as tgen
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
import operator
|
||||
|
||||
from oslo.utils import strutils
|
||||
from oslo_utils import strutils
|
||||
|
||||
# 1. The following operations are supported:
|
||||
# =, s==, s!=, s>=, s>, s<=, s<, <in>, <is>, <or>, ==, !=, >=, <=
|
||||
|
|
|
@ -150,7 +150,7 @@ class TestGuruMeditationReport(base.BaseTestCase):
|
|||
os.kill(os.getpid(), signal.SIGUSR1)
|
||||
self.assertIn('Guru Meditation', sys.stderr.getvalue())
|
||||
|
||||
@mock.patch('oslo.utils.timeutils.strtime', return_value="NOW")
|
||||
@mock.patch('oslo_utils.timeutils.strtime', return_value="NOW")
|
||||
def test_register_autorun_log_dir(self, mock_strtime):
|
||||
log_dir = self.useFixture(fixtures.TempDir()).path
|
||||
gmr.TextGuruMeditation.setup_autorun(
|
||||
|
|
Loading…
Reference in New Issue