Merge "self-serve DG for Casablanca"
[sdnc/oam.git] / platform-logic / datachange / src / main / json / DataChange_update-network-to-aai.json
1 [
2   {
3     "id": "4d48ad52.66bce4",
4     "type": "dgstart",
5     "name": "DGSTART",
6     "outputs": 1,
7     "x": 116,
8     "y": 72,
9     "z": "972d7ac.f66db88",
10     "wires": [
11       [
12         "66f854f4.bc80cc"
13       ]
14     ]
15   },
16   {
17     "id": "66f854f4.bc80cc",
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": 205.00003051757812,
26     "y": 162.88891220092773,
27     "z": "972d7ac.f66db88",
28     "wires": [
29       [
30         "7eee0fcc.e1d78"
31       ]
32     ]
33   },
34   {
35     "id": "7eee0fcc.e1d78",
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": 241.1112518310547,
42     "y": 233.22223663330078,
43     "z": "972d7ac.f66db88",
44     "wires": [
45       [
46         "dd17da81.f85678"
47       ]
48     ]
49   },
50   {
51     "id": "dd17da81.f85678",
52     "type": "block",
53     "name": "block : atomic",
54     "xml": "<block atomic=\"true\">\n",
55     "atomic": "false",
56     "comments": "",
57     "outputs": 1,
58     "x": 466.33343505859375,
59     "y": 232.77792358398438,
60     "z": "972d7ac.f66db88",
61     "wires": [
62       [
63         "c70a984d.cc2a48",
64         "5cf53006.e1ea9",
65         "a9f8a08c.a159f"
66       ]
67     ]
68   },
69   {
70     "id": "5cf53006.e1ea9",
71     "type": "update",
72     "name": "save network-resource",
73     "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\n",
74     "comments": "",
75     "outputs": 1,
76     "x": 696.333251953125,
77     "y": 138.00001525878906,
78     "z": "972d7ac.f66db88",
79     "wires": [
80       []
81     ]
82   },
83   {
84     "id": "bc0b4672.53b908",
85     "type": "update",
86     "name": "save pnf",
87     "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='pnf' \n      key='pnf.pnf-name = $node.node-id' >\n<parameter name='pnf-name' value='`$node.node-id`' />\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",
88     "comments": "",
89     "outputs": 1,
90     "x": 879.111141204834,
91     "y": 191.111102104187,
92     "z": "972d7ac.f66db88",
93     "wires": [
94       []
95     ]
96   },
97   {
98     "id": "a9f8a08c.a159f",
99     "type": "for",
100     "name": "for each node",
101     "xml": "<for index='pidx' start='0' end='`$network.node_length`' >\n",
102     "comments": "",
103     "outputs": 1,
104     "x": 679.8888549804688,
105     "y": 208.33331298828125,
106     "z": "972d7ac.f66db88",
107     "wires": [
108       [
109         "bc0b4672.53b908",
110         "6b3704fc.0bd35c",
111         "24e04af5.ddea66",
112         "9b1ff78d.8b3c08",
113         "8e9342c1.220f"
114       ]
115     ]
116   },
117   {
118     "id": "6b3704fc.0bd35c",
119     "type": "set",
120     "name": "set network",
121     "xml": "<set>\n<parameter name='node.' value='`$network.node[$pidx].`' />\n",
122     "comments": "",
123     "x": 893.111083984375,
124     "y": 156.2222137451172,
125     "z": "972d7ac.f66db88",
126     "wires": []
127   },
128   {
129     "id": "9b1ff78d.8b3c08",
130     "type": "save",
131     "name": "save pnf relationship to network-resource in AAI",
132     "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='pnf:relationship-list' \n      key='pnf.pnf-name = $node.node-id' 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`\" />",
133     "comments": "",
134     "outputs": 1,
135     "x": 1004.7779541015625,
136     "y": 223.44447803497314,
137     "z": "972d7ac.f66db88",
138     "wires": [
139       []
140     ]
141   },
142   {
143     "id": "8e9342c1.220f",
144     "type": "for",
145     "name": "for each termination point",
146     "xml": "<for index='tidx' start='0' end='`$node.termination-point_length`' >\n",
147     "comments": "",
148     "outputs": 1,
149     "x": 937.4444580078125,
150     "y": 339.111083984375,
151     "z": "972d7ac.f66db88",
152     "wires": [
153       [
154         "7c32bd23.da1e04",
155         "38ff90b0.67e0b",
156         "36dd756f.9a425a"
157       ]
158     ]
159   },
160   {
161     "id": "7c32bd23.da1e04",
162     "type": "set",
163     "name": "set termination point",
164     "xml": "<set>\n<parameter name='tp.' value='`$node.termination-point[$tidx].`' />\n",
165     "comments": "",
166     "x": 1204.111328125,
167     "y": 300.0000457763672,
168     "z": "972d7ac.f66db88",
169     "wires": []
170   },
171   {
172     "id": "36dd756f.9a425a",
173     "type": "update",
174     "name": "save p-interface",
175     "xml": "<save 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",
176     "comments": "",
177     "outputs": 1,
178     "x": 1187.8151397705078,
179     "y": 473.5555934906006,
180     "z": "972d7ac.f66db88",
181     "wires": [
182       [
183         "310a666a.23204a",
184         "52308d76.244944"
185       ]
186     ]
187   },
188   {
189     "id": "9b33d7c5.abef78",
190     "type": "save",
191     "name": "save pnf relationship to p-interface in AAI",
192     "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='pnf:relationship-list' \n      key='pnf.pnf-name = $node.node-id' 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/' + $node.node-id '/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`\" />",
193     "comments": "",
194     "outputs": 1,
195     "x": 1263.7038879394531,
196     "y": 562.333345413208,
197     "z": "972d7ac.f66db88",
198     "wires": [
199       []
200     ]
201   },
202   {
203     "id": "38ff90b0.67e0b",
204     "type": "set",
205     "name": "set unique-ltpId",
206     "xml": "<set>\n<parameter name='unique-ltpId' value=\"`'nodeId-' + $node.node-id + '-ltpId-' + $tp.te-tp-id`\" />\n",
207     "comments": "",
208     "x": 1188.000244140625,
209     "y": 334.1111145019531,
210     "z": "972d7ac.f66db88",
211     "wires": []
212   },
213   {
214     "id": "c70a984d.cc2a48",
215     "type": "execute",
216     "name": "execute",
217     "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    ",
218     "comments": "",
219     "outputs": 1,
220     "x": 645.9935302734375,
221     "y": 98.99349212646484,
222     "z": "972d7ac.f66db88",
223     "wires": [
224       []
225     ]
226   },
227   {
228     "id": "24e04af5.ddea66",
229     "type": "save",
230     "name": "save pnf relation with esr-thirdparty-sdnc",
231     "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",
232     "comments": "",
233     "outputs": 1,
234     "x": 986,
235     "y": 259.9934997558594,
236     "z": "972d7ac.f66db88",
237     "wires": [
238       []
239     ]
240   },
241   {
242     "id": "310a666a.23204a",
243     "type": "success",
244     "name": "success",
245     "xml": "<outcome value='success'>\n",
246     "comments": "",
247     "outputs": 1,
248     "x": 1359.4998397827148,
249     "y": 460.7460689544678,
250     "z": "972d7ac.f66db88",
251     "wires": [
252       [
253         "fcc0153a.edfd18"
254       ]
255     ]
256   },
257   {
258     "id": "52308d76.244944",
259     "type": "failure",
260     "name": "failure",
261     "xml": "<outcome value='failure'>\n",
262     "comments": "",
263     "outputs": 1,
264     "x": 1353.1784286499023,
265     "y": 512.9603805541992,
266     "z": "972d7ac.f66db88",
267     "wires": [
268       [
269         "1c6a1f1f.8e0f61"
270       ]
271     ]
272   },
273   {
274     "id": "fcc0153a.edfd18",
275     "type": "block",
276     "name": "block",
277     "xml": "<block>\n",
278     "atomic": "false",
279     "comments": "",
280     "outputs": 1,
281     "x": 1510,
282     "y": 460,
283     "z": "972d7ac.f66db88",
284     "wires": [
285       []
286     ]
287   },
288   {
289     "id": "1c6a1f1f.8e0f61",
290     "type": "update",
291     "name": "save p-interface",
292     "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",
293     "comments": "",
294     "outputs": 1,
295     "x": 1530,
296     "y": 510,
297     "z": "972d7ac.f66db88",
298     "wires": [
299       []
300     ]
301   }
302 ]