35c9bb7eff
Convert S3 and EC2 auth to flask native dispatching. Test changes required: * Eliminate direct reference of the EC2 / S3 controllers, originally this direct reference was to verify signature checking. Since signature checking is an @staticmethod now, direct reference of the API resources covers everything. * Direct import of keystone.common.controller - due to an oddity in how our WSGI code work(s) in test, if nothing imports the common controller module, the tests fail using the oslo import_class mechanism. Change-Id: I06e95957b3ea3a55b0da28959548bd5eb628c70b Partial-Bug: #1776504
88 lines
3.5 KiB
Python
88 lines
3.5 KiB
Python
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
# not use this file except in compliance with the License. You may obtain
|
|
# a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
|
|
# NOTE(morgan): This module contains json_home partial functions for
|
|
# what were called "extensions" before. As keystone does not have extensions
|
|
# any longer, once Keystone is converted to flask fully, there should be no
|
|
# reason to add more elements to this module.
|
|
|
|
import functools
|
|
|
|
from keystone.common import json_home
|
|
|
|
# OS-EC2 "extension"
|
|
os_ec2_resource_rel_func = functools.partial(
|
|
json_home.build_v3_extension_resource_relation,
|
|
extension_name='OS-EC2', extension_version='1.0')
|
|
|
|
# s3token "extension"
|
|
s3_token_resource_rel_func = functools.partial(
|
|
json_home.build_v3_extension_resource_relation,
|
|
extension_name='s3tokens', extension_version='1.0')
|
|
|
|
# OS-EP-FILTER "extension"
|
|
os_ep_filter_resource_rel_func = functools.partial(
|
|
json_home.build_v3_extension_resource_relation,
|
|
extension_name='OS-EP-FILTER', extension_version='1.0')
|
|
os_ep_filter_parameter_rel_func = functools.partial(
|
|
json_home.build_v3_extension_parameter_relation,
|
|
extension_name='OS-EP-FILTER', extension_version='1.0')
|
|
|
|
# OS-OAUTH1 "extension"
|
|
os_oauth1_resource_rel_func = functools.partial(
|
|
json_home.build_v3_extension_resource_relation,
|
|
extension_name='OS-OAUTH1', extension_version='1.0')
|
|
os_oauth1_parameter_rel_func = functools.partial(
|
|
json_home.build_v3_extension_parameter_relation,
|
|
extension_name='OS-OAUTH1', extension_version='1.0')
|
|
|
|
# OS-REVOKE "extension"
|
|
os_revoke_resource_rel_func = functools.partial(
|
|
json_home.build_v3_extension_resource_relation,
|
|
extension_name='OS-REVOKE', extension_version='1.0')
|
|
|
|
# OS-SIMPLE-CERT "extension"
|
|
os_simple_cert_resource_rel_func = functools.partial(
|
|
json_home.build_v3_extension_resource_relation,
|
|
extension_name='OS-SIMPLE-CERT', extension_version='1.0')
|
|
|
|
# OS-TRUST "extension"
|
|
os_trust_resource_rel_func = functools.partial(
|
|
json_home.build_v3_extension_resource_relation, extension_name='OS-TRUST',
|
|
extension_version='1.0')
|
|
os_trust_parameter_rel_func = functools.partial(
|
|
json_home.build_v3_extension_parameter_relation, extension_name='OS-TRUST',
|
|
extension_version='1.0')
|
|
|
|
# OS-ENDPOINT-POLICY "extension"
|
|
os_endpoint_policy_resource_rel_func = functools.partial(
|
|
json_home.build_v3_extension_resource_relation,
|
|
extension_name='OS-ENDPOINT-POLICY', extension_version='1.0')
|
|
|
|
# OS-FEDERATION "extension"
|
|
os_federation_resource_rel_func = functools.partial(
|
|
json_home.build_v3_extension_resource_relation,
|
|
extension_name='OS-FEDERATION', extension_version='1.0')
|
|
os_federation_parameter_rel_func = functools.partial(
|
|
json_home.build_v3_extension_parameter_relation,
|
|
extension_name='OS-FEDERATION', extension_version='1.0')
|
|
|
|
# OS-INHERIT "extension"
|
|
os_inherit_resource_rel_func = functools.partial(
|
|
json_home.build_v3_extension_resource_relation,
|
|
extension_name='OS-INHERIT', extension_version='1.0')
|
|
|
|
# OS-PKI (revoked) "extension"
|
|
os_pki_resource_rel_func = functools.partial(
|
|
json_home.build_v3_extension_resource_relation,
|
|
extension_name='OS-PKI', extension_version='1.0')
|