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
changes/57/112157/2
Brant Knudson 8 years ago committed by David Stanek
parent 41ae15795e
commit b763d613b4
  1. 2
      keystone/auth/controllers.py
  2. 3
      keystone/auth/plugins/oauth1.py
  3. 3
      keystone/auth/plugins/token.py
  4. 2
      keystone/common/cache/backends/mongo.py
  5. 2
      keystone/common/sql/migrate_repo/versions/042_endpoint_enabled.py
  6. 2
      keystone/common/sql/migrate_repo/versions/044_service_enabled.py
  7. 2
      keystone/common/utils.py
  8. 2
      keystone/contrib/access/core.py
  9. 2
      keystone/contrib/federation/utils.py
  10. 2
      keystone/contrib/oauth1/backends/sql.py
  11. 3
      keystone/contrib/oauth1/controllers.py
  12. 3
      keystone/contrib/revoke/backends/kvs.py
  13. 3
      keystone/contrib/revoke/controllers.py
  14. 2
      keystone/contrib/revoke/core.py
  15. 3
      keystone/contrib/revoke/model.py
  16. 4
      keystone/exception.py
  17. 2
      keystone/models/token_model.py
  18. 2
      keystone/tests/test_auth.py
  19. 2
      keystone/tests/test_backend.py
  20. 2
      keystone/tests/test_backend_kvs.py
  21. 2
      keystone/tests/test_keystoneclient.py
  22. 2
      keystone/tests/test_revoke.py
  23. 3
      keystone/tests/test_token_provider.py
  24. 2
      keystone/tests/test_v3.py
  25. 2
      keystone/tests/test_v3_auth.py
  26. 2
      keystone/tests/test_v3_os_revoke.py
  27. 3
      keystone/tests/unit/token/test_token_model.py
  28. 2
      keystone/token/controllers.py
  29. 2
      keystone/token/persistence/backends/kvs.py
  30. 3
      keystone/token/persistence/backends/sql.py
  31. 2
      keystone/token/persistence/core.py
  32. 2
      keystone/token/provider.py
  33. 2
      keystone/token/providers/common.py
  34. 3
      keystone/trust/backends/kvs.py
  35. 3
      keystone/trust/backends/sql.py
  36. 2
      keystone/trust/controllers.py

@ -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__)

@ -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__)

@ -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__)

@ -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

@ -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):

@ -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):

@ -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

@ -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

@ -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

@ -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):

@ -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

@ -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

@ -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')

@ -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

@ -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.

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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__)

@ -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

@ -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

@ -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__)

Loading…
Cancel
Save