Merge "SDWAN Templates for RestapiCallNode"
[sdnc/oam.git] / platform-logic / generic-resource-api / src / main / json / GENERIC-RESOURCE-API_sotn-attachment-topology-operation-create.json
1 [
2   {
3     "id": "325842f8.71766e",
4     "type": "dgstart",
5     "name": "DGSTART",
6     "outputs": 1,
7     "x": 107.03125,
8     "y": 44.03125,
9     "z": "5611e7fd.31c9b8",
10     "wires": [
11       [
12         "260e5d2a.9ebe72"
13       ]
14     ]
15   },
16   {
17     "id": "260e5d2a.9ebe72",
18     "type": "service-logic",
19     "name": "GENERIC-RESOURCE-API ${project.version}",
20     "module": "GENERIC-RESOURCE-API",
21     "version": "${project.version}",
22     "comments": "",
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}'>",
24     "outputs": 1,
25     "x": 319.03125381469727,
26     "y": 116.0312671661377,
27     "z": "5611e7fd.31c9b8",
28     "wires": [
29       [
30         "aa492387.d875a"
31       ]
32     ]
33   },
34   {
35     "id": "aa492387.d875a",
36     "type": "method",
37     "name": "sotn-attachment-topology-operation-create",
38     "xml": "<method rpc='sotn-attachment-topology-operation-create' mode='sync'>\n",
39     "comments": "",
40     "outputs": 1,
41     "x": 307.0313720703125,
42     "y": 204.03125,
43     "z": "5611e7fd.31c9b8",
44     "wires": [
45       [
46         "3ba2475a.82b468"
47       ]
48     ]
49   },
50   {
51     "id": "3ba2475a.82b468",
52     "type": "block",
53     "name": "block : atomic",
54     "xml": "<block atomic=\"true\">\n",
55     "atomic": "false",
56     "comments": "",
57     "outputs": 1,
58     "x": 227.03130340576172,
59     "y": 953.0314979553223,
60     "z": "5611e7fd.31c9b8",
61     "wires": [
62       [
63         "5b9fedc5.bb21a4",
64         "1c8d2bb9.f29f94",
65         "269db4cc.d4abfc",
66         "373e17e2.9acc38",
67         "5fd13a1.e2465c4",
68         "acb04fc4.b40f4",
69         "574b7ca7.0881c4",
70         "35a496d5.57302a",
71         "950a621f.7b821",
72         "5dbf4a35.fd12c4",
73         "5accbcde.210f64",
74         "de4bba44.8919f8",
75         "a1a37b4b.52c8a8",
76         "63023c8e.9fcb64",
77         "a6efd3b6.3278d",
78         "994d951b.a5b738",
79         "8ee1af3e.bbe67",
80         "ad95dda4.7a6dd",
81         "efc5e53d.5d75a8",
82         "72c54e75.d1648",
83         "850178e9.7d2408",
84         "d5054e0.23964b",
85         "acacc6b8.9b06e8"
86       ]
87     ]
88   },
89   {
90     "id": "741c9c3f.224ea4",
91     "type": "comment",
92     "name": "Set allotted resource id if not sent by SO",
93     "info": "",
94     "comments": "",
95     "x": 698.1079406738281,
96     "y": 128.46516609191895,
97     "z": "5611e7fd.31c9b8",
98     "wires": [
99
100     ]
101   },
102   {
103     "id": "5b9fedc5.bb21a4",
104     "type": "switchNode",
105     "name": "switch allotted-resource-id",
106     "xml": "<switch test='`$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-id`'>\n",
107     "comments": "",
108     "outputs": 1,
109     "x": 657.0312805175781,
110     "y": 169.03124237060547,
111     "z": "5611e7fd.31c9b8",
112     "wires": [
113       [
114         "8be7a33f.276ac",
115         "503fc7ba.f0e4b8"
116       ]
117     ]
118   },
119   {
120     "id": "8be7a33f.276ac",
121     "type": "outcome",
122     "name": "NULL",
123     "xml": "<outcome value=''>",
124     "comments": "",
125     "outputs": 1,
126     "x": 908.0313301086426,
127     "y": 131.03122925758362,
128     "z": "5611e7fd.31c9b8",
129     "wires": [
130       [
131         "32f9a898.99bcd8"
132       ]
133     ]
134   },
135   {
136     "id": "503fc7ba.f0e4b8",
137     "type": "other",
138     "name": "other",
139     "xml": "<outcome value='Other'>\n",
140     "comments": "",
141     "outputs": 1,
142     "x": 909.03125,
143     "y": 191.03123784065247,
144     "z": "5611e7fd.31c9b8",
145     "wires": [
146       [
147         "4eae44ec.25255c"
148       ]
149     ]
150   },
151   {
152     "id": "4eae44ec.25255c",
153     "type": "set",
154     "name": "set tmp.ar.allotted-resource-id",
155     "xml": "<set>\n<parameter name='tmp.ar.allotted-resource-id' value='`$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-id`' />\n",
156     "comments": "",
157     "x": 1141.031234741211,
158     "y": 191.03124260902405,
159     "z": "5611e7fd.31c9b8",
160     "wires": [
161
162     ]
163   },
164   {
165     "id": "1c8d2bb9.f29f94",
166     "type": "set",
167     "name": "set tmp.ar.self-link",
168     "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",
169     "comments": "",
170     "x": 629.0311737060547,
171     "y": 404.031307220459,
172     "z": "5611e7fd.31c9b8",
173     "wires": [
174
175     ]
176   },
177   {
178     "id": "269db4cc.d4abfc",
179     "type": "execute",
180     "name": "execute Properties",
181     "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",
182     "comments": "",
183     "outputs": 1,
184     "x": 635.2930946350098,
185     "y": 489.69798469543457,
186     "z": "5611e7fd.31c9b8",
187     "wires": [
188       [
189
190       ]
191     ]
192   },
193   {
194     "id": "373e17e2.9acc38",
195     "type": "execute",
196     "name": "generate allotted-resource tmp.ar-url",
197     "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",
198     "comments": "",
199     "outputs": 1,
200     "x": 682.2930755615234,
201     "y": 573.6979522705078,
202     "z": "5611e7fd.31c9b8",
203     "wires": [
204       [
205
206       ]
207     ]
208   },
209   {
210     "id": "32f9a898.99bcd8",
211     "type": "execute",
212     "name": "execute tmp.ar.allotted-resource-id",
213     "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' >\n<parameter name=\"ctx-destination\" value=\"tmp.ar.allotted-resource-id\"/>\n",
214     "comments": "",
215     "outputs": 1,
216     "x": 1123.031307220459,
217     "y": 132.03123497962952,
218     "z": "5611e7fd.31c9b8",
219     "wires": [
220       [
221         "4b3e3360.e596bc"
222       ]
223     ]
224   },
225   {
226     "id": "4b3e3360.e596bc",
227     "type": "failure",
228     "name": "failure",
229     "xml": "<outcome value='failure'>\n",
230     "comments": "",
231     "outputs": 1,
232     "x": 1341.031349182129,
233     "y": 132.0311987400055,
234     "z": "5611e7fd.31c9b8",
235     "wires": [
236       [
237         "a0c9c52c.3e6d68"
238       ]
239     ]
240   },
241   {
242     "id": "a0c9c52c.3e6d68",
243     "type": "returnFailure",
244     "name": "return failure",
245     "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",
246     "comments": "",
247     "x": 1507.0313034057617,
248     "y": 132.03121304512024,
249     "z": "5611e7fd.31c9b8",
250     "wires": [
251
252     ]
253   },
254   {
255     "id": "5fd13a1.e2465c4",
256     "type": "get-resource",
257     "name": "get-resource connection-attachment-allotted-resource",
258     "xml": "<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.mdsal.ConfigResource' resource='GENERIC-RESOURCE-API' key='connection-attachment-allotted-resources/connection-attachment-allotted-resource/$tmp.ar.allotted-resource-id/' pfx='mdsal-ar' >\n",
259     "comments": "",
260     "outputs": 1,
261     "x": 730.03125,
262     "y": 668.8090553283691,
263     "z": "5611e7fd.31c9b8",
264     "wires": [
265       [
266         "2117b9a.1971446"
267       ]
268     ]
269   },
270   {
271     "id": "2117b9a.1971446",
272     "type": "success",
273     "name": "success",
274     "xml": "<outcome value='success'>\n",
275     "comments": "",
276     "outputs": 1,
277     "x": 1050.0313301086426,
278     "y": 670.8090124130249,
279     "z": "5611e7fd.31c9b8",
280     "wires": [
281       [
282         "7534c2b3.76410c"
283       ]
284     ]
285   },
286   {
287     "id": "bd6696ff.0a7a78",
288     "type": "returnFailure",
289     "name": "return failure",
290     "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",
291     "comments": "",
292     "x": 1783.5497093200684,
293     "y": 671.8750839233398,
294     "z": "5611e7fd.31c9b8",
295     "wires": [
296
297     ]
298   },
299   {
300     "id": "8d0e7e60.f9de9",
301     "type": "comment",
302     "name": "Check for non existence of allotted resource",
303     "info": "",
304     "comments": "",
305     "x": 694.0312881469727,
306     "y": 634.8091058731079,
307     "z": "5611e7fd.31c9b8",
308     "wires": [
309
310     ]
311   },
312   {
313     "id": "e79f21cd.1a744",
314     "type": "for",
315     "name": "for cidx..service-data.consumed-allotted-resources.consumed-allotted-resource[]",
316     "xml": "<for index='cidx' start='0' end='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`' >\n",
317     "comments": "",
318     "outputs": 1,
319     "x": 1592.6979064941406,
320     "y": 867.0312929153442,
321     "z": "5611e7fd.31c9b8",
322     "wires": [
323       [
324         "e0cc70b5.ec5cb"
325       ]
326     ]
327   },
328   {
329     "id": "574b7ca7.0881c4",
330     "type": "switchNode",
331     "name": "switch service-data.consumed-allotted-resources_length",
332     "xml": "<switch test='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`'>\n",
333     "comments": "",
334     "outputs": 1,
335     "x": 745.6972923278809,
336     "y": 827.7452943325043,
337     "z": "5611e7fd.31c9b8",
338     "wires": [
339       [
340         "d641745.a8dc988",
341         "10ab333.e534fcd"
342       ]
343     ]
344   },
345   {
346     "id": "d641745.a8dc988",
347     "type": "other",
348     "name": "outcome Null",
349     "xml": "<outcome value=''>\n",
350     "comments": "",
351     "outputs": 1,
352     "x": 1067.840175628662,
353     "y": 830.6027162075043,
354     "z": "5611e7fd.31c9b8",
355     "wires": [
356       [
357         "7824e75b.697748"
358       ]
359     ]
360   },
361   {
362     "id": "10ab333.e534fcd",
363     "type": "other",
364     "name": "other",
365     "xml": "<outcome value='Other'>\n",
366     "comments": "",
367     "outputs": 1,
368     "x": 1055.8401794433594,
369     "y": 873.6027176380157,
370     "z": "5611e7fd.31c9b8",
371     "wires": [
372       [
373         "c987fa4d.92cd08"
374       ]
375     ]
376   },
377   {
378     "id": "c987fa4d.92cd08",
379     "type": "block",
380     "name": "block : atomic",
381     "xml": "<block atomic=\"true\">",
382     "atomic": "true",
383     "outputs": 1,
384     "x": 1215.967269897461,
385     "y": 871.7286942005157,
386     "z": "5611e7fd.31c9b8",
387     "wires": [
388       [
389         "e79f21cd.1a744",
390         "bae4bbfe.22ddd8",
391         "de19c440.aed268"
392       ]
393     ]
394   },
395   {
396     "id": "7824e75b.697748",
397     "type": "set",
398     "name": "set cidx",
399     "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",
400     "comments": "",
401     "x": 1226.6971473693848,
402     "y": 830.3167788982391,
403     "z": "5611e7fd.31c9b8",
404     "wires": [
405
406     ]
407   },
408   {
409     "id": "35a496d5.57302a",
410     "type": "set",
411     "name": "set consumed allotted resources",
412     "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",
413     "comments": "",
414     "x": 671.554573059082,
415     "y": 900.31689453125,
416     "z": "5611e7fd.31c9b8",
417     "wires": [
418
419     ]
420   },
421   {
422     "id": "bae4bbfe.22ddd8",
423     "type": "switchNode",
424     "name": "switch tmp.found-cidx",
425     "xml": "<switch test='`$tmp.found-cidx`'>\n",
426     "comments": "",
427     "outputs": 1,
428     "x": 1405.082317352295,
429     "y": 903.7402169704437,
430     "z": "5611e7fd.31c9b8",
431     "wires": [
432       [
433         "c9bdea6f.ae8408"
434       ]
435     ]
436   },
437   {
438     "id": "c9bdea6f.ae8408",
439     "type": "outcomeTrue",
440     "name": "false",
441     "xml": "<outcome value='false'>\n",
442     "comments": "",
443     "outputs": 1,
444     "x": 1595.0822715759277,
445     "y": 903.7401540279388,
446     "z": "5611e7fd.31c9b8",
447     "wires": [
448       [
449         "f4a1002.ec0e9"
450       ]
451     ]
452   },
453   {
454     "id": "f4a1002.ec0e9",
455     "type": "block",
456     "name": "block : atomic",
457     "xml": "<block atomic=\"true\">",
458     "atomic": "true",
459     "outputs": 1,
460     "x": 1761.0822715759277,
461     "y": 903.7401540279388,
462     "z": "5611e7fd.31c9b8",
463     "wires": [
464       [
465         "efdba6bf.3fa178"
466       ]
467     ]
468   },
469   {
470     "id": "e0cc70b5.ec5cb",
471     "type": "switchNode",
472     "name": "switch allotted-resource-id",
473     "xml": "<switch test=\"`$service-data.consumed-allotted-resources.consumed-allotted-resource[$cidx].allotted-resource-id == $tmp.ar.allotted-resource-id`\">\n\n",
474     "comments": "",
475     "outputs": 1,
476     "x": 2066.8093872070312,
477     "y": 867.0312767028809,
478     "z": "5611e7fd.31c9b8",
479     "wires": [
480       [
481         "cf1bcffb.5a97a"
482       ]
483     ]
484   },
485   {
486     "id": "cf1bcffb.5a97a",
487     "type": "outcomeTrue",
488     "name": "true",
489     "xml": "<outcome value='true'>\n",
490     "comments": "",
491     "outputs": 1,
492     "x": 2291.619115829468,
493     "y": 869.4956977367401,
494     "z": "5611e7fd.31c9b8",
495     "wires": [
496       [
497         "9a928449.d9e6c8"
498       ]
499     ]
500   },
501   {
502     "id": "efdba6bf.3fa178",
503     "type": "set",
504     "name": "set tmp.cidx",
505     "xml": "<set>\n<parameter name='tmp.cidx' value='`$service-data.consumed-allotted-resources.consumed-allotted-resource_length`' />\n",
506     "comments": "",
507     "x": 2006.955617904663,
508     "y": 904.2518508434296,
509     "z": "5611e7fd.31c9b8",
510     "wires": [
511
512     ]
513   },
514   {
515     "id": "69a27589.0e830c",
516     "type": "comment",
517     "name": "Add to consumed service consumed-allotted-resources in mdsal",
518     "info": "Prepare data and add to service-data",
519     "comments": "",
520     "x": 764.6984901428223,
521     "y": 757.0312271118164,
522     "z": "5611e7fd.31c9b8",
523     "wires": [
524
525     ]
526   },
527   {
528     "id": "b960d74c.b75ab8",
529     "type": "comment",
530     "name": "This set resource will be added to MDSAL by provider code",
531     "info": "Below we add to service-data.consumed-allotted-resource at last index",
532     "comments": "",
533     "x": 747.0313453674316,
534     "y": 864.8093509674072,
535     "z": "5611e7fd.31c9b8",
536     "wires": [
537
538     ]
539   },
540   {
541     "id": "d5054e0.23964b",
542     "type": "update",
543     "name": "update AAI allotted-resource",
544     "xml": "<update 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.allotted-resource-information.parent-service-instance-id AND\n\t\t\tallotted-resource.id = $tmp.ar.allotted-resource-id\"\n        pfx='pfx' local-only='false' force='false'>\n\t<parameter name=\"description\" value=\"`$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-type`\" />\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",
545     "comments": "",
546     "outputs": 1,
547     "x": 647.7220878601074,
548     "y": 1893.5631588697433,
549     "z": "5611e7fd.31c9b8",
550     "wires": [
551       [
552         "5db3e01e.d4ead",
553         "cde1c5f3.767a98"
554       ]
555     ]
556   },
557   {
558     "id": "5db3e01e.d4ead",
559     "type": "failure",
560     "name": "failure",
561     "xml": "<outcome value='failure'>\n",
562     "comments": "",
563     "outputs": 1,
564     "x": 903.4839973449707,
565     "y": 1876.5156625509262,
566     "z": "5611e7fd.31c9b8",
567     "wires": [
568       [
569         "3608fdb3.1050e2"
570       ]
571     ]
572   },
573   {
574     "id": "3608fdb3.1050e2",
575     "type": "returnFailure",
576     "name": "return failure",
577     "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",
578     "comments": "",
579     "x": 1070.0078773498535,
580     "y": 1888.134733557701,
581     "z": "5611e7fd.31c9b8",
582     "wires": [
583
584     ]
585   },
586   {
587     "id": "cde1c5f3.767a98",
588     "type": "failure",
589     "name": "not-found",
590     "xml": "<outcome value='not-found'>\n",
591     "comments": "",
592     "outputs": 1,
593     "x": 910.5792846679688,
594     "y": 1909.2776302099228,
595     "z": "5611e7fd.31c9b8",
596     "wires": [
597       [
598         "3608fdb3.1050e2"
599       ]
600     ]
601   },
602   {
603     "id": "c4afab5c.baa998",
604     "type": "comment",
605     "name": "Save Resource to AAI",
606     "info": "",
607     "comments": "",
608     "x": 622.5317115783691,
609     "y": 1858.865050792694,
610     "z": "5611e7fd.31c9b8",
611     "wires": [
612
613     ]
614   },
615   {
616     "id": "88151412.9744b8",
617     "type": "comment",
618     "name": "Set allotted resource type if not sent by SO",
619     "info": "",
620     "comments": "",
621     "x": 701.0312194824219,
622     "y": 248.0312442779541,
623     "z": "5611e7fd.31c9b8",
624     "wires": [
625
626     ]
627   },
628   {
629     "id": "acb04fc4.b40f4",
630     "type": "switchNode",
631     "name": "switch allotted-resource-type",
632     "xml": "<switch test='`$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-type`'>\n",
633     "comments": "",
634     "outputs": 1,
635     "x": 661.9545211791992,
636     "y": 281.59730529785156,
637     "z": "5611e7fd.31c9b8",
638     "wires": [
639       [
640         "66623b13.496cd4",
641         "4d39f4a7.b07cdc"
642       ]
643     ]
644   },
645   {
646     "id": "66623b13.496cd4",
647     "type": "outcome",
648     "name": "NULL",
649     "xml": "<outcome value=''>",
650     "comments": "",
651     "outputs": 1,
652     "x": 906.9546241760254,
653     "y": 252.59730625152588,
654     "z": "5611e7fd.31c9b8",
655     "wires": [
656       [
657         "98a097ca.0fb138"
658       ]
659     ]
660   },
661   {
662     "id": "4d39f4a7.b07cdc",
663     "type": "other",
664     "name": "other",
665     "xml": "<outcome value='Other'>\n",
666     "comments": "",
667     "outputs": 1,
668     "x": 907.9545440673828,
669     "y": 312.5973148345947,
670     "z": "5611e7fd.31c9b8",
671     "wires": [
672       [
673         "487657c2.991598"
674       ]
675     ]
676   },
677   {
678     "id": "487657c2.991598",
679     "type": "set",
680     "name": "set tmp.ar.allotted-resource-type",
681     "xml": "<set>\n<parameter name='tmp.ar.allotted-resource-type' value='`$connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-type`' />\n",
682     "comments": "",
683     "x": 1139.9545288085938,
684     "y": 312.5973196029663,
685     "z": "5611e7fd.31c9b8",
686     "wires": [
687
688     ]
689   },
690   {
691     "id": "45c27762.ed75b8",
692     "type": "comment",
693     "name": "For storage in AAI connection-attachment-topology",
694     "info": "",
695     "comments": "",
696     "x": 723.0312042236328,
697     "y": 372.03126525878906,
698     "z": "5611e7fd.31c9b8",
699     "wires": [
700
701     ]
702   },
703   {
704     "id": "9a37b9ec.57f5d8",
705     "type": "comment",
706     "name": "Obtain different URL, template location etc",
707     "info": "For saving resource information to MDSAL & for AAI",
708     "comments": "",
709     "x": 701.0312004089355,
710     "y": 454.92014598846436,
711     "z": "5611e7fd.31c9b8",
712     "wires": [
713
714     ]
715   },
716   {
717     "id": "92fc6e78.11aa",
718     "type": "comment",
719     "name": "Used for Put AR by id to MDSAL",
720     "info": "",
721     "comments": "",
722     "x": 665.0312347412109,
723     "y": 538.9201374053955,
724     "z": "5611e7fd.31c9b8",
725     "wires": [
726
727     ]
728   },
729   {
730     "id": "920f2559.59f028",
731     "type": "comment",
732     "name": "Obtain the last index in services",
733     "info": "ServiceData is added by Provider code",
734     "comments": "",
735     "x": 663.4757118225098,
736     "y": 792.9201095104218,
737     "z": "5611e7fd.31c9b8",
738     "wires": [
739
740     ]
741   },
742   {
743     "id": "78b042c2.3a757c",
744     "type": "comment",
745     "name": "TODO: Rework after confirmation from AAI",
746     "info": "",
747     "comments": "",
748     "x": 922.8906211853027,
749     "y": 1836.436089515686,
750     "z": "5611e7fd.31c9b8",
751     "wires": [
752
753     ]
754   },
755   {
756     "id": "850178e9.7d2408",
757     "type": "set",
758     "name": "set output to api handler",
759     "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",
760     "comments": "",
761     "x": 636.2993774414062,
762     "y": 1806.3904213905334,
763     "z": "5611e7fd.31c9b8",
764     "wires": [
765
766     ]
767   },
768   {
769     "id": "acacc6b8.9b06e8",
770     "type": "returnSuccess",
771     "name": "return success",
772     "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",
773     "comments": "",
774     "x": 605.7124900817871,
775     "y": 1941.006284236908,
776     "z": "5611e7fd.31c9b8",
777     "wires": [
778
779     ]
780   },
781   {
782     "id": "98a097ca.0fb138",
783     "type": "set",
784     "name": "set tmp.ar.allotted-resource-type",
785     "xml": "<set>\n<parameter name='tmp.ar.allotted-resource-type' value=\"SOTNAttachmentInstance\" />\n",
786     "comments": "",
787     "x": 1146.0313110351562,
788     "y": 253.0312328338623,
789     "z": "5611e7fd.31c9b8",
790     "wires": [
791
792     ]
793   },
794   {
795     "id": "ad95dda4.7a6dd",
796     "type": "call",
797     "name": "call GENERIC-RESOURCE-API:sotn-get-request-input-param",
798     "xml": "<call module='GENERIC-RESOURCE-API' rpc='connection-attachment-get-request-input-param' mode='sync' >\n",
799     "comments": "",
800     "outputs": 1,
801     "x": 761.0254058837891,
802     "y": 1637.5250849723816,
803     "z": "5611e7fd.31c9b8",
804     "wires": [
805       [
806
807       ]
808     ]
809   },
810   {
811     "id": "72c54e75.d1648",
812     "type": "execute",
813     "name": "execute RestApiCallNode - PUT AR by id",
814     "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n    <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.sotn-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",
815     "comments": "",
816     "outputs": 1,
817     "x": 696.0314865112305,
818     "y": 1678.0312724113464,
819     "z": "5611e7fd.31c9b8",
820     "wires": [
821       [
822         "cee5ccdb.56f91",
823         "343b1a53.f93b56",
824         "d836f528.1e2818"
825       ]
826     ]
827   },
828   {
829     "id": "cee5ccdb.56f91",
830     "type": "not-found",
831     "name": "not-found",
832     "xml": "<outcome value='not-found'>\n",
833     "comments": "",
834     "outputs": 1,
835     "x": 964.6728630065918,
836     "y": 1729.3626841530204,
837     "z": "5611e7fd.31c9b8",
838     "wires": [
839       [
840         "7a6b84bb.83fdac"
841       ]
842     ]
843   },
844   {
845     "id": "343b1a53.f93b56",
846     "type": "failure",
847     "name": "failure",
848     "xml": "<outcome value='failure'>\n",
849     "comments": "",
850     "outputs": 1,
851     "x": 955.6729125976562,
852     "y": 1697.862709902227,
853     "z": "5611e7fd.31c9b8",
854     "wires": [
855       [
856         "7a6b84bb.83fdac"
857       ]
858     ]
859   },
860   {
861     "id": "d836f528.1e2818",
862     "type": "success",
863     "name": "success",
864     "xml": "<outcome value='success'>\n",
865     "comments": "",
866     "outputs": 1,
867     "x": 959.4229507446289,
868     "y": 1668.2198147773743,
869     "z": "5611e7fd.31c9b8",
870     "wires": [
871       [
872         "2a50bed0.d894a2"
873       ]
874     ]
875   },
876   {
877     "id": "7a6b84bb.83fdac",
878     "type": "returnFailure",
879     "name": "return failure",
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",
881     "comments": "",
882     "x": 1125.422950744629,
883     "y": 1698.6127337440848,
884     "z": "5611e7fd.31c9b8",
885     "wires": [
886
887     ]
888   },
889   {
890     "id": "2a50bed0.d894a2",
891     "type": "block",
892     "name": "block",
893     "xml": "<block>\n",
894     "atomic": "false",
895     "comments": "",
896     "outputs": 1,
897     "x": 1101.0789184570312,
898     "y": 1664.4119839668274,
899     "z": "5611e7fd.31c9b8",
900     "wires": [
901       [
902
903       ]
904     ]
905   },
906   {
907     "id": "de4bba44.8919f8",
908     "type": "execute",
909     "name": "execute RestApiCallNode - Update parent provided service AR",
910     "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",
911     "comments": "",
912     "outputs": 1,
913     "x": 761.0312156677246,
914     "y": 1198.031394958496,
915     "z": "5611e7fd.31c9b8",
916     "wires": [
917       [
918         "193ed140.775b6f",
919         "5734aea.1129c5",
920         "1e7e5c60.a431d4"
921       ]
922     ]
923   },
924   {
925     "id": "193ed140.775b6f",
926     "type": "not-found",
927     "name": "not-found",
928     "xml": "<outcome value='not-found'>\n",
929     "comments": "",
930     "outputs": 1,
931     "x": 1083.3392333984375,
932     "y": 1243.0296125411987,
933     "z": "5611e7fd.31c9b8",
934     "wires": [
935       [
936         "f7734abc.a1eef8"
937       ]
938     ]
939   },
940   {
941     "id": "5734aea.1129c5",
942     "type": "failure",
943     "name": "failure",
944     "xml": "<outcome value='failure'>\n",
945     "comments": "",
946     "outputs": 1,
947     "x": 1074.339282989502,
948     "y": 1211.5296382904053,
949     "z": "5611e7fd.31c9b8",
950     "wires": [
951       [
952         "f7734abc.a1eef8"
953       ]
954     ]
955   },
956   {
957     "id": "1e7e5c60.a431d4",
958     "type": "success",
959     "name": "success",
960     "xml": "<outcome value='success'>\n",
961     "comments": "",
962     "outputs": 1,
963     "x": 1078.0893211364746,
964     "y": 1181.8867431655526,
965     "z": "5611e7fd.31c9b8",
966     "wires": [
967       [
968         "850e7d60.6ac59"
969       ]
970     ]
971   },
972   {
973     "id": "f7734abc.a1eef8",
974     "type": "returnFailure",
975     "name": "return failure",
976     "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",
977     "comments": "",
978     "x": 1244.0893211364746,
979     "y": 1212.2796621322632,
980     "z": "5611e7fd.31c9b8",
981     "wires": [
982
983     ]
984   },
985   {
986     "id": "850e7d60.6ac59",
987     "type": "block",
988     "name": "block",
989     "xml": "<block>\n",
990     "atomic": "false",
991     "comments": "",
992     "outputs": 1,
993     "x": 1219.745288848877,
994     "y": 1178.0789123550057,
995     "z": "5611e7fd.31c9b8",
996     "wires": [
997       [
998
999       ]
1000     ]
1001   },
1002   {
1003     "id": "34f114cf.2fe48c",
1004     "type": "comment",
1005     "name": "Put the parent allotted resource in mdsal",
1006     "info": "",
1007     "comments": "",
1008     "x": 685.0311508178711,
1009     "y": 1166.0312938690186,
1010     "z": "5611e7fd.31c9b8",
1011     "wires": [
1012
1013     ]
1014   },
1015   {
1016     "id": "63023c8e.9fcb64",
1017     "type": "set",
1018     "name": "set connection-attachment-ar-identifiers",
1019     "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",
1020     "comments": "",
1021     "x": 685.3883056640625,
1022     "y": 1400.6029052734375,
1023     "z": "5611e7fd.31c9b8",
1024     "wires": [
1025
1026     ]
1027   },
1028   {
1029     "id": "a1a37b4b.52c8a8",
1030     "type": "set",
1031     "name": "set ar-data",
1032     "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.` \" />",
1033     "comments": "",
1034     "x": 596.2451171875,
1035     "y": 1359.4122314453125,
1036     "z": "5611e7fd.31c9b8",
1037     "wires": [
1038
1039     ]
1040   },
1041   {
1042     "id": "a6efd3b6.3278d",
1043     "type": "set",
1044     "name": "set identifiers in overall structure",
1045     "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",
1046     "comments": "",
1047     "x": 662.1981048583984,
1048     "y": 1442.698115348816,
1049     "z": "5611e7fd.31c9b8",
1050     "wires": [
1051
1052     ]
1053   },
1054   {
1055     "id": "994d951b.a5b738",
1056     "type": "execute",
1057     "name": "execute getTime",
1058     "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='setTime' >\n    <parameter name=\"outputPath\" value=\"tmp.current-time\" />\n\n",
1059     "comments": "",
1060     "outputs": 1,
1061     "x": 613.5309715270996,
1062     "y": 1525.0316753387451,
1063     "z": "5611e7fd.31c9b8",
1064     "wires": [
1065       [
1066
1067       ]
1068     ]
1069   },
1070   {
1071     "id": "8ee1af3e.bbe67",
1072     "type": "set",
1073     "name": "set allotted-resource-oper-status",
1074     "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",
1075     "comments": "",
1076     "x": 664.5180320739746,
1077     "y": 1560.9828262329102,
1078     "z": "5611e7fd.31c9b8",
1079     "wires": [
1080
1081     ]
1082   },
1083   {
1084     "id": "efc5e53d.5d75a8",
1085     "type": "set",
1086     "name": "set model-data",
1087     "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.` \" />",
1088     "comments": "",
1089     "x": 606.0866241455078,
1090     "y": 1479.586974143982,
1091     "z": "5611e7fd.31c9b8",
1092     "wires": [
1093
1094     ]
1095   },
1096   {
1097     "id": "21b74746.c42fa8",
1098     "type": "comment",
1099     "name": "Prepare data for allotted-resource addition to MDSAL",
1100     "info": "This will add to allotted-resource which is present inside service.",
1101     "comments": "",
1102     "x": 723.4201202392578,
1103     "y": 1319.5868339538574,
1104     "z": "5611e7fd.31c9b8",
1105     "wires": [
1106
1107     ]
1108   },
1109   {
1110     "id": "5accbcde.210f64",
1111     "type": "execute",
1112     "name": "generate parent-ar url - replace allotted-resource-id",
1113     "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",
1114     "comments": "",
1115     "outputs": 1,
1116     "x": 726.5312461853027,
1117     "y": 1129.0312910079956,
1118     "z": "5611e7fd.31c9b8",
1119     "wires": [
1120       [
1121
1122       ]
1123     ]
1124   },
1125   {
1126     "id": "5dbf4a35.fd12c4",
1127     "type": "execute",
1128     "name": "generate parent-ar url - replace service-instance-id",
1129     "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",
1130     "comments": "",
1131     "outputs": 1,
1132     "x": 727.5311851501465,
1133     "y": 1091.03134059906,
1134     "z": "5611e7fd.31c9b8",
1135     "wires": [
1136       [
1137
1138       ]
1139     ]
1140   },
1141   {
1142     "id": "52e7ff5.9702d",
1143     "type": "comment",
1144     "name": "Prepare Parent AR URL",
1145     "info": "Preparation to set provided-allotted-resource in parent service instance",
1146     "comments": "",
1147     "x": 634.5316009521484,
1148     "y": 1019.0313377380371,
1149     "z": "5611e7fd.31c9b8",
1150     "wires": [
1151
1152     ]
1153   },
1154   {
1155     "id": "950a621f.7b821",
1156     "type": "set",
1157     "name": "set tmp.ar.parent-service-instance-id",
1158     "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",
1159     "comments": "",
1160     "x": 679.5314331054688,
1161     "y": 1055.53125,
1162     "z": "5611e7fd.31c9b8",
1163     "wires": [
1164
1165     ]
1166   },
1167   {
1168     "id": "60a92f9f.3244e",
1169     "type": "comment",
1170     "name": "Required for filling template values",
1171     "info": "This is done because connection-attachment is generic resource and doesn't have specific parameters",
1172     "comments": "",
1173     "x": 669.0316314697266,
1174     "y": 1606.531012058258,
1175     "z": "5611e7fd.31c9b8",
1176     "wires": [
1177
1178     ]
1179   },
1180   {
1181     "id": "9a928449.d9e6c8",
1182     "type": "returnFailure",
1183     "name": "return failure",
1184     "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",
1185     "comments": "",
1186     "x": 2479.7880859375,
1187     "y": 867.6770629882812,
1188     "z": "5611e7fd.31c9b8",
1189     "wires": [
1190
1191     ]
1192   },
1193   {
1194     "id": "de19c440.aed268",
1195     "type": "set",
1196     "name": "set tmp.found-cidx",
1197     "xml": "<set>\n<parameter name='tmp.found-cidx' value=\"`false`\" />\n\n\n",
1198     "comments": "",
1199     "x": 1395.6773529052734,
1200     "y": 824.3438148498535,
1201     "z": "5611e7fd.31c9b8",
1202     "wires": [
1203
1204     ]
1205   },
1206   {
1207     "id": "a7c16e9b.5cd68",
1208     "type": "comment",
1209     "name": "Add to parent services provided-allotted-resources in mdsal",
1210     "info": "",
1211     "comments": "",
1212     "x": 744.2327270507812,
1213     "y": 980.0104694366455,
1214     "z": "5611e7fd.31c9b8",
1215     "wires": [
1216
1217     ]
1218   },
1219   {
1220     "id": "d7647e1e.888aa",
1221     "type": "comment",
1222     "name": "Add to allotted-resources in mdsal",
1223     "info": "",
1224     "comments": "",
1225     "x": 664.9999465942383,
1226     "y": 1287.0001356601715,
1227     "z": "5611e7fd.31c9b8",
1228     "wires": [
1229
1230     ]
1231   },
1232   {
1233     "id": "7534c2b3.76410c",
1234     "type": "block",
1235     "name": "block: atomic",
1236     "xml": "<block atomic=\"true\">\n",
1237     "atomic": "false",
1238     "comments": "",
1239     "outputs": 1,
1240     "x": 1212.031150817871,
1241     "y": 670.3089017868042,
1242     "z": "5611e7fd.31c9b8",
1243     "wires": [
1244       [
1245         "c557a49c.3881b8"
1246       ]
1247     ]
1248   },
1249   {
1250     "id": "c557a49c.3881b8",
1251     "type": "switchNode",
1252     "name": "switch cr length",
1253     "xml": "<switch test='`$mdsal-ar.connection-attachment-allotted-resource_length`'>\n",
1254     "comments": "",
1255     "outputs": 1,
1256     "x": 1399.8885307312012,
1257     "y": 670.9280371665955,
1258     "z": "5611e7fd.31c9b8",
1259     "wires": [
1260       [
1261         "3936a0.d4fa496"
1262       ]
1263     ]
1264   },
1265   {
1266     "id": "3936a0.d4fa496",
1267     "type": "other",
1268     "name": "outcome 1",
1269     "xml": "<outcome value='1'>\n",
1270     "comments": "",
1271     "outputs": 1,
1272     "x": 1599.2216529846191,
1273     "y": 670.9281158447266,
1274     "z": "5611e7fd.31c9b8",
1275     "wires": [
1276       [
1277         "bd6696ff.0a7a78"
1278       ]
1279     ]
1280   }
1281 ]