Refactored SOTN and SDWAN DG
[sdnc/oam.git] / platform-logic / generic-resource-api / src / main / json / sdwan / GENERIC-RESOURCE-API_sdwan-network-topology-operation-activate.json
1 [
2   {
3     "id": "b728dcab.e2e08",
4     "type": "dgstart",
5     "name": "DGSTART",
6     "outputs": 1,
7     "x": 93,
8     "y": 47,
9     "z": "4c287bc.f107e84",
10     "wires": [
11       [
12         "f1013e83.11195"
13       ]
14     ]
15   },
16   {
17     "id": "f1013e83.11195",
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": 279.00000381469727,
26     "y": 119.0000171661377,
27     "z": "4c287bc.f107e84",
28     "wires": [
29       [
30         "4636719f.41274"
31       ]
32     ]
33   },
34   {
35     "id": "4636719f.41274",
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": 267.0001220703125,
42     "y": 207,
43     "z": "4c287bc.f107e84",
44     "wires": [
45       [
46         "c7a7aadf.8ed488"
47       ]
48     ]
49   },
50   {
51     "id": "c7a7aadf.8ed488",
52     "type": "block",
53     "name": "block : atomic",
54     "xml": "<block atomic=\"true\">\n",
55     "atomic": "false",
56     "comments": "",
57     "outputs": 1,
58     "x": 441.00001525878906,
59     "y": 315.0000591278076,
60     "z": "4c287bc.f107e84",
61     "wires": [
62       [
63         "98d3b92f.70fc48",
64         "189da6d2.5a6819",
65         "e988ff0f.b5aae",
66         "e4aad21c.e7ff7",
67         "39e02c84.3177e4",
68         "b96459be.6fd7a8",
69         "747d96dd.f43d58",
70         "39860903.53b456",
71         "69af4cc7.202f04",
72         "bc16f27b.ec50b",
73         "29cb6e2b.ecafd2",
74         "f71b9190.340d8",
75         "3eb35468.4702ac",
76         "d3877bd.f214188",
77         "73dbb3c3.f1d1fc",
78         "9bf6657f.dd37a8"
79       ]
80     ]
81   },
82   {
83     "id": "98d3b92f.70fc48",
84     "type": "call",
85     "name": "call GENERIC-RESOURCE-API:validate-sdwan-network-input-parameters",
86     "xml": "<call module='GENERIC-RESOURCE-API' rpc='validate-sdwan-network-input-parameters' mode='sync' >\n",
87     "comments": "",
88     "outputs": 1,
89     "x": 899.3889007568359,
90     "y": 64,
91     "z": "4c287bc.f107e84",
92     "wires": [
93       []
94     ]
95   },
96   {
97     "id": "189da6d2.5a6819",
98     "type": "record",
99     "name": "record",
100     "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",
101     "comments": "",
102     "outputs": 1,
103     "x": 699.5555992126465,
104     "y": 117.77785301208496,
105     "z": "4c287bc.f107e84",
106     "wires": [
107       []
108     ]
109   },
110   {
111     "id": "e988ff0f.b5aae",
112     "type": "set",
113     "name": "set networkId and network-object-path",
114     "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/'` \" />",
115     "comments": "",
116     "x": 786.5558776855469,
117     "y": 1040.313469171524,
118     "z": "4c287bc.f107e84",
119     "wires": []
120   },
121   {
122     "id": "e4aad21c.e7ff7",
123     "type": "returnSuccess",
124     "name": "return success",
125     "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",
126     "comments": "",
127     "x": 708.3336791992188,
128     "y": 1229.868889093399,
129     "z": "4c287bc.f107e84",
130     "wires": []
131   },
132   {
133     "id": "39e02c84.3177e4",
134     "type": "set",
135     "name": "set network-level-oper-status",
136     "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`' />",
137     "comments": "",
138     "x": 753.4447937011719,
139     "y": 1101.5356438159943,
140     "z": "4c287bc.f107e84",
141     "wires": []
142   },
143   {
144     "id": "b96459be.6fd7a8",
145     "type": "execute",
146     "name": "execute Properties",
147     "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",
148     "comments": "",
149     "outputs": 1,
150     "x": 731.8577041625977,
151     "y": 170.77788925170898,
152     "z": "4c287bc.f107e84",
153     "wires": [
154       []
155     ]
156   },
157   {
158     "id": "747d96dd.f43d58",
159     "type": "update",
160     "name": "update SDWAN VPN status to AAI",
161     "xml": "<update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='sdwan-vpn' \n      key='sdwan-vpn.sdwan-vpn-id = $network-topology-operation-input.network-information.network-id' >\n<parameter name='sdwan-vpn-id' value='`$network-topology-operation-input.network-information.network-id`' />\n<parameter name='operational-status' value='Active' />\n<parameter name='tenanat-id' value='`$prop.tenant-id`' />\n<parameter name='vpn-id' value='`$prop.vpn-id`' />",
162     "comments": "",
163     "outputs": 1,
164     "x": 770.6635093688965,
165     "y": 1164.2388553619385,
166     "z": "4c287bc.f107e84",
167     "wires": [
168       []
169     ]
170   },
171   {
172     "id": "39860903.53b456",
173     "type": "set",
174     "name": "set network in service-data",
175     "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.`' />",
176     "comments": "",
177     "x": 747.0004081726074,
178     "y": 987.0913031101227,
179     "z": "4c287bc.f107e84",
180     "wires": []
181   },
182   {
183     "id": "69af4cc7.202f04",
184     "type": "for",
185     "name": "for each network-input-parameters",
186     "xml": "<for index='idx' start='0' end='`$ctx.network-data.network-request-input.network-input-parameters.param_length`' >\n",
187     "comments": "",
188     "outputs": 1,
189     "x": 784,
190     "y": 241.00390753149986,
191     "z": "4c287bc.f107e84",
192     "wires": [
193       [
194         "e4f0bee4.ba4a3"
195       ]
196     ]
197   },
198   {
199     "id": "e4f0bee4.ba4a3",
200     "type": "block",
201     "name": "block",
202     "xml": "<block>\n",
203     "atomic": "false",
204     "comments": "",
205     "outputs": 1,
206     "x": 1040.8334312438965,
207     "y": 175.33725866675377,
208     "z": "4c287bc.f107e84",
209     "wires": [
210       [
211         "9e11c248.9eb9d",
212         "9793f672.805878"
213       ]
214     ]
215   },
216   {
217     "id": "9e11c248.9eb9d",
218     "type": "switchNode",
219     "name": "switch name",
220     "xml": "<switch test=\"`$ctx.network-data.network-request-input.network-input-parameters.param[$idx].name == 'name'`\">\n",
221     "comments": "",
222     "outputs": 1,
223     "x": 1231.8334922790527,
224     "y": 171.33729109168053,
225     "z": "4c287bc.f107e84",
226     "wires": [
227       [
228         "8c9ad24.52d233"
229       ]
230     ]
231   },
232   {
233     "id": "8c9ad24.52d233",
234     "type": "outcomeTrue",
235     "name": "true",
236     "xml": "<outcome value='true'>\n",
237     "comments": "",
238     "outputs": 1,
239     "x": 1405.8336181640625,
240     "y": 171.3372949063778,
241     "z": "4c287bc.f107e84",
242     "wires": [
243       [
244         "360dce92.bcd8b2"
245       ]
246     ]
247   },
248   {
249     "id": "360dce92.bcd8b2",
250     "type": "set",
251     "name": "set name",
252     "xml": "<set>\n<parameter name='prop.name' value='`$ctx.network-data.network-request-input.network-input-parameters.param[$idx].value`' />\n",
253     "comments": "",
254     "x": 1568.8335037231445,
255     "y": 170.93728956580162,
256     "z": "4c287bc.f107e84",
257     "wires": []
258   },
259   {
260     "id": "f71b9190.340d8",
261     "type": "get-resource",
262     "name": "get-resource esr-thirdparty-sdnc",
263     "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",
264     "comments": "",
265     "outputs": 1,
266     "x": 778,
267     "y": 350.00390625,
268     "z": "4c287bc.f107e84",
269     "wires": [
270       [
271         "35c5eced.422b74",
272         "5db3feca.9679c",
273         "84542dcd.8c846"
274       ]
275     ]
276   },
277   {
278     "id": "35c5eced.422b74",
279     "type": "success",
280     "name": "success",
281     "xml": "<outcome value='success'>\n",
282     "comments": "",
283     "outputs": 1,
284     "x": 1023,
285     "y": 296.00390753149986,
286     "z": "4c287bc.f107e84",
287     "wires": [
288       [
289         "b858bea3.dfbd9"
290       ]
291     ]
292   },
293   {
294     "id": "5db3feca.9679c",
295     "type": "not-found",
296     "name": "not-found",
297     "xml": "<outcome value='not-found'>\n",
298     "comments": "",
299     "outputs": 1,
300     "x": 1026.490966796875,
301     "y": 343.5779431760311,
302     "z": "4c287bc.f107e84",
303     "wires": [
304       [
305         "ea674168.c4155"
306       ]
307     ]
308   },
309   {
310     "id": "84542dcd.8c846",
311     "type": "other",
312     "name": "other",
313     "xml": "<outcome value='Other'>\n",
314     "comments": "",
315     "outputs": 1,
316     "x": 1021.823974609375,
317     "y": 384.91125616431236,
318     "z": "4c287bc.f107e84",
319     "wires": [
320       [
321         "95ebd94d.24be88"
322       ]
323     ]
324   },
325   {
326     "id": "b858bea3.dfbd9",
327     "type": "set",
328     "name": "set controller data",
329     "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",
330     "comments": "",
331     "x": 1220.5000610351562,
332     "y": 284.00390753149986,
333     "z": "4c287bc.f107e84",
334     "wires": []
335   },
336   {
337     "id": "ea674168.c4155",
338     "type": "returnFailure",
339     "name": "return failure",
340     "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",
341     "comments": "",
342     "x": 1203.0623779296875,
343     "y": 331.8636792600155,
344     "z": "4c287bc.f107e84",
345     "wires": []
346   },
347   {
348     "id": "95ebd94d.24be88",
349     "type": "returnFailure",
350     "name": "return failure",
351     "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",
352     "comments": "",
353     "x": 1209.5965309143066,
354     "y": 380.350448936224,
355     "z": "4c287bc.f107e84",
356     "wires": []
357   },
358   {
359     "id": "3eb35468.4702ac",
360     "type": "execute",
361     "name": "execute RestApiCallNode Get token",
362     "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\"/>",
363     "comments": "",
364     "outputs": 1,
365     "x": 786,
366     "y": 461.00390625,
367     "z": "4c287bc.f107e84",
368     "wires": [
369       [
370         "d801cca4.51d79",
371         "c1258051.e7f45"
372       ]
373     ]
374   },
375   {
376     "id": "d801cca4.51d79",
377     "type": "success",
378     "name": "success",
379     "xml": "<outcome value='success'>\n",
380     "comments": "",
381     "outputs": 1,
382     "x": 1025.000072479248,
383     "y": 439.00393772125244,
384     "z": "4c287bc.f107e84",
385     "wires": [
386       [
387         "f717dae9.6ebf18"
388       ]
389     ]
390   },
391   {
392     "id": "c1258051.e7f45",
393     "type": "failure",
394     "name": "failure",
395     "xml": "<outcome value='failure'>\n",
396     "comments": "",
397     "outputs": 1,
398     "x": 1017.250072479248,
399     "y": 492.6468210220337,
400     "z": "4c287bc.f107e84",
401     "wires": [
402       [
403         "d37810c8.811c7"
404       ]
405     ]
406   },
407   {
408     "id": "f717dae9.6ebf18",
409     "type": "set",
410     "name": "set token-id",
411     "xml": "<set>\n<parameter name='prop.sdncRestApi.token_id' value='`$token-result.data.token_id`' />\n",
412     "comments": "",
413     "x": 1175,
414     "y": 440.00390625,
415     "z": "4c287bc.f107e84",
416     "wires": []
417   },
418   {
419     "id": "d37810c8.811c7",
420     "type": "returnFailure",
421     "name": "return failure",
422     "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",
423     "comments": "",
424     "x": 1170.000072479248,
425     "y": 492.39688205718994,
426     "z": "4c287bc.f107e84",
427     "wires": []
428   },
429   {
430     "id": "9793f672.805878",
431     "type": "switchNode",
432     "name": "switch topology",
433     "xml": "<switch test=\"`$ctx.network-data.network-request-input.network-input-parameters.param[$idx].name == 'topology'`\">\n",
434     "comments": "",
435     "outputs": 1,
436     "x": 1230.25,
437     "y": 224.00390753149986,
438     "z": "4c287bc.f107e84",
439     "wires": [
440       [
441         "cfe36c58.4801f"
442       ]
443     ]
444   },
445   {
446     "id": "cfe36c58.4801f",
447     "type": "outcomeTrue",
448     "name": "true",
449     "xml": "<outcome value='true'>\n",
450     "comments": "",
451     "outputs": 1,
452     "x": 1404.2501258850098,
453     "y": 224.00391134619713,
454     "z": "4c287bc.f107e84",
455     "wires": [
456       [
457         "3cd1ca28.cc1526"
458       ]
459     ]
460   },
461   {
462     "id": "3cd1ca28.cc1526",
463     "type": "set",
464     "name": "set topology",
465     "xml": "<set>\n<parameter name='prop.topology' value='`$ctx.network-data.network-request-input.network-input-parameters.param[$idx].value`' />\n",
466     "comments": "",
467     "x": 1567.2500114440918,
468     "y": 223.60390600562096,
469     "z": "4c287bc.f107e84",
470     "wires": []
471   },
472   {
473     "id": "d3877bd.f214188",
474     "type": "block",
475     "name": "block : atomic",
476     "xml": "<block atomic=\"true\">\n",
477     "atomic": "false",
478     "comments": "",
479     "outputs": 1,
480     "x": 707.7500457763672,
481     "y": 707.0040292739868,
482     "z": "4c287bc.f107e84",
483     "wires": [
484       [
485         "7110150.fd1e8ec"
486       ]
487     ]
488   },
489   {
490     "id": "7110150.fd1e8ec",
491     "type": "execute",
492     "name": "execute RestApiCallNode Create network orchestration",
493     "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.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`\" />",
494     "comments": "",
495     "outputs": 1,
496     "x": 1028.2501525878906,
497     "y": 696.0041122436523,
498     "z": "4c287bc.f107e84",
499     "wires": [
500       []
501     ]
502   },
503   {
504     "id": "bc16f27b.ec50b",
505     "type": "block",
506     "name": "block : atomic",
507     "xml": "<block atomic=\"true\">\n",
508     "atomic": "false",
509     "comments": "",
510     "outputs": 1,
511     "x": 710.2500152587891,
512     "y": 769.0039575994015,
513     "z": "4c287bc.f107e84",
514     "wires": [
515       [
516         "39c058d0.1d59d8",
517         "4d96e12b.86876",
518         "50f144c4.b6b2ac"
519       ]
520     ]
521   },
522   {
523     "id": "4d96e12b.86876",
524     "type": "execute",
525     "name": "execute RestApiCallNode Create vpn",
526     "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/sdwan-vpn-create.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.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`\" />",
527     "comments": "",
528     "outputs": 1,
529     "x": 981.7500610351562,
530     "y": 759.0040815770626,
531     "z": "4c287bc.f107e84",
532     "wires": [
533       []
534     ]
535   },
536   {
537     "id": "39c058d0.1d59d8",
538     "type": "set",
539     "name": "set prop.vpn-id and prop.vpn1Id",
540     "xml": "<set>\n<parameter name='prop.vpn-id' value='`$vpn-result.success[0].id`' />\n<parameter name='prop.vpn1Id' value='`$vpn-result.success[0].id`' />\n",
541     "comments": "",
542     "x": 977.7502174377441,
543     "y": 811.0041809082031,
544     "z": "4c287bc.f107e84",
545     "wires": []
546   },
547   {
548     "id": "50f144c4.b6b2ac",
549     "type": "execute",
550     "name": "execute RestApiCallNode Create vpn topology",
551     "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/sdwan-vpn-topology-create.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.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`\" />",
552     "comments": "",
553     "outputs": 1,
554     "x": 1009.2500648498535,
555     "y": 863.0039558410645,
556     "z": "4c287bc.f107e84",
557     "wires": [
558       []
559     ]
560   },
561   {
562     "id": "29cb6e2b.ecafd2",
563     "type": "set",
564     "name": "set tenant-id to service-data",
565     "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_length' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param_length + 1`' />",
566     "comments": "",
567     "x": 745.2501525878906,
568     "y": 904.7540903091431,
569     "z": "4c287bc.f107e84",
570     "wires": []
571   },
572   {
573     "id": "9bf6657f.dd37a8",
574     "type": "get-resource",
575     "name": "get-resource service-subscription",
576     "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",
577     "comments": "",
578     "outputs": 1,
579     "x": 762.0715408325195,
580     "y": 611.6825218200684,
581     "z": "4c287bc.f107e84",
582     "wires": [
583       [
584         "fbe99e6e.4017e",
585         "457e75b8.5e8e7c"
586       ]
587     ]
588   },
589   {
590     "id": "ba35b9dd.539428",
591     "type": "switchNode",
592     "name": "switch temp-ub-sub-account-id",
593     "xml": "<switch test='`$tmp.AnAI-data.temp-ub-sub-account-id`'>\n",
594     "comments": "",
595     "outputs": 1,
596     "x": 1174.071632385254,
597     "y": 576.4326028823853,
598     "z": "4c287bc.f107e84",
599     "wires": [
600       [
601         "76b51f1a.0801",
602         "efbb35c.45c87c8"
603       ]
604     ]
605   },
606   {
607     "id": "76b51f1a.0801",
608     "type": "outcome",
609     "name": "NULL",
610     "xml": "<outcome value=''>",
611     "comments": "",
612     "outputs": 1,
613     "x": 1366.78609085083,
614     "y": 550.432635307312,
615     "z": "4c287bc.f107e84",
616     "wires": [
617       [
618         "a2a000be.ae6b"
619       ]
620     ]
621   },
622   {
623     "id": "efbb35c.45c87c8",
624     "type": "other",
625     "name": "Other",
626     "xml": "<outcome value='Other'>",
627     "comments": "",
628     "outputs": 1,
629     "x": 1367.071647644043,
630     "y": 605.4326066970825,
631     "z": "4c287bc.f107e84",
632     "wires": [
633       [
634         "864dc517.ee5aa8"
635       ]
636     ]
637   },
638   {
639     "id": "5407a489.2a82dc",
640     "type": "set",
641     "name": "set prop.tenant-id",
642     "xml": "<set>\n<parameter name='prop.tenant-id' value='`$tmp.AnAI-data.temp-ub-sub-account-id`' />\n",
643     "comments": "",
644     "x": 1614.5002403259277,
645     "y": 690.5754070281982,
646     "z": "4c287bc.f107e84",
647     "wires": []
648   },
649   {
650     "id": "a2a000be.ae6b",
651     "type": "block",
652     "name": "block : atomic",
653     "xml": "<block atomic=\"true\">\n",
654     "atomic": "false",
655     "comments": "",
656     "outputs": 1,
657     "x": 1506.2499885559082,
658     "y": 550.7539038658142,
659     "z": "4c287bc.f107e84",
660     "wires": [
661       [
662         "d533a7b3.2b7aa8",
663         "68abe37a.a97c3c",
664         "ebb2a924.447738",
665         "3179cec4.da2412",
666         "df370d35.edba",
667         "5f23c930.bf33c8",
668         "d5098f7f.2d7c"
669       ]
670     ]
671   },
672   {
673     "id": "3179cec4.da2412",
674     "type": "set",
675     "name": "set prop.customer-id",
676     "xml": "<set>\n<parameter name='prop.customer-id' value='`$ctx.network-data.service-information.global-customer-id`' />\n",
677     "comments": "",
678     "x": 1717.8930969238281,
679     "y": 361.3254642486572,
680     "z": "4c287bc.f107e84",
681     "wires": []
682   },
683   {
684     "id": "d533a7b3.2b7aa8",
685     "type": "execute",
686     "name": "execute RestApiCallNode Create tenant",
687     "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/tenants'`\" />\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=\"tenant-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`\" />",
688     "comments": "",
689     "outputs": 1,
690     "x": 1776.8929138183594,
691     "y": 491.89675521850586,
692     "z": "4c287bc.f107e84",
693     "wires": [
694       []
695     ]
696   },
697   {
698     "id": "68abe37a.a97c3c",
699     "type": "set",
700     "name": "set prop.tenant-id",
701     "xml": "<set>\n<parameter name='prop.tenant-id' value='`$tenant-result.data.tenantId`' />\n",
702     "comments": "",
703     "x": 1729.7502326965332,
704     "y": 616.753984451294,
705     "z": "4c287bc.f107e84",
706     "wires": []
707   },
708   {
709     "id": "ebb2a924.447738",
710     "type": "execute",
711     "name": "execute RestApiCallNode Create tenant auth",
712     "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/tenants/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.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`\" />",
713     "comments": "",
714     "outputs": 1,
715     "x": 1797.250228881836,
716     "y": 652.503984451294,
717     "z": "4c287bc.f107e84",
718     "wires": [
719       []
720     ]
721   },
722   {
723     "id": "df370d35.edba",
724     "type": "get-resource",
725     "name": "update-resource customer-id in service-subscription",
726     "xml": "<update 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='`$tenant-result.data.tenantId`' />\n<!--parameter name='temp-ub-sub-account-id' value='`$prop.customer-id`' /-->\n\n\n",
727     "comments": "",
728     "outputs": 1,
729     "x": 1821.1786041259766,
730     "y": 552.8968715667725,
731     "z": "4c287bc.f107e84",
732     "wires": [
733       []
734     ]
735   },
736   {
737     "id": "fbe99e6e.4017e",
738     "type": "success",
739     "name": "success",
740     "xml": "<outcome value='success'>\n",
741     "comments": "",
742     "outputs": 1,
743     "x": 972.571403503418,
744     "y": 584.4285802841187,
745     "z": "4c287bc.f107e84",
746     "wires": [
747       [
748         "ba35b9dd.539428"
749       ]
750     ]
751   },
752   {
753     "id": "457e75b8.5e8e7c",
754     "type": "failure",
755     "name": "failure",
756     "xml": "<outcome value='failure'>\n",
757     "comments": "",
758     "outputs": 1,
759     "x": 966.2499923706055,
760     "y": 636.6428918838501,
761     "z": "4c287bc.f107e84",
762     "wires": [
763       [
764         "df05b13b.b352c"
765       ]
766     ]
767   },
768   {
769     "id": "df05b13b.b352c",
770     "type": "returnFailure",
771     "name": "return failure",
772     "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",
773     "comments": "",
774     "x": 1118.9999923706055,
775     "y": 636.3929529190063,
776     "z": "4c287bc.f107e84",
777     "wires": []
778   },
779   {
780     "id": "73dbb3c3.f1d1fc",
781     "type": "set",
782     "name": "set  vpn-id to service-data",
783     "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='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].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 + 1`' />",
784     "comments": "",
785     "x": 743.5000762939453,
786     "y": 942.5039682388306,
787     "z": "4c287bc.f107e84",
788     "wires": []
789   },
790   {
791     "id": "864dc517.ee5aa8",
792     "type": "block",
793     "name": "block : atomic",
794     "xml": "<block atomic=\"true\">\n",
795     "atomic": "false",
796     "comments": "",
797     "outputs": 1,
798     "x": 1425.7224044799805,
799     "y": 688.5795984268188,
800     "z": "4c287bc.f107e84",
801     "wires": [
802       [
803         "5407a489.2a82dc",
804         "75fd5cb0.1720a4"
805       ]
806     ]
807   },
808   {
809     "id": "75fd5cb0.1720a4",
810     "type": "execute",
811     "name": "execute RestApiCallNode Create tenant auth",
812     "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/tenants/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.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`\" />",
813     "comments": "",
814     "outputs": 1,
815     "x": 1697.1510009765625,
816     "y": 737.1510009765625,
817     "z": "4c287bc.f107e84",
818     "wires": [
819       []
820     ]
821   },
822   {
823     "id": "5f23c930.bf33c8",
824     "type": "set",
825     "name": "set prop.userAccount",
826     "xml": "<set>\n<parameter name='prop.userAccount' value='`$tmp.userAccountEmail`' />\n<parameter name='prop.userEmail' value='`$tmp.userAccountEmail`' />",
827     "comments": "",
828     "x": 1718,
829     "y": 439,
830     "z": "4c287bc.f107e84",
831     "wires": []
832   },
833   {
834     "id": "d5098f7f.2d7c",
835     "type": "execute",
836     "name": "execute concat customer-id and @test.com",
837     "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='concat' >\n    <parameter name=\"source\" value='`$prop.customer-id`'/>\n    <parameter name=\"outputPath\" value=\"tmp.userAccountEmail\"/>\n    <parameter name=\"target\" value=\"@test.com\"/>\n\n\n",
838     "comments": "",
839     "outputs": 1,
840     "x": 1793.0038757324219,
841     "y": 403.003942489624,
842     "z": "4c287bc.f107e84",
843     "wires": [
844       []
845     ]
846   }
847 ]