Add generic-resource-api DG seed code
[sdnc/oam.git] / platform-logic / generic-resource-api / src / main / json / GENERIC-RESOURCE-API_generate-l3network-network-id.json
1 [
2     {
3         "id": "32a337db.ae5aa8",
4         "type": "execute",
5         "name": "execute: generateUUID",
6         "xml": "<execute plugin=\"com.att.sdnctl.sli.SliPluginUtils.SliPluginUtils\" method=\"generateUUID\" >\n\t<parameter name=\"ctx-destination\" value=\"tmp.return.generate-l3network-network-id.uuid\" />",
7         "comments": "",
8         "outputs": 1,
9         "x": 475.8888854980469,
10         "y": 396.50000381469727,
11         "z": "ed9b1fd8.6f0a7",
12         "wires": [
13             [
14                 "aee3b0da.c79fb"
15             ]
16         ]
17     },
18     {
19         "id": "aee3b0da.c79fb",
20         "type": "failure",
21         "name": "failure",
22         "xml": "<outcome value='failure'>\n",
23         "comments": "",
24         "outputs": 1,
25         "x": 671.6388931274414,
26         "y": 396.50000381469727,
27         "z": "ed9b1fd8.6f0a7",
28         "wires": [
29             [
30                 "2e6b8196.18f09e"
31             ]
32         ]
33     },
34     {
35         "id": "2e6b8196.18f09e",
36         "type": "returnFailure",
37         "name": "return failure",
38         "xml": "<return status='failure'>\n\t<!-- Used to work around execute node bug -->\n\t<parameter name=\"execute_failure\" value=\"false\" />\n\n\t<!-- return parameters -->\n\t<parameter name=\"error-message.generate-l3network-network-id\" value=\"An error occured while generating a UUID for L3-NETWORK.\" />",
39         "comments": "",
40         "x": 836.6388931274414,
41         "y": 396.7500009536743,
42         "z": "ed9b1fd8.6f0a7",
43         "wires": []
44     },
45     {
46         "id": "19e3e967.c281b7",
47         "type": "get-resource",
48         "name": "Query AnAI -  l3-network",
49         "xml": "<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\"\n              resource=\"l3-network\"\n              key=\"l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid\"\n              local-only=\"false\"\n              pfx=\"tmp.local-variables.generate-l3network-network-id.L3NETWORK\" >",
50         "comments": "",
51         "outputs": 1,
52         "x": 601.1388931274414,
53         "y": 487.7500009536743,
54         "z": "ed9b1fd8.6f0a7",
55         "wires": [
56             [
57                 "2807c6fa.8fbd4a",
58                 "94e9ced3.238",
59                 "4ecb327.82397cc",
60                 "a2e8b62.4d66748"
61             ]
62         ]
63     },
64     {
65         "id": "c1a23e2e.3f106",
66         "type": "for",
67         "name": "for n: true",
68         "xml": "<for atomic=\"true\" index=\"n\" start=\"0\" end=\"1\" >",
69         "comments": "",
70         "outputs": 1,
71         "x": 425.1388931274414,
72         "y": 487.7500009536743,
73         "z": "ed9b1fd8.6f0a7",
74         "wires": [
75             [
76                 "19e3e967.c281b7"
77             ]
78         ]
79     },
80     {
81         "id": "2807c6fa.8fbd4a",
82         "type": "success",
83         "name": "success",
84         "xml": "<outcome value='success'>\n",
85         "comments": "",
86         "outputs": 1,
87         "x": 805.6388931274414,
88         "y": 487.7500009536743,
89         "z": "ed9b1fd8.6f0a7",
90         "wires": [
91             [
92                 "6fcc46f3.9af1a8"
93             ]
94         ]
95     },
96     {
97         "id": "94e9ced3.238",
98         "type": "failure",
99         "name": "failure",
100         "xml": "<outcome value='failure'>\n",
101         "comments": "",
102         "outputs": 1,
103         "x": 801.6388931274414,
104         "y": 567.7500009536743,
105         "z": "ed9b1fd8.6f0a7",
106         "wires": [
107             [
108                 "537fe43b.f1146c"
109             ]
110         ]
111     },
112     {
113         "id": "4ecb327.82397cc",
114         "type": "not-found",
115         "name": "not-found",
116         "xml": "<outcome value='not-found'>\n",
117         "comments": "",
118         "outputs": 1,
119         "x": 810.6388931274414,
120         "y": 527.7500009536743,
121         "z": "ed9b1fd8.6f0a7",
122         "wires": [
123             [
124                 "4292e2a6.5346ac"
125             ]
126         ]
127     },
128     {
129         "id": "537fe43b.f1146c",
130         "type": "returnFailure",
131         "name": "return failure",
132         "xml": "<return status=\"failure\">\n\t<!-- return parameters -->\n\t<parameter name=\"error-message.generate-l3network-network-id\" value=\"`'An error occured while checking if a generated l3network-network-id was unique. network-id = ' + $tmp.local-variables.generate-l3network-network-id.uuid`\" />",
133         "comments": "",
134         "x": 968.1389007568359,
135         "y": 592.7500066757202,
136         "z": "ed9b1fd8.6f0a7",
137         "wires": []
138     },
139     {
140         "id": "6fcc46f3.9af1a8",
141         "type": "block",
142         "name": "block : atomic",
143         "xml": "<block atomic='true'>",
144         "atomic": "true",
145         "comments": "",
146         "outputs": 1,
147         "x": 963.6388931274414,
148         "y": 487.7500009536743,
149         "z": "ed9b1fd8.6f0a7",
150         "wires": [
151             [
152                 "17797a19.8abea6",
153                 "4e358d48.be92b4"
154             ]
155         ]
156     },
157     {
158         "id": "17797a19.8abea6",
159         "type": "set",
160         "name": "set: ...local...is-unique = 0",
161         "xml": "<set>\n\t<parameter name=\"tmp.local-variables.generate-l3network-network-id.is-unique\" value=\"0\" />",
162         "comments": "",
163         "x": 1181.1389465332031,
164         "y": 487.7500066757202,
165         "z": "ed9b1fd8.6f0a7",
166         "wires": []
167     },
168     {
169         "id": "4e358d48.be92b4",
170         "type": "execute",
171         "name": "execute: generateUUID",
172         "xml": "<execute plugin=\"com.att.sdnctl.sli.SliPluginUtils.SliPluginUtils\" method=\"generateUUID\" >\n\t<parameter name=\"ctx-destination\" value=\"tmp.return.generate-l3network-network-id.uuid\" />",
173         "comments": "",
174         "outputs": 1,
175         "x": 1174.6388931274414,
176         "y": 527.7500009536743,
177         "z": "ed9b1fd8.6f0a7",
178         "wires": [
179             [
180                 "4cf76132.02956"
181             ]
182         ]
183     },
184     {
185         "id": "4cf76132.02956",
186         "type": "failure",
187         "name": "failure",
188         "xml": "<outcome value='failure'>\n",
189         "comments": "",
190         "outputs": 1,
191         "x": 1361.6388931274414,
192         "y": 527.7500009536743,
193         "z": "ed9b1fd8.6f0a7",
194         "wires": [
195             [
196                 "dea8bdbf.c6534"
197             ]
198         ]
199     },
200     {
201         "id": "dea8bdbf.c6534",
202         "type": "returnFailure",
203         "name": "return failure",
204         "xml": "<return status=\"failure\">\n\t<!-- return parameters -->\n\t<parameter name=\"error-message.generate-l3network-network-id\" value=\"An error occured while generating a UUID for L3-NETWORK.\" />",
205         "comments": "",
206         "x": 1515.6388931274414,
207         "y": 527.7500009536743,
208         "z": "ed9b1fd8.6f0a7",
209         "wires": []
210     },
211     {
212         "id": "4292e2a6.5346ac",
213         "type": "block",
214         "name": "block",
215         "xml": "<block>",
216         "atomic": "false",
217         "comments": "",
218         "outputs": 1,
219         "x": 941.6388931274414,
220         "y": 527.7500009536743,
221         "z": "ed9b1fd8.6f0a7",
222         "wires": [
223             []
224         ]
225     },
226     {
227         "id": "dfc540f2.ccff2",
228         "type": "dgstart",
229         "name": "DGSTART",
230         "outputs": 1,
231         "x": 182.13888931274414,
232         "y": 84,
233         "z": "ed9b1fd8.6f0a7",
234         "wires": [
235             [
236                 "b386b9cc.e3d508"
237             ]
238         ]
239     },
240     {
241         "id": "b386b9cc.e3d508",
242         "type": "service-logic",
243         "name": "GENERIC-RESOURCE-API ${project.version}",
244         "module": "GENERIC-RESOURCE-API",
245         "version": "${project.version}",
246         "comments": "",
247         "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}'>",
248         "outputs": 1,
249         "x": 206.13888549804688,
250         "y": 130.25,
251         "z": "ed9b1fd8.6f0a7",
252         "wires": [
253             [
254                 "a7f05089.bec56"
255             ]
256         ]
257     },
258     {
259         "id": "a7f05089.bec56",
260         "type": "method",
261         "name": "method generate-l3network-network-id",
262         "xml": "<method rpc=\"generate-l3network-network-id\" mode=\"sync\">",
263         "comments": "",
264         "outputs": 1,
265         "x": 291.8888854980469,
266         "y": 182.75,
267         "z": "ed9b1fd8.6f0a7",
268         "wires": [
269             [
270                 "34f40852.137a58"
271             ]
272         ]
273     },
274     {
275         "id": "f5b14600.c43d28",
276         "type": "comment",
277         "name": "GENERIC-RESOURCE-API: GENERATE-L3NETWORK-NETWORK-ID",
278         "info": "",
279         "comments": "",
280         "x": 733.6389007568359,
281         "y": 90.24999809265137,
282         "z": "ed9b1fd8.6f0a7",
283         "wires": []
284     },
285     {
286         "id": "34f40852.137a58",
287         "type": "block",
288         "name": "block : atomic",
289         "xml": "<block atomic=\"true\">",
290         "atomic": "true",
291         "comments": "",
292         "outputs": 1,
293         "x": 243.6388931274414,
294         "y": 307.7500009536743,
295         "z": "ed9b1fd8.6f0a7",
296         "wires": [
297             [
298                 "32a337db.ae5aa8",
299                 "c1a23e2e.3f106",
300                 "6d1bc386.49356c",
301                 "2d49b311.80b8cc"
302             ]
303         ]
304     },
305     {
306         "id": "de1da0bf.8163b",
307         "type": "comment",
308         "name": "LOOP UNTIL GENERATED NETWORK-ID ISN'T FOUND IN A&AI",
309         "info": "",
310         "comments": "",
311         "x": 644.8888854980469,
312         "y": 444.0000047683716,
313         "z": "ed9b1fd8.6f0a7",
314         "wires": []
315     },
316     {
317         "id": "6ed54c0.6154fb4",
318         "type": "comment",
319         "name": "GENERATE A NETWORK-ID",
320         "info": "",
321         "comments": "",
322         "x": 508.6388854980469,
323         "y": 354.00000286102295,
324         "z": "ed9b1fd8.6f0a7",
325         "wires": []
326     },
327     {
328         "id": "6d1bc386.49356c",
329         "type": "set",
330         "name": "unset: local-variables & return",
331         "xml": "<set>\n\t<parameter name=\"tmp.local-variables.generate-l3network-network-id.\" value=\"\" />\n\t<parameter name=\"tmp.return.generate-l3network-network-id.\" value=\"\" />",
332         "comments": "",
333         "x": 494.6388931274414,
334         "y": 307.7500009536743,
335         "z": "ed9b1fd8.6f0a7",
336         "wires": []
337     },
338     {
339         "id": "b0ae69a3.56e508",
340         "type": "comment",
341         "name": "CLEANUP LOCAL VARIABLES TO BE USED",
342         "info": "",
343         "comments": "",
344         "x": 578.8888854980469,
345         "y": 264.00000190734863,
346         "z": "ed9b1fd8.6f0a7",
347         "wires": []
348     },
349     {
350         "id": "5a56764d.91fa68",
351         "type": "comment",
352         "name": "GLOBAL VARIABLES USED",
353         "info": "// RETURN VALUES\nerror-message.generate-l3network-network-id\ntmp.return.generate-l3network-network-id.uuid\n\n// LOCAL VARIABLES (erased at beginning & end of DG)\ntmp.local-variables.generate-l3network-network-id.*\ntmp.return.generate-l3network-network-id.*\n",
354         "comments": "",
355         "x": 720.138916015625,
356         "y": 130.24999809265137,
357         "z": "ed9b1fd8.6f0a7",
358         "wires": []
359     },
360     {
361         "id": "2d49b311.80b8cc",
362         "type": "set",
363         "name": "unset: local-variables & return",
364         "xml": "<set>\n\t<parameter name=\"tmp.local-variables.generate-l3network-network-id.\" value=\"\" />",
365         "comments": "",
366         "x": 494.6388931274414,
367         "y": 587.7500009536743,
368         "z": "ed9b1fd8.6f0a7",
369         "wires": []
370     },
371     {
372         "id": "979528d.92883d8",
373         "type": "comment",
374         "name": "CLEANUP LOCAL VARIABLES",
375         "info": "",
376         "comments": "",
377         "x": 536.1388854980469,
378         "y": 545.2500057220459,
379         "z": "ed9b1fd8.6f0a7",
380         "wires": []
381     },
382     {
383         "id": "a2e8b62.4d66748",
384         "type": "other",
385         "name": "Other",
386         "xml": "<outcome value=\"Other\">",
387         "comments": "",
388         "outputs": 1,
389         "x": 801.6388931274414,
390         "y": 607.7500009536743,
391         "z": "ed9b1fd8.6f0a7",
392         "wires": [
393             [
394                 "537fe43b.f1146c"
395             ]
396         ]
397     }
398 ]