Refactored SOTN and SDWAN DG
[sdnc/oam.git] / platform-logic / generic-resource-api / src / main / json / sdwan / GENERIC-RESOURCE-API_site-vnf-topology-operation-activate.json
1 [
2   {
3     "id": "3b96b94e.d2db46",
4     "type": "dgstart",
5     "name": "DGSTART",
6     "outputs": 1,
7     "x": 101.71429443359375,
8     "y": 190.01038789749146,
9     "z": "f7b8765.9d87788",
10     "wires": [
11       [
12         "2a24b40f.15257c"
13       ]
14     ]
15   },
16   {
17     "id": "2a24b40f.15257c",
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": 177,
26     "y": 230.24849939346313,
27     "z": "f7b8765.9d87788",
28     "wires": [
29       [
30         "13982dc8.7557c2"
31       ]
32     ]
33   },
34   {
35     "id": "13982dc8.7557c2",
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": 198.14291381835938,
42     "y": 320.01038789749146,
43     "z": "f7b8765.9d87788",
44     "wires": [
45       [
46         "cc746.fa4808ba"
47       ]
48     ]
49   },
50   {
51     "id": "cc746.fa4808ba",
52     "type": "block",
53     "name": "block : atomic",
54     "xml": "<block atomic=\"true\">",
55     "atomic": "true",
56     "outputs": 1,
57     "x": 186.3810272216797,
58     "y": 509.6771664619446,
59     "z": "f7b8765.9d87788",
60     "wires": [
61       [
62         "7d7132e1.2faacc",
63         "43a548ad.54cc98",
64         "b5ec2bbf.0ef568",
65         "c9f28855.c58858",
66         "2cf8df50.df009",
67         "5f881f0.741dae",
68         "445ef8.15e44108",
69         "448dd2dd.bafb8c",
70         "f7484eea.3c8a9",
71         "3fda4a72.8f9396"
72       ]
73     ]
74   },
75   {
76     "id": "7d7132e1.2faacc",
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": 625.7039566040039,
83     "y": 138.9999828338623,
84     "z": "f7b8765.9d87788",
85     "wires": [
86       [
87         "ed712d22.18f85",
88         "d79f3765.c39a08",
89         "34d8aa26.2a5306"
90       ]
91     ]
92   },
93   {
94     "id": "ed712d22.18f85",
95     "type": "other",
96     "name": "Null",
97     "xml": "<outcome value=''>\n",
98     "comments": "",
99     "outputs": 1,
100     "x": 856.7039337158203,
101     "y": 141.00004625320435,
102     "z": "f7b8765.9d87788",
103     "wires": [
104       [
105         "774eda2e.68a9d4"
106       ]
107     ]
108   },
109   {
110     "id": "774eda2e.68a9d4",
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": 1014.4814491271973,
116     "y": 121.8889946937561,
117     "z": "f7b8765.9d87788",
118     "wires": []
119   },
120   {
121     "id": "d79f3765.c39a08",
122     "type": "other",
123     "name": "other",
124     "xml": "<outcome value='Other'>\n",
125     "comments": "",
126     "outputs": 1,
127     "x": 848.7043609619141,
128     "y": 176.00006818771362,
129     "z": "f7b8765.9d87788",
130     "wires": [
131       [
132         "3a3303bd.28cb7c"
133       ]
134     ]
135   },
136   {
137     "id": "3a3303bd.28cb7c",
138     "type": "block",
139     "name": "block : atomic",
140     "xml": "<block atomic=\"true\">",
141     "atomic": "true",
142     "outputs": 1,
143     "x": 1014.9738311767578,
144     "y": 167.55460166931152,
145     "z": "f7b8765.9d87788",
146     "wires": [
147       [
148         "46ac8f1a.93c77",
149         "dec89d20.3ffd2",
150         "aa1fa754.8a56c8"
151       ]
152     ]
153   },
154   {
155     "id": "46ac8f1a.93c77",
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": 1265.9899597167969,
162     "y": 112.42860507965088,
163     "z": "f7b8765.9d87788",
164     "wires": [
165       [
166         "5d97713b.b0498"
167       ]
168     ]
169   },
170   {
171     "id": "dec89d20.3ffd2",
172     "type": "switchNode",
173     "name": "switch tmp.vidx ",
174     "xml": "<switch test=\"`$tmp.vidx`\">\n\n",
175     "comments": "",
176     "outputs": 1,
177     "x": 1221.291275024414,
178     "y": 162.41179132461548,
179     "z": "f7b8765.9d87788",
180     "wires": [
181       [
182         "12d5f510.98545b"
183       ]
184     ]
185   },
186   {
187     "id": "12d5f510.98545b",
188     "type": "outcome",
189     "name": "NULL",
190     "xml": "<outcome value=''>\n",
191     "comments": "",
192     "outputs": 1,
193     "x": 1372.7200775146484,
194     "y": 162.9832215309143,
195     "z": "f7b8765.9d87788",
196     "wires": [
197       [
198         "baac3d2b.9c149"
199       ]
200     ]
201   },
202   {
203     "id": "5d333a67.ea5b04",
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": 1682.4186630249023,
210     "y": 71.67872476577759,
211     "z": "f7b8765.9d87788",
212     "wires": [
213       [
214         "ff1652c5.5f817"
215       ]
216     ]
217   },
218   {
219     "id": "baac3d2b.9c149",
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": 1511.1484756469727,
225     "y": 164.1260437965393,
226     "z": "f7b8765.9d87788",
227     "wires": []
228   },
229   {
230     "id": "ff1652c5.5f817",
231     "type": "outcomeTrue",
232     "name": "true",
233     "xml": "<outcome value='true'>\n",
234     "comments": "",
235     "outputs": 1,
236     "x": 1856.3711433410645,
237     "y": 71.57144498825073,
238     "z": "f7b8765.9d87788",
239     "wires": [
240       [
241         "c70c2471.2c7958"
242       ]
243     ]
244   },
245   {
246     "id": "34d8aa26.2a5306",
247     "type": "outcome",
248     "name": "0",
249     "xml": "<outcome value='0'>\n",
250     "comments": "",
251     "outputs": 1,
252     "x": 854.6727447509766,
253     "y": 103.9687352180481,
254     "z": "f7b8765.9d87788",
255     "wires": [
256       [
257         "774eda2e.68a9d4"
258       ]
259     ]
260   },
261   {
262     "id": "c9f28855.c58858",
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": 570.0479927062988,
268     "y": 692.344172000885,
269     "z": "f7b8765.9d87788",
270     "wires": []
271   },
272   {
273     "id": "448dd2dd.bafb8c",
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": 632.5281829833984,
279     "y": 526.6816115379333,
280     "z": "f7b8765.9d87788",
281     "wires": []
282   },
283   {
284     "id": "445ef8.15e44108",
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/'  + $vnf-topology-operation-input.vnf-information.vnf-id  + '/vnf-data/'` \" />",
288     "comments": "",
289     "x": 632.2147827148438,
290     "y": 483.34414625167847,
291     "z": "f7b8765.9d87788",
292     "wires": []
293   },
294   {
295     "id": "bbcb4df5.064e3",
296     "type": "success",
297     "name": "success",
298     "xml": "<outcome value='success'>\n",
299     "comments": "",
300     "outputs": 1,
301     "x": 1490.2148704528809,
302     "y": 428.0003957748413,
303     "z": "f7b8765.9d87788",
304     "wires": [
305       [
306         "1ea13654.9fcfaa"
307       ]
308     ]
309   },
310   {
311     "id": "1ea13654.9fcfaa",
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": 1678.7149658203125,
317     "y": 422.00040543079376,
318     "z": "f7b8765.9d87788",
319     "wires": []
320   },
321   {
322     "id": "f9005f03.a47fb",
323     "type": "not-found",
324     "name": "not-found",
325     "xml": "<outcome value='not-found'>\n",
326     "comments": "",
327     "outputs": 1,
328     "x": 1493.7058372497559,
329     "y": 475.57443141937256,
330     "z": "f7b8765.9d87788",
331     "wires": [
332       [
333         "5c27d008.c54fe"
334       ]
335     ]
336   },
337   {
338     "id": "5c27d008.c54fe",
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": 1667.2772483825684,
344     "y": 463.86016750335693,
345     "z": "f7b8765.9d87788",
346     "wires": []
347   },
348   {
349     "id": "5f7c43f4.71b4dc",
350     "type": "other",
351     "name": "other",
352     "xml": "<outcome value='Other'>\n",
353     "comments": "",
354     "outputs": 1,
355     "x": 1486.0388450622559,
356     "y": 516.9077444076538,
357     "z": "f7b8765.9d87788",
358     "wires": [
359       [
360         "690bd523.e7874c"
361       ]
362     ]
363   },
364   {
365     "id": "690bd523.e7874c",
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": 1673.8114013671875,
371     "y": 512.3469371795654,
372     "z": "f7b8765.9d87788",
373     "wires": []
374   },
375   {
376     "id": "766aef68.e4df8",
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 = SDWANController 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": 1223.2147827148438,
383     "y": 476.0004016160965,
384     "z": "f7b8765.9d87788",
385     "wires": [
386       [
387         "bbcb4df5.064e3",
388         "f9005f03.a47fb",
389         "5f7c43f4.71b4dc"
390       ]
391     ]
392   },
393   {
394     "id": "cd48267e.9edf28",
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-' + $template.site.role + '.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.onap.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": 1250.71484375,
401     "y": 666.0003662109375,
402     "z": "f7b8765.9d87788",
403     "wires": [
404       [
405         "42f4d566.03c33c",
406         "bdd9ab07.dc7f48"
407       ]
408     ]
409   },
410   {
411     "id": "f430b9bd.f345f8",
412     "type": "block",
413     "name": "block : atomic",
414     "xml": "<block atomic=\"true\">",
415     "atomic": "true",
416     "comments": "",
417     "outputs": 1,
418     "x": 1666.381420135498,
419     "y": 634.8892965316772,
420     "z": "f7b8765.9d87788",
421     "wires": [
422       []
423     ]
424   },
425   {
426     "id": "49b0ec38.4844e4",
427     "type": "returnFailure",
428     "name": "return failure",
429     "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",
430     "comments": "",
431     "x": 1651.8260040283203,
432     "y": 694.4446439743042,
433     "z": "f7b8765.9d87788",
434     "wires": []
435   },
436   {
437     "id": "bdd9ab07.dc7f48",
438     "type": "failure",
439     "name": "failure",
440     "xml": "<outcome value='failure'>\n",
441     "comments": "",
442     "outputs": 1,
443     "x": 1506.8259944915771,
444     "y": 691.4446420669556,
445     "z": "f7b8765.9d87788",
446     "wires": [
447       [
448         "49b0ec38.4844e4"
449       ]
450     ]
451   },
452   {
453     "id": "42f4d566.03c33c",
454     "type": "success",
455     "name": "success",
456     "xml": "<outcome value='success'>\n",
457     "comments": "",
458     "outputs": 1,
459     "x": 1507.2703323364258,
460     "y": 635.1114501953125,
461     "z": "f7b8765.9d87788",
462     "wires": [
463       [
464         "f430b9bd.f345f8"
465       ]
466     ]
467   },
468   {
469     "id": "f7484eea.3c8a9",
470     "type": "set",
471     "name": "copy input data to service data",
472     "xml": "<set>\n<!--parameter name='service-data.vnfs.vnf[$tmp.vidx].vnf-id' value='`$vnf-topology-operation-input.vnf-information.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.' />",
473     "comments": "",
474     "x": 623.7147369384766,
475     "y": 570.0006427764893,
476     "z": "f7b8765.9d87788",
477     "wires": []
478   },
479   {
480     "id": "416674e0.73681c",
481     "type": "execute",
482     "name": "execute RestApiCallNode Get token",
483     "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.onap.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\"/>",
484     "comments": "",
485     "outputs": 1,
486     "x": 1224.468879699707,
487     "y": 569.0044623613358,
488     "z": "f7b8765.9d87788",
489     "wires": [
490       [
491         "58134bd4.bcfed4",
492         "6a9bb51c.bc170c"
493       ]
494     ]
495   },
496   {
497     "id": "58134bd4.bcfed4",
498     "type": "success",
499     "name": "success",
500     "xml": "<outcome value='success'>\n",
501     "comments": "",
502     "outputs": 1,
503     "x": 1489.4687614440918,
504     "y": 554.004357457161,
505     "z": "f7b8765.9d87788",
506     "wires": [
507       [
508         "b4100138.98e92"
509       ]
510     ]
511   },
512   {
513     "id": "6a9bb51c.bc170c",
514     "type": "failure",
515     "name": "failure",
516     "xml": "<outcome value='failure'>\n",
517     "comments": "",
518     "outputs": 1,
519     "x": 1481.7187614440918,
520     "y": 595.6472407579422,
521     "z": "f7b8765.9d87788",
522     "wires": [
523       [
524         "bf434721.5049e8"
525       ]
526     ]
527   },
528   {
529     "id": "bf434721.5049e8",
530     "type": "block",
531     "name": "block",
532     "xml": "<block>\n",
533     "atomic": "false",
534     "comments": "",
535     "outputs": 1,
536     "x": 1607.8022575378418,
537     "y": 595.893273472786,
538     "z": "f7b8765.9d87788",
539     "wires": [
540       []
541     ]
542   },
543   {
544     "id": "b4100138.98e92",
545     "type": "set",
546     "name": "set token-id",
547     "xml": "<set>\n<parameter name='prop.sdncRestApi.token_id' value='`$token-result.data.token_id`' />\n",
548     "comments": "",
549     "x": 1626.4687614440918,
550     "y": 554.004357457161,
551     "z": "f7b8765.9d87788",
552     "wires": []
553   },
554   {
555     "id": "c6987662.432148",
556     "type": "comment",
557     "name": "tmp.thirdparty-sdnc-id is hardcoded value?",
558     "info": "",
559     "comments": "",
560     "x": 1271.7186813354492,
561     "y": 430.00437355041504,
562     "z": "f7b8765.9d87788",
563     "wires": []
564   },
565   {
566     "id": "5f881f0.741dae",
567     "type": "set",
568     "name": "set siteId to service data",
569     "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.success[0].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",
570     "comments": "",
571     "x": 613.7185668945312,
572     "y": 445.0042562484741,
573     "z": "f7b8765.9d87788",
574     "wires": []
575   },
576   {
577     "id": "473eb805.0b9488",
578     "type": "switchNode",
579     "name": "switch ActivateSDWANDeviceInstance",
580     "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-data.request-information.request-action == 'ActivateSDWANDeviceInstance'`\">\n\n    \n    \n\n",
581     "comments": "",
582     "outputs": 1,
583     "x": 1749.968635559082,
584     "y": 141.00390195846558,
585     "z": "f7b8765.9d87788",
586     "wires": [
587       [
588         "a2ae14c0.4e83e8"
589       ]
590     ]
591   },
592   {
593     "id": "a2ae14c0.4e83e8",
594     "type": "outcomeTrue",
595     "name": "true",
596     "xml": "<outcome value='true'>\n",
597     "comments": "",
598     "outputs": 1,
599     "x": 1976.968490600586,
600     "y": 140.00390100479126,
601     "z": "f7b8765.9d87788",
602     "wires": [
603       [
604         "e66294b6.7e7298"
605       ]
606     ]
607   },
608   {
609     "id": "c0693138.694c4",
610     "type": "comment",
611     "name": "Get devices",
612     "info": "",
613     "comments": "",
614     "x": 1783.718650817871,
615     "y": 161.75391721725464,
616     "z": "f7b8765.9d87788",
617     "wires": []
618   },
619   {
620     "id": "43a548ad.54cc98",
621     "type": "set",
622     "name": "set prop.site.sdwan false",
623     "xml": "<set>\n<parameter name='prop.site.sdwan' value=\"false\" />\n\n",
624     "comments": "",
625     "x": 604.7143096923828,
626     "y": 80.00003242492676,
627     "z": "f7b8765.9d87788",
628     "wires": []
629   },
630   {
631     "id": "2cf8df50.df009",
632     "type": "switchNode",
633     "name": "switch prop.site.sdwan",
634     "xml": "<switch test=\"`$prop.site.sdwan`\">\n",
635     "comments": "",
636     "outputs": 1,
637     "x": 600.7144165039062,
638     "y": 387.6666216850281,
639     "z": "f7b8765.9d87788",
640     "wires": [
641       [
642         "6b990b0d.fef984"
643       ]
644     ]
645   },
646   {
647     "id": "6b990b0d.fef984",
648     "type": "outcomeTrue",
649     "name": "true",
650     "xml": "<outcome value='true'>\n",
651     "comments": "",
652     "outputs": 1,
653     "x": 779.7144660949707,
654     "y": 384.6666216850281,
655     "z": "f7b8765.9d87788",
656     "wires": [
657       [
658         "fac23885.a00b38"
659       ]
660     ]
661   },
662   {
663     "id": "fac23885.a00b38",
664     "type": "block",
665     "name": "block : atomic",
666     "xml": "<block atomic=\"true\">",
667     "atomic": "true",
668     "outputs": 1,
669     "x": 935.7146911621094,
670     "y": 381.66694355010986,
671     "z": "f7b8765.9d87788",
672     "wires": [
673       [
674         "d4d22841.f00eb8",
675         "cd48267e.9edf28",
676         "766aef68.e4df8",
677         "416674e0.73681c",
678         "793cd9f6.80cc58",
679         "702b3ce6.3adbe4"
680       ]
681     ]
682   },
683   {
684     "id": "e66294b6.7e7298",
685     "type": "block",
686     "name": "block : atomic",
687     "xml": "<block atomic=\"true\">",
688     "atomic": "true",
689     "outputs": 1,
690     "x": 1932.381404876709,
691     "y": 202.00004196166992,
692     "z": "f7b8765.9d87788",
693     "wires": [
694       [
695         "288cc13c.94077e"
696       ]
697     ]
698   },
699   {
700     "id": "288cc13c.94077e",
701     "type": "for",
702     "name": "for loop deviceidx - Get deviceId from servicedata",
703     "xml": "<for index=\"deviceidx\" start=\"0\" end=\"`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param_length`\">",
704     "comments": "",
705     "outputs": 1,
706     "x": 2213.7151584625244,
707     "y": 212.00006246566772,
708     "z": "f7b8765.9d87788",
709     "wires": [
710       [
711         "d7048ef8.65174"
712       ]
713     ]
714   },
715   {
716     "id": "d7048ef8.65174",
717     "type": "block",
718     "name": "block",
719     "xml": "<block>\n",
720     "atomic": "false",
721     "comments": "",
722     "outputs": 1,
723     "x": 2329.714942932129,
724     "y": 263.00024795532227,
725     "z": "f7b8765.9d87788",
726     "wires": [
727       [
728         "2e66cefe.b9e7b2"
729       ]
730     ]
731   },
732   {
733     "id": "2e66cefe.b9e7b2",
734     "type": "switchNode",
735     "name": "switch deviceId",
736     "xml": "<switch test=\"`$service-data.vnfs.vnf[$vidx].vnf-data.vnf-request-input.vnf-input-parameters.param[$deviceidx].name == 'deviceId'`\">\n",
737     "comments": "",
738     "outputs": 1,
739     "x": 2489.7151985168457,
740     "y": 265.00010108947754,
741     "z": "f7b8765.9d87788",
742     "wires": [
743       [
744         "302f3690.f9a14a"
745       ]
746     ]
747   },
748   {
749     "id": "302f3690.f9a14a",
750     "type": "outcomeTrue",
751     "name": "true",
752     "xml": "<outcome value='true'>\n",
753     "comments": "",
754     "outputs": 1,
755     "x": 2641.7153701782227,
756     "y": 264.00010108947754,
757     "z": "f7b8765.9d87788",
758     "wires": [
759       [
760         "35a2ea58.cd5716"
761       ]
762     ]
763   },
764   {
765     "id": "35a2ea58.cd5716",
766     "type": "set",
767     "name": "set deviceId",
768     "xml": "<set>\n<parameter name='prop.site.deviceId[$prop.site.deviceId_length]' value='`$service-data.vnfs.vnf[$vidx].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",
769     "comments": "",
770     "x": 2781.71537399292,
771     "y": 263.6000556945801,
772     "z": "f7b8765.9d87788",
773     "wires": []
774   },
775   {
776     "id": "aa1fa754.8a56c8",
777     "type": "set",
778     "name": "set prop.site.deviceId_length",
779     "xml": "<set>\n<parameter name='prop.site.deviceId_length' value='0' />\n",
780     "comments": "",
781     "x": 1257.7143669128418,
782     "y": 66.99999475479126,
783     "z": "f7b8765.9d87788",
784     "wires": []
785   },
786   {
787     "id": "3fda4a72.8f9396",
788     "type": "save",
789     "name": "update siteInstance configuration in AAI",
790     "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='generated-site-id' value='`$site-result.success[0].id`' /> \n<parameter name='operational-status' value='Active' />\n",
791     "comments": "",
792     "outputs": 1,
793     "x": 653.7144622802734,
794     "y": 631.0001573562622,
795     "z": "f7b8765.9d87788",
796     "wires": [
797       []
798     ]
799   },
800   {
801     "id": "b5ec2bbf.0ef568",
802     "type": "execute",
803     "name": "execute Properties",
804     "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",
805     "comments": "",
806     "outputs": 1,
807     "x": 596.7143325805664,
808     "y": 276.9999966621399,
809     "z": "f7b8765.9d87788",
810     "wires": [
811       []
812     ]
813   },
814   {
815     "id": "d4d22841.f00eb8",
816     "type": "set",
817     "name": "set siteId",
818     "xml": "<set>\n<parameter name='prop.site.siteId' value=\"\" />\n\n",
819     "comments": "",
820     "x": 1158.714599609375,
821     "y": 384.0000915527344,
822     "z": "f7b8765.9d87788",
823     "wires": []
824   },
825   {
826     "id": "c70c2471.2c7958",
827     "type": "block",
828     "name": "block : atomic",
829     "xml": "<block atomic=\"true\">",
830     "atomic": "true",
831     "outputs": 1,
832     "x": 2026.7144393920898,
833     "y": 75.65758037567139,
834     "z": "f7b8765.9d87788",
835     "wires": [
836       [
837         "9ba5f463.943968",
838         "32028fb9.746e",
839         "fb0b8823.b3d168"
840       ]
841     ]
842   },
843   {
844     "id": "32028fb9.746e",
845     "type": "set",
846     "name": "set vnf-request-input.",
847     "xml": "<set>\n<parameter name='vnf-request-input.' value='`$ctx.vnf-data.vnf-data.vnf-request-input.`' />\n\n",
848     "comments": "",
849     "x": 2279.04744720459,
850     "y": 92.65763568878174,
851     "z": "f7b8765.9d87788",
852     "wires": []
853   },
854   {
855     "id": "9ba5f463.943968",
856     "type": "set",
857     "name": "set tmp.vidx and ctx.vnf-data",
858     "xml": "<set>\n<parameter name='tmp.vidx' value='`$vidx`' />\n<parameter name='ctx.vnf-data.' value='`$service-data.vnfs.vnf[$vidx].`' />\n",
859     "comments": "",
860     "x": 2306.60115814209,
861     "y": 46,
862     "z": "f7b8765.9d87788",
863     "wires": []
864   },
865   {
866     "id": "fb0b8823.b3d168",
867     "type": "call",
868     "name": "call sdwan-get-site-param",
869     "xml": "<call module='GENERIC-RESOURCE-API' rpc='sdwan-get-site-param' mode='sync' >\n",
870     "comments": "",
871     "outputs": 1,
872     "x": 2277.6881256103516,
873     "y": 128.1071195602417,
874     "z": "f7b8765.9d87788",
875     "wires": [
876       []
877     ]
878   },
879   {
880     "id": "6f03dda4.fbdb64",
881     "type": "for",
882     "name": "for cpidx..prop.site.controlpoints",
883     "xml": "<for index='cpidx' start='0' end='`$prop.site.controlpoints_length`' >\n\t\t\t\t\t\t\t\t\t\n",
884     "comments": "",
885     "outputs": 1,
886     "x": 1240.7148895263672,
887     "y": 341.03131008148193,
888     "z": "f7b8765.9d87788",
889     "wires": [
890       [
891         "6ae2a7d2.64e9e8"
892       ]
893     ]
894   },
895   {
896     "id": "6ae2a7d2.64e9e8",
897     "type": "block",
898     "name": "block : atomic",
899     "xml": "<block atomic=\"true\">",
900     "atomic": "true",
901     "outputs": 1,
902     "x": 1447.7144165039062,
903     "y": 271.0312547683716,
904     "z": "f7b8765.9d87788",
905     "wires": [
906       [
907         "d5e8a02e.b6af9",
908         "f4a3ecf1.a3a47"
909       ]
910     ]
911   },
912   {
913     "id": "5d97713b.b0498",
914     "type": "block",
915     "name": "block : atomic",
916     "xml": "<block atomic=\"true\">",
917     "atomic": "true",
918     "outputs": 1,
919     "x": 1504.9644374847412,
920     "y": 112.00390911102295,
921     "z": "f7b8765.9d87788",
922     "wires": [
923       [
924         "5d333a67.ea5b04",
925         "473eb805.0b9488"
926       ]
927     ]
928   },
929   {
930     "id": "d5e8a02e.b6af9",
931     "type": "get-resource",
932     "name": "get-resource control pts for sideId",
933     "xml": "<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"site-resource\" \n\t\tkey=\"site-resource.site-resource-name = $prop.controlPtId AND \n\t\t     depth = '1'\"\n        pfx='tmp.aai.controlPoints' local-only='false' >\n\n",
934     "comments": "",
935     "outputs": 1,
936     "x": 1671.0439834594727,
937     "y": 296.0000762939453,
938     "z": "f7b8765.9d87788",
939     "wires": [
940       [
941         "3002f41f.7cb61c",
942         "9eec95b7.76f808"
943       ]
944     ]
945   },
946   {
947     "id": "545c41c0.800ed",
948     "type": "set",
949     "name": "set siteId in control point",
950     "xml": "<set>\n<parameter name='prop.site.controlpoints[$cpidx]' value='`$tmp.aai.controlPoints.generated-site-id`' />\n\n",
951     "comments": "",
952     "x": 2068.3771781921387,
953     "y": 266.0001964569092,
954     "z": "f7b8765.9d87788",
955     "wires": []
956   },
957   {
958     "id": "3002f41f.7cb61c",
959     "type": "success",
960     "name": "success",
961     "xml": "<outcome value='success'>\n",
962     "comments": "",
963     "outputs": 1,
964     "x": 1889.7108268737793,
965     "y": 265.0000743865967,
966     "z": "f7b8765.9d87788",
967     "wires": [
968       [
969         "545c41c0.800ed"
970       ]
971     ]
972   },
973   {
974     "id": "9eec95b7.76f808",
975     "type": "failure",
976     "name": "failure",
977     "xml": "<outcome value='failure'>\n",
978     "comments": "",
979     "outputs": 1,
980     "x": 1891.9606704711914,
981     "y": 303.6429605484009,
982     "z": "f7b8765.9d87788",
983     "wires": [
984       [
985         "aebaf4c.ab33d08"
986       ]
987     ]
988   },
989   {
990     "id": "aebaf4c.ab33d08",
991     "type": "block",
992     "name": "block",
993     "xml": "<block>\n",
994     "atomic": "false",
995     "comments": "",
996     "outputs": 1,
997     "x": 2032.3770179748535,
998     "y": 302.0000171661377,
999     "z": "f7b8765.9d87788",
1000     "wires": [
1001       []
1002     ]
1003   },
1004   {
1005     "id": "f4a3ecf1.a3a47",
1006     "type": "set",
1007     "name": "set prop.controlPtId",
1008     "xml": "<set>\n<parameter name='prop.controlPtId' value='`$prop.site.controlpoints[$cpidx]`' />\n\n",
1009     "comments": "",
1010     "x": 1632.7104873657227,
1011     "y": 236.0000114440918,
1012     "z": "f7b8765.9d87788",
1013     "wires": []
1014   },
1015   {
1016     "id": "793cd9f6.80cc58",
1017     "type": "call",
1018     "name": "call sdwan-get-tenant-auth",
1019     "xml": "<call module='GENERIC-RESOURCE-API' rpc='sdwan-get-tenant-auth' mode='sync' >\n",
1020     "comments": "",
1021     "outputs": 1,
1022     "x": 1203,
1023     "y": 614,
1024     "z": "f7b8765.9d87788",
1025     "wires": [
1026       []
1027     ]
1028   },
1029   {
1030     "id": "702b3ce6.3adbe4",
1031     "type": "switchNode",
1032     "name": "switch prop.site.controlpoints ",
1033     "xml": "<switch test=\"`$prop.site.controlPoint`\">\n\n",
1034     "comments": "",
1035     "outputs": 1,
1036     "x": 1098,
1037     "y": 224,
1038     "z": "f7b8765.9d87788",
1039     "wires": [
1040       [
1041         "4ac6f9a0.74a1d8",
1042         "b2aa5e32.50984"
1043       ]
1044     ]
1045   },
1046   {
1047     "id": "4ac6f9a0.74a1d8",
1048     "type": "other",
1049     "name": "Null",
1050     "xml": "<outcome value=''>\n",
1051     "comments": "",
1052     "outputs": 1,
1053     "x": 1294,
1054     "y": 197,
1055     "z": "f7b8765.9d87788",
1056     "wires": [
1057       [
1058         "d9d8dd65.e2446"
1059       ]
1060     ]
1061   },
1062   {
1063     "id": "b2aa5e32.50984",
1064     "type": "other",
1065     "name": "other",
1066     "xml": "<outcome value='Other'>\n",
1067     "comments": "",
1068     "outputs": 1,
1069     "x": 1286,
1070     "y": 246,
1071     "z": "f7b8765.9d87788",
1072     "wires": [
1073       [
1074         "d71ee31.658172"
1075       ]
1076     ]
1077   },
1078   {
1079     "id": "d9d8dd65.e2446",
1080     "type": "block",
1081     "name": "block",
1082     "xml": "<block>\n",
1083     "atomic": "false",
1084     "comments": "",
1085     "outputs": 1,
1086     "x": 1432,
1087     "y": 199,
1088     "z": "f7b8765.9d87788",
1089     "wires": [
1090       [
1091         "ca30cd8f.df3a"
1092       ]
1093     ]
1094   },
1095   {
1096     "id": "f1ac4b9c.e46258",
1097     "type": "comment",
1098     "name": "should be null in request",
1099     "info": "",
1100     "comments": "",
1101     "x": 1334.714584350586,
1102     "y": 384.00006771087646,
1103     "z": "f7b8765.9d87788",
1104     "wires": []
1105   },
1106   {
1107     "id": "ca30cd8f.df3a",
1108     "type": "set",
1109     "name": "set template file hub",
1110     "xml": "<set>\n<parameter name='template.site.role' value=\"hub\" />\n\n",
1111     "comments": "",
1112     "x": 1601.0039978027344,
1113     "y": 202.00392055511475,
1114     "z": "f7b8765.9d87788",
1115     "wires": []
1116   },
1117   {
1118     "id": "d71ee31.658172",
1119     "type": "block",
1120     "name": "block : atomic",
1121     "xml": "<block atomic=\"true\">",
1122     "atomic": "true",
1123     "outputs": 1,
1124     "x": 1095.003890991211,
1125     "y": 289.0039052963257,
1126     "z": "f7b8765.9d87788",
1127     "wires": [
1128       [
1129         "6f03dda4.fbdb64",
1130         "f3663259.ad67e"
1131       ]
1132     ]
1133   },
1134   {
1135     "id": "f3663259.ad67e",
1136     "type": "set",
1137     "name": "set template file spoke",
1138     "xml": "<set>\n<parameter name='template.site.role' value=\"spoke\" />\n\n",
1139     "comments": "",
1140     "x": 1275.00390625,
1141     "y": 308.0039129257202,
1142     "z": "f7b8765.9d87788",
1143     "wires": []
1144   }
1145 ]