Fix tunnelxconn assign issues
[sdnc/oam.git] / platform-logic / generic-resource-api / src / main / json / GENERIC-RESOURCE-API_dci-connects-network-topology-operation-deactivate.json
1 [
2   {
3     "id": "e6595ced.cd07e",
4     "type": "dgstart",
5     "name": "DGSTART",
6     "outputs": 1,
7     "x": 93,
8     "y": 105,
9     "z": "88fdd57.10ebea8",
10     "wires": [
11       [
12         "6a3b8941.159818"
13       ]
14     ]
15   },
16   {
17     "id": "6a3b8941.159818",
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": 354,
26     "y": 176,
27     "z": "88fdd57.10ebea8",
28     "wires": [
29       [
30         "3be859ad.2be5b6"
31       ]
32     ]
33   },
34   {
35     "id": "3be859ad.2be5b6",
36     "type": "method",
37     "name": "method dci-connects-network-topology-operation-deactivate",
38     "xml": "<method rpc='dci-connects-network-topology-operation-deactivate' mode='sync'>\n",
39     "comments": "",
40     "outputs": 1,
41     "x": 244,
42     "y": 261,
43     "z": "88fdd57.10ebea8",
44     "wires": [
45       [
46         "33572f89.f401b"
47       ]
48     ]
49   },
50   {
51     "id": "33572f89.f401b",
52     "type": "block",
53     "name": "block : atomic",
54     "xml": "<block atomic=\"true\">",
55     "atomic": "true",
56     "outputs": 1,
57     "x": 579.0000152587891,
58     "y": 261.00000953674316,
59     "z": "88fdd57.10ebea8",
60     "wires": [
61       [
62         "d0a86103.e51848",
63         "74647967.d19da8",
64         "87f2c3a5.8dd168",
65         "d8b9200b.bee808",
66         "827daee9.fd9758",
67         "1f2fa549.76dec3"
68       ]
69     ]
70   },
71   {
72     "id": "d0a86103.e51848",
73     "type": "call",
74     "name": "call GENERIC-RESOURCE-API:validate-network-input-parameters",
75     "xml": "<call module='GENERIC-RESOURCE-API' rpc='validate-network-input-parameters' mode='sync' >\n",
76     "comments": "",
77     "outputs": 1,
78     "x": 914,
79     "y": 130,
80     "z": "88fdd57.10ebea8",
81     "wires": [
82       []
83     ]
84   },
85   {
86     "id": "74647967.d19da8",
87     "type": "returnSuccess",
88     "name": "return success",
89     "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",
90     "comments": "",
91     "x": 788,
92     "y": 1023,
93     "z": "88fdd57.10ebea8",
94     "wires": []
95   },
96   {
97     "id": "38788fe5.0d87a",
98     "type": "block",
99     "name": "block : sendRequest",
100     "xml": "<block atomic=\"true\">",
101     "atomic": "true",
102     "comments": "",
103     "outputs": 1,
104     "x": 975.5000305175781,
105     "y": 604.5156650543213,
106     "z": "88fdd57.10ebea8",
107     "wires": [
108       [
109         "351a36d5.bb2aba",
110         "a84bd383.c98848",
111         "d1ee1ccb.6ac1e"
112       ]
113     ]
114   },
115   {
116     "id": "fff41978.9f33",
117     "type": "success",
118     "name": "success",
119     "xml": "<outcome value='success'>\n",
120     "comments": "",
121     "outputs": 1,
122     "x": 1507.999927520752,
123     "y": 401.51519107818604,
124     "z": "88fdd57.10ebea8",
125     "wires": [
126       [
127         "8722da7b.5697a8"
128       ]
129     ]
130   },
131   {
132     "id": "d6d9b577.1d5bf8",
133     "type": "not-found",
134     "name": "not-found",
135     "xml": "<outcome value='not-found'>\n",
136     "comments": "",
137     "outputs": 1,
138     "x": 1514.999927520752,
139     "y": 439.51519107818604,
140     "z": "88fdd57.10ebea8",
141     "wires": [
142       [
143         "cdd52bd7.c7dbb8"
144       ]
145     ]
146   },
147   {
148     "id": "2bb0e607.cf37aa",
149     "type": "other",
150     "name": "other",
151     "xml": "<outcome value='Other'>\n",
152     "comments": "",
153     "outputs": 1,
154     "x": 1506.999927520752,
155     "y": 481.51519107818604,
156     "z": "88fdd57.10ebea8",
157     "wires": [
158       [
159         "db4903d.eb23f8"
160       ]
161     ]
162   },
163   {
164     "id": "cdd52bd7.c7dbb8",
165     "type": "returnFailure",
166     "name": "return failure",
167     "xml": "<return status='failure'>\n<parameter name='error-code' value='' />\n<parameter name='error-message' value='' />\n",
168     "comments": "",
169     "x": 1671.999927520752,
170     "y": 443.51519107818604,
171     "z": "88fdd57.10ebea8",
172     "wires": []
173   },
174   {
175     "id": "db4903d.eb23f8",
176     "type": "returnFailure",
177     "name": "return failure",
178     "xml": "<return status='failure'>\n<parameter name='error-code' value='' />\n<parameter name='error-message' value='' />\n",
179     "comments": "",
180     "x": 1664.999927520752,
181     "y": 490.51519107818604,
182     "z": "88fdd57.10ebea8",
183     "wires": []
184   },
185   {
186     "id": "351a36d5.bb2aba",
187     "type": "get-resource",
188     "name": "get-resource esr-thirdparty-sdnc",
189     "xml": "<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"esr-thirdparty-sdnc\" \n\t\tkey=\"esr-thirdparty-sdnc.thirdparty-sdnc-id = $prop.dci-connects.id AND \n\t\t     depth = '1'\"\n        pfx='tmp.aai.esr-thirdparty-sdnc' local-only='false' >\n",
190     "comments": "",
191     "outputs": 1,
192     "x": 1284.000015258789,
193     "y": 448.51519799232483,
194     "z": "88fdd57.10ebea8",
195     "wires": [
196       [
197         "fff41978.9f33",
198         "d6d9b577.1d5bf8",
199         "2bb0e607.cf37aa"
200       ]
201     ]
202   },
203   {
204     "id": "8722da7b.5697a8",
205     "type": "set",
206     "name": "set controller data",
207     "xml": "<set>\n<parameter name='prop.sdncRestApi.thirdpartySdnc.url' value=\"`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`\" />\n<parameter name='prop.sdncRestApi.templateDir' value='/opt/onap/sdnc/data' />\n<parameter name='prop.sdncRestApi.thirdpartySdnc.user' value=\"`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`\" />\n<parameter name='prop.sdncRestApi.thirdpartySdnc.password' value=\"`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].password`\" />\n\n",
208     "comments": "",
209     "x": 1687.4998779296875,
210     "y": 394.01513671875,
211     "z": "88fdd57.10ebea8",
212     "wires": []
213   },
214   {
215     "id": "ecb96ba3.5758d",
216     "type": "execute",
217     "name": "execute RestApiCallNode De-Activate Vxlan Tunnel",
218     "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/v2.0/l3-dci-connects/' + $prop.dci-connects.id`\"/>\n<parameter name=\"restapiUser\" value=\"`$prop.sdncRestApi.thirdpartySdnc.user`\"/>\n<parameter name=\"restapiPassword\" value=\"`$prop.sdncRestApi.thirdpartySdnc.password`\"/>\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"delete\"/>\n<parameter name=\"responsePrefix\" value=\"restapi-result\"/>\n",
219     "comments": "",
220     "outputs": 1,
221     "x": 1783.5003051757812,
222     "y": 667.5156202316284,
223     "z": "88fdd57.10ebea8",
224     "wires": [
225       []
226     ]
227   },
228   {
229     "id": "a84bd383.c98848",
230     "type": "switchNode",
231     "name": "switch tunnelType",
232     "xml": "<switch test=\"`$prop.dci-connects.tunnelType`\">\n",
233     "comments": "",
234     "outputs": 1,
235     "x": 1246.4997634887695,
236     "y": 692.0151309967041,
237     "z": "88fdd57.10ebea8",
238     "wires": [
239       [
240         "1b404d3f.38e2eb",
241         "dcb57b7d.8ec64"
242       ]
243     ]
244   },
245   {
246     "id": "1b404d3f.38e2eb",
247     "type": "outcomeTrue",
248     "name": "L3-DCI",
249     "xml": "<outcome value='L3-DCI'>\n",
250     "comments": "",
251     "outputs": 1,
252     "x": 1459.4998931884766,
253     "y": 672.0151309967041,
254     "z": "88fdd57.10ebea8",
255     "wires": [
256       [
257         "ecb96ba3.5758d"
258       ]
259     ]
260   },
261   {
262     "id": "dcb57b7d.8ec64",
263     "type": "outcomeTrue",
264     "name": "L2-DCI",
265     "xml": "<outcome value='L2-DCI'>\n",
266     "comments": "",
267     "outputs": 1,
268     "x": 1457.499713897705,
269     "y": 744.0151309967041,
270     "z": "88fdd57.10ebea8",
271     "wires": [
272       [
273         "62327707.f218a"
274       ]
275     ]
276   },
277   {
278     "id": "62327707.f218a",
279     "type": "execute",
280     "name": "execute RestApiCallNode De-Activate Vxlan Tunnel",
281     "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/v2.0/l2-dci-connects/' + $prop.dci-connects.id`\"/>\n<parameter name=\"restapiUser\" value=\"`$prop.sdncRestApi.thirdpartySdnc.user`\"/>\n<parameter name=\"restapiPassword\" value=\"`$prop.sdncRestApi.thirdpartySdnc.password`\"/>\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"delete\"/>\n<parameter name=\"responsePrefix\" value=\"restapi-result\"/>",
282     "comments": "",
283     "outputs": 1,
284     "x": 1777.500259399414,
285     "y": 744.5155563354492,
286     "z": "88fdd57.10ebea8",
287     "wires": [
288       []
289     ]
290   },
291   {
292     "id": "4860ee5f.f2017",
293     "type": "for",
294     "name": "for each network-input-parameters",
295     "xml": "<for index='idx' start='0' end='`$service-data.networks.network[$tmp.nidx].network-data.network-request-input.network-input-parameters.param_length`' >\n\n",
296     "comments": "",
297     "outputs": 1,
298     "x": 1037.999984741211,
299     "y": 205.51563167572021,
300     "z": "88fdd57.10ebea8",
301     "wires": [
302       [
303         "ba7fcf57.78acb"
304       ]
305     ]
306   },
307   {
308     "id": "d1ee1ccb.6ac1e",
309     "type": "record",
310     "name": "record",
311     "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"dci-network-topology-operation-deactivate\"/>\n<parameter name=\"field3\" value=\"dci-connects.id\" />\n<parameter name=\"field4\" value=\"`$prop.dci-connects.id`\"/>\n<parameter name=\"field5\" value=\"dci-connects.tunnelType\" />\n<parameter name=\"field6\" value=\"`$prop.dci-connects.tunnelType`\"/>\n<parameter name=\"field7\" value=\"dci-connects.tunnelType\" />\n<parameter name=\"field8\" value=\"`$prop.dci-connects.tunnelType`\"/>\n<parameter name=\"field9\" value=\"sdncRestApi.thirdpartySdnc.url\"/>\n<parameter name=\"field10\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url`\"/>",
312     "comments": "",
313     "outputs": 1,
314     "x": 1220.333366394043,
315     "y": 624,
316     "z": "88fdd57.10ebea8",
317     "wires": [
318       []
319     ]
320   },
321   {
322     "id": "ba7fcf57.78acb",
323     "type": "block",
324     "name": "block",
325     "xml": "<block>\n",
326     "atomic": "false",
327     "comments": "",
328     "outputs": 1,
329     "x": 1271.3334274291992,
330     "y": 205.00000762939453,
331     "z": "88fdd57.10ebea8",
332     "wires": [
333       [
334         "121de4fa.dd7713",
335         "e7af85ba.d512e"
336       ]
337     ]
338   },
339   {
340     "id": "121de4fa.dd7713",
341     "type": "switchNode",
342     "name": "switch site1_id",
343     "xml": "<switch test=\"`$service-data.networks.network[$tmp.nidx].network-data.network-request-input.network-input-parameters.param[$idx].name == 'site1_id'`\">\n",
344     "comments": "",
345     "outputs": 1,
346     "x": 1477.6666374206543,
347     "y": 174.00000381469727,
348     "z": "88fdd57.10ebea8",
349     "wires": [
350       [
351         "b3100ed.49466f"
352       ]
353     ]
354   },
355   {
356     "id": "b3100ed.49466f",
357     "type": "outcomeTrue",
358     "name": "true",
359     "xml": "<outcome value='true'>\n",
360     "comments": "",
361     "outputs": 1,
362     "x": 1678.666732788086,
363     "y": 173.00000286102295,
364     "z": "88fdd57.10ebea8",
365     "wires": [
366       [
367         "7769aa51.22fb2c"
368       ]
369     ]
370   },
371   {
372     "id": "7769aa51.22fb2c",
373     "type": "set",
374     "name": "set id",
375     "xml": "<set>\n<parameter name='prop.dci-connects.id' value='`$service-data.networks.network[$tmp.nidx].network-data.network-request-input.network-input-parameters.param[$idx].value`' />\n",
376     "comments": "",
377     "x": 1852.3330841064453,
378     "y": 172.66654777526855,
379     "z": "88fdd57.10ebea8",
380     "wires": []
381   },
382   {
383     "id": "e7af85ba.d512e",
384     "type": "switchNode",
385     "name": "switch tunnelType",
386     "xml": "<switch test=\"`$service-data.networks.network[$tmp.nidx].network-data.network-request-input.network-input-parameters.param[$idx].name == 'tunnelType'`\">\n",
387     "comments": "",
388     "outputs": 1,
389     "x": 1487.6667175292969,
390     "y": 227.00000977516174,
391     "z": "88fdd57.10ebea8",
392     "wires": [
393       [
394         "98ab781f.4131f8"
395       ]
396     ]
397   },
398   {
399     "id": "98ab781f.4131f8",
400     "type": "outcomeTrue",
401     "name": "true",
402     "xml": "<outcome value='true'>\n",
403     "comments": "",
404     "outputs": 1,
405     "x": 1693.6667175292969,
406     "y": 227.00000977516174,
407     "z": "88fdd57.10ebea8",
408     "wires": [
409       [
410         "ffcfe73.d016818"
411       ]
412     ]
413   },
414   {
415     "id": "ffcfe73.d016818",
416     "type": "set",
417     "name": "set tunnelType",
418     "xml": "<set>\n<parameter name='prop.dci-connects.tunnelType' value='`$service-data.networks.network[$tmp.nidx].network-data.network-request-input.network-input-parameters.param[$idx].value`' />\n",
419     "comments": "",
420     "x": 1862.6668167114258,
421     "y": 227.0000250339508,
422     "z": "88fdd57.10ebea8",
423     "wires": []
424   },
425   {
426     "id": "87f2c3a5.8dd168",
427     "type": "block",
428     "name": "block : executeSite1",
429     "xml": "<block atomic=\"true\">",
430     "atomic": "true",
431     "comments": "",
432     "outputs": 1,
433     "x": 767.3333358764648,
434     "y": 206.66666412353516,
435     "z": "88fdd57.10ebea8",
436     "wires": [
437       [
438         "4860ee5f.f2017",
439         "38788fe5.0d87a"
440       ]
441     ]
442   },
443   {
444     "id": "2ffdab13.6ed684",
445     "type": "for",
446     "name": "for each network-input-parameters",
447     "xml": "<for index='idx' start='0' end='`$service-data.networks.network[$tmp.nidx].network-data.network-request-input.network-input-parameters.param_length`' >\n\n",
448     "comments": "",
449     "outputs": 1,
450     "x": 1043.0000686645508,
451     "y": 311.66663551330566,
452     "z": "88fdd57.10ebea8",
453     "wires": [
454       [
455         "b45df97f.e41dd"
456       ]
457     ]
458   },
459   {
460     "id": "b45df97f.e41dd",
461     "type": "block",
462     "name": "block",
463     "xml": "<block>\n",
464     "atomic": "false",
465     "comments": "",
466     "outputs": 1,
467     "x": 1271.3334350585938,
468     "y": 314.15101146698,
469     "z": "88fdd57.10ebea8",
470     "wires": [
471       [
472         "4ec4a4e9.835374"
473       ]
474     ]
475   },
476   {
477     "id": "4ec4a4e9.835374",
478     "type": "switchNode",
479     "name": "switch site2_id",
480     "xml": "<switch test=\"`$service-data.networks.network[$tmp.nidx].network-data.network-request-input.network-input-parameters.param[$idx].name == 'site2_id'`\">\n",
481     "comments": "",
482     "outputs": 1,
483     "x": 1472.3333854675293,
484     "y": 314.15099716186523,
485     "z": "88fdd57.10ebea8",
486     "wires": [
487       [
488         "583f59bb.0661c"
489       ]
490     ]
491   },
492   {
493     "id": "583f59bb.0661c",
494     "type": "outcomeTrue",
495     "name": "true",
496     "xml": "<outcome value='true'>\n",
497     "comments": "",
498     "outputs": 1,
499     "x": 1673.333480834961,
500     "y": 313.1509962081909,
501     "z": "88fdd57.10ebea8",
502     "wires": [
503       [
504         "5598a85d.318a8"
505       ]
506     ]
507   },
508   {
509     "id": "5598a85d.318a8",
510     "type": "set",
511     "name": "set id",
512     "xml": "<set>\n<parameter name='prop.dci-connects.id' value='`$service-data.networks.network[$tmp.nidx].network-data.network-request-input.network-input-parameters.param[$idx].value`' />\n",
513     "comments": "",
514     "x": 1846.9998321533203,
515     "y": 312.8175411224365,
516     "z": "88fdd57.10ebea8",
517     "wires": []
518   },
519   {
520     "id": "d8b9200b.bee808",
521     "type": "block",
522     "name": "block : executeSite1",
523     "xml": "<block atomic=\"true\">",
524     "atomic": "true",
525     "comments": "",
526     "outputs": 1,
527     "x": 767.3333435058594,
528     "y": 315.8176679611206,
529     "z": "88fdd57.10ebea8",
530     "wires": [
531       [
532         "2ffdab13.6ed684",
533         "38788fe5.0d87a"
534       ]
535     ]
536   },
537   {
538     "id": "c84ccddc.555998",
539     "type": "set",
540     "name": "set object-path",
541     "xml": "<set>\n<parameter name='network-object-path' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $network-topology-operation-input.service-information.service-instance-id\n + '/service-data/networks/network/'\n + $networkId\n + '/network-data/network-topology/'` \" />\n \n",
542     "comments": "",
543     "x": 1082.3373260498047,
544     "y": 836.8607425689697,
545     "z": "88fdd57.10ebea8",
546     "wires": []
547   },
548   {
549     "id": "ef0a295c.2add48",
550     "type": "set",
551     "name": "set networkId",
552     "xml": "<set>\n<parameter name='networkId' value='`$network-topology-operation-input.network-information.network-id`' />\n",
553     "comments": "",
554     "x": 1076.622959136963,
555     "y": 799.7178506851196,
556     "z": "88fdd57.10ebea8",
557     "wires": []
558   },
559   {
560     "id": "827daee9.fd9758",
561     "type": "block",
562     "name": "block : saveNetworkData",
563     "xml": "<block atomic=\"true\">",
564     "atomic": "true",
565     "comments": "",
566     "outputs": 1,
567     "x": 819.3333969116211,
568     "y": 775.6666917800903,
569     "z": "88fdd57.10ebea8",
570     "wires": [
571       [
572         "ef0a295c.2add48",
573         "c84ccddc.555998",
574         "11e0aee9.730f31",
575         "6f6203a9.3e25c4"
576       ]
577     ]
578   },
579   {
580     "id": "e74b5285.3bfcc8",
581     "type": "comment",
582     "name": "TODO",
583     "info": "Currently deactivate does deletion too, later divide in two phases.",
584     "comments": "",
585     "x": 701.3333358764648,
586     "y": 69,
587     "z": "88fdd57.10ebea8",
588     "wires": []
589   },
590   {
591     "id": "11e0aee9.730f31",
592     "type": "set",
593     "name": "copy input to service-data",
594     "xml": "<set>\n<parameter name='service-data.networks.network[$tmp.nidx].network-data.sdnc-request-header.' value='`$network-topology-operation-input.sdnc-request-header.`' />\n<parameter name='service-data.networks.network[$tmp.nidx].network-data.request-information.' value='`$network-topology-operation-input.request-information.`' />\n",
595     "comments": "",
596     "x": 1112.3334045410156,
597     "y": 756.0000038146973,
598     "z": "88fdd57.10ebea8",
599     "wires": []
600   },
601   {
602     "id": "6f6203a9.3e25c4",
603     "type": "set",
604     "name": "set network-level-oper-status",
605     "xml": "<set>\n<parameter name='service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status' value='Deleted' />\n<parameter name='service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.last-rpc-action' value='`$network-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.last-action' value='`$network-topology-operation-input.request-information.request-action`' />\n",
606     "comments": "",
607     "x": 1126.3333358764648,
608     "y": 883.9999618530273,
609     "z": "88fdd57.10ebea8",
610     "wires": []
611   },
612   {
613     "id": "1f2fa549.76dec3",
614     "type": "delete",
615     "name": "delete underlay configuration in AAI",
616     "xml": "<delete plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" resource='configuration' \n        key='configuration.configuration-id = $network-topology-operation-input.network-information.network-id'>\n",
617     "comments": "",
618     "outputs": 1,
619     "x": 856,
620     "y": 943,
621     "z": "88fdd57.10ebea8",
622     "wires": [
623       []
624     ]
625   }
626 ]