Add generic-resource-api DG seed code
[sdnc/oam.git] / platform-logic / generic-resource-api / src / main / json / GENERIC-RESOURCE-API_network-topology-operation.json
1 [
2     {
3         "id": "c99606bb.e2a028",
4         "type": "dgstart",
5         "name": "DGSTART",
6         "outputs": 1,
7         "x": 112.11111450195312,
8         "y": 72.41365623474121,
9         "z": "cb3252c9.673b6",
10         "wires": [
11             [
12                 "864e4d1.67b0cb"
13             ]
14         ]
15     },
16     {
17         "id": "864e4d1.67b0cb",
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": 194.0634765625,
26         "y": 112.6517686843872,
27         "z": "cb3252c9.673b6",
28         "wires": [
29             [
30                 "8523dd91.6b0d1"
31             ]
32         ]
33     },
34     {
35         "id": "8523dd91.6b0d1",
36         "type": "method",
37         "name": "network-topology-operation",
38         "xml": "<method rpc='network-topology-operation' mode='sync'>\n",
39         "comments": "",
40         "outputs": 1,
41         "x": 190.53974151611328,
42         "y": 152.4136505126953,
43         "z": "cb3252c9.673b6",
44         "wires": [
45             [
46                 "1a229729.b26c99"
47             ]
48         ]
49     },
50     {
51         "id": "38f1087b.161648",
52         "type": "comment",
53         "name": " NETWORK-TOPOLOGY-OPERATION ",
54         "info": "",
55         "comments": "",
56         "x": 506.45597076416016,
57         "y": 20,
58         "z": "cb3252c9.673b6",
59         "wires": []
60     },
61     {
62         "id": "1a229729.b26c99",
63         "type": "block",
64         "name": "block : atomic",
65         "xml": "<block atomic=\"true\">",
66         "atomic": "true",
67         "outputs": 1,
68         "x": 226.11114501953125,
69         "y": 235.85713958740234,
70         "z": "cb3252c9.673b6",
71         "wires": [
72             [
73                 "98cc4191.2cf35",
74                 "57ac21c1.a3bc3",
75                 "987f679f.f57988",
76                 "1170a38.c1b8e5d"
77             ]
78         ]
79     },
80     {
81         "id": "98cc4191.2cf35",
82         "type": "returnSuccess",
83         "name": "return success",
84         "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",
85         "comments": "",
86         "x": 456.1945037841797,
87         "y": 859.6997756958008,
88         "z": "cb3252c9.673b6",
89         "wires": []
90     },
91     {
92         "id": "57ac21c1.a3bc3",
93         "type": "switchNode",
94         "name": "switch svc-action",
95         "xml": "<switch test='`$network-topology-operation-input.sdnc-request-header.svc-action`'>\n",
96         "comments": "",
97         "outputs": 1,
98         "x": 452.82537841796875,
99         "y": 466.2708339691162,
100         "z": "cb3252c9.673b6",
101         "wires": [
102             [
103                 "f08cfd72.f6d7a",
104                 "ba263e37.fc151",
105                 "ee75a5f3.d1d328",
106                 "906cbd9a.3bcc1",
107                 "483543a0.87b2ec"
108             ]
109         ]
110     },
111     {
112         "id": "f08cfd72.f6d7a",
113         "type": "other",
114         "name": "assign",
115         "xml": "<outcome value='assign'>\n",
116         "comments": "",
117         "outputs": 1,
118         "x": 673.3015747070312,
119         "y": 328.5564842224121,
120         "z": "cb3252c9.673b6",
121         "wires": [
122             [
123                 "85930aff.cc50b8"
124             ]
125         ]
126     },
127     {
128         "id": "85930aff.cc50b8",
129         "type": "block",
130         "name": "block : atomic",
131         "xml": "<block atomic=\"true\">",
132         "atomic": "true",
133         "outputs": 1,
134         "x": 854.5397338867188,
135         "y": 329.5566062927246,
136         "z": "cb3252c9.673b6",
137         "wires": [
138             [
139                 "733204ba.52ff4c"
140             ]
141         ]
142     },
143     {
144         "id": "987f679f.f57988",
145         "type": "call",
146         "name": "call GENERIC-RESOURCE-API:validate-network-input",
147         "xml": "<call module='GENERIC-RESOURCE-API' rpc='validate-network-input' mode='sync' >\n",
148         "comments": "",
149         "outputs": 1,
150         "x": 584.1111145019531,
151         "y": 236.4136562347412,
152         "z": "cb3252c9.673b6",
153         "wires": [
154             []
155         ]
156     },
157     {
158         "id": "733204ba.52ff4c",
159         "type": "call",
160         "name": "call GENERIC-RESOURCE-API:network-topology-operation-assign",
161         "xml": "<call module='GENERIC-RESOURCE-API' rpc='network-topology-operation-assign' mode='sync' >\n",
162         "comments": "",
163         "outputs": 1,
164         "x": 1226.111083984375,
165         "y": 326.4136619567871,
166         "z": "cb3252c9.673b6",
167         "wires": [
168             []
169         ]
170     },
171     {
172         "id": "ba263e37.fc151",
173         "type": "other",
174         "name": "activate",
175         "xml": "<outcome value='activate'>\n",
176         "comments": "",
177         "outputs": 1,
178         "x": 675.1111145019531,
179         "y": 416.4136562347412,
180         "z": "cb3252c9.673b6",
181         "wires": [
182             [
183                 "70342e4b.918dc"
184             ]
185         ]
186     },
187     {
188         "id": "70342e4b.918dc",
189         "type": "block",
190         "name": "block : atomic",
191         "xml": "<block atomic=\"true\">",
192         "atomic": "true",
193         "outputs": 1,
194         "x": 859.3492736816406,
195         "y": 417.4137783050537,
196         "z": "cb3252c9.673b6",
197         "wires": [
198             [
199                 "69a87518.69854c",
200                 "bd1a56c0.3e9138"
201             ]
202         ]
203     },
204     {
205         "id": "68785460.4653ec",
206         "type": "call",
207         "name": "call GENERIC-RESOURCE-API:network-topology-operation-activate",
208         "xml": "<call module='GENERIC-RESOURCE-API' rpc='network-topology-operation-activate' mode='sync' >\n",
209         "comments": "",
210         "outputs": 1,
211         "x": 1991.9206848144531,
212         "y": 579.2708282470703,
213         "z": "cb3252c9.673b6",
214         "wires": [
215             []
216         ]
217     },
218     {
219         "id": "ee75a5f3.d1d328",
220         "type": "other",
221         "name": "deactivate",
222         "xml": "<outcome value='deactivate'>\n",
223         "comments": "",
224         "outputs": 1,
225         "x": 664.1111145019531,
226         "y": 576.4136810302734,
227         "z": "cb3252c9.673b6",
228         "wires": [
229             [
230                 "444b8a86.f0f0b4"
231             ]
232         ]
233     },
234     {
235         "id": "444b8a86.f0f0b4",
236         "type": "block",
237         "name": "block : atomic",
238         "xml": "<block atomic=\"true\">",
239         "atomic": "true",
240         "outputs": 1,
241         "x": 845.3492736816406,
242         "y": 577.4138031005859,
243         "z": "cb3252c9.673b6",
244         "wires": [
245             [
246                 "69a87518.69854c",
247                 "142787bd.d3eaa8"
248             ]
249         ]
250     },
251     {
252         "id": "a1ea1a5a.119a28",
253         "type": "call",
254         "name": "call GENERIC-RESOURCE-API:network-topology-operation-deactivate",
255         "xml": "<call module='GENERIC-RESOURCE-API' rpc='network-topology-operation-deactivate' mode='sync' >\n",
256         "comments": "",
257         "outputs": 1,
258         "x": 1998.4205932617188,
259         "y": 695.0208282470703,
260         "z": "cb3252c9.673b6",
261         "wires": [
262             []
263         ]
264     },
265     {
266         "id": "906cbd9a.3bcc1",
267         "type": "other",
268         "name": "unassign",
269         "xml": "<outcome value='unassign'>\n",
270         "comments": "",
271         "outputs": 1,
272         "x": 672.1111145019531,
273         "y": 641.4136810302734,
274         "z": "cb3252c9.673b6",
275         "wires": [
276             [
277                 "78e21d22.3aa574"
278             ]
279         ]
280     },
281     {
282         "id": "78e21d22.3aa574",
283         "type": "block",
284         "name": "block : atomic",
285         "xml": "<block atomic=\"true\">",
286         "atomic": "true",
287         "outputs": 1,
288         "x": 853.3492736816406,
289         "y": 642.4138031005859,
290         "z": "cb3252c9.673b6",
291         "wires": [
292             [
293                 "69a87518.69854c",
294                 "9de6fd5e.4ad14"
295             ]
296         ]
297     },
298     {
299         "id": "6c5f5914.18dc18",
300         "type": "call",
301         "name": "call GENERIC-RESOURCE-API:network-topology-operation-unassign",
302         "xml": "<call module='GENERIC-RESOURCE-API' rpc='network-topology-operation-unassign' mode='sync' >\n",
303         "comments": "",
304         "outputs": 1,
305         "x": 2005.1705932617188,
306         "y": 807.7708282470703,
307         "z": "cb3252c9.673b6",
308         "wires": [
309             []
310         ]
311     },
312     {
313         "id": "483543a0.87b2ec",
314         "type": "other",
315         "name": "other",
316         "xml": "<outcome value='Other'>\n",
317         "comments": "",
318         "outputs": 1,
319         "x": 663.1111183166504,
320         "y": 701.4136714935303,
321         "z": "cb3252c9.673b6",
322         "wires": [
323             [
324                 "a3c1c755.071638"
325             ]
326         ]
327     },
328     {
329         "id": "a3c1c755.071638",
330         "type": "returnFailure",
331         "name": "return failure",
332         "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=\"sdnc-request-header.svc-action is a required input\" />\n",
333         "comments": "",
334         "x": 845.1111145019531,
335         "y": 700.4136810302734,
336         "z": "cb3252c9.673b6",
337         "wires": []
338     },
339     {
340         "id": "1170a38.c1b8e5d",
341         "type": "set",
342         "name": "Set final indicator to Y",
343         "xml": "<set>\n<parameter name=\"ack-final\" value=\"Y\"/>",
344         "comments": "",
345         "x": 475.2221984863281,
346         "y": 818.8581142425537,
347         "z": "cb3252c9.673b6",
348         "wires": []
349     },
350     {
351         "id": "d9b3b70a.4d0258",
352         "type": "for",
353         "name": "for nidx..service-data.networks.network[]",
354         "xml": "<for index='nidx' start='0' end='`$service-data.networks.network_length`' >\n",
355         "comments": "",
356         "outputs": 1,
357         "x": 1893.8414764404297,
358         "y": 473.1755828857422,
359         "z": "cb3252c9.673b6",
360         "wires": [
361             [
362                 "7ab3dce2.d045e4"
363             ]
364         ]
365     },
366     {
367         "id": "69a87518.69854c",
368         "type": "switchNode",
369         "name": "switch service-data.networks.network_length",
370         "xml": "<switch test='`$service-data.networks.network_length`'>\n",
371         "comments": "",
372         "outputs": 1,
373         "x": 1227.5555725097656,
374         "y": 437.74696350097656,
375         "z": "cb3252c9.673b6",
376         "wires": [
377             [
378                 "1c5afa5b.117ca6",
379                 "e5671ca3.48268"
380             ]
381         ]
382     },
383     {
384         "id": "1c5afa5b.117ca6",
385         "type": "other",
386         "name": "outcome Null",
387         "xml": "<outcome value=''>\n",
388         "comments": "",
389         "outputs": 1,
390         "x": 1470.5555114746094,
391         "y": 439.7469730377197,
392         "z": "cb3252c9.673b6",
393         "wires": [
394             [
395                 "88ef598e.91daa8"
396             ]
397         ]
398     },
399     {
400         "id": "e5671ca3.48268",
401         "type": "other",
402         "name": "other",
403         "xml": "<outcome value='Other'>\n",
404         "comments": "",
405         "outputs": 1,
406         "x": 1424.5555419921875,
407         "y": 472.7469940185547,
408         "z": "cb3252c9.673b6",
409         "wires": [
410             [
411                 "18cdb225.91a67e"
412             ]
413         ]
414     },
415     {
416         "id": "7ab3dce2.d045e4",
417         "type": "switchNode",
418         "name": "switch networkid found",
419         "xml": "<switch test=\"`$service-data.networks.network[$nidx].network-id == $network-topology-operation-input.network-information.network-id`\">\n\n",
420         "comments": "",
421         "outputs": 1,
422         "x": 2184.2700271606445,
423         "y": 472.42566680908203,
424         "z": "cb3252c9.673b6",
425         "wires": [
426             [
427                 "3a66da90.0e3556"
428             ]
429         ]
430     },
431     {
432         "id": "3a66da90.0e3556",
433         "type": "outcomeTrue",
434         "name": "true",
435         "xml": "<outcome value='true'>\n",
436         "comments": "",
437         "outputs": 1,
438         "x": 2373.222381591797,
439         "y": 473.3184051513672,
440         "z": "cb3252c9.673b6",
441         "wires": [
442             [
443                 "7d4e697f.fd23e8"
444             ]
445         ]
446     },
447     {
448         "id": "7d4e697f.fd23e8",
449         "type": "set",
450         "name": "set tmp.nidx and ctx.network-data",
451         "xml": "<set>\n<parameter name='tmp.nidx' value='`$nidx`' />\n<parameter name='ctx.network-data.' value='`$service-data.networks.network[$nidx].`' />\n",
452         "comments": "",
453         "x": 2606.754150390625,
454         "y": 472.0684127807617,
455         "z": "cb3252c9.673b6",
456         "wires": []
457     },
458     {
459         "id": "cc47bcf0.238e4",
460         "type": "comment",
461         "name": "Find the index to service data for this network - save id in tmp.nidx, save service-data",
462         "info": "",
463         "comments": "",
464         "x": 1350.6666564941406,
465         "y": 406.74698638916016,
466         "z": "cb3252c9.673b6",
467         "wires": []
468     },
469     {
470         "id": "60b7d7a1.646f18",
471         "type": "comment",
472         "name": "service-data  will not be stored until we have a network-id",
473         "info": "",
474         "comments": "",
475         "x": 1193.7777099609375,
476         "y": 294.63589096069336,
477         "z": "cb3252c9.673b6",
478         "wires": []
479     },
480     {
481         "id": "88ef598e.91daa8",
482         "type": "returnFailure",
483         "name": "return failure",
484         "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=\"network-topology-operation-input.network-request-input.network-id not found in service-data\" />\n",
485         "comments": "",
486         "x": 1662.3330688476562,
487         "y": 437.63597106933594,
488         "z": "cb3252c9.673b6",
489         "wires": []
490     },
491     {
492         "id": "18cdb225.91a67e",
493         "type": "block",
494         "name": "block : atomic",
495         "xml": "<block atomic=\"true\">",
496         "atomic": "true",
497         "outputs": 1,
498         "x": 1591.8255081176758,
499         "y": 472.301570892334,
500         "z": "cb3252c9.673b6",
501         "wires": [
502             [
503                 "d9b3b70a.4d0258",
504                 "46916c71.7511d4"
505             ]
506         ]
507     },
508     {
509         "id": "46916c71.7511d4",
510         "type": "switchNode",
511         "name": "switch tmp.nidx ",
512         "xml": "<switch test=\"`$tmp.nidx`\">\n\n",
513         "comments": "",
514         "outputs": 1,
515         "x": 1812.1429061889648,
516         "y": 515.1587896347046,
517         "z": "cb3252c9.673b6",
518         "wires": [
519             [
520                 "744b6bc1.2a0f74"
521             ]
522         ]
523     },
524     {
525         "id": "570ef8cd.cbcb88",
526         "type": "returnFailure",
527         "name": "return failure",
528         "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=\"network-topology-operation-input.network-request-input.network-id not found in service-data\" />\n",
529         "comments": "",
530         "x": 2164.9998893737793,
531         "y": 510.87303161621094,
532         "z": "cb3252c9.673b6",
533         "wires": []
534     },
535     {
536         "id": "744b6bc1.2a0f74",
537         "type": "outcome",
538         "name": "NULL",
539         "xml": "<outcome value=''>\n",
540         "comments": "",
541         "outputs": 1,
542         "x": 1983.5714416503906,
543         "y": 513.7301750183105,
544         "z": "cb3252c9.673b6",
545         "wires": [
546             [
547                 "570ef8cd.cbcb88"
548             ]
549         ]
550     },
551     {
552         "id": "bd1a56c0.3e9138",
553         "type": "switchNode",
554         "name": "switch network-level-oper-status",
555         "xml": "<switch test='`$service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`'>\n",
556         "comments": "",
557         "outputs": 1,
558         "x": 1204.888916015625,
559         "y": 579.2222290039062,
560         "z": "cb3252c9.673b6",
561         "wires": [
562             [
563                 "f3be99d5.176a88",
564                 "215ed9fd.338986"
565             ]
566         ]
567     },
568     {
569         "id": "f3be99d5.176a88",
570         "type": "outcome",
571         "name": "outcome PendingCreate",
572         "xml": "<outcome value='PendingCreate'>\n",
573         "comments": "",
574         "outputs": 1,
575         "x": 1569.8888956705723,
576         "y": 579.2222137451171,
577         "z": "cb3252c9.673b6",
578         "wires": [
579             [
580                 "68785460.4653ec"
581             ]
582         ]
583     },
584     {
585         "id": "215ed9fd.338986",
586         "type": "other",
587         "name": "other",
588         "xml": "<outcome value='Other'>\n",
589         "comments": "",
590         "outputs": 1,
591         "x": 1519.8889427185059,
592         "y": 619.2222442626953,
593         "z": "cb3252c9.673b6",
594         "wires": [
595             [
596                 "598a9836.8dec38"
597             ]
598         ]
599     },
600     {
601         "id": "598a9836.8dec38",
602         "type": "returnFailure",
603         "name": "return failure",
604         "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=\"`'Network is not in appropriate state for activate. Current state is ' + $service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`\" />",
605         "comments": "",
606         "x": 1689.8889427185059,
607         "y": 619.2222442626953,
608         "z": "cb3252c9.673b6",
609         "wires": []
610     },
611     {
612         "id": "142787bd.d3eaa8",
613         "type": "switchNode",
614         "name": "switch network-level-oper-status",
615         "xml": "<switch test='`$service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`'>\n",
616         "comments": "",
617         "outputs": 1,
618         "x": 1212.1903991699219,
619         "y": 695.1736297607422,
620         "z": "cb3252c9.673b6",
621         "wires": [
622             [
623                 "ae28e421.942868",
624                 "d2690a94.f5d8c8"
625             ]
626         ]
627     },
628     {
629         "id": "ae28e421.942868",
630         "type": "outcome",
631         "name": "outcome Created",
632         "xml": "<outcome value='Created'>\n",
633         "comments": "",
634         "outputs": 1,
635         "x": 1575.1903686523438,
636         "y": 695.1736602783203,
637         "z": "cb3252c9.673b6",
638         "wires": [
639             [
640                 "a1ea1a5a.119a28"
641             ]
642         ]
643     },
644     {
645         "id": "d2690a94.f5d8c8",
646         "type": "other",
647         "name": "other",
648         "xml": "<outcome value='Other'>\n",
649         "comments": "",
650         "outputs": 1,
651         "x": 1545.1903686523438,
652         "y": 735.1736602783203,
653         "z": "cb3252c9.673b6",
654         "wires": [
655             [
656                 "db8d6195.30425"
657             ]
658         ]
659     },
660     {
661         "id": "db8d6195.30425",
662         "type": "returnFailure",
663         "name": "return failure",
664         "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=\"`'Network is not in appropriate state for deactivate. Current state is ' + $service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`\" />",
665         "comments": "",
666         "x": 1711.1903686523438,
667         "y": 737.1736602783203,
668         "z": "cb3252c9.673b6",
669         "wires": []
670     },
671     {
672         "id": "9de6fd5e.4ad14",
673         "type": "switchNode",
674         "name": "switch network-level-oper-status",
675         "xml": "<switch test='`$service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`'>\n",
676         "comments": "",
677         "outputs": 1,
678         "x": 1211.9919738769531,
679         "y": 809.3750305175781,
680         "z": "cb3252c9.673b6",
681         "wires": [
682             [
683                 "7e221c63.bc45a4",
684                 "cf28440b.dda768",
685                 "c3dda3f.4ff456"
686             ]
687         ]
688     },
689     {
690         "id": "7e221c63.bc45a4",
691         "type": "outcome",
692         "name": "outcome PendingCreate",
693         "xml": "<outcome value='PendingCreate'>\n",
694         "comments": "",
695         "outputs": 1,
696         "x": 1571.991943359375,
697         "y": 809.3750610351562,
698         "z": "cb3252c9.673b6",
699         "wires": [
700             [
701                 "6c5f5914.18dc18"
702             ]
703         ]
704     },
705     {
706         "id": "cf28440b.dda768",
707         "type": "other",
708         "name": "other",
709         "xml": "<outcome value='Other'>\n",
710         "comments": "",
711         "outputs": 1,
712         "x": 1528.9918823242188,
713         "y": 893.3750762939453,
714         "z": "cb3252c9.673b6",
715         "wires": [
716             [
717                 "fbd25549.98f538"
718             ]
719         ]
720     },
721     {
722         "id": "fbd25549.98f538",
723         "type": "returnFailure",
724         "name": "return failure",
725         "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=\"`'Network is not in appropriate state for unassign. Current state is ' + $service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status`\" />",
726         "comments": "",
727         "x": 1720.3253021240234,
728         "y": 892.0417051315308,
729         "z": "cb3252c9.673b6",
730         "wires": []
731     },
732     {
733         "id": "c3dda3f.4ff456",
734         "type": "outcome",
735         "name": "outcome PendingDelete",
736         "xml": "<outcome value='PendingDelete'>\n",
737         "comments": "",
738         "outputs": 1,
739         "x": 1575.22216796875,
740         "y": 847.2222290039062,
741         "z": "cb3252c9.673b6",
742         "wires": [
743             [
744                 "6c5f5914.18dc18"
745             ]
746         ]
747     }
748 ]