aboutsummaryrefslogtreecommitdiffstats
path: root/docs/development/actors/so/so.rst
blob: c7663d8b46c4141fe7158be747e14f4b91b6ae32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
.. This work is licensed under a
.. Creative Commons Attribution 4.0 International License.
.. http://creativecommons.org/licenses/by/4.0

.. _so-label:

##########
SO Actor
##########

.. contents::
    :depth: 3

Overview of SO Actor
######################
ONAP Policy Framework enables SO as one of the supported actors.  SO uses a REST-based
interface.  However, as requests may not complete right away, a REST-based polling
interface is used to check the status of the request.  The *requestId* is extracted
from the initial response and is appended to the *pathGet* configuration parameter to
generate the URL used to poll for completion.

Each operation supported by the actor is associated with its own java class, which is
responsible for populating the request structure appropriately and sending the request.
Note: the request may be issued via POST, DELETE, etc., depending on the operation.
The operation-specific classes are all derived from the *SoOperation* class, which is,
itself, derived from *HttpOperation*.  The following operations are currently supported:

- VF Module Create
- VF Module Delete


Request
#######

A number of nested structures are populated within the request.  Several of them are
populated with data extracted from the A&AI Custom Query response that is retrieved
using the Target resource ID specified in the *ControlLoopOperationParams*.  The
following table lists the contents of some of the fields that appear within these
structures.

+----------------------------------+---------+----------------------------------------------------------------------+
| Field Name                       |  Type   |                         Description                                  |
+----------------------------------+---------+----------------------------------------------------------------------+
+----------------------------------+---------+----------------------------------------------------------------------+
| top level:                       |         |                                                                      |
+----------------------------------+---------+----------------------------------------------------------------------+
| *operationType*                  | string  |   Inserted by Policy. Name of the operation.                         |
+----------------------------------+---------+----------------------------------------------------------------------+
+----------------------------------+---------+----------------------------------------------------------------------+
| requestDetails:                  |         |                                                                      |
+----------------------------------+---------+----------------------------------------------------------------------+
| requestParameters                |         |   Applicable to *VF Module Create*.                                  |
|                                  |         |   Set by Policy from the *requestParameters* specified in the        |
|                                  |         |   *payload* of the *ControlLoopOperationParams*.                     |
|                                  |         |   The value is treated as a JSON string and decoded into an          |
|                                  |         |   *SoRequestParameters* object that is placed into this field.       |
+----------------------------------+---------+----------------------------------------------------------------------+
| configurationParameters          |         |   Applicable to *VF Module Create*.                                  |
|                                  |         |   Set by Policy from the *configurationParameters* specified in the  |
|                                  |         |   *payload* of the *ControlLoopOperationParams*.                     |
|                                  |         |   The value is treated as a JSON string and decoded into a           |
|                                  |         |   *List* of *Maps* that is placed into this field.                   |
+----------------------------------+---------+----------------------------------------------------------------------+
+----------------------------------+---------+----------------------------------------------------------------------+
| modelInfo:                       |         |   Set by Policy.  Copied from the *target* specified in the          |
|                                  |         |   *ControlLoopOperationParams*.                                      |
+----------------------------------+---------+----------------------------------------------------------------------+
+----------------------------------+---------+----------------------------------------------------------------------+
| cloudConfiguration:              |         |                                                                      |
+----------------------------------+---------+----------------------------------------------------------------------+
| *tenantId*                       | string  |   The ID of the "default" Tenant selected from the A&AI Custom Query |
|                                  |         |   response.                                                          |
+----------------------------------+---------+----------------------------------------------------------------------+
| *lcpCloudRegionId*               | string  |   The ID of the "default" Cloud Region selected from the A&AI Custom |
|                                  |         |   Query response.                                                    |
+----------------------------------+---------+----------------------------------------------------------------------+
+----------------------------------+---------+----------------------------------------------------------------------+
| relatedInstanceList[0]:          |         |   Applicable to *VF Module Create*.                                  |
|                                  |         |   The "default" Service Instance selected from the A&AI Custom Query |
|                                  |         |   response.                                                          |
+----------------------------------+---------+----------------------------------------------------------------------+
+----------------------------------+---------+----------------------------------------------------------------------+
| relatedInstanceList[1]:          |         |   Applicable to *VF Module Create*.                                  |
|                                  |         |   The VNF selected from the A&AI Custom Query                        |
|                                  |         |   response.                                                          |
+----------------------------------+---------+----------------------------------------------------------------------+


Examples
########

Suppose the *ControlLoopOperationParams* were populated as follows:

.. code-block:: bash

        {
            "actor": "SO",
            "operation": "Reroute",
            "target": {
                "modelInvariantId": "2246ebc9-9b9f-42d0-a5e4-0248324fb884",
                "modelName": "VlbCdsSb00..vdns..module-3",
                "modelVersion": "1",
                "modelCustomizationUuid": "3a74410a-6c74-4a32-94b2-71488be6da1a",
                "modelVersionId": "1f94cedb-f656-4ddb-9f55-60ba1fc7d4b1",
                "modelCustomizationId": "3a74410a-6c74-4a32-94b2-71488be6da1a",
                "modelUuid": "1f94cedb-f656-4ddb-9f55-60ba1fc7d4b1",
                "modelInvariantUuid": "2246ebc9-9b9f-42d0-a5e4-0248324fb884"
            },
            "context": {
                "cqdata": {
                    "tenant": {
                        "id": "41d6d38489bd40b09ea8a6b6b852dcbd"
                    },
                    "cloud-region": {
                        "id": "RegionOne"
                    },
                    "service-instance": {
                        "id": "c14e61b5-1ee6-4925-b4a9-b9c8dbfe3f34",
                        "modelInvariantId": "6418bb39-61e1-45fc-a36b-3f211bb846c7",
                        "modelName": "vLB_CDS_SB00_02",
                        "modelVersion": "1.0",
                        "modelVersionId": "d01d9dec-afb6-4a53-bd9e-2eb10ca07a51",
                        "modelUuid": "d01d9dec-afb6-4a53-bd9e-2eb10ca07a51",
                        "modelInvariantUuid": "6418bb39-61e1-45fc-a36b-3f211bb846c7"
                    },
                    "generic-vnf": [
                        {
                            "vnfId": "6636c4d5-f608-4376-b6d8-7977e98cb16d",
                            "vf-modules": [
                                {
                                    "modelInvariantId": "827356a9-cb60-4976-9713-c30b4f850b41",
                                    "modelName": "vLB_CDS_SB00",
                                    "modelVersion": "1.0",
                                    "modelCustomizationUuid": "6478f94b-0b20-4b44-afc0-94e48070586a",
                                    "modelVersionId": "ca3c4797-0cdd-4797-8bec-9a3ce78ac4da",
                                    "modelCustomizationId": "6478f94b-0b20-4b44-afc0-94e48070586a",
                                    "modelUuid": "ca3c4797-0cdd-4797-8bec-9a3ce78ac4da",
                                    "modelInvariantUuid": "827356a9-cb60-4976-9713-c30b4f850b41"
                                }
                            ]
                        }
                    ]
                }
            },
            "payload": {
                "requestParameters": "{\"usePreload\": false}",
                "configurationParameters": "[{\"ip-addr\": \"$.vf-module-topology.vf-module-parameters.param[16].value\", \"oam-ip-addr\": \"$.vf-module-topology.vf-module-parameters.param[30].value\"}]"
            }
        }

An example of a request constructed by the actor using the above parameters, sent to the
SO REST server:

.. code-block:: bash

    {
      "requestDetails": {
        "modelInfo": {
            "modelInvariantId": "2246ebc9-9b9f-42d0-a5e4-0248324fb884",
            "modelType": "vfModule",
            "modelName": "VlbCdsSb00..vdns..module-3",
            "modelVersion": "1",
            "modelCustomizationUuid": "3a74410a-6c74-4a32-94b2-71488be6da1a",
            "modelVersionId": "1f94cedb-f656-4ddb-9f55-60ba1fc7d4b1",
            "modelCustomizationId": "3a74410a-6c74-4a32-94b2-71488be6da1a",
            "modelUuid": "1f94cedb-f656-4ddb-9f55-60ba1fc7d4b1",
            "modelInvariantUuid": "2246ebc9-9b9f-42d0-a5e4-0248324fb884"
        },
        "cloudConfiguration": {
            "tenantId": "41d6d38489bd40b09ea8a6b6b852dcbd",
            "lcpCloudRegionId": "RegionOne"
        },
        "requestInfo": {
          "instanceName": "vfModuleName",
          "source": "POLICY",
          "suppressRollback": false,
          "requestorId": "policy"
        },
        "relatedInstanceList": [
          {
            "relatedInstance": {
                "instanceId": "c14e61b5-1ee6-4925-b4a9-b9c8dbfe3f34",
                "modelInfo": {
                    "modelInvariantId": "6418bb39-61e1-45fc-a36b-3f211bb846c7",
                    "modelType": "service",
                    "modelName": "vLB_CDS_SB00_02",
                    "modelVersion": "1.0",
                    "modelVersionId": "d01d9dec-afb6-4a53-bd9e-2eb10ca07a51",
                    "modelUuid": "d01d9dec-afb6-4a53-bd9e-2eb10ca07a51",
                    "modelInvariantUuid": "6418bb39-61e1-45fc-a36b-3f211bb846c7"
                }
            }
          },
          {
            "relatedInstance": {
                "instanceId": "6636c4d5-f608-4376-b6d8-7977e98cb16d",
                "modelInfo": {
                    "modelInvariantId": "827356a9-cb60-4976-9713-c30b4f850b41",
                    "modelType": "vnf",
                    "modelName": "vLB_CDS_SB00",
                    "modelVersion": "1.0",
                    "modelCustomizationUuid": "6478f94b-0b20-4b44-afc0-94e48070586a",
                    "modelVersionId": "ca3c4797-0cdd-4797-8bec-9a3ce78ac4da",
                    "modelCustomizationId": "6478f94b-0b20-4b44-afc0-94e48070586a",
                    "modelUuid": "ca3c4797-0cdd-4797-8bec-9a3ce78ac4da",
                    "modelInvariantUuid": "827356a9-cb60-4976-9713-c30b4f850b41"
                }
            }
          }
        ],
        "requestParameters": {
            "usePreload": false
        },
        "configurationParameters": [
            {
                "ip-addr": "$.vf-module-topology.vf-module-parameters.param[16].value",
                "oam-ip-addr": "$.vf-module-topology.vf-module-parameters.param[30].value"
            }
        ]
      }
    }

An example response received to the initial request, from the SO REST service:

.. code-block:: bash

        {
            "requestReferences": {
                "requestId": "70f28791-c271-4cae-b090-0c2a359e26d9",
                "instanceId": "68804843-18e0-41a3-8838-a6d90a035e1a",
                "requestSelfLink": "http://so.onap:8080/orchestrationRequests/v7/b789e4e6-0b92-42c3-a723-1879af9c799d"
            }
        }

An example URL used for the "get" (i.e., poll) request subsequently sent to SO:

.. code-block:: bash

        GET https://so.onap:6969/orchestrationRequests/v5/70f28791-c271-4cae-b090-0c2a359e26d9

An example response received to the poll request, when SO has not completed the request:

.. code-block:: bash

    {
        "request": {
            "requestId": "70f28791-c271-4cae-b090-0c2a359e26d9",
            "startTime": "Fri, 15 May 2020 12:12:50 GMT",
            "requestScope": "vfModule",
            "requestType": "scaleOut",
            "requestDetails": {
                "modelInfo": {
                    "modelInvariantId": "2246ebc9-9b9f-42d0-a5e4-0248324fb884",
                    "modelType": "vfModule",
                    "modelName": "VlbCdsSb00..vdns..module-3",
                    "modelVersion": "1",
                    "modelCustomizationUuid": "3a74410a-6c74-4a32-94b2-71488be6da1a",
                    "modelVersionId": "1f94cedb-f656-4ddb-9f55-60ba1fc7d4b1",
                    "modelCustomizationId": "3a74410a-6c74-4a32-94b2-71488be6da1a",
                    "modelUuid": "1f94cedb-f656-4ddb-9f55-60ba1fc7d4b1",
                    "modelInvariantUuid": "2246ebc9-9b9f-42d0-a5e4-0248324fb884"
                },
                "requestInfo": {
                    "source": "POLICY",
                    "instanceName": "vfModuleName",
                    "suppressRollback": false,
                    "requestorId": "policy"
                },
                "relatedInstanceList": [
                    {
                        "relatedInstance": {
                            "instanceId": "c14e61b5-1ee6-4925-b4a9-b9c8dbfe3f34",
                            "modelInfo": {
                                "modelInvariantId": "6418bb39-61e1-45fc-a36b-3f211bb846c7",
                                "modelType": "service",
                                "modelName": "vLB_CDS_SB00_02",
                                "modelVersion": "1.0",
                                "modelVersionId": "d01d9dec-afb6-4a53-bd9e-2eb10ca07a51",
                                "modelUuid": "d01d9dec-afb6-4a53-bd9e-2eb10ca07a51",
                                "modelInvariantUuid": "6418bb39-61e1-45fc-a36b-3f211bb846c7"
                            }
                        }
                    },
                    {
                        "relatedInstance": {
                            "instanceId": "6636c4d5-f608-4376-b6d8-7977e98cb16d",
                            "modelInfo": {
                                "modelInvariantId": "827356a9-cb60-4976-9713-c30b4f850b41",
                                "modelType": "vnf",
                                "modelName": "vLB_CDS_SB00",
                                "modelVersion": "1.0",
                                "modelCustomizationUuid": "6478f94b-0b20-4b44-afc0-94e48070586a",
                                "modelVersionId": "ca3c4797-0cdd-4797-8bec-9a3ce78ac4da",
                                "modelCustomizationId": "6478f94b-0b20-4b44-afc0-94e48070586a",
                                "modelUuid": "ca3c4797-0cdd-4797-8bec-9a3ce78ac4da",
                                "modelInvariantUuid": "827356a9-cb60-4976-9713-c30b4f850b41"
                            }
                        }
                    }
                ],
                "cloudConfiguration": {
                    "tenantId": "41d6d38489bd40b09ea8a6b6b852dcbd",
                    "tenantName": "Integration-SB-00",
                    "cloudOwner": "CloudOwner",
                    "lcpCloudRegionId": "RegionOne"
                },
                "requestParameters": {
                    "usePreload": false
                },
                "configurationParameters": [
                    {
                        "ip-addr": "$.vf-module-topology.vf-module-parameters.param[16].value",
                        "oam-ip-addr": "$.vf-module-topology.vf-module-parameters.param[30].value"
                    }
                ]
            },
            "instanceReferences": {
                "serviceInstanceId": "c14e61b5-1ee6-4925-b4a9-b9c8dbfe3f34",
                "vnfInstanceId": "6636c4d5-f608-4376-b6d8-7977e98cb16d",
                "vfModuleInstanceId": "68804843-18e0-41a3-8838-a6d90a035e1a",
                "vfModuleInstanceName": "vfModuleName"
            },
            "requestStatus": {
                "requestState": "IN_PROGRESS",
                "statusMessage": "FLOW STATUS: Execution of ActivateVfModuleBB has completed successfully, next invoking ConfigurationScaleOutBB (Execution Path progress: BBs completed = 4; BBs remaining = 2). TASK INFORMATION: Last task executed: Call SDNC RESOURCE STATUS: The vf module was found to already exist, thus no new vf module was created in the cloud via this request",
                "percentProgress": 68,
                "timestamp": "Fri, 15 May 2020 12:13:41 GMT"
            }
        }
    }

An example response received to the poll request, when SO has completed the request:

.. code-block:: bash

    {
        "request": {
            "requestId": "70f28791-c271-4cae-b090-0c2a359e26d9",
            "startTime": "Fri, 15 May 2020 12:12:50 GMT",
            "finishTime": "Fri, 15 May 2020 12:14:21 GMT",
            "requestScope": "vfModule",
            "requestType": "scaleOut",
            "requestDetails": {
                "modelInfo": {
                    "modelInvariantId": "2246ebc9-9b9f-42d0-a5e4-0248324fb884",
                    "modelType": "vfModule",
                    "modelName": "VlbCdsSb00..vdns..module-3",
                    "modelVersion": "1",
                    "modelCustomizationUuid": "3a74410a-6c74-4a32-94b2-71488be6da1a",
                    "modelVersionId": "1f94cedb-f656-4ddb-9f55-60ba1fc7d4b1",
                    "modelCustomizationId": "3a74410a-6c74-4a32-94b2-71488be6da1a",
                    "modelUuid": "1f94cedb-f656-4ddb-9f55-60ba1fc7d4b1",
                    "modelInvariantUuid": "2246ebc9-9b9f-42d0-a5e4-0248324fb884"
                },
                "requestInfo": {
                    "source": "POLICY",
                    "instanceName": "vfModuleName",
                    "suppressRollback": false,
                    "requestorId": "policy"
                },
                "relatedInstanceList": [
                    {
                        "relatedInstance": {
                            "instanceId": "c14e61b5-1ee6-4925-b4a9-b9c8dbfe3f34",
                            "modelInfo": {
                                "modelInvariantId": "6418bb39-61e1-45fc-a36b-3f211bb846c7",
                                "modelType": "service",
                                "modelName": "vLB_CDS_SB00_02",
                                "modelVersion": "1.0",
                                "modelVersionId": "d01d9dec-afb6-4a53-bd9e-2eb10ca07a51",
                                "modelUuid": "d01d9dec-afb6-4a53-bd9e-2eb10ca07a51",
                                "modelInvariantUuid": "6418bb39-61e1-45fc-a36b-3f211bb846c7"
                            }
                        }
                    },
                    {
                        "relatedInstance": {
                            "instanceId": "6636c4d5-f608-4376-b6d8-7977e98cb16d",
                            "modelInfo": {
                                "modelInvariantId": "827356a9-cb60-4976-9713-c30b4f850b41",
                                "modelType": "vnf",
                                "modelName": "vLB_CDS_SB00",
                                "modelVersion": "1.0",
                                "modelCustomizationUuid": "6478f94b-0b20-4b44-afc0-94e48070586a",
                                "modelVersionId": "ca3c4797-0cdd-4797-8bec-9a3ce78ac4da",
                                "modelCustomizationId": "6478f94b-0b20-4b44-afc0-94e48070586a",
                                "modelUuid": "ca3c4797-0cdd-4797-8bec-9a3ce78ac4da",
                                "modelInvariantUuid": "827356a9-cb60-4976-9713-c30b4f850b41"
                            }
                        }
                    }
                ],
                "cloudConfiguration": {
                    "tenantId": "41d6d38489bd40b09ea8a6b6b852dcbd",
                    "tenantName": "Integration-SB-00",
                    "cloudOwner": "CloudOwner",
                    "lcpCloudRegionId": "RegionOne"
                },
                "requestParameters": {
                    "usePreload": false
                },
                "configurationParameters": [
                    {
                        "ip-addr": "$.vf-module-topology.vf-module-parameters.param[16].value",
                        "oam-ip-addr": "$.vf-module-topology.vf-module-parameters.param[30].value"
                    }
                ]
            },
            "instanceReferences": {
                "serviceInstanceId": "c14e61b5-1ee6-4925-b4a9-b9c8dbfe3f34",
                "vnfInstanceId": "6636c4d5-f608-4376-b6d8-7977e98cb16d",
                "vfModuleInstanceId": "68804843-18e0-41a3-8838-a6d90a035e1a",
                "vfModuleInstanceName": "vfModuleName"
            },
            "requestStatus": {
                "requestState": "COMPLETE",
                "statusMessage": "STATUS: ALaCarte-VfModule-scaleOut request was executed correctly. FLOW STATUS: Successfully completed all Building Blocks RESOURCE STATUS: The vf module was found to already exist, thus no new vf module was created in the cloud via this request",
                "percentProgress": 100,
                "timestamp": "Fri, 15 May 2020 12:14:21 GMT"
            }
        }
    }


Configuration of the SO Actor
###############################

The following table specifies the fields that should be provided to configure the SO
actor.

=============================== ====================    ==================================================================
Field name                         type                             Description
=============================== ====================    ==================================================================
clientName                        string                  Name of the HTTP client to use to send the request to the
                                                          SO REST server.
timeoutSec                        integer (optional)      Maximum time, in seconds, to wait for a response to be received
                                                          from the REST server.  Defaults to 90s.
path                              string                  URI appended to the URL.  This field only applies to individual
                                                          operations; it does not apply at the actor level.  Note: the
                                                          *path* should not include a leading or trailing slash.
maxGets                           integer (optional)      Maximum number of get/poll requests to make to determine the
                                                          final outcome of the request.  Defaults to 20.
waitSecGet                        integer (optional)      Time, in seconds, to wait between issuing "get" requests.
                                                          Defaults to 20s.
pathGet                           string (optional)       Path to use when polling (i.e., issuing "get" requests).
                                                          Note: this should include a trailing slash, but no leading
                                                          slash.
=============================== ====================    ==================================================================

The individual operations are configured using these same field names.  However, all
of them, except the *path*, are optional, as they inherit their values from the
corresponding actor-level fields.