442a44eb791020f389c915cb6364dc80670d6e9d
[sdnc/oam.git] / platform-logic / datachange / src / main / json / DataChange_update-network-links-to-aai.json
1 [
2   {
3     "id": "3dae3829.6d50d8",
4     "type": "dgstart",
5     "name": "DGSTART",
6     "outputs": 1,
7     "x": 140,
8     "y": 83,
9     "z": "5fc7c3fb.48a444",
10     "wires": [
11       [
12         "de2fffb7.c073f8"
13       ]
14     ]
15   },
16   {
17     "id": "de2fffb7.c073f8",
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": 182,
26     "y": 162.888916015625,
27     "z": "5fc7c3fb.48a444",
28     "wires": [
29       [
30         "8d7f08d3.c67fe8"
31       ]
32     ]
33   },
34   {
35     "id": "8d7f08d3.c67fe8",
36     "type": "method",
37     "name": "method update-network-links-to-aai",
38     "xml": "<method rpc='update-network-links-to-aai' mode='sync'>\n",
39     "comments": "",
40     "outputs": 1,
41     "x": 196,
42     "y": 239.22222900390625,
43     "z": "5fc7c3fb.48a444",
44     "wires": [
45       [
46         "89a3239d.9a961"
47       ]
48     ]
49   },
50   {
51     "id": "89a3239d.9a961",
52     "type": "block",
53     "name": "block : atomic",
54     "xml": "<block atomic=\"true\">\n",
55     "atomic": "false",
56     "comments": "",
57     "outputs": 1,
58     "x": 207.33343505859375,
59     "y": 316.7779235839844,
60     "z": "5fc7c3fb.48a444",
61     "wires": [
62       [
63         "f779b713.8cfdc8"
64       ]
65     ]
66   },
67   {
68     "id": "705ccc82.ecc094",
69     "type": "update",
70     "name": "save logical-link",
71     "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='logical-link' \n      key='logical-link.link-name = $unique-linkId' >\n<parameter name='link-name' value='`$unique-linkId`' />\n<parameter name='link-id' value='`$link.link-id`' />\n\n\n\n\n\n",
72     "comments": "",
73     "outputs": 1,
74     "x": 580.1111450195312,
75     "y": 168.11109924316406,
76     "z": "5fc7c3fb.48a444",
77     "wires": [
78       []
79     ]
80   },
81   {
82     "id": "f779b713.8cfdc8",
83     "type": "for",
84     "name": "for each link",
85     "xml": "<for index='pidx' start='0' end='`$network.link_length`' >\n",
86     "comments": "",
87     "outputs": 1,
88     "x": 235.88885498046875,
89     "y": 410.33331298828125,
90     "z": "5fc7c3fb.48a444",
91     "wires": [
92       [
93         "705ccc82.ecc094",
94         "45a55196.a54ca",
95         "d54d8abb.5beac",
96         "5271a41c.d8700c"
97       ]
98     ]
99   },
100   {
101     "id": "45a55196.a54ca",
102     "type": "set",
103     "name": "set network link's local variables",
104     "xml": "<set>\n<parameter name='link.' value='`$network.link[$pidx].`' />\n<parameter name='unique-networkId' value='`$tmp.network-id`' />\n<parameter name='unique-linkId' value=\"`'networkId-' + $unique-networkId + '-linkId-' + $link.link-id`\" />\n<parameter name='src-tpId' value=\"`'networkId-' + $unique-networkId + '-nodeId-' + $link.source.source-node + '-ltpId-' + $link.source.source-tp`\" />\n<parameter name='dst-tpId' value=\"`'networkId-' + $unique-networkId + '-nodeId-' + $link.destination.dest-node + '-ltpId-' + $link.destination.dest-tp`\" />\n\n",
105     "comments": "",
106     "x": 581.111083984375,
107     "y": 109.22221374511719,
108     "z": "5fc7c3fb.48a444",
109     "wires": []
110   },
111   {
112     "id": "d54d8abb.5beac",
113     "type": "save",
114     "name": "save source and dest TP",
115     "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='logical-link:relationship-list' \n      key='logical-link.link-name = $unique-linkId' 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=\"`'/p-interfaces/p-interface/' + $src-tpId`\" />\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=\"`$src-tpId`\" />\n\n<parameter name=\"relationship-list.relationship[1].related-to\" value=\"p-interface\" />\n<parameter name=\"relationship-list.relationship[1].related-link\" value=\"`'/p-interfaces/p-interface/' + $dst-tpId`\" />\n<parameter name=\"relationship-list.relationship[1].relationship-data[0].relationship-key\" value=\"p-interface.interface-name\" />\n<parameter name=\"relationship-list.relationship[1].relationship-data[0].relationship-value\" value=\"`$dst-tpId`\" />",
116     "comments": "",
117     "outputs": 1,
118     "x": 596.7779541015625,
119     "y": 234.44447326660156,
120     "z": "5fc7c3fb.48a444",
121     "wires": [
122       []
123     ]
124   },
125   {
126     "id": "5271a41c.d8700c",
127     "type": "for",
128     "name": "for each label-restriction",
129     "xml": "<for index='tidx' start='0' end='`$link.te.te-link-attributes.label-restriction_length`' >\n",
130     "comments": "",
131     "outputs": 1,
132     "x": 533.4444580078125,
133     "y": 375.111083984375,
134     "z": "5fc7c3fb.48a444",
135     "wires": [
136       [
137         "1b0f5546.e78123",
138         "443c3267.dc2134",
139         "b1de45a9.d99468"
140       ]
141     ]
142   },
143   {
144     "id": "1b0f5546.e78123",
145     "type": "set",
146     "name": "set label-restriction's local variables",
147     "xml": "<set>\n<parameter name='label-restriction.' value='`$link.te.te-link-attributes.label-restriction[$tidx].`' />\n<parameter name='unique-lrId' value=\"`$unique-linkId + '-lrId-' + $label-restriction.index`\" />\n",
148     "comments": "",
149     "x": 805.111328125,
150     "y": 299.00006103515625,
151     "z": "5fc7c3fb.48a444",
152     "wires": []
153   },
154   {
155     "id": "759b3331.b0b62c",
156     "type": "success",
157     "name": "success",
158     "xml": "<outcome value='success'>\n",
159     "comments": "",
160     "outputs": 1,
161     "x": 982.4998779296875,
162     "y": 371.7460632324219,
163     "z": "5fc7c3fb.48a444",
164     "wires": [
165       [
166         "1a522f6e.2f6589"
167       ]
168     ]
169   },
170   {
171     "id": "b709b603.7fa938",
172     "type": "failure",
173     "name": "failure",
174     "xml": "<outcome value='failure'>\n",
175     "comments": "",
176     "outputs": 1,
177     "x": 990.178466796875,
178     "y": 430.96038818359375,
179     "z": "5fc7c3fb.48a444",
180     "wires": [
181       [
182         "5fd30b98.524afc"
183       ]
184     ]
185   },
186   {
187     "id": "1a522f6e.2f6589",
188     "type": "block",
189     "name": "block",
190     "xml": "<block>\n",
191     "atomic": "false",
192     "comments": "",
193     "outputs": 1,
194     "x": 1102,
195     "y": 318,
196     "z": "5fc7c3fb.48a444",
197     "wires": [
198       []
199     ]
200   },
201   {
202     "id": "61d66d0d.d0e254",
203     "type": "set",
204     "name": "set src-ltpId dst-ltpId",
205     "xml": "<set>\n<parameter name='src-ltpId' value=\"`'nodeId-' + $oof.vpn.access-node-id + '-ltpId-' + $oof.vpn.src-access-ltp-id`\" />\n<parameter name='dst-ltpId' value=\"`'nodeId-' + $oof.vpn.access-node-id + '-ltpId-' + $oof.vpn.dst-access-ltp-id`\" />",
206     "comments": "",
207     "x": 2595.5001220703125,
208     "y": 2430.545135498047,
209     "z": "5fc7c3fb.48a444",
210     "wires": []
211   },
212   {
213     "id": "d454df86.50acb",
214     "type": "save",
215     "name": "save srcLTP relationship in AAI",
216     "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='vpn-binding:relationship-list' \n      key='vpn-binding.vpn-id = $tmp.vpnName' \n      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/pnfs/pnf/' + $oof.vpn.access-node-id + '/p-interfaces/p-interface/' + $src-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=\"`$src-ltpId`\" />\n\n\n\n",
217     "comments": "",
218     "outputs": 1,
219     "x": 2629.0001220703125,
220     "y": 2470.545135498047,
221     "z": "5fc7c3fb.48a444",
222     "wires": [
223       []
224     ]
225   },
226   {
227     "id": "f86402c5.f4d968",
228     "type": "save",
229     "name": "save dstLTP relationship in AAI",
230     "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='vpn-binding:relationship-list' \n      key='vpn-binding.vpn-id = $tmp.vpnName' \n      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/pnfs/pnf/' + $oof.vpn.access-node-id + '/p-interfaces/p-interface/' + $dst-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=\"`$dst-ltpId`\" />",
231     "comments": "",
232     "outputs": 1,
233     "x": 2629.0001220703125,
234     "y": 2510.545135498047,
235     "z": "5fc7c3fb.48a444",
236     "wires": [
237       []
238     ]
239   },
240   {
241     "id": "5fd30b98.524afc",
242     "type": "update",
243     "name": "save label-restriction",
244     "xml": "<update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='label-restriction' \n      key='logical-link.link-name = $unique-linkId\n      AND label-restriction.id = $unique-lrId' >      \n<parameter name='id' value='`$unique-lrId`' />\n<parameter name='label-start' value='`$label-restriction.label-start`' />\n<parameter name='label-end' value='`$label-restriction.label-end`' />\n<parameter name='range-bitmap' value='`$label-restriction.range-bitmap`' />\n<parameter name='label-step' value='`$label-restriction.label-step`' />\n<parameter name='inclusive-exclusive' value='`$label-restriction.inclusive-exclusive`' />\n\n",
245     "comments": "",
246     "outputs": 1,
247     "x": 1114,
248     "y": 507,
249     "z": "5fc7c3fb.48a444",
250     "wires": [
251       []
252     ]
253   },
254   {
255     "id": "443c3267.dc2134",
256     "type": "save",
257     "name": "save link relationship to label-restriction in AAI",
258     "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='logical-link:relationship-list' \n      key='logical-link.link-name = $unique-linkId' force=\"true\" pfx=\"tmp.AnAI-data\">\n<parameter name=\"relationship-list.relationship[$tidx].related-to\" value=\"label-restriction\" />\n<parameter name=\"relationship-list.relationship[$tidx].related-link\" value=\"`'/network/label-restrictions/label-restriction/' + $unique-lrId`\" />\n<parameter name=\"relationship-list.relationship[$tidx].relationship-data[0].relationship-key\" value=\"label-restriction.id\" />\n<parameter name=\"relationship-list.relationship[$tidx].relationship-data[0].relationship-value\" value=\"`$unique-lrId`\" />\n",
259     "comments": "",
260     "outputs": 1,
261     "x": 770,
262     "y": 533,
263     "z": "5fc7c3fb.48a444",
264     "wires": [
265       []
266     ]
267   },
268   {
269     "id": "b1de45a9.d99468",
270     "type": "update",
271     "name": "save label-restriction",
272     "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='label-restriction' \n      key='logical-link.link-name = $unique-linkId\n      AND label-restriction.id = $unique-lrId' >      \n<parameter name='id' value='`$unique-lrId`' />\n<parameter name='label-start' value='`$label-restriction.label-start`' />\n<parameter name='label-end' value='`$label-restriction.label-end`' />\n<parameter name='range-bitmap' value='`$label-restriction.range-bitmap`' />\n<parameter name='label-step' value='`$label-restriction.label-step`' />\n<parameter name='inclusive-exclusive' value='`$label-restriction.inclusive-exclusive`' />\n\n",
273     "comments": "",
274     "outputs": 1,
275     "x": 795.815185546875,
276     "y": 425.55560302734375,
277     "z": "5fc7c3fb.48a444",
278     "wires": [
279       [
280         "759b3331.b0b62c",
281         "b709b603.7fa938"
282       ]
283     ]
284   }
285 ]