Merge "Notification Sub-DG with Restconf discovery node"
[sdnc/oam.git] / platform-logic / datachange / src / main / json / DataChange_esr-thirdparty-sdnc-discovery.json
1 [
2     {
3         "id": "197ffd5b.105fa3",
4         "type": "other",
5         "name": "update",
6         "xml": "<outcome value='Update'>\n",
7         "comments": "",
8         "outputs": 1,
9         "x": 310,
10         "y": 360,
11         "z": "a54d391e.88f7d8",
12         "wires": [
13             [
14                 "8298d18a.63e4b"
15             ]
16         ]
17     },
18     {
19         "id": "3bcc844d.917dbc",
20         "type": "other",
21         "name": "delete",
22         "xml": "<outcome value='delete'>\n",
23         "comments": "",
24         "outputs": 1,
25         "x": 310,
26         "y": 440,
27         "z": "a54d391e.88f7d8",
28         "wires": [
29             [
30                 "9a40237.2d204e"
31             ]
32         ]
33     },
34     {
35         "id": "9a40237.2d204e",
36         "type": "block",
37         "name": "block : atomic",
38         "xml": "<block atomic=\"true\">",
39         "atomic": "true",
40         "outputs": 1,
41         "x": 451.5,
42         "y": 440,
43         "z": "a54d391e.88f7d8",
44         "wires": [
45             []
46         ]
47     },
48     {
49         "id": "7bf268a7.980d48",
50         "type": "comment",
51         "name": "TODO: Delete topology from AAI",
52         "info": "",
53         "comments": "",
54         "x": 384.3335189819336,
55         "y": 407.96899485588074,
56         "z": "a54d391e.88f7d8",
57         "wires": []
58     },
59     {
60         "id": "9d107456.f08fe8",
61         "type": "switchNode",
62         "name": "switch aai-event-trigger",
63         "xml": "<switch test=\"`$data-change-notification-input.aai-event-trigger`\">\n",
64         "comments": "",
65         "outputs": 1,
66         "x": 140.5,
67         "y": 400,
68         "z": "a54d391e.88f7d8",
69         "wires": [
70             [
71                 "197ffd5b.105fa3",
72                 "3bcc844d.917dbc"
73             ]
74         ]
75     },
76     {
77         "id": "68d03f9b.5e646",
78         "type": "block",
79         "name": "block : atomic",
80         "xml": "<block atomic=\"true\">",
81         "atomic": "true",
82         "outputs": 1,
83         "x": 871.5,
84         "y": 240,
85         "z": "a54d391e.88f7d8",
86         "wires": [
87             [
88                 "608a6bc.8344d94",
89                 "7a11c3b.828ac3c",
90                 "365e44a4.701f6c",
91                 "a3a71589.3e7428",
92                 "c3222caa.a5e2a"
93             ]
94         ]
95     },
96     {
97         "id": "7a11c3b.828ac3c",
98         "type": "execute",
99         "name": "execute RestApiCallNode Get token",
100         "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\"/>",
101         "comments": "",
102         "outputs": 1,
103         "x": 1144.5001983642578,
104         "y": 161.00000953674316,
105         "z": "a54d391e.88f7d8",
106         "wires": [
107             [
108                 "15e6e327.6bb24d",
109                 "b8526c6a.21372"
110             ]
111         ]
112     },
113     {
114         "id": "15e6e327.6bb24d",
115         "type": "success",
116         "name": "success",
117         "xml": "<outcome value='success'>\n",
118         "comments": "",
119         "outputs": 1,
120         "x": 1358.0001983642578,
121         "y": 141.00000953674316,
122         "z": "a54d391e.88f7d8",
123         "wires": [
124             [
125                 "eada649a.e312c8"
126             ]
127         ]
128     },
129     {
130         "id": "b8526c6a.21372",
131         "type": "failure",
132         "name": "failure",
133         "xml": "<outcome value='failure'>\n",
134         "comments": "",
135         "outputs": 1,
136         "x": 1354.0001983642578,
137         "y": 181.00000953674316,
138         "z": "a54d391e.88f7d8",
139         "wires": [
140             [
141                 "bf5d38a1.f76208"
142             ]
143         ]
144     },
145     {
146         "id": "eada649a.e312c8",
147         "type": "set",
148         "name": "set token-id",
149         "xml": "<set>\n<parameter name='prop.sdncRestApi.token_id' value='`$token-result.data.token_id`' />\n",
150         "comments": "",
151         "x": 1508.5001983642578,
152         "y": 141.00000953674316,
153         "z": "a54d391e.88f7d8",
154         "wires": []
155     },
156     {
157         "id": "3ad01439.f9afec",
158         "type": "execute",
159         "name": "execute RestApiCallNode Get Topology",
160         "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-network:networks'`\" />\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=\"get\"/>\n<parameter name=\"responsePrefix\" value=\"topology\"/>\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`\" />",
161         "comments": "",
162         "outputs": 1,
163         "x": 1575.5001983642578,
164         "y": 261.00000953674316,
165         "z": "a54d391e.88f7d8",
166         "wires": [
167             [
168                 "a2f37f5d.3d152",
169                 "76d94eec.78391"
170             ]
171         ]
172     },
173     {
174         "id": "a2f37f5d.3d152",
175         "type": "success",
176         "name": "success",
177         "xml": "<outcome value='success'>\n",
178         "comments": "",
179         "outputs": 1,
180         "x": 1818.0001983642578,
181         "y": 281.00000953674316,
182         "z": "a54d391e.88f7d8",
183         "wires": [
184             [
185                 "f2edc52a.829ae8"
186             ]
187         ]
188     },
189     {
190         "id": "f2edc52a.829ae8",
191         "type": "block",
192         "name": "block : atomic",
193         "xml": "<block atomic=\"true\">",
194         "atomic": "true",
195         "comments": "",
196         "outputs": 1,
197         "x": 1975.5001983642578,
198         "y": 281.00000953674316,
199         "z": "a54d391e.88f7d8",
200         "wires": [
201             [
202                 "2876228a.bd45de"
203             ]
204         ]
205     },
206     {
207         "id": "f0deaa8b.a77c48",
208         "type": "returnFailure",
209         "name": "return failure",
210         "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",
211         "comments": "",
212         "x": 1952.0001983642578,
213         "y": 181.00000953674316,
214         "z": "a54d391e.88f7d8",
215         "wires": []
216     },
217     {
218         "id": "76d94eec.78391",
219         "type": "failure",
220         "name": "failure",
221         "xml": "<outcome value='failure'>\n",
222         "comments": "",
223         "outputs": 1,
224         "x": 1814.0001983642578,
225         "y": 181.00000953674316,
226         "z": "a54d391e.88f7d8",
227         "wires": [
228             [
229                 "f0deaa8b.a77c48"
230             ]
231         ]
232     },
233     {
234         "id": "a45743c4.fd9ac",
235         "type": "dgstart",
236         "name": "DGSTART",
237         "outputs": 1,
238         "x": 98,
239         "y": 100,
240         "z": "a54d391e.88f7d8",
241         "wires": [
242             [
243                 "4069c94b.4e3178"
244             ]
245         ]
246     },
247     {
248         "id": "4069c94b.4e3178",
249         "type": "service-logic",
250         "name": "DataChange ${project.version}",
251         "module": "DataChange",
252         "version": "${project.version}",
253         "comments": "",
254         "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='DataChange' version='${project.version}'>",
255         "outputs": 1,
256         "x": 164,
257         "y": 160,
258         "z": "a54d391e.88f7d8",
259         "wires": [
260             [
261                 "a97cf7f0.905958"
262             ]
263         ]
264     },
265     {
266         "id": "a97cf7f0.905958",
267         "type": "method",
268         "name": "method esr-thirdparty-sdnc-discovery",
269         "xml": "<method rpc='esr-thirdparty-sdnc-discovery' mode='sync'>\n",
270         "comments": "",
271         "outputs": 1,
272         "x": 184,
273         "y": 240,
274         "z": "a54d391e.88f7d8",
275         "wires": [
276             [
277                 "8d013bc1.d159b8"
278             ]
279         ]
280     },
281     {
282         "id": "8d013bc1.d159b8",
283         "type": "block",
284         "name": "block : atomic",
285         "xml": "<block atomic=\"true\">\n",
286         "atomic": "false",
287         "comments": "",
288         "outputs": 1,
289         "x": 431.5,
290         "y": 240,
291         "z": "a54d391e.88f7d8",
292         "wires": [
293             [
294                 "9d107456.f08fe8"
295             ]
296         ]
297     },
298     {
299         "id": "2876228a.bd45de",
300         "type": "for",
301         "name": "for each Network",
302         "xml": "<for index='nidx' start='0' end='`$topology.networks.network_length`' >\n",
303         "comments": "",
304         "outputs": 1,
305         "x": 1401.5002136230469,
306         "y": 380.0000247955322,
307         "z": "a54d391e.88f7d8",
308         "wires": [
309             [
310                 "ef7b8418.bcb8e8"
311             ]
312         ]
313     },
314     {
315         "id": "ef7b8418.bcb8e8",
316         "type": "block",
317         "name": "block",
318         "xml": "<block>\n",
319         "atomic": "false",
320         "comments": "",
321         "outputs": 1,
322         "x": 1550.0002136230469,
323         "y": 380.0000247955322,
324         "z": "a54d391e.88f7d8",
325         "wires": [
326             [
327                 "64202ed1.e0b41",
328                 "93269044.8fece"
329             ]
330         ]
331     },
332     {
333         "id": "64202ed1.e0b41",
334         "type": "call",
335         "name": "call update-network-to-aai",
336         "xml": "<call module='DataChange' rpc='update-network-to-aai' mode='sync' >\n",
337         "comments": "",
338         "outputs": 1,
339         "x": 1729.0002136230469,
340         "y": 400.0000247955322,
341         "z": "a54d391e.88f7d8",
342         "wires": [
343             []
344         ]
345     },
346     {
347         "id": "93269044.8fece",
348         "type": "set",
349         "name": "set network",
350         "xml": "<set>\n<parameter name='network.' value='`$topology.networks.network[$nidx].`' />\n",
351         "comments": "",
352         "x": 1684.0002136230469,
353         "y": 360.0000247955322,
354         "z": "a54d391e.88f7d8",
355         "wires": []
356     },
357     {
358         "id": "bf5d38a1.f76208",
359         "type": "block",
360         "name": "block",
361         "xml": "<block>\n",
362         "atomic": "false",
363         "comments": "",
364         "outputs": 1,
365         "x": 1474.0001983642578,
366         "y": 181.00000953674316,
367         "z": "a54d391e.88f7d8",
368         "wires": [
369             []
370         ]
371     },
372     {
373         "id": "9588f43b.0d44f8",
374         "type": "comment",
375         "name": "Do Nothing",
376         "info": "",
377         "comments": "",
378         "x": 1644.0001983642578,
379         "y": 221.00000953674316,
380         "z": "a54d391e.88f7d8",
381         "wires": []
382     },
383     {
384         "id": "60d84913.695d78",
385         "type": "switchNode",
386         "name": "switch type",
387         "xml": "<switch test=\"`$prop.sdncRestApi.type`\">\n",
388         "comments": "",
389         "outputs": 1,
390         "x": 563,
391         "y": 360,
392         "z": "a54d391e.88f7d8",
393         "wires": [
394             [
395                 "de59227b.bacf9",
396                 "1a34048f.8eca2b"
397             ]
398         ]
399     },
400     {
401         "id": "8298d18a.63e4b",
402         "type": "block",
403         "name": "block",
404         "xml": "<block>\n",
405         "atomic": "false",
406         "comments": "",
407         "outputs": 1,
408         "x": 430,
409         "y": 360,
410         "z": "a54d391e.88f7d8",
411         "wires": [
412             [
413                 "60d84913.695d78"
414             ]
415         ]
416     },
417     {
418         "id": "de59227b.bacf9",
419         "type": "other",
420         "name": "SOTN",
421         "xml": "<outcome value='SOTN'>\n",
422         "comments": "",
423         "outputs": 1,
424         "x": 710,
425         "y": 240,
426         "z": "a54d391e.88f7d8",
427         "wires": [
428             [
429                 "68d03f9b.5e646"
430             ]
431         ]
432     },
433     {
434         "id": "1a34048f.8eca2b",
435         "type": "other",
436         "name": "other",
437         "xml": "<outcome value='Other'>\n",
438         "comments": "",
439         "outputs": 1,
440         "x": 725.0000076293945,
441         "y": 479.00003242492676,
442         "z": "a54d391e.88f7d8",
443         "wires": [
444             [
445                 "7faf207a.622e5"
446             ]
447         ]
448     },
449     {
450         "id": "7faf207a.622e5",
451         "type": "returnFailure",
452         "name": "return failure",
453         "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=\"`'Unsupported type = ' + $prop.sdncRestApi.type`\" />\n\n",
454         "comments": "",
455         "x": 903.0000076293945,
456         "y": 479.00003242492676,
457         "z": "a54d391e.88f7d8",
458         "wires": []
459     },
460     {
461         "id": "608a6bc.8344d94",
462         "type": "execute",
463         "name": "execute Properties",
464         "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",
465         "comments": "",
466         "outputs": 1,
467         "x": 1091.0001983642578,
468         "y": 121.00000953674316,
469         "z": "a54d391e.88f7d8",
470         "wires": [
471             []
472         ]
473     },
474     {
475         "id": "365e44a4.701f6c",
476         "type": "switchNode",
477         "name": "switch prop.sdncRestApi.token_id",
478         "xml": "<switch test=\"`$prop.sdncRestApi.token_id`\">\n\n",
479         "comments": "",
480         "outputs": 1,
481         "x": 1137.5001983642578,
482         "y": 241.00000953674316,
483         "z": "a54d391e.88f7d8",
484         "wires": [
485             [
486                 "b737a6fe.87cf68",
487                 "878b1fd0.506dd"
488             ]
489         ]
490     },
491     {
492         "id": "b737a6fe.87cf68",
493         "type": "other",
494         "name": "Null",
495         "xml": "<outcome value=''>\n",
496         "comments": "",
497         "outputs": 1,
498         "x": 1354.0001983642578,
499         "y": 221.00000953674316,
500         "z": "a54d391e.88f7d8",
501         "wires": [
502             [
503                 "de7d499c.f87aa8"
504             ]
505         ]
506     },
507     {
508         "id": "878b1fd0.506dd",
509         "type": "other",
510         "name": "other",
511         "xml": "<outcome value='Other'>\n",
512         "comments": "",
513         "outputs": 1,
514         "x": 1354.0001983642578,
515         "y": 261.00000953674316,
516         "z": "a54d391e.88f7d8",
517         "wires": [
518             [
519                 "3ad01439.f9afec"
520             ]
521         ]
522     },
523     {
524         "id": "de7d499c.f87aa8",
525         "type": "execute",
526         "name": "execute RestApiCallNode Get Topology",
527         "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-network:networks'`\" />\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=\"get\"/>\n<parameter name=\"responsePrefix\" value=\"topology\"/>\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",
528         "comments": "",
529         "outputs": 1,
530         "x": 1575.5001983642578,
531         "y": 221.00000953674316,
532         "z": "a54d391e.88f7d8",
533         "wires": [
534             [
535                 "76d94eec.78391",
536                 "a2f37f5d.3d152"
537             ]
538         ]
539     },
540     {
541         "id": "c3222caa.a5e2a",
542         "type": "execute",
543         "name": "execute RestconfDiscoveryNode",
544         "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restconfdiscovery.RestconfDiscoveryNode' method='establishSubscription' >\n<parameter name=\"subscriberId\" value=\"sotn-controller\" />\n<parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/operations/ietf-subscribed-notifications:establish-subscription'`\" />\n<parameter name=\"restapiUser\" value=\"`$prop.sdncRestApi.thirdpartySdnc.user`\" />\n<parameter name=\"restapiPassword\" value=\"`$prop.sdncRestApi.thirdpartySdnc.password`\" />\n<parameter name=\"sseConnectURL\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/streams/yang-push-json'`\" />\n<parameter name=\"dirPath\" value=\"/opt/sdnc/restconfapi/yang/notification\" />\n<parameter name=\"format\" value=\"json\" />\n<parameter name=\"httpMethod\" value=\"post\" />\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`\" />\n<parameter name=\"module\" value=\"DataChange\" />\n<parameter name=\"rpc\" value=\"sotn-notification-handler\" />\n<parameter name=\"mode\" value=\"sync\" />",
545         "comments": "",
546         "outputs": 1,
547         "x": 1134.0001983642578,
548         "y": 381.00000953674316,
549         "z": "a54d391e.88f7d8",
550         "wires": [
551             []
552         ]
553     },
554     {
555         "id": "a3a71589.3e7428",
556         "type": "set",
557         "name": "set encoding-format",
558         "xml": "<set>\n<parameter name='input' value='ietf-subscribed-notifications:establish-subscription.input.' />\n<parameter name=\"`$input + 'encoding'`\" value=\"encode-json\" />",
559         "comments": "",
560         "x": 1094.0001983642578,
561         "y": 341.00000953674316,
562         "z": "a54d391e.88f7d8",
563         "wires": []
564     },
565     {
566         "id": "98c18166.4a0f3",
567         "type": "comment",
568         "name": "Notification subscription",
569         "info": "",
570         "comments": "",
571         "x": 1099.000343322754,
572         "y": 298.00000858306885,
573         "z": "a54d391e.88f7d8",
574         "wires": []
575     }
576 ]