blob: d10f5e582e1dcf42172ae65e423f4fdc78dfff82 [file] [log] [blame]
elinuxhenrik7f93fb62020-04-08 17:02:40 +02001.. This work is licensed under a Creative Commons Attribution 4.0 International License.
2.. http://creativecommons.org/licenses/by/4.0
3.. Copyright (C) 2020 Nordix
4
5.. _sdnc-a1-controller-api:
6
7.. |nbsp| unicode:: 0xA0
8 :trim:
9
10.. |nbh| unicode:: 0x2011
11 :trim:
12
13##################
14SDNC A1 Controller
15##################
16
17The A1 of a Near |nbh| RT |nbsp| RIC can be used through the SDNC A1 Controller.
18
19Any version of the A1 API can be used. A call to the SDNC A1 Controller always contains the actual URL to the
20Near |nbh| RT |nbsp| RIC, so here any of the supported API versions can be used. The controller just calls the provided
21URL with the provided data.
22
23Get Policy Type
24~~~~~~~~~~~~~~~
25
26POST
27++++
28
29 Gets a policy type.
30
31 **URL path:**
32 /restconf/operations/A1-ADAPTER-API:getA1PolicyType
33
34 **Parameters:**
35
36 None.
37
38 **Body:** (*Required*)
39
40 A JSON. ::
41
42 {
43 "input": {
44 "near-rt-ric-url": "<url-to-near-rt-ric-to-get-type>"
45 }
46 }
47
48 **Responses:**
49
50 200:
51 A JSON where the body tag contains the JSON object of the policy type. ::
52
53 {
54 "output": {
55 "http-status": "integer",
56 "body": "{
57 <policy-type>
58 }"
59 }
60 }
61
62 **Examples:**
63
64 Call: ::
65
66 curl -X POST "http://localhost:8282/restconf/operations/A1-ADAPTER-API:getA1PolicyType"
67 -H "Content-Type: application/json" -d "{
68 \"input\": {
69 \"near-rt-ric-url\": \"http://nearRtRic-sim1:8085/a1-p/policytypes/11\"
70 }
71 }"
72
73 Result:
74 200 ::
75
76 {
77 "output": {
78 "http-status": 200,
79 "body": "{
80 "$schema": "http://json-schema.org/draft-07/schema#",
81 "title": "Example_QoETarget_1.0.0",
82 "description": "Example QoE Target policy type",
83 "type": "object",
84 "properties": {
85 "scope": {
86 "type": "object",
87 "properties": {
88 "ueId": {
89 "type": "string"
90 },
91 "sliceId": {
92 "type": "string"
93 },
94 "qosId": {
95 "type": "string"
96 },
97 "cellId": {
98 "type": "string"
99 }
100 },
101 "additionalProperties": false,
102 "required": [
103 "ueId",
104 "sliceId"
105 ]
106 },
107 "statement": {
108 "type": "object",
109 "properties": {
110 "qoeScore": {
111 "type": "number"
112 },
113 "initialBuffering": {
114 "type": "number"
115 },
116 "reBuffFreq": {
117 "type": "number"
118 },
119 "stallRatio": {
120 "type": "number"
121 }
122 },
123 "minProperties": 1,
124 "additionalProperties": false
125 }
126 }
127 }
128 }
129 }"
130
131Put Policy
132~~~~~~~~~~
133
134POST
135++++
136
137 Creates or updates a policy instance.
138
139 **URL path:**
140 /restconf/operations/A1-ADAPTER-API:putA1Policy
141
142 **Parameters:**
143
144 None.
145
146 **Body:** (*Required*)
147
148 A JSON where the body tag contains the JSON object of the policy. ::
149
150 {
151 "input": {
152 "near-rt-ric-url": "<url-to-near-rt-ric-to-put-policy>",
153 "body": "object"
154 }
155 }
156
157 **Responses:**
158
159 200:
160 A JSON with the response. ::
161
162 {
163 "output": {
164 "http-status": "integer"
165 }
166 }
167
168 **Examples:**
169
170 Call: ::
171
172 curl -X POST "http://localhost:8282/restconf/operations/A1-ADAPTER-API:getA1PolicyType"
173 -H "Content-Type: application/json" -d "{
174 \"input\": {
175 \"near-rt-ric-url\": \"http://nearRtRic-sim1:8085/a1-p/policytypes/11/policies/3d2157af-6a8f-4a7c-810f-38c2f824bf12\",
176 \"body\": \"{
177 \"blocking_rate\":20,
178 \"enforce\":true,
179 \"trigger_threshold\":10,
180 \"window_length\":10
181 }\"
182 }
183 }"
184
185 Result:
186 200 ::
187
188 {
189 "output": {
190 "http-status": 200
191 }
192 }
193
194Get Policy
195~~~~~~~~~~
196
197POST
198++++
199
200 Gets a policy instance.
201
202 **URL path:**
203 /restconf/operations/A1-ADAPTER-API:getA1Policy
204
205 **Parameters:**
206
207 None.
208
209 **Body:** (*Required*)
210
211 A JSON. ::
212
213 {
214 "input": {
215 "near-rt-ric-url": "<url-to-near-rt-ric-to-get-policy>"
216 }
217 }
218
219 **Responses:**
220
221 200:
222 A JSON where the body tag contains the JSON object of the policy. ::
223
224 {
225 "output": {
226 "http-status": "integer",
227 "body": "{
228 <policy>
229 }"
230 }
231 }
232
233 **Examples:**
234
235 Call: ::
236
237 curl -X POST "http://localhost:8282/restconf/operations/A1-ADAPTER-API:getA1Policy"
238 -H "Content-Type: application/json" -d "{
239 \"input\": {
240 \"near-rt-ric-url\": \"http://nearRtRic-sim1:8085/a1-p/policytypes/11/policies/3d2157af-6a8f-4a7c-810f-38c2f824bf12\"
241 }
242 }"
243
244 Result:
245 200 ::
246
247 {
248 "output": {
249 "http-status": 200,
250 "body": "{
251 \"blocking_rate\": 20,
252 \"enforce\": true,
253 \"trigger_threshold\": 10,
254 \"window_length\": 10
255 }"
256 }
257 }
258
259Delete Policy
260~~~~~~~~~~~~~
261
262POST
263++++
264
265 Deletes a policy instance.
266
267 **URL path:**
268 /restconf/operations/A1-ADAPTER-API:deleteA1Policy
269
270 **Parameters:**
271
272 None.
273
274 **Body:** (*Required*)
275
276 A JSON. ::
277
278 {
279 "input": {
280 "near-rt-ric-url": "<url-to-near-rt-ric-to-delete-policy>"
281 }
282 }
283
284 **Responses:**
285
286 200:
287 A JSON with the response. ::
288
289 {
290 "output": {
291 "http-status": "integer"
292 }
293 }
294
295 **Examples:**
296
297 Call: ::
298
299 curl -X POST "http://localhost:8282/restconf/operations/A1-ADAPTER-API:deleteA1Policy"
300 -H "Content-Type: application/json" -d "{
301 \"input\": {
302 \"near-rt-ric-url\": \"http://nearRtRic-sim1:8085/a1-p/policytypes/11/policies/3d2157af-6a8f-4a7c-810f-38c2f824bf12\"
303 }
304 }"
305
306 Result:
307 200 ::
308
309 {
310 "output": {
311 "http-status": 202
312 }
313 }
314
315Get Policy Status
316~~~~~~~~~~~~~~~~~
317
318POST
319++++
320
321 Get the status of a policy instance.
322
323 **URL path:**
324 /restconf/operations/A1-ADAPTER-API:getA1PolicyStatus
325
326 **Parameters:**
327
328 None.
329
330 **Body:** (*Required*)
331
332 A JSON. ::
333
334 {
335 "input": {
336 "near-rt-ric-url": "<url-to-near-rt-ric-to-get-policy-status>"
337 }
338 }
339
340 **Responses:**
341
342 200:
343 A JSON where the body tag contains the JSON object with the policy status according to the API version used. ::
344
345 {
346 "output": {
347 "http-status": "integer",
348 "body": "{
349 <policy-status-object>
350 }"
351 }
352 }
353
354 **Examples:**
355
356 Call: ::
357
358 curl -X POST "http://localhost:8282/restconf/operations/A1-ADAPTER-API:getA1PolicyStatus"
359 -H "Content-Type: application/json" -d "{
360 \"input\": {
361 \"near-rt-ric-url\": \"http://nearRtRic-sim1:8085/a1-p/policytypes/11/policies/3d2157af-6a8f-4a7c-810f-38c2f824bf12/status\"
362 }
363 }"
364
365 Result:
366 200 ::
367
368 {
369 "output": {
370 "http-status": 200,
371 "body": "{
372 "instance_status": "IN EFFECT",
373 "has_been_deleted": "true",
374 "created_at": "Wed, 01 Apr 2020 07:45:45 GMT"
375 }"
376 }
377 }