Merge "Consistently use oslo_config.cfg.CONF"

This commit is contained in:
Jenkins 2015-02-19 01:07:24 +00:00 committed by Gerrit Code Review
commit ce701f2771
101 changed files with 221 additions and 201 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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 = {}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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://'

View File

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

View File

@ -14,9 +14,10 @@
import uuid
from keystone import config
from oslo_config import cfg
CONF = config.CONF
CONF = cfg.CONF
class FilterTests(object):

View File

@ -16,14 +16,14 @@ import os
import uuid
import mock
from oslo_config import cfg
from keystone import config
from keystone import exception
from keystone import identity
from keystone.tests import unit as tests
CONF = config.CONF
CONF = cfg.CONF
class TestDomainConfigs(tests.BaseTestCase):

View File

@ -16,13 +16,13 @@
from __future__ import absolute_import
import fixtures
from oslo_config import cfg
from paste import deploy
from keystone.common import environment
from keystone import config
CONF = config.CONF
CONF = cfg.CONF
MAIN = 'main'
ADMIN = 'admin'

View File

@ -16,16 +16,16 @@ import os
import shutil
import fixtures
from oslo_config import cfg
from oslo_db import options as db_options
from oslo_db.sqlalchemy import migration
from keystone.common import sql
from keystone.common.sql import migration_helpers
from keystone import config
from keystone.tests import unit as tests
CONF = config.CONF
CONF = cfg.CONF
def run_once(f):

View File

@ -17,6 +17,7 @@ import datetime
import uuid
import mock
from oslo_config import cfg
from oslo_utils import timeutils
from testtools import matchers
@ -35,7 +36,7 @@ from keystone.token import provider
from keystone import trust
CONF = config.CONF
CONF = cfg.CONF
TIME_FORMAT = '%Y-%m-%dT%H:%M:%S.%fZ'
DEFAULT_DOMAIN_ID = CONF.identity.default_domain_id

View File

@ -19,13 +19,13 @@ import uuid
from keystoneclient.common import cms
import mock
from oslo_config import cfg
from oslo_utils import timeutils
import six
from testtools import matchers
from keystone.catalog import core
from keystone.common import driver_hints
from keystone import config
from keystone import exception
from keystone.tests import unit as tests
from keystone.tests.unit import default_fixtures
@ -34,7 +34,7 @@ from keystone.tests.unit import utils as test_utils
from keystone.token import provider
CONF = config.CONF
CONF = cfg.CONF
DEFAULT_DOMAIN_ID = CONF.identity.default_domain_id
NULL_OBJECT = object()

View File

@ -14,16 +14,16 @@
import datetime
import uuid
from oslo_config import cfg
from oslo_utils import timeutils
import six
from keystone import config
from keystone import exception
from keystone.tests import unit as tests
from keystone.tests.unit import test_backend
CONF = config.CONF
CONF = cfg.CONF
class KvsToken(tests.TestCase, test_backend.TokenTests):

View File

@ -19,13 +19,13 @@ import uuid
import ldap
import mock
from oslo_config import cfg
from testtools import matchers
from keystone.common import cache
from keystone.common import ldap as common_ldap
from keystone.common.ldap import core as common_ldap_core
from keystone.common import sql
from keystone import config
from keystone import exception
from keystone import identity
from keystone.identity.mapping_backends import mapping as map
@ -38,7 +38,7 @@ from keystone.tests.unit.ksfixtures import database
from keystone.tests.unit import test_backend
CONF = config.CONF
CONF = cfg.CONF
def create_group_container(identity_api):
@ -2642,7 +2642,7 @@ class MultiLDAPandSQLIdentity(BaseLDAPIdentity, tests.SQLDriverOverrides,
"""
# Confirm that config has drivers_enabled as True, which we will
# check has been set to False later in this test
self.assertTrue(config.CONF.identity.domain_specific_drivers_enabled)
self.assertTrue(CONF.identity.domain_specific_drivers_enabled)
self.load_backends()
# Execute any command to trigger the lazy loading of domain configs
self.identity_api.list_users(

View File

@ -16,16 +16,16 @@
import ldappool
import mock
from oslo_config import cfg
from oslotest import mockpatch
from keystone.common.ldap import core as ldap_core
from keystone import config
from keystone.identity.backends import ldap
from keystone.tests import unit as tests
from keystone.tests.unit import fakeldap
from keystone.tests.unit import test_backend_ldap
CONF = config.CONF
CONF = cfg.CONF
class LdapPoolCommonTestMixin(object):

View File

@ -17,6 +17,7 @@ import functools
import uuid
import mock
from oslo_config import cfg
from oslo_db import exception as db_exception
from oslo_db import options
import sqlalchemy
@ -25,7 +26,6 @@ from testtools import matchers
from keystone.common import driver_hints
from keystone.common import sql
from keystone import config
from keystone import exception
from keystone.identity.backends import sql as identity_sql
from keystone.openstack.common import versionutils
@ -36,7 +36,7 @@ from keystone.tests.unit import test_backend
from keystone.token.persistence.backends import sql as token_sql
CONF = config.CONF
CONF = cfg.CONF
DEFAULT_DOMAIN_ID = CONF.identity.default_domain_id

View File

@ -16,14 +16,14 @@ import copy
from dogpile.cache import api
from dogpile.cache import proxy
from oslo_config import cfg
from keystone.common import cache
from keystone import config
from keystone import exception
from keystone.tests import unit as tests
CONF = config.CONF
CONF = cfg.CONF
NO_VALUE = api.NO_VALUE
@ -82,7 +82,7 @@ class CacheRegionTest(tests.TestCase):
def _add_test_caching_option(self):
self.config_fixture.register_opt(
config.config.cfg.BoolOpt('caching', default=True), group='cache')
cfg.BoolOpt('caching', default=True), group='cache')
def _get_cacheable_function(self):
SHOULD_CACHE_FN = cache.should_cache_fn('cache')

View File

@ -14,12 +14,14 @@
import uuid
from oslo_config import cfg
from keystone import config
from keystone import exception
from keystone.tests import unit as tests
CONF = config.CONF
CONF = cfg.CONF
class ConfigTestCase(tests.TestCase):

View File

@ -17,16 +17,16 @@ import time
import uuid
from keystoneclient.common import cms
from oslo_config import cfg
import six
from testtools import matchers
from keystone.common import extension as keystone_extension
from keystone import config
from keystone.contrib import revoke
from keystone.tests.unit import rest
CONF = config.CONF
CONF = cfg.CONF
class CoreApiTests(object):

View File

@ -13,13 +13,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from oslo_config import cfg
from keystone.common import environment
from keystone import config
from keystone.tests import unit as tests
from keystone.tests.unit.ksfixtures import appserver
CONF = config.CONF
CONF = cfg.CONF
class IPv6TestCase(tests.TestCase):

View File

@ -18,18 +18,18 @@ import uuid
from keystoneclient import exceptions as client_exceptions
from keystoneclient.v2_0 import client as ks_client
import mock
from oslo_config import cfg
from oslo_serialization import jsonutils
from oslo_utils import timeutils
import webob
from keystone import config
from keystone.tests import unit as tests
from keystone.tests.unit import default_fixtures
from keystone.tests.unit.ksfixtures import appserver
from keystone.tests.unit.ksfixtures import database
CONF = config.CONF
CONF = cfg.CONF
DEFAULT_DOMAIN_ID = CONF.identity.default_domain_id

View File

@ -17,15 +17,15 @@ import uuid
import ldap
import ldap.modlist
from oslo_config import cfg
from keystone import config
from keystone import exception
from keystone.identity.backends import ldap as identity_ldap
from keystone.tests import unit as tests
from keystone.tests.unit import test_backend_ldap
CONF = config.CONF
CONF = cfg.CONF
def create_object(dn, attrs):

View File

@ -15,9 +15,9 @@
import uuid
import ldappool
from oslo_config import cfg
from keystone.common.ldap import core as ldap_core
from keystone import config
from keystone.identity.backends import ldap
from keystone.tests import unit as tests
from keystone.tests.unit import fakeldap
@ -25,7 +25,7 @@ from keystone.tests.unit import test_backend_ldap_pool
from keystone.tests.unit import test_ldap_livetest
CONF = config.CONF
CONF = cfg.CONF
class LiveLDAPPoolIdentity(test_backend_ldap_pool.LdapPoolCommonTestMixin,

View File

@ -15,15 +15,15 @@
import ldap
import ldap.modlist
from oslo_config import cfg
from keystone import config
from keystone import exception
from keystone import identity
from keystone.tests import unit as tests
from keystone.tests.unit import test_ldap_livetest
CONF = config.CONF
CONF = cfg.CONF
def create_object(dn, attrs):

View File

@ -12,14 +12,14 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
import webob
from keystone import config
from keystone import middleware
from keystone.tests import unit as tests
CONF = config.CONF
CONF = cfg.CONF
def make_request(**kwargs):

View File

@ -34,6 +34,7 @@ import json
import uuid
from migrate.versioning import api as versioning_api
from oslo_config import cfg
from oslo_db import exception as db_exception
from oslo_db.sqlalchemy import migration
from oslo_db.sqlalchemy import session as db_session
@ -46,7 +47,6 @@ from keystone.assignment.backends import sql as assignment_sql
from keystone.common import sql
from keystone.common.sql import migrate_repo
from keystone.common.sql import migration_helpers
from keystone import config
from keystone.contrib import federation
from keystone.contrib import revoke
from keystone import exception
@ -55,7 +55,7 @@ from keystone.tests.unit import default_fixtures
from keystone.tests.unit.ksfixtures import database
CONF = config.CONF
CONF = cfg.CONF
DEFAULT_DOMAIN_ID = CONF.identity.default_domain_id
# NOTE(morganfainberg): This should be updated when each DB migration collapse

View File

@ -16,13 +16,14 @@
import os
import ssl
from oslo_config import cfg
from keystone.common import environment
from keystone import config
from keystone.tests import unit as tests
from keystone.tests.unit.ksfixtures import appserver
CONF = config.CONF
CONF = cfg.CONF
CERTDIR = tests.dirs.root('examples', 'pki', 'certs')
KEYDIR = tests.dirs.root('examples', 'pki', 'private')

View File

@ -14,9 +14,9 @@
import datetime
from oslo_config import cfg
from oslo_utils import timeutils
from keystone import config
from keystone import exception
from keystone.tests import unit as tests
from keystone.tests.unit import default_fixtures
@ -25,7 +25,7 @@ from keystone import token
from keystone.token.providers import pki
CONF = config.CONF
CONF = cfg.CONF
FUTURE_DELTA = datetime.timedelta(seconds=CONF.token.expiration)
CURRENT_DATE = timeutils.utcnow()

View File

@ -15,6 +15,7 @@
import datetime
import uuid
from oslo_config import cfg
from oslo_serialization import jsonutils
from oslo_utils import timeutils
import six
@ -23,7 +24,6 @@ from testtools import matchers
from keystone import auth
from keystone.common import authorization
from keystone.common import cache
from keystone import config
from keystone import exception
from keystone import middleware
from keystone.policy.backends import rules
@ -31,7 +31,7 @@ from keystone.tests import unit as tests
from keystone.tests.unit import rest
CONF = config.CONF
CONF = cfg.CONF
DEFAULT_DOMAIN_ID = 'default'
TIME_FORMAT = '%Y-%m-%dT%H:%M:%S.%fZ'

View File

@ -20,13 +20,13 @@ import uuid
from keystoneclient.common import cms
import mock
from oslo_config import cfg
from oslo_utils import timeutils
import six
from testtools import matchers
from testtools import testcase
from keystone import auth
from keystone import config
from keystone.contrib import revoke
from keystone import exception
from keystone.policy.backends import rules
@ -34,7 +34,7 @@ from keystone.tests import unit as tests
from keystone.tests.unit import test_v3
CONF = config.CONF
CONF = cfg.CONF
class TestAuthInfo(test_v3.AuthTestMixin, testcase.TestCase):

View File

@ -17,13 +17,13 @@ import json
import uuid
from keystoneclient.contrib.ec2 import utils as ec2_utils
from oslo_config import cfg
from keystone import config
from keystone import exception
from keystone.tests.unit import test_v3
CONF = config.CONF
CONF = cfg.CONF
class CredentialBaseTestCase(test_v3.RestfulTestCase):

View File

@ -17,6 +17,7 @@ import uuid
from lxml import etree
import mock
from oslo_config import cfg
from oslo_log import log
from oslo_serialization import jsonutils
from oslotest import mockpatch
@ -26,7 +27,6 @@ from saml2 import sigver
import xmldsig
from keystone.auth import controllers as auth_controllers
from keystone import config
from keystone.contrib.federation import controllers as federation_controllers
from keystone.contrib.federation import idp as keystone_idp
from keystone.contrib.federation import utils as mapping_utils
@ -37,7 +37,7 @@ from keystone.tests.unit import mapping_fixtures
from keystone.tests.unit import test_v3
CONF = config.CONF
CONF = cfg.CONF
LOG = log.getLogger(__name__)
ROOTDIR = os.path.dirname(os.path.abspath(__file__))
XMLDIR = os.path.join(ROOTDIR, 'saml2/')

View File

@ -15,16 +15,16 @@
import uuid
from oslo_config import cfg
from oslo_serialization import jsonutils
from keystone import config
from keystone.policy.backends import rules
from keystone.tests.unit import filtering
from keystone.tests.unit.ksfixtures import temporaryfile
from keystone.tests.unit import test_v3
CONF = config.CONF
CONF = cfg.CONF
class IdentityTestFilteredCase(filtering.FilterTests,

View File

@ -15,10 +15,10 @@
import copy
import uuid
from oslo_config import cfg
from oslo_serialization import jsonutils
from six.moves import urllib
from keystone import config
from keystone.contrib import oauth1
from keystone.contrib.oauth1 import controllers
from keystone.contrib.oauth1 import core
@ -27,7 +27,7 @@ from keystone.tests.unit.ksfixtures import temporaryfile
from keystone.tests.unit import test_v3
CONF = config.CONF
CONF = cfg.CONF
class OAuth1Tests(test_v3.RestfulTestCase):

View File

@ -15,9 +15,9 @@
import uuid
from oslo_config import cfg
from oslo_serialization import jsonutils
from keystone import config
from keystone import exception
from keystone.policy.backends import rules
from keystone.tests import unit as tests
@ -25,7 +25,7 @@ from keystone.tests.unit.ksfixtures import temporaryfile
from keystone.tests.unit import test_v3
CONF = config.CONF
CONF = cfg.CONF
DEFAULT_DOMAIN_ID = CONF.identity.default_domain_id

View File

@ -18,16 +18,16 @@ import functools
import random
import mock
from oslo_config import cfg
from oslo_serialization import jsonutils
from testtools import matchers as tt_matchers
from keystone.common import json_home
from keystone import config
from keystone import controllers
from keystone.tests import unit as tests
CONF = config.CONF
CONF = cfg.CONF
v2_MEDIA_TYPES = [
{

View File

@ -13,16 +13,16 @@
import copy
import uuid
from oslo_config import cfg
from oslo_utils import timeutils
from keystone.common import config
from keystone import exception
from keystone.models import token_model
from keystone.tests.unit import core
from keystone.tests.unit import test_token_provider
CONF = config.CONF
CONF = cfg.CONF
class TestKeystoneTokenModel(core.TestCase):

View File

@ -16,6 +16,7 @@ import datetime
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 timeutils
@ -24,14 +25,13 @@ import six
from keystone.common import controller
from keystone.common import dependency
from keystone.common import wsgi
from keystone import config
from keystone import exception
from keystone.i18n import _
from keystone.models import token_model
from keystone.token import provider
CONF = config.CONF
CONF = cfg.CONF
LOG = log.getLogger(__name__)

View File

@ -14,9 +14,9 @@
"""Main entry point into the Token service."""
from oslo_config import cfg
from oslo_log import log
from keystone import config
from keystone import exception
from keystone.i18n import _
from keystone.openstack.common import versionutils
@ -24,7 +24,7 @@ from keystone.token import persistence
from keystone.token import provider
CONF = config.CONF
CONF = cfg.CONF
LOG = log.getLogger(__name__)

View File

@ -16,19 +16,19 @@
from __future__ import absolute_import
import copy
from oslo_config import cfg
from oslo_log import log
from oslo_utils import timeutils
import six
from keystone.common import kvs
from keystone import config
from keystone import exception
from keystone.i18n import _, _LE, _LW
from keystone import token
from keystone.token import provider
CONF = config.CONF
CONF = cfg.CONF
LOG = log.getLogger(__name__)

View File

@ -13,11 +13,12 @@
# License for the specific language governing permissions and limitations
# under the License.
from keystone.common import config
from oslo_config import cfg
from keystone.token.persistence.backends import kvs
CONF = config.CONF
CONF = cfg.CONF
class Token(kvs.Token):

View File

@ -10,11 +10,12 @@
# License for the specific language governing permissions and limitations
# under the License.
from keystone.common import config
from oslo_config import cfg
from keystone.token.persistence.backends import memcache
CONF = config.CONF
CONF = cfg.CONF
class Token(memcache.Token):

View File

@ -15,18 +15,18 @@
import copy
import functools
from oslo_config import cfg
from oslo_log import log
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 import token
from keystone.token import provider
CONF = config.CONF
CONF = cfg.CONF
LOG = log.getLogger(__name__)

View File

@ -17,6 +17,7 @@
import abc
import copy
from oslo_config import cfg
from oslo_log import log
from oslo_utils import timeutils
import six
@ -24,13 +25,12 @@ import six
from keystone.common import cache
from keystone.common import dependency
from keystone.common import manager
from keystone import config
from keystone import exception
from keystone.i18n import _LW
from keystone.openstack.common import versionutils
CONF = config.CONF
CONF = cfg.CONF
LOG = log.getLogger(__name__)
SHOULD_CACHE = cache.should_cache_fn('token')

View File

@ -21,6 +21,7 @@ import sys
import uuid
from keystoneclient.common import cms
from oslo_config import cfg
from oslo_log import log
from oslo_utils import timeutils
import six
@ -28,7 +29,6 @@ import six
from keystone.common import cache
from keystone.common import dependency
from keystone.common import manager
from keystone import config
from keystone import exception
from keystone.i18n import _, _LE, _LW
from keystone.models import token_model
@ -37,7 +37,7 @@ from keystone.openstack.common import versionutils
from keystone.token import persistence
CONF = config.CONF
CONF = cfg.CONF
LOG = log.getLogger(__name__)
SHOULD_CACHE = cache.should_cache_fn('token')

View File

@ -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
from oslo_serialization import jsonutils
from oslo_utils import timeutils
@ -19,7 +20,6 @@ import six
from six.moves.urllib import parse
from keystone.common import dependency
from keystone import config
from keystone.contrib import federation
from keystone import exception
from keystone.i18n import _, _LE
@ -28,7 +28,7 @@ from keystone.token import provider
LOG = log.getLogger(__name__)
CONF = config.CONF
CONF = cfg.CONF
class V2TokenDataHelper(object):

View File

@ -15,18 +15,18 @@
"""Keystone PKI Token Provider"""
from keystoneclient.common import cms
from oslo_config import cfg
from oslo_log import log
from oslo_serialization import jsonutils
from keystone.common import environment
from keystone.common import utils
from keystone import config
from keystone import exception
from keystone.i18n import _, _LE
from keystone.token.providers import common
CONF = config.CONF
CONF = cfg.CONF
LOG = log.getLogger(__name__)

View File

@ -13,18 +13,18 @@
"""Keystone Compressed PKI Token Provider"""
from keystoneclient.common import cms
from oslo_config import cfg
from oslo_log import log
from oslo_serialization import jsonutils
from keystone.common import environment
from keystone.common import utils
from keystone import config
from keystone import exception
from keystone.i18n import _
from keystone.token.providers import common
CONF = config.CONF
CONF = cfg.CONF
LOG = log.getLogger(__name__)
ERROR_MESSAGE = _('Unable to sign token.')

View File

@ -14,6 +14,7 @@
import uuid
from oslo_config import cfg
from oslo_log import log
from oslo_utils import timeutils
import six
@ -22,14 +23,13 @@ from keystone import assignment
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.models import token_model
from keystone.trust import schema
CONF = config.CONF
CONF = cfg.CONF
LOG = log.getLogger(__name__)

Some files were not shown because too many files have changed in this diff Show More