keystone  18.0.0
About: OpenStack Keystone (Core Service: Identity) provides an authentication and authorization service for other OpenStack services. Provides a catalog of endpoints for all OpenStack services.
The "Victoria" series (maintained release).
  Fossies Dox: keystone-18.0.0.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

schema.py
Go to the documentation of this file.
1 # Licensed under the Apache License, Version 2.0 (the "License"); you may
2 # not use this file except in compliance with the License. You may obtain
3 # a copy of the License at
4 #
5 # http://www.apache.org/licenses/LICENSE-2.0
6 #
7 # Unless required by applicable law or agreed to in writing, software
8 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 # License for the specific language governing permissions and limitations
11 # under the License.
12 
13 from keystone.common import validation
14 from keystone.common.validation import parameter_types
15 
16 _service_properties_type = {
17  'type': 'string',
18  'minLength': 1,
19  'maxLength': 255
20 }
21 
22 _region_properties = {
23  'description': validation.nullable(parameter_types.description),
24  # NOTE(lbragstad): Regions use ID differently. The user can specify the ID
25  # or it will be generated automatically.
26  'id': {
27  'type': 'string'
28  },
29  'parent_region_id': {
30  'type': ['string', 'null']
31  }
32 }
33 
34 region_create = {
35  'type': 'object',
36  'properties': _region_properties,
37  'additionalProperties': True
38  # NOTE(lbragstad): No parameters are required for creating regions.
39 }
40 
41 region_update = {
42  'type': 'object',
43  'properties': _region_properties,
44  'minProperties': 1,
45  'additionalProperties': True
46 }
47 
48 # Schema for Service v3
49 
50 _service_properties = {
51  'enabled': parameter_types.boolean,
52  'name': parameter_types.name,
53  'type': _service_properties_type
54 }
55 
56 service_create = {
57  'type': 'object',
58  'properties': _service_properties,
59  'required': ['type'],
60  'additionalProperties': True
61 }
62 
63 service_update = {
64  'type': 'object',
65  'properties': _service_properties,
66  'minProperties': 1,
67  'additionalProperties': True
68 }
69 
70 _endpoint_properties = {
71  'enabled': parameter_types.boolean,
72  'interface': {
73  'type': 'string',
74  'enum': ['admin', 'internal', 'public']
75  },
76  'region_id': {
77  'type': 'string'
78  },
79  'region': {
80  'type': 'string'
81  },
82  'service_id': {
83  'type': 'string'
84  },
85  'url': parameter_types.url
86 }
87 
88 endpoint_create = {
89  'type': 'object',
90  'properties': _endpoint_properties,
91  'required': ['interface', 'service_id', 'url'],
92  'additionalProperties': True
93 }
94 
95 endpoint_update = {
96  'type': 'object',
97  'properties': _endpoint_properties,
98  'minProperties': 1,
99  'additionalProperties': True
100 }
101 
102 _endpoint_group_properties = {
103  'description': validation.nullable(parameter_types.description),
104  'filters': {
105  'type': 'object'
106  },
107  'name': parameter_types.name
108 }
109 
110 endpoint_group_create = {
111  'type': 'object',
112  'properties': _endpoint_group_properties,
113  'required': ['name', 'filters']
114 }
115 
116 endpoint_group_update = {
117  'type': 'object',
118  'properties': _endpoint_group_properties,
119  'minProperties': 1
120 }
keystone.common
Definition: __init__.py:1
keystone.common.validation
Definition: __init__.py:1