1 # ==================================================================================
2 # Copyright (c) 2019 Nokia
3 # Copyright (c) 2018-2019 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 '/a1-p/policytypes/{policy_type_id}':
54 - name: policy_type_id
58 "$ref": "#/components/schemas/policy_type_id"
64 operationId: a1.controller.get_policy_type
67 description: "policy type successfully found"
71 "$ref": "#/components/schemas/policy_type_schema"
77 Delete this policy type. Can only be performed if there are no instances of this type
80 operationId: a1.controller.delete_policy_type
84 policy type successfully deleted
87 Policy type cannot be deleted because there are instances
88 All instances must be removed before a policy type can be deleted
94 Create a new policy type .
95 Replace is not currently allowed; to replace, for now do a DELETE and then a PUT again.
99 operationId: a1.controller.create_policy_type
104 "$ref": "#/components/schemas/policy_type_schema"
106 name: admission_control_policy
107 description: various parameters to control admission of dual connection
108 policy_type_id: 20000
110 $schema: 'http://json-schema.org/draft-07/schema#'
121 description: Sliding window length (in minutes)
127 description: '% Connections to block'
132 description: Minimum number of events in window to trigger blocking
133 additionalProperties: false
137 description: "policy type successfully created"
139 description: "illegal ID, or object already existed"
141 '/a1-p/policytypes/{policy_type_id}/policies':
143 - name: policy_type_id
147 "$ref": "#/components/schemas/policy_type_id"
149 description: "get a list of all policy instance ids for this policy type id"
152 operationId: a1.controller.get_all_instances_for_type
155 description: "list of all policy instance ids for this policy type id"
161 "$ref": "#/components/schemas/policy_instance_id"
162 example: ["3d2157af-6a8f-4a7c-810f-38c2f824bf12", "06911bfc-c127-444a-8eb1-1bffad27cc3d"]
165 '/a1-p/policytypes/{policy_type_id}/policies/{policy_instance_id}':
167 - name: policy_type_id
171 "$ref": "#/components/schemas/policy_type_id"
173 - name: policy_instance_id
177 "$ref": "#/components/schemas/policy_instance_id"
181 Retrieve the policy instance
185 operationId: a1.controller.get_policy_instance
190 the schema of this object is defined by the create_schema field of the policy type
197 there is no policy instance with this policy_instance_id or there is no policy type with this policy_type_id
201 Delete this policy instance
205 operationId: a1.controller.delete_policy_instance
209 policy instance deletion initiated
212 there is no policy instance with this policy_instance_id
213 or there is no policy type with this policy_type_id
217 Create or replace a policy instance of type policy_type_id.
218 The schema of the PUT body is defined by the create_schema field of the policy type.
222 operationId: a1.controller.create_or_replace_policy_instance
229 the schema of this object is defined by the create_schema field of the policy type
234 trigger_threshold: 10
239 Policy instance creation initiated
242 Bad PUT body for this policy instance
245 There is no policy type with this policy_type_id
247 '/a1-p/policytypes/{policy_type_id}/policies/{policy_instance_id}/status':
249 - name: policy_type_id
253 "$ref": "#/components/schemas/policy_type_id"
255 - name: policy_instance_id
259 "$ref": "#/components/schemas/policy_instance_id"
263 Retrieve the policy instance status across all handlers of the policy
264 If this endpoint returns successfully (200), it is either IN EFFECT or NOT IN EFFECT.
265 IN EFFECT is returned if at least one policy handler in the RIC is implementing the policy
266 NOT IN EFFECT is returned otherwise
267 If a policy instance is successfully deleted, this endpoint will return a 404 (not a 200)
270 operationId: a1.controller.get_policy_instance_status
274 successfully retrieved the status
284 there is no policy instance with this policy_instance_id or there is no policy type with this policy_type_id
295 additionalProperties: false
299 description: name of the policy type
302 description: description of the policy type
304 description: the integer of the policy type
309 jsonschema (following http://json-schema.org/draft-07/schema) of the CREATE payload to be sent to handlers of this policy
313 represents a policy type identifier. Currently this is restricted to an integer range.
320 represents a policy instance identifier. UUIDs are advisable but can be any string
322 example: "3d2157af-6a8f-4a7c-810f-38c2f824bf12"
324 downstream_message_schema:
331 additionalProperties: false
334 description: the operation being performed
342 "$ref": "#/components/schemas/policy_type_id"
344 "$ref": "#/components/schemas/policy_instance_id"
346 description: payload for this operation
350 policy_type_id: 12345678
351 policy_instance_id: 3d2157af-6a8f-4a7c-810f-38c2f824bf12
356 trigger_threshold: 10
358 downstream_notification_schema:
365 additionalProperties: false
368 "$ref": "#/components/schemas/policy_type_id"
370 "$ref": "#/components/schemas/policy_instance_id"
373 id of the policy handler
377 the status of this policy instance in this handler
384 policy_type_id: 12345678
385 policy_instance_id: 3d2157af-6a8f-4a7c-810f-38c2f824bf12
386 handler_id: 1234-5678