SOTN reoptimization DGs
[sdnc/oam.git] / platform-logic / generic-resource-api / src / main / json / GENERIC-RESOURCE-API_sotn-network-topology-operation-reoptimize.json
1 [
2   {
3     "id": "ba830c79.783fc",
4     "type": "dgstart",
5     "name": "DGSTART",
6     "outputs": 1,
7     "x": 112,
8     "y": 60,
9     "z": "e5bf33cc.860bc",
10     "wires": [
11       [
12         "4ae6deec.cd3f3"
13       ]
14     ]
15   },
16   {
17     "id": "4ae6deec.cd3f3",
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": 330.49999237060547,
26     "y": 140.9999928767793,
27     "z": "e5bf33cc.860bc",
28     "wires": [
29       [
30         "d2d46081.2fceb"
31       ]
32     ]
33   },
34   {
35     "id": "d2d46081.2fceb",
36     "type": "method",
37     "name": "sotn-network-topology-operation-reoptimize",
38     "xml": "<method rpc='sotn-network-topology-operation-reoptimize' mode='sync'>\n",
39     "comments": "",
40     "outputs": 1,
41     "x": 331.5,
42     "y": 194,
43     "z": "e5bf33cc.860bc",
44     "wires": [
45       [
46         "36051f70.beb8c"
47       ]
48     ]
49   },
50   {
51     "id": "36051f70.beb8c",
52     "type": "block",
53     "name": "block : atomic",
54     "xml": "<block atomic=\"true\">\n",
55     "atomic": "false",
56     "comments": "",
57     "outputs": 1,
58     "x": 409.50000762939453,
59     "y": 252.000009059906,
60     "z": "e5bf33cc.860bc",
61     "wires": [
62       [
63         "7af3f162.64be",
64         "def5a09c.a5553",
65         "ecfb074a.096988",
66         "17f9a997.150a06",
67         "a8c6638b.cba29",
68         "59b44687.021ed8"
69       ]
70     ]
71   },
72   {
73     "id": "7af3f162.64be",
74     "type": "set",
75     "name": "set tmp.network.parent-network-id,etc",
76     "xml": "<set>\n<parameter name='tmp.network.network-id' value='`$network-topology-operation-input.network-information.network-id`' />\n<parameter name='tmp.network.service-instance-id' value='`$network-topology-operation-input.service-information.service-instance-id`' />\n\n\n",
77     "comments": "",
78     "x": 757.0000152587891,
79     "y": 147.00000476837158,
80     "z": "e5bf33cc.860bc",
81     "wires": []
82   },
83   {
84     "id": "e6874582.0b2958",
85     "type": "comment",
86     "name": "set tmp connectivity-id to fetch resource from MDSAL",
87     "info": "",
88     "comments": "",
89     "x": 826.9603424072266,
90     "y": 112.03180408477783,
91     "z": "e5bf33cc.860bc",
92     "wires": []
93   },
94   {
95     "id": "def5a09c.a5553",
96     "type": "execute",
97     "name": "execute Properties",
98     "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",
99     "comments": "",
100     "outputs": 1,
101     "x": 700.9999542236328,
102     "y": 230.00000476837158,
103     "z": "e5bf33cc.860bc",
104     "wires": [
105       []
106     ]
107   },
108   {
109     "id": "5022e1ba.bc98c",
110     "type": "comment",
111     "name": "Obtain different URL, template location etc",
112     "info": "For saving resource information to MDSAL & for AAI",
113     "comments": "",
114     "x": 796.7380523681641,
115     "y": 195.22217273712158,
116     "z": "e5bf33cc.860bc",
117     "wires": []
118   },
119   {
120     "id": "ecfb074a.096988",
121     "type": "for",
122     "name": "for pidx..mdsal-psd.service-data.provided-allotted-resources.provided-allotted-resource[]",
123     "xml": "<for index='pidx' start='0' end='`$service-data.provided-allotted-resources.provided-allotted-resource_length`' >\n",
124     "comments": "",
125     "outputs": 1,
126     "x": 911.0000991821289,
127     "y": 312.0000705718994,
128     "z": "e5bf33cc.860bc",
129     "wires": [
130       [
131         "d7a2d973.f454d8"
132       ]
133     ]
134   },
135   {
136     "id": "d7a2d973.f454d8",
137     "type": "block",
138     "name": "block atomic",
139     "xml": "<block atomic=\"true\">\n",
140     "atomic": "false",
141     "comments": "",
142     "outputs": 1,
143     "x": 882.8459091186523,
144     "y": 368.224645614624,
145     "z": "e5bf33cc.860bc",
146     "wires": [
147       [
148         "23cb526c.80076e",
149         "39defcd5.3339e4",
150         "165dda1d.49d8c6",
151         "6d05051.63437fc",
152         "2355af77.170bb",
153         "c3991295.942e1",
154         "5cbe5e79.5b38f",
155         "5573aa15.2f76f4",
156         "92a8c0e.7e8084",
157         "53bd8f16.8bed2"
158       ]
159     ]
160   },
161   {
162     "id": "23cb526c.80076e",
163     "type": "set",
164     "name": "set prop.ar.provided-allotted-resource-id",
165     "xml": "<set>\n<parameter name='prop.ar.provided-allotted-resource-id' value='`$service-data.provided-allotted-resources.provided-allotted-resource[$pidx].allotted-resource-id`' />\n\n",
166     "comments": "",
167     "x": 1152.8153915405273,
168     "y": 351.02744245529175,
169     "z": "e5bf33cc.860bc",
170     "wires": []
171   },
172   {
173     "id": "39defcd5.3339e4",
174     "type": "execute",
175     "name": "generate tmp.ar-url-connection url",
176     "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n    <parameter name=\"source\" value=\"`$prop.restapi.connection-attachment-allottedresource`\"/>\n    <parameter name=\"outputPath\" value=\"tmp.ar-url-connection\"/>\n    <parameter name=\"target\" value=\"{allotted-resource-id}\"/>\n    <parameter name=\"replacement\" value='`$prop.ar.provided-allotted-resource-id`'/>\n",
177     "comments": "",
178     "outputs": 1,
179     "x": 1141.815284729004,
180     "y": 403.5724229812622,
181     "z": "e5bf33cc.860bc",
182     "wires": [
183       []
184     ]
185   },
186   {
187     "id": "165dda1d.49d8c6",
188     "type": "execute",
189     "name": "execute RestApiCallNode - get-resource connection-attachment-allotted-resource",
190     "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n    <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ar-url-connection`' />\n    <parameter name='restapiUser' value='`$prop.controller.user`' />\n    <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n    <parameter name='format' value='json' />\n    <parameter name='httpMethod' value='GET' />\n    <parameter name=\"responsePrefix\" value=\"mdsal-providedAr\" />\n",
191     "comments": "",
192     "outputs": 1,
193     "x": 1282.8151321411133,
194     "y": 459.2390090227127,
195     "z": "e5bf33cc.860bc",
196     "wires": [
197       [
198         "cd095866.b31848",
199         "1215888c.ee51e7"
200       ]
201     ]
202   },
203   {
204     "id": "cd095866.b31848",
205     "type": "success",
206     "name": "success",
207     "xml": "<outcome value='success'>\n",
208     "comments": "",
209     "outputs": 1,
210     "x": 1658.185203552246,
211     "y": 459.7611274719238,
212     "z": "e5bf33cc.860bc",
213     "wires": [
214       [
215         "7c49cfc5.d8cce"
216       ]
217     ]
218   },
219   {
220     "id": "1215888c.ee51e7",
221     "type": "other",
222     "name": "other",
223     "xml": "<outcome value='Other'>\n",
224     "comments": "",
225     "outputs": 1,
226     "x": 1650.0370063781738,
227     "y": 494.8272123336792,
228     "z": "e5bf33cc.860bc",
229     "wires": [
230       [
231         "77edea1f.976304"
232       ]
233     ]
234   },
235   {
236     "id": "7c49cfc5.d8cce",
237     "type": "block",
238     "name": "block",
239     "xml": "<block>\n",
240     "atomic": "false",
241     "comments": "",
242     "outputs": 1,
243     "x": 1789.1852989196777,
244     "y": 459.7611885070801,
245     "z": "e5bf33cc.860bc",
246     "wires": [
247       []
248     ]
249   },
250   {
251     "id": "77edea1f.976304",
252     "type": "returnFailure",
253     "name": "return failure",
254     "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"404\" />\n    <parameter name=\"error-message\" value=\"Error: Parent service data not available\" />\n    \n",
255     "comments": "",
256     "x": 1796.1857872009277,
257     "y": 494.0946235656738,
258     "z": "e5bf33cc.860bc",
259     "wires": []
260   },
261   {
262     "id": "c3991295.942e1",
263     "type": "set",
264     "name": "set model-data to input",
265     "xml": "<set>\n<parameter name='connection-attachment-topology-operation-input.allotted-resource-information.onap-model-information.' value=\"`$mdsal-providedAr.connection-attachment-allotted-resource[0].allotted-resource-data.connection-attachment-topology.onap-model-information.` \" />",
266     "comments": "",
267     "x": 1123.0001907348633,
268     "y": 594.0000371932983,
269     "z": "e5bf33cc.860bc",
270     "wires": []
271   },
272   {
273     "id": "2355af77.170bb",
274     "type": "set",
275     "name": "set connection-attachment-ar-identifiers to input",
276     "xml": "<set>\n<parameter name='connection-attachment-topology-operation-input.service-information.service-instance-id' value=\"`$mdsal-providedAr.connection-attachment-allotted-resource[0].allotted-resource-data.connection-attachment-topology.allotted-resource-identifiers.consuming-service-instance-id` \" />\n<parameter name='connection-attachment-topology-operation-input.allotted-resource-information.parent-service-instance-id' value=\"`$mdsal-providedAr.connection-attachment-allotted-resource[0].allotted-resource-data.connection-attachment-topology.allotted-resource-identifiers.parent-service-instance-id` \" />\n<parameter name='connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-type' value=\"`$mdsal-providedAr.connection-attachment-allotted-resource[0].allotted-resource-data.connection-attachment-topology.allotted-resource-identifiers.allotted-resource-type` \" />\n<parameter name='connection-attachment-topology-operation-input.allotted-resource-information.allotted-resource-id' value=\"`$mdsal-providedAr.connection-attachment-allotted-resource[0].allotted-resource-data.connection-attachment-topology.allotted-resource-identifiers.allotted-resource-id` \" />\n",
277     "comments": "",
278     "x": 1198.301872253418,
279     "y": 556.0159864425659,
280     "z": "e5bf33cc.860bc",
281     "wires": []
282   },
283   {
284     "id": "6d05051.63437fc",
285     "type": "set",
286     "name": "set ar-data to input",
287     "xml": "<set>\n<parameter name='connection-attachment-topology-operation-input.request-information.request-action' value=\"`$mdsal-providedAr.connection-attachment-allotted-resource[0].allotted-resource-status.action` \" />\n<parameter name='connection-attachment-topology-operation-input.sdnc-request-header.svc-action' value=\"`$mdsal-providedAr.connection-attachment-allotted-resource[0].allotted-resource-status.rpc-action` \" />\n<parameter name='connection-attachment-topology-operation-input.request-information.' value=\"`$mdsal-providedAr.connection-attachment-allotted-resource[0].allotted-resource-data.allotted-resource-operation-information.request-information.` \" />\n<parameter name='connection-attachment-topology-operation-input.sdnc-request-header.' value=\"`$mdsal-providedAr.connection-attachment-allotted-resource[0].allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.` \" />\n<parameter name='connection-attachment-topology-operation-input.service-information.' value=\"`$mdsal-providedAr.connection-attachment-allotted-resource[0].allotted-resource-data.allotted-resource-operation-information.service-information.` \" />\n<parameter name='connection-attachment-topology-operation-input.allotted-resource-information.' value=\"`$mdsal-providedAr.connection-attachment-allotted-resource[0].allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.` \" />\n<parameter name='connection-attachment-topology-operation-input.connection-attachment-request-input.' value=\"`$mdsal-providedAr.connection-attachment-allotted-resource[0].allotted-resource-data.allotted-resource-operation-information.connection-attachment-request-input.` \" />\n",
288     "comments": "",
289     "x": 1105.1586456298828,
290     "y": 514.8253927230835,
291     "z": "e5bf33cc.860bc",
292     "wires": []
293   },
294   {
295     "id": "53bd8f16.8bed2",
296     "type": "call",
297     "name": "call sotn-attachment-topology-operation-activate",
298     "xml": "<call module='GENERIC-RESOURCE-API' rpc='sotn-attachment-topology-operation-activate' mode='sync' >\n",
299     "comments": "",
300     "outputs": 1,
301     "x": 1199.0001945495605,
302     "y": 769.0000486373901,
303     "z": "e5bf33cc.860bc",
304     "wires": [
305       []
306     ]
307   },
308   {
309     "id": "5573aa15.2f76f4",
310     "type": "call",
311     "name": "call sotn-attachment-topology-operation-deactivate",
312     "xml": "<call module='GENERIC-RESOURCE-API' rpc='sotn-attachment-topology-operation-deactivate' mode='sync' >\n",
313     "comments": "",
314     "outputs": 1,
315     "x": 1208.0002746582031,
316     "y": 678.0000429153442,
317     "z": "e5bf33cc.860bc",
318     "wires": [
319       []
320     ]
321   },
322   {
323     "id": "92a8c0e.7e8084",
324     "type": "set",
325     "name": "set request-action and svc-action",
326     "xml": "<set>\n<parameter name='connection-attachment-topology-operation-input.sdnc-request-header.svc-action' value=\"activate\" />\n<parameter name='connection-attachment-topology-operation-input.request-information.request-action' value=\"ActivateSOTNAttachmentInstance\" />\n\n\n",
327     "comments": "",
328     "x": 1154.0002746582031,
329     "y": 723.0000457763672,
330     "z": "e5bf33cc.860bc",
331     "wires": []
332   },
333   {
334     "id": "5cbe5e79.5b38f",
335     "type": "set",
336     "name": "set request-action and svc-action",
337     "xml": "<set>\n<parameter name='connection-attachment-topology-operation-input.sdnc-request-header.svc-action' value=\"deactivate\" />\n<parameter name='connection-attachment-topology-operation-input.request-information.request-action' value=\"DeactivateSOTNAttachmentInstance\" />\n<parameter name='connection-attachment-topology-operation-input.service-information.global-customer-id' value=\"`$service-data.service-information.global-customer-id` \" />\n<parameter name='connection-attachment-topology-operation-input.service-information.subscription-service-type' value=\"`$service-data.service-information.subscription-service-type` \" />\n<parameter name='connection-attachment-topology-operation-input.service-information.subscriber-name' value=\"`$service-data.service-information.subscriber-name` \" />",
338     "comments": "",
339     "x": 1154.000114440918,
340     "y": 637.0000410079956,
341     "z": "e5bf33cc.860bc",
342     "wires": []
343   },
344   {
345     "id": "17f9a997.150a06",
346     "type": "set",
347     "name": "set service-data in tmp var",
348     "xml": "<set>\n<parameter name = 'tmp.service-data.' value=\"`$service-data.`\"/>\n",
349     "comments": "",
350     "x": 719.0001983642578,
351     "y": 266.0000944137573,
352     "z": "e5bf33cc.860bc",
353     "wires": []
354   },
355   {
356     "id": "a8c6638b.cba29",
357     "type": "set",
358     "name": "set tmp.service-data to service-data",
359     "xml": "<set>\n<parameter name = 'service-data. '  value = \"`$tmp.service-data.`\"/>\n",
360     "comments": "",
361     "x": 822.0003814697266,
362     "y": 845.0001068115234,
363     "z": "e5bf33cc.860bc",
364     "wires": []
365   },
366   {
367     "id": "59b44687.021ed8",
368     "type": "returnSuccess",
369     "name": "return success",
370     "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",
371     "comments": "",
372     "x": 743.0001831054688,
373     "y": 889.0000267028809,
374     "z": "e5bf33cc.860bc",
375     "wires": []
376   }
377 ]