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
|
[
{
"id": "668a4a6a.11fb74",
"type": "method",
"name": "method vnf-topology-operation-vpn-site-resource-create",
"xml": "<method rpc='vnf-topology-operation-vpn-site-resource-create' mode='sync'>\n",
"comments": "",
"outputs": 1,
"x": 260.0104064941406,
"y": 185.0104217529297,
"z": "872ff8dd.fe5e78",
"wires": [
[
"f0e43a5a.fb4558"
]
]
},
{
"id": "61b91100.d7ede",
"type": "dgstart",
"name": "DGSTART",
"outputs": 1,
"x": 136.581787109375,
"y": 37.010429170913994,
"z": "872ff8dd.fe5e78",
"wires": [
[
"bc2b5176.73e7e"
]
]
},
{
"id": "bc2b5176.73e7e",
"type": "service-logic",
"name": "GENERIC-RESOURCE-API ${project.version}",
"module": "GENERIC-RESOURCE-API",
"version": "${project.version}",
"comments": "",
"xml": "<service-logic xmlns='http://www.onap.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='GENERIC-RESOURCE-API' version='${project.version}'>",
"outputs": 1,
"x": 238.86749267578125,
"y": 95.24853324890137,
"z": "872ff8dd.fe5e78",
"wires": [
[
"668a4a6a.11fb74"
]
]
},
{
"id": "f0e43a5a.fb4558",
"type": "block",
"name": "block : atomic",
"xml": "<block atomic=\"true\">",
"atomic": "true",
"outputs": 1,
"x": 240.24845123291016,
"y": 356.6770935058594,
"z": "872ff8dd.fe5e78",
"wires": [
[
"6dab251c.49205c",
"10940ab9.a5fb85",
"2aab9019.e3a45",
"be0c443b.256188",
"46389e76.c8e6",
"89f88258.b891f",
"dc405c48.cda4b",
"1170677a.a70a49",
"997721e4.3b61b",
"71ec508c.bf2e1",
"60143a97.af1404"
]
]
},
{
"id": "10940ab9.a5fb85",
"type": "set",
"name": "set vnf-level-oper-status to Created",
"xml": "<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.order-status' value='Created' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.last-rpc-action' value='`$vnf-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.last-action' value='`$vnf-topology-operation-input.request-information.request-action`' />\n",
"comments": "",
"x": 674.3952026367188,
"y": 610.6810224326327,
"z": "872ff8dd.fe5e78",
"wires": []
},
{
"id": "6dab251c.49205c",
"type": "set",
"name": "copy input data to service data",
"xml": "<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-id' value='`$prop.vnf-index`' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.sdnc-request-header.' value='$vnf-topology-operation-input.sdnc-request-header.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.request-information.' value='$vnf-topology-operation-input.request-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.' value='$vnf-topology-operation-input.service-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.' value='$vnf-topology-operation-input.vnf-information.' />\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.' value='$vnf-topology-operation-input.vnf-request-input.' />\n\n",
"comments": "",
"x": 666.2483901977539,
"y": 505.67727449256927,
"z": "872ff8dd.fe5e78",
"wires": []
},
{
"id": "46389e76.c8e6",
"type": "execute",
"name": "execute generate-vnf-index",
"xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' >\n<parameter name=\"ctx-destination\" value=\"prop.vnf-index\"/>\n",
"comments": "",
"outputs": 1,
"x": 654.5818939208984,
"y": 455.34385850746185,
"z": "872ff8dd.fe5e78",
"wires": [
[]
]
},
{
"id": "60143a97.af1404",
"type": "set",
"name": "set vnf-index to service data",
"xml": "<set>\n<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.vnf-id' value='`$prop.vnf-index`' />\n",
"comments": "",
"x": 665.5819702148438,
"y": 562.3438623221591,
"z": "872ff8dd.fe5e78",
"wires": []
},
{
"id": "2aab9019.e3a45",
"type": "switchNode",
"name": "switch service-data.vnfs.vnf_length",
"xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n",
"comments": "",
"outputs": 1,
"x": 669.5817718505859,
"y": 235.34378507453948,
"z": "872ff8dd.fe5e78",
"wires": [
[
"214b38d8.c822d8",
"308ac75b.244168"
]
]
},
{
"id": "214b38d8.c822d8",
"type": "other",
"name": "NULL",
"xml": "<outcome value=''>\n",
"comments": "",
"outputs": 1,
"x": 904.2961578369141,
"y": 230.48660543281585,
"z": "872ff8dd.fe5e78",
"wires": [
[
"bcebd76e.5a08d8"
]
]
},
{
"id": "bcebd76e.5a08d8",
"type": "set",
"name": "set vnf-index=0",
"xml": "<set>\n<parameter name='vnf-index' value='0' />\n",
"comments": "",
"x": 1064.5818634033203,
"y": 230.48669698555022,
"z": "872ff8dd.fe5e78",
"wires": []
},
{
"id": "308ac75b.244168",
"type": "other",
"name": "other",
"xml": "<outcome value='Other'>\n",
"comments": "",
"outputs": 1,
"x": 900.7246971130371,
"y": 263.77243688423187,
"z": "872ff8dd.fe5e78",
"wires": [
[
"af41a2cb.7d1be"
]
]
},
{
"id": "c6ca1095.8fc32",
"type": "set",
"name": "set vnf-index = vnf_length",
"xml": "<set>\n<parameter name='vnf-index' value='`$service-data.vnfs.vnf_length`' />\n",
"comments": "",
"x": 1293.5819396972656,
"y": 242.05816247779876,
"z": "872ff8dd.fe5e78",
"wires": []
},
{
"id": "c1df9f5.ae8c56",
"type": "for",
"name": "for each existing VNF",
"xml": "<for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >\n",
"comments": "",
"outputs": 1,
"x": 1282.0105590820312,
"y": 277.0581343444064,
"z": "872ff8dd.fe5e78",
"wires": [
[
"6e99eb9c.1d2854"
]
]
},
{
"id": "af41a2cb.7d1be",
"type": "block",
"name": "block",
"xml": "<block>\n",
"atomic": "false",
"comments": "",
"outputs": 1,
"x": 1035.438980102539,
"y": 265.77240636665374,
"z": "872ff8dd.fe5e78",
"wires": [
[
"c6ca1095.8fc32",
"c1df9f5.ae8c56"
]
]
},
{
"id": "6e99eb9c.1d2854",
"type": "switchNode",
"name": "switch vnf-information.vnf-id == service-data.vnfs.vnf[].vnf-id",
"xml": "<switch test='`$vnf-topology-operation-input.vnf-information.vnf-id == $service-data.vnfs.vnf[$idx].vnf-id`'>\n",
"comments": "",
"outputs": 1,
"x": 1675.2962951660156,
"y": 277.62961843330413,
"z": "872ff8dd.fe5e78",
"wires": [
[
"b8a872f3.280e3"
]
]
},
{
"id": "b8a872f3.280e3",
"type": "outcomeTrue",
"name": "true",
"xml": "<outcome value='true'>\n",
"comments": "",
"outputs": 1,
"x": 1956.5819969177246,
"y": 276.20102384407073,
"z": "872ff8dd.fe5e78",
"wires": [
[
"2b05b5cd.40cb0a"
]
]
},
{
"id": "1bd5d19c.ac71ae",
"type": "comment",
"name": "make sure this vnf-id doesn't exist already",
"info": "",
"comments": "",
"x": 1644.4389114379883,
"y": 241.2010104926303,
"z": "872ff8dd.fe5e78",
"wires": []
},
{
"id": "be0c443b.256188",
"type": "set",
"name": "set new vnf_length",
"xml": "<set>\n<parameter name='service-data.vnfs.vnf_length' value='`$vnf-index + 1`' />\n",
"comments": "",
"x": 626.5818939208984,
"y": 403.34385516960174,
"z": "872ff8dd.fe5e78",
"wires": []
},
{
"id": "89f88258.b891f",
"type": "returnSuccess",
"name": "return success",
"xml": "<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n",
"comments": "",
"x": 613.5818557739258,
"y": 873.607373979874,
"z": "872ff8dd.fe5e78",
"wires": []
},
{
"id": "71ec508c.bf2e1",
"type": "save",
"name": "save service relationship in AAI",
"xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='service-instance:relationship-list' \n key='service-instance.service-instance-id = $service-data.service-information.service-instance-id \n AND customer.global-customer-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.global-customer-id \n AND service-subscription.service-type = $service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.subscription-service-type' \n force=\"true\" pfx=\"tmp.AnAI-data\">\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"generic-vnf\" />\n<parameter name=\"relationship-list.relationship[0].related-link\" value=\"`'/network/generic-vnfs/generic-vnf/' + $prop.vnf-index`\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"generic-vnf.vnf-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$prop.vnf-index`\" />\n\n\n<!--save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='service-instance:relationship-list' \n key='service-instance.service-instance-id = $service-data.service-information.service-instance-id \n AND customer.global-customer-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.global-customer-id \n AND service-subscription.service-type = $service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.subscription-service-type' \n force=\"true\" pfx=\"tmp.AnAI-data\">\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"vpn-resource\" />\n<parameter name=\"relationship-list.relationship[0].related-link\" value=\"`'/network/vpn-resources/vpn-resource/' + $prop.vnf-index`\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"vpn-resource.vpn-resource-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$prop.vnf-index`\" /-->",
"comments": "",
"outputs": 1,
"x": 676.2486267089844,
"y": 820.6072671683505,
"z": "872ff8dd.fe5e78",
"wires": [
[]
]
},
{
"id": "dc405c48.cda4b",
"type": "set",
"name": "set vnf-index and vnf-object-path",
"xml": "<set>\n<parameter name='vnfId' value='`$prop.vnf-index`' />\n<parameter name=\"vnf-object-path\" value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $vnf-topology-operation-input.service-information.service-instance-id + '/service-data/vnfs/vnf/' + $prop.vnf-index + '/vnf-data/'` \" />",
"comments": "",
"x": 667.5818862915039,
"y": 651.6072929175571,
"z": "872ff8dd.fe5e78",
"wires": []
},
{
"id": "1170677a.a70a49",
"type": "set",
"name": "set vnf-request-input.",
"xml": "<set>\n<parameter name='vnf-request-input.' value='`$vnf-topology-operation-input.vnf-request-input.`' />\n",
"comments": "",
"x": 632.5815277099609,
"y": 354.33522775489837,
"z": "872ff8dd.fe5e78",
"wires": []
},
{
"id": "2b05b5cd.40cb0a",
"type": "returnFailure",
"name": "return failure",
"xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n <parameter name=\"error-message\" value=\"`'VNF id ' + $service-data.vnfs.vnf[$idx].vnf-id\n + ' already exists, and has order status ' + $service-data.vnfs.vnf[$idx].vnf-data.vnf-level-oper-status.order-status`\" />\n",
"comments": "",
"x": 2085.153366088867,
"y": 327.2010381491855,
"z": "872ff8dd.fe5e78",
"wires": []
},
{
"id": "8463cd7c.a7a22",
"type": "comment",
"name": "Take the parameter names by removing prefix",
"info": "",
"comments": "",
"x": 1378.5819778442383,
"y": 330.67710473854095,
"z": "872ff8dd.fe5e78",
"wires": []
},
{
"id": "ecfeb487.443888",
"type": "comment",
"name": "TODO: change AAI models",
"info": "",
"comments": "",
"x": 656.1924514770508,
"y": 720.9847257407382,
"z": "872ff8dd.fe5e78",
"wires": []
},
{
"id": "997721e4.3b61b",
"type": "save",
"name": "save AnAI - vnf-instance.orchestration-status",
"xml": "<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"generic-vnf\" \n\t\tkey=\"generic-vnf.vnf-id = $prop.vnf-index\" >\n<parameter name=\"orchestration-status\" value=\"create\" />\n<parameter name=\"vnf-type\" value=\"some vnf-type\" />",
"comments": "",
"outputs": 1,
"x": 722.5561904907227,
"y": 761.2575099738315,
"z": "872ff8dd.fe5e78",
"wires": [
[]
]
}
]
|