NonRT-RIC A1 Northbound API
[nonrtric.git] / sdnc-a1-controller / oam / platform-logic / generic-resource-api / src / main / json / sdwan / GENERIC-RESOURCE-API_sdwan-attachment-topology-operation-create.json
1 [\r
2   {\r
3     "id": "41a7b6d3.f9b528",\r
4     "type": "dgstart",\r
5     "name": "DGSTART",\r
6     "outputs": 1,\r
7     "x": 104.03125,\r
8     "y": 62.99999749660492,\r
9     "z": "588621bb.e9fef",\r
10     "wires": [\r
11       [\r
12         "f309be9c.cefce"\r
13       ]\r
14     ]\r
15   },\r
16   {\r
17     "id": "f309be9c.cefce",\r
18     "type": "service-logic",\r
19     "name": "GENERIC-RESOURCE-API ${project.version}",\r
20     "module": "GENERIC-RESOURCE-API",\r
21     "version": "${project.version}",\r
22     "comments": "",\r
23     "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}'>",\r
24     "outputs": 1,\r
25     "x": 287.03125381469727,\r
26     "y": 137.00001561641693,\r
27     "z": "588621bb.e9fef",\r
28     "wires": [\r
29       [\r
30         "63686a7b.f7aa94"\r
31       ]\r
32     ]\r
33   },\r
34   {\r
35     "id": "63686a7b.f7aa94",\r
36     "type": "method",\r
37     "name": "sdwan-attachment-topology-operation-create",\r
38     "xml": "<method rpc='sdwan-attachment-topology-operation-create' mode='sync'>\n",\r
39     "comments": "",\r
40     "outputs": 1,\r
41     "x": 275.0313720703125,\r
42     "y": 224.99999845027924,\r
43     "z": "588621bb.e9fef",\r
44     "wires": [\r
45       [\r
46         "445b402d.36165"\r
47       ]\r
48     ]\r
49   },\r
50   {\r
51     "id": "445b402d.36165",\r
52     "type": "block",\r
53     "name": "block : atomic",\r
54     "xml": "<block atomic=\"true\">\n",\r
55     "atomic": "false",\r
56     "comments": "",\r
57     "outputs": 1,\r
58     "x": 195.03130340576172,\r
59     "y": 974.0002464056015,\r
60     "z": "588621bb.e9fef",\r
61     "wires": [\r
62       [\r
63         "57abe88c.4f1e28",\r
64         "da2ee563.ca49c8",\r
65         "d7db7598.ec6a58",\r
66         "b1a31713.a74f68",\r
67         "bb52c8b.9210938",\r
68         "e248322d.07f73",\r
69         "e3ed6a01.033e28",\r
70         "49207aa3.305be4",\r
71         "e7fc7beb.0c2218",\r
72         "fff0be1d.b2bcf",\r
73         "6737ccd9.1b9484",\r
74         "3d98ece2.536f54",\r
75         "279d04d9.311b7c",\r
76         "bd2101b.463ff",\r
77         "a593e64c.edffe8",\r
78         "ad258829.1a9fb8",\r
79         "d28d77a4.947808",\r
80         "b3ca8b3e.e57468",\r
81         "4f85eb.0fdeca14",\r
82         "4b8ef133.24669",\r
83         "3a0fc26c.48c2fe",\r
84         "13f594ad.41064b",\r
85         "571ae355.45c2fc",\r
86         "936a519f.07274"\r
87       ]\r
88     ]\r
89   },\r
90   {\r
91     "id": "f44d3a22.e968a8",\r
92     "type": "comment",\r
93     "name": "Set allotted resource id if not sent by SO",\r
94     "info": "",\r
95     "comments": "",\r
96     "x": 679.1080017089844,\r
97     "y": 134.43391740322113,\r
98     "z": "588621bb.e9fef",\r
99     "wires": []\r
100   },\r
101   {\r
102     "id": "57abe88c.4f1e28",\r
103     "type": "switchNode",\r
104     "name": "switch allotted-resource-id",\r
105     "xml": "<switch test='`$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-id`'>\n",\r
106     "comments": "",\r
107     "outputs": 1,\r
108     "x": 625.0312805175781,\r
109     "y": 189.9999908208847,\r
110     "z": "588621bb.e9fef",\r
111     "wires": [\r
112       [\r
113         "4ebc9e25.f0a41",\r
114         "c5e852a7.8a1b7"\r
115       ]\r
116     ]\r
117   },\r
118   {\r
119     "id": "4ebc9e25.f0a41",\r
120     "type": "outcome",\r
121     "name": "NULL",\r
122     "xml": "<outcome value=''>",\r
123     "comments": "",\r
124     "outputs": 1,\r
125     "x": 823.0313682556152,\r
126     "y": 159.9999793767929,\r
127     "z": "588621bb.e9fef",\r
128     "wires": [\r
129       [\r
130         "80de8467.db5608"\r
131       ]\r
132     ]\r
133   },\r
134   {\r
135     "id": "c5e852a7.8a1b7",\r
136     "type": "other",\r
137     "name": "other",\r
138     "xml": "<outcome value='Other'>\n",\r
139     "comments": "",\r
140     "outputs": 1,\r
141     "x": 822.0312767028809,\r
142     "y": 196.9999898672104,\r
143     "z": "588621bb.e9fef",\r
144     "wires": [\r
145       [\r
146         "f37c96f7.6c5a88"\r
147       ]\r
148     ]\r
149   },\r
150   {\r
151     "id": "f37c96f7.6c5a88",\r
152     "type": "set",\r
153     "name": "set tmp.ar.allotted-resource-id",\r
154     "xml": "<set>\n<parameter name='tmp.ar.allotted-resource-id' value='`$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-id`' />\n",\r
155     "comments": "",\r
156     "x": 1020.0312652587891,\r
157     "y": 194.00000894069672,\r
158     "z": "588621bb.e9fef",\r
159     "wires": []\r
160   },\r
161   {\r
162     "id": "da2ee563.ca49c8",\r
163     "type": "set",\r
164     "name": "set tmp.ar.self-link",\r
165     "xml": "<set>\n<parameter name='tmp.ar.self-link' value=\"`'restconf/config/GENERIC-RESOURCE-API:connection-attachment-allotted-resources/connection-attachment-allotted-resource/'\n + $tmp.ar.allotted-resource-id\n + '/allotted-resource-data/connection-attachment-topology/'` \" />\n\n",\r
166     "comments": "",\r
167     "x": 593.0312042236328,\r
168     "y": 411.00009763240814,\r
169     "z": "588621bb.e9fef",\r
170     "wires": []\r
171   },\r
172   {\r
173     "id": "d7db7598.ec6a58",\r
174     "type": "execute",\r
175     "name": "execute Properties",\r
176     "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >\n    <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />\n    <parameter name='contextPrefix' value='prop' />\n",\r
177     "comments": "",\r
178     "outputs": 1,\r
179     "x": 593.2931213378906,\r
180     "y": 492.666778922081,\r
181     "z": "588621bb.e9fef",\r
182     "wires": [\r
183       []\r
184     ]\r
185   },\r
186   {\r
187     "id": "b1a31713.a74f68",\r
188     "type": "execute",\r
189     "name": "generate allotted-resource tmp.ar-url",\r
190     "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n    <parameter name=\"source\" value=\"`$prop.restapi.connection-attachment-allottedresource`\"/>\n    <parameter name=\"outputPath\" value=\"tmp.ar-url\"/>\n    <parameter name=\"target\" value=\"{allotted-resource-id}\"/>\n    <parameter name=\"replacement\" value=\"`$tmp.ar.allotted-resource-id`\"/>\n",\r
191     "comments": "",\r
192     "outputs": 1,\r
193     "x": 646.2931823730469,\r
194     "y": 579.6666969060898,\r
195     "z": "588621bb.e9fef",\r
196     "wires": [\r
197       []\r
198     ]\r
199   },\r
200   {\r
201     "id": "80de8467.db5608",\r
202     "type": "execute",\r
203     "name": "execute tmp.ar.allotted-resource-id",\r
204     "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' >\n<parameter name=\"ctx-destination\" value=\"tmp.ar.allotted-resource-id\"/>\n",\r
205     "comments": "",\r
206     "outputs": 1,\r
207     "x": 1038.0313453674316,\r
208     "y": 160.9999850988388,\r
209     "z": "588621bb.e9fef",\r
210     "wires": [\r
211       [\r
212         "827e9a97.124e48"\r
213       ]\r
214     ]\r
215   },\r
216   {\r
217     "id": "827e9a97.124e48",\r
218     "type": "failure",\r
219     "name": "failure",\r
220     "xml": "<outcome value='failure'>\n",\r
221     "comments": "",\r
222     "outputs": 1,\r
223     "x": 1256.0313873291016,\r
224     "y": 160.99994885921478,\r
225     "z": "588621bb.e9fef",\r
226     "wires": [\r
227       [\r
228         "153037d4.5daa68"\r
229       ]\r
230     ]\r
231   },\r
232   {\r
233     "id": "153037d4.5daa68",\r
234     "type": "returnFailure",\r
235     "name": "return failure",\r
236     "xml": "<return status='failure'>\n<parameter name='error-code' value='' />\n<parameter name='error-message' value=\"An error occured while generation allotted resource ID\" />\n",\r
237     "comments": "",\r
238     "x": 1422.0313415527344,\r
239     "y": 160.99996316432953,\r
240     "z": "588621bb.e9fef",\r
241     "wires": []\r
242   },\r
243   {\r
244     "id": "8fcb37f5.98d048",\r
245     "type": "success",\r
246     "name": "success",\r
247     "xml": "<outcome value='success'>\n",\r
248     "comments": "",\r
249     "outputs": 1,\r
250     "x": 1152.0314807891846,\r
251     "y": 651.7778695821762,\r
252     "z": "588621bb.e9fef",\r
253     "wires": [\r
254       [\r
255         "91db96ee.5f5ab8"\r
256       ]\r
257     ]\r
258   },\r
259   {\r
260     "id": "bc59ed7b.1de9c",\r
261     "type": "returnFailure",\r
262     "name": "return failure",\r
263     "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=\"Error: Existing connection attachment allotted resource\" />\n    \n",\r
264     "comments": "",\r
265     "x": 1885.5498600006104,\r
266     "y": 652.8439410924911,\r
267     "z": "588621bb.e9fef",\r
268     "wires": []\r
269   },\r
270   {\r
271     "id": "b0f210fa.eabdf",\r
272     "type": "comment",\r
273     "name": "Check for non existence of allotted resource",\r
274     "info": "",\r
275     "comments": "",\r
276     "x": 1008.0314025878906,\r
277     "y": 585.7779363393784,\r
278     "z": "588621bb.e9fef",\r
279     "wires": []\r
280   },\r
281   {\r
282     "id": "a2101ce1.011fb",\r
283     "type": "for",\r
284     "name": "for cidx..service-data.consumed-allotted-resources.consumed-allotted-resource[]",\r
285     "xml": "<for index='cidx' start='0' end='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`' >\n",\r
286     "comments": "",\r
287     "outputs": 1,\r
288     "x": 1528.6979484558105,\r
289     "y": 796.0000487565994,\r
290     "z": "588621bb.e9fef",\r
291     "wires": [\r
292       [\r
293         "f78e26b6.71e388"\r
294       ]\r
295     ]\r
296   },\r
297   {\r
298     "id": "e248322d.07f73",\r
299     "type": "switchNode",\r
300     "name": "switch service-data.consumed-allotted-resources_length",\r
301     "xml": "<switch test='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`'>\n",\r
302     "comments": "",\r
303     "outputs": 1,\r
304     "x": 710.6972732543945,\r
305     "y": 772.7140811681747,\r
306     "z": "588621bb.e9fef",\r
307     "wires": [\r
308       [\r
309         "30dfa22f.78a2de",\r
310         "3fbb9163.26209e"\r
311       ]\r
312     ]\r
313   },\r
314   {\r
315     "id": "30dfa22f.78a2de",\r
316     "type": "other",\r
317     "name": "outcome Null",\r
318     "xml": "<outcome value=''>\n",\r
319     "comments": "",\r
320     "outputs": 1,\r
321     "x": 1014.8401718139648,\r
322     "y": 741.5715183019638,\r
323     "z": "588621bb.e9fef",\r
324     "wires": [\r
325       [\r
326         "a8a680b4.767d6"\r
327       ]\r
328     ]\r
329   },\r
330   {\r
331     "id": "3fbb9163.26209e",\r
332     "type": "other",\r
333     "name": "other",\r
334     "xml": "<outcome value='Other'>\n",\r
335     "comments": "",\r
336     "outputs": 1,\r
337     "x": 991.8402214050293,\r
338     "y": 802.5714734792709,\r
339     "z": "588621bb.e9fef",\r
340     "wires": [\r
341       [\r
342         "c3b51f9c.33bcc"\r
343       ]\r
344     ]\r
345   },\r
346   {\r
347     "id": "c3b51f9c.33bcc",\r
348     "type": "block",\r
349     "name": "block : atomic",\r
350     "xml": "<block atomic=\"true\">",\r
351     "atomic": "true",\r
352     "outputs": 1,\r
353     "x": 1151.9673118591309,\r
354     "y": 800.6974500417709,\r
355     "z": "588621bb.e9fef",\r
356     "wires": [\r
357       [\r
358         "a2101ce1.011fb",\r
359         "e3a80e4a.14e7d",\r
360         "6c9a2abd.a627f4"\r
361       ]\r
362     ]\r
363   },\r
364   {\r
365     "id": "a8a680b4.767d6",\r
366     "type": "set",\r
367     "name": "set cidx",\r
368     "xml": "<set>\n<parameter name='tmp.cidx' value=\"`0`\" />\n<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource_length' value=\"1\" />\n\n\n",\r
369     "comments": "",\r
370     "x": 1164.6971549987793,\r
371     "y": 739.2855685949326,\r
372     "z": "588621bb.e9fef",\r
373     "wires": []\r
374   },\r
375   {\r
376     "id": "e3ed6a01.033e28",\r
377     "type": "set",\r
378     "name": "set consumed allotted resources",\r
379     "xml": "<set>\n<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource[$tmp.cidx].allotted-resource-id' value=\"`$tmp.ar.allotted-resource-id` \" />\n<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource[$tmp.cidx].allotted-resource-type' value=\"`$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-type` \" />\n<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource[$tmp.cidx].allotted-resource-pointer' value=\"`$tmp.ar.self-link` \" />\n<parameter name='service-data.consumed-allotted-resources.consumed-allotted-resource_length' value='`$tmp.cidx + 1`' />\n\n",\r
380     "comments": "",\r
381     "x": 639.5545654296875,\r
382     "y": 876.2856458425522,\r
383     "z": "588621bb.e9fef",\r
384     "wires": []\r
385   },\r
386   {\r
387     "id": "e3a80e4a.14e7d",\r
388     "type": "switchNode",\r
389     "name": "switch tmp.found-cidx",\r
390     "xml": "<switch test='`$tmp.found-cidx`'>\n",\r
391     "comments": "",\r
392     "outputs": 1,\r
393     "x": 1341.0823593139648,\r
394     "y": 832.7089728116989,\r
395     "z": "588621bb.e9fef",\r
396     "wires": [\r
397       [\r
398         "cbb92020.3ddcd"\r
399       ]\r
400     ]\r
401   },\r
402   {\r
403     "id": "cbb92020.3ddcd",\r
404     "type": "outcomeTrue",\r
405     "name": "false",\r
406     "xml": "<outcome value='false'>\n",\r
407     "comments": "",\r
408     "outputs": 1,\r
409     "x": 1531.0823135375977,\r
410     "y": 832.708909869194,\r
411     "z": "588621bb.e9fef",\r
412     "wires": [\r
413       [\r
414         "808efd55.65f55"\r
415       ]\r
416     ]\r
417   },\r
418   {\r
419     "id": "808efd55.65f55",\r
420     "type": "block",\r
421     "name": "block : atomic",\r
422     "xml": "<block atomic=\"true\">",\r
423     "atomic": "true",\r
424     "outputs": 1,\r
425     "x": 1697.0823135375977,\r
426     "y": 832.708909869194,\r
427     "z": "588621bb.e9fef",\r
428     "wires": [\r
429       [\r
430         "6d2d79a2.093ad8"\r
431       ]\r
432     ]\r
433   },\r
434   {\r
435     "id": "f78e26b6.71e388",\r
436     "type": "switchNode",\r
437     "name": "switch allotted-resource-id",\r
438     "xml": "<switch test=\"`$service-data.consumed-allotted-resources.consumed-allotted-resource[$cidx].allotted-resource-id == $tmp.ar.allotted-resource-id`\">\n\n",\r
439     "comments": "",\r
440     "outputs": 1,\r
441     "x": 1945.8095779418945,\r
442     "y": 793.0000756978989,\r
443     "z": "588621bb.e9fef",\r
444     "wires": [\r
445       [\r
446         "b1c9d43a.bd2f08"\r
447       ]\r
448     ]\r
449   },\r
450   {\r
451     "id": "b1c9d43a.bd2f08",\r
452     "type": "outcomeTrue",\r
453     "name": "true",\r
454     "xml": "<outcome value='true'>\n",\r
455     "comments": "",\r
456     "outputs": 1,\r
457     "x": 2127.619152069092,\r
458     "y": 793.4645227193832,\r
459     "z": "588621bb.e9fef",\r
460     "wires": [\r
461       [\r
462         "1288ae5b.1e1ce2"\r
463       ]\r
464     ]\r
465   },\r
466   {\r
467     "id": "6d2d79a2.093ad8",\r
468     "type": "set",\r
469     "name": "set tmp.cidx",\r
470     "xml": "<set>\n<parameter name='tmp.cidx' value='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`' />\n",\r
471     "comments": "",\r
472     "x": 1858.955696105957,\r
473     "y": 832.2206109762192,\r
474     "z": "588621bb.e9fef",\r
475     "wires": []\r
476   },\r
477   {\r
478     "id": "8e24c24b.d6fc2",\r
479     "type": "comment",\r
480     "name": "Add to consumed service consumed-allotted-resources in mdsal",\r
481     "info": "Prepare data and add to service-data",\r
482     "comments": "",\r
483     "x": 731.698486328125,\r
484     "y": 703.0000451803207,\r
485     "z": "588621bb.e9fef",\r
486     "wires": []\r
487   },\r
488   {\r
489     "id": "2cffaf1f.4fc49",\r
490     "type": "comment",\r
491     "name": "This set resource will be added to MDSAL by provider code",\r
492     "info": "Below we add to service-data.consumed-allotted-resource at last index",\r
493     "comments": "",\r
494     "x": 719.0314025878906,\r
495     "y": 841.7781375646591,\r
496     "z": "588621bb.e9fef",\r
497     "wires": []\r
498   },\r
499   {\r
500     "id": "571ae355.45c2fc",\r
501     "type": "update",\r
502     "name": "save AAI allotted-resource",\r
503     "xml": "<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"allotted-resource\" \n\t\tkey=\"customer.global-customer-id = $connection-attachment-topology-operation-input.service-information.global-customer-id AND\n\t\t\tservice-subscription.service-type = $connection-attachment-topology-operation-input.service-information.subscription-service-type AND\n\t\t\tservice-instance.service-instance-id = $connection-attachment-topology-operation-input.service-information.service-instance-id AND\n\t\t\tallotted-resource.id = $tmp.ar.allotted-resource-id\"\n        pfx='pfx' local-only='false' force='false'>\n    <parameter name=\"id\" value=\"`$tmp.ar.allotted-resource-id`\" />\n\t<parameter name=\"role\" value=\"`$prop.connection-attachment.role`\" />\t\n    <parameter name=\"vpn-name\" value=\"`$prop.connection-attachment.sdwanVpnName`\" />\n\t<parameter name=\"selflink\" value=\"`$tmp.ar.self-link`\" />\n\t<parameter name=\"model-invariant-id\" value=\"`$connection-attachment-topology-operation-input.allotted-resource-information.onap-model-information.model-invariant-uuid`\" />\n\t<parameter name=\"model-version-id\" value=\"`$connection-attachment-topology-operation-input.allotted-resource-information.onap-model-information.model-uuid`\" />\n\t<parameter name=\"operational-status\" value=\"Created\" />\n",\r
504     "comments": "",\r
505     "outputs": 1,\r
506     "x": 629.7221069335938,\r
507     "y": 1801.531901717186,\r
508     "z": "588621bb.e9fef",\r
509     "wires": [\r
510       [\r
511         "bad0c727.d486c8",\r
512         "6744df38.44f3c"\r
513       ]\r
514     ]\r
515   },\r
516   {\r
517     "id": "bad0c727.d486c8",\r
518     "type": "failure",\r
519     "name": "failure",\r
520     "xml": "<outcome value='failure'>\n",\r
521     "comments": "",\r
522     "outputs": 1,\r
523     "x": 824.4840431213379,\r
524     "y": 1792.4845031499863,\r
525     "z": "588621bb.e9fef",\r
526     "wires": [\r
527       [\r
528         "be610d32.68478"\r
529       ]\r
530     ]\r
531   },\r
532   {\r
533     "id": "be610d32.68478",\r
534     "type": "returnFailure",\r
535     "name": "return failure",\r
536     "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=\"AAI failed\" />\n",\r
537     "comments": "",\r
538     "x": 991.0079231262207,\r
539     "y": 1804.1035741567612,\r
540     "z": "588621bb.e9fef",\r
541     "wires": []\r
542   },\r
543   {\r
544     "id": "6744df38.44f3c",\r
545     "type": "failure",\r
546     "name": "not-found",\r
547     "xml": "<outcome value='not-found'>\n",\r
548     "comments": "",\r
549     "outputs": 1,\r
550     "x": 831.5793304443359,\r
551     "y": 1825.2464708089828,\r
552     "z": "588621bb.e9fef",\r
553     "wires": [\r
554       [\r
555         "be610d32.68478"\r
556       ]\r
557     ]\r
558   },\r
559   {\r
560     "id": "7ddcb0e1.3b36d",\r
561     "type": "comment",\r
562     "name": "Save Resource to AAI",\r
563     "info": "",\r
564     "comments": "",\r
565     "x": 663.5317840576172,\r
566     "y": 1769.8338731527328,\r
567     "z": "588621bb.e9fef",\r
568     "wires": []\r
569   },\r
570   {\r
571     "id": "42977fdb.9150a",\r
572     "type": "comment",\r
573     "name": "Set allotted resource type if not sent by SO",\r
574     "info": "",\r
575     "comments": "",\r
576     "x": 665.03125,\r
577     "y": 242.99999845027924,\r
578     "z": "588621bb.e9fef",\r
579     "wires": []\r
580   },\r
581   {\r
582     "id": "bb52c8b.9210938",\r
583     "type": "switchNode",\r
584     "name": "switch allotted-resource-type",\r
585     "xml": "<switch test='`$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-type`'>\n",\r
586     "comments": "",\r
587     "outputs": 1,\r
588     "x": 626.9545593261719,\r
589     "y": 283.5660547018051,\r
590     "z": "588621bb.e9fef",\r
591     "wires": [\r
592       [\r
593         "ebcdd7cc.5ddb28",\r
594         "5e1b4704.ff03b8"\r
595       ]\r
596     ]\r
597   },\r
598   {\r
599     "id": "ebcdd7cc.5ddb28",\r
600     "type": "outcome",\r
601     "name": "NULL",\r
602     "xml": "<outcome value=''>",\r
603     "comments": "",\r
604     "outputs": 1,\r
605     "x": 829.9547119140625,\r
606     "y": 268.56605756282806,\r
607     "z": "588621bb.e9fef",\r
608     "wires": [\r
609       [\r
610         "e292f924.218148"\r
611       ]\r
612     ]\r
613   },\r
614   {\r
615     "id": "5e1b4704.ff03b8",\r
616     "type": "other",\r
617     "name": "other",\r
618     "xml": "<outcome value='Other'>\n",\r
619     "comments": "",\r
620     "outputs": 1,\r
621     "x": 822.9545402526855,\r
622     "y": 308.5660775899887,\r
623     "z": "588621bb.e9fef",\r
624     "wires": [\r
625       [\r
626         "bc4b0c6b.6b5dc"\r
627       ]\r
628     ]\r
629   },\r
630   {\r
631     "id": "bc4b0c6b.6b5dc",\r
632     "type": "set",\r
633     "name": "set tmp.ar.allotted-resource-type",\r
634     "xml": "<set>\n<parameter name='tmp.ar.allotted-resource-type' value='`$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-type`' />\n",\r
635     "comments": "",\r
636     "x": 1054.9545249938965,\r
637     "y": 308.5660823583603,\r
638     "z": "588621bb.e9fef",\r
639     "wires": []\r
640   },\r
641   {\r
642     "id": "e49aa8f1.f12588",\r
643     "type": "comment",\r
644     "name": "For storage in AAI connection-attachment-topology",\r
645     "info": "",\r
646     "comments": "",\r
647     "x": 690.0312118530273,\r
648     "y": 377.99999845027924,\r
649     "z": "588621bb.e9fef",\r
650     "wires": []\r
651   },\r
652   {\r
653     "id": "c0fccf31.3b1b7",\r
654     "type": "comment",\r
655     "name": "Obtain different URL, template location etc",\r
656     "info": "For saving resource information to MDSAL & for AAI",\r
657     "comments": "",\r
658     "x": 665.0311965942383,\r
659     "y": 459.888907790184,\r
660     "z": "588621bb.e9fef",\r
661     "wires": []\r
662   },\r
663   {\r
664     "id": "100bd889.c313d7",\r
665     "type": "comment",\r
666     "name": "Used for Put AR by id to MDSAL",\r
667     "info": "",\r
668     "comments": "",\r
669     "x": 631.0312805175781,\r
670     "y": 548.8889249563217,\r
671     "z": "588621bb.e9fef",\r
672     "wires": []\r
673   },\r
674   {\r
675     "id": "18c10c65.2f90b4",\r
676     "type": "comment",\r
677     "name": "Obtain the last index in services",\r
678     "info": "ServiceData is added by Provider code",\r
679     "comments": "",\r
680     "x": 632.4757232666016,\r
681     "y": 734.8888696432114,\r
682     "z": "588621bb.e9fef",\r
683     "wires": []\r
684   },\r
685   {\r
686     "id": "4f85eb.0fdeca14",\r
687     "type": "set",\r
688     "name": "set output to api handler",\r
689     "xml": "<set>\n<parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />\n<parameter name='connection-attachment-object-path' value=\"`$tmp.ar.self-link`\"/>\n<parameter name='service-object-path' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $connection-attachment-topology-operation-input.service-information.service-instance-id\n + '/service-data/service-topology/'`\"/>\n \n",\r
690     "comments": "",\r
691     "x": 615.2993927001953,\r
692     "y": 1708.359200835228,\r
693     "z": "588621bb.e9fef",\r
694     "wires": []\r
695   },\r
696   {\r
697     "id": "4b8ef133.24669",\r
698     "type": "returnSuccess",\r
699     "name": "return success",\r
700     "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",\r
701     "comments": "",\r
702     "x": 583.7125244140625,\r
703     "y": 1957.974946975708,\r
704     "z": "588621bb.e9fef",\r
705     "wires": []\r
706   },\r
707   {\r
708     "id": "e292f924.218148",\r
709     "type": "set",\r
710     "name": "set tmp.ar.allotted-resource-type",\r
711     "xml": "<set>\n<parameter name='tmp.ar.allotted-resource-type' value=\"SDWANAttachmentInstance\" />\n",\r
712     "comments": "",\r
713     "x": 1069.0313987731934,\r
714     "y": 268.9999841451645,\r
715     "z": "588621bb.e9fef",\r
716     "wires": []\r
717   },\r
718   {\r
719     "id": "b3ca8b3e.e57468",\r
720     "type": "execute",\r
721     "name": "execute RestApiCallNode - PUT AR by id",\r
722     "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n    <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.sdwan-attachment.templatefile`\" />\n    <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />\n    <parameter name='restapiUser' value='`$prop.controller.user`' />\n    <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n    <parameter name='format' value='json' />\n    <parameter name='httpMethod' value='PUT' />\n    <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n",\r
723     "comments": "",\r
724     "outputs": 1,\r
725     "x": 666.0315246582031,\r
726     "y": 1642.000130057335,\r
727     "z": "588621bb.e9fef",\r
728     "wires": [\r
729       [\r
730         "891b6f50.0b8ca",\r
731         "17f28b89.81c5a4",\r
732         "6238cca6.7c6784"\r
733       ]\r
734     ]\r
735   },\r
736   {\r
737     "id": "891b6f50.0b8ca",\r
738     "type": "not-found",\r
739     "name": "not-found",\r
740     "xml": "<outcome value='not-found'>\n",\r
741     "comments": "",\r
742     "outputs": 1,\r
743     "x": 915.6728782653809,\r
744     "y": 1680.3314603567123,\r
745     "z": "588621bb.e9fef",\r
746     "wires": [\r
747       [\r
748         "c7ada304.940bb"\r
749       ]\r
750     ]\r
751   },\r
752   {\r
753     "id": "17f28b89.81c5a4",\r
754     "type": "failure",\r
755     "name": "failure",\r
756     "xml": "<outcome value='failure'>\n",\r
757     "comments": "",\r
758     "outputs": 1,\r
759     "x": 906.6729278564453,\r
760     "y": 1648.8314861059189,\r
761     "z": "588621bb.e9fef",\r
762     "wires": [\r
763       [\r
764         "c7ada304.940bb"\r
765       ]\r
766     ]\r
767   },\r
768   {\r
769     "id": "6238cca6.7c6784",\r
770     "type": "success",\r
771     "name": "success",\r
772     "xml": "<outcome value='success'>\n",\r
773     "comments": "",\r
774     "outputs": 1,\r
775     "x": 910.422966003418,\r
776     "y": 1619.1885909810662,\r
777     "z": "588621bb.e9fef",\r
778     "wires": [\r
779       [\r
780         "9d842474.1d5df8"\r
781       ]\r
782     ]\r
783   },\r
784   {\r
785     "id": "c7ada304.940bb",\r
786     "type": "returnFailure",\r
787     "name": "return failure",\r
788     "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=\"Error updating md-sal for connection-attachment-allotted-resource\" />\n",\r
789     "comments": "",\r
790     "x": 1076.422966003418,\r
791     "y": 1649.5815099477768,\r
792     "z": "588621bb.e9fef",\r
793     "wires": []\r
794   },\r
795   {\r
796     "id": "9d842474.1d5df8",\r
797     "type": "block",\r
798     "name": "block",\r
799     "xml": "<block>\n",\r
800     "atomic": "false",\r
801     "comments": "",\r
802     "outputs": 1,\r
803     "x": 1052.0789337158203,\r
804     "y": 1615.3807601705194,\r
805     "z": "588621bb.e9fef",\r
806     "wires": [\r
807       []\r
808     ]\r
809   },\r
810   {\r
811     "id": "6737ccd9.1b9484",\r
812     "type": "execute",\r
813     "name": "execute RestApiCallNode - Update parent provided service AR",\r
814     "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n    <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.parentsvc.templatefile`\" />\n    <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.parent-ar-url`' />\n    <parameter name='restapiUser' value='`$prop.controller.user`' />\n    <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n    <parameter name='format' value='json' />\n    <parameter name='httpMethod' value='PUT' />\n    <parameter name=\"responsePrefix\" value=\"parent\" />\n\n",\r
815     "comments": "",\r
816     "outputs": 1,\r
817     "x": 731.0312042236328,\r
818     "y": 1158.000163435936,\r
819     "z": "588621bb.e9fef",\r
820     "wires": [\r
821       [\r
822         "ce9d67c0.fef428",\r
823         "32ea0966.e31a46",\r
824         "8052d936.8da758"\r
825       ]\r
826     ]\r
827   },\r
828   {\r
829     "id": "ce9d67c0.fef428",\r
830     "type": "not-found",\r
831     "name": "not-found",\r
832     "xml": "<outcome value='not-found'>\n",\r
833     "comments": "",\r
834     "outputs": 1,\r
835     "x": 1039.3392639160156,\r
836     "y": 1189.998439192772,\r
837     "z": "588621bb.e9fef",\r
838     "wires": [\r
839       [\r
840         "cecd64fe.528bd8"\r
841       ]\r
842     ]\r
843   },\r
844   {\r
845     "id": "32ea0966.e31a46",\r
846     "type": "failure",\r
847     "name": "failure",\r
848     "xml": "<outcome value='failure'>\n",\r
849     "comments": "",\r
850     "outputs": 1,\r
851     "x": 1030.33931350708,\r
852     "y": 1158.4984649419785,\r
853     "z": "588621bb.e9fef",\r
854     "wires": [\r
855       [\r
856         "cecd64fe.528bd8"\r
857       ]\r
858     ]\r
859   },\r
860   {\r
861     "id": "8052d936.8da758",\r
862     "type": "success",\r
863     "name": "success",\r
864     "xml": "<outcome value='success'>\n",\r
865     "comments": "",\r
866     "outputs": 1,\r
867     "x": 1034.0893516540527,\r
868     "y": 1128.8555698171258,\r
869     "z": "588621bb.e9fef",\r
870     "wires": [\r
871       [\r
872         "c4a631eb.caa38"\r
873       ]\r
874     ]\r
875   },\r
876   {\r
877     "id": "cecd64fe.528bd8",\r
878     "type": "returnFailure",\r
879     "name": "return failure",\r
880     "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=\"Error updating md-sal for connection-attachment-allotted-resource\" />\n",\r
881     "comments": "",\r
882     "x": 1200.0893516540527,\r
883     "y": 1159.2484887838364,\r
884     "z": "588621bb.e9fef",\r
885     "wires": []\r
886   },\r
887   {\r
888     "id": "c4a631eb.caa38",\r
889     "type": "block",\r
890     "name": "block",\r
891     "xml": "<block>\n",\r
892     "atomic": "false",\r
893     "comments": "",\r
894     "outputs": 1,\r
895     "x": 1175.745319366455,\r
896     "y": 1125.047739006579,\r
897     "z": "588621bb.e9fef",\r
898     "wires": [\r
899       []\r
900     ]\r
901   },\r
902   {\r
903     "id": "9c5665b2.ee98f8",\r
904     "type": "comment",\r
905     "name": "Put the parent allotted resource in mdsal",\r
906     "info": "",\r
907     "comments": "",\r
908     "x": 660.0311508178711,\r
909     "y": 1120.000069975853,\r
910     "z": "588621bb.e9fef",\r
911     "wires": []\r
912   },\r
913   {\r
914     "id": "279d04d9.311b7c",\r
915     "type": "set",\r
916     "name": "set connection-attachment-ar-identifiers",\r
917     "xml": "<set>\n<parameter name='connection-attachment-ar-identifiers.consuming-service-instance-id' value=\"`$connection-attachment-topology-operation-input.service-information.service-instance-id` \" />\n<parameter name='connection-attachment-ar-identifiers.parent-service-instance-id' value=\"`$connection-attachment-topology-operation-input.allotted-resource-information.parent-service-instance-id` \" />\n<parameter name='connection-attachment-ar-identifiers.allotted-resource-type' value=\"`$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-type` \" />\n<parameter name='connection-attachment-ar-identifiers.allotted-resource-id' value=\"`$tmp.ar.allotted-resource-id` \" />\n\n",\r
918     "comments": "",\r
919     "x": 656.3883361816406,\r
920     "y": 1322.5716890096664,\r
921     "z": "588621bb.e9fef",\r
922     "wires": []\r
923   },\r
924   {\r
925     "id": "3d98ece2.536f54",\r
926     "type": "set",\r
927     "name": "set ar-data",\r
928     "xml": "<set>\n<parameter name='connection-attachment-ar.allotted-resource-id' value=\"`$tmp.ar.allotted-resource-id` \" />\n<parameter name='connection-attachment-ar.allotted-resource-status.action' value=\"`$connection-attachment-topology-operation-input.request-information.request-action` \" />\n<parameter name='connection-attachment-ar.allotted-resource-status.rpc-name' value=\"connection-attachment-topology-operation\" />\n<parameter name='connection-attachment-ar.allotted-resource-status.rpc-action' value=\"`$connection-attachment-topology-operation-input.sdnc-request-header.svc-action` \" />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.request-information.' value=\"`$connection-attachment-topology-operation-input.request-information.` \" />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.' value=\"`$connection-attachment-topology-operation-input.sdnc-request-header.` \" />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.service-information.' value=\"`$connection-attachment-topology-operation-input.service-information.` \" />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.' value=\"`$connection-attachment-topology-operation-input.allotted-resource-information.` \" />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.connection-attachment-request-input.' value=\"`$connection-attachment-topology-operation-input.connection-attachment-request-input.` \" />",\r
929     "comments": "",\r
930     "x": 576.2451629638672,\r
931     "y": 1290.38119161129,\r
932     "z": "588621bb.e9fef",\r
933     "wires": []\r
934   },\r
935   {\r
936     "id": "bd2101b.463ff",\r
937     "type": "set",\r
938     "name": "set identifiers in overall structure",\r
939     "xml": "<set>\n<parameter name='connection-attachment-ar.allotted-resource-data.connection-attachment-topology.allotted-resource-identifiers.' \nvalue=\"`$connection-attachment-ar-identifiers.`\" />\n\n\n",\r
940     "comments": "",\r
941     "x": 635.1981353759766,\r
942     "y": 1356.6668742895126,\r
943     "z": "588621bb.e9fef",\r
944     "wires": []\r
945   },\r
946   {\r
947     "id": "a593e64c.edffe8",\r
948     "type": "execute",\r
949     "name": "execute getTime",\r
950     "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='setTime' >\n    <parameter name=\"outputPath\" value=\"tmp.current-time\" />\n\n",\r
951     "comments": "",\r
952     "outputs": 1,\r
953     "x": 587.5309753417969,\r
954     "y": 1430.000401854515,\r
955     "z": "588621bb.e9fef",\r
956     "wires": [\r
957       []\r
958     ]\r
959   },\r
960   {\r
961     "id": "ad258829.1a9fb8",\r
962     "type": "set",\r
963     "name": "set allotted-resource-oper-status",\r
964     "xml": "<set>\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.order-status' value='Created' />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.last-action' value='`$connection-attachment-topology-operation-input.request-information.request-action`' />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action' value='`$connection-attachment-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id' value='`$connection-attachment-topology-operation-input.sdnc-request-header.svc-request-id`' />\n<parameter name='connection-attachment-ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp' value='`$tmp.current-time`' />\n",\r
965     "comments": "",\r
966     "x": 638.5180130004883,\r
967     "y": 1485.9516347646713,\r
968     "z": "588621bb.e9fef",\r
969     "wires": []\r
970   },\r
971   {\r
972     "id": "d28d77a4.947808",\r
973     "type": "set",\r
974     "name": "set model-data",\r
975     "xml": "<set>\n<parameter name='connection-attachment-ar.allotted-resource-data.connection-attachment-topology.onap-model-information.' value=\"`$connection-attachment-topology-operation-input.allotted-resource-information.onap-model-information.` \" />",\r
976     "comments": "",\r
977     "x": 583.0866317749023,\r
978     "y": 1391.5557597875595,\r
979     "z": "588621bb.e9fef",\r
980     "wires": []\r
981   },\r
982   {\r
983     "id": "23859bfe.f043f4",\r
984     "type": "comment",\r
985     "name": "Prepare data for allotted-resource addition to MDSAL",\r
986     "info": "This will add to allotted-resource which is present inside service.",\r
987     "comments": "",\r
988     "x": 700.4201202392578,\r
989     "y": 1256.5556062459946,\r
990     "z": "588621bb.e9fef",\r
991     "wires": []\r
992   },\r
993   {\r
994     "id": "fff0be1d.b2bcf",\r
995     "type": "execute",\r
996     "name": "generate parent-ar url - replace allotted-resource-id",\r
997     "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n    <parameter name=\"source\" value=\"`$tmp.parent-ar-url`\"/>\n    <parameter name=\"outputPath\" value=\"tmp.parent-ar-url\"/>\n    <parameter name=\"target\" value=\"{allotted-resource-id}\"/>\n    <parameter name=\"replacement\" value=\"`$tmp.ar.allotted-resource-id`\"/>\n",\r
998     "comments": "",\r
999     "outputs": 1,\r
1000     "x": 695.5312652587891,\r
1001     "y": 1084.0000089406967,\r
1002     "z": "588621bb.e9fef",\r
1003     "wires": [\r
1004       []\r
1005     ]\r
1006   },\r
1007   {\r
1008     "id": "e7fc7beb.0c2218",\r
1009     "type": "execute",\r
1010     "name": "generate parent-ar url - replace service-instance-id",\r
1011     "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n    <parameter name=\"source\" value=\"`$prop.restapi.parent-provided-resource`\"/>\n    <parameter name=\"outputPath\" value=\"tmp.parent-ar-url\"/>\n    <parameter name=\"target\" value=\"{service-instance-id}\"/>\n    <parameter name=\"replacement\" value=\"`$tmp.ar.parent-service-instance-id`\"/>\n",\r
1012     "comments": "",\r
1013     "outputs": 1,\r
1014     "x": 691.5311889648438,\r
1015     "y": 1041.000145316124,\r
1016     "z": "588621bb.e9fef",\r
1017     "wires": [\r
1018       []\r
1019     ]\r
1020   },\r
1021   {\r
1022     "id": "80cf2b3b.3e92b8",\r
1023     "type": "comment",\r
1024     "name": "Prepare Parent AR URL",\r
1025     "info": "Preparation to set provided-allotted-resource in parent service instance",\r
1026     "comments": "",\r
1027     "x": 609.5316467285156,\r
1028     "y": 970.0000985860825,\r
1029     "z": "588621bb.e9fef",\r
1030     "wires": []\r
1031   },\r
1032   {\r
1033     "id": "49207aa3.305be4",\r
1034     "type": "set",\r
1035     "name": "set tmp.ar.parent-service-instance-id",\r
1036     "xml": "<set>\n<parameter name='tmp.ar.parent-service-instance-id' value=\"`$connection-attachment-topology-operation-input.allotted-resource-information.parent-service-instance-id` \" />\n\n",\r
1037     "comments": "",\r
1038     "x": 648.5314407348633,\r
1039     "y": 1003.5000380277634,\r
1040     "z": "588621bb.e9fef",\r
1041     "wires": []\r
1042   },\r
1043   {\r
1044     "id": "1288ae5b.1e1ce2",\r
1045     "type": "returnFailure",\r
1046     "name": "return failure",\r
1047     "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=\"Error updating md-sal for connection-attachment-allotted-resource as cosumed allotted resource already exists.\" />\n",\r
1048     "comments": "",\r
1049     "x": 2205.7882232666016,\r
1050     "y": 841.6458276510239,\r
1051     "z": "588621bb.e9fef",\r
1052     "wires": []\r
1053   },\r
1054   {\r
1055     "id": "6c9a2abd.a627f4",\r
1056     "type": "set",\r
1057     "name": "set tmp.found-cidx",\r
1058     "xml": "<set>\n<parameter name='tmp.found-cidx' value=\"`false`\" />\n\n\n",\r
1059     "comments": "",\r
1060     "x": 1331.6773948669434,\r
1061     "y": 753.3125706911087,\r
1062     "z": "588621bb.e9fef",\r
1063     "wires": []\r
1064   },\r
1065   {\r
1066     "id": "57452405.e26b5c",\r
1067     "type": "comment",\r
1068     "name": "Add to parent services provided-allotted-resources in mdsal",\r
1069     "info": "",\r
1070     "comments": "",\r
1071     "x": 720.2327575683594,\r
1072     "y": 937.9792550802231,\r
1073     "z": "588621bb.e9fef",\r
1074     "wires": []\r
1075   },\r
1076   {\r
1077     "id": "6013a8b1.8cfec8",\r
1078     "type": "comment",\r
1079     "name": "Add to allotted-resources in mdsal",\r
1080     "info": "",\r
1081     "comments": "",\r
1082     "x": 640.9999465942383,\r
1083     "y": 1223.9689353704453,\r
1084     "z": "588621bb.e9fef",\r
1085     "wires": []\r
1086   },\r
1087   {\r
1088     "id": "91db96ee.5f5ab8",\r
1089     "type": "block",\r
1090     "name": "block: atomic",\r
1091     "xml": "<block atomic=\"true\">\n",\r
1092     "atomic": "false",\r
1093     "comments": "",\r
1094     "outputs": 1,\r
1095     "x": 1314.031301498413,\r
1096     "y": 651.2777589559555,\r
1097     "z": "588621bb.e9fef",\r
1098     "wires": [\r
1099       [\r
1100         "d36cd8c7.bbc8c8"\r
1101       ]\r
1102     ]\r
1103   },\r
1104   {\r
1105     "id": "d36cd8c7.bbc8c8",\r
1106     "type": "switchNode",\r
1107     "name": "switch cr length",\r
1108     "xml": "<switch test='`$mdsal-ar.connection-attachment-allotted-resource_length`'>\n",\r
1109     "comments": "",\r
1110     "outputs": 1,\r
1111     "x": 1501.8886814117432,\r
1112     "y": 651.8968943357468,\r
1113     "z": "588621bb.e9fef",\r
1114     "wires": [\r
1115       [\r
1116         "c670c701.c3ff18"\r
1117       ]\r
1118     ]\r
1119   },\r
1120   {\r
1121     "id": "c670c701.c3ff18",\r
1122     "type": "other",\r
1123     "name": "outcome 1",\r
1124     "xml": "<outcome value='1'>\n",\r
1125     "comments": "",\r
1126     "outputs": 1,\r
1127     "x": 1701.2218036651611,\r
1128     "y": 651.8969730138779,\r
1129     "z": "588621bb.e9fef",\r
1130     "wires": [\r
1131       [\r
1132         "bc59ed7b.1de9c"\r
1133       ]\r
1134     ]\r
1135   },\r
1136   {\r
1137     "id": "3a0fc26c.48c2fe",\r
1138     "type": "execute",\r
1139     "name": "execute RestApiCallNode - get-resource connection-attachment-allotted-resource",\r
1140     "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n    <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url`' />\n    <parameter name='restapiUser' value='`$prop.controller.user`' />\n    <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n    <parameter name='format' value='json' />\n    <parameter name='httpMethod' value='GET' />\n    <parameter name=\"responsePrefix\" value=\"mdsal-ar\" />\n\n",\r
1141     "comments": "",\r
1142     "outputs": 1,\r
1143     "x": 786.0313034057617,\r
1144     "y": 646.0000346899033,\r
1145     "z": "588621bb.e9fef",\r
1146     "wires": [\r
1147       [\r
1148         "8fcb37f5.98d048",\r
1149         "230adea5.52af62"\r
1150       ]\r
1151     ]\r
1152   },\r
1153   {\r
1154     "id": "230adea5.52af62",\r
1155     "type": "failure",\r
1156     "name": "failure",\r
1157     "xml": "<outcome value='failure'>\n",\r
1158     "comments": "",\r
1159     "outputs": 1,\r
1160     "x": 1154.0313339233398,\r
1161     "y": 616.0000327825546,\r
1162     "z": "588621bb.e9fef",\r
1163     "wires": [\r
1164       [\r
1165         "f02fcbfc.47bf28"\r
1166       ]\r
1167     ]\r
1168   },\r
1169   {\r
1170     "id": "f02fcbfc.47bf28",\r
1171     "type": "block",\r
1172     "name": "block",\r
1173     "xml": "<block>\n",\r
1174     "atomic": "false",\r
1175     "comments": "",\r
1176     "outputs": 1,\r
1177     "x": 1306.0313339233398,\r
1178     "y": 615.0000327825546,\r
1179     "z": "588621bb.e9fef",\r
1180     "wires": [\r
1181       []\r
1182     ]\r
1183   },\r
1184   {\r
1185     "id": "13f594ad.41064b",\r
1186     "type": "block",\r
1187     "name": "block : atomic",\r
1188     "xml": "<block atomic=\"true\">",\r
1189     "atomic": "true",\r
1190     "outputs": 1,\r
1191     "x": 592.0351715087891,\r
1192     "y": 1561.2500013113022,\r
1193     "z": "588621bb.e9fef",\r
1194     "wires": [\r
1195       [\r
1196         "c4d3876.e194578",\r
1197         "a56d9e1e.69cb5"\r
1198       ]\r
1199     ]\r
1200   },\r
1201   {\r
1202     "id": "c4d3876.e194578",\r
1203     "type": "for",\r
1204     "name": "for each sdwan-get-request-input-param",\r
1205     "xml": "<for index='i' start='0' end='`$connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.connection-attachment-request-input.param_length`' >\n",\r
1206     "comments": "",\r
1207     "outputs": 1,\r
1208     "x": 927.0353698730469,\r
1209     "y": 1507.2501235604286,\r
1210     "z": "588621bb.e9fef",\r
1211     "wires": [\r
1212       [\r
1213         "c009da24.7d2598"\r
1214       ]\r
1215     ]\r
1216   },\r
1217   {\r
1218     "id": "654cbf55.2b8ad",\r
1219     "type": "comment",\r
1220     "name": "Required for filling template values",\r
1221     "info": "This is done because connection-attachment is generic resource and doesn't have specific parameters",\r
1222     "comments": "",\r
1223     "x": 949.4798736572266,\r
1224     "y": 1541.0832842588425,\r
1225     "z": "588621bb.e9fef",\r
1226     "wires": []\r
1227   },\r
1228   {\r
1229     "id": "eaf3595.bafe4a8",\r
1230     "type": "comment",\r
1231     "name": "Remove VNFC prefix",\r
1232     "info": "",\r
1233     "comments": "",\r
1234     "x": 1010.035213470459,\r
1235     "y": 1463.6944593191147,\r
1236     "z": "588621bb.e9fef",\r
1237     "wires": []\r
1238   },\r
1239   {\r
1240     "id": "c009da24.7d2598",\r
1241     "type": "block",\r
1242     "name": "block : atomic",\r
1243     "xml": "<block atomic=\"true\">",\r
1244     "atomic": "true",\r
1245     "outputs": 1,\r
1246     "x": 1174.0352172851562,\r
1247     "y": 1508.6943687200546,\r
1248     "z": "588621bb.e9fef",\r
1249     "wires": [\r
1250       [\r
1251         "447c6486.c17b2c",\r
1252         "fb95c554.72d748"\r
1253       ]\r
1254     ]\r
1255   },\r
1256   {\r
1257     "id": "6b76a58c.b29a1c",\r
1258     "type": "comment",\r
1259     "name": "Take the parameter names by removing prefix",\r
1260     "info": "",\r
1261     "comments": "",\r
1262     "x": 1442.0350646972656,\r
1263     "y": 1424.250366806984,\r
1264     "z": "588621bb.e9fef",\r
1265     "wires": []\r
1266   },\r
1267   {\r
1268     "id": "447c6486.c17b2c",\r
1269     "type": "execute",\r
1270     "name": "execute split parameterName",\r
1271     "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >\n<parameter name=\"original_string\" value='`$connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.connection-attachment-request-input.param[$i].name`'/>\n<parameter name=\"regex\" value=\"_\"/>\n<parameter name=\"ctx_memory_result_key\" value=\"param-prefix\"/>\n",\r
1272     "comments": "",\r
1273     "outputs": 1,\r
1274     "x": 1393.0697326660156,\r
1275     "y": 1459.229462981224,\r
1276     "z": "588621bb.e9fef",\r
1277     "wires": [\r
1278       []\r
1279     ]\r
1280   },\r
1281   {\r
1282     "id": "fb95c554.72d748",\r
1283     "type": "set",\r
1284     "name": "set parameterName",\r
1285     "xml": "<set>\n<parameter name=\"`connection-attachment-ar.allotted-resource-data.allotted-resource-operation-information.connection-attachment-request-input.param[$i].name`\" value='`$param-prefix[$param-prefix_length -1]`'/>\n",\r
1286     "comments": "",\r
1287     "x": 1381.5142059326172,\r
1288     "y": 1563.2294334173203,\r
1289     "z": "588621bb.e9fef",\r
1290     "wires": []\r
1291   },\r
1292   {\r
1293     "id": "a56d9e1e.69cb5",\r
1294     "type": "call",\r
1295     "name": "call GENERIC-RESOURCE-API:sdwan-get-saved-ar-param",\r
1296     "xml": "<call module='GENERIC-RESOURCE-API' rpc='sdwan-get-saved-ar-param' mode='sync' >\n",\r
1297     "comments": "",\r
1298     "outputs": 1,\r
1299     "x": 968.0352172851562,\r
1300     "y": 1581.2500633001328,\r
1301     "z": "588621bb.e9fef",\r
1302     "wires": [\r
1303       []\r
1304     ]\r
1305   },\r
1306   {\r
1307     "id": "936a519f.07274",\r
1308     "type": "save",\r
1309     "name": "save allotted relationship in AAI",\r
1310     "xml": "<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" resource=\"service-instance:relationship-list\" \n\t\tkey=\"customer.global-customer-id = $connection-attachment-topology-operation-input.service-information.global-customer-id AND\n\t\t\tservice-subscription.service-type = $connection-attachment-topology-operation-input.service-information.subscription-service-type AND\n\t\t\tservice-instance.service-instance-id = $connection-attachment-topology-operation-input.allotted-resource-information.parent-service-instance-id\" \n      force=\"true\" pfx=\"tmp.AnAI-data\">\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"allotted-resource\" />\n<parameter name=\"relationship-list.relationship[0].related-link\" value=\"`'/business/customers/customer/' + $connection-attachment-topology-operation-input.service-information.global-customer-id + '/service-subscriptions/service-subscription/' + $connection-attachment-topology-operation-input.service-information.subscription-service-type + '/service-instances/service-instance/' + $connection-attachment-topology-operation-input.service-information.service-instance-id + '/allotted-resources/allotted-resource/' + $tmp.ar.allotted-resource-id`\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"allotted-resource.id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$tmp.ar.allotted-resource-id`\" />\n\n\n\n",\r
1311     "comments": "",\r
1312     "outputs": 1,\r
1313     "x": 641.0312767028809,\r
1314     "y": 1884.531162261963,\r
1315     "z": "588621bb.e9fef",\r
1316     "wires": [\r
1317       []\r
1318     ]\r
1319   }\r
1320 ]\r