7f98062720e9434f02cebe1fcbefb12e53caa88d
[sdnc/oam.git] / platform-logic / datachange / src / main / json / DataChange_update-network-to-aai.json
1 [
2   {
3     "id": "e71bc70e.124d38",
4     "type": "dgstart",
5     "name": "DGSTART",
6     "outputs": 1,
7     "x": 142,
8     "y": 49,
9     "z": "a2160ede.50a7f8",
10     "wires": [
11       [
12         "f849e1fd.7b8e28"
13       ]
14     ]
15   },
16   {
17     "id": "f849e1fd.7b8e28",
18     "type": "service-logic",
19     "name": "DataChange ${project.version}",
20     "module": "DataChange",
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='DataChange' version='${project.version}'>",
24     "outputs": 1,
25     "x": 231.00003051757812,
26     "y": 139.88891220092773,
27     "z": "a2160ede.50a7f8",
28     "wires": [
29       [
30         "7adf111d.766db8"
31       ]
32     ]
33   },
34   {
35     "id": "7adf111d.766db8",
36     "type": "method",
37     "name": "method update-network-to-aai",
38     "xml": "<method rpc='update-network-to-aai' mode='sync'>\n",
39     "comments": "",
40     "outputs": 1,
41     "x": 267.1112518310547,
42     "y": 210.22223663330078,
43     "z": "a2160ede.50a7f8",
44     "wires": [
45       [
46         "802b5752.247908"
47       ]
48     ]
49   },
50   {
51     "id": "802b5752.247908",
52     "type": "block",
53     "name": "block : atomic",
54     "xml": "<block atomic=\"true\">\n",
55     "atomic": "false",
56     "comments": "",
57     "outputs": 1,
58     "x": 492.33343505859375,
59     "y": 209.77792358398438,
60     "z": "a2160ede.50a7f8",
61     "wires": [
62       [
63         "32d96ea8.386a82",
64         "7667af77.0df1e8",
65         "6f623dd3.9a7c44",
66         "ffd24e55.e4afa"
67       ]
68     ]
69   },
70   {
71     "id": "7667af77.0df1e8",
72     "type": "update",
73     "name": "save network-resource",
74     "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='network-resource'  \n     key='network-resource.network-id = $tmp.network-id' >\n<parameter name='network-id' value='`$tmp.network-id`' />\n<parameter name='client-id' value='`$network.client-id`' />\n<parameter name='te-topo-id' value='`$network.te-topology-id`' />\n<parameter name='provider-id' value='`$network.provider-id`' />\n\n<parameter name='network-type' value='`$network.network-types`' />\n\n\n",
75     "comments": "",
76     "outputs": 1,
77     "x": 722.333251953125,
78     "y": 115.00001525878906,
79     "z": "a2160ede.50a7f8",
80     "wires": [
81       []
82     ]
83   },
84   {
85     "id": "ab67cffd.8b31",
86     "type": "update",
87     "name": "save pnf",
88     "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='pnf' \n      key='pnf.pnf-name = $unique-nodeId' >\n<parameter name='pnf-name' value='`$unique-nodeId`' />\n<parameter name='pnf-id' value='`$node.node-id`' />\n<parameter name='operational-status' value='`$node.te.oper-status`' />\n<parameter name='admin-status' value='`$node.te.te-node-attributes.admin-status`' />\n<parameter name='in-maint' value='true' />\n\n\n\n\n\n",
89     "comments": "",
90     "outputs": 1,
91     "x": 934.1111450195312,
92     "y": 205.111083984375,
93     "z": "a2160ede.50a7f8",
94     "wires": [
95       []
96     ]
97   },
98   {
99     "id": "6f623dd3.9a7c44",
100     "type": "for",
101     "name": "for each node",
102     "xml": "<for index='pidx' start='0' end='`$network.node_length`' >\n",
103     "comments": "",
104     "outputs": 1,
105     "x": 705.8888549804688,
106     "y": 185.33331298828125,
107     "z": "a2160ede.50a7f8",
108     "wires": [
109       [
110         "ab67cffd.8b31",
111         "c4083363.2a3b2",
112         "ba78539e.d2e248",
113         "c02a5c85.3b448",
114         "499b8cbc.ebafac",
115         "7a876b8.f89b114",
116         "46013f8c.54849"
117       ]
118     ]
119   },
120   {
121     "id": "c4083363.2a3b2",
122     "type": "set",
123     "name": "set network",
124     "xml": "<set>\n<parameter name='node.' value='`$network.node[$pidx].`' />\n\n<parameter name='unique-networkId' value='`$tmp.network-id`' />\n<parameter name='unique-nodeId' value=\"`'networkId-' + $unique-networkId + '-nodeId-' + $node.node-id`\" />\n<parameter name='src-tpId' value=\"`'networkId-' + $unique-networkId + '-nodeId-' + $link.source.source-node + '-ltpId-' + $link.source.source-tp`\" />\n",
125     "comments": "",
126     "x": 950.111083984375,
127     "y": 133.2222137451172,
128     "z": "a2160ede.50a7f8",
129     "wires": []
130   },
131   {
132     "id": "c02a5c85.3b448",
133     "type": "save",
134     "name": "save pnf relationship to network-resource in AAI",
135     "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='pnf:relationship-list' \n      key='pnf.pnf-name = $unique-nodeId' force=\"true\" pfx=\"tmp.AnAI-data\">\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"network-resource\" />\n<parameter name=\"relationship-list.relationship[0].related-link\" value=\"`'/network/network-resources/network-resource/' + $tmp.network-id`\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"network-resource.network-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$tmp.network-id`\" />",
136     "comments": "",
137     "outputs": 1,
138     "x": 1030.7779541015625,
139     "y": 380.44447803497314,
140     "z": "a2160ede.50a7f8",
141     "wires": [
142       []
143     ]
144   },
145   {
146     "id": "499b8cbc.ebafac",
147     "type": "for",
148     "name": "for each termination point",
149     "xml": "<for index='tidx' start='0' end='`$node.termination-point_length`' >\n",
150     "comments": "",
151     "outputs": 1,
152     "x": 963.4444580078125,
153     "y": 496.111083984375,
154     "z": "a2160ede.50a7f8",
155     "wires": [
156       [
157         "c5951e15.43701",
158         "c670da77.075458",
159         "3831ed03.d1f9da",
160         "f6959b19.b0bc18"
161       ]
162     ]
163   },
164   {
165     "id": "c5951e15.43701",
166     "type": "set",
167     "name": "set termination point",
168     "xml": "<set>\n<parameter name='tp.' value='`$node.termination-point[$tidx].`' />\n",
169     "comments": "",
170     "x": 1230.111328125,
171     "y": 457.0000457763672,
172     "z": "a2160ede.50a7f8",
173     "wires": []
174   },
175   {
176     "id": "3831ed03.d1f9da",
177     "type": "update",
178     "name": "save p-interface",
179     "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='p-interface' \n      key='pnf.pnf-name = $unique-nodeId\n      AND p-interface.interface-name = $unique-ltpId' >      \n<parameter name='interface-name' value='`$unique-ltpId`' />\n<parameter name='network-ref' value='`$tp.supporting-termination-point[0].network-ref`' />\n<parameter name='transparent' value='`$tp.svc.supported-classification.transparent`' />\n<parameter name='speed-value' value='`$tp.te.interface-switching-capability[0].max-lsp-bandwidth[0].te-bandwidth.eth-bandwidth`' />\n<parameter name='operational-status' value='`$tp.te.oper-status`' />\n<parameter name='in-maint' value=\"true\" />\n\n<parameter name='inter-layer-lock-id' value='`$tp.te.inter-layer-lock-id[0]`' />\n<parameter name='inter-domain-plug-id' value='`$tp.te.inter-domain-plug-id`' />\n\n",
180     "comments": "",
181     "outputs": 1,
182     "x": 1213.8151397705078,
183     "y": 630.5555934906006,
184     "z": "a2160ede.50a7f8",
185     "wires": [
186       [
187         "9d09dea6.d30ca8",
188         "abd50ee3.2f813"
189       ]
190     ]
191   },
192   {
193     "id": "7e259f3c.438d9",
194     "type": "save",
195     "name": "save pnf relationship to p-interface in AAI",
196     "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='pnf:relationship-list' \n      key='pnf.pnf-name = $unique-nodeId' force=\"true\" pfx=\"tmp.AnAI-data\">\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"p-interface\" />\n<parameter name=\"relationship-list.relationship[0].related-link\" value=\"`'/network/network-resources/network-resource/' + $tmp.network-id + '/pnfs/pnf/' + $unique-nodeId '/p-interfaces/p-interface/' + $unique-ltpId`\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"p-interface.interface-name\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$unique-ltpId`\" />",
197     "comments": "",
198     "outputs": 1,
199     "x": 1297.703857421875,
200     "y": 765.3333740234375,
201     "z": "a2160ede.50a7f8",
202     "wires": [
203       []
204     ]
205   },
206   {
207     "id": "c670da77.075458",
208     "type": "set",
209     "name": "set unique-ltpId",
210     "xml": "<set>\n<parameter name='unique-ltpId' value=\"`$unique-nodeId + '-ltpId-' + $tp.te-tp-id`\" />\n",
211     "comments": "",
212     "x": 1214.000244140625,
213     "y": 491.1111145019531,
214     "z": "a2160ede.50a7f8",
215     "wires": []
216   },
217   {
218     "id": "32d96ea8.386a82",
219     "type": "execute",
220     "name": "execute",
221     "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n    <parameter name=\"source\" value=\"`$network.network-id`\"/>\n    <parameter name=\"outputPath\" value=\"tmp.network-id\"/>\n    <parameter name=\"target\" value=\"/\"/>\n    <parameter name=\"replacement\" value=\"-\"/>\n    ",
222     "comments": "",
223     "outputs": 1,
224     "x": 671.9935302734375,
225     "y": 75.99349212646484,
226     "z": "a2160ede.50a7f8",
227     "wires": [
228       []
229     ]
230   },
231   {
232     "id": "ba78539e.d2e248",
233     "type": "save",
234     "name": "save pnf relation with esr-thirdparty-sdnc",
235     "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='esr-thirdparty-sdnc:relationship-list' \n      key='esr-thirdparty-sdnc.thirdparty-sdnc-id = $prop.sdncRestApi.thirdpartySdnc.id' \n      force=\"true\" pfx=\"tmp.AnAI-data\">\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"pnf\" />\n<parameter name=\"relationship-list.relationship[0].related-link\" value=\"`'/network/pnfs/pnf/' + $node.node-id`\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"pnf.pnf-name\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$node.node-id`\" />\n",
236     "comments": "",
237     "outputs": 1,
238     "x": 1012,
239     "y": 416.9934997558594,
240     "z": "a2160ede.50a7f8",
241     "wires": [
242       []
243     ]
244   },
245   {
246     "id": "9d09dea6.d30ca8",
247     "type": "success",
248     "name": "success",
249     "xml": "<outcome value='success'>\n",
250     "comments": "",
251     "outputs": 1,
252     "x": 1385.4998397827148,
253     "y": 617.7460689544678,
254     "z": "a2160ede.50a7f8",
255     "wires": [
256       [
257         "3d744c93.2eb20c"
258       ]
259     ]
260   },
261   {
262     "id": "abd50ee3.2f813",
263     "type": "failure",
264     "name": "failure",
265     "xml": "<outcome value='failure'>\n",
266     "comments": "",
267     "outputs": 1,
268     "x": 1379.1784286499023,
269     "y": 669.9603805541992,
270     "z": "a2160ede.50a7f8",
271     "wires": [
272       [
273         "a0fb6003.0efd8"
274       ]
275     ]
276   },
277   {
278     "id": "3d744c93.2eb20c",
279     "type": "block",
280     "name": "block",
281     "xml": "<block>\n",
282     "atomic": "false",
283     "comments": "",
284     "outputs": 1,
285     "x": 1536,
286     "y": 617,
287     "z": "a2160ede.50a7f8",
288     "wires": [
289       []
290     ]
291   },
292   {
293     "id": "a0fb6003.0efd8",
294     "type": "update",
295     "name": "update p-interface",
296     "xml": "<update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='p-interface' \n      key='pnf.pnf-name = $node.node-id\n      AND p-interface.interface-name = $unique-ltpId' >      \n<parameter name='interface-name' value='`$unique-ltpId`' />\n<parameter name='network-ref' value='`$tp.supporting-termination-point[0].network-ref`' />\n<parameter name='transparent' value='`$tp.svc.supported-classification.transparent`' />\n<parameter name='speed-value' value='`$tp.te.interface-switching-capability[0].max-lsp-bandwidth[0].te-bandwidth.eth-bandwidth`' />\n<parameter name='operational-status' value='`$tp.te.oper-status`' />\n<parameter name='in-maint' value=\"true\" />\n\n<parameter name='inter-layer-lock-id' value='`$tp.te.inter-layer-lock-id[0]`' />\n<parameter name='inter-domain-plug-id' value='`$tp.te.inter-domain-plug-id`' />\n\n",
297     "comments": "",
298     "outputs": 1,
299     "x": 1556,
300     "y": 667,
301     "z": "a2160ede.50a7f8",
302     "wires": [
303       []
304     ]
305   },
306   {
307     "id": "aa9ed7c5.9f2be8",
308     "type": "update",
309     "name": "save tunnel-termination-point",
310     "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='tunnel-termination-point' \n      key='pnf.pnf-name = $unique-nodeId\n      AND tunnel-termination-point.ttp-id = $unique-ttpId' >\n\n<parameter name='ttp-id' value='`$unique-ttpId`' />\n<parameter name='tunnel-tp-id' value='`$ttp.tunnel-tp-id`' />\n<parameter name='name' value='`$ttp.name`' />\n<parameter name='admin-status' value='`$ttp.admin-status`' />\n<parameter name='oper-status' value='`$ttp.oper-status`' />\n<parameter name='inter-layer-lock-id' value='`$ttp.inter-layer-lock-id`' />\n<parameter name='switching-capability' value='`$ttp.switching-capability`' />\n<parameter name='protection-type' value='`$ttp.protection-type`' />\n<parameter name='encoding' value='`$ttp.encoding`' />\n\n\n\n\n\n\n",
311     "comments": "",
312     "outputs": 1,
313     "x": 1423,
314     "y": 205,
315     "z": "a2160ede.50a7f8",
316     "wires": [
317       [
318         "54fe71d8.edb1c",
319         "6cd48f92.21a288"
320       ]
321     ]
322   },
323   {
324     "id": "7a876b8.f89b114",
325     "type": "for",
326     "name": "for each tunnel termination point",
327     "xml": "<for index='ttidx' start='0' end='`$node.te.tunnel-termination-point_length`' >\n",
328     "comments": "",
329     "outputs": 1,
330     "x": 1038,
331     "y": 281,
332     "z": "a2160ede.50a7f8",
333     "wires": [
334       [
335         "79913f13.5b1fa",
336         "4552b8b5.e9ba2",
337         "aa9ed7c5.9f2be8",
338         "e23bdb7f.fdc9c"
339       ]
340     ]
341   },
342   {
343     "id": "79913f13.5b1fa",
344     "type": "set",
345     "name": "set tunnel termination point",
346     "xml": "<set>\n<parameter name='ttp.' value='`$node.te.tunnel-termination-point[$ttidx].`' />\n",
347     "comments": "",
348     "x": 1393,
349     "y": 114,
350     "z": "a2160ede.50a7f8",
351     "wires": []
352   },
353   {
354     "id": "4552b8b5.e9ba2",
355     "type": "set",
356     "name": "set unique-ttpId",
357     "xml": "<set>\n<parameter name='unique-ttpId' value=\"`$unique-nodeId + '-ttpId-' + $ttp.tunnel-tp-id`\" />\n",
358     "comments": "",
359     "x": 1370.888916015625,
360     "y": 151.111083984375,
361     "z": "a2160ede.50a7f8",
362     "wires": []
363   },
364   {
365     "id": "54fe71d8.edb1c",
366     "type": "success",
367     "name": "success",
368     "xml": "<outcome value='success'>\n",
369     "comments": "",
370     "outputs": 1,
371     "x": 1680,
372     "y": 191,
373     "z": "a2160ede.50a7f8",
374     "wires": [
375       [
376         "42f8b4e.c7b524c"
377       ]
378     ]
379   },
380   {
381     "id": "6cd48f92.21a288",
382     "type": "failure",
383     "name": "failure",
384     "xml": "<outcome value='failure'>\n",
385     "comments": "",
386     "outputs": 1,
387     "x": 1673.6785888671875,
388     "y": 243.21431159973145,
389     "z": "a2160ede.50a7f8",
390     "wires": [
391       [
392         "5f719388.c96efc"
393       ]
394     ]
395   },
396   {
397     "id": "42f8b4e.c7b524c",
398     "type": "block",
399     "name": "block",
400     "xml": "<block>\n",
401     "atomic": "false",
402     "comments": "",
403     "outputs": 1,
404     "x": 1830.5001602172852,
405     "y": 190.25393104553223,
406     "z": "a2160ede.50a7f8",
407     "wires": [
408       []
409     ]
410   },
411   {
412     "id": "5f719388.c96efc",
413     "type": "update",
414     "name": "update tunnel-termination-point",
415     "xml": "<update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='tunnel-termination-point' \n      key='pnf.pnf-name = $node.node-id\n      AND tunnel-termination-point.ttp-id = $unique-ttpId' >\n\n<parameter name='tunnel-tp-id' value='`$ttp.tunnel-tp-id`' />\n<parameter name='name' value='`$ttp.name`' />\n<parameter name='admin-status' value='`$ttp.admin-status`' />\n<parameter name='oper-status' value='`$ttp.oper-status`' />\n<parameter name='inter-layer-lock-id' value='`$ttp.inter-layer-lock-id`' />\n<parameter name='switching-capability' value='`$ttp.switching-capability`' />\n<parameter name='protection-type' value='`$ttp.protection-type`' />\n<parameter name='encoding' value='`$ttp.encoding`' />\n\n\n\n\n\n\n",
416     "comments": "",
417     "outputs": 1,
418     "x": 1911,
419     "y": 245,
420     "z": "a2160ede.50a7f8",
421     "wires": [
422       []
423     ]
424   },
425   {
426     "id": "46013f8c.54849",
427     "type": "set",
428     "name": "set local variables",
429     "xml": "<set>\n<parameter name='unique-networkId' value='`$tmp.network-id`' />\n<parameter name='unique-nodeId' value=\"`'networkId-' + $unique-networkId + '-nodeId-' + $node.node-id`\" />\n",
430     "comments": "",
431     "x": 969,
432     "y": 167,
433     "z": "a2160ede.50a7f8",
434     "wires": []
435   },
436   {
437     "id": "ffd24e55.e4afa",
438     "type": "call",
439     "name": "call update-network-links-to-aai",
440     "xml": "<call module='DataChange' rpc='update-network-links-to-aai' mode='sync' >\n",
441     "comments": "",
442     "outputs": 1,
443     "x": 648,
444     "y": 311,
445     "z": "a2160ede.50a7f8",
446     "wires": [
447       []
448     ]
449   },
450   {
451     "id": "f6959b19.b0bc18",
452     "type": "save",
453     "name": "save pnf-interface relationship to pnf in AAI",
454     "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='p-interface:relationship-list' \n      key='pnf.pnf-name = $unique-nodeId\n      AND p-interface.interface-name = $unique-ltpId' force=\"true\" pfx=\"tmp.AnAI-data\">\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"pnf\" />\n<parameter name=\"relationship-list.relationship[0].related-link\" value=\"`'/network/pnfs/pnf/' + $unique-nodeId`\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"pnf.pnf-name\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$unique-nodeId`\" />\n",
455     "comments": "",
456     "outputs": 1,
457     "x": 1300,
458     "y": 724,
459     "z": "a2160ede.50a7f8",
460     "wires": [
461       []
462     ]
463   },
464   {
465     "id": "e23bdb7f.fdc9c",
466     "type": "save",
467     "name": "save pnf relationship to tunnel termination point in AAI",
468     "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='pnf:relationship-list' \n      key='pnf.pnf-name = $unique-nodeId' force=\"true\" pfx=\"tmp.AnAI-data\">\n<parameter name=\"relationship-list.relationship[$ttidx].related-to\" value=\"tunnel-termination-point\" />\n<parameter name=\"relationship-list.relationship[$ttidx].related-link\" value=\"`'/network/network-resources/network-resource/' + $tmp.network-id + '/pnfs/pnf/' + $node.node-id '/tunnel-termination-points/tunnel-termination-point/' + $unique-ttpId`\" />\n<parameter name=\"relationship-list.relationship[$ttidx].relationship-data[0].relationship-key\" value=\"tunnel-termination-point.ttp-id\" />\n<parameter name=\"relationship-list.relationship[$ttidx].relationship-data[0].relationship-value\" value=\"`$unique-ttpId`\" />",
469     "comments": "",
470     "outputs": 1,
471     "x": 1485,
472     "y": 297,
473     "z": "a2160ede.50a7f8",
474     "wires": [
475       []
476     ]
477   }
478 ]