f97be6bbf1ac491762505b24add001700e860f5d
[sdnc/oam.git] / platform-logic / generic-resource-api / src / main / json / GENERIC-RESOURCE-API_site-vnf-topology-operation-deactivate.json
1 [
2   {
3     "id": "f2d5a044.e7585",
4     "type": "service-logic",
5     "name": "GENERIC-RESOURCE-API ${project.version}",
6     "module": "GENERIC-RESOURCE-API",
7     "version": "${project.version}",
8     "comments": "",
9     "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}'>",
10     "outputs": 1,
11     "x": 182.8570785522461,
12     "y": 139.23809814453125,
13     "z": "ccd0c7cf.3cb8d8",
14     "wires": [
15       [
16         "3fa00e50.ff8f92"
17       ]
18     ]
19   },
20   {
21     "id": "1dae242d.6645cc",
22     "type": "dgstart",
23     "name": "DGSTART",
24     "outputs": 1,
25     "x": 107.57137298583984,
26     "y": 98.99998664855957,
27     "z": "ccd0c7cf.3cb8d8",
28     "wires": [
29       [
30         "f2d5a044.e7585"
31       ]
32     ]
33   },
34   {
35     "id": "3fa00e50.ff8f92",
36     "type": "method",
37     "name": "method site-vnf-topology-operation-deactivate",
38     "xml": "<method rpc='site-vnf-topology-operation-deactivate' mode='sync'>",
39     "comments": "",
40     "outputs": 1,
41     "x": 176,
42     "y": 178.99998092651367,
43     "z": "ccd0c7cf.3cb8d8",
44     "wires": [
45       [
46         "42e004c2.23654c"
47       ]
48     ]
49   },
50   {
51     "id": "42e004c2.23654c",
52     "type": "block",
53     "name": "block : atomic",
54     "xml": "<block atomic=\"true\">",
55     "atomic": "true",
56     "outputs": 1,
57     "x": 216.73809814453125,
58     "y": 250.69349193572998,
59     "z": "ccd0c7cf.3cb8d8",
60     "wires": [
61       [
62         "65c407c9.9f1008",
63         "48bce7ba.2d8768",
64         "a7851b19.e94318",
65         "7b84792a.cd09f8",
66         "33ca4ea0.f0ad62",
67         "85876d42.f8148",
68         "145e6ab2.474a25",
69         "65cd0ad5.7b6474",
70         "e07817c8.713ef8"
71       ]
72     ]
73   },
74   {
75     "id": "33ca4ea0.f0ad62",
76     "type": "block",
77     "name": "block : atomic",
78     "xml": "<block atomic=\"true\">",
79     "atomic": "true",
80     "outputs": 1,
81     "x": 623.7856979370117,
82     "y": 115.80950736999512,
83     "z": "ccd0c7cf.3cb8d8",
84     "wires": [
85       [
86         "44befce.c3f5f04",
87         "7d171976.884c68",
88         "2cfd8e20.8f3c62",
89         "c7b90528.204df8"
90       ]
91     ]
92   },
93   {
94     "id": "44befce.c3f5f04",
95     "type": "switchNode",
96     "name": "switch service-data.vnfs.vnf_length",
97     "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n",
98     "comments": "",
99     "outputs": 1,
100     "x": 903.6747055053711,
101     "y": 141.14282512664795,
102     "z": "ccd0c7cf.3cb8d8",
103     "wires": [
104       [
105         "85e6c857.e79cf8",
106         "f4c886b6.8c7de8"
107       ]
108     ]
109   },
110   {
111     "id": "85e6c857.e79cf8",
112     "type": "other",
113     "name": "outcome Null",
114     "xml": "<outcome value=''>\n",
115     "comments": "",
116     "outputs": 1,
117     "x": 1157.2858276367188,
118     "y": 122.8095121383667,
119     "z": "ccd0c7cf.3cb8d8",
120     "wires": [
121       [
122         "f39dd2df.24642"
123       ]
124     ]
125   },
126   {
127     "id": "f39dd2df.24642",
128     "type": "returnFailure",
129     "name": "return failure",
130     "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=\"vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data\" />\n",
131     "comments": "",
132     "x": 1331.2858428955078,
133     "y": 122.8095121383667,
134     "z": "ccd0c7cf.3cb8d8",
135     "wires": []
136   },
137   {
138     "id": "f4c886b6.8c7de8",
139     "type": "other",
140     "name": "other",
141     "xml": "<outcome value='Other'>\n",
142     "comments": "",
143     "outputs": 1,
144     "x": 1140.7857971191406,
145     "y": 158.80952262878418,
146     "z": "ccd0c7cf.3cb8d8",
147     "wires": [
148       [
149         "9dbcc4cd.8daf68"
150       ]
151     ]
152   },
153   {
154     "id": "9dbcc4cd.8daf68",
155     "type": "block",
156     "name": "block : atomic",
157     "xml": "<block atomic=\"true\">",
158     "atomic": "true",
159     "outputs": 1,
160     "x": 1322.7859954833984,
161     "y": 169.80952835083008,
162     "z": "ccd0c7cf.3cb8d8",
163     "wires": [
164       [
165         "5192b087.75251",
166         "a84b6b1.e64a598"
167       ]
168     ]
169   },
170   {
171     "id": "a84b6b1.e64a598",
172     "type": "switchNode",
173     "name": "switch tmp.vidx ",
174     "xml": "<switch test=\"`$tmp.vidx`\">\n\n",
175     "comments": "",
176     "outputs": 1,
177     "x": 1512.785888671875,
178     "y": 186.80952262878418,
179     "z": "ccd0c7cf.3cb8d8",
180     "wires": [
181       [
182         "f8861e43.09ff7"
183       ]
184     ]
185   },
186   {
187     "id": "c7b90528.204df8",
188     "type": "switchNode",
189     "name": "switch vnf-level-oper-status",
190     "xml": "<switch test='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.order-status`'>\n",
191     "comments": "",
192     "outputs": 1,
193     "x": 866.952507019043,
194     "y": 236.69837856292725,
195     "z": "ccd0c7cf.3cb8d8",
196     "wires": [
197       [
198         "4f6faf17.9da86",
199         "63b6f7c3.593ea8"
200       ]
201     ]
202   },
203   {
204     "id": "4f6faf17.9da86",
205     "type": "outcome",
206     "name": "outcome Active",
207     "xml": "<outcome value='Active'>\n",
208     "comments": "",
209     "outputs": 1,
210     "x": 1173.7858200073242,
211     "y": 217.8095006942749,
212     "z": "ccd0c7cf.3cb8d8",
213     "wires": [
214       [
215         "a798f2fb.14365"
216       ]
217     ]
218   },
219   {
220     "id": "63b6f7c3.593ea8",
221     "type": "other",
222     "name": "other",
223     "xml": "<outcome value='Other'>\n",
224     "comments": "",
225     "outputs": 1,
226     "x": 1141.7858200073242,
227     "y": 257.8095006942749,
228     "z": "ccd0c7cf.3cb8d8",
229     "wires": [
230       [
231         "1d11ed5c.996383"
232       ]
233     ]
234   },
235   {
236     "id": "1d11ed5c.996383",
237     "type": "returnFailure",
238     "name": "return failure",
239     "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=\"`'VNF is not in appropriate state for deactivate. Current state is ' + $service-data.vnfs.vnf[$tmp.nidx].vnf-data.vnf-level-oper-status.order-status`\" />",
240     "comments": "",
241     "x": 1299.2858200073242,
242     "y": 257.8095006942749,
243     "z": "ccd0c7cf.3cb8d8",
244     "wires": []
245   },
246   {
247     "id": "7d171976.884c68",
248     "type": "switchNode",
249     "name": "switch vnf-id",
250     "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-information.vnf-id`\">\n",
251     "comments": "",
252     "outputs": 1,
253     "x": 845.7858047485352,
254     "y": 81.80949974060059,
255     "z": "ccd0c7cf.3cb8d8",
256     "wires": [
257       [
258         "f940f6c8.c04158"
259       ]
260     ]
261   },
262   {
263     "id": "f940f6c8.c04158",
264     "type": "outcome",
265     "name": "NULL",
266     "xml": "<outcome value=''>",
267     "comments": "",
268     "outputs": 1,
269     "x": 988.7857971191406,
270     "y": 81.80950260162354,
271     "z": "ccd0c7cf.3cb8d8",
272     "wires": [
273       [
274         "8db9d430.4ecf68"
275       ]
276     ]
277   },
278   {
279     "id": "8db9d430.4ecf68",
280     "type": "returnFailure",
281     "name": "return failure",
282     "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=\"vnf-topology-operation-input.vnf-information.vnf-id is a required input\" />\n",
283     "comments": "",
284     "x": 1137.2857971191406,
285     "y": 81.80950164794922,
286     "z": "ccd0c7cf.3cb8d8",
287     "wires": []
288   },
289   {
290     "id": "5192b087.75251",
291     "type": "for",
292     "name": "for vidx..service-data.vnfs.vnf[]",
293     "xml": "<for index='vidx' start='0' end='`$service-data.vnfs.vnf_length`' >\n",
294     "comments": "",
295     "outputs": 1,
296     "x": 1558.2859191894531,
297     "y": 148.8095121383667,
298     "z": "ccd0c7cf.3cb8d8",
299     "wires": [
300       [
301         "93fbba5f.463c78"
302       ]
303     ]
304   },
305   {
306     "id": "93fbba5f.463c78",
307     "type": "switchNode",
308     "name": "switch vnf-id found",
309     "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-id == $vnf-topology-operation-input.vnf-information.vnf-id`\">\n\n",
310     "comments": "",
311     "outputs": 1,
312     "x": 1844.2859191894531,
313     "y": 148.8095121383667,
314     "z": "ccd0c7cf.3cb8d8",
315     "wires": [
316       [
317         "8c6bb65a.97de78"
318       ]
319     ]
320   },
321   {
322     "id": "8c6bb65a.97de78",
323     "type": "outcomeTrue",
324     "name": "true",
325     "xml": "<outcome value='true'>\n",
326     "comments": "",
327     "outputs": 1,
328     "x": 2029.7859954833984,
329     "y": 148.80951404571533,
330     "z": "ccd0c7cf.3cb8d8",
331     "wires": [
332       [
333         "5c836ef8.46731"
334       ]
335     ]
336   },
337   {
338     "id": "5c836ef8.46731",
339     "type": "set",
340     "name": "set tmp.vidx and ctx.vnf-data",
341     "xml": "<set>\n<parameter name='tmp.vidx' value='`$vidx`' />\n<parameter name='ctx.vnf-data.' value='`$service-data.vnfs.vnf[$vidx].vnf-data.`' />\n",
342     "comments": "",
343     "x": 2237.785919189453,
344     "y": 148.8095121383667,
345     "z": "ccd0c7cf.3cb8d8",
346     "wires": []
347   },
348   {
349     "id": "7e651921.d7b4c8",
350     "type": "returnFailure",
351     "name": "return failure",
352     "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=\"vnf-topology-operation-input.vnf-information.vnf-id not found in service-data\" />\n",
353     "comments": "",
354     "x": 1804.285888671875,
355     "y": 186.80952262878418,
356     "z": "ccd0c7cf.3cb8d8",
357     "wires": []
358   },
359   {
360     "id": "f8861e43.09ff7",
361     "type": "outcome",
362     "name": "NULL",
363     "xml": "<outcome value=''>\n",
364     "comments": "",
365     "outputs": 1,
366     "x": 1666.785888671875,
367     "y": 186.80952262878418,
368     "z": "ccd0c7cf.3cb8d8",
369     "wires": [
370       [
371         "7e651921.d7b4c8"
372       ]
373     ]
374   },
375   {
376     "id": "65c407c9.9f1008",
377     "type": "set",
378     "name": "set vnf in service-data",
379     "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.sdnc-request-header.' value='`$vnf-topology-operation-input.sdnc-request-header.`' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.request-information.' value='`$vnf-topology-operation-input.request-information.`' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.service-information.' value='`$vnf-topology-operation-input.service-information.`' />",
380     "comments": "",
381     "x": 610.5715866088867,
382     "y": 584.00022315979,
383     "z": "ccd0c7cf.3cb8d8",
384     "wires": []
385   },
386   {
387     "id": "48bce7ba.2d8768",
388     "type": "set",
389     "name": "set vnfId and vnf-object-path",
390     "xml": "<set>\n<parameter name='vnfId' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />\n<parameter name=\"vnf-object-path\" value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'  + $vnf-topology-operation-input.service-information.service-instance-id  + '/service-data/vnfs/vnf/'  + $vnf-topology-operation-input.vnf-information.vnf-id  + '/vnf-data/'` \" />",
391     "comments": "",
392     "x": 632.1271820068359,
393     "y": 621.2224445343018,
394     "z": "ccd0c7cf.3cb8d8",
395     "wires": []
396   },
397   {
398     "id": "7b84792a.cd09f8",
399     "type": "returnSuccess",
400     "name": "return success",
401     "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",
402     "comments": "",
403     "x": 585.9049634933472,
404     "y": 771.7778739929199,
405     "z": "ccd0c7cf.3cb8d8",
406     "wires": []
407   },
408   {
409     "id": "a7851b19.e94318",
410     "type": "set",
411     "name": "set vnf-level-oper-status to PendingDelete",
412     "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.order-status' value='PendingDelete' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.last-rpc-action' value='`$vnf-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.last-action' value='`$vnf-topology-operation-input.request-information.request-action`' />\n",
413     "comments": "",
414     "x": 670.5715866088867,
415     "y": 665.0002861022949,
416     "z": "ccd0c7cf.3cb8d8",
417     "wires": []
418   },
419   {
420     "id": "a798f2fb.14365",
421     "type": "block",
422     "name": "block : atomic",
423     "xml": "<block atomic=\"true\">",
424     "atomic": "true",
425     "outputs": 1,
426     "x": 1367.713279724121,
427     "y": 221.88886964321136,
428     "z": "ccd0c7cf.3cb8d8",
429     "wires": [
430       []
431     ]
432   },
433   {
434     "id": "2cfd8e20.8f3c62",
435     "type": "execute",
436     "name": "execute requiredParameters",
437     "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='requiredParameters' >\n<parameter name=\"vnf-topology-operation-input.vnf-information.vnf-id\" value=\"$vnf-topology-operation-input.vnf-information.vnf-id\"/>\n\n",
438     "comments": "",
439     "outputs": 1,
440     "x": 895.5716171264648,
441     "y": 44,
442     "z": "ccd0c7cf.3cb8d8",
443     "wires": [
444       []
445     ]
446   },
447   {
448     "id": "dc5cbf86.069cb",
449     "type": "comment",
450     "name": "site-vnf-topology-operation-deactivate",
451     "info": "",
452     "comments": "",
453     "x": 489.8570785522461,
454     "y": 44.23809814453125,
455     "z": "ccd0c7cf.3cb8d8",
456     "wires": []
457   },
458   {
459     "id": "85876d42.f8148",
460     "type": "for",
461     "name": "for loop idx - VNF input parameters",
462     "xml": "<for index='idx' start='0' end='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length`' >\n",
463     "comments": "",
464     "outputs": 1,
465     "x": 667.8572273254395,
466     "y": 315.0000219345093,
467     "z": "ccd0c7cf.3cb8d8",
468     "wires": [
469       [
470         "3e4458ac.5a1978"
471       ]
472     ]
473   },
474   {
475     "id": "3e4458ac.5a1978",
476     "type": "block",
477     "name": "block",
478     "xml": "<block>\n",
479     "atomic": "false",
480     "comments": "",
481     "outputs": 1,
482     "x": 874.7529640197754,
483     "y": 314.9218854904175,
484     "z": "ccd0c7cf.3cb8d8",
485     "wires": [
486       [
487         "d28edbd3.ae9358",
488         "bda524fb.86fa98"
489       ]
490     ]
491   },
492   {
493     "id": "d28edbd3.ae9358",
494     "type": "switchNode",
495     "name": "switch type",
496     "xml": "<switch test=\"`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'type'`\">\n",
497     "comments": "",
498     "outputs": 1,
499     "x": 1011.8701667785645,
500     "y": 314.89532566070557,
501     "z": "ccd0c7cf.3cb8d8",
502     "wires": [
503       [
504         "a740d422.40d728"
505       ]
506     ]
507   },
508   {
509     "id": "a740d422.40d728",
510     "type": "outcomeTrue",
511     "name": "true",
512     "xml": "<outcome value='true'>\n",
513     "comments": "",
514     "outputs": 1,
515     "x": 1151.870174407959,
516     "y": 315.89532566070557,
517     "z": "ccd0c7cf.3cb8d8",
518     "wires": [
519       [
520         "feaf8bb0.d7e508"
521       ]
522     ]
523   },
524   {
525     "id": "feaf8bb0.d7e508",
526     "type": "block",
527     "name": "block : atomic",
528     "xml": "<block atomic=\"true\">",
529     "atomic": "true",
530     "outputs": 1,
531     "x": 1300.419822692871,
532     "y": 316.9220190048218,
533     "z": "ccd0c7cf.3cb8d8",
534     "wires": [
535       [
536         "6e080bd9.2cad94"
537       ]
538     ]
539   },
540   {
541     "id": "6e080bd9.2cad94",
542     "type": "set",
543     "name": "set type and sdwan flag",
544     "xml": "<set>\n<parameter name='prop.site.type' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n<parameter name='prop.site.sdwan' value=\"true\" />\n",
545     "comments": "",
546     "x": 1444.7531852722168,
547     "y": 317.9220361709595,
548     "z": "ccd0c7cf.3cb8d8",
549     "wires": []
550   },
551   {
552     "id": "145e6ab2.474a25",
553     "type": "switchNode",
554     "name": "switch prop.site.sdwan",
555     "xml": "<switch test=\"`$prop.site.sdwan`\">\n",
556     "comments": "",
557     "outputs": 1,
558     "x": 641.8570785522461,
559     "y": 470.00004386901855,
560     "z": "ccd0c7cf.3cb8d8",
561     "wires": [
562       [
563         "c9081f3c.c4c52"
564       ]
565     ]
566   },
567   {
568     "id": "c9081f3c.c4c52",
569     "type": "outcomeTrue",
570     "name": "true",
571     "xml": "<outcome value='true'>\n",
572     "comments": "",
573     "outputs": 1,
574     "x": 822.8572120666504,
575     "y": 471.0000705718994,
576     "z": "ccd0c7cf.3cb8d8",
577     "wires": [
578       [
579         "5bb614a8.7a50ac"
580       ]
581     ]
582   },
583   {
584     "id": "619fc994.c8c7e8",
585     "type": "success",
586     "name": "success",
587     "xml": "<outcome value='success'>\n",
588     "comments": "",
589     "outputs": 1,
590     "x": 1527.357234954834,
591     "y": 439.00012493133545,
592     "z": "ccd0c7cf.3cb8d8",
593     "wires": [
594       [
595         "9d1c31d.0bb00d"
596       ]
597     ]
598   },
599   {
600     "id": "9d1c31d.0bb00d",
601     "type": "set",
602     "name": "set controller data",
603     "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.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",
604     "comments": "",
605     "x": 1715.8573303222656,
606     "y": 433.0001345872879,
607     "z": "ccd0c7cf.3cb8d8",
608     "wires": []
609   },
610   {
611     "id": "a8d0eff5.22c29",
612     "type": "not-found",
613     "name": "not-found",
614     "xml": "<outcome value='not-found'>\n",
615     "comments": "",
616     "outputs": 1,
617     "x": 1530.848201751709,
618     "y": 486.5741605758667,
619     "z": "ccd0c7cf.3cb8d8",
620     "wires": [
621       [
622         "182c54e4.50314b"
623       ]
624     ]
625   },
626   {
627     "id": "182c54e4.50314b",
628     "type": "returnFailure",
629     "name": "return failure",
630     "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=\"`'An error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`\" />\n\n",
631     "comments": "",
632     "x": 1704.4196128845215,
633     "y": 474.8598966598511,
634     "z": "ccd0c7cf.3cb8d8",
635     "wires": []
636   },
637   {
638     "id": "dafc7114.f9611",
639     "type": "other",
640     "name": "other",
641     "xml": "<outcome value='Other'>\n",
642     "comments": "",
643     "outputs": 1,
644     "x": 1523.181209564209,
645     "y": 527.907473564148,
646     "z": "ccd0c7cf.3cb8d8",
647     "wires": [
648       [
649         "9c3bc7c8.8428c8"
650       ]
651     ]
652   },
653   {
654     "id": "9c3bc7c8.8428c8",
655     "type": "returnFailure",
656     "name": "return failure",
657     "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=\"`'Unexpected error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`\" />\n\n",
658     "comments": "",
659     "x": 1710.9537658691406,
660     "y": 523.3466663360596,
661     "z": "ccd0c7cf.3cb8d8",
662     "wires": []
663   },
664   {
665     "id": "2718b5aa.7ee4da",
666     "type": "get-resource",
667     "name": "get-resource esr-thirdparty-sdnc",
668     "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 = SDWANController AND \n\t\t     depth = '1'\"\n        pfx='tmp.aai.esr-thirdparty-sdnc' local-only='false' >\n\n",
669     "comments": "",
670     "outputs": 1,
671     "x": 1260.3571472167969,
672     "y": 487.00013077259064,
673     "z": "ccd0c7cf.3cb8d8",
674     "wires": [
675       [
676         "619fc994.c8c7e8",
677         "a8d0eff5.22c29",
678         "dafc7114.f9611"
679       ]
680     ]
681   },
682   {
683     "id": "f6e580dc.483b5",
684     "type": "execute",
685     "name": "execute RestApiCallNode Create  SDWAN site",
686     "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/sdwan-site-del.json'`\" />\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/campus/v1/sdwan/net/sites/action/batch-delete'`\" />\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=\"post\"/>\n<parameter name=\"responsePrefix\" value=\"site-result\"/>\n<parameter name=\"trustStoreFileName\" value=\"/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks\"/>\n<parameter name=\"trustStorePassword\" value=\"adminadmin\"/>\n<parameter name=\"keyStoreFileName\" value=\"/opt/onap/sdnc/data/stores/sdnc.p12\"/>\n<parameter name=\"keyStorePassword\" value=\"adminadmin\"/>\n<parameter name='customHttpHeaders' value=\"`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`\" />",
687     "comments": "",
688     "outputs": 1,
689     "x": 1288.8574905395508,
690     "y": 685.0002021789551,
691     "z": "ccd0c7cf.3cb8d8",
692     "wires": [
693       [
694         "9ccdb4e3.7037b8",
695         "542d6497.1e051c"
696       ]
697     ]
698   },
699   {
700     "id": "efaab9ba.da6af8",
701     "type": "block",
702     "name": "block : atomic",
703     "xml": "<block atomic=\"true\">",
704     "atomic": "true",
705     "comments": "",
706     "outputs": 1,
707     "x": 1684.523811340332,
708     "y": 664.8890171051025,
709     "z": "ccd0c7cf.3cb8d8",
710     "wires": [
711       []
712     ]
713   },
714   {
715     "id": "eed03e10.52741",
716     "type": "returnFailure",
717     "name": "return failure",
718     "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 executing Create vpn rest api\" />\n",
719     "comments": "",
720     "x": 1681.9683113098145,
721     "y": 699.444356918335,
722     "z": "ccd0c7cf.3cb8d8",
723     "wires": []
724   },
725   {
726     "id": "f190e7e4.b492e8",
727     "type": "failure",
728     "name": "failure",
729     "xml": "<outcome value='failure'>\n",
730     "comments": "",
731     "outputs": 1,
732     "x": 1537.9683074951172,
733     "y": 698.444356918335,
734     "z": "ccd0c7cf.3cb8d8",
735     "wires": [
736       [
737         "eed03e10.52741"
738       ]
739     ]
740   },
741   {
742     "id": "3d884d4b.3bb372",
743     "type": "success",
744     "name": "success",
745     "xml": "<outcome value='success'>\n",
746     "comments": "",
747     "outputs": 1,
748     "x": 1541.4126434326172,
749     "y": 667.1111841201782,
750     "z": "ccd0c7cf.3cb8d8",
751     "wires": [
752       [
753         "efaab9ba.da6af8"
754       ]
755     ]
756   },
757   {
758     "id": "268a0227.9f4d8e",
759     "type": "success",
760     "name": "success",
761     "xml": "<outcome value='success'>\n",
762     "comments": "",
763     "outputs": 1,
764     "x": 1526.611125946045,
765     "y": 565.0040866136551,
766     "z": "ccd0c7cf.3cb8d8",
767     "wires": [
768       [
769         "7a5f68d2.12c3e8"
770       ]
771     ]
772   },
773   {
774     "id": "ec5d99f5.fe59b8",
775     "type": "failure",
776     "name": "failure",
777     "xml": "<outcome value='failure'>\n",
778     "comments": "",
779     "outputs": 1,
780     "x": 1518.861125946045,
781     "y": 606.6469699144363,
782     "z": "ccd0c7cf.3cb8d8",
783     "wires": [
784       [
785         "dc9e3b17.c88cb8"
786       ]
787     ]
788   },
789   {
790     "id": "dc9e3b17.c88cb8",
791     "type": "block",
792     "name": "block",
793     "xml": "<block>\n",
794     "atomic": "false",
795     "comments": "",
796     "outputs": 1,
797     "x": 1644.944622039795,
798     "y": 606.8930026292801,
799     "z": "ccd0c7cf.3cb8d8",
800     "wires": [
801       []
802     ]
803   },
804   {
805     "id": "7a5f68d2.12c3e8",
806     "type": "set",
807     "name": "set token-id",
808     "xml": "<set>\n<parameter name='prop.sdncRestApi.token_id' value='`$token-result.data.token_id`' />\n",
809     "comments": "",
810     "x": 1663.611125946045,
811     "y": 565.0040866136551,
812     "z": "ccd0c7cf.3cb8d8",
813     "wires": []
814   },
815   {
816     "id": "cbf3519f.042f3",
817     "type": "comment",
818     "name": "tmp.thirdparty-sdnc-id is hardcoded value?",
819     "info": "",
820     "comments": "",
821     "x": 1256.8610382080078,
822     "y": 454.0040522813797,
823     "z": "ccd0c7cf.3cb8d8",
824     "wires": []
825   },
826   {
827     "id": "5bb614a8.7a50ac",
828     "type": "block",
829     "name": "block : atomic",
830     "xml": "<block atomic=\"true\">",
831     "atomic": "true",
832     "outputs": 1,
833     "x": 983.8571472167969,
834     "y": 471.6665782928467,
835     "z": "ccd0c7cf.3cb8d8",
836     "wires": [
837       [
838         "2718b5aa.7ee4da",
839         "8fc11da9.0efed",
840         "f6e580dc.483b5",
841         "49b38240.460c6c"
842       ]
843     ]
844   },
845   {
846     "id": "65cd0ad5.7b6474",
847     "type": "save",
848     "name": "update siteInstance configuration in AAI",
849     "xml": "<update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='site-resource' \n      key='site-resource.site-resource-id = $vnf-topology-operation-input.vnf-information.vnf-id' >\n<parameter name='site-resource-id' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />      \n<parameter name='operational-status' value='PendingDelete' />\n",
850     "comments": "",
851     "outputs": 1,
852     "x": 663.8571701049805,
853     "y": 704.0001029968262,
854     "z": "ccd0c7cf.3cb8d8",
855     "wires": [
856       []
857     ]
858   },
859   {
860     "id": "bda524fb.86fa98",
861     "type": "switchNode",
862     "name": "switch siteId",
863     "xml": "<switch test=\"`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].name == 'siteId'`\">\n",
864     "comments": "",
865     "outputs": 1,
866     "x": 1011.8700637817383,
867     "y": 389.8953685760498,
868     "z": "ccd0c7cf.3cb8d8",
869     "wires": [
870       [
871         "5e12f6f2.154df8"
872       ]
873     ]
874   },
875   {
876     "id": "5e12f6f2.154df8",
877     "type": "outcomeTrue",
878     "name": "true",
879     "xml": "<outcome value='true'>\n",
880     "comments": "",
881     "outputs": 1,
882     "x": 1151.8700714111328,
883     "y": 390.8953685760498,
884     "z": "ccd0c7cf.3cb8d8",
885     "wires": [
886       [
887         "c0b4aa42.b23db8"
888       ]
889     ]
890   },
891   {
892     "id": "c0b4aa42.b23db8",
893     "type": "block",
894     "name": "block : atomic",
895     "xml": "<block atomic=\"true\">",
896     "atomic": "true",
897     "outputs": 1,
898     "x": 1300.419719696045,
899     "y": 391.922061920166,
900     "z": "ccd0c7cf.3cb8d8",
901     "wires": [
902       [
903         "12912fa7.36df6"
904       ]
905     ]
906   },
907   {
908     "id": "12912fa7.36df6",
909     "type": "set",
910     "name": "set siteId",
911     "xml": "<set>\n<parameter name='prop.site.siteId' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$idx].value`' />\n\n",
912     "comments": "",
913     "x": 1444.7530822753906,
914     "y": 392.9220790863037,
915     "z": "ccd0c7cf.3cb8d8",
916     "wires": []
917   },
918   {
919     "id": "cc3aa10c.cf485",
920     "type": "comment",
921     "name": "Get siteId to delete",
922     "info": "",
923     "comments": "",
924     "x": 1023.857048034668,
925     "y": 359.0000247955322,
926     "z": "ccd0c7cf.3cb8d8",
927     "wires": []
928   },
929   {
930     "id": "8fc11da9.0efed",
931     "type": "execute",
932     "name": "execute RestApiCallNode Get token",
933     "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/actokentemplate.json'`\" />\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/v2/tokens'`\" />\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"post\"/>\n<parameter name=\"responsePrefix\" value=\"token-result\"/>\n<parameter name=\"trustStoreFileName\" value=\"/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks\"/>\n<parameter name=\"trustStorePassword\" value=\"adminadmin\"/>\n<parameter name=\"keyStoreFileName\" value=\"/opt/onap/sdnc/data/stores/sdnc.p12\"/>\n<parameter name=\"keyStorePassword\" value=\"adminadmin\"/>",
934     "comments": "",
935     "outputs": 1,
936     "x": 1277.0000762939453,
937     "y": 588.000039100647,
938     "z": "ccd0c7cf.3cb8d8",
939     "wires": [
940       [
941         "268a0227.9f4d8e",
942         "ec5d99f5.fe59b8"
943       ]
944     ]
945   },
946   {
947     "id": "e07817c8.713ef8",
948     "type": "execute",
949     "name": "execute Properties",
950     "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",
951     "comments": "",
952     "outputs": 1,
953     "x": 617,
954     "y": 225.00000095367432,
955     "z": "ccd0c7cf.3cb8d8",
956     "wires": [
957       []
958     ]
959   },
960   {
961     "id": "49b38240.460c6c",
962     "type": "call",
963     "name": "call sdwan-get-tenant-auth",
964     "xml": "<call module='GENERIC-RESOURCE-API' rpc='sdwan-get-tenant-auth' mode='sync' >\n",
965     "comments": "",
966     "outputs": 1,
967     "x": 1237,
968     "y": 637,
969     "z": "ccd0c7cf.3cb8d8",
970     "wires": [
971       []
972     ]
973   },
974   {
975     "id": "9ccdb4e3.7037b8",
976     "type": "failure",
977     "name": "failure",
978     "xml": "<outcome value='failure'>\n",
979     "comments": "",
980     "outputs": 1,
981     "x": 1545,
982     "y": 762,
983     "z": "ccd0c7cf.3cb8d8",
984     "wires": [
985       [
986         "b8677116.110c6"
987       ]
988     ]
989   },
990   {
991     "id": "b8677116.110c6",
992     "type": "block",
993     "name": "block : atomic",
994     "xml": "<block atomic=\"true\">",
995     "atomic": "true",
996     "comments": "",
997     "outputs": 1,
998     "x": 1701,
999     "y": 762,
1000     "z": "ccd0c7cf.3cb8d8",
1001     "wires": [
1002       []
1003     ]
1004   },
1005   {
1006     "id": "542d6497.1e051c",
1007     "type": "other",
1008     "name": "other",
1009     "xml": "<outcome value='Other'>\n",
1010     "comments": "",
1011     "outputs": 1,
1012     "x": 1545,
1013     "y": 811,
1014     "z": "ccd0c7cf.3cb8d8",
1015     "wires": [
1016       [
1017         "e1c3f88e.80fd88"
1018       ]
1019     ]
1020   },
1021   {
1022     "id": "e1c3f88e.80fd88",
1023     "type": "block",
1024     "name": "block : atomic",
1025     "xml": "<block atomic=\"true\">",
1026     "atomic": "true",
1027     "comments": "",
1028     "outputs": 1,
1029     "x": 1723,
1030     "y": 808,
1031     "z": "ccd0c7cf.3cb8d8",
1032     "wires": [
1033       []
1034     ]
1035   }
1036 ]