Use functions in oslo.utils

Keystone was using functions in oslo-incubator that have been
graduated into oslo.utils. This changes the function calls to use
the functions in oslo.utils.

Change-Id: I39365042de913e1b3edaf849e3f5578cef0b7b02
This commit is contained in:
Brant Knudson 2014-08-05 16:58:59 -05:00 committed by David Stanek
parent 41ae15795e
commit b763d613b4
36 changed files with 48 additions and 37 deletions

View File

@ -15,6 +15,7 @@
import sys
from keystoneclient.common import cms
from oslo.utils import timeutils
import six
from keystone.common import controller
@ -27,7 +28,6 @@ from keystone.i18n import _, _LI
from keystone.openstack.common import importutils
from keystone.openstack.common import jsonutils
from keystone.openstack.common import log
from keystone.openstack.common import timeutils
LOG = log.getLogger(__name__)

View File

@ -12,6 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.utils import timeutils
from keystone import auth
from keystone.common import controller
from keystone.common import dependency
@ -20,7 +22,6 @@ from keystone.contrib.oauth1 import validator
from keystone import exception
from keystone.i18n import _
from keystone.openstack.common import log
from keystone.openstack.common import timeutils
LOG = log.getLogger(__name__)

View File

@ -12,12 +12,13 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.utils import timeutils
from keystone import auth
from keystone.common import dependency
from keystone.common import wsgi
from keystone import exception
from keystone.openstack.common import log
from keystone.openstack.common import timeutils
LOG = log.getLogger(__name__)

View File

@ -17,13 +17,13 @@ import datetime
from dogpile.cache import api
from dogpile.cache import util as dp_util
from oslo.utils import timeutils
import six
from keystone import exception
from keystone.i18n import _
from keystone.openstack.common import importutils
from keystone.openstack.common import log
from keystone.openstack.common import timeutils
NO_VALUE = api.NO_VALUE

View File

@ -28,11 +28,11 @@ column.
"""
from oslo.utils import strutils
import sqlalchemy as sql
from sqlalchemy.orm import sessionmaker
from keystone.openstack.common import jsonutils
from keystone.openstack.common import strutils
def _migrate_enabled_from_extra(migrate_engine, endpoint_table):

View File

@ -28,11 +28,11 @@ column.
"""
from oslo.utils import strutils
import sqlalchemy as sql
from sqlalchemy.orm import sessionmaker
from keystone.openstack.common import jsonutils
from keystone.openstack.common import strutils
def _migrate_enabled_from_extra(migrate_engine, service_table):

View File

@ -23,6 +23,7 @@ import hashlib
import os
import pwd
from oslo.utils import strutils
import passlib.hash
import six
from six import moves
@ -33,7 +34,6 @@ from keystone import exception
from keystone.i18n import _
from keystone.openstack.common import jsonutils
from keystone.openstack.common import log
from keystone.openstack.common import strutils
CONF = config.CONF

View File

@ -12,12 +12,12 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.utils import timeutils
import webob.dec
from keystone.common import wsgi
from keystone import config
from keystone.openstack.common import log
from keystone.openstack.common import timeutils
from keystone.openstack.common import versionutils

View File

@ -15,13 +15,13 @@
import re
import jsonschema
from oslo.utils import timeutils
import six
from keystone.common import config
from keystone import exception
from keystone.i18n import _
from keystone.openstack.common import log
from keystone.openstack.common import timeutils
CONF = config.CONF

View File

@ -16,6 +16,7 @@ import datetime
import random
import uuid
from oslo.utils import timeutils
import six
from keystone.common import sql
@ -23,7 +24,6 @@ from keystone.contrib.oauth1 import core
from keystone import exception
from keystone.i18n import _
from keystone.openstack.common import jsonutils
from keystone.openstack.common import timeutils
class Consumer(sql.ModelBase, sql.DictBase):

View File

@ -14,6 +14,8 @@
"""Extensions supporting OAuth1."""
from oslo.utils import timeutils
from keystone.common import controller
from keystone.common import dependency
from keystone.common import wsgi
@ -23,7 +25,6 @@ from keystone.contrib.oauth1 import validator
from keystone import exception
from keystone.i18n import _
from keystone.openstack.common import jsonutils
from keystone.openstack.common import timeutils
CONF = config.CONF

View File

@ -12,11 +12,12 @@
import datetime
from oslo.utils import timeutils
from keystone.common import kvs
from keystone import config
from keystone.contrib import revoke
from keystone import exception
from keystone.openstack.common import timeutils
CONF = config.CONF

View File

@ -10,11 +10,12 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.utils import timeutils
from keystone.common import controller
from keystone.common import dependency
from keystone import exception
from keystone.i18n import _
from keystone.openstack.common import timeutils
@dependency.requires('revoke_api')

View File

@ -13,6 +13,7 @@
import abc
import datetime
from oslo.utils import timeutils
import six
from keystone.common import cache
@ -25,7 +26,6 @@ from keystone import exception
from keystone.i18n import _
from keystone import notifications
from keystone.openstack.common import log
from keystone.openstack.common import timeutils
CONF = config.CONF

View File

@ -10,7 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from keystone.openstack.common import timeutils
from oslo.utils import timeutils
# The set of attributes common between the RevokeEvent
# and the dictionaries created from the token Data.

View File

@ -12,12 +12,12 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.utils import encodeutils
import six
from keystone.common import config
from keystone.i18n import _
from keystone.openstack.common import log
from keystone.openstack.common import strutils
CONF = config.CONF
@ -62,7 +62,7 @@ class Error(Exception):
message = self.message_format % kwargs
except UnicodeDecodeError:
try:
kwargs = dict([(k, strutils.safe_decode(v)) for k, v in
kwargs = dict([(k, encodeutils.safe_decode(v)) for k, v in
six.iteritems(kwargs)])
except UnicodeDecodeError:
# NOTE(jamielennox): This is the complete failure case

View File

@ -12,12 +12,12 @@
"""Unified in-memory token model."""
from oslo.utils import timeutils
import six
from keystone.common import config
from keystone import exception
from keystone.i18n import _
from keystone.openstack.common import timeutils
CONF = config.CONF

View File

@ -17,6 +17,7 @@ import datetime
import uuid
import mock
from oslo.utils import timeutils
from keystone import assignment
from keystone import auth
@ -24,7 +25,6 @@ from keystone.common import authorization
from keystone.common import environment
from keystone import config
from keystone import exception
from keystone.openstack.common import timeutils
from keystone import tests
from keystone.tests import default_fixtures
from keystone.tests.ksfixtures import database

View File

@ -19,13 +19,13 @@ import mock
import uuid
from keystoneclient.common import cms
from oslo.utils import timeutils
import six
from testtools import matchers
from keystone.common import driver_hints
from keystone import config
from keystone import exception
from keystone.openstack.common import timeutils
from keystone import tests
from keystone.tests import default_fixtures
from keystone.tests import filtering

View File

@ -14,10 +14,10 @@
import datetime
import uuid
from oslo.utils import timeutils
import six
from keystone import exception
from keystone.openstack.common import timeutils
from keystone import tests
from keystone.tests import default_fixtures
from keystone.tests.ksfixtures import database

View File

@ -18,10 +18,10 @@ import uuid
import webob
import mock
from oslo.utils import timeutils
from keystone import config
from keystone.openstack.common import jsonutils
from keystone.openstack.common import timeutils
from keystone import tests
from keystone.tests import default_fixtures
from keystone.tests.ksfixtures import appserver

View File

@ -15,13 +15,13 @@ import datetime
import uuid
import mock
from oslo.utils import timeutils
from testtools import matchers
from keystone.common import dependency
from keystone import config
from keystone.contrib.revoke import model
from keystone import exception
from keystone.openstack.common import timeutils
from keystone import tests
from keystone.tests import test_backend_sql

View File

@ -14,9 +14,10 @@
import datetime
from oslo.utils import timeutils
from keystone import config
from keystone import exception
from keystone.openstack.common import timeutils
from keystone import tests
from keystone.tests import default_fixtures
from keystone import token

View File

@ -16,6 +16,7 @@ import datetime
import uuid
from lxml import etree
from oslo.utils import timeutils
import six
from testtools import matchers
@ -26,7 +27,6 @@ from keystone.common import serializer
from keystone import config
from keystone import exception
from keystone import middleware
from keystone.openstack.common import timeutils
from keystone.policy.backends import rules
from keystone import tests
from keystone.tests.ksfixtures import database

View File

@ -19,12 +19,12 @@ from testtools import testcase
import uuid
from keystoneclient.common import cms
from oslo.utils import timeutils
from keystone import auth
from keystone.common import dependency
from keystone import config
from keystone import exception
from keystone.openstack.common import timeutils
from keystone import tests
from keystone.tests import test_v3

View File

@ -13,11 +13,11 @@
import datetime
import uuid
from oslo.utils import timeutils
import six
from keystone.common import dependency
from keystone.contrib.revoke import model
from keystone.openstack.common import timeutils
from keystone.tests import test_v3
from keystone.token import provider

View File

@ -13,10 +13,11 @@
import copy
import uuid
from oslo.utils import timeutils
from keystone.common import config
from keystone import exception
from keystone.models import token_model
from keystone.openstack.common import timeutils
from keystone.tests import core
from keystone.tests import test_token_provider

View File

@ -16,6 +16,7 @@ import datetime
import sys
from keystoneclient.common import cms
from oslo.utils import timeutils
import six
from keystone.common import controller
@ -26,7 +27,6 @@ from keystone import exception
from keystone.i18n import _
from keystone.openstack.common import jsonutils
from keystone.openstack.common import log
from keystone.openstack.common import timeutils
from keystone.token import provider

View File

@ -16,6 +16,7 @@
from __future__ import absolute_import
import copy
from oslo.utils import timeutils
import six
from keystone.common import kvs
@ -23,7 +24,6 @@ from keystone import config
from keystone import exception
from keystone.i18n import _
from keystone.openstack.common import log
from keystone.openstack.common import timeutils
from keystone import token
from keystone.token import provider

View File

@ -15,12 +15,13 @@
import copy
import functools
from oslo.utils import timeutils
from keystone.common import sql
from keystone import config
from keystone import exception
from keystone.i18n import _LI
from keystone.openstack.common import log
from keystone.openstack.common import timeutils
from keystone import token
from keystone.token import provider

View File

@ -17,6 +17,7 @@
import abc
import copy
from oslo.utils import timeutils
import six
from keystone.common import cache
@ -25,7 +26,6 @@ from keystone.common import manager
from keystone import config
from keystone import exception
from keystone.openstack.common import log
from keystone.openstack.common import timeutils
from keystone.openstack.common import versionutils

View File

@ -19,6 +19,7 @@ import datetime
import sys
from keystoneclient.common import cms
from oslo.utils import timeutils
import six
from keystone.common import cache
@ -29,7 +30,6 @@ from keystone import exception
from keystone.i18n import _
from keystone.models import token_model
from keystone.openstack.common import log
from keystone.openstack.common import timeutils
from keystone.openstack.common import versionutils
from keystone.token import persistence

View File

@ -12,6 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.utils import timeutils
import six
from six.moves.urllib import parse
@ -26,7 +27,6 @@ from keystone.token import provider
from keystone.openstack.common import log
from keystone.openstack.common import timeutils
LOG = log.getLogger(__name__)

View File

@ -17,9 +17,10 @@ only to be used for testing purposes
"""
import copy
from oslo.utils import timeutils
from keystone.common import kvs
from keystone import exception
from keystone.openstack.common import timeutils
from keystone import trust as keystone_trust

View File

@ -14,10 +14,11 @@
import time
from oslo.utils import timeutils
from keystone.common import sql
from keystone import exception
from keystone.openstack.common import log
from keystone.openstack.common import timeutils
from keystone import trust

View File

@ -14,6 +14,7 @@
import uuid
from oslo.utils import timeutils
import six
from keystone import assignment
@ -23,7 +24,6 @@ from keystone import config
from keystone import exception
from keystone.i18n import _
from keystone.openstack.common import log
from keystone.openstack.common import timeutils
LOG = log.getLogger(__name__)