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 successfully deleted
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 created
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
267 operationId: a1.controller.get_policy_instance_status
271 The policy instance status.
272 Returns a vector of statuses, where each contains a handler_id (opaque id of a RIC component that implements this policy) and the policy status as returned by that handler
285 [{"handler_id": "1234-5678", "status" : "OK"}, {"handler_id": "abc-def", "status" : "NOT IMPLEMENTED"}]
288 there is no policy instance with this policy_instance_id or there is no policy type with this policy_type_id
300 additionalProperties: false
304 description: name of the policy type
307 description: description of the policy type
309 description: the integer of the policy type
314 jsonschema (following http://json-schema.org/draft-07/schema) of the CREATE payload to be sent to handlers of this policy
318 represents a policy type identifier. Currently this is restricted to an integer range.
325 represents a policy instance identifier. UUIDs are advisable but can be any string
327 example: "3d2157af-6a8f-4a7c-810f-38c2f824bf12"
329 downstream_message_schema:
336 additionalProperties: false
339 description: the operation being performed
347 "$ref": "#/components/schemas/policy_type_id"
349 "$ref": "#/components/schemas/policy_instance_id"
351 description: payload for this operation
355 policy_type_id: 12345678
356 policy_instance_id: 3d2157af-6a8f-4a7c-810f-38c2f824bf12
361 trigger_threshold: 10
363 downstream_notification_schema:
370 additionalProperties: false
373 "$ref": "#/components/schemas/policy_type_id"
375 "$ref": "#/components/schemas/policy_instance_id"
378 id of the policy handler
382 the status of this policy instance in this handler
385 policy_type_id: 12345678
386 policy_instance_id: 3d2157af-6a8f-4a7c-810f-38c2f824bf12
387 handler_id: 1234-5678