490909320f32e32402bc12bdbdc93848fefec1d8
[sdnc/oam.git] / platform-logic / generic-resource-api / src / main / json / GENERIC-RESOURCE-API_bbs-internet-profile-network-topology-operation-create-huawei.json
1 [
2     {
3         "id": "89575381.22e988",
4         "type": "dgstart",
5         "name": "DGSTART",
6         "outputs": 1,
7         "x": 825,
8         "y": 430,
9         "z": "b2abc2ea.cc1c28",
10         "wires": [
11             [
12                 "62fc8ed2.1c1c7"
13             ]
14         ]
15     },
16     {
17         "id": "62fc8ed2.1c1c7",
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": 1184.9996490478516,
26         "y": 431.0000219345093,
27         "z": "b2abc2ea.cc1c28",
28         "wires": [
29             [
30                 "9c1ae725.2fe18"
31             ]
32         ]
33     },
34     {
35         "id": "9c1ae725.2fe18",
36         "type": "method",
37         "name": "method:bbs-internet-profile-network-topology-operation-create-huawei",
38         "xml": "<method rpc='bbs-internet-profile-network-topology-operation-create-huawei' mode='sync'>\n",
39         "comments": "",
40         "outputs": 1,
41         "x": 1182.9996643066406,
42         "y": 651.0000991821289,
43         "z": "b2abc2ea.cc1c28",
44         "wires": [
45             [
46                 "11984569.4d6beb"
47             ]
48         ]
49     },
50     {
51         "id": "11984569.4d6beb",
52         "type": "block",
53         "name": "block : atomic",
54         "xml": "<block atomic=\"true\">\n",
55         "atomic": "false",
56         "comments": "",
57         "outputs": 1,
58         "x": 1606.9998626708984,
59         "y": 650.0000991821289,
60         "z": "b2abc2ea.cc1c28",
61         "wires": [
62             [
63                 "673fbee.7c17dc",
64                 "3a7cb4b2.9f805c",
65                 "9d9c04a.550a178",
66                 "7117f977.4492b8"
67             ]
68         ]
69     },
70     {
71         "id": "673fbee.7c17dc",
72         "type": "call",
73         "name": "call:bbs-internet-profile-network-topology-operation-common-huawei",
74         "xml": "<call module='GENERIC-RESOURCE-API' rpc='bbs-internet-profile-network-topology-operation-common-huawei' mode='sync' >\n",
75         "comments": "",
76         "outputs": 1,
77         "x": 2123.0001525878906,
78         "y": 563.0000190734863,
79         "z": "b2abc2ea.cc1c28",
80         "wires": [
81             []
82         ]
83     },
84     {
85         "id": "3a7cb4b2.9f805c",
86         "type": "execute",
87         "name": "execute:CreateInternetProfileInstance",
88         "xml": "<execute plugin=\"org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode\" method=\"sendRequest\">\n    <parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/bbs-internet-profile-operation.json'`\" />\n    <parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/CreateInternetProfileInstance'`\" />\n    <parameter name=\"contentType\" value=\"application/json\"/>\n    <parameter name=\"httpMethod\" value=\"post\"/>\n    <parameter name=\"responsePrefix\" value=\"service-result\"/>",
89         "comments": "",
90         "outputs": 1,
91         "x": 2012.6507873535156,
92         "y": 648.9608345031738,
93         "z": "b2abc2ea.cc1c28",
94         "wires": [
95             [
96                 "5cb835fe.0ebfdc",
97                 "4e297705.0757e8"
98             ]
99         ]
100     },
101     {
102         "id": "4e297705.0757e8",
103         "type": "outcome",
104         "name": "failure",
105         "xml": "<outcome value='failure'>\n",
106         "comments": "",
107         "outputs": 1,
108         "x": 2313.9837684631348,
109         "y": 648.9608345031738,
110         "z": "b2abc2ea.cc1c28",
111         "wires": [
112             [
113                 "340c0c87.92c8b4"
114             ]
115         ]
116     },
117     {
118         "id": "5cb835fe.0ebfdc",
119         "type": "outcome",
120         "name": "success",
121         "xml": "<outcome value='success'>\n",
122         "comments": "",
123         "outputs": 1,
124         "x": 2322.9836807250977,
125         "y": 723.9608364105225,
126         "z": "b2abc2ea.cc1c28",
127         "wires": [
128             [
129                 "8f2db25f.f4b24"
130             ]
131         ]
132     },
133     {
134         "id": "8f2db25f.f4b24",
135         "type": "switchNode",
136         "name": "switch:service-result",
137         "xml": "<switch test=\"`$service-result.errors.error[0].error-message`\">\n",
138         "comments": "",
139         "outputs": 1,
140         "x": 2557.999801635742,
141         "y": 723.0001316070557,
142         "z": "b2abc2ea.cc1c28",
143         "wires": [
144             [
145                 "d3ab0cf2.457f3",
146                 "dee7fa1f.4d78b"
147             ]
148         ]
149     },
150     {
151         "id": "340c0c87.92c8b4",
152         "type": "returnFailure",
153         "name": "return failure",
154         "xml": "<return status='failure'>\n<parameter name='ack-final' value='Y'/>\n<parameter name=\"error-code\" value=\"500\" />\n<parameter name=\"error-message\" value=\"Error failed to call CreateInternetProfileInstance\" />\n",
155         "comments": "",
156         "x": 2826.250898361206,
157         "y": 649.250337600708,
158         "z": "b2abc2ea.cc1c28",
159         "wires": []
160     },
161     {
162         "id": "d3ab0cf2.457f3",
163         "type": "outcome",
164         "name": "Other",
165         "xml": "<outcome value='Other'>\n",
166         "comments": "",
167         "outputs": 1,
168         "x": 2784.000141143799,
169         "y": 724.0002250671387,
170         "z": "b2abc2ea.cc1c28",
171         "wires": [
172             [
173                 "957b2d71.78c288"
174             ]
175         ]
176     },
177     {
178         "id": "dee7fa1f.4d78b",
179         "type": "outcome",
180         "name": "NULL",
181         "xml": "<outcome value=''>\n",
182         "comments": "",
183         "outputs": 1,
184         "x": 2793.9998474121094,
185         "y": 810.0000915527344,
186         "z": "b2abc2ea.cc1c28",
187         "wires": [
188             [
189                 "e5fb5f82.18f85"
190             ]
191         ]
192     },
193     {
194         "id": "957b2d71.78c288",
195         "type": "returnFailure",
196         "name": "return failure",
197         "xml": "<return status='failure'>\n<parameter name='ack-final' value='Y'/>\n<parameter name=\"error-code\" value=\"500\" />\n<parameter name=\"error-message\" value=\"`'Error CreateInternetProfileInstance return: '+$service-result.errors.error[0].error-message`\" />\n\n",
198         "comments": "",
199         "x": 2970.4998092651367,
200         "y": 724.0000619888306,
201         "z": "b2abc2ea.cc1c28",
202         "wires": []
203     },
204     {
205         "id": "e5fb5f82.18f85",
206         "type": "block",
207         "name": "block",
208         "xml": "<block>\n",
209         "atomic": "false",
210         "comments": "",
211         "outputs": 1,
212         "x": 2952.166477203369,
213         "y": 811.0000667572021,
214         "z": "b2abc2ea.cc1c28",
215         "wires": [
216             []
217         ]
218     },
219     {
220         "id": "9d9c04a.550a178",
221         "type": "returnSuccess",
222         "name": "return success",
223         "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",
224         "comments": "",
225         "x": 1917.4999237060547,
226         "y": 1448.000192642212,
227         "z": "b2abc2ea.cc1c28",
228         "wires": []
229     },
230     {
231         "id": "c44ed27a.d90d8",
232         "type": "save",
233         "name": "save:generic-vnf",
234         "xml": "<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" resource=\"generic-vnf\" key=\"generic-vnf.vnf-id = $vnf-id\" >\n<parameter name= \"vnf-id\" value = \"`$vnf-id`\"/>\n<parameter name=  \"vnf-name\" value = \"`$vnf-name`\"/>\n<parameter name=  \"vnf-type\" value = \"InternetProfile\"/>\n<parameter name=  \"service-id\" value = \"`$network-topology-operation-input.service-information.service-id`\"/><!--to be clarified,service-id different from service-instance-id -->\n<parameter name=  \"prov-status\" value = \"ACTIVE\"/>\n<parameter name=  \"orchestration-status\" value = \"Active\"/>\n<parameter name=  \"ipv4-oam-address\" value = \"169.254.236.13\"/>\n<parameter name=  \"in-maint\" value = \"false\" />\n<parameter name=  \"is-closed-loop-disabled\" value = \"false\" />\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=  \"model-customization-id\" value = \"`$network-topology-operation-input.network-information.onap-model-information.model-customization-uuid`\"/>",
235         "comments": "",
236         "outputs": 1,
237         "x": 2196.0312366485596,
238         "y": 1114.031213760376,
239         "z": "b2abc2ea.cc1c28",
240         "wires": [
241             [
242                 "30abcda.3452c32",
243                 "d057da2e.575678",
244                 "d2286b35.a71d48"
245             ]
246         ]
247     },
248     {
249         "id": "30abcda.3452c32",
250         "type": "failure",
251         "name": "failure",
252         "xml": "<outcome value='failure'>\n",
253         "comments": "",
254         "outputs": 1,
255         "x": 2432.253091812134,
256         "y": 985.9199714660645,
257         "z": "b2abc2ea.cc1c28",
258         "wires": [
259             [
260                 "819a16a6.0c9978"
261             ]
262         ]
263     },
264     {
265         "id": "d057da2e.575678",
266         "type": "failure",
267         "name": "not-found",
268         "xml": "<outcome value='not-found'>\n",
269         "comments": "",
270         "outputs": 1,
271         "x": 2443.228910446167,
272         "y": 1045.9358277320862,
273         "z": "b2abc2ea.cc1c28",
274         "wires": [
275             [
276                 "c90efb31.bd2ff8"
277             ]
278         ]
279     },
280     {
281         "id": "819a16a6.0c9978",
282         "type": "returnFailure",
283         "name": "return failure",
284         "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=\"Failure calling AAI to save generic-vnf\" />\n",
285         "comments": "",
286         "x": 2668.3956394195557,
287         "y": 985.4914364814758,
288         "z": "b2abc2ea.cc1c28",
289         "wires": []
290     },
291     {
292         "id": "c90efb31.bd2ff8",
293         "type": "returnFailure",
294         "name": "return failure",
295         "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=\"generic-vnf instance does not exist in AAI\" />\n",
296         "comments": "",
297         "x": 2663.2764377593994,
298         "y": 1046.412142276764,
299         "z": "b2abc2ea.cc1c28",
300         "wires": []
301     },
302     {
303         "id": "d2286b35.a71d48",
304         "type": "outcome",
305         "name": "success",
306         "xml": "<outcome value='success'>\n",
307         "comments": "",
308         "outputs": 1,
309         "x": 2436.8397159576416,
310         "y": 1111.0623078346252,
311         "z": "b2abc2ea.cc1c28",
312         "wires": [
313             [
314                 "cc6c45ae.c943c8"
315             ]
316         ]
317     },
318     {
319         "id": "cc6c45ae.c943c8",
320         "type": "record",
321         "name": "log file",
322         "xml": " <record plugin=\"org.onap.ccsdk.sli.core.sli.recording.FileRecorder\">\n    <parameter name=\"file\" value=\"/opt/oak/logx.txt\" />\n    <parameter name=\"field1\" value=\"save generic-vnf success!\" />\n    ",
323         "comments": "",
324         "outputs": 1,
325         "x": 2644.8399696350098,
326         "y": 1109.0624370574951,
327         "z": "b2abc2ea.cc1c28",
328         "wires": [
329             []
330         ]
331     },
332     {
333         "id": "b746f152.4e5ac",
334         "type": "save",
335         "name": "save:metadata",
336         "xml": "<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" resource=\"service-instance:metadata\"\n key=\"service-instance.service-instance-id = $network-topology-operation-input.service-information.service-id  \n\tAND customer.global-customer-id = $network-topology-operation-input.service-information.global-customer-id\n\t  AND service-subscription.service-type = $network-topology-operation-input.service-information.subscription-service-type\n\t  AND service-instance.service-instance-id =  $network-topology-operation-input.service-information.service-instance-id\"  force=\"true\" pfx=\"tmp.AnAI-data\">\n    <parameter name=\"metadata.metadatum[0].metaname\" value=\"service-type\" />\n    <parameter name=\"metadata.metadatum[0].metaval\" value=\"`$prop.bbs.service_type`\" />\n    <parameter name=\"metadata.metadatum[1].metaname\" value=\"up-speed\" />\n    <parameter name=\"metadata.metadatum[1].metaval\" value=\"`$prop.bbs.up_speed`\" />\n    <parameter name=\"metadata.metadatum[2].metaname\" value=\"down-speed\" />\n    <parameter name=\"metadata.metadatum[2].metaval\" value=\"`$prop.bbs.down_speed`\" />\n    <parameter name=\"metadata.metadatum[3].metaname\" value=\"cvlan\" />\n    <parameter name=\"metadata.metadatum[3].metaval\" value=\"`$prop.bbs.c_vlan`\" />\n    <parameter name=\"metadata.metadatum[4].metaname\" value=\"svlan\" />\n    <parameter name=\"metadata.metadatum[4].metaval\" value=\"`$prop.bbs.s_vlan`\" />\n    <parameter name=\"metadata.metadatum[5].metaname\" value=\"expected-ont-id\" />\n    <parameter name=\"metadata.metadatum[5].metaval\" value=\"`$prop.bbs.ont_sn`\" />\n    <parameter name=\"metadata.metadatum[6].metaname\" value=\"rgw-mac-address\" />\n    <parameter name=\"metadata.metadatum[6].metaval\" value=\"`$prop.bbs.mac`\" />",
337         "comments": "",
338         "outputs": 1,
339         "x": 2194.5305881500244,
340         "y": 1266.0309810638428,
341         "z": "b2abc2ea.cc1c28",
342         "wires": [
343             [
344                 "260fcebb.248022",
345                 "e5ef08e9.671048",
346                 "a5459cad.aad38"
347             ]
348         ]
349     },
350     {
351         "id": "260fcebb.248022",
352         "type": "failure",
353         "name": "failure",
354         "xml": "<outcome value='failure'>\n",
355         "comments": "",
356         "outputs": 1,
357         "x": 2425.006097793579,
358         "y": 1197.3955845832825,
359         "z": "b2abc2ea.cc1c28",
360         "wires": [
361             [
362                 "e624300e.f97b6"
363             ]
364         ]
365     },
366     {
367         "id": "e5ef08e9.671048",
368         "type": "failure",
369         "name": "not-found",
370         "xml": "<outcome value='not-found'>\n",
371         "comments": "",
372         "outputs": 1,
373         "x": 2436.982259750366,
374         "y": 1267.4115180969238,
375         "z": "b2abc2ea.cc1c28",
376         "wires": [
377             [
378                 "15c9d9c7.1da386"
379             ]
380         ]
381     },
382     {
383         "id": "e624300e.f97b6",
384         "type": "returnFailure",
385         "name": "return failure",
386         "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=\"Failure calling AAI to save metadatum\" />\n",
387         "comments": "",
388         "x": 2665.1488933563232,
389         "y": 1195.967086315155,
390         "z": "b2abc2ea.cc1c28",
391         "wires": []
392     },
393     {
394         "id": "15c9d9c7.1da386",
395         "type": "returnFailure",
396         "name": "return failure",
397         "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=\"metadatum instance does not exist in AAI\" />\n",
398         "comments": "",
399         "x": 2662.0297927856445,
400         "y": 1266.8877544403076,
401         "z": "b2abc2ea.cc1c28",
402         "wires": []
403     },
404     {
405         "id": "a5459cad.aad38",
406         "type": "outcome",
407         "name": "success",
408         "xml": "<outcome value='success'>\n",
409         "comments": "",
410         "outputs": 1,
411         "x": 2431.592969894409,
412         "y": 1337.5379576683044,
413         "z": "b2abc2ea.cc1c28",
414         "wires": [
415             [
416                 "6f08d5bf.9a889c"
417             ]
418         ]
419     },
420     {
421         "id": "6f08d5bf.9a889c",
422         "type": "record",
423         "name": "log file",
424         "xml": " <record plugin=\"org.onap.ccsdk.sli.core.sli.recording.FileRecorder\">\n    <parameter name=\"file\" value=\"/opt/oak/logx.txt\" />\n    <parameter name=\"field1\" value=\"save metadatum success!\" />\n    ",
425         "comments": "",
426         "outputs": 1,
427         "x": 2642.592969894409,
428         "y": 1337.5379576683044,
429         "z": "b2abc2ea.cc1c28",
430         "wires": [
431             []
432         ]
433     },
434     {
435         "id": "7117f977.4492b8",
436         "type": "block",
437         "name": "block",
438         "xml": "<block>\n",
439         "atomic": "false",
440         "comments": "",
441         "outputs": 1,
442         "x": 1891.164836883545,
443         "y": 987.9997653961182,
444         "z": "b2abc2ea.cc1c28",
445         "wires": [
446             [
447                 "c44ed27a.d90d8",
448                 "b746f152.4e5ac",
449                 "d803f78c.61a4a8",
450                 "a1487411.171428"
451             ]
452         ]
453     },
454     {
455         "id": "d803f78c.61a4a8",
456         "type": "set",
457         "name": "set:variables",
458         "xml": "<set>\n<parameter name='vnf-id' value=\"`$prop.random-data-list[3]`\"/>\n<parameter name='vnf-name' value=\"`'vnf-'+$prop.random-data-list[4]`\"/>\n",
459         "comments": "",
460         "x": 2179.1651859283447,
461         "y": 984.332763671875,
462         "z": "b2abc2ea.cc1c28",
463         "wires": []
464     },
465     {
466         "id": "a1487411.171428",
467         "type": "execute",
468         "name": "execute:generate",
469         "xml": " <execute plugin=\"org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils\" method=\"generateUUID\">\n    <parameter name=\"ctx-destination\" value=\"prop.random-data\"/>",
470         "comments": "",
471         "outputs": 1,
472         "x": 2200.529399871826,
473         "y": 910.030613899231,
474         "z": "b2abc2ea.cc1c28",
475         "wires": [
476             [
477                 "916e0fd0.b9f37"
478             ]
479         ]
480     },
481     {
482         "id": "916e0fd0.b9f37",
483         "type": "success",
484         "name": "success",
485         "xml": "<outcome value='success'>\n",
486         "comments": "",
487         "outputs": 1,
488         "x": 2429.529342651367,
489         "y": 911.0305881500244,
490         "z": "b2abc2ea.cc1c28",
491         "wires": [
492             [
493                 "8e69817d.115b9"
494             ]
495         ]
496     },
497     {
498         "id": "8e69817d.115b9",
499         "type": "execute",
500         "name": "execute",
501         "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >\n    <parameter name=\"ctx_memory_result_key\" value=\"prop.random-data-list\"/>\n    <parameter name=\"original_string\" value=\"`$prop.random-data`\"/>\n    <parameter name=\"regex\" value=\"-\"/>\n",
502         "comments": "",
503         "outputs": 1,
504         "x": 2620.529399871826,
505         "y": 909.0305881500244,
506         "z": "b2abc2ea.cc1c28",
507         "wires": [
508             [
509                 "52b18bce.20b054"
510             ]
511         ]
512     },
513     {
514         "id": "3a61e04b.9260a",
515         "type": "record",
516         "name": "log file",
517         "xml": " <record plugin=\"org.onap.ccsdk.sli.core.sli.recording.FileRecorder\">\n    <parameter name=\"file\" value=\"/opt/oak/logx.txt\" />\n    <parameter name=\"field1\" value=\"`$prop.random-data`\" />\n    ",
518         "comments": "",
519         "outputs": 1,
520         "x": 2952.529462814331,
521         "y": 907.0306491851807,
522         "z": "b2abc2ea.cc1c28",
523         "wires": [
524             []
525         ]
526     },
527     {
528         "id": "52b18bce.20b054",
529         "type": "outcome",
530         "name": "success",
531         "xml": "<outcome value='success'>\n",
532         "comments": "",
533         "outputs": 1,
534         "x": 2787.52933883667,
535         "y": 908.0306186676025,
536         "z": "b2abc2ea.cc1c28",
537         "wires": [
538             [
539                 "3a61e04b.9260a"
540             ]
541         ]
542     }
543 ]