コード例 #1
0
def load_backends():

    # Configure and build the cache
    cache.configure_cache_region(cache.REGION)

    # Ensure that the identity driver is created before the assignment manager
    # and that the assignment driver is created before the resource manager.
    # The default resource driver depends on assignment, which in turn
    # depends on identity - hence we need to ensure the chain is available.
    _IDENTITY_API = identity.Manager()
    _ASSIGNMENT_API = assignment.Manager()

    DRIVERS = dict(assignment_api=_ASSIGNMENT_API,
                   catalog_api=catalog.Manager(),
                   credential_api=credential.Manager(),
                   endpoint_filter_api=endpoint_filter.Manager(),
                   endpoint_policy_api=endpoint_policy.Manager(),
                   federation_api=federation.Manager(),
                   id_generator_api=identity.generator.Manager(),
                   id_mapping_api=identity.MappingManager(),
                   identity_api=_IDENTITY_API,
                   policy_api=policy.Manager(),
                   resource_api=resource.Manager(),
                   role_api=assignment.RoleManager(),
                   token_api=token.persistence.Manager(),
                   trust_api=trust.Manager(),
                   token_provider_api=token.provider.Manager())

    auth.controllers.load_auth_methods()

    return DRIVERS
コード例 #2
0
ファイル: backends.py プロジェクト: carrierstack/keystone
def load_backends():

    # Configure and build the cache
    cache.configure_cache_region(cache.REGION)

    # Ensure that the identity driver is created before the assignment manager.
    # The default assignment driver is determined by the identity driver, so
    # the identity driver must be available to the assignment manager.
    _IDENTITY_API = identity.Manager()

    DRIVERS = dict(assignment_api=assignment.Manager(),
                   catalog_api=catalog.Manager(),
                   credential_api=credential.Manager(),
                   endpoint_filter_api=endpoint_filter.Manager(),
                   id_generator_api=identity.generator.Manager(),
                   id_mapping_api=identity.MappingManager(),
                   identity_api=_IDENTITY_API,
                   policy_api=policy.Manager(),
                   token_api=token.Manager(),
                   trust_api=trust.Manager(),
                   token_provider_api=token.provider.Manager())

    auth.controllers.load_auth_methods()

    return DRIVERS
コード例 #3
0
ファイル: service.py プロジェクト: aboumawada/keystone
def load_backends(include_oauth1=False):

    # Ensure that the identity driver is created before the assignment manager.
    # The default assignment driver is determined by the identity driver, so
    # the identity driver must be available to the assignment manager.
    _IDENTITY_API = identity.Manager()

    DRIVERS = dict(
        assignment_api=assignment.Manager(),
        catalog_api=catalog.Manager(),
        credential_api=credential.Manager(),
        endpoint_filter_api=endpoint_filter.Manager(),
        identity_api=_IDENTITY_API,
        policy_api=policy.Manager(),
        token_api=token.Manager(),
        trust_api=trust.Manager(),
        token_provider_api=token.provider.Manager())

    if include_oauth1:
        from keystone.contrib import oauth1
        DRIVERS['oauth1_api'] = oauth1.Manager()

    dependency.resolve_future_dependencies()

    return DRIVERS
コード例 #4
0
def load_backends():

    # Configure and build the cache
    cache.configure_cache_region(cache.REGION)

    # Ensure that the identity driver is created before the assignment manager.
    # The default assignment driver is determined by the identity driver, so
    # the identity driver must be available to the assignment manager.
    _IDENTITY_API = identity.Manager()

    DRIVERS = dict(
        assignment_api=assignment.Manager(),
        catalog_api=catalog.Manager(),
        credential_api=credential.Manager(),
        domain_config_api=resource.DomainConfigManager(),
        endpoint_filter_api=endpoint_filter.Manager(),
        endpoint_policy_api=endpoint_policy.Manager(),
        federation_api=federation.Manager(),
        id_generator_api=identity.generator.Manager(),
        id_mapping_api=identity.MappingManager(),
        identity_api=_IDENTITY_API,
        oauth_api=oauth1.Manager(),
        policy_api=policy.Manager(),
        resource_api=resource.Manager(),
        revoke_api=revoke.Manager(),
        role_api=assignment.RoleManager(),
        token_api=token.persistence.Manager(),
        trust_api=trust.Manager(),
        token_provider_api=token.provider.Manager(),
        # admin_api=moon.AdminManager(),
        # authz_api=moon.AuthzManager()
        )

    auth.controllers.load_auth_methods()

    return DRIVERS
コード例 #5
0
ファイル: service.py プロジェクト: UTSA-ICS/icsiam_keystone
CONF = config.CONF
LOG = logging.getLogger(__name__)

# Ensure the cache is configured and built before we instantiate the managers
cache.configure_cache_region(cache.REGION)

# Ensure that the identity driver is created before the assignment manager.
# The default assignment driver is determined by the identity driver, so the
# identity driver must be available to the assignment manager.
_IDENTITY_API = identity.Manager()

DRIVERS = dict(assignment_api=assignment.Manager(),
               catalog_api=catalog.Manager(),
               credentials_api=credential.Manager(),
               endpoint_filter_api=endpoint_filter.Manager(),
               identity_api=_IDENTITY_API,
               policy_api=policy.Manager(),
               token_api=token.Manager(),
               trust_api=trust.Manager(),
               token_provider_api=token.provider.Manager())

dependency.resolve_future_dependencies()


def fail_gracefully(f):
    """Logs exceptions and aborts."""
    @functools.wraps(f)
    def wrapper(*args, **kw):
        try:
            return f(*args, **kw)