Browse Source

Merge "Consistently use oslo_config.cfg.CONF"

changes/62/130962/21
Jenkins 7 years ago
committed by Gerrit Code Review
parent
commit
ce701f2771
  1. 4
      keystone/assignment/backends/ldap.py
  2. 4
      keystone/assignment/backends/sql.py
  3. 4
      keystone/assignment/controllers.py
  4. 16
      keystone/assignment/core.py
  5. 4
      keystone/assignment/role_backends/ldap.py
  6. 7
      keystone/assignment/routers.py
  7. 3
      keystone/auth/controllers.py
  8. 4
      keystone/auth/plugins/external.py
  9. 4
      keystone/catalog/backends/sql.py
  10. 4
      keystone/catalog/backends/templated.py
  11. 4
      keystone/catalog/core.py
  12. 2
      keystone/cli.py
  13. 4
      keystone/common/cache/core.py
  14. 4
      keystone/common/controller.py
  15. 4
      keystone/common/kvs/backends/memcached.py
  16. 4
      keystone/common/kvs/core.py
  17. 4
      keystone/common/openssl.py
  18. 4
      keystone/common/sql/migrate_repo/versions/034_havana.py
  19. 4
      keystone/common/sql/migration_helpers.py
  20. 4
      keystone/common/utils.py
  21. 4
      keystone/common/wsgi.py
  22. 3
      keystone/config.py
  23. 4
      keystone/contrib/endpoint_filter/backends/catalog_sql.py
  24. 4
      keystone/contrib/endpoint_filter/core.py
  25. 4
      keystone/contrib/endpoint_policy/core.py
  26. 5
      keystone/contrib/federation/controllers.py
  27. 4
      keystone/contrib/federation/core.py
  28. 4
      keystone/contrib/federation/idp.py
  29. 4
      keystone/contrib/federation/utils.py
  30. 4
      keystone/contrib/oauth1/controllers.py
  31. 4
      keystone/contrib/oauth1/core.py
  32. 4
      keystone/contrib/revoke/backends/kvs.py
  33. 4
      keystone/contrib/revoke/core.py
  34. 4
      keystone/credential/core.py
  35. 4
      keystone/exception.py
  36. 4
      keystone/identity/backends/ldap.py
  37. 5
      keystone/identity/backends/sql.py
  38. 6
      keystone/identity/controllers.py
  39. 2
      keystone/identity/core.py
  40. 4
      keystone/identity/generator.py
  41. 4
      keystone/middleware/core.py
  42. 4
      keystone/models/token_model.py
  43. 4
      keystone/policy/backends/rules.py
  44. 4
      keystone/policy/core.py
  45. 4
      keystone/resource/backends/ldap.py
  46. 4
      keystone/resource/backends/sql.py
  47. 4
      keystone/resource/controllers.py
  48. 4
      keystone/resource/core.py
  49. 4
      keystone/server/common.py
  50. 3
      keystone/server/eventlet.py
  51. 3
      keystone/server/wsgi.py
  52. 4
      keystone/service.py
  53. 4
      keystone/tests/unit/catalog/test_core.py
  54. 4
      keystone/tests/unit/common/test_ldap.py
  55. 4
      keystone/tests/unit/common/test_utils.py
  56. 3
      keystone/tests/unit/core.py
  57. 4
      keystone/tests/unit/fakeldap.py
  58. 5
      keystone/tests/unit/filtering.py
  59. 4
      keystone/tests/unit/identity/test_core.py
  60. 4
      keystone/tests/unit/ksfixtures/appserver.py
  61. 4
      keystone/tests/unit/ksfixtures/database.py
  62. 3
      keystone/tests/unit/test_auth.py
  63. 4
      keystone/tests/unit/test_backend.py
  64. 4
      keystone/tests/unit/test_backend_kvs.py
  65. 6
      keystone/tests/unit/test_backend_ldap.py
  66. 4
      keystone/tests/unit/test_backend_ldap_pool.py
  67. 4
      keystone/tests/unit/test_backend_sql.py
  68. 6
      keystone/tests/unit/test_cache.py
  69. 4
      keystone/tests/unit/test_config.py
  70. 4
      keystone/tests/unit/test_content_types.py
  71. 5
      keystone/tests/unit/test_ipv6.py
  72. 4
      keystone/tests/unit/test_keystoneclient.py
  73. 4
      keystone/tests/unit/test_ldap_livetest.py
  74. 4
      keystone/tests/unit/test_ldap_pool_livetest.py
  75. 4
      keystone/tests/unit/test_ldap_tls_livetest.py
  76. 4
      keystone/tests/unit/test_middleware.py
  77. 4
      keystone/tests/unit/test_sql_upgrade.py
  78. 5
      keystone/tests/unit/test_ssl.py
  79. 4
      keystone/tests/unit/test_token_provider.py
  80. 4
      keystone/tests/unit/test_v3.py
  81. 4
      keystone/tests/unit/test_v3_auth.py
  82. 4
      keystone/tests/unit/test_v3_credential.py
  83. 4
      keystone/tests/unit/test_v3_federation.py
  84. 4
      keystone/tests/unit/test_v3_filters.py
  85. 4
      keystone/tests/unit/test_v3_oauth1.py
  86. 4
      keystone/tests/unit/test_v3_protection.py
  87. 4
      keystone/tests/unit/test_versions.py
  88. 4
      keystone/tests/unit/token/test_token_model.py
  89. 4
      keystone/token/controllers.py
  90. 4
      keystone/token/core.py
  91. 4
      keystone/token/persistence/backends/kvs.py
  92. 5
      keystone/token/persistence/backends/memcache.py
  93. 5
      keystone/token/persistence/backends/memcache_pool.py
  94. 4
      keystone/token/persistence/backends/sql.py
  95. 4
      keystone/token/persistence/core.py
  96. 4
      keystone/token/provider.py
  97. 4
      keystone/token/providers/common.py
  98. 4
      keystone/token/providers/pki.py
  99. 4
      keystone/token/providers/pkiz.py
  100. 4
      keystone/trust/controllers.py

4
keystone/assignment/backends/ldap.py

@ -15,20 +15,20 @@ from __future__ import absolute_import
import ldap as ldap
import ldap.filter
from oslo_config import cfg
from oslo_log import log
from keystone import assignment
from keystone.assignment.role_backends import ldap as ldap_role
from keystone.common import ldap as common_ldap
from keystone.common import models
from keystone import config
from keystone import exception
from keystone.i18n import _
from keystone.identity.backends import ldap as ldap_identity
from keystone.openstack.common import versionutils
CONF = config.CONF
CONF = cfg.CONF
LOG = log.getLogger(__name__)

4
keystone/assignment/backends/sql.py

@ -12,6 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from oslo_log import log
import six
import sqlalchemy
@ -19,12 +20,11 @@ from sqlalchemy.sql.expression import false
from keystone import assignment as keystone_assignment
from keystone.common import sql
from keystone import config
from keystone import exception
from keystone.i18n import _
CONF = config.CONF
CONF = cfg.CONF
LOG = log.getLogger(__name__)

4
keystone/assignment/controllers.py

@ -19,6 +19,7 @@ import copy
import functools
import uuid
from oslo_config import cfg
from oslo_log import log
from six.moves import urllib
@ -26,13 +27,12 @@ from keystone.assignment import schema
from keystone.common import controller
from keystone.common import dependency
from keystone.common import validation
from keystone import config
from keystone import exception
from keystone.i18n import _, _LW
from keystone.models import token_model
CONF = config.CONF
CONF = cfg.CONF
LOG = log.getLogger(__name__)

16
keystone/assignment/core.py

@ -16,6 +16,7 @@
import abc
from oslo_config import cfg
from oslo_log import log
import six
@ -23,7 +24,6 @@ from keystone.common import cache
from keystone.common import dependency
from keystone.common import driver_hints
from keystone.common import manager
from keystone import config
from keystone import exception
from keystone.i18n import _
from keystone.i18n import _LI
@ -31,7 +31,7 @@ from keystone import notifications
from keystone.openstack.common import versionutils
CONF = config.CONF
CONF = cfg.CONF
LOG = log.getLogger(__name__)
SHOULD_CACHE = cache.should_cache_fn('role')
@ -242,28 +242,28 @@ class Manager(manager.Manager):
"""
self.resource_api.get_project(tenant_id)
try:
self.role_api.get_role(config.CONF.member_role_id)
self.role_api.get_role(CONF.member_role_id)
self.driver.add_role_to_user_and_project(
user_id,
tenant_id,
config.CONF.member_role_id)
CONF.member_role_id)
except exception.RoleNotFound:
LOG.info(_LI("Creating the default role %s "
"because it does not exist."),
config.CONF.member_role_id)
CONF.member_role_id)
role = {'id': CONF.member_role_id,
'name': CONF.member_role_name}
try:
self.role_api.create_role(config.CONF.member_role_id, role)
self.role_api.create_role(CONF.member_role_id, role)
except exception.Conflict:
LOG.info(_LI("Creating the default role %s failed because it "
"was already created"),
config.CONF.member_role_id)
CONF.member_role_id)
# now that default role exists, the add should succeed
self.driver.add_role_to_user_and_project(
user_id,
tenant_id,
config.CONF.member_role_id)
CONF.member_role_id)
def add_role_to_user_and_project(self, user_id, tenant_id, role_id):
self.resource_api.get_project(tenant_id)

4
keystone/assignment/role_backends/ldap.py

@ -12,18 +12,18 @@
from __future__ import absolute_import
from oslo_config import cfg
from oslo_log import log
from keystone import assignment
from keystone.common import ldap as common_ldap
from keystone.common import models
from keystone import config
from keystone import exception
from keystone.i18n import _
from keystone.identity.backends import ldap as ldap_identity
CONF = config.CONF
CONF = cfg.CONF
LOG = log.getLogger(__name__)

7
keystone/assignment/routers.py

@ -17,13 +17,16 @@
import functools
from oslo_config import cfg
from keystone.assignment import controllers
from keystone.common import json_home
from keystone.common import router
from keystone.common import wsgi
from keystone import config
CONF = cfg.CONF
build_os_inherit_relation = functools.partial(
json_home.build_v3_extension_resource_relation,
extension_name='OS-INHERIT', extension_version='1.0')
@ -162,7 +165,7 @@ class Routers(wsgi.RoutersBase):
resource_descriptions=self.v3_resources,
is_entity_implemented=False))
if config.CONF.os_inherit.enabled:
if CONF.os_inherit.enabled:
self._add_resource(
mapper, grant_controller,
path='/OS-INHERIT/domains/{domain_id}/users/{user_id}/roles/'

3
keystone/auth/controllers.py

@ -15,6 +15,7 @@
import sys
from keystoneclient.common import cms
from oslo_config import cfg
from oslo_log import log
from oslo_serialization import jsonutils
from oslo_utils import importutils
@ -33,7 +34,7 @@ from keystone.resource import controllers as resource_controllers
LOG = log.getLogger(__name__)
CONF = config.CONF
CONF = cfg.CONF
# registry of authentication methods
AUTH_METHODS = {}

4
keystone/auth/plugins/external.py

@ -16,17 +16,17 @@
import abc
from oslo_config import cfg
import six
from keystone import auth
from keystone.common import config
from keystone.common import dependency
from keystone import exception
from keystone.i18n import _
from keystone.openstack.common import versionutils
CONF = config.CONF
CONF = cfg.CONF
@six.add_metaclass(abc.ABCMeta)

4
keystone/catalog/backends/sql.py

@ -13,6 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import six
import sqlalchemy
from sqlalchemy.sql import true
@ -20,11 +21,10 @@ from sqlalchemy.sql import true
from keystone import catalog
from keystone.catalog import core
from keystone.common import sql
from keystone import config
from keystone import exception
CONF = config.CONF
CONF = cfg.CONF
class Region(sql.ModelBase, sql.DictBase):

4
keystone/catalog/backends/templated.py

@ -14,19 +14,19 @@
import os.path
from oslo_config import cfg
from oslo_log import log
import six
from keystone.catalog.backends import kvs
from keystone.catalog import core
from keystone import config
from keystone import exception
from keystone.i18n import _LC
LOG = log.getLogger(__name__)
CONF = config.CONF
CONF = cfg.CONF
def parse_templates(template_lines):

4
keystone/catalog/core.py

@ -17,6 +17,7 @@
import abc
from oslo_config import cfg
from oslo_log import log
import six
@ -25,14 +26,13 @@ from keystone.common import dependency
from keystone.common import driver_hints
from keystone.common import manager
from keystone.common import utils
from keystone import config
from keystone import exception
from keystone.i18n import _
from keystone.i18n import _LE
from keystone import notifications
CONF = config.CONF
CONF = cfg.CONF
LOG = log.getLogger(__name__)
SHOULD_CACHE = cache.should_cache_fn('catalog')

2
keystone/cli.py

@ -31,7 +31,7 @@ from keystone import identity
from keystone import token
CONF = config.CONF
CONF = cfg.CONF
LOG = log.getLogger(__name__)

4
keystone/common/cache/core.py

@ -17,15 +17,15 @@
import dogpile.cache
from dogpile.cache import proxy
from dogpile.cache import util
from oslo_config import cfg
from oslo_log import log
from oslo_utils import importutils
from keystone import config
from keystone import exception
from keystone.i18n import _, _LE
CONF = config.CONF
CONF = cfg.CONF
LOG = log.getLogger(__name__)
make_region = dogpile.cache.make_region

4
keystone/common/controller.py

@ -15,6 +15,7 @@
import functools
import uuid
from oslo_config import cfg
from oslo_log import log
import six
@ -23,14 +24,13 @@ from keystone.common import dependency
from keystone.common import driver_hints
from keystone.common import utils
from keystone.common import wsgi
from keystone import config
from keystone import exception
from keystone.i18n import _, _LW
from keystone.models import token_model
LOG = log.getLogger(__name__)
CONF = config.CONF
CONF = cfg.CONF
def v2_deprecated(f):

4
keystone/common/kvs/backends/memcached.py

@ -21,16 +21,16 @@ import time
from dogpile.cache import api
from dogpile.cache.backends import memcached
from oslo_config import cfg
from oslo_log import log
from keystone.common.cache.backends import memcache_pool
from keystone.common import manager
from keystone import config
from keystone import exception
from keystone.i18n import _
CONF = config.CONF
CONF = cfg.CONF
LOG = log.getLogger(__name__)
NO_VALUE = api.NO_VALUE

4
keystone/common/kvs/core.py

@ -22,11 +22,11 @@ from dogpile.cache import proxy
from dogpile.cache import region
from dogpile.cache import util as dogpile_util
from dogpile.core import nameregistry
from oslo_config import cfg
from oslo_log import log
from oslo_utils import importutils
import six
from keystone.common import config
from keystone import exception
from keystone.i18n import _
from keystone.i18n import _LI
@ -38,7 +38,7 @@ __all__ = ['KeyValueStore', 'KeyValueStoreLock', 'LockTimeout',
BACKENDS_REGISTERED = False
CONF = config.CONF
CONF = cfg.CONF
KEY_VALUE_STORE_REGISTRY = weakref.WeakValueDictionary()
LOCK_WINDOW = 1
LOG = log.getLogger(__name__)

4
keystone/common/openssl.py

@ -15,15 +15,15 @@
import os
from oslo_config import cfg
from oslo_log import log
from keystone.common import environment
from keystone.common import utils
from keystone import config
from keystone.i18n import _LI, _LE
LOG = log.getLogger(__name__)
CONF = config.CONF
CONF = cfg.CONF
PUBLIC_DIR_PERMS = 0o755 # -rwxr-xr-x
PRIVATE_DIR_PERMS = 0o750 # -rwxr-x---

4
keystone/common/sql/migrate_repo/versions/034_havana.py

@ -11,17 +11,17 @@
# under the License.
import migrate
from oslo_config import cfg
from oslo_log import log
import sqlalchemy as sql
from sqlalchemy import orm
from keystone.common import sql as ks_sql
from keystone.common.sql import migration_helpers
from keystone import config
LOG = log.getLogger(__name__)
CONF = config.CONF
CONF = cfg.CONF
def upgrade(migrate_engine):

4
keystone/common/sql/migration_helpers.py

@ -19,6 +19,7 @@ import sys
import migrate
from migrate import exceptions
from oslo_config import cfg
from oslo_db.sqlalchemy import migration
from oslo_serialization import jsonutils
from oslo_utils import importutils
@ -27,13 +28,12 @@ import sqlalchemy
from keystone.common import sql
from keystone.common.sql import migrate_repo
from keystone import config
from keystone import contrib
from keystone import exception
from keystone.i18n import _
CONF = config.CONF
CONF = cfg.CONF
DEFAULT_EXTENSIONS = ['revoke', 'federation']

4
keystone/common/utils.py

@ -23,6 +23,7 @@ import hashlib
import os
import pwd
from oslo_config import cfg
from oslo_log import log
from oslo_serialization import jsonutils
from oslo_utils import strutils
@ -30,12 +31,11 @@ import passlib.hash
import six
from six import moves
from keystone.common import config
from keystone import exception
from keystone.i18n import _, _LE, _LW
CONF = config.CONF
CONF = cfg.CONF
LOG = log.getLogger(__name__)

4
keystone/common/wsgi.py

@ -21,6 +21,7 @@
import copy
import urllib
from oslo_config import cfg
import oslo_i18n
from oslo_log import log
from oslo_serialization import jsonutils
@ -31,7 +32,6 @@ import six
import webob.dec
import webob.exc
from keystone.common import config
from keystone.common import dependency
from keystone.common import utils
from keystone import exception
@ -41,7 +41,7 @@ from keystone.i18n import _LW
from keystone.models import token_model
CONF = config.CONF
CONF = cfg.CONF
LOG = log.getLogger(__name__)
# Environment variable used to pass the request context

3
keystone/config.py

@ -16,13 +16,14 @@
import logging
import os
from oslo_config import cfg
from oslo_log import log
from keystone.common import config
from keystone import exception
CONF = config.CONF
CONF = cfg.CONF
setup_authentication = config.setup_authentication
configure = config.configure

4
keystone/contrib/endpoint_filter/backends/catalog_sql.py

@ -12,15 +12,15 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import six
from keystone.catalog.backends import sql
from keystone.catalog import core as catalog_core
from keystone.common import dependency
from keystone import config
from keystone import exception
CONF = config.CONF
CONF = cfg.CONF
@dependency.requires('endpoint_filter_api')

4
keystone/contrib/endpoint_filter/core.py

@ -14,17 +14,17 @@
import abc
from oslo_config import cfg
from oslo_log import log
import six
from keystone.common import dependency
from keystone.common import extension
from keystone.common import manager
from keystone import config
from keystone import exception
CONF = config.CONF
CONF = cfg.CONF
LOG = log.getLogger(__name__)
extension_data = {

4
keystone/contrib/endpoint_policy/core.py

@ -14,16 +14,16 @@
import abc
from oslo_config import cfg
from oslo_log import log
import six
from keystone.common import dependency
from keystone.common import manager
from keystone import config
from keystone import exception
from keystone.i18n import _, _LE, _LW
CONF = config.CONF
CONF = cfg.CONF
LOG = log.getLogger(__name__)

5
keystone/contrib/federation/controllers.py

@ -12,13 +12,14 @@
"""Extensions supporting Federation."""
from oslo_config import cfg
from keystone.auth import controllers as auth_controllers
from keystone.common import authorization
from keystone.common import controller
from keystone.common import dependency
from keystone.common import validation
from keystone.common import wsgi
from keystone import config
from keystone.contrib.federation import idp as keystone_idp
from keystone.contrib.federation import schema
from keystone.contrib.federation import utils
@ -27,7 +28,7 @@ from keystone.i18n import _
from keystone.models import token_model
CONF = config.CONF
CONF = cfg.CONF
class _ControllerBase(controller.V3Controller):

4
keystone/contrib/federation/core.py

@ -14,17 +14,17 @@
import abc
from oslo_config import cfg
from oslo_log import log as logging
import six
from keystone.common import dependency
from keystone.common import extension
from keystone.common import manager
from keystone import config
from keystone import exception
CONF = config.CONF
CONF = cfg.CONF
LOG = logging.getLogger(__name__)
EXTENSION_DATA = {
'name': 'OpenStack Federation APIs',

4
keystone/contrib/federation/idp.py

@ -15,6 +15,7 @@ import os
import subprocess
import uuid
from oslo_config import cfg
from oslo_log import log
from oslo_utils import timeutils
import saml2
@ -24,14 +25,13 @@ from saml2 import samlp
from saml2 import sigver
import xmldsig
from keystone.common import config
from keystone import exception
from keystone.i18n import _, _LE
from keystone.openstack.common import fileutils
LOG = log.getLogger(__name__)
CONF = config.CONF
CONF = cfg.CONF
class SAMLGenerator(object):

4
keystone/contrib/federation/utils.py

@ -15,16 +15,16 @@
import re
import jsonschema
from oslo_config import cfg
from oslo_log import log
from oslo_utils import timeutils
import six
from keystone.common import config
from keystone import exception
from keystone.i18n import _, _LW
CONF = config.CONF
CONF = cfg.CONF
LOG = log.getLogger(__name__)

4
keystone/contrib/oauth1/controllers.py

@ -14,13 +14,13 @@
"""Extensions supporting OAuth1."""
from oslo_config import cfg
from oslo_serialization import jsonutils
from oslo_utils import timeutils
from keystone.common import controller
from keystone.common import dependency
from keystone.common import wsgi
from keystone import config
from keystone.contrib.oauth1 import core as oauth1
from keystone.contrib.oauth1 import validator
from keystone import exception
@ -29,7 +29,7 @@ from keystone.models import token_model
from keystone import notifications
CONF = config.CONF
CONF = cfg.CONF
@notifications.internal(notifications.INVALIDATE_USER_OAUTH_CONSUMER_TOKENS,

4
keystone/contrib/oauth1/core.py

@ -22,12 +22,12 @@ import uuid
import oauthlib.common
from oauthlib import oauth1
from oslo_config import cfg
import six
from keystone.common import dependency
from keystone.common import extension
from keystone.common import manager
from keystone import config
from keystone import exception
from keystone import notifications
@ -57,7 +57,7 @@ class Token(object):
self.verifier = verifier
CONF = config.CONF
CONF = cfg.CONF
def token_generator(*args, **kwargs):

4
keystone/contrib/revoke/backends/kvs.py

@ -12,16 +12,16 @@
import datetime
from oslo_config import cfg
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 versionutils
CONF = config.CONF
CONF = cfg.CONF
_EVENT_KEY = 'os-revoke-events'
_KVS_BACKEND = 'openstack.kvs.Memory'

4
keystone/contrib/revoke/core.py

@ -13,6 +13,7 @@
import abc
import datetime
from oslo_config import cfg
from oslo_log import log
from oslo_utils import timeutils
import six
@ -21,7 +22,6 @@ from keystone.common import cache
from keystone.common import dependency
from keystone.common import extension
from keystone.common import manager
from keystone import config
from keystone.contrib.revoke import model
from keystone import exception
from keystone.i18n import _
@ -29,7 +29,7 @@ from keystone import notifications
from keystone.openstack.common import versionutils
CONF = config.CONF
CONF = cfg.CONF
LOG = log.getLogger(__name__)

4
keystone/credential/core.py

@ -16,17 +16,17 @@
import abc
from oslo_config import cfg
from oslo_log import log
import six
from keystone.common import dependency
from keystone.common import driver_hints
from keystone.common import manager
from keystone import config
from keystone import exception
CONF = config.CONF
CONF = cfg.CONF
LOG = log.getLogger(__name__)

4
keystone/exception.py

@ -12,15 +12,15 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from oslo_log import log
from oslo_utils import encodeutils
import six
from keystone.common import config
from keystone.i18n import _, _LW
CONF = config.CONF
CONF = cfg.CONF
LOG = log.getLogger(__name__)
# Tests use this to make exception message format errors fatal

4
keystone/identity/backends/ldap.py

@ -16,6 +16,7 @@ import uuid
import ldap
import ldap.filter
from oslo_config import cfg
from oslo_log import log
import six
@ -23,13 +24,12 @@ from keystone import clean
from keystone.common import driver_hints
from keystone.common import ldap as common_ldap
from keystone.common import models
from keystone import config
from keystone import exception
from keystone.i18n import _
from keystone import identity
CONF = config.CONF
CONF = cfg.CONF
LOG = log.getLogger(__name__)

5
keystone/identity/backends/sql.py

@ -12,9 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from keystone.common import sql
from keystone.common import utils
from keystone import config
from keystone import exception
from keystone.i18n import _
from keystone import identity
@ -24,7 +25,7 @@ from keystone import identity
from keystone.resource.backends import sql as resource_sql # noqa
CONF = config.CONF
CONF = cfg.CONF
class User(sql.ModelBase, sql.DictBase):

6
keystone/identity/controllers.py

@ -14,16 +14,16 @@
"""Workflow Logic the Identity service."""
from oslo_config import cfg
from oslo_log import log
from keystone.common import controller
from keystone.common import dependency
from keystone import config
from keystone import exception
from keystone.i18n import _, _LW
CONF = config.CONF
CONF = cfg.CONF
LOG = log.getLogger(__name__)
@ -126,7 +126,7 @@ class User(controller.V2Controller):
if user_ref['tenantId'] != old_user_ref.get('tenantId'):
if old_user_ref.get('tenantId'):
try:
member_role_id = config.CONF.member_role_id
member_role_id = CONF.member_role_id
self.assignment_api.remove_role_from_user_and_project(
user_id, old_user_ref['tenantId'], member_role_id)
except exception.NotFound:

2
keystone/identity/core.py

@ -35,7 +35,7 @@ from keystone.identity.mapping_backends import mapping
from keystone import notifications
CONF = config.CONF
CONF = cfg.CONF
LOG = log.getLogger(__name__)

4
keystone/identity/generator.py

@ -16,14 +16,14 @@
import abc
from oslo_config import cfg
import six
from keystone.common import dependency
from keystone.common import manager
from keystone import config
from keystone import exception
CONF = config.CONF
CONF = cfg.CONF
@dependency.provider('id_generator_api')

4
keystone/middleware/core.py

@ -12,20 +12,20 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from oslo_log import log
from oslo_middleware import sizelimit
from oslo_serialization import jsonutils
import six
from keystone.common import authorization
from keystone.common import config
from keystone.common import wsgi
from keystone import exception
from keystone.i18n import _LW
from keystone.models import token_model
from keystone.openstack.common import versionutils
CONF = config.CONF
CONF = cfg.CONF
LOG = log.getLogger(__name__)

4
keystone/models/token_model.py

@ -13,16 +13,16 @@
"""Unified in-memory token model."""
from keystoneclient.common import cms
from oslo_config import cfg
from oslo_utils import timeutils
import six
from keystone.common import config
from keystone.contrib import federation
from keystone import exception
from keystone.i18n import _
CONF = config.CONF
CONF = cfg.CONF
# supported token versions
V2 = 'v2.0'
V3 = 'v3.0'

4
keystone/policy/backends/rules.py

@ -17,16 +17,16 @@
import os.path
from oslo_config import cfg
from oslo_log import log
from keystone.common import utils
from keystone import config
from keystone import exception
from keystone.openstack.common import policy as common_policy
from keystone import policy
CONF = config.CONF
CONF = cfg.CONF
LOG = log.getLogger(__name__)

4
keystone/policy/core.py

@ -16,16 +16,16 @@
import abc
from oslo_config import cfg
import six
from keystone.common import dependency
from keystone.common import manager
from keystone import config
from keystone import exception
from keystone import notifications
CONF = config.CONF
CONF = cfg.CONF
@dependency.provider('policy_api')

4
keystone/resource/backends/ldap.py

@ -14,20 +14,20 @@ from __future__ import absolute_import
import uuid
from oslo_config import cfg
from oslo_log import log
from keystone import clean
from keystone.common import driver_hints
from keystone.common import ldap as common_ldap
from keystone.common import models
from keystone import config
from keystone import exception
from keystone.i18n import _
from keystone.identity.backends import ldap as ldap_identity
from keystone import resource
CONF = config.CONF
CONF = cfg.CONF
LOG = log.getLogger(__name__)

4
keystone/resource/backends/sql.py

@ -10,17 +10,17 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from oslo_log import log
from keystone import clean
from keystone.common import sql
from keystone import config
from keystone import exception
from keystone.i18n import _LE
from keystone import resource as keystone_resource
CONF = config.CONF
CONF = cfg.CONF
LOG = log.getLogger(__name__)

4
keystone/resource/controllers.py

@ -17,18 +17,18 @@
import uuid
from oslo_config import cfg
from oslo_log import log
from keystone.common import controller
from keystone.common import dependency
from keystone.common import validation
from keystone import config
from keystone import exception
from keystone.i18n import _
from keystone.resource import schema
CONF = config.CONF
CONF = cfg.CONF
LOG = log.getLogger(__name__)

4
keystone/resource/core.py

@ -14,6 +14,7 @@
import abc
from oslo_config import cfg
from oslo_log import log
import six
@ -22,14 +23,13 @@ from keystone.common import cache
from keystone.common import dependency
from keystone.common import driver_hints
from keystone.common import manager
from keystone import config
from keystone.contrib import federation
from keystone import exception
from keystone.i18n import _, _LE
from keystone import notifications
CONF = config.CONF
CONF = cfg.CONF
LOG = log.getLogger(__name__)
SHOULD_CACHE = cache.should_cache_fn('resource')

4
keystone/server/common.py

@ -12,13 +12,15 @@
# under the License.
from oslo_config import cfg
from keystone import backends
from keystone.common import dependency
from keystone.common import sql
from keystone import config
CONF = config.CONF
CONF = cfg.CONF
def configure(version=None, config_files=None):

3
keystone/server/eventlet.py

@ -18,6 +18,7 @@ import os
import socket
from oslo_concurrency import processutils
from oslo_config import cfg
import oslo_i18n
import pbr.version
@ -39,7 +40,7 @@ from keystone.server import common
from keystone import service as keystone_service
CONF = config.CONF
CONF = cfg.CONF
class ServerWrapper(object):

3
keystone/server/wsgi.py

@ -14,6 +14,7 @@
import logging
from oslo_config import cfg
import oslo_i18n
@ -30,7 +31,7 @@ from keystone.server import common
from keystone import service as keystone_service
CONF = config.CONF
CONF = cfg.CONF
def initialize_application(name):

4
keystone/service.py

@ -15,6 +15,7 @@
import functools
import sys
from oslo_config import cfg
from oslo_log import log
from paste import deploy
import routes
@ -23,7 +24,6 @@ from keystone import assignment
from keystone import auth
from keystone import catalog
from keystone.common import wsgi
from keystone import config
from keystone import controllers
from keystone import credential
from keystone import identity
@ -34,7 +34,7 @@ from keystone import token
from keystone import trust
CONF = config.CONF
CONF = cfg.CONF
LOG = log.getLogger(__name__)

4
keystone/tests/unit/catalog/test_core.py

@ -10,14 +10,14 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import testtools
from keystone.catalog import core
from keystone import config
from keystone import exception
CONF = config.CONF
CONF = cfg.CONF
class FormatUrlTests(testtools.TestCase):

4
keystone/tests/unit/common/test_ldap.py

@ -15,6 +15,7 @@ import uuid
import ldap.dn
import mock
from oslo_config import cfg
from testtools import matchers
import os
@ -23,12 +24,11 @@ import tempfile
from keystone.common import ldap as ks_ldap
from keystone.common.ldap import core as common_ldap_core
from keystone import config
from keystone.tests import unit as tests
from keystone.tests.unit import default_fixtures
from keystone.tests.unit import fakeldap
CONF = config.CONF
CONF = cfg.CONF
class DnCompareTest(tests.BaseTestCase):

4
keystone/tests/unit/common/test_utils.py

@ -13,17 +13,17 @@
import datetime
import uuid
from oslo_config import cfg
from oslo_serialization import jsonutils
from keystone.common import utils as common_utils
from keystone import config
from keystone import exception
from keystone import service
from keystone.tests import unit as tests
from keystone.tests.unit import utils
CONF = config.CONF
CONF = cfg.CONF
TZ = utils.TZ

3
keystone/tests/unit/core.py

@ -26,6 +26,7 @@ import time
import warnings
import fixtures
from oslo_config import cfg
from oslo_config import fixture as config_fixture
from oslo_log import log
import oslotest.base as oslotest
@ -83,7 +84,7 @@ def _calc_tmpdir():
TMPDIR = _calc_tmpdir()
CONF = config.CONF
CONF = cfg.CONF
log.register_options(CONF)
IN_MEM_DB_CONN_STRING = 'sqlite://'

4
keystone/tests/unit/fakeldap.py

@ -26,12 +26,12 @@ import re
import shelve
import ldap
from oslo_config import cfg
from oslo_log import log
import six
from six import moves
from keystone.common.ldap import core
from keystone import config
from keystone import exception
@ -45,7 +45,7 @@ SCOPE_NAMES = {
CONTROL_TREEDELETE = '1.2.840.113556.1.4.805'
LOG = log.getLogger(__name__)
CONF = config.CONF
CONF = cfg.CONF
def _internal_attr(attr_name, value_or_values):

5
keystone/tests/unit/filtering.py