summaryrefslogtreecommitdiff
path: root/keystone/api/_shared/json_home_relations.py
blob: 997fcca52790e9a4f7bb49a5ed37e3ac97dd172f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#    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-OAUTH2 "extension"
os_oauth2_resource_rel_func = functools.partial(
    json_home.build_v3_extension_resource_relation,
    extension_name='OS-OAUTH2', extension_version='1.0')
os_oauth2_parameter_rel_func = functools.partial(
    json_home.build_v3_extension_parameter_relation,
    extension_name='OS-OAUTH2', 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')