fix the DG writing log bug
[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": "3e7ef4ac.b2e17c",
4         "type": "dgstart",
5         "name": "DGSTART",
6         "outputs": 1,
7         "x": 704.53125,
8         "y": 248.03125,
9         "z": "9458f851.9a2498",
10         "wires": [
11             [
12                 "cbfbc44.cd69838"
13             ]
14         ]
15     },
16     {
17         "id": "cbfbc44.cd69838",
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": 1092.5311317443848,
26         "y": 248.03125476837158,
27         "z": "9458f851.9a2498",
28         "wires": [
29             [
30                 "8072076.84dccf8"
31             ]
32         ]
33     },
34     {
35         "id": "8072076.84dccf8",
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": 1055.5311317443848,
42         "y": 367.0312547683716,
43         "z": "9458f851.9a2498",
44         "wires": [
45             [
46                 "9a3cc53d.6e79d8"
47             ]
48         ]
49     },
50     {
51         "id": "9a3cc53d.6e79d8",
52         "type": "block",
53         "name": "block : atomic",
54         "xml": "<block atomic=\"true\">\n",
55         "atomic": "false",
56         "comments": "",
57         "outputs": 1,
58         "x": 1453.5312385559082,
59         "y": 366.0312547683716,
60         "z": "9458f851.9a2498",
61         "wires": [
62             [
63                 "d6360288.4527f",
64                 "29565532.cf8cca",
65                 "79257394.2307bc",
66                 "bfbc37d6.3aa9c8",
67                 "5837e3f.e88671c",
68                 "ccc27501.c46688",
69                 "afc719e1.eb7f48"
70             ]
71         ]
72     },
73     {
74         "id": "d6360288.4527f",
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": 1895.531536102295,
81         "y": 220.14233589172363,
82         "z": "9458f851.9a2498",
83         "wires": [
84             []
85         ]
86     },
87     {
88         "id": "ccc27501.c46688",
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": 1899.5315589904785,
95         "y": 442.0311813354492,
96         "z": "9458f851.9a2498",
97         "wires": [
98             [
99                 "430a13df.a78e9c"
100             ]
101         ]
102     },
103     {
104         "id": "5837e3f.e88671c",
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": 1890.5315589904785,
111         "y": 352.03125762939453,
112         "z": "9458f851.9a2498",
113         "wires": [
114             [
115                 "632411.2d700bf",
116                 "df6b78a.61b9688"
117             ]
118         ]
119     },
120     {
121         "id": "df6b78a.61b9688",
122         "type": "outcome",
123         "name": "success",
124         "xml": "<outcome value='success'>\n",
125         "comments": "",
126         "outputs": 1,
127         "x": 2189.698184967041,
128         "y": 348.28125762939453,
129         "z": "9458f851.9a2498",
130         "wires": [
131             [
132                 "c7e8c95e.bd9528"
133             ]
134         ]
135     },
136     {
137         "id": "632411.2d700bf",
138         "type": "outcome",
139         "name": "failure",
140         "xml": "<outcome value='failure'>\n",
141         "comments": "",
142         "outputs": 1,
143         "x": 2185.698184967041,
144         "y": 242.2812271118164,
145         "z": "9458f851.9a2498",
146         "wires": [
147             [
148                 "da5c448.537c3b8"
149             ]
150         ]
151     },
152     {
153         "id": "53a754bd.11dc7c",
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": 2732.8119888305664,
159         "y": 290.64491176605225,
160         "z": "9458f851.9a2498",
161         "wires": []
162     },
163     {
164         "id": "54233be2.f30004",
165         "type": "outcome",
166         "name": "NULL",
167         "xml": "<outcome value=''>\n",
168         "comments": "",
169         "outputs": 1,
170         "x": 2556.531566619873,
171         "y": 291.031213760376,
172         "z": "9458f851.9a2498",
173         "wires": [
174             [
175                 "53a754bd.11dc7c"
176             ]
177         ]
178     },
179     {
180         "id": "c7e8c95e.bd9528",
181         "type": "switchNode",
182         "name": "switch:token ",
183         "xml": "<switch test='`$token-result.accessSession`'>\n",
184         "comments": "",
185         "outputs": 1,
186         "x": 2388.531566619873,
187         "y": 349.031213760376,
188         "z": "9458f851.9a2498",
189         "wires": [
190             [
191                 "54233be2.f30004",
192                 "2525724.318638e"
193             ]
194         ]
195     },
196     {
197         "id": "2525724.318638e",
198         "type": "outcome",
199         "name": "Other",
200         "xml": "<outcome value='Other'>\n",
201         "comments": "",
202         "outputs": 1,
203         "x": 2557.531566619873,
204         "y": 348.031213760376,
205         "z": "9458f851.9a2498",
206         "wires": [
207             [
208                 "b5f78ce0.e4e8f"
209             ]
210         ]
211     },
212     {
213         "id": "b5f78ce0.e4e8f",
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": 2732.0315589904785,
219         "y": 347.28125762939453,
220         "z": "9458f851.9a2498",
221         "wires": []
222     },
223     {
224         "id": "e0b6a2ae.458e8",
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": 2943.5315589904785,
231         "y": 345.0311965942383,
232         "z": "9458f851.9a2498",
233         "wires": [
234             []
235         ]
236     },
237     {
238         "id": "bfbc37d6.3aa9c8",
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": 1861.531536102295,
244         "y": 140.0314121246338,
245         "z": "9458f851.9a2498",
246         "wires": []
247     },
248     {
249         "id": "afc719e1.eb7f48",
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": 1951.5318222045898,
256         "y": 622.0313603878021,
257         "z": "9458f851.9a2498",
258         "wires": [
259             [
260                 "c6939dae.0ae37",
261                 "7116ae31.13271"
262             ]
263         ]
264     },
265     {
266         "id": "c6939dae.0ae37",
267         "type": "outcome",
268         "name": "failure",
269         "xml": "<outcome value='failure'>\n",
270         "comments": "",
271         "outputs": 1,
272         "x": 2256.531837463379,
273         "y": 562.0313415527344,
274         "z": "9458f851.9a2498",
275         "wires": [
276             [
277                 "c09b1f3e.53091"
278             ]
279         ]
280     },
281     {
282         "id": "7116ae31.13271",
283         "type": "outcome",
284         "name": "success",
285         "xml": "<outcome value='success'>\n",
286         "comments": "",
287         "outputs": 1,
288         "x": 2256.531810760498,
289         "y": 621.0313413143158,
290         "z": "9458f851.9a2498",
291         "wires": [
292             [
293                 "1c65ae1f.8b01d2"
294             ]
295         ]
296     },
297     {
298         "id": "b5b74804.ae8938",
299         "type": "outcome",
300         "name": "NULL",
301         "xml": "<outcome value=''>\n",
302         "comments": "",
303         "outputs": 1,
304         "x": 2742.5319213867188,
305         "y": 518.031275510788,
306         "z": "9458f851.9a2498",
307         "wires": [
308             [
309                 "19c841bb.b9c39e"
310             ]
311         ]
312     },
313     {
314         "id": "19c841bb.b9c39e",
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": 2927.4408683776855,
320         "y": 517.9403285980225,
321         "z": "9458f851.9a2498",
322         "wires": []
323     },
324     {
325         "id": "430a13df.a78e9c",
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": 2174.5315856933594,
332         "y": 441.0312690734863,
333         "z": "9458f851.9a2498",
334         "wires": [
335             [
336                 "804331b5.825a1"
337             ]
338         ]
339     },
340     {
341         "id": "804331b5.825a1",
342         "type": "outcomeTrue",
343         "name": "true",
344         "xml": "<outcome value='true'>\n",
345         "comments": "",
346         "outputs": 1,
347         "x": 2347.531470298767,
348         "y": 440.0312671661377,
349         "z": "9458f851.9a2498",
350         "wires": [
351             [
352                 "1d00164b.c74e1a"
353             ]
354         ]
355     },
356     {
357         "id": "b8311cf7.388d1",
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": 2918.531436920166,
363         "y": 439.6312789916992,
364         "z": "9458f851.9a2498",
365         "wires": []
366     },
367     {
368         "id": "1d00164b.c74e1a",
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": 2528.679630279541,
375         "y": 439.80895233154297,
376         "z": "9458f851.9a2498",
377         "wires": [
378             [
379                 "acaa6a13.89b9f8",
380                 "b5b74804.ae8938"
381             ]
382         ]
383     },
384     {
385         "id": "acaa6a13.89b9f8",
386         "type": "outcome",
387         "name": "Other",
388         "xml": "<outcome value='Other'>\n",
389         "comments": "",
390         "outputs": 1,
391         "x": 2736.679630279541,
392         "y": 440.80895233154297,
393         "z": "9458f851.9a2498",
394         "wires": [
395             [
396                 "b8311cf7.388d1"
397             ]
398         ]
399     },
400     {
401         "id": "29565532.cf8cca",
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": 1973.031162261963,
408         "y": 59.03126335144043,
409         "z": "9458f851.9a2498",
410         "wires": [
411             []
412         ]
413     },
414     {
415         "id": "1c65ae1f.8b01d2",
416         "type": "block",
417         "name": "block : atomic",
418         "xml": "<block atomic=\"true\">\n",
419         "atomic": "false",
420         "comments": "",
421         "outputs": 1,
422         "x": 2433.031608581543,
423         "y": 622.0315194129944,
424         "z": "9458f851.9a2498",
425         "wires": [
426             [
427                 "cced1fd6.04da4"
428             ]
429         ]
430     },
431     {
432         "id": "cced1fd6.04da4",
433         "type": "switchNode",
434         "name": "switch:service-result",
435         "xml": "<switch test=\"`$service-result.errors.error[0].error-message`\">\n",
436         "comments": "",
437         "outputs": 1,
438         "x": 2651.0314865112305,
439         "y": 621.0313668251038,
440         "z": "9458f851.9a2498",
441         "wires": [
442             [
443                 "4dce053b.3feafc",
444                 "cf917e9d.94b86"
445             ]
446         ]
447     },
448     {
449         "id": "4dce053b.3feafc",
450         "type": "outcome",
451         "name": "Other",
452         "xml": "<outcome value='Other'>\n",
453         "comments": "",
454         "outputs": 1,
455         "x": 2885.0315322875977,
456         "y": 622.0313267707825,
457         "z": "9458f851.9a2498",
458         "wires": [
459             [
460                 "7c2264f5.7e8cec"
461             ]
462         ]
463     },
464     {
465         "id": "cf917e9d.94b86",
466         "type": "outcome",
467         "name": "NULL",
468         "xml": "<outcome value=''>\n",
469         "comments": "",
470         "outputs": 1,
471         "x": 2887.0315322875977,
472         "y": 708.0313267707825,
473         "z": "9458f851.9a2498",
474         "wires": [
475             [
476                 "523726af.0e2f78"
477             ]
478         ]
479     },
480     {
481         "id": "7f7a43fa.cb783c",
482         "type": "record",
483         "name": "log error",
484         "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    ",
485         "comments": "",
486         "outputs": 1,
487         "x": 3325.03169631958,
488         "y": 609.031343460083,
489         "z": "9458f851.9a2498",
490         "wires": [
491             []
492         ]
493     },
494     {
495         "id": "79257394.2307bc",
496         "type": "returnSuccess",
497         "name": "return success",
498         "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",
499         "comments": "",
500         "x": 1853.0313758850098,
501         "y": 760.0312690734863,
502         "z": "9458f851.9a2498",
503         "wires": []
504     },
505     {
506         "id": "7c2264f5.7e8cec",
507         "type": "returnFailure",
508         "name": "return failure",
509         "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",
510         "comments": "",
511         "x": 3085.03120803833,
512         "y": 622.0312614440918,
513         "z": "9458f851.9a2498",
514         "wires": []
515     },
516     {
517         "id": "523726af.0e2f78",
518         "type": "block",
519         "name": "block",
520         "xml": "<block>\n",
521         "atomic": "false",
522         "comments": "",
523         "outputs": 1,
524         "x": 3071.0312271118164,
525         "y": 707.3039350509644,
526         "z": "9458f851.9a2498",
527         "wires": [
528             []
529         ]
530     },
531     {
532         "id": "da5c448.537c3b8",
533         "type": "returnFailure",
534         "name": "return failure",
535         "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",
536         "comments": "",
537         "x": 2378.196044921875,
538         "y": 243.15057373046875,
539         "z": "9458f851.9a2498",
540         "wires": []
541     },
542     {
543         "id": "c09b1f3e.53091",
544         "type": "returnFailure",
545         "name": "return failure",
546         "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",
547         "comments": "",
548         "x": 2426.803955078125,
549         "y": 560.3948364257812,
550         "z": "9458f851.9a2498",
551         "wires": []
552     },
553     {
554         "id": "3a60417f.fe190e",
555         "type": "record",
556         "name": "log file",
557         "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    ",
558         "comments": "",
559         "outputs": 1,
560         "x": 3290.031753540039,
561         "y": 705.0314111709595,
562         "z": "9458f851.9a2498",
563         "wires": [
564             []
565         ]
566     }
567 ]