1 # ==================================================================================
2 # Copyright (c) 2019-2020 Nokia
3 # Copyright (c) 2018-2020 AT&T Intellectual Property.
4 # Copyright (c) 2020 Nordix Foundation, Modifications
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
17 # ==================================================================================
26 Perform a healthcheck on a1
29 operationId: a1.get_healthcheck
34 Anything other than a 200 should be considered a1 as failing
38 description: "Get a list of all registered policy type ids"
41 operationId: a1.get_all_policy_types
44 description: "list of all registered policy type ids"
50 "$ref": "#/components/schemas/policy_type_id"
51 example: [20000, 20020]
53 description: "Potentially transient backend database error. Client should attempt to retry later."
55 '/a1-p/policytypes/{policy_type_id}':
57 - name: policy_type_id
61 "$ref": "#/components/schemas/policy_type_id"
67 operationId: a1.get_policy_type
70 description: "policy type successfully found"
74 "$ref": "#/components/schemas/policy_type_schema"
79 description: "Potentially transient backend database error. Client should attempt to retry later."
82 Delete this policy type. Can only be performed if there are no instances of this type
85 operationId: a1.delete_policy_type
89 policy type successfully deleted
92 Policy type cannot be deleted because there are instances
93 All instances must be removed before a policy type can be deleted
98 description: "Potentially transient backend database error. Client should attempt to retry later."
101 Create a new policy type .
102 Replace is not currently allowed; to replace, for now do a DELETE and then a PUT again.
106 operationId: a1.create_policy_type
111 "$ref": "#/components/schemas/policy_type_schema"
113 name: admission_control_policy
114 description: various parameters to control admission of dual connection
115 policy_type_id: 20000
117 $schema: 'http://json-schema.org/draft-07/schema#'
128 description: Sliding window length (in minutes)
134 description: '% Connections to block'
139 description: Minimum number of events in window to trigger blocking
140 additionalProperties: false
144 description: "policy type successfully created"
146 description: "illegal ID, or object already existed"
148 description: "Potentially transient backend database error. Client should attempt to retry later."
150 '/a1-p/policytypes/{policy_type_id}/policies':
152 - name: policy_type_id
156 "$ref": "#/components/schemas/policy_type_id"
158 description: "get a list of all policy instance ids for this policy type id"
161 operationId: a1.get_all_policy_identities
164 description: "list of all policy instance ids for this policy type id"
170 "$ref": "#/components/schemas/policy_instance_id"
171 example: ["3d2157af-6a8f-4a7c-810f-38c2f824bf12", "06911bfc-c127-444a-8eb1-1bffad27cc3d"]
173 description: "Potentially transient backend database error. Client should attempt to retry later."
176 '/a1-p/policytypes/{policy_type_id}/policies/{policy_instance_id}':
178 - name: policy_type_id
182 "$ref": "#/components/schemas/policy_type_id"
184 - name: policy_instance_id
188 "$ref": "#/components/schemas/policy_instance_id"
192 Retrieve the policy instance
196 operationId: a1.get_policy_instance
201 the schema of this object is defined by the create_schema field of the policy type
208 there is no policy instance with this policy_instance_id or there is no policy type with this policy_type_id
210 description: "Potentially transient backend database error. Client should attempt to retry later."
214 Delete this policy instance
218 operationId: a1.delete_policy_instance
222 policy instance deletion initiated
225 there is no policy instance with this policy_instance_id or there is no policy type with this policy_type_id
227 description: "Potentially transient backend database error. Client should attempt to retry later."
231 Create or replace a policy instance of type policy_type_id.
232 The schema of the PUT body is defined by the create_schema field of the policy type.
236 operationId: a1.create_or_replace_policy_instance
243 the schema of this object is defined by the create_schema field of the policy type
248 trigger_threshold: 10
253 Policy instance creation initiated
256 Bad PUT body for this policy instance
259 There is no policy type with this policy_type_id
261 description: "Potentially transient backend database error. Client should attempt to retry later."
263 '/a1-p/policytypes/{policy_type_id}/policies/{policy_instance_id}/status':
265 - name: policy_type_id
269 "$ref": "#/components/schemas/policy_type_id"
271 - name: policy_instance_id
275 "$ref": "#/components/schemas/policy_instance_id"
279 Retrieve the policy instance status across all handlers of the policy
280 If this endpoint returns successfully (200), it is either IN EFFECT or NOT IN EFFECT.
281 IN EFFECT is returned if at least one policy handler in the RIC is implementing the policy
282 NOT IN EFFECT is returned otherwise
283 If a policy instance is successfully deleted, this endpoint will return a 404 (not a 200)
286 operationId: a1.get_policy_instance_status
290 successfully retrieved the status
309 there is no policy instance with this policy_instance_id or there is no policy type with this policy_type_id
311 description: "Potentially transient backend database error. Client should attempt to retry later."
322 additionalProperties: false
326 description: name of the policy type
329 description: description of the policy type
331 description: the integer of the policy type
336 jsonschema (following http://json-schema.org/draft-07/schema) of the CREATE payload to be sent to handlers of this policy
340 represents a policy type identifier. Currently this is restricted to an integer range.
347 represents a policy instance identifier. UUIDs are advisable but can be any string
349 example: "3d2157af-6a8f-4a7c-810f-38c2f824bf12"