Allow sub directories for graphs
[sdnc/oam.git] / platform-logic / generic-resource-api / src / main / json / GENERIC-RESOURCE-API_sdwan-network-topology-operation-create.json
1 [
2   {
3     "id": "e738f63f.208ea8",
4     "type": "dgstart",
5     "name": "DGSTART",
6     "outputs": 1,
7     "x": 87.00390625,
8     "y": 55.857561140786856,
9     "z": "d1658b32.d98238",
10     "wires": [
11       [
12         "80341a9d.8eb738"
13       ]
14     ]
15   },
16   {
17     "id": "80341a9d.8eb738",
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": 341.50390625,
26     "y": 55.857561140786856,
27     "z": "d1658b32.d98238",
28     "wires": [
29       [
30         "5110d08c.83594"
31       ]
32     ]
33   },
34   {
35     "id": "5110d08c.83594",
36     "type": "method",
37     "name": "sdwan-network-topology-operation-create",
38     "xml": "<method rpc='sdwan-network-topology-operation-create' mode='sync'>\n",
39     "comments": "",
40     "outputs": 1,
41     "x": 340.50390625,
42     "y": 155.85756114078686,
43     "z": "d1658b32.d98238",
44     "wires": [
45       [
46         "a22e3b13.76c488"
47       ]
48     ]
49   },
50   {
51     "id": "a22e3b13.76c488",
52     "type": "block",
53     "name": "block : atomic",
54     "xml": "<block atomic=\"true\">\n",
55     "atomic": "false",
56     "comments": "",
57     "outputs": 1,
58     "x": 480.50390625,
59     "y": 255.85756114078686,
60     "z": "d1658b32.d98238",
61     "wires": [
62       [
63         "f691075.4d857f8",
64         "cb88cbb7.42bd98",
65         "8ba6b398.46ed6",
66         "346ae50a.91fcda",
67         "9b181769.a4b628",
68         "e7358faf.a402d",
69         "dbb7121b.abe6a",
70         "fdf26bca.f03768",
71         "a7873db9.8b28e",
72         "d8cec38f.bc599",
73         "74be5192.2ede4"
74       ]
75     ]
76   },
77   {
78     "id": "f691075.4d857f8",
79     "type": "call",
80     "name": "call GENERIC-RESOURCE-API:validate-sdwan-network-input-parameters",
81     "xml": "<call module='GENERIC-RESOURCE-API' rpc='validate-sdwan-network-input-parameters' mode='sync' >\n",
82     "comments": "",
83     "outputs": 1,
84     "x": 910.5039176940918,
85     "y": 73.63531306339428,
86     "z": "d1658b32.d98238",
87     "wires": [
88       []
89     ]
90   },
91   {
92     "id": "cb88cbb7.42bd98",
93     "type": "record",
94     "name": "record",
95     "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.FileRecorder\">\n<parameter name=\"file\" value=\"/opt/opendaylight/current/data/log/svclogic.log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"sdwan-network-topology-operation-create\"/>\n<parameter name=\"field3\" value=\"SDWAN-Config\"/>\n",
96     "comments": "",
97     "outputs": 1,
98     "x": 704.0595626831055,
99     "y": 251.07977294921875,
100     "z": "d1658b32.d98238",
101     "wires": [
102       []
103     ]
104   },
105   {
106     "id": "8ba6b398.46ed6",
107     "type": "execute",
108     "name": "execute generate prop.sdwan.network-id",
109     "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' >\n<parameter name=\"ctx-destination\" value=\"prop.sdwan.network-id\"/>\n",
110     "comments": "",
111     "outputs": 1,
112     "x": 806.5039138793945,
113     "y": 117.63531541824341,
114     "z": "d1658b32.d98238",
115     "wires": [
116       []
117     ]
118   },
119   {
120     "id": "346ae50a.91fcda",
121     "type": "switchNode",
122     "name": "switch service-data.networks_length",
123     "xml": "<switch test='`$service-data.networks.network_length`'>\n",
124     "comments": "",
125     "outputs": 1,
126     "x": 795.0595626831055,
127     "y": 211.07977294921875,
128     "z": "d1658b32.d98238",
129     "wires": [
130       [
131         "5636a9a3.7efe68",
132         "b63f0739.980f28"
133       ]
134     ]
135   },
136   {
137     "id": "5636a9a3.7efe68",
138     "type": "other",
139     "name": "Null",
140     "xml": "<outcome value=''>\n",
141     "comments": "",
142     "outputs": 1,
143     "x": 1024.0595626831055,
144     "y": 191.07977294921875,
145     "z": "d1658b32.d98238",
146     "wires": [
147       [
148         "c36e2515.dba218"
149       ]
150     ]
151   },
152   {
153     "id": "b63f0739.980f28",
154     "type": "other",
155     "name": "other",
156     "xml": "<outcome value='Other'>\n",
157     "comments": "",
158     "outputs": 1,
159     "x": 1024.0595626831055,
160     "y": 231.07977294921875,
161     "z": "d1658b32.d98238",
162     "wires": [
163       [
164         "75983c07.a5a874"
165       ]
166     ]
167   },
168   {
169     "id": "c36e2515.dba218",
170     "type": "set",
171     "name": "set nidx",
172     "xml": "<set>\n<parameter name='nidx' value='0' />\n",
173     "comments": "",
174     "x": 1166.5595626831055,
175     "y": 191.07977294921875,
176     "z": "d1658b32.d98238",
177     "wires": []
178   },
179   {
180     "id": "99e46d9c.cb058",
181     "type": "set",
182     "name": "set nidx",
183     "xml": "<set>\n<parameter name='nidx' value='`$service-data.networks.network_length`' />\n",
184     "comments": "",
185     "x": 1300.1150817871094,
186     "y": 192.63538265228271,
187     "z": "d1658b32.d98238",
188     "wires": []
189   },
190   {
191     "id": "9b181769.a4b628",
192     "type": "set",
193     "name": "set network in service-data",
194     "xml": "<set>\n<parameter name='service-data.networks.network[$nidx].network-id' value='`$prop.sdwan.network-id`' />\n<parameter name='service-data.networks.network[$nidx].network-data.sdnc-request-header.' value='`$network-topology-operation-input.sdnc-request-header.`' />\n<parameter name='service-data.networks.network[$nidx].network-data.request-information.' value='`$network-topology-operation-input.request-information.`' />\n<parameter name='service-data.networks.network[$nidx].network-data.service-information.' value='`$network-topology-operation-input.service-information.`' />\n<parameter name='service-data.networks.network[$nidx].network-data.network-information.' value='`$network-topology-operation-input.network-information.`' />\n<parameter name='service-data.networks.network[$nidx].network-data.network-request-input.' value='`$network-topology-operation-input.network-request-input.`' />\n<parameter name='service-data.networks.network_length' value='`$nidx+1`' />\n\n",
195     "comments": "",
196     "x": 765.5595626831055,
197     "y": 291.07977294921875,
198     "z": "d1658b32.d98238",
199     "wires": []
200   },
201   {
202     "id": "e7358faf.a402d",
203     "type": "set",
204     "name": "set networkId and network-object-path",
205     "xml": "<set>\n<parameter name='networkId' value='`$prop.sdwan.network-id`' />\n<parameter name=\"network-object-path\" value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'  + $network-topology-operation-input.service-information.service-instance-id  + '/service-data/networks/network/'  + $prop.sdwan.network-id  + '/network-data/'` \" />",
206     "comments": "",
207     "x": 801.0595626831055,
208     "y": 331.07977294921875,
209     "z": "d1658b32.d98238",
210     "wires": []
211   },
212   {
213     "id": "dbb7121b.abe6a",
214     "type": "returnSuccess",
215     "name": "return success",
216     "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",
217     "comments": "",
218     "x": 725.7264022827148,
219     "y": 500.7464985847473,
220     "z": "d1658b32.d98238",
221     "wires": []
222   },
223   {
224     "id": "fdf26bca.f03768",
225     "type": "set",
226     "name": "set network-level-oper-status",
227     "xml": "<set>\n<parameter name='service-data.networks.network[$nidx].network-data.network-level-oper-status.order-status' value='Created' />\n<parameter name='service-data.networks.network[$nidx].network-data.network-level-oper-status.last-rpc-action' value='`$network-topology-operation-input.sdnc-request-header.svc-action`' />\n<parameter name='service-data.networks.network[$nidx].network-data.network-level-oper-status.last-action' value='`$network-topology-operation-input.request-information.request-action`' />",
228     "comments": "",
229     "x": 772.5595626831055,
230     "y": 371.07977294921875,
231     "z": "d1658b32.d98238",
232     "wires": []
233   },
234   {
235     "id": "713ce360.f628ac",
236     "type": "for",
237     "name": "for each existing network",
238     "xml": "<for index='idx' start='0' end='`$nidx`' >\n",
239     "comments": "",
240     "outputs": 1,
241     "x": 1169.5436248779297,
242     "y": 335.8575248424895,
243     "z": "d1658b32.d98238",
244     "wires": [
245       [
246         "eb4807cf.0d23d8"
247       ]
248     ]
249   },
250   {
251     "id": "75983c07.a5a874",
252     "type": "block",
253     "name": "block",
254     "xml": "<block>\n",
255     "atomic": "false",
256     "comments": "",
257     "outputs": 1,
258     "x": 1168.4166069030762,
259     "y": 231.01628494262695,
260     "z": "d1658b32.d98238",
261     "wires": [
262       [
263         "713ce360.f628ac",
264         "99e46d9c.cb058"
265       ]
266     ]
267   },
268   {
269     "id": "eb4807cf.0d23d8",
270     "type": "switchNode",
271     "name": "switch networkid found",
272     "xml": "<switch test=\"`$service-data.networks.network[$idx].network-id == $network-topology-operation-input.network-information.network-id`\">\n",
273     "comments": "",
274     "outputs": 1,
275     "x": 1444.829345703125,
276     "y": 335.4290275280364,
277     "z": "d1658b32.d98238",
278     "wires": [
279       [
280         "ad204630.0981b8"
281       ]
282     ]
283   },
284   {
285     "id": "ad204630.0981b8",
286     "type": "outcomeTrue",
287     "name": "true",
288     "xml": "<outcome value='true'>\n",
289     "comments": "",
290     "outputs": 1,
291     "x": 1345.5595436096191,
292     "y": 394.00045868800953,
293     "z": "d1658b32.d98238",
294     "wires": [
295       [
296         "5de29638.c9b308"
297       ]
298     ]
299   },
300   {
301     "id": "e4848432.b300d8",
302     "type": "comment",
303     "name": "make sure this network doesn't exist already",
304     "info": "",
305     "comments": "",
306     "x": 1393.1943550109863,
307     "y": 294.11158224986866,
308     "z": "d1658b32.d98238",
309     "wires": []
310   },
311   {
312     "id": "5de29638.c9b308",
313     "type": "returnFailure",
314     "name": "return failure",
315     "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=\"network-topology-operation-input.network-request-input.network-id already found in service-data\" />\n",
316     "comments": "",
317     "x": 1493.3096466064453,
318     "y": 393.85765075683594,
319     "z": "d1658b32.d98238",
320     "wires": []
321   },
322   {
323     "id": "3a8170a.8edea9",
324     "type": "block",
325     "name": "block",
326     "xml": "<block>\n",
327     "atomic": "false",
328     "comments": "",
329     "outputs": 1,
330     "x": 1459.961139678955,
331     "y": 163.6353702545166,
332     "z": "d1658b32.d98238",
333     "wires": [
334       [
335         "5e4af687.3413b8",
336         "267dff81.9df9a"
337       ]
338     ]
339   },
340   {
341     "id": "5e4af687.3413b8",
342     "type": "switchNode",
343     "name": "switch name",
344     "xml": "<switch test=\"`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'name'`\">\n",
345     "comments": "",
346     "outputs": 1,
347     "x": 1648.1829833984375,
348     "y": 145.96867442131042,
349     "z": "d1658b32.d98238",
350     "wires": [
351       [
352         "e9584cec.7c047"
353       ]
354     ]
355   },
356   {
357     "id": "e9584cec.7c047",
358     "type": "outcomeTrue",
359     "name": "true",
360     "xml": "<outcome value='true'>\n",
361     "comments": "",
362     "outputs": 1,
363     "x": 1835.1829833984375,
364     "y": 141.96867442131042,
365     "z": "d1658b32.d98238",
366     "wires": [
367       [
368         "4f9d1895.e6c898"
369       ]
370     ]
371   },
372   {
373     "id": "4f9d1895.e6c898",
374     "type": "set",
375     "name": "set name",
376     "xml": "<set>\n<parameter name='prop.name' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' />\n",
377     "comments": "",
378     "x": 1985.1831130981445,
379     "y": 140.5686810016632,
380     "z": "d1658b32.d98238",
381     "wires": []
382   },
383   {
384     "id": "267dff81.9df9a",
385     "type": "switchNode",
386     "name": "switch topology",
387     "xml": "<switch test=\"`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'topology'`\">\n",
388     "comments": "",
389     "outputs": 1,
390     "x": 1659.0226440429688,
391     "y": 185.9686725139618,
392     "z": "d1658b32.d98238",
393     "wires": [
394       [
395         "a3ecb652.b268e8"
396       ]
397     ]
398   },
399   {
400     "id": "a3ecb652.b268e8",
401     "type": "outcomeTrue",
402     "name": "true",
403     "xml": "<outcome value='true'>\n",
404     "comments": "",
405     "outputs": 1,
406     "x": 1829.0226440429688,
407     "y": 181.9686725139618,
408     "z": "d1658b32.d98238",
409     "wires": [
410       [
411         "5ddbd0bc.06582"
412       ]
413     ]
414   },
415   {
416     "id": "5ddbd0bc.06582",
417     "type": "set",
418     "name": "set topology",
419     "xml": "<set>\n<parameter name='prop.topology' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' />\n",
420     "comments": "",
421     "x": 2016.3560848236084,
422     "y": 180.42982935905457,
423     "z": "d1658b32.d98238",
424     "wires": []
425   },
426   {
427     "id": "a7873db9.8b28e",
428     "type": "for",
429     "name": "for loop i - Network input parameters",
430     "xml": "<for index=\"idx\" start=\"0\" end=\"`$network-topology-operation-input.network-request-input.network-input-parameters.param_length`\">\n",
431     "comments": "",
432     "outputs": 1,
433     "x": 797.7383041381836,
434     "y": 161.41310119628906,
435     "z": "d1658b32.d98238",
436     "wires": [
437       [
438         "3a8170a.8edea9"
439       ]
440     ]
441   },
442   {
443     "id": "3a427aaa.1513f6",
444     "type": "comment",
445     "name": "TODO: Recheck AAI schemas",
446     "info": "",
447     "comments": "",
448     "x": 769.0351867675781,
449     "y": 20,
450     "z": "d1658b32.d98238",
451     "wires": []
452   },
453   {
454     "id": "d8cec38f.bc599",
455     "type": "save",
456     "name": "save sdwan vpn resource in AAI",
457     "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='sdwan-vpn' \n      key='sdwan-vpn.sdwan-vpn-id = $prop.sdwan.network-id' >\n<parameter name='sdwan-vpn-id' value='`$prop.sdwan.network-id`' />\n<parameter name='sdwan-vpn-name' value='`$prop.name`' />\n<parameter name='topology' value='`$prop.topology`' />\n<parameter name='operational-status' value='Created' />\n<parameter name='model-customization-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-customization-uuid`' />\n<parameter name='model-invariant-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-invariant-uuid`' />\n<parameter name='model-version-id' value='`$network-topology-operation-input.network-information.onap-model-information.model-uuid`' />\n<parameter name='selflink' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'  + $network-topology-operation-input.service-information.service-instance-id  + '/service-data/networks/network/'  + $prop.sdwan.network-id  + '/network-data/'` \" />",
458     "comments": "",
459     "outputs": 1,
460     "x": 782.0038986206055,
461     "y": 410.57261514663696,
462     "z": "d1658b32.d98238",
463     "wires": [
464       []
465     ]
466   },
467   {
468     "id": "74be5192.2ede4",
469     "type": "save",
470     "name": "save service relationship in AAI",
471     "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='service-instance:relationship-list' \n      key='service-instance.service-instance-id = $service-data.service-information.service-instance-id \n         AND customer.global-customer-id = $service-data.networks.network[$nidx].network-data.service-information.global-customer-id \n         AND service-subscription.service-type = $service-data.networks.network[$nidx].network-data.service-information.subscription-service-type' \n      force=\"true\" pfx=\"tmp.AnAI-data\">\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"sdwan-vpn\" />\n<parameter name=\"relationship-list.relationship[0].related-link\" value=\"`'/network/sdwan-vpns/sdwan-vpn/' + $prop.sdwan.network-id`\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"sdwan-vpn.id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$prop.sdwan.network-id`\" />",
472     "comments": "",
473     "outputs": 1,
474     "x": 778.00390625,
475     "y": 457.57258653640747,
476     "z": "d1658b32.d98238",
477     "wires": [
478       []
479     ]
480   }
481 ]