1 # ==================================================================================
2 # Copyright (c) 2019-2020 Nokia
3 # Copyright (c) 2018-2020 AT&T Intellectual Property.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 # ==================================================================================
25 Perform a healthcheck on a1
28 operationId: a1.controller.get_healthcheck
33 Anything other than a 200 should be considered a1 as failing
37 description: "Get a list of all registered policy type ids"
40 operationId: a1.controller.get_all_policy_types
43 description: "list of all registered policy type ids"
49 "$ref": "#/components/schemas/policy_type_id"
50 example: [20000, 20020]
52 description: "Potentially transient backend database error. Client should attempt to retry later."
54 '/a1-p/policytypes/{policy_type_id}':
56 - name: policy_type_id
60 "$ref": "#/components/schemas/policy_type_id"
66 operationId: a1.controller.get_policy_type
69 description: "policy type successfully found"
73 "$ref": "#/components/schemas/policy_type_schema"
78 description: "Potentially transient backend database error. Client should attempt to retry later."
81 Delete this policy type. Can only be performed if there are no instances of this type
84 operationId: a1.controller.delete_policy_type
88 policy type successfully deleted
91 Policy type cannot be deleted because there are instances
92 All instances must be removed before a policy type can be deleted
97 description: "Potentially transient backend database error. Client should attempt to retry later."
100 Create a new policy type .
101 Replace is not currently allowed; to replace, for now do a DELETE and then a PUT again.
105 operationId: a1.controller.create_policy_type
110 "$ref": "#/components/schemas/policy_type_schema"
112 name: admission_control_policy
113 description: various parameters to control admission of dual connection
114 policy_type_id: 20000
116 $schema: 'http://json-schema.org/draft-07/schema#'
127 description: Sliding window length (in minutes)
133 description: '% Connections to block'
138 description: Minimum number of events in window to trigger blocking
139 additionalProperties: false
143 description: "policy type successfully created"
145 description: "illegal ID, or object already existed"
147 description: "Potentially transient backend database error. Client should attempt to retry later."
149 '/a1-p/policytypes/{policy_type_id}/policies':
151 - name: policy_type_id
155 "$ref": "#/components/schemas/policy_type_id"
157 description: "get a list of all policy instance ids for this policy type id"
160 operationId: a1.controller.get_all_instances_for_type
163 description: "list of all policy instance ids for this policy type id"
169 "$ref": "#/components/schemas/policy_instance_id"
170 example: ["3d2157af-6a8f-4a7c-810f-38c2f824bf12", "06911bfc-c127-444a-8eb1-1bffad27cc3d"]
172 description: "Potentially transient backend database error. Client should attempt to retry later."
175 '/a1-p/policytypes/{policy_type_id}/policies/{policy_instance_id}':
177 - name: policy_type_id
181 "$ref": "#/components/schemas/policy_type_id"
183 - name: policy_instance_id
187 "$ref": "#/components/schemas/policy_instance_id"
191 Retrieve the policy instance
195 operationId: a1.controller.get_policy_instance
200 the schema of this object is defined by the create_schema field of the policy type
207 there is no policy instance with this policy_instance_id or there is no policy type with this policy_type_id
209 description: "Potentially transient backend database error. Client should attempt to retry later."
213 Delete this policy instance
217 operationId: a1.controller.delete_policy_instance
221 policy instance deletion initiated
224 there is no policy instance with this policy_instance_id or there is no policy type with this policy_type_id
226 description: "Potentially transient backend database error. Client should attempt to retry later."
230 Create or replace a policy instance of type policy_type_id.
231 The schema of the PUT body is defined by the create_schema field of the policy type.
235 operationId: a1.controller.create_or_replace_policy_instance
242 the schema of this object is defined by the create_schema field of the policy type
247 trigger_threshold: 10
252 Policy instance creation initiated
255 Bad PUT body for this policy instance
258 There is no policy type with this policy_type_id
260 description: "Potentially transient backend database error. Client should attempt to retry later."
262 '/a1-p/policytypes/{policy_type_id}/policies/{policy_instance_id}/status':
264 - name: policy_type_id
268 "$ref": "#/components/schemas/policy_type_id"
270 - name: policy_instance_id
274 "$ref": "#/components/schemas/policy_instance_id"
278 Retrieve the policy instance status across all handlers of the policy
279 If this endpoint returns successfully (200), it is either IN EFFECT or NOT IN EFFECT.
280 IN EFFECT is returned if at least one policy handler in the RIC is implementing the policy
281 NOT IN EFFECT is returned otherwise
282 If a policy instance is successfully deleted, this endpoint will return a 404 (not a 200)
285 operationId: a1.controller.get_policy_instance_status
289 successfully retrieved the status
308 there is no policy instance with this policy_instance_id or there is no policy type with this policy_type_id
310 description: "Potentially transient backend database error. Client should attempt to retry later."
321 additionalProperties: false
325 description: name of the policy type
328 description: description of the policy type
330 description: the integer of the policy type
335 jsonschema (following http://json-schema.org/draft-07/schema) of the CREATE payload to be sent to handlers of this policy
339 represents a policy type identifier. Currently this is restricted to an integer range.
346 represents a policy instance identifier. UUIDs are advisable but can be any string
348 example: "3d2157af-6a8f-4a7c-810f-38c2f824bf12"