elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 1 | .. 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 | |
elinuxhenrik | d64e33d | 2020-04-22 18:05:07 +0200 | [diff] [blame] | 13 | ###################### |
| 14 | SDNC A1 Controller API |
| 15 | ###################### |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 16 | |
| 17 | The A1 of a Near |nbh| RT |nbsp| RIC can be used through the SDNC A1 Controller. |
| 18 | |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 19 | The OSC A1 Controller supports using multiple versions of A1 API southbound. By passing the full URL for each southbound |
| 20 | A1 operation the problem of version-specific URL formats is avoided. |
| 21 | |
| 22 | Since different versions of A1 operations may use different data formats for data payloads for similar REST requests and |
| 23 | responses the data formatting requirements are flexible, so version-specific encoding/decoding is handled by the service |
| 24 | that requests the A1 operation. |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 25 | |
| 26 | Get Policy Type |
| 27 | ~~~~~~~~~~~~~~~ |
| 28 | |
| 29 | POST |
| 30 | ++++ |
| 31 | |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 32 | Gets a policy type. |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 33 | |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 34 | Definition |
| 35 | """""""""" |
| 36 | |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 37 | **URL path:** |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 38 | |
| 39 | /restconf/operations/A1-ADAPTER-API:getA1PolicyType |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 40 | |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 41 | **Parameters:** |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 42 | |
| 43 | None. |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 44 | |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 45 | **Body:** (*Required*) |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 46 | |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 47 | A JSON object. :: |
| 48 | |
| 49 | { |
| 50 | "input": { |
| 51 | "near-rt-ric-url": "<url-to-near-rt-ric-to-get-type>" |
| 52 | } |
| 53 | } |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 54 | |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 55 | **Responses:** |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 56 | |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 57 | 200: |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 58 | |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 59 | A JSON object where the body tag contains the JSON object of the policy type. :: |
| 60 | |
| 61 | { |
| 62 | "output": { |
| 63 | "http-status": "integer", |
| 64 | "body": "{ |
| 65 | <policy-type> |
| 66 | }" |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | Examples |
| 71 | """""""" |
| 72 | |
| 73 | Get a policy type from a Near |nbh| RT |nbsp| RIC that is using the OSC 2.1.0 version. The STD 1.1.3 version does not |
| 74 | support types, so this function is not available for that version. |
| 75 | |
| 76 | **Call**: :: |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 77 | |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 78 | curl -X POST "http://localhost:8282/restconf/operations/A1-ADAPTER-API:getA1PolicyType" |
| 79 | -H "Content-Type: application/json" -d '{ |
| 80 | "input": { |
| 81 | "near-rt-ric-url": "http://nearRtRic-sim1:8085/a1-p/policytypes/11" |
| 82 | } |
| 83 | }' |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 84 | |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 85 | **Result**: |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 86 | |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 87 | 200: :: |
| 88 | |
| 89 | { |
| 90 | "output": { |
| 91 | "http-status": 200, |
| 92 | "body": "{ |
| 93 | \"$schema\": \"http://json-schema.org/draft-07/schema#\", |
| 94 | \"title\": \"Example_QoETarget_1.0.0\", |
| 95 | \"description\": \"Example QoE Target policy type\", |
| 96 | \"type\": \"object\", |
| 97 | \"properties\": { |
| 98 | \"scope\": { |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 99 | \"type\": \"object\", |
| 100 | \"properties\": { |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 101 | \"ueId\": { |
| 102 | \"type\": \"string\" |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 103 | }, |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 104 | \"sliceId\": { |
| 105 | \"type\": \"string\" |
| 106 | }, |
| 107 | \"qosId\": { |
| 108 | \"type\": \"string\" |
| 109 | }, |
| 110 | \"cellId\": { |
| 111 | \"type\": \"string\" |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 112 | } |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 113 | }, |
| 114 | \"additionalProperties\": false, |
| 115 | \"required\": [ |
| 116 | \"ueId\", |
| 117 | \"sliceId\" |
| 118 | ] |
| 119 | }, |
| 120 | \"statement\": { |
| 121 | \"type\": \"object\", |
| 122 | \"properties\": { |
| 123 | \"qoeScore\": { |
| 124 | \"type\": \"number\" |
| 125 | }, |
| 126 | \"initialBuffering\": { |
| 127 | \"type\": \"number\" |
| 128 | }, |
| 129 | \"reBuffFreq\": { |
| 130 | \"type\": \"number\" |
| 131 | }, |
| 132 | \"stallRatio\": { |
| 133 | \"type\": \"number\" |
| 134 | } |
| 135 | }, |
| 136 | \"minProperties\": 1, |
| 137 | \"additionalProperties\": false |
| 138 | } |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 139 | } |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 140 | }" |
| 141 | } |
| 142 | } |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 143 | |
| 144 | Put Policy |
| 145 | ~~~~~~~~~~ |
| 146 | |
| 147 | POST |
| 148 | ++++ |
| 149 | |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 150 | Creates or updates a policy instance. |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 151 | |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 152 | Definition |
| 153 | """""""""" |
| 154 | |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 155 | **URL path:** |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 156 | |
| 157 | /restconf/operations/A1-ADAPTER-API:putA1Policy |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 158 | |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 159 | **Parameters:** |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 160 | |
| 161 | None. |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 162 | |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 163 | **Body:** (*Required*) |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 164 | |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 165 | A JSON object where the body tag contains the JSON object of the policy. :: |
| 166 | |
| 167 | { |
| 168 | "input": { |
| 169 | "near-rt-ric-url": "<url-to-near-rt-ric-to-put-policy>", |
| 170 | "body": "<policy-as-json-string>" |
| 171 | } |
| 172 | } |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 173 | |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 174 | **Responses:** |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 175 | |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 176 | 200: |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 177 | |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 178 | A JSON object with the response. :: |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 179 | |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 180 | { |
| 181 | "output": { |
| 182 | "http-status": "integer" |
| 183 | } |
| 184 | } |
| 185 | |
| 186 | Examples |
| 187 | """""""" |
| 188 | |
| 189 | **Call**: |
| 190 | |
| 191 | Create a policy in a Near |nbh| RT |nbsp| RIC that is using the OSC 2.1.0 version. :: |
| 192 | |
| 193 | curl -X POST "http://localhost:8282/restconf/operations/A1-ADAPTER-API:putA1Policy" |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 194 | -H "Content-Type: application/json" -d '{ |
| 195 | "input": { |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 196 | "near-rt-ric-url": "http://nearRtRic-sim1:8085/a1-p/policytypes/11/policies/5000", |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 197 | "body": "{ |
| 198 | "blocking_rate":20, |
| 199 | "enforce":true, |
| 200 | "trigger_threshold":10, |
| 201 | "window_length":10 |
| 202 | }" |
| 203 | } |
| 204 | }' |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 205 | |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 206 | Create a policy in a Near |nbh| RT |nbsp| RIC that is using the STD 1.1.3 version. :: |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 207 | |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 208 | curl -X POST http://localhost:8282/restconf/operations/A1-ADAPTER-API:putA1Policy |
| 209 | -H Content-Type:application/json -d '{ |
| 210 | "input": { |
| 211 | "near-rt-ric-url": "http://ricsim_g2_1:8085/A1-P/v1/policies/5000", |
| 212 | "body": "{ |
| 213 | "scope": { |
| 214 | "ueId": "ue5000", |
| 215 | "qosId": "qos5000" |
| 216 | }, |
| 217 | "qosObjective": { |
| 218 | "priorityLevel": 5000 |
| 219 | } |
| 220 | }" |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 221 | } |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 222 | }' |
| 223 | |
| 224 | **Result**: |
| 225 | |
| 226 | The result is the same irrespective of which API that is used. |
| 227 | |
| 228 | 200: :: |
| 229 | |
| 230 | { |
| 231 | "output": { |
| 232 | "http-status": 200 |
| 233 | } |
| 234 | } |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 235 | |
| 236 | Get Policy |
| 237 | ~~~~~~~~~~ |
| 238 | |
| 239 | POST |
| 240 | ++++ |
| 241 | |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 242 | Gets a policy instance. |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 243 | |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 244 | Definition |
| 245 | """""""""" |
| 246 | |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 247 | **URL path:** |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 248 | |
| 249 | /restconf/operations/A1-ADAPTER-API:getA1Policy |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 250 | |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 251 | **Parameters:** |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 252 | |
| 253 | None. |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 254 | |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 255 | **Body:** (*Required*) |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 256 | |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 257 | A JSON object. :: |
| 258 | |
| 259 | { |
| 260 | "input": { |
| 261 | "near-rt-ric-url": "<url-to-near-rt-ric-to-get-policy>" |
| 262 | } |
| 263 | } |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 264 | |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 265 | **Responses:** |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 266 | |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 267 | 200: |
| 268 | A JSON object where the body tag contains the JSON object of the policy. :: |
| 269 | |
| 270 | { |
| 271 | "output": { |
| 272 | "http-status": "integer", |
| 273 | "body": "{ |
| 274 | <result> |
| 275 | }" |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 276 | } |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 277 | } |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 278 | |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 279 | Examples |
| 280 | """""""" |
| 281 | |
| 282 | **Call**: |
| 283 | |
| 284 | Get **all** policy IDs from a Near |nbh| RT |nbsp| RIC that is using the OSC 2.1.0 version. :: |
| 285 | |
| 286 | curl -X POST http://localhost:8282/restconf/operations/A1-ADAPTER-API:getA1Policy |
| 287 | -H Content-Type:application/json -d '{ |
| 288 | "input": { |
| 289 | "near-rt-ric-url":"http://ricsim_g1_1:8085/a1-p/policytypes/11/policies" |
| 290 | } |
| 291 | }' |
| 292 | |
| 293 | Get **all** policy IDs from a Near |nbh| RT |nbsp| RIC that is using the STD 1.1.3 version. :: |
| 294 | |
| 295 | curl -X POST http://localhost:8282/restconf/operations/A1-ADAPTER-API:getA1Policy |
| 296 | -H Content-Type:application/json -d '{ |
| 297 | "input": { |
| 298 | "near-rt-ric-url":"http://ricsim_g2_1:8085/A1-P/v1/policies" |
| 299 | } |
| 300 | }' |
| 301 | |
| 302 | **Result**: |
| 303 | |
| 304 | The result is the same irrespective of which API that is used. |
| 305 | |
| 306 | 200: :: |
| 307 | |
| 308 | { |
| 309 | "output": { |
| 310 | "http-status":200, |
| 311 | "body":"[ |
| 312 | \"5000\", |
| 313 | . |
| 314 | . |
| 315 | . |
| 316 | \"6000\" |
| 317 | ]" |
| 318 | } |
| 319 | } |
| 320 | |
| 321 | **Call**: |
| 322 | |
| 323 | Get **a specific** policy from a Near |nbh| RT |nbsp| RIC that is using the OSC 2.1.0 version. :: |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 324 | |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 325 | curl -X POST "http://localhost:8282/restconf/operations/A1-ADAPTER-API:getA1Policy" |
| 326 | -H "Content-Type: application/json" -d '{ |
| 327 | "input": { |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 328 | "near-rt-ric-url": "http://nearRtRic-sim1:8085/a1-p/policytypes/11/policies/5000" |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 329 | } |
| 330 | }' |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 331 | |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 332 | Get **a specific** policy from a Near |nbh| RT |nbsp| RIC that is using the STD 1.1.3 version. :: |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 333 | |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 334 | curl -X POST http://localhost:8282/restconf/operations/A1-ADAPTER-API:getA1PolicyType |
| 335 | -H Content-Type:application/json -d '{ |
| 336 | "input": { |
| 337 | "near-rt-ric-url":"http://ricsim_g2_1:8085/A1-P/v1/policies/5000" |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 338 | } |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 339 | }' |
| 340 | |
| 341 | **Result**: |
| 342 | |
| 343 | The result is the same irrespective of which API that is used. |
| 344 | |
| 345 | 200: :: |
| 346 | |
| 347 | { |
| 348 | "output": { |
| 349 | "http-status": 200, |
| 350 | "body": "{ |
| 351 | \"blocking_rate\": 20, |
| 352 | \"enforce\": true, |
| 353 | \"trigger_threshold\": 10, |
| 354 | \"window_length\": 10 |
| 355 | }" |
| 356 | } |
| 357 | } |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 358 | |
| 359 | Delete Policy |
| 360 | ~~~~~~~~~~~~~ |
| 361 | |
| 362 | POST |
| 363 | ++++ |
| 364 | |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 365 | Deletes a policy instance. |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 366 | |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 367 | Definition |
| 368 | """""""""" |
| 369 | |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 370 | **URL path:** |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 371 | |
| 372 | /restconf/operations/A1-ADAPTER-API:deleteA1Policy |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 373 | |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 374 | **Parameters:** |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 375 | |
| 376 | None. |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 377 | |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 378 | **Body:** (*Required*) |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 379 | |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 380 | A JSON object. :: |
| 381 | |
| 382 | { |
| 383 | "input": { |
| 384 | "near-rt-ric-url": "<url-to-near-rt-ric-to-delete-policy>" |
| 385 | } |
| 386 | } |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 387 | |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 388 | **Responses:** |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 389 | |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 390 | 200: |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 391 | |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 392 | A JSON object with the response. :: |
| 393 | |
| 394 | { |
| 395 | "output": { |
| 396 | "http-status": "integer" |
| 397 | } |
| 398 | } |
| 399 | |
| 400 | Examples |
| 401 | """""""" |
| 402 | |
| 403 | **Call**: |
| 404 | |
| 405 | Delete a policy from a Near |nbh| RT |nbsp| RIC that is using the OSC 2.1.0 version. :: |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 406 | |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 407 | curl -X POST "http://localhost:8282/restconf/operations/A1-ADAPTER-API:deleteA1Policy" |
| 408 | -H "Content-Type: application/json" -d '{ |
| 409 | "input": { |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 410 | "near-rt-ric-url": "http://nearRtRic-sim1:8085/a1-p/policytypes/11/policies/5000" |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 411 | } |
| 412 | }' |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 413 | |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 414 | Delete a policy from a Near |nbh| RT |nbsp| RIC that is using the STD 1.1.3 version. :: |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 415 | |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 416 | curl -X POST "http://localhost:8282/restconf/operations/A1-ADAPTER-API:deleteA1Policy" |
| 417 | -H "Content-Type: application/json" -d '{ |
| 418 | "input": { |
| 419 | "near-rt-ric-url": "http://ricsim_g2_1:8085/A1-P/v1/policies/5000" |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 420 | } |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 421 | }' |
| 422 | |
| 423 | **Result**: |
| 424 | |
| 425 | The result is the same irrespective of which API that is used. |
| 426 | |
| 427 | 200: :: |
| 428 | |
| 429 | { |
| 430 | "output": { |
| 431 | "http-status": 202 |
| 432 | } |
| 433 | } |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 434 | |
| 435 | Get Policy Status |
| 436 | ~~~~~~~~~~~~~~~~~ |
| 437 | |
| 438 | POST |
| 439 | ++++ |
| 440 | |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 441 | Get the status of a policy instance. |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 442 | |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 443 | Definition |
| 444 | """""""""" |
| 445 | |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 446 | **URL path:** |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 447 | |
| 448 | /restconf/operations/A1-ADAPTER-API:getA1PolicyStatus |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 449 | |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 450 | **Parameters:** |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 451 | |
| 452 | None. |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 453 | |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 454 | **Body:** (*Required*) |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 455 | |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 456 | A JSON object. :: |
| 457 | |
| 458 | { |
| 459 | "input": { |
| 460 | "near-rt-ric-url": "<url-to-near-rt-ric-to-get-policy-status>" |
| 461 | } |
| 462 | } |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 463 | |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 464 | **Responses:** |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 465 | |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 466 | 200: |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 467 | |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 468 | A JSON object where the body tag contains the JSON object with the policy status according to the API version used. :: |
| 469 | |
| 470 | { |
| 471 | "output": { |
| 472 | "http-status": "integer", |
| 473 | "body": "{ |
| 474 | <policy-status-object> |
| 475 | }" |
| 476 | } |
| 477 | } |
| 478 | |
| 479 | Examples |
| 480 | """""""" |
| 481 | |
| 482 | **Call**: |
| 483 | |
| 484 | Get the policy status for a specific policy from a Near |nbh| RT |nbsp| RIC that is using the OSC 2.1.0 version. :: |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 485 | |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 486 | curl -X POST "http://localhost:8282/restconf/operations/A1-ADAPTER-API:getA1PolicyStatus" |
| 487 | -H "Content-Type: application/json" -d '{ |
| 488 | "input": { |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 489 | "near-rt-ric-url": "http://nearRtRic-sim1:8085/a1-p/policytypes/11/policies/5000/status" |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 490 | } |
| 491 | }' |
elinuxhenrik | 7f93fb6 | 2020-04-08 17:02:40 +0200 | [diff] [blame] | 492 | |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 493 | **Result**: |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 494 | |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 495 | 200: :: |
| 496 | |
| 497 | { |
| 498 | "output": { |
| 499 | "http-status": 200, |
| 500 | "body": "{ |
| 501 | \"instance_status\": \"IN EFFECT\", |
| 502 | \"has_been_deleted\": \"true\", |
| 503 | \"created_at\": \"Wed, 01 Apr 2020 07:45:45 GMT\" |
| 504 | }" |
| 505 | } |
| 506 | } |
| 507 | |
| 508 | **Call**: |
| 509 | |
| 510 | Get the policy status for a specific policy from a Near |nbh| RT |nbsp| RIC that is using the STD 1.1.3 version. :: |
| 511 | |
| 512 | curl -X POST "http://localhost:8282/restconf/operations/A1-ADAPTER-API:getA1PolicyStatus" |
| 513 | -H "Content-Type: application/json" -d '{ |
| 514 | "input": { |
| 515 | "near-rt-ric-url": "http://ricsim_g2_1:8085/A1-P/v1/policies/5000/status" |
elinuxhenrik | fea065a | 2020-04-20 16:46:26 +0200 | [diff] [blame] | 516 | } |
elinuxhenrik | 53e4604 | 2020-04-21 15:14:04 +0200 | [diff] [blame] | 517 | }' |
| 518 | |
| 519 | **Result**: |
| 520 | |
| 521 | 200: :: |
| 522 | |
| 523 | { |
| 524 | "output": { |
| 525 | "http-status": 200, |
| 526 | "body": "{ |
| 527 | \"enforceStatus\": \"UNDEFINED\" |
| 528 | }" |
| 529 | } |
| 530 | } |