1dd2f32009ad4ac066fc98f07af15dc6f031ad34
[sdnc/oam.git] / platform-logic / generic-resource-api / src / main / json / GENERIC-RESOURCE-API_bbs-access-connectivity-network-topology-operation-delete-huawei.json
1 [
2     {
3         "id": "32e79365.f9a674",
4         "type": "dgstart",
5         "name": "DGSTART",
6         "outputs": 1,
7         "x": 585,
8         "y": 664,
9         "z": "e7492f37.77e028",
10         "wires": [
11             [
12                 "b127d6e2.ff9c7"
13             ]
14         ]
15     },
16     {
17         "id": "b127d6e2.ff9c7",
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": 972.9998817443848,
26         "y": 664.0000047683716,
27         "z": "e7492f37.77e028",
28         "wires": [
29             [
30                 "2c85dd35.2b753a"
31             ]
32         ]
33     },
34     {
35         "id": "2c85dd35.2b753a",
36         "type": "method",
37         "name": "method:bbs-access-connectivity-network-topology-operation-delete-huawei",
38         "xml": "<method rpc='bbs-access-connectivity-network-topology-operation-delete-huawei' mode='sync'>\n",
39         "comments": "",
40         "outputs": 1,
41         "x": 935.9998817443848,
42         "y": 783.0000047683716,
43         "z": "e7492f37.77e028",
44         "wires": [
45             [
46                 "ef9e0c93.94adf8"
47             ]
48         ]
49     },
50     {
51         "id": "ef9e0c93.94adf8",
52         "type": "block",
53         "name": "block : atomic",
54         "xml": "<block atomic=\"true\">\n",
55         "atomic": "false",
56         "comments": "",
57         "outputs": 1,
58         "x": 1333.9999885559082,
59         "y": 782.0000047683716,
60         "z": "e7492f37.77e028",
61         "wires": [
62             [
63                 "267997b8.e9b0d",
64                 "f1c69874.61cb9",
65                 "7e468fe4.3b77e8",
66                 "68d0163d.33ab6",
67                 "1d5f9b67.3462ad",
68                 "5f5fa66b.a3a898",
69                 "a5de3800.3f3c9"
70             ]
71         ]
72     },
73     {
74         "id": "267997b8.e9b0d",
75         "type": "execute",
76         "name": "excute:readProperties",
77         "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\n",
78         "comments": "",
79         "outputs": 1,
80         "x": 1776.000286102295,
81         "y": 636.1110858917236,
82         "z": "e7492f37.77e028",
83         "wires": [
84             []
85         ]
86     },
87     {
88         "id": "5f5fa66b.a3a898",
89         "type": "for",
90         "name": "for:network-input-paramters",
91         "xml": "<for index='idx' start='0' end='`$network-input-parameters.param_length`' >\n",
92         "comments": "",
93         "outputs": 1,
94         "x": 1780.0003089904785,
95         "y": 857.9999313354492,
96         "z": "e7492f37.77e028",
97         "wires": [
98             [
99                 "a2cbb6ad.9498d8"
100             ]
101         ]
102     },
103     {
104         "id": "1d5f9b67.3462ad",
105         "type": "execute",
106         "name": "execute:querryTokenID",
107         "xml": " <execute plugin=\"org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode\" method=\"sendRequest\">\n    <parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/bbs-token-template.json'`\"/>\n    <parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url+'/rest/plat/smapp/v1/oauth/token'`\"/>\n    <parameter name=\"format\" value=\"json\"/>\n    <parameter name=\"httpMethod\" value=\"put\"/>\n    <parameter name=\"responsePrefix\" value=\"token-result\"/>\n    <parameter name=\"trustStoreFileName\" value=\"/opt/onap/sdnc/data/stores/truststore.onap.client.jks\"/>\n    <parameter name=\"trustStorePassword\" value=\"adminadmin\"/>\n    <parameter name=\"keyStoreFileName\" value=\"/opt/onap/sdnc/data/stores/sdnc.p12\"/>\n    <parameter name=\"keyStorePassword\" value=\"adminadmin\"/>\n\n",
108         "comments": "",
109         "outputs": 1,
110         "x": 1771.0003089904785,
111         "y": 768.0000076293945,
112         "z": "e7492f37.77e028",
113         "wires": [
114             [
115                 "2b64faec.a1d51e",
116                 "15bc857f.bafd43"
117             ]
118         ]
119     },
120     {
121         "id": "15bc857f.bafd43",
122         "type": "outcome",
123         "name": "success",
124         "xml": "<outcome value='success'>\n",
125         "comments": "",
126         "outputs": 1,
127         "x": 2070.166934967041,
128         "y": 764.2500076293945,
129         "z": "e7492f37.77e028",
130         "wires": [
131             [
132                 "c730ec93.32f82"
133             ]
134         ]
135     },
136     {
137         "id": "2b64faec.a1d51e",
138         "type": "outcome",
139         "name": "failure",
140         "xml": "<outcome value='failure'>\n",
141         "comments": "",
142         "outputs": 1,
143         "x": 2066.166934967041,
144         "y": 658.2499771118164,
145         "z": "e7492f37.77e028",
146         "wires": [
147             [
148                 "20d8621f.db8eee"
149             ]
150         ]
151     },
152     {
153         "id": "5704a92f.4d6488",
154         "type": "returnFailure",
155         "name": "return failure",
156         "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 executing queryTokenID,vaule is null\" />\n",
157         "comments": "",
158         "x": 2613.2807388305664,
159         "y": 706.6136617660522,
160         "z": "e7492f37.77e028",
161         "wires": []
162     },
163     {
164         "id": "a55c0e66.2654c8",
165         "type": "outcome",
166         "name": "NULL",
167         "xml": "<outcome value=''>\n",
168         "comments": "",
169         "outputs": 1,
170         "x": 2437.000316619873,
171         "y": 706.999963760376,
172         "z": "e7492f37.77e028",
173         "wires": [
174             [
175                 "5704a92f.4d6488"
176             ]
177         ]
178     },
179     {
180         "id": "c730ec93.32f82",
181         "type": "switchNode",
182         "name": "switch:token ",
183         "xml": "<switch test='`$token-result.accessSession`'>\n",
184         "comments": "",
185         "outputs": 1,
186         "x": 2269.000316619873,
187         "y": 764.999963760376,
188         "z": "e7492f37.77e028",
189         "wires": [
190             [
191                 "a55c0e66.2654c8",
192                 "72281c79.15bf7c"
193             ]
194         ]
195     },
196     {
197         "id": "72281c79.15bf7c",
198         "type": "outcome",
199         "name": "Other",
200         "xml": "<outcome value='Other'>\n",
201         "comments": "",
202         "outputs": 1,
203         "x": 2438.000316619873,
204         "y": 763.999963760376,
205         "z": "e7492f37.77e028",
206         "wires": [
207             [
208                 "85cd43c3.a877f8"
209             ]
210         ]
211     },
212     {
213         "id": "85cd43c3.a877f8",
214         "type": "set",
215         "name": "set:token-id",
216         "xml": "<set>\n<parameter name='prop.sdncRestApi.token_id' value='`$token-result.accessSession`' />\n",
217         "comments": "",
218         "x": 2612.5003089904785,
219         "y": 763.2500076293945,
220         "z": "e7492f37.77e028",
221         "wires": []
222     },
223     {
224         "id": "cf8179f9.6c703",
225         "type": "record",
226         "name": "log file",
227         "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=\"__TIMESTAMP__\" />\n    <parameter name=\"field2\" value=\"sucess executing Get token rest api\" />\n    <parameter name=\"field3\" value=\"`$token-result.accessSession`\" />\n    ",
228         "comments": "",
229         "outputs": 1,
230         "x": 2824.0003089904785,
231         "y": 760.9999465942383,
232         "z": "e7492f37.77e028",
233         "wires": [
234             []
235         ]
236     },
237     {
238         "id": "68d0163d.33ab6",
239         "type": "set",
240         "name": "set:variables",
241         "xml": "<set>\n<parameter name='prop.sdncRestApi.thirdpartySdnc.url' value='https://172.30.0.55:26335' />\n<parameter name='network-input-parameters.' value='`$network-topology-operation-input.network-request-input.network-input-parameters.`' />\n",
242         "comments": "",
243         "x": 1742.000286102295,
244         "y": 556.0001621246338,
245         "z": "e7492f37.77e028",
246         "wires": []
247     },
248     {
249         "id": "a5de3800.3f3c9",
250         "type": "execute",
251         "name": "execute:deleteAccessConnectivityService",
252         "xml": "<execute plugin=\"org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode\" method=\"sendRequest\">\n    <parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/ws/rest/1002/FanOpenAPI/DeactivateOnt?serviceID='+$prop.bbs.serviceID`\" />\n    <parameter name=\"httpMethod\" value=\"get\"/>\n    <parameter name=\"contentType\" value=\"application/x-www-form-urlencoded\"/>\n    <parameter name=\"responsePrefix\" value=\"service-result\"/>\n    <parameter name=\"customHttpHeaders\" value=\"`'X-Auth-Token=' + $prop.sdncRestApi.token_id`\"/>\n    <parameter name=\"trustStoreFileName\" value=\"/opt/onap/sdnc/data/stores/truststore.onap.client.jks\"/>\n    <parameter name=\"trustStorePassword\" value=\"adminadmin\"/>\n    <parameter name=\"keyStoreFileName\" value=\"/opt/onap/sdnc/data/stores/sdnc.p12\"/>\n    <parameter name=\"keyStorePassword\" value=\"adminadmin\"/>",
253         "comments": "",
254         "outputs": 1,
255         "x": 1832.0005722045898,
256         "y": 1038.0001103878021,
257         "z": "e7492f37.77e028",
258         "wires": [
259             [
260                 "5b7315a4.8b9d54",
261                 "b2a61f83.59c088"
262             ]
263         ]
264     },
265     {
266         "id": "5b7315a4.8b9d54",
267         "type": "outcome",
268         "name": "failure",
269         "xml": "<outcome value='failure'>\n",
270         "comments": "",
271         "outputs": 1,
272         "x": 2137.000587463379,
273         "y": 978.0000915527344,
274         "z": "e7492f37.77e028",
275         "wires": [
276             [
277                 "218de6d2.4c392a"
278             ]
279         ]
280     },
281     {
282         "id": "b2a61f83.59c088",
283         "type": "outcome",
284         "name": "success",
285         "xml": "<outcome value='success'>\n",
286         "comments": "",
287         "outputs": 1,
288         "x": 2137.000560760498,
289         "y": 1037.0000913143158,
290         "z": "e7492f37.77e028",
291         "wires": [
292             [
293                 "ce8b9653.804e"
294             ]
295         ]
296     },
297     {
298         "id": "67d761ed.040b7",
299         "type": "outcome",
300         "name": "NULL",
301         "xml": "<outcome value=''>\n",
302         "comments": "",
303         "outputs": 1,
304         "x": 2623.0006713867188,
305         "y": 934.000025510788,
306         "z": "e7492f37.77e028",
307         "wires": [
308             [
309                 "f6e3cbc5.9d1b18"
310             ]
311         ]
312     },
313     {
314         "id": "f6e3cbc5.9d1b18",
315         "type": "returnFailure",
316         "name": "return failure",
317         "xml": "<return status='failure'>\n<parameter name='ack-final' value='Y'/>\n<parameter name=\"error-code\" value=\"500\" />\n<parameter name=\"error-message\" value=\"$network-input-parameters.param[$idx].name  +' value is null, please check it.'\" />\n",
318         "comments": "",
319         "x": 2807.9096183776855,
320         "y": 933.9090785980225,
321         "z": "e7492f37.77e028",
322         "wires": []
323     },
324     {
325         "id": "a2cbb6ad.9498d8",
326         "type": "switchNode",
327         "name": "switch:serviceID",
328         "xml": "<switch test=\"`$network-input-parameters.param[$idx].name == 'serviceID'`\">\n",
329         "comments": "",
330         "outputs": 1,
331         "x": 2055.0003356933594,
332         "y": 857.0000190734863,
333         "z": "e7492f37.77e028",
334         "wires": [
335             [
336                 "8cd031d1.154ec8"
337             ]
338         ]
339     },
340     {
341         "id": "8cd031d1.154ec8",
342         "type": "outcomeTrue",
343         "name": "true",
344         "xml": "<outcome value='true'>\n",
345         "comments": "",
346         "outputs": 1,
347         "x": 2228.000220298767,
348         "y": 856.0000171661377,
349         "z": "e7492f37.77e028",
350         "wires": [
351             [
352                 "9ffc371.a8c8ec8"
353             ]
354         ]
355     },
356     {
357         "id": "7e9b3155.7cd6d",
358         "type": "set",
359         "name": "set:serviceID",
360         "xml": "<set>\n<parameter name='prop.bbs.serviceID' value='`$network-input-parameters.param[$idx].value`' />\n",
361         "comments": "",
362         "x": 2799.000186920166,
363         "y": 855.6000289916992,
364         "z": "e7492f37.77e028",
365         "wires": []
366     },
367     {
368         "id": "9ffc371.a8c8ec8",
369         "type": "switchNode",
370         "name": "switch:serviceID value",
371         "xml": "<switch test='`$network-input-parameters.param[$idx].value`'>\n",
372         "comments": "",
373         "outputs": 1,
374         "x": 2409.148380279541,
375         "y": 855.777702331543,
376         "z": "e7492f37.77e028",
377         "wires": [
378             [
379                 "46008887.d0731",
380                 "67d761ed.040b7"
381             ]
382         ]
383     },
384     {
385         "id": "46008887.d0731",
386         "type": "outcome",
387         "name": "Other",
388         "xml": "<outcome value='Other'>\n",
389         "comments": "",
390         "outputs": 1,
391         "x": 2617.148380279541,
392         "y": 856.777702331543,
393         "z": "e7492f37.77e028",
394         "wires": [
395             [
396                 "7e9b3155.7cd6d"
397             ]
398         ]
399     },
400     {
401         "id": "f1c69874.61cb9",
402         "type": "call",
403         "name": "call:validate-bbs-network-input-parameters",
404         "xml": "<call module='GENERIC-RESOURCE-API' rpc='validate-bbs-network-input-parameters' mode='sync' >\n",
405         "comments": "",
406         "outputs": 1,
407         "x": 1853.499912261963,
408         "y": 475.00001335144043,
409         "z": "e7492f37.77e028",
410         "wires": [
411             []
412         ]
413     },
414     {
415         "id": "fca294fa.de967",
416         "type": "record",
417         "name": "log file",
418         "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=\"deleteAccessConnectivityService success!\" />\n    ",
419         "comments": "",
420         "outputs": 1,
421         "x": 3170.500503540039,
422         "y": 1121.0001611709595,
423         "z": "e7492f37.77e028",
424         "wires": [
425             []
426         ]
427     },
428     {
429         "id": "ce8b9653.804e",
430         "type": "block",
431         "name": "block : atomic",
432         "xml": "<block atomic=\"true\">\n",
433         "atomic": "false",
434         "comments": "",
435         "outputs": 1,
436         "x": 2313.500358581543,
437         "y": 1038.0002694129944,
438         "z": "e7492f37.77e028",
439         "wires": [
440             [
441                 "558a111d.84c158"
442             ]
443         ]
444     },
445     {
446         "id": "558a111d.84c158",
447         "type": "switchNode",
448         "name": "switch:service-result",
449         "xml": "<switch test=\"`$service-result.errors.error[0].error-message`\">\n",
450         "comments": "",
451         "outputs": 1,
452         "x": 2531.5002365112305,
453         "y": 1037.0001168251038,
454         "z": "e7492f37.77e028",
455         "wires": [
456             [
457                 "3ed23c26.7d9344",
458                 "3b7a58ab.469a28"
459             ]
460         ]
461     },
462     {
463         "id": "3ed23c26.7d9344",
464         "type": "outcome",
465         "name": "Other",
466         "xml": "<outcome value='Other'>\n",
467         "comments": "",
468         "outputs": 1,
469         "x": 2765.5002822875977,
470         "y": 1038.0000767707825,
471         "z": "e7492f37.77e028",
472         "wires": [
473             [
474                 "a4966b56.feb3a"
475             ]
476         ]
477     },
478     {
479         "id": "3b7a58ab.469a28",
480         "type": "outcome",
481         "name": "NULL",
482         "xml": "<outcome value=''>\n",
483         "comments": "",
484         "outputs": 1,
485         "x": 2767.5002822875977,
486         "y": 1124.0000767707825,
487         "z": "e7492f37.77e028",
488         "wires": [
489             [
490                 "f89a532c.628618"
491             ]
492         ]
493     },
494     {
495         "id": "daa9ee04.8494a8",
496         "type": "record",
497         "name": "log error",
498         "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=\"deleteAccessConnectivityService falied!\" />\n    <parameter name=\"field2\" value=\"`$service-result.errors.error[0].error-info.error-code`\" />\n    <parameter name=\"field3\" value=\"`$service-result.errors.error[0].error-message`\" />\n    <parameter name=\"field4\" value=\"`$service-result.errors.error[0].error-tag`\" />\n    ",
499         "comments": "",
500         "outputs": 1,
501         "x": 3205.50044631958,
502         "y": 1025.000093460083,
503         "z": "e7492f37.77e028",
504         "wires": [
505             []
506         ]
507     },
508     {
509         "id": "7e468fe4.3b77e8",
510         "type": "returnSuccess",
511         "name": "return success",
512         "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",
513         "comments": "",
514         "x": 1733.5001258850098,
515         "y": 1176.0000190734863,
516         "z": "e7492f37.77e028",
517         "wires": []
518     },
519     {
520         "id": "a4966b56.feb3a",
521         "type": "returnFailure",
522         "name": "return failure",
523         "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 deleteAccessConnectivityService return: '+$service-result.errors.error[0].error-message`\" />\n\n",
524         "comments": "",
525         "x": 2965.49995803833,
526         "y": 1038.0000114440918,
527         "z": "e7492f37.77e028",
528         "wires": []
529     },
530     {
531         "id": "f89a532c.628618",
532         "type": "block",
533         "name": "block",
534         "xml": "<block>\n",
535         "atomic": "false",
536         "comments": "",
537         "outputs": 1,
538         "x": 2951.4999771118164,
539         "y": 1123.2726850509644,
540         "z": "e7492f37.77e028",
541         "wires": [
542             [
543                 "fca294fa.de967"
544             ]
545         ]
546     },
547     {
548         "id": "20d8621f.db8eee",
549         "type": "returnFailure",
550         "name": "return failure",
551         "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 queryTokenID\" />\n",
552         "comments": "",
553         "x": 2258.664794921875,
554         "y": 659.1193237304688,
555         "z": "e7492f37.77e028",
556         "wires": []
557     },
558     {
559         "id": "218de6d2.4c392a",
560         "type": "returnFailure",
561         "name": "return failure",
562         "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 deleteAccessConnectivityService\" />\n",
563         "comments": "",
564         "x": 2307.272705078125,
565         "y": 976.3635864257812,
566         "z": "e7492f37.77e028",
567         "wires": []
568     }
569 ]