SDWAN WAN Attach site addition
[sdnc/oam.git] / platform-logic / generic-resource-api / src / main / json / GENERIC-RESOURCE-API_sdwan-network-topology-operation-activate.json
1 [
2   {
3     "id": "4ddcb062.8ecdb",
4     "type": "dgstart",
5     "name": "DGSTART",
6     "outputs": 1,
7     "x": 88.03125,
8     "y": 50.03125,
9     "z": "28e3f0b9.24cf2",
10     "wires": [
11       [
12         "596e35be.20cc4c"
13       ]
14     ]
15   },
16   {
17     "id": "596e35be.20cc4c",
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": 274.03125381469727,
26     "y": 122.0312671661377,
27     "z": "28e3f0b9.24cf2",
28     "wires": [
29       [
30         "c01d9d60.83407"
31       ]
32     ]
33   },
34   {
35     "id": "c01d9d60.83407",
36     "type": "method",
37     "name": "method sdwan-network-topology-operation-activate",
38     "xml": "<method rpc='sdwan-network-topology-operation-activate' mode='sync'>\n",
39     "comments": "",
40     "outputs": 1,
41     "x": 262.0313720703125,
42     "y": 210.03125,
43     "z": "28e3f0b9.24cf2",
44     "wires": [
45       [
46         "18ab359f.ed0fba"
47       ]
48     ]
49   },
50   {
51     "id": "18ab359f.ed0fba",
52     "type": "block",
53     "name": "block : atomic",
54     "xml": "<block atomic=\"true\">\n",
55     "atomic": "false",
56     "comments": "",
57     "outputs": 1,
58     "x": 436.03126525878906,
59     "y": 318.0313091278076,
60     "z": "28e3f0b9.24cf2",
61     "wires": [
62       [
63         "c561faa1.7d7778",
64         "6dc01778.009fd8",
65         "da487e61.56608",
66         "c6b01240.db33",
67         "3f3b0e5f.2cbb02",
68         "98c44abf.148e28",
69         "21c2ad92.7e1fb2",
70         "2511a75a.f0a8b8",
71         "1ae62a5a.18e726",
72         "fc4fc9d4.5f3178",
73         "3bff9e87.90adb2",
74         "3355eb7a.3cf5b4",
75         "fce8b550.d12f88",
76         "cc83cf92.13ac4",
77         "5ff87b45.2a9d04"
78       ]
79     ]
80   },
81   {
82     "id": "c561faa1.7d7778",
83     "type": "call",
84     "name": "call GENERIC-RESOURCE-API:validate-sdwan-network-input-parameters",
85     "xml": "<call module='GENERIC-RESOURCE-API' rpc='validate-sdwan-network-input-parameters' mode='sync' >\n",
86     "comments": "",
87     "outputs": 1,
88     "x": 894.4201507568359,
89     "y": 67.03125,
90     "z": "28e3f0b9.24cf2",
91     "wires": [
92       []
93     ]
94   },
95   {
96     "id": "6dc01778.009fd8",
97     "type": "record",
98     "name": "record",
99     "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-network-topology-operation-activate\"/>\n<parameter name=\"field3\" value=\"SDWAN-Activate\"/>\n",
100     "comments": "",
101     "outputs": 1,
102     "x": 694.5868492126465,
103     "y": 120.80910301208496,
104     "z": "28e3f0b9.24cf2",
105     "wires": [
106       []
107     ]
108   },
109   {
110     "id": "da487e61.56608",
111     "type": "set",
112     "name": "set networkId and network-object-path",
113     "xml": "<set>\n<parameter name='networkId' value='`$network-topology-operation-input.network-information.network-id`' />\n<parameter name=\"network-object-path\" value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'  + $network-topology-operation-input.service-information.service-instance-id  + '/service-data/networks/network/'  + $network-topology-operation-input.network-information.network-id  + '/network-data/'` \" />",
114     "comments": "",
115     "x": 781.5871276855469,
116     "y": 1043.344719171524,
117     "z": "28e3f0b9.24cf2",
118     "wires": []
119   },
120   {
121     "id": "c6b01240.db33",
122     "type": "returnSuccess",
123     "name": "return success",
124     "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",
125     "comments": "",
126     "x": 703.3649291992188,
127     "y": 1232.900139093399,
128     "z": "28e3f0b9.24cf2",
129     "wires": []
130   },
131   {
132     "id": "3f3b0e5f.2cbb02",
133     "type": "set",
134     "name": "set network-level-oper-status",
135     "xml": "<set>\n<parameter name='service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status' value='Active' />\n<parameter name='service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.last-rpc-action' value='`$network-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.last-action' value='`$network-topology-operation-input.request-information.request-action`' />",
136     "comments": "",
137     "x": 748.4760437011719,
138     "y": 1104.5668938159943,
139     "z": "28e3f0b9.24cf2",
140     "wires": []
141   },
142   {
143     "id": "98c44abf.148e28",
144     "type": "execute",
145     "name": "execute Properties",
146     "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",
147     "comments": "",
148     "outputs": 1,
149     "x": 726.8889541625977,
150     "y": 173.80913925170898,
151     "z": "28e3f0b9.24cf2",
152     "wires": [
153       []
154     ]
155   },
156   {
157     "id": "21c2ad92.7e1fb2",
158     "type": "update",
159     "name": "update SDWAN VPN status to AAI",
160     "xml": "<update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='sdwan-vpn' \n      key='sdwan-vpn.id = $network-topology-operation-input.network-information.network-id' >\n<parameter name='id' value='`$network-topology-operation-input.network-information.network-id`' />\n<parameter name='operational-status' value='Active' />\n<parameter name='tenanatId' value='`$prop.tenant-id`' />\n<parameter name='vpn-id' value='`$prop.vpn-id`' />",
161     "comments": "",
162     "outputs": 1,
163     "x": 765.6947593688965,
164     "y": 1167.2701053619385,
165     "z": "28e3f0b9.24cf2",
166     "wires": [
167       []
168     ]
169   },
170   {
171     "id": "2511a75a.f0a8b8",
172     "type": "set",
173     "name": "set network in service-data",
174     "xml": "<set>\n<parameter name='service-data.networks.network[$tmp.nidx].network-data.sdnc-request-header.' value='`$network-topology-operation-input.sdnc-request-header.`' />\n<parameter name='service-data.networks.network[$tmp.nidx].network-data.request-information.' value='`$network-topology-operation-input.request-information.`' />\n<parameter name='service-data.networks.network[$tmp.nidx].network-data.service-information.' value='`$network-topology-operation-input.service-information.`' />\n<parameter name='service-data.networks.network[$tmp.nidx].network-data.network-information.' value='`$network-topology-operation-input.network-information.`' />",
175     "comments": "",
176     "x": 742.0316581726074,
177     "y": 990.1225531101227,
178     "z": "28e3f0b9.24cf2",
179     "wires": []
180   },
181   {
182     "id": "1ae62a5a.18e726",
183     "type": "for",
184     "name": "for each network-input-parameters",
185     "xml": "<for index='idx' start='0' end='`$ctx.network-data.network-request-input.network-input-parameters.param_length`' >\n",
186     "comments": "",
187     "outputs": 1,
188     "x": 779.03125,
189     "y": 244.03515753149986,
190     "z": "28e3f0b9.24cf2",
191     "wires": [
192       [
193         "b794657d.4da128"
194       ]
195     ]
196   },
197   {
198     "id": "b794657d.4da128",
199     "type": "block",
200     "name": "block",
201     "xml": "<block>\n",
202     "atomic": "false",
203     "comments": "",
204     "outputs": 1,
205     "x": 1035.8646812438965,
206     "y": 178.36850866675377,
207     "z": "28e3f0b9.24cf2",
208     "wires": [
209       [
210         "53501d6c.c520f4",
211         "e1341c8f.56768"
212       ]
213     ]
214   },
215   {
216     "id": "53501d6c.c520f4",
217     "type": "switchNode",
218     "name": "switch name",
219     "xml": "<switch test=\"`$ctx.network-data.network-request-input.network-input-parameters.param[$idx].name == 'name'`\">\n",
220     "comments": "",
221     "outputs": 1,
222     "x": 1226.8647422790527,
223     "y": 174.36854109168053,
224     "z": "28e3f0b9.24cf2",
225     "wires": [
226       [
227         "2cafaedf.cedf32"
228       ]
229     ]
230   },
231   {
232     "id": "2cafaedf.cedf32",
233     "type": "outcomeTrue",
234     "name": "true",
235     "xml": "<outcome value='true'>\n",
236     "comments": "",
237     "outputs": 1,
238     "x": 1400.8648681640625,
239     "y": 174.3685449063778,
240     "z": "28e3f0b9.24cf2",
241     "wires": [
242       [
243         "529c0b0c.8d2074"
244       ]
245     ]
246   },
247   {
248     "id": "529c0b0c.8d2074",
249     "type": "set",
250     "name": "set name",
251     "xml": "<set>\n<parameter name='prop.name' value='`$ctx.network-data.network-request-input.network-input-parameters.param[$idx].value`' />\n",
252     "comments": "",
253     "x": 1563.8647537231445,
254     "y": 173.96853956580162,
255     "z": "28e3f0b9.24cf2",
256     "wires": []
257   },
258   {
259     "id": "fce8b550.d12f88",
260     "type": "get-resource",
261     "name": "get-resource esr-thirdparty-sdnc",
262     "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",
263     "comments": "",
264     "outputs": 1,
265     "x": 773.03125,
266     "y": 353.03515753149986,
267     "z": "28e3f0b9.24cf2",
268     "wires": [
269       [
270         "9b25121d.283a4",
271         "385f822e.d7b4ae",
272         "f3914c31.422ce"
273       ]
274     ]
275   },
276   {
277     "id": "9b25121d.283a4",
278     "type": "success",
279     "name": "success",
280     "xml": "<outcome value='success'>\n",
281     "comments": "",
282     "outputs": 1,
283     "x": 1018.03125,
284     "y": 299.03515753149986,
285     "z": "28e3f0b9.24cf2",
286     "wires": [
287       [
288         "f386956a.705be8"
289       ]
290     ]
291   },
292   {
293     "id": "385f822e.d7b4ae",
294     "type": "not-found",
295     "name": "not-found",
296     "xml": "<outcome value='not-found'>\n",
297     "comments": "",
298     "outputs": 1,
299     "x": 1021.522216796875,
300     "y": 346.6091931760311,
301     "z": "28e3f0b9.24cf2",
302     "wires": [
303       [
304         "e34bc405.635f88"
305       ]
306     ]
307   },
308   {
309     "id": "f3914c31.422ce",
310     "type": "other",
311     "name": "other",
312     "xml": "<outcome value='Other'>\n",
313     "comments": "",
314     "outputs": 1,
315     "x": 1016.855224609375,
316     "y": 387.94250616431236,
317     "z": "28e3f0b9.24cf2",
318     "wires": [
319       [
320         "799bf116.3f716"
321       ]
322     ]
323   },
324   {
325     "id": "f386956a.705be8",
326     "type": "set",
327     "name": "set controller data",
328     "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",
329     "comments": "",
330     "x": 1215.5313110351562,
331     "y": 287.03515753149986,
332     "z": "28e3f0b9.24cf2",
333     "wires": []
334   },
335   {
336     "id": "e34bc405.635f88",
337     "type": "returnFailure",
338     "name": "return failure",
339     "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",
340     "comments": "",
341     "x": 1198.0936279296875,
342     "y": 334.8949292600155,
343     "z": "28e3f0b9.24cf2",
344     "wires": []
345   },
346   {
347     "id": "799bf116.3f716",
348     "type": "returnFailure",
349     "name": "return failure",
350     "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",
351     "comments": "",
352     "x": 1204.6277809143066,
353     "y": 383.381698936224,
354     "z": "28e3f0b9.24cf2",
355     "wires": []
356   },
357   {
358     "id": "cc83cf92.13ac4",
359     "type": "execute",
360     "name": "execute RestApiCallNode Get token",
361     "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\"/>",
362     "comments": "",
363     "outputs": 1,
364     "x": 781.03125,
365     "y": 464.03515753149986,
366     "z": "28e3f0b9.24cf2",
367     "wires": [
368       [
369         "de360ea0.df86c",
370         "8ab64288.ec606"
371       ]
372     ]
373   },
374   {
375     "id": "de360ea0.df86c",
376     "type": "success",
377     "name": "success",
378     "xml": "<outcome value='success'>\n",
379     "comments": "",
380     "outputs": 1,
381     "x": 1020.031322479248,
382     "y": 442.03518772125244,
383     "z": "28e3f0b9.24cf2",
384     "wires": [
385       [
386         "d8a5f197.3daff"
387       ]
388     ]
389   },
390   {
391     "id": "8ab64288.ec606",
392     "type": "failure",
393     "name": "failure",
394     "xml": "<outcome value='failure'>\n",
395     "comments": "",
396     "outputs": 1,
397     "x": 1012.281322479248,
398     "y": 495.6780710220337,
399     "z": "28e3f0b9.24cf2",
400     "wires": [
401       [
402         "761741d1.08b81"
403       ]
404     ]
405   },
406   {
407     "id": "d8a5f197.3daff",
408     "type": "set",
409     "name": "set token-id",
410     "xml": "<set>\n<parameter name='prop.sdncRestApi.token_id' value='`$token-result.data.token_id`' />\n",
411     "comments": "",
412     "x": 1170.03125,
413     "y": 443.03515753149986,
414     "z": "28e3f0b9.24cf2",
415     "wires": []
416   },
417   {
418     "id": "761741d1.08b81",
419     "type": "returnFailure",
420     "name": "return failure",
421     "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 get token rest api\" />\n",
422     "comments": "",
423     "x": 1165.031322479248,
424     "y": 495.42813205718994,
425     "z": "28e3f0b9.24cf2",
426     "wires": []
427   },
428   {
429     "id": "e1341c8f.56768",
430     "type": "switchNode",
431     "name": "switch topology",
432     "xml": "<switch test=\"`$ctx.network-data.network-request-input.network-input-parameters.param[$idx].name == 'topology'`\">\n",
433     "comments": "",
434     "outputs": 1,
435     "x": 1225.28125,
436     "y": 227.03515753149986,
437     "z": "28e3f0b9.24cf2",
438     "wires": [
439       [
440         "abb60c8f.8ac5f"
441       ]
442     ]
443   },
444   {
445     "id": "abb60c8f.8ac5f",
446     "type": "outcomeTrue",
447     "name": "true",
448     "xml": "<outcome value='true'>\n",
449     "comments": "",
450     "outputs": 1,
451     "x": 1399.2813758850098,
452     "y": 227.03516134619713,
453     "z": "28e3f0b9.24cf2",
454     "wires": [
455       [
456         "36b54251.f429ce"
457       ]
458     ]
459   },
460   {
461     "id": "36b54251.f429ce",
462     "type": "set",
463     "name": "set topology",
464     "xml": "<set>\n<parameter name='prop.topology' value='`$ctx.network-data.network-request-input.network-input-parameters.param[$idx].value`' />\n",
465     "comments": "",
466     "x": 1562.2812614440918,
467     "y": 226.63515600562096,
468     "z": "28e3f0b9.24cf2",
469     "wires": []
470   },
471   {
472     "id": "5ff87b45.2a9d04",
473     "type": "block",
474     "name": "block : atomic",
475     "xml": "<block atomic=\"true\">\n",
476     "atomic": "false",
477     "comments": "",
478     "outputs": 1,
479     "x": 702.7812957763672,
480     "y": 710.0352792739868,
481     "z": "28e3f0b9.24cf2",
482     "wires": [
483       [
484         "34512469.61377c"
485       ]
486     ]
487   },
488   {
489     "id": "34512469.61377c",
490     "type": "execute",
491     "name": "execute RestApiCallNode Create network orchestration",
492     "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/sdwan-network-orchestration.json'`\" />\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/campus/v1/sdwan/net/network-orchestration-resources'`\" />\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=\"put\"/>\n<parameter name=\"responsePrefix\" value=\"orchestration-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`\" />",
493     "comments": "",
494     "outputs": 1,
495     "x": 1023.2814025878906,
496     "y": 699.0353622436523,
497     "z": "28e3f0b9.24cf2",
498     "wires": [
499       []
500     ]
501   },
502   {
503     "id": "fc4fc9d4.5f3178",
504     "type": "block",
505     "name": "block : atomic",
506     "xml": "<block atomic=\"true\">\n",
507     "atomic": "false",
508     "comments": "",
509     "outputs": 1,
510     "x": 705.2812652587891,
511     "y": 772.0352075994015,
512     "z": "28e3f0b9.24cf2",
513     "wires": [
514       [
515         "dcf83ef9.92d4e",
516         "6fd086ba.35f488",
517         "ccbce6bf.529778"
518       ]
519     ]
520   },
521   {
522     "id": "6fd086ba.35f488",
523     "type": "execute",
524     "name": "execute RestApiCallNode Create vpn",
525     "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/sdwan-vpn.json'`\" />\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/campus/v1/sdwan/overlay-network/vpn'`\" />\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=\"vpn-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`\" />",
526     "comments": "",
527     "outputs": 1,
528     "x": 976.7813110351562,
529     "y": 762.0353315770626,
530     "z": "28e3f0b9.24cf2",
531     "wires": [
532       []
533     ]
534   },
535   {
536     "id": "dcf83ef9.92d4e",
537     "type": "set",
538     "name": "set prop.vpn-id and prop.vpn1Id",
539     "xml": "<set>\n<!--parameter name='prop.vpn-id' value='`$vpn-result.id`' />\n<parameter name='prop.vpn1Id' value='`$vpn-result.id`' /-->\n\n<parameter name='prop.vpn-id' value='10' />\n<parameter name='prop.vpn1Id' value='10' />\n",
540     "comments": "",
541     "x": 972.7814674377441,
542     "y": 814.0354309082031,
543     "z": "28e3f0b9.24cf2",
544     "wires": []
545   },
546   {
547     "id": "ccbce6bf.529778",
548     "type": "execute",
549     "name": "execute RestApiCallNode Create vpn topology",
550     "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/sdwan-vpn-topology.json'`\" />\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/campus/v1/sdwan/overlay-network/' + $prop.vpn-id + '/topology'`\" />\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=\"vpn-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`\" />",
551     "comments": "",
552     "outputs": 1,
553     "x": 1004.2813148498535,
554     "y": 866.0352058410645,
555     "z": "28e3f0b9.24cf2",
556     "wires": [
557       []
558     ]
559   },
560   {
561     "id": "3bff9e87.90adb2",
562     "type": "set",
563     "name": "set tenant-id and vpn-id to service-data",
564     "xml": "<set>\n<parameter name='service-data.networks.network[$tmp.nidx].network-data.network-request-input.network-input-parameters.param[$network-topology-operation-input.network-request-input.network-input-parameters.param_length].name' value='tenant-id' />\n<parameter name='service-data.networks.network[$tmp.nidx].network-data.network-request-input.network-input-parameters.param[$network-topology-operation-input.network-request-input.network-input-parameters.param_length].value' value='`$prop.tenant-id`' />\n<parameter name='service-data.networks.network[$tmp.nidx].network-data.network-request-input.network-input-parameters.param[$network-topology-operation-input.network-request-input.network-input-parameters.param_length + 1].name' value='vpn-id' />\n<parameter name='service-data.networks.network[$tmp.nidx].network-data.network-request-input.network-input-parameters.param[$network-topology-operation-input.network-request-input.network-input-parameters.param_length + 1].value' value='`$prop.vpn-id`' />\n<parameter name='service-data.networks.network[$tmp.nidx].network-data.network-request-input.network-input-parameters.param_length' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param_length + 2`' />",
565     "comments": "",
566     "x": 784.2812538146973,
567     "y": 935.7852268218994,
568     "z": "28e3f0b9.24cf2",
569     "wires": []
570   },
571   {
572     "id": "3355eb7a.3cf5b4",
573     "type": "get-resource",
574     "name": "get-resource service-subscription",
575     "xml": "<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"service-subscription\" \n        key= 'service-subscription.service-type = $service-data.networks.network[$tmp.nidx].network-data.service-information.subscription-service-type \n        AND customer.global-customer-id = $service-data.networks.network[$tmp.nidx].network-data.service-information.global-customer-id'\n      force=\"true\" pfx=\"tmp.AnAI-data\">\n      \n",
576     "comments": "",
577     "outputs": 1,
578     "x": 758.5313873291016,
579     "y": 613.2851915359497,
580     "z": "28e3f0b9.24cf2",
581     "wires": [
582       [
583         "edc9287a.cc5518",
584         "5b0f29d9.42a638"
585       ]
586     ]
587   },
588   {
589     "id": "a1fba96c.417d58",
590     "type": "switchNode",
591     "name": "switch temp-ub-sub-account-id",
592     "xml": "<switch test='`$tmp.AnAI-data.temp-ub-sub-account-id`'>\n",
593     "comments": "",
594     "outputs": 1,
595     "x": 1170.531478881836,
596     "y": 578.0352725982666,
597     "z": "28e3f0b9.24cf2",
598     "wires": [
599       [
600         "e5d2c50b.cba8f8",
601         "21c5a234.6190ae"
602       ]
603     ]
604   },
605   {
606     "id": "e5d2c50b.cba8f8",
607     "type": "outcome",
608     "name": "NULL",
609     "xml": "<outcome value=''>",
610     "comments": "",
611     "outputs": 1,
612     "x": 1363.2459297180176,
613     "y": 552.0353136062622,
614     "z": "28e3f0b9.24cf2",
615     "wires": [
616       [
617         "f0651115.93559"
618       ]
619     ]
620   },
621   {
622     "id": "21c5a234.6190ae",
623     "type": "other",
624     "name": "Other",
625     "xml": "<outcome value='Other'>",
626     "comments": "",
627     "outputs": 1,
628     "x": 1363.531494140625,
629     "y": 607.0352764129639,
630     "z": "28e3f0b9.24cf2",
631     "wires": [
632       [
633         "867c2305.719d4"
634       ]
635     ]
636   },
637   {
638     "id": "867c2305.719d4",
639     "type": "set",
640     "name": "set prop.tenant-id",
641     "xml": "<set>\n<parameter name='prop.tenant-id' value='`$tmp.AnAI-data.temp-ub-sub-account-id`' />\n",
642     "comments": "",
643     "x": 1519.5316696166992,
644     "y": 665.0351943969727,
645     "z": "28e3f0b9.24cf2",
646     "wires": []
647   },
648   {
649     "id": "f0651115.93559",
650     "type": "block",
651     "name": "block : atomic",
652     "xml": "<block atomic=\"true\">\n",
653     "atomic": "false",
654     "comments": "",
655     "outputs": 1,
656     "x": 1501.2812385559082,
657     "y": 553.7851538658142,
658     "z": "28e3f0b9.24cf2",
659     "wires": [
660       [
661         "369b1850.33da28",
662         "6de36f9a.0a191",
663         "1299a0cc.66391f",
664         "8cc3c364.b95fb",
665         "c1785bc5.472658"
666       ]
667     ]
668   },
669   {
670     "id": "8cc3c364.b95fb",
671     "type": "set",
672     "name": "set prop.customer-id",
673     "xml": "<set>\n<parameter name='prop.customer-id' value='`$ctx.network-data.service-information.global-customer-id`' />\n",
674     "comments": "",
675     "x": 1716.7815170288086,
676     "y": 490.78530991077423,
677     "z": "28e3f0b9.24cf2",
678     "wires": []
679   },
680   {
681     "id": "369b1850.33da28",
682     "type": "execute",
683     "name": "execute RestApiCallNode Create tenant",
684     "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/sdwan-tenant.json'`\" />\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/campus/v1/baseservice/tenanats'`\" />\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=\"put\"/>\n<parameter name=\"responsePrefix\" value=\"tenant-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`\" />",
685     "comments": "",
686     "outputs": 1,
687     "x": 1774.78125,
688     "y": 567.785163551569,
689     "z": "28e3f0b9.24cf2",
690     "wires": [
691       []
692     ]
693   },
694   {
695     "id": "6de36f9a.0a191",
696     "type": "set",
697     "name": "set prop.tenant-id",
698     "xml": "<set>\n<parameter name='prop.tenant-id' value='`$tenant-result.data.tenantId`' />\n",
699     "comments": "",
700     "x": 1724.7814826965332,
701     "y": 619.785234451294,
702     "z": "28e3f0b9.24cf2",
703     "wires": []
704   },
705   {
706     "id": "1299a0cc.66391f",
707     "type": "execute",
708     "name": "execute RestApiCallNode Create tenant auth",
709     "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/campus/v1/baseservice/tenanats/authorization/' + $prop.tenant-id`\" />\n<parameter name=\"restapiUser\" value=\"`$prop.sdncRestApi.thirdpartySdnc.user`\" />\n<parameter name=\"restapiPassword\" value=\"`$prop.sdncRestApi.thirdpartySdnc.password`\" />\n<parameter name=\"format\" value=\"json\"/>\n<parameter name=\"httpMethod\" value=\"put\"/>\n<parameter name=\"responsePrefix\" value=\"tenant-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`\" />",
710     "comments": "",
711     "outputs": 1,
712     "x": 1792.281478881836,
713     "y": 655.535234451294,
714     "z": "28e3f0b9.24cf2",
715     "wires": [
716       []
717     ]
718   },
719   {
720     "id": "c1785bc5.472658",
721     "type": "get-resource",
722     "name": "save-resource customer-id in service-subscription",
723     "xml": "<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\t\tresource=\"service-subscription\" \n        key= 'service-subscription.service-type = $service-data.networks.network[$tmp.nidx].network-data.service-information.subscription-service-type \n        AND customer.global-customer-id = $service-data.networks.network[$tmp.nidx].network-data.service-information.global-customer-id'>\n<parameter name='temp-ub-sub-account-id' value='`$prop.customer-id`' />\n\n",
724     "comments": "",
725     "outputs": 1,
726     "x": 1794.7813568115234,
727     "y": 528.7853126525879,
728     "z": "28e3f0b9.24cf2",
729     "wires": [
730       []
731     ]
732   },
733   {
734     "id": "edc9287a.cc5518",
735     "type": "success",
736     "name": "success",
737     "xml": "<outcome value='success'>\n",
738     "comments": "",
739     "outputs": 1,
740     "x": 969.03125,
741     "y": 586.03125,
742     "z": "28e3f0b9.24cf2",
743     "wires": [
744       [
745         "a1fba96c.417d58"
746       ]
747     ]
748   },
749   {
750     "id": "5b0f29d9.42a638",
751     "type": "failure",
752     "name": "failure",
753     "xml": "<outcome value='failure'>\n",
754     "comments": "",
755     "outputs": 1,
756     "x": 961.28125,
757     "y": 639.6741333007812,
758     "z": "28e3f0b9.24cf2",
759     "wires": [
760       [
761         "406169f1.4046c8"
762       ]
763     ]
764   },
765   {
766     "id": "406169f1.4046c8",
767     "type": "returnFailure",
768     "name": "return failure",
769     "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 get token rest api\" />\n",
770     "comments": "",
771     "x": 1114.03125,
772     "y": 639.4241943359375,
773     "z": "28e3f0b9.24cf2",
774     "wires": []
775   }
776 ]