b750acf214c351324b5522cb87d884e6c45d87de
[sdnc/oam.git] / platform-logic / generic-resource-api / src / main / json / GENERIC-RESOURCE-API_site-vnf-topology-operation-activate.json
1 [
2   {
3     "id": "c9dff872.319c28",
4     "type": "dgstart",
5     "name": "DGSTART",
6     "outputs": 1,
7     "x": 182.03125,
8     "y": 193.0103907585144,
9     "z": "8546294e.bbf628",
10     "wires": [
11       [
12         "f599176a.0162d8"
13       ]
14     ]
15   },
16   {
17     "id": "f599176a.0162d8",
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": 257.31695556640625,
26     "y": 233.24850225448608,
27     "z": "8546294e.bbf628",
28     "wires": [
29       [
30         "6ef8717d.0a89a"
31       ]
32     ]
33   },
34   {
35     "id": "6ef8717d.0a89a",
36     "type": "method",
37     "name": "method site-vnf-topology-operation-activate",
38     "xml": "<method rpc='site-vnf-topology-operation-activate' mode='sync'>\n",
39     "comments": "",
40     "outputs": 1,
41     "x": 278.4598693847656,
42     "y": 323.0103907585144,
43     "z": "8546294e.bbf628",
44     "wires": [
45       [
46         "e4c81f6e.49ef7"
47       ]
48     ]
49   },
50   {
51     "id": "e4c81f6e.49ef7",
52     "type": "block",
53     "name": "block : atomic",
54     "xml": "<block atomic=\"true\">",
55     "atomic": "true",
56     "outputs": 1,
57     "x": 266.69798278808594,
58     "y": 512.6771693229675,
59     "z": "8546294e.bbf628",
60     "wires": [
61       [
62         "cd35c02d.85245",
63         "cbc96af.e7a6b98",
64         "f380f867.7d6998",
65         "be9b1521.3244d8",
66         "8699a911.00b498",
67         "640f5d20.cfa064",
68         "e28c053e.d4c358",
69         "c2b356f7.cb66f8",
70         "cfdaefb3.97c88",
71         "de98d30f.d2fa5"
72       ]
73     ]
74   },
75   {
76     "id": "cd35c02d.85245",
77     "type": "switchNode",
78     "name": "switch service-data.vnfs.vnf_length",
79     "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n",
80     "comments": "",
81     "outputs": 1,
82     "x": 706.0209121704102,
83     "y": 141.99998569488525,
84     "z": "8546294e.bbf628",
85     "wires": [
86       [
87         "e72f24a3.7e9cf8",
88         "56a6c4e8.1f860c",
89         "7ce3d5f2.723dec"
90       ]
91     ]
92   },
93   {
94     "id": "e72f24a3.7e9cf8",
95     "type": "other",
96     "name": "Null",
97     "xml": "<outcome value=''>\n",
98     "comments": "",
99     "outputs": 1,
100     "x": 937.0208892822266,
101     "y": 144.0000491142273,
102     "z": "8546294e.bbf628",
103     "wires": [
104       [
105         "edb6abe2.7bba78"
106       ]
107     ]
108   },
109   {
110     "id": "edb6abe2.7bba78",
111     "type": "returnFailure",
112     "name": "return failure",
113     "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",
114     "comments": "",
115     "x": 1094.7984046936035,
116     "y": 124.88899755477905,
117     "z": "8546294e.bbf628",
118     "wires": []
119   },
120   {
121     "id": "56a6c4e8.1f860c",
122     "type": "other",
123     "name": "other",
124     "xml": "<outcome value='Other'>\n",
125     "comments": "",
126     "outputs": 1,
127     "x": 929.0213165283203,
128     "y": 179.00007104873657,
129     "z": "8546294e.bbf628",
130     "wires": [
131       [
132         "28abc688.86ccda"
133       ]
134     ]
135   },
136   {
137     "id": "28abc688.86ccda",
138     "type": "block",
139     "name": "block : atomic",
140     "xml": "<block atomic=\"true\">",
141     "atomic": "true",
142     "outputs": 1,
143     "x": 1095.290786743164,
144     "y": 170.55460453033447,
145     "z": "8546294e.bbf628",
146     "wires": [
147       [
148         "13d47e80.4e6022",
149         "5d523d19.4e3534",
150         "63f3d384.29d3ac"
151       ]
152     ]
153   },
154   {
155     "id": "13d47e80.4e6022",
156     "type": "for",
157     "name": "for vidx..service-data.vnfs.vnf_length[]",
158     "xml": "<for index='vidx' start='0' end='`$service-data.vnfs.vnf_length`' >\n",
159     "comments": "",
160     "outputs": 1,
161     "x": 1365.3068771362305,
162     "y": 114.42860555648804,
163     "z": "8546294e.bbf628",
164     "wires": [
165       [
166         "9845da61.98a1c8"
167       ]
168     ]
169   },
170   {
171     "id": "5d523d19.4e3534",
172     "type": "switchNode",
173     "name": "switch tmp.vidx ",
174     "xml": "<switch test=\"`$tmp.vidx`\">\n\n",
175     "comments": "",
176     "outputs": 1,
177     "x": 1301.6082305908203,
178     "y": 165.41179418563843,
179     "z": "8546294e.bbf628",
180     "wires": [
181       [
182         "26cec9c2.9bd426"
183       ]
184     ]
185   },
186   {
187     "id": "26cec9c2.9bd426",
188     "type": "outcome",
189     "name": "NULL",
190     "xml": "<outcome value=''>\n",
191     "comments": "",
192     "outputs": 1,
193     "x": 1453.0370330810547,
194     "y": 165.98322439193726,
195     "z": "8546294e.bbf628",
196     "wires": [
197       [
198         "a0a7bb4c.608bd8"
199       ]
200     ]
201   },
202   {
203     "id": "90e8fa4e.9e0b88",
204     "type": "switchNode",
205     "name": "switch vnfid found",
206     "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-id == $vnf-topology-operation-input.vnf-information.vnf-id`\">\n\n",
207     "comments": "",
208     "outputs": 1,
209     "x": 1762.7356185913086,
210     "y": 74.67872762680054,
211     "z": "8546294e.bbf628",
212     "wires": [
213       [
214         "b847bf38.a4e72"
215       ]
216     ]
217   },
218   {
219     "id": "a0a7bb4c.608bd8",
220     "type": "returnFailure",
221     "name": "return failure",
222     "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",
223     "comments": "",
224     "x": 1591.465431213379,
225     "y": 167.12604665756226,
226     "z": "8546294e.bbf628",
227     "wires": []
228   },
229   {
230     "id": "b847bf38.a4e72",
231     "type": "outcomeTrue",
232     "name": "true",
233     "xml": "<outcome value='true'>\n",
234     "comments": "",
235     "outputs": 1,
236     "x": 1936.6880989074707,
237     "y": 74.57144784927368,
238     "z": "8546294e.bbf628",
239     "wires": [
240       [
241         "fe37a50e.9b06e8"
242       ]
243     ]
244   },
245   {
246     "id": "7ce3d5f2.723dec",
247     "type": "outcome",
248     "name": "0",
249     "xml": "<outcome value='0'>\n",
250     "comments": "",
251     "outputs": 1,
252     "x": 934.9897003173828,
253     "y": 106.96873807907104,
254     "z": "8546294e.bbf628",
255     "wires": [
256       [
257         "edb6abe2.7bba78"
258       ]
259     ]
260   },
261   {
262     "id": "be9b1521.3244d8",
263     "type": "returnSuccess",
264     "name": "return success",
265     "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",
266     "comments": "",
267     "x": 650.3649482727051,
268     "y": 695.344174861908,
269     "z": "8546294e.bbf628",
270     "wires": []
271   },
272   {
273     "id": "c2b356f7.cb66f8",
274     "type": "set",
275     "name": "set vnf-level-oper-status to Active",
276     "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-level-oper-status.order-status' value='Active' />\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",
277     "comments": "",
278     "x": 712.8451385498047,
279     "y": 529.6816143989563,
280     "z": "8546294e.bbf628",
281     "wires": []
282   },
283   {
284     "id": "e28c053e.d4c358",
285     "type": "set",
286     "name": "set vnf-index and vnf-object-path",
287     "xml": "<set>\n<parameter name='vnfId' value='`$service-data.vnfs.vnf[$tmp.vidx].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/'  + $service-data.vnfs.vnf[$tmp.vidx].vnf-id  + '/vnf-data/'` \" />",
288     "comments": "",
289     "x": 712.53173828125,
290     "y": 486.3441491127014,
291     "z": "8546294e.bbf628",
292     "wires": []
293   },
294   {
295     "id": "5369a88f.c265a8",
296     "type": "success",
297     "name": "success",
298     "xml": "<outcome value='success'>\n",
299     "comments": "",
300     "outputs": 1,
301     "x": 1570.531826019287,
302     "y": 431.00039863586426,
303     "z": "8546294e.bbf628",
304     "wires": [
305       [
306         "e11a3e97.9a4cf"
307       ]
308     ]
309   },
310   {
311     "id": "e11a3e97.9a4cf",
312     "type": "set",
313     "name": "set controller data",
314     "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",
315     "comments": "",
316     "x": 1759.0319213867188,
317     "y": 425.0004082918167,
318     "z": "8546294e.bbf628",
319     "wires": []
320   },
321   {
322     "id": "a5222a28.6f55b8",
323     "type": "not-found",
324     "name": "not-found",
325     "xml": "<outcome value='not-found'>\n",
326     "comments": "",
327     "outputs": 1,
328     "x": 1574.022792816162,
329     "y": 478.5744342803955,
330     "z": "8546294e.bbf628",
331     "wires": [
332       [
333         "ea233a49.a94538"
334       ]
335     ]
336   },
337   {
338     "id": "ea233a49.a94538",
339     "type": "returnFailure",
340     "name": "return failure",
341     "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",
342     "comments": "",
343     "x": 1747.5942039489746,
344     "y": 466.8601703643799,
345     "z": "8546294e.bbf628",
346     "wires": []
347   },
348   {
349     "id": "42b5e401.e14b8c",
350     "type": "other",
351     "name": "other",
352     "xml": "<outcome value='Other'>\n",
353     "comments": "",
354     "outputs": 1,
355     "x": 1566.355800628662,
356     "y": 519.9077472686768,
357     "z": "8546294e.bbf628",
358     "wires": [
359       [
360         "28e9f15e.a3f2ce"
361       ]
362     ]
363   },
364   {
365     "id": "28e9f15e.a3f2ce",
366     "type": "returnFailure",
367     "name": "return failure",
368     "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",
369     "comments": "",
370     "x": 1754.1283569335938,
371     "y": 515.3469400405884,
372     "z": "8546294e.bbf628",
373     "wires": []
374   },
375   {
376     "id": "e43f8602.8d7af8",
377     "type": "get-resource",
378     "name": "get-resource esr-thirdparty-sdnc",
379     "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 = SDWAN-Controller AND \n\t\t     depth = '1'\"\n        pfx='tmp.aai.esr-thirdparty-sdnc' local-only='false' >\n\n",
380     "comments": "",
381     "outputs": 1,
382     "x": 1303.53173828125,
383     "y": 479.00040447711945,
384     "z": "8546294e.bbf628",
385     "wires": [
386       [
387         "5369a88f.c265a8",
388         "a5222a28.6f55b8",
389         "42b5e401.e14b8c"
390       ]
391     ]
392   },
393   {
394     "id": "d2ea4d7a.0f7bc",
395     "type": "execute",
396     "name": "execute RestApiCallNode Create  SDWAN site",
397     "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/sdwan-site.json'`\" />\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/campus/v1/sdwan/net/sites'`\" />\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`\" />",
398     "comments": "",
399     "outputs": 1,
400     "x": 1326.031852722168,
401     "y": 636.0003986358643,
402     "z": "8546294e.bbf628",
403     "wires": [
404       [
405         "f57bd183.9204c"
406       ]
407     ]
408   },
409   {
410     "id": "b5c8e88e.b71a98",
411     "type": "block",
412     "name": "block : atomic",
413     "xml": "<block atomic=\"true\">",
414     "atomic": "true",
415     "comments": "",
416     "outputs": 1,
417     "x": 1746.6983757019043,
418     "y": 637.8892993927002,
419     "z": "8546294e.bbf628",
420     "wires": [
421       []
422     ]
423   },
424   {
425     "id": "db67aff2.ce7ea",
426     "type": "returnFailure",
427     "name": "return failure",
428     "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",
429     "comments": "",
430     "x": 1732.1429595947266,
431     "y": 697.4446468353271,
432     "z": "8546294e.bbf628",
433     "wires": []
434   },
435   {
436     "id": "8e3552db.71c4c",
437     "type": "failure",
438     "name": "failure",
439     "xml": "<outcome value='failure'>\n",
440     "comments": "",
441     "outputs": 1,
442     "x": 1587.1429500579834,
443     "y": 694.4446449279785,
444     "z": "8546294e.bbf628",
445     "wires": [
446       [
447         "db67aff2.ce7ea"
448       ]
449     ]
450   },
451   {
452     "id": "f57bd183.9204c",
453     "type": "success",
454     "name": "success",
455     "xml": "<outcome value='success'>\n",
456     "comments": "",
457     "outputs": 1,
458     "x": 1587.587287902832,
459     "y": 638.1114530563354,
460     "z": "8546294e.bbf628",
461     "wires": [
462       [
463         "b5c8e88e.b71a98"
464       ]
465     ]
466   },
467   {
468     "id": "cfdaefb3.97c88",
469     "type": "set",
470     "name": "copy input data to service data",
471     "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-id' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-id`' />\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.' />",
472     "comments": "",
473     "x": 701.0316848754883,
474     "y": 572.0005831718445,
475     "z": "8546294e.bbf628",
476     "wires": []
477   },
478   {
479     "id": "b24b0990.f29818",
480     "type": "execute",
481     "name": "execute RestApiCallNode Get token",
482     "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\"/>",
483     "comments": "",
484     "outputs": 1,
485     "x": 1304.7858352661133,
486     "y": 572.0044652223587,
487     "z": "8546294e.bbf628",
488     "wires": [
489       [
490         "289de783.f62c58",
491         "794b6e1c.8d635"
492       ]
493     ]
494   },
495   {
496     "id": "289de783.f62c58",
497     "type": "success",
498     "name": "success",
499     "xml": "<outcome value='success'>\n",
500     "comments": "",
501     "outputs": 1,
502     "x": 1569.785717010498,
503     "y": 557.0043603181839,
504     "z": "8546294e.bbf628",
505     "wires": [
506       [
507         "9a259234.042bd"
508       ]
509     ]
510   },
511   {
512     "id": "794b6e1c.8d635",
513     "type": "failure",
514     "name": "failure",
515     "xml": "<outcome value='failure'>\n",
516     "comments": "",
517     "outputs": 1,
518     "x": 1562.035717010498,
519     "y": 598.6472436189651,
520     "z": "8546294e.bbf628",
521     "wires": [
522       [
523         "abdc5f44.099"
524       ]
525     ]
526   },
527   {
528     "id": "abdc5f44.099",
529     "type": "block",
530     "name": "block",
531     "xml": "<block>\n",
532     "atomic": "false",
533     "comments": "",
534     "outputs": 1,
535     "x": 1688.119213104248,
536     "y": 598.8932763338089,
537     "z": "8546294e.bbf628",
538     "wires": [
539       []
540     ]
541   },
542   {
543     "id": "9a259234.042bd",
544     "type": "set",
545     "name": "set token-id",
546     "xml": "<set>\n<parameter name='prop.sdncRestApi.token_id' value='`$token-result.data.token_id`' />\n",
547     "comments": "",
548     "x": 1706.785717010498,
549     "y": 557.0043603181839,
550     "z": "8546294e.bbf628",
551     "wires": []
552   },
553   {
554     "id": "6db7dcff.bc7ce4",
555     "type": "comment",
556     "name": "tmp.thirdparty-sdnc-id is hardcoded value?",
557     "info": "",
558     "comments": "",
559     "x": 1352.0356369018555,
560     "y": 433.004376411438,
561     "z": "8546294e.bbf628",
562     "wires": []
563   },
564   {
565     "id": "640f5d20.cfa064",
566     "type": "set",
567     "name": "set vnf-index to service data",
568     "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-id' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-id`' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length].name' value='siteId' />\n<!--parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length].value' value='`$site-result[0].id`' /-->\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length].value' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />\n<parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length + 1`' />\n",
569     "comments": "",
570     "x": 702.0354537963867,
571     "y": 448.00424432754517,
572     "z": "8546294e.bbf628",
573     "wires": []
574   },
575   {
576     "id": "3d75d87b.d2ff28",
577     "type": "switchNode",
578     "name": "switch ActivateSDWANDeviceInstance",
579     "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-data.request-information.request-action == 'ActivateSDWANDeviceInstance'`\">\n\n    \n    \n\n",
580     "comments": "",
581     "outputs": 1,
582     "x": 1830.2855911254883,
583     "y": 144.00390481948853,
584     "z": "8546294e.bbf628",
585     "wires": [
586       [
587         "628cbd2.1a1aa44"
588       ]
589     ]
590   },
591   {
592     "id": "628cbd2.1a1aa44",
593     "type": "outcomeTrue",
594     "name": "true",
595     "xml": "<outcome value='true'>\n",
596     "comments": "",
597     "outputs": 1,
598     "x": 2057.285446166992,
599     "y": 143.0039038658142,
600     "z": "8546294e.bbf628",
601     "wires": [
602       [
603         "b1822ffa.bc97b"
604       ]
605     ]
606   },
607   {
608     "id": "9845da61.98a1c8",
609     "type": "block",
610     "name": "block",
611     "xml": "<block>\n",
612     "atomic": "false",
613     "comments": "",
614     "outputs": 1,
615     "x": 1600.285415649414,
616     "y": 115.00389051437378,
617     "z": "8546294e.bbf628",
618     "wires": [
619       [
620         "3d75d87b.d2ff28",
621         "90e8fa4e.9e0b88"
622       ]
623     ]
624   },
625   {
626     "id": "fab4e8d5.eaaa38",
627     "type": "comment",
628     "name": "Get devices",
629     "info": "",
630     "comments": "",
631     "x": 1864.0356063842773,
632     "y": 164.7539200782776,
633     "z": "8546294e.bbf628",
634     "wires": []
635   },
636   {
637     "id": "cbc96af.e7a6b98",
638     "type": "set",
639     "name": "set prop.site.sdwan false",
640     "xml": "<set>\n<parameter name='prop.site.sdwan' value=\"false\" />\n\n",
641     "comments": "",
642     "x": 685.0312652587891,
643     "y": 83.0000352859497,
644     "z": "8546294e.bbf628",
645     "wires": []
646   },
647   {
648     "id": "8699a911.00b498",
649     "type": "switchNode",
650     "name": "switch prop.site.sdwan",
651     "xml": "<switch test=\"`$prop.site.sdwan`\">\n",
652     "comments": "",
653     "outputs": 1,
654     "x": 681.0313720703125,
655     "y": 390.666624546051,
656     "z": "8546294e.bbf628",
657     "wires": [
658       [
659         "ace66bf6.fc6f18"
660       ]
661     ]
662   },
663   {
664     "id": "ace66bf6.fc6f18",
665     "type": "outcomeTrue",
666     "name": "true",
667     "xml": "<outcome value='true'>\n",
668     "comments": "",
669     "outputs": 1,
670     "x": 860.031421661377,
671     "y": 387.666624546051,
672     "z": "8546294e.bbf628",
673     "wires": [
674       [
675         "70ebd8ae.1dd798"
676       ]
677     ]
678   },
679   {
680     "id": "70ebd8ae.1dd798",
681     "type": "block",
682     "name": "block : atomic",
683     "xml": "<block atomic=\"true\">",
684     "atomic": "true",
685     "outputs": 1,
686     "x": 1016.0316467285156,
687     "y": 384.6669464111328,
688     "z": "8546294e.bbf628",
689     "wires": [
690       [
691         "2f462de2.0453e2",
692         "2f8e9052.03ea2",
693         "d2ea4d7a.0f7bc",
694         "e43f8602.8d7af8",
695         "b24b0990.f29818"
696       ]
697     ]
698   },
699   {
700     "id": "b1822ffa.bc97b",
701     "type": "block",
702     "name": "block : atomic",
703     "xml": "<block atomic=\"true\">",
704     "atomic": "true",
705     "outputs": 1,
706     "x": 2010.6982822418213,
707     "y": 212.00003480911255,
708     "z": "8546294e.bbf628",
709     "wires": [
710       [
711         "f8a73d95.16c95"
712       ]
713     ]
714   },
715   {
716     "id": "f8a73d95.16c95",
717     "type": "for",
718     "name": "for loop deviceidx - Get deviceId from servicedata",
719     "xml": "<for index=\"deviceidx\" start=\"0\" end=\"`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length`\">",
720     "comments": "",
721     "outputs": 1,
722     "x": 2294.0321140289307,
723     "y": 215.00006532669067,
724     "z": "8546294e.bbf628",
725     "wires": [
726       [
727         "f4aaaa9b.0e63e8"
728       ]
729     ]
730   },
731   {
732     "id": "f4aaaa9b.0e63e8",
733     "type": "block",
734     "name": "block",
735     "xml": "<block>\n",
736     "atomic": "false",
737     "comments": "",
738     "outputs": 1,
739     "x": 2410.031898498535,
740     "y": 266.0002508163452,
741     "z": "8546294e.bbf628",
742     "wires": [
743       [
744         "560efc8.407e904"
745       ]
746     ]
747   },
748   {
749     "id": "560efc8.407e904",
750     "type": "switchNode",
751     "name": "switch deviceId",
752     "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$deviceidx].name == 'deviceId'`\">\n",
753     "comments": "",
754     "outputs": 1,
755     "x": 2570.032154083252,
756     "y": 268.0001039505005,
757     "z": "8546294e.bbf628",
758     "wires": [
759       [
760         "364ea14b.4737ce"
761       ]
762     ]
763   },
764   {
765     "id": "364ea14b.4737ce",
766     "type": "outcomeTrue",
767     "name": "true",
768     "xml": "<outcome value='true'>\n",
769     "comments": "",
770     "outputs": 1,
771     "x": 2722.032325744629,
772     "y": 267.0001039505005,
773     "z": "8546294e.bbf628",
774     "wires": [
775       [
776         "57bae08d.5682f"
777       ]
778     ]
779   },
780   {
781     "id": "57bae08d.5682f",
782     "type": "set",
783     "name": "set deviceId",
784     "xml": "<set>\n<parameter name='prop.site.deviceId[$prop.site.deviceId_length]' value='`$service-data.vnfs.vnf[$tmp.deviceVidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$deviceidx].value`' />\n<parameter name='prop.site.deviceId_length' value='`$prop.site.deviceId_length + 1`' />\n",
785     "comments": "",
786     "x": 2862.032329559326,
787     "y": 266.600058555603,
788     "z": "8546294e.bbf628",
789     "wires": []
790   },
791   {
792     "id": "63f3d384.29d3ac",
793     "type": "set",
794     "name": "set prop.site.deviceId_length",
795     "xml": "<set>\n<parameter name='prop.site.deviceId_length' value='0' />\n",
796     "comments": "",
797     "x": 1338.031322479248,
798     "y": 69.99999761581421,
799     "z": "8546294e.bbf628",
800     "wires": []
801   },
802   {
803     "id": "de98d30f.d2fa5",
804     "type": "save",
805     "name": "update siteInstance configuration in AAI",
806     "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='site-resource' \n      key='site-resource.id = $service-data.vnfs.vnf[$tmp.vidx].vnf-id' >\n<parameter name='id' value='`$service-data.vnfs.vnf[$tmp.vidx].vnf-id`' />      \n<parameter name='generated-site-id' value='`$site-result[0].site-id`' /> \n<parameter name='operational-status' value='Active' />\n",
807     "comments": "",
808     "outputs": 1,
809     "x": 731.0313720703125,
810     "y": 633.0000977516174,
811     "z": "8546294e.bbf628",
812     "wires": [
813       []
814     ]
815   },
816   {
817     "id": "f380f867.7d6998",
818     "type": "execute",
819     "name": "execute Properties",
820     "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",
821     "comments": "",
822     "outputs": 1,
823     "x": 677.0312881469727,
824     "y": 279.99999952316284,
825     "z": "8546294e.bbf628",
826     "wires": [
827       []
828     ]
829   },
830   {
831     "id": "2f462de2.0453e2",
832     "type": "set",
833     "name": "set siteId",
834     "xml": "<set>\n<parameter name='prop.site.siteId' value=\"\" />\n\n",
835     "comments": "",
836     "x": 1225.0315856933594,
837     "y": 375.0001050233841,
838     "z": "8546294e.bbf628",
839     "wires": []
840   },
841   {
842     "id": "e43a0564.6e85b8",
843     "type": "comment",
844     "name": "should be null in request",
845     "info": "",
846     "comments": "",
847     "x": 1234.031509399414,
848     "y": 346.0000592470169,
849     "z": "8546294e.bbf628",
850     "wires": []
851   },
852   {
853     "id": "fe37a50e.9b06e8",
854     "type": "block",
855     "name": "block : atomic",
856     "xml": "<block atomic=\"true\">",
857     "atomic": "true",
858     "outputs": 1,
859     "x": 2107.031394958496,
860     "y": 78.65758323669434,
861     "z": "8546294e.bbf628",
862     "wires": [
863       [
864         "4bd89f7e.9676d",
865         "9ff83ab.3d923c8",
866         "523d9c1d.3e7a14",
867         "471b0999.b03818"
868       ]
869     ]
870   },
871   {
872     "id": "9ff83ab.3d923c8",
873     "type": "set",
874     "name": "set vnf-request-input.",
875     "xml": "<set>\n<parameter name='vnf-request-input.' value='`$ctx.vnf-data.vnf-data.vnf-request-input.`' />\n\n",
876     "comments": "",
877     "x": 2359.364402770996,
878     "y": 95.65763854980469,
879     "z": "8546294e.bbf628",
880     "wires": []
881   },
882   {
883     "id": "4bd89f7e.9676d",
884     "type": "set",
885     "name": "set tmp.vidx and ctx.vnf-data",
886     "xml": "<set>\n<parameter name='tmp.vidx' value='`$vidx`' />\n<parameter name='ctx.vnf-data.' value='`$service-data.vnfs.vnf[$vidx].`' />\n",
887     "comments": "",
888     "x": 2386.918113708496,
889     "y": 49.00000286102295,
890     "z": "8546294e.bbf628",
891     "wires": []
892   },
893   {
894     "id": "523d9c1d.3e7a14",
895     "type": "call",
896     "name": "call sdwan-get-site-param",
897     "xml": "<call module='GENERIC-RESOURCE-API' rpc='sdwan-get-site-param' mode='sync' >\n",
898     "comments": "",
899     "outputs": 1,
900     "x": 2358.005081176758,
901     "y": 131.10712242126465,
902     "z": "8546294e.bbf628",
903     "wires": [
904       []
905     ]
906   },
907   {
908     "id": "2f8e9052.03ea2",
909     "type": "for",
910     "name": "for cpidx..prop.site.controlpoints",
911     "xml": "<for index='cpidx' start='0' end='`$prop.site.controlpoints_length`' >\n\t\t\t\t\t\t\t\t\t\n",
912     "comments": "",
913     "outputs": 1,
914     "x": 1285.0318603515625,
915     "y": 276.0313186645508,
916     "z": "8546294e.bbf628",
917     "wires": [
918       [
919         "5d6d521c.a38a7c"
920       ]
921     ]
922   },
923   {
924     "id": "5d6d521c.a38a7c",
925     "type": "block",
926     "name": "block : atomic",
927     "xml": "<block atomic=\"true\">",
928     "atomic": "true",
929     "outputs": 1,
930     "x": 1528.0313720703125,
931     "y": 274.03125762939453,
932     "z": "8546294e.bbf628",
933     "wires": [
934       [
935         "a5905cec.9f577"
936       ]
937     ]
938   },
939   {
940     "id": "a5905cec.9f577",
941     "type": "for",
942     "name": "for cpvidx..service-data.vnfs.vnf_length[]",
943     "xml": "<for index='cpvidx' start='0' end='`$service-data.vnfs.vnf_length`' >\n",
944     "comments": "",
945     "outputs": 1,
946     "x": 1777.0313720703125,
947     "y": 272.031289100647,
948     "z": "8546294e.bbf628",
949     "wires": [
950       [
951         "c5914904.7dd248"
952       ]
953     ]
954   },
955   {
956     "id": "c5914904.7dd248",
957     "type": "block",
958     "name": "block",
959     "xml": "<block>\n",
960     "atomic": "false",
961     "comments": "",
962     "outputs": 1,
963     "x": 1630.531322479248,
964     "y": 338.03128933906555,
965     "z": "8546294e.bbf628",
966     "wires": [
967       [
968         "81562a69.669098"
969       ]
970     ]
971   },
972   {
973     "id": "81562a69.669098",
974     "type": "switchNode",
975     "name": "switch ActivateSiteInstance",
976     "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-data.request-information.request-action == 'ActivateSiteInstance'`\">\n\n    \n    \n\n",
977     "comments": "",
978     "outputs": 1,
979     "x": 1826.5317573547363,
980     "y": 337.0312900543213,
981     "z": "8546294e.bbf628",
982     "wires": [
983       [
984         "4dd0f132.ac22d"
985       ]
986     ]
987   },
988   {
989     "id": "4dd0f132.ac22d",
990     "type": "outcomeTrue",
991     "name": "true",
992     "xml": "<outcome value='true'>\n",
993     "comments": "",
994     "outputs": 1,
995     "x": 2015.5316467285156,
996     "y": 336.031259059906,
997     "z": "8546294e.bbf628",
998     "wires": [
999       [
1000         "c19716c9.bf16e8"
1001       ]
1002     ]
1003   },
1004   {
1005     "id": "c19716c9.bf16e8",
1006     "type": "block",
1007     "name": "block : atomic",
1008     "xml": "<block atomic=\"true\">",
1009     "atomic": "true",
1010     "outputs": 1,
1011     "x": 2169.874858856201,
1012     "y": 352.1174783706665,
1013     "z": "8546294e.bbf628",
1014     "wires": [
1015       [
1016         "b380d74e.7f6938"
1017       ]
1018     ]
1019   },
1020   {
1021     "id": "b380d74e.7f6938",
1022     "type": "for",
1023     "name": "for loop sidx - Get siteId from servicedata",
1024     "xml": "<for index=\"sidx\" start=\"0\" end=\"`$service-data.vnfs.vnf[$cpvidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length`\">",
1025     "comments": "",
1026     "outputs": 1,
1027     "x": 2415.5315895080566,
1028     "y": 354.0313606262207,
1029     "z": "8546294e.bbf628",
1030     "wires": [
1031       [
1032         "586aef3f.c2594"
1033       ]
1034     ]
1035   },
1036   {
1037     "id": "586aef3f.c2594",
1038     "type": "block",
1039     "name": "block",
1040     "xml": "<block>\n",
1041     "atomic": "false",
1042     "comments": "",
1043     "outputs": 1,
1044     "x": 2141.531894683838,
1045     "y": 451.0313949584961,
1046     "z": "8546294e.bbf628",
1047     "wires": [
1048       [
1049         "6ca3ced4.b496f"
1050       ]
1051     ]
1052   },
1053   {
1054     "id": "6ca3ced4.b496f",
1055     "type": "switchNode",
1056     "name": "switch name",
1057     "xml": "<switch test=\"`$service-data.vnfs.vnf[$cpvidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$sidx].name == 'name'`\">\n",
1058     "comments": "",
1059     "outputs": 1,
1060     "x": 2301.5321502685547,
1061     "y": 453.03124809265137,
1062     "z": "8546294e.bbf628",
1063     "wires": [
1064       [
1065         "e4e196a3.719d08"
1066       ]
1067     ]
1068   },
1069   {
1070     "id": "e4e196a3.719d08",
1071     "type": "outcomeTrue",
1072     "name": "true",
1073     "xml": "<outcome value='true'>\n",
1074     "comments": "",
1075     "outputs": 1,
1076     "x": 2453.5323219299316,
1077     "y": 452.03124809265137,
1078     "z": "8546294e.bbf628",
1079     "wires": [
1080       [
1081         "79a83f73.ae9af"
1082       ]
1083     ]
1084   },
1085   {
1086     "id": "9f3ec9f2.b22258",
1087     "type": "switchNode",
1088     "name": "switch name match with controlPoint",
1089     "xml": "<switch test=\"`$service-data.vnfs.vnf[$cpvidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$sidx].value == $prop.site.controlpoints[$cpidx]`\">\n",
1090     "comments": "",
1091     "outputs": 1,
1092     "x": 2690.0319023132324,
1093     "y": 462.031436920166,
1094     "z": "8546294e.bbf628",
1095     "wires": [
1096       [
1097         "2d878bd7.4ff264"
1098       ]
1099     ]
1100   },
1101   {
1102     "id": "2d878bd7.4ff264",
1103     "type": "outcomeTrue",
1104     "name": "true",
1105     "xml": "<outcome value='true'>\n",
1106     "comments": "",
1107     "outputs": 1,
1108     "x": 2899.031665802002,
1109     "y": 455.03130531311035,
1110     "z": "8546294e.bbf628",
1111     "wires": [
1112       [
1113         "3590859d.52442a"
1114       ]
1115     ]
1116   },
1117   {
1118     "id": "95b453fd.ee43a",
1119     "type": "for",
1120     "name": "for loop lidx - Get siteId from servicedata",
1121     "xml": "<for index=\"lidx\" start=\"0\" end=\"`$service-data.vnfs.vnf[$cpvidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length`\">",
1122     "comments": "",
1123     "outputs": 1,
1124     "x": 2483.0317192077637,
1125     "y": 566.0313177108765,
1126     "z": "8546294e.bbf628",
1127     "wires": [
1128       [
1129         "29fb7e8d.917742"
1130       ]
1131     ]
1132   },
1133   {
1134     "id": "29fb7e8d.917742",
1135     "type": "block",
1136     "name": "block",
1137     "xml": "<block>\n",
1138     "atomic": "false",
1139     "comments": "",
1140     "outputs": 1,
1141     "x": 2273.0313606262207,
1142     "y": 640.0315551757812,
1143     "z": "8546294e.bbf628",
1144     "wires": [
1145       [
1146         "43fe6c1f.7a83e4"
1147       ]
1148     ]
1149   },
1150   {
1151     "id": "43fe6c1f.7a83e4",
1152     "type": "switchNode",
1153     "name": "switch siteId",
1154     "xml": "<switch test=\"`$service-data.vnfs.vnf[$cpvidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$lidx].name == 'siteId'`\">\n",
1155     "comments": "",
1156     "outputs": 1,
1157     "x": 2419.0316047668457,
1158     "y": 643.0313415527344,
1159     "z": "8546294e.bbf628",
1160     "wires": [
1161       [
1162         "48abb19b.d8fe"
1163       ]
1164     ]
1165   },
1166   {
1167     "id": "48abb19b.d8fe",
1168     "type": "outcomeTrue",
1169     "name": "true",
1170     "xml": "<outcome value='true'>\n",
1171     "comments": "",
1172     "outputs": 1,
1173     "x": 2566.031913757324,
1174     "y": 641.0313110351562,
1175     "z": "8546294e.bbf628",
1176     "wires": [
1177       [
1178         "2780c7bb.98f1c8"
1179       ]
1180     ]
1181   },
1182   {
1183     "id": "2780c7bb.98f1c8",
1184     "type": "set",
1185     "name": "set siteId in control point",
1186     "xml": "<set>\n<parameter name='prop.site.controlpoints[$cpidx]' value='`$service-data.vnfs.vnf[$cpvidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$lidx].value`' />\n\n",
1187     "comments": "",
1188     "x": 2745.0322227478027,
1189     "y": 643.631411075592,
1190     "z": "8546294e.bbf628",
1191     "wires": []
1192   },
1193   {
1194     "id": "3590859d.52442a",
1195     "type": "block",
1196     "name": "block : atomic",
1197     "xml": "<block atomic=\"true\">",
1198     "atomic": "true",
1199     "outputs": 1,
1200     "x": 2227.0316123962402,
1201     "y": 566.0313024520874,
1202     "z": "8546294e.bbf628",
1203     "wires": [
1204       [
1205         "95b453fd.ee43a"
1206       ]
1207     ]
1208   },
1209   {
1210     "id": "471b0999.b03818",
1211     "type": "record",
1212     "name": "record",
1213     "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/svclogic.log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"sdwan-site-activateeeee-delete\"/>\n<parameter name=\"field3\" value='`$prop.site.sdwan`'/>\n",
1214     "comments": "",
1215     "outputs": 1,
1216     "x": 2300.0313873291016,
1217     "y": 177.03126049041748,
1218     "z": "8546294e.bbf628",
1219     "wires": [
1220       []
1221     ]
1222   },
1223   {
1224     "id": "79a83f73.ae9af",
1225     "type": "block",
1226     "name": "block : atomic",
1227     "xml": "<block atomic=\"true\">",
1228     "atomic": "true",
1229     "outputs": 1,
1230     "x": 2720.5314903259277,
1231     "y": 401.031286239624,
1232     "z": "8546294e.bbf628",
1233     "wires": [
1234       [
1235         "9f3ec9f2.b22258"
1236       ]
1237     ]
1238   }
1239 ]