Merge "Updates to SOTN DG"
[sdnc/oam.git] / platform-logic / generic-resource-api / src / main / json / GENERIC-RESOURCE-API_sotn-attachment-topology-operation-create.json
1 [
2   {
3     "id": "9d8f9fa5.439ad",
4     "type": "dgstart",
5     "name": "DGSTART",
6     "outputs": 1,
7     "x": 134.00390625,
8     "y": 59.999999046325684,
9     "z": "27f64d8c.2cf692",
10     "wires": [
11       [
12         "999b7749.bb2828"
13       ]
14     ]
15   },
16   {
17     "id": "999b7749.bb2828",
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": 346.00391006469727,
26     "y": 132.00001621246338,
27     "z": "27f64d8c.2cf692",
28     "wires": [
29       [
30         "a889b861.30b858"
31       ]
32     ]
33   },
34   {
35     "id": "a889b861.30b858",
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": 334.0040283203125,
42     "y": 219.99999904632568,
43     "z": "27f64d8c.2cf692",
44     "wires": [
45       [
46         "a434e8ee.221048"
47       ]
48     ]
49   },
50   {
51     "id": "a434e8ee.221048",
52     "type": "block",
53     "name": "block : atomic",
54     "xml": "<block atomic=\"true\">\n",
55     "atomic": "false",
56     "comments": "",
57     "outputs": 1,
58     "x": 254.00395965576172,
59     "y": 969.000247001648,
60     "z": "27f64d8c.2cf692",
61     "wires": [
62       [
63         "c342578d.28b708",
64         "efa6ad20.d82ee",
65         "269c43d6.56387c",
66         "3e97601e.a0c21",
67         "a1d6ff56.9c99d",
68         "1cbd957b.be039b",
69         "52744f96.8455f",
70         "361e33ee.17369c",
71         "8340ac1e.8db72",
72         "d5a721b9.32552",
73         "908d0f20.3dc3f",
74         "e6716760.631bc8",
75         "8217a995.1a4f18",
76         "272d789b.464298",
77         "de9004ee.8e65a8",
78         "61510de6.6b5a64",
79         "a9832c0c.edf5c",
80         "bdd1fffd.ca081",
81         "fc645855.78a1f8",
82         "e28f7f9f.51996",
83         "4298e590.a1603c",
84         "b58ada11.db1438",
85         "d0bb4427.716f08"
86       ]
87     ]
88   },
89   {
90     "id": "aad4b525.c81b28",
91     "type": "comment",
92     "name": "Set allotted resource id if not sent by SO",
93     "info": "",
94     "comments": "",
95     "x": 725.0805969238281,
96     "y": 144.43391513824463,
97     "z": "27f64d8c.2cf692",
98     "wires": [
99       
100     ]
101   },
102   {
103     "id": "c342578d.28b708",
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": 684.0039367675781,
110     "y": 184.99999141693115,
111     "z": "27f64d8c.2cf692",
112     "wires": [
113       [
114         "3dca0ad4.c31f16",
115         "5f732a2c.880594"
116       ]
117     ]
118   },
119   {
120     "id": "3dca0ad4.c31f16",
121     "type": "outcome",
122     "name": "NULL",
123     "xml": "<outcome value=''>",
124     "comments": "",
125     "outputs": 1,
126     "x": 935.0039863586426,
127     "y": 146.9999783039093,
128     "z": "27f64d8c.2cf692",
129     "wires": [
130       [
131         "d23cb383.a5008"
132       ]
133     ]
134   },
135   {
136     "id": "5f732a2c.880594",
137     "type": "other",
138     "name": "other",
139     "xml": "<outcome value='Other'>\n",
140     "comments": "",
141     "outputs": 1,
142     "x": 936.00390625,
143     "y": 206.99998688697815,
144     "z": "27f64d8c.2cf692",
145     "wires": [
146       [
147         "e2d02082.677af"
148       ]
149     ]
150   },
151   {
152     "id": "e2d02082.677af",
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": 1168.003890991211,
158     "y": 206.99999165534973,
159     "z": "27f64d8c.2cf692",
160     "wires": [
161       
162     ]
163   },
164   {
165     "id": "efa6ad20.d82ee",
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": 656.0038299560547,
171     "y": 420.00005626678467,
172     "z": "27f64d8c.2cf692",
173     "wires": [
174       
175     ]
176   },
177   {
178     "id": "269c43d6.56387c",
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": 662.2657508850098,
185     "y": 505.66673374176025,
186     "z": "27f64d8c.2cf692",
187     "wires": [
188       [
189         
190       ]
191     ]
192   },
193   {
194     "id": "3e97601e.a0c21",
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": 709.2657318115234,
201     "y": 589.6667013168335,
202     "z": "27f64d8c.2cf692",
203     "wires": [
204       [
205         
206       ]
207     ]
208   },
209   {
210     "id": "d23cb383.a5008",
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": 1150.003963470459,
217     "y": 147.9999840259552,
218     "z": "27f64d8c.2cf692",
219     "wires": [
220       [
221         "6e27cc35.c13c74"
222       ]
223     ]
224   },
225   {
226     "id": "6e27cc35.c13c74",
227     "type": "failure",
228     "name": "failure",
229     "xml": "<outcome value='failure'>\n",
230     "comments": "",
231     "outputs": 1,
232     "x": 1368.004005432129,
233     "y": 147.99994778633118,
234     "z": "27f64d8c.2cf692",
235     "wires": [
236       [
237         "e6eb33a1.9cd3b"
238       ]
239     ]
240   },
241   {
242     "id": "e6eb33a1.9cd3b",
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": 1534.0039596557617,
248     "y": 147.99996209144592,
249     "z": "27f64d8c.2cf692",
250     "wires": [
251       
252     ]
253   },
254   {
255     "id": "a1d6ff56.9c99d",
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": 757.00390625,
262     "y": 684.7778043746948,
263     "z": "27f64d8c.2cf692",
264     "wires": [
265       [
266         "69156564.0efd4c"
267       ]
268     ]
269   },
270   {
271     "id": "69156564.0efd4c",
272     "type": "success",
273     "name": "success",
274     "xml": "<outcome value='success'>\n",
275     "comments": "",
276     "outputs": 1,
277     "x": 1077.0039863586426,
278     "y": 686.7777614593506,
279     "z": "27f64d8c.2cf692",
280     "wires": [
281       [
282         "852fc020.79a93"
283       ]
284     ]
285   },
286   {
287     "id": "8474d88f.5c62c8",
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": 1810.5223655700684,
293     "y": 687.8438329696655,
294     "z": "27f64d8c.2cf692",
295     "wires": [
296       
297     ]
298   },
299   {
300     "id": "57300b8d.590704",
301     "type": "comment",
302     "name": "Check for non existence of allotted resource",
303     "info": "",
304     "comments": "",
305     "x": 721.0039443969727,
306     "y": 650.7778549194336,
307     "z": "27f64d8c.2cf692",
308     "wires": [
309       
310     ]
311   },
312   {
313     "id": "d079c407.4d6f78",
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": 1619.6705627441406,
320     "y": 883.0000419616699,
321     "z": "27f64d8c.2cf692",
322     "wires": [
323       [
324         "a651bfa.1352c4"
325       ]
326     ]
327   },
328   {
329     "id": "52744f96.8455f",
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": 772.6699485778809,
336     "y": 843.71404337883,
337     "z": "27f64d8c.2cf692",
338     "wires": [
339       [
340         "8264b400.beda08",
341         "7056a183.5603b"
342       ]
343     ]
344   },
345   {
346     "id": "8264b400.beda08",
347     "type": "other",
348     "name": "outcome Null",
349     "xml": "<outcome value=''>\n",
350     "comments": "",
351     "outputs": 1,
352     "x": 1094.812831878662,
353     "y": 846.57146525383,
354     "z": "27f64d8c.2cf692",
355     "wires": [
356       [
357         "11ae1967.44e4c7"
358       ]
359     ]
360   },
361   {
362     "id": "7056a183.5603b",
363     "type": "other",
364     "name": "other",
365     "xml": "<outcome value='Other'>\n",
366     "comments": "",
367     "outputs": 1,
368     "x": 1082.8128356933594,
369     "y": 889.5714666843414,
370     "z": "27f64d8c.2cf692",
371     "wires": [
372       [
373         "138cce38.a61662"
374       ]
375     ]
376   },
377   {
378     "id": "138cce38.a61662",
379     "type": "block",
380     "name": "block : atomic",
381     "xml": "<block atomic=\"true\">",
382     "atomic": "true",
383     "outputs": 1,
384     "x": 1242.939926147461,
385     "y": 887.6974432468414,
386     "z": "27f64d8c.2cf692",
387     "wires": [
388       [
389         "d079c407.4d6f78",
390         "1d2e79f7.7a22f6",
391         "caba0b91.36a608"
392       ]
393     ]
394   },
395   {
396     "id": "11ae1967.44e4c7",
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": 1253.6698036193848,
402     "y": 846.2855279445648,
403     "z": "27f64d8c.2cf692",
404     "wires": [
405       
406     ]
407   },
408   {
409     "id": "361e33ee.17369c",
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": 698.527229309082,
415     "y": 916.2856435775757,
416     "z": "27f64d8c.2cf692",
417     "wires": [
418       
419     ]
420   },
421   {
422     "id": "1d2e79f7.7a22f6",
423     "type": "switchNode",
424     "name": "switch tmp.found-cidx",
425     "xml": "<switch test='`$tmp.found-cidx`'>\n",
426     "comments": "",
427     "outputs": 1,
428     "x": 1432.054973602295,
429     "y": 919.7089660167694,
430     "z": "27f64d8c.2cf692",
431     "wires": [
432       [
433         "5635489a.7ffbc8"
434       ]
435     ]
436   },
437   {
438     "id": "5635489a.7ffbc8",
439     "type": "outcomeTrue",
440     "name": "false",
441     "xml": "<outcome value='false'>\n",
442     "comments": "",
443     "outputs": 1,
444     "x": 1622.0549278259277,
445     "y": 919.7089030742645,
446     "z": "27f64d8c.2cf692",
447     "wires": [
448       [
449         "66ad5d1b.da3ab4"
450       ]
451     ]
452   },
453   {
454     "id": "66ad5d1b.da3ab4",
455     "type": "block",
456     "name": "block : atomic",
457     "xml": "<block atomic=\"true\">",
458     "atomic": "true",
459     "outputs": 1,
460     "x": 1788.0549278259277,
461     "y": 919.7089030742645,
462     "z": "27f64d8c.2cf692",
463     "wires": [
464       [
465         "f92757e1.e50008"
466       ]
467     ]
468   },
469   {
470     "id": "a651bfa.1352c4",
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": 2093.7820434570312,
477     "y": 883.0000257492065,
478     "z": "27f64d8c.2cf692",
479     "wires": [
480       [
481         "54bb5ed6.70da5"
482       ]
483     ]
484   },
485   {
486     "id": "54bb5ed6.70da5",
487     "type": "outcomeTrue",
488     "name": "true",
489     "xml": "<outcome value='true'>\n",
490     "comments": "",
491     "outputs": 1,
492     "x": 2318.591772079468,
493     "y": 885.4644467830658,
494     "z": "27f64d8c.2cf692",
495     "wires": [
496       [
497         "d7b2b6d3.cadeb8"
498       ]
499     ]
500   },
501   {
502     "id": "f92757e1.e50008",
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": 2033.928274154663,
508     "y": 920.2205998897552,
509     "z": "27f64d8c.2cf692",
510     "wires": [
511       
512     ]
513   },
514   {
515     "id": "57bdcf73.d7aa8",
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": 791.6711463928223,
521     "y": 772.9999761581421,
522     "z": "27f64d8c.2cf692",
523     "wires": [
524       
525     ]
526   },
527   {
528     "id": "f0cc7d17.67dd7",
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": 774.0040016174316,
534     "y": 880.7781000137329,
535     "z": "27f64d8c.2cf692",
536     "wires": [
537       
538     ]
539   },
540   {
541     "id": "b58ada11.db1438",
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=\"name\" value=\"`$prop.connection-attachment.sotnVpnName`\" />\n\t<parameter name=\"access-provider-id\" value=\"`$prop.connection-attachment.access-provider-id`\" />\n\t<parameter name=\"access-client-id\" value=\"`$prop.connection-attachment.access-client-id`\" />\n\t<parameter name=\"access-topology-id\" value=\"`$prop.connection-attachment.access-topology-id`\" />\n\t<parameter name=\"access-node-id\" value=\"`$prop.connection-attachment.access-node-id`\" />\n\t<parameter name=\"access-ltp-id\" value=\"`$prop.connection-attachment.access-ltp-id`\" />\t\n\t<parameter name=\"cvlan-tag-entry\" value=\"`$prop.connection-attachment.cVLAN`\" />\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": 674.6947441101074,
548     "y": 1909.531907916069,
549     "z": "27f64d8c.2cf692",
550     "wires": [
551       [
552         "a1860cc7.e0b1b",
553         "e37a2480.b51108"
554       ]
555     ]
556   },
557   {
558     "id": "a1860cc7.e0b1b",
559     "type": "failure",
560     "name": "failure",
561     "xml": "<outcome value='failure'>\n",
562     "comments": "",
563     "outputs": 1,
564     "x": 930.4566535949707,
565     "y": 1892.484411597252,
566     "z": "27f64d8c.2cf692",
567     "wires": [
568       [
569         "3f25cd5e.443c92"
570       ]
571     ]
572   },
573   {
574     "id": "3f25cd5e.443c92",
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": 1096.9805335998535,
580     "y": 1904.1034826040268,
581     "z": "27f64d8c.2cf692",
582     "wires": [
583       
584     ]
585   },
586   {
587     "id": "e37a2480.b51108",
588     "type": "failure",
589     "name": "not-found",
590     "xml": "<outcome value='not-found'>\n",
591     "comments": "",
592     "outputs": 1,
593     "x": 937.5519409179688,
594     "y": 1925.2463792562485,
595     "z": "27f64d8c.2cf692",
596     "wires": [
597       [
598         "3f25cd5e.443c92"
599       ]
600     ]
601   },
602   {
603     "id": "b9aa3657.c52d58",
604     "type": "comment",
605     "name": "Save Resource to AAI",
606     "info": "",
607     "comments": "",
608     "x": 649.5043678283691,
609     "y": 1874.8337998390198,
610     "z": "27f64d8c.2cf692",
611     "wires": [
612       
613     ]
614   },
615   {
616     "id": "af36f779.0f72d8",
617     "type": "comment",
618     "name": "Set allotted resource type if not sent by SO",
619     "info": "",
620     "comments": "",
621     "x": 728.0038757324219,
622     "y": 263.9999933242798,
623     "z": "27f64d8c.2cf692",
624     "wires": [
625       
626     ]
627   },
628   {
629     "id": "1cbd957b.be039b",
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": 688.9271774291992,
636     "y": 297.56605434417725,
637     "z": "27f64d8c.2cf692",
638     "wires": [
639       [
640         "51e4f8bb.15fd98",
641         "9bc5979.dbcfa68"
642       ]
643     ]
644   },
645   {
646     "id": "51e4f8bb.15fd98",
647     "type": "outcome",
648     "name": "NULL",
649     "xml": "<outcome value=''>",
650     "comments": "",
651     "outputs": 1,
652     "x": 933.9272804260254,
653     "y": 268.56605529785156,
654     "z": "27f64d8c.2cf692",
655     "wires": [
656       [
657         "8d4b5605.e44fb8"
658       ]
659     ]
660   },
661   {
662     "id": "9bc5979.dbcfa68",
663     "type": "other",
664     "name": "other",
665     "xml": "<outcome value='Other'>\n",
666     "comments": "",
667     "outputs": 1,
668     "x": 934.9272003173828,
669     "y": 328.5660638809204,
670     "z": "27f64d8c.2cf692",
671     "wires": [
672       [
673         "8168f22d.0df79"
674       ]
675     ]
676   },
677   {
678     "id": "8168f22d.0df79",
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": 1166.9271850585938,
684     "y": 328.566068649292,
685     "z": "27f64d8c.2cf692",
686     "wires": [
687       
688     ]
689   },
690   {
691     "id": "965843c3.6889f",
692     "type": "comment",
693     "name": "For storage in AAI connection-attachment-topology",
694     "info": "",
695     "comments": "",
696     "x": 750.0038604736328,
697     "y": 388.00001430511475,
698     "z": "27f64d8c.2cf692",
699     "wires": [
700       
701     ]
702   },
703   {
704     "id": "eb60ce1a.0aef2",
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": 728.0038566589355,
710     "y": 470.88889503479004,
711     "z": "27f64d8c.2cf692",
712     "wires": [
713       
714     ]
715   },
716   {
717     "id": "ef74607d.036b",
718     "type": "comment",
719     "name": "Used for Put AR by id to MDSAL",
720     "info": "",
721     "comments": "",
722     "x": 692.0038909912109,
723     "y": 554.8888864517212,
724     "z": "27f64d8c.2cf692",
725     "wires": [
726       
727     ]
728   },
729   {
730     "id": "dddb900f.8862d",
731     "type": "comment",
732     "name": "Obtain the last index in services",
733     "info": "ServiceData is added by Provider code",
734     "comments": "",
735     "x": 690.4483680725098,
736     "y": 808.8888585567474,
737     "z": "27f64d8c.2cf692",
738     "wires": [
739       
740     ]
741   },
742   {
743     "id": "65b342f3.64d6cc",
744     "type": "comment",
745     "name": "TODO: Rework after confirmation from AAI",
746     "info": "",
747     "comments": "",
748     "x": 949.8632774353027,
749     "y": 1852.4048385620117,
750     "z": "27f64d8c.2cf692",
751     "wires": [
752       
753     ]
754   },
755   {
756     "id": "4298e590.a1603c",
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": 663.2720336914062,
762     "y": 1822.3591704368591,
763     "z": "27f64d8c.2cf692",
764     "wires": [
765       
766     ]
767   },
768   {
769     "id": "d0bb4427.716f08",
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": 632.6851463317871,
775     "y": 1956.9750332832336,
776     "z": "27f64d8c.2cf692",
777     "wires": [
778       
779     ]
780   },
781   {
782     "id": "8d4b5605.e44fb8",
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": 1173.0039672851562,
788     "y": 268.999981880188,
789     "z": "27f64d8c.2cf692",
790     "wires": [
791       
792     ]
793   },
794   {
795     "id": "bdd1fffd.ca081",
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": 787.9980621337891,
802     "y": 1653.4938340187073,
803     "z": "27f64d8c.2cf692",
804     "wires": [
805       [
806         
807       ]
808     ]
809   },
810   {
811     "id": "e28f7f9f.51996",
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": 723.0041427612305,
818     "y": 1694.0000214576721,
819     "z": "27f64d8c.2cf692",
820     "wires": [
821       [
822         "56bb7e95.f927f",
823         "74711000.f0575",
824         "579344a.ffcc7bc"
825       ]
826     ]
827   },
828   {
829     "id": "56bb7e95.f927f",
830     "type": "not-found",
831     "name": "not-found",
832     "xml": "<outcome value='not-found'>\n",
833     "comments": "",
834     "outputs": 1,
835     "x": 991.6455192565918,
836     "y": 1745.331433199346,
837     "z": "27f64d8c.2cf692",
838     "wires": [
839       [
840         "e2257359.1b116"
841       ]
842     ]
843   },
844   {
845     "id": "74711000.f0575",
846     "type": "failure",
847     "name": "failure",
848     "xml": "<outcome value='failure'>\n",
849     "comments": "",
850     "outputs": 1,
851     "x": 982.6455688476562,
852     "y": 1713.8314589485526,
853     "z": "27f64d8c.2cf692",
854     "wires": [
855       [
856         "e2257359.1b116"
857       ]
858     ]
859   },
860   {
861     "id": "579344a.ffcc7bc",
862     "type": "success",
863     "name": "success",
864     "xml": "<outcome value='success'>\n",
865     "comments": "",
866     "outputs": 1,
867     "x": 986.3956069946289,
868     "y": 1684.1885638237,
869     "z": "27f64d8c.2cf692",
870     "wires": [
871       [
872         "7d6eb53b.d4c13c"
873       ]
874     ]
875   },
876   {
877     "id": "e2257359.1b116",
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": 1152.395606994629,
883     "y": 1714.5814827904105,
884     "z": "27f64d8c.2cf692",
885     "wires": [
886       
887     ]
888   },
889   {
890     "id": "7d6eb53b.d4c13c",
891     "type": "block",
892     "name": "block",
893     "xml": "<block>\n",
894     "atomic": "false",
895     "comments": "",
896     "outputs": 1,
897     "x": 1128.0515747070312,
898     "y": 1680.380733013153,
899     "z": "27f64d8c.2cf692",
900     "wires": [
901       [
902         
903       ]
904     ]
905   },
906   {
907     "id": "e6716760.631bc8",
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": 788.0038719177246,
914     "y": 1214.0001440048218,
915     "z": "27f64d8c.2cf692",
916     "wires": [
917       [
918         "f5b61314.7a9ea",
919         "7f95a527.cea04c",
920         "6554700.9ffd59"
921       ]
922     ]
923   },
924   {
925     "id": "f5b61314.7a9ea",
926     "type": "not-found",
927     "name": "not-found",
928     "xml": "<outcome value='not-found'>\n",
929     "comments": "",
930     "outputs": 1,
931     "x": 1110.3118896484375,
932     "y": 1258.9983615875244,
933     "z": "27f64d8c.2cf692",
934     "wires": [
935       [
936         "adbe2b8f.bcb438"
937       ]
938     ]
939   },
940   {
941     "id": "7f95a527.cea04c",
942     "type": "failure",
943     "name": "failure",
944     "xml": "<outcome value='failure'>\n",
945     "comments": "",
946     "outputs": 1,
947     "x": 1101.311939239502,
948     "y": 1227.498387336731,
949     "z": "27f64d8c.2cf692",
950     "wires": [
951       [
952         "adbe2b8f.bcb438"
953       ]
954     ]
955   },
956   {
957     "id": "6554700.9ffd59",
958     "type": "success",
959     "name": "success",
960     "xml": "<outcome value='success'>\n",
961     "comments": "",
962     "outputs": 1,
963     "x": 1105.0619773864746,
964     "y": 1197.8554922118783,
965     "z": "27f64d8c.2cf692",
966     "wires": [
967       [
968         "f1effaa7.98cb08"
969       ]
970     ]
971   },
972   {
973     "id": "adbe2b8f.bcb438",
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": 1271.0619773864746,
979     "y": 1228.2484111785889,
980     "z": "27f64d8c.2cf692",
981     "wires": [
982       
983     ]
984   },
985   {
986     "id": "f1effaa7.98cb08",
987     "type": "block",
988     "name": "block",
989     "xml": "<block>\n",
990     "atomic": "false",
991     "comments": "",
992     "outputs": 1,
993     "x": 1246.717945098877,
994     "y": 1194.0476614013314,
995     "z": "27f64d8c.2cf692",
996     "wires": [
997       [
998         
999       ]
1000     ]
1001   },
1002   {
1003     "id": "8ad1638f.48f57",
1004     "type": "comment",
1005     "name": "Put the parent allotted resource in mdsal",
1006     "info": "",
1007     "comments": "",
1008     "x": 712.0038070678711,
1009     "y": 1182.0000429153442,
1010     "z": "27f64d8c.2cf692",
1011     "wires": [
1012       
1013     ]
1014   },
1015   {
1016     "id": "272d789b.464298",
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": 712.3609619140625,
1022     "y": 1416.5716543197632,
1023     "z": "27f64d8c.2cf692",
1024     "wires": [
1025       
1026     ]
1027   },
1028   {
1029     "id": "8217a995.1a4f18",
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": 623.2177734375,
1035     "y": 1375.3809804916382,
1036     "z": "27f64d8c.2cf692",
1037     "wires": [
1038       
1039     ]
1040   },
1041   {
1042     "id": "de9004ee.8e65a8",
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": 689.1707611083984,
1048     "y": 1458.6668643951416,
1049     "z": "27f64d8c.2cf692",
1050     "wires": [
1051       
1052     ]
1053   },
1054   {
1055     "id": "61510de6.6b5a64",
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": 640.5036277770996,
1062     "y": 1541.0004243850708,
1063     "z": "27f64d8c.2cf692",
1064     "wires": [
1065       [
1066         
1067       ]
1068     ]
1069   },
1070   {
1071     "id": "a9832c0c.edf5c",
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": 691.4906883239746,
1077     "y": 1576.9515752792358,
1078     "z": "27f64d8c.2cf692",
1079     "wires": [
1080       
1081     ]
1082   },
1083   {
1084     "id": "fc645855.78a1f8",
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": 633.0592803955078,
1090     "y": 1495.5557231903076,
1091     "z": "27f64d8c.2cf692",
1092     "wires": [
1093       
1094     ]
1095   },
1096   {
1097     "id": "e28fb6e1.570bc8",
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": 750.3927764892578,
1103     "y": 1335.555583000183,
1104     "z": "27f64d8c.2cf692",
1105     "wires": [
1106       
1107     ]
1108   },
1109   {
1110     "id": "908d0f20.3dc3f",
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": 753.5039024353027,
1117     "y": 1145.0000400543213,
1118     "z": "27f64d8c.2cf692",
1119     "wires": [
1120       [
1121         
1122       ]
1123     ]
1124   },
1125   {
1126     "id": "d5a721b9.32552",
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": 754.5038414001465,
1133     "y": 1107.0000896453857,
1134     "z": "27f64d8c.2cf692",
1135     "wires": [
1136       [
1137         
1138       ]
1139     ]
1140   },
1141   {
1142     "id": "4df22418.3a53fc",
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": 661.5042572021484,
1148     "y": 1035.0000867843628,
1149     "z": "27f64d8c.2cf692",
1150     "wires": [
1151       
1152     ]
1153   },
1154   {
1155     "id": "8340ac1e.8db72",
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": 706.5040893554688,
1161     "y": 1071.4999990463257,
1162     "z": "27f64d8c.2cf692",
1163     "wires": [
1164       
1165     ]
1166   },
1167   {
1168     "id": "c17a3b14.014a38",
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": 696.0042877197266,
1174     "y": 1622.4997611045837,
1175     "z": "27f64d8c.2cf692",
1176     "wires": [
1177       
1178     ]
1179   },
1180   {
1181     "id": "d7b2b6d3.cadeb8",
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": 2506.7607421875,
1187     "y": 883.6458120346069,
1188     "z": "27f64d8c.2cf692",
1189     "wires": [
1190       
1191     ]
1192   },
1193   {
1194     "id": "caba0b91.36a608",
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": 1422.6500091552734,
1200     "y": 840.3125638961792,
1201     "z": "27f64d8c.2cf692",
1202     "wires": [
1203       
1204     ]
1205   },
1206   {
1207     "id": "88129b22.08bd88",
1208     "type": "comment",
1209     "name": "Add to parent services provided-allotted-resources in mdsal",
1210     "info": "",
1211     "comments": "",
1212     "x": 771.2053833007812,
1213     "y": 995.9792184829712,
1214     "z": "27f64d8c.2cf692",
1215     "wires": [
1216       
1217     ]
1218   },
1219   {
1220     "id": "209aa5b9.f006fa",
1221     "type": "comment",
1222     "name": "Add to allotted-resources in mdsal",
1223     "info": "",
1224     "comments": "",
1225     "x": 691.9726028442383,
1226     "y": 1302.9688847064972,
1227     "z": "27f64d8c.2cf692",
1228     "wires": [
1229       
1230     ]
1231   },
1232   {
1233     "id": "852fc020.79a93",
1234     "type": "block",
1235     "name": "block: atomic",
1236     "xml": "<block atomic=\"true\">\n",
1237     "atomic": "false",
1238     "comments": "",
1239     "outputs": 1,
1240     "x": 1239.003807067871,
1241     "y": 686.2776508331299,
1242     "z": "27f64d8c.2cf692",
1243     "wires": [
1244       [
1245         "f33868e5.1acfb8"
1246       ]
1247     ]
1248   },
1249   {
1250     "id": "f33868e5.1acfb8",
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": 1426.8611869812012,
1257     "y": 686.8967862129211,
1258     "z": "27f64d8c.2cf692",
1259     "wires": [
1260       [
1261         "71e1d814.25e938"
1262       ]
1263     ]
1264   },
1265   {
1266     "id": "71e1d814.25e938",
1267     "type": "other",
1268     "name": "outcome 1",
1269     "xml": "<outcome value='1'>\n",
1270     "comments": "",
1271     "outputs": 1,
1272     "x": 1626.1943092346191,
1273     "y": 686.8968648910522,
1274     "z": "27f64d8c.2cf692",
1275     "wires": [
1276       [
1277         "8474d88f.5c62c8"
1278       ]
1279     ]
1280   }
1281 ]