348f108fb4e175cac9042e9427a15d4f8b6d82c4
[sdnc/oam.git] / platform-logic / lcm / src / main / json / LCM_upgrade-software.json
1 [
2     {
3         "comments": "",
4         "id": "e3957e37.35361",
5         "name": "upgrade-software",
6         "outputs": 1,
7         "type": "method",
8         "wires": [
9             [
10                 "c5d4c45f.4457e"
11             ]
12         ],
13         "x": 506,
14         "xml": "<method rpc='upgrade-software' mode='sync'>\n",
15         "y": 196,
16         "z": "455a25b6.fcbc5c"
17     },
18     {
19         "comments": "",
20         "id": "5f2faaca.f39734",
21         "module": "LCM",
22         "name": "LCM ${project.version}",
23         "outputs": 1,
24         "type": "service-logic",
25         "version": "${project.version}",
26         "wires": [
27             [
28                 "e3957e37.35361"
29             ]
30         ],
31         "x": 293.99993896484375,
32         "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='LCM' version='${project.version}'>",
33         "y": 197,
34         "z": "455a25b6.fcbc5c"
35     },
36     {
37         "comments": "",
38         "id": "70dc7b0c.2f14e4",
39         "name": "execute AnsibleA.reqExec",
40         "outputs": 1,
41         "type": "execute",
42         "wires": [
43             [
44                 "bc899025.fa2868",
45                 "f27679b0.21ec",
46                 "704e725e.7e874c"
47             ]
48         ],
49         "x": 294.00001525878906,
50         "xml": "<execute plugin='org.onap.ccsdk.sli.adaptors.ansible.AnsibleAdapter' method='reqExec' >\n<parameter name='AgentUrl' value='`$prop.ansible.agenturl`'/>\n<parameter name='User' value='`$prop.ansible.user`'/>\n<parameter name='Password' value='`prop.ansible.password`'/>\n<parameter name='LocalParameters' value='`$prop.ansible.lcm.localparameters`'/>\n<parameter name='EnvParameters' value='`$upgrade-software-input.payload`'/>\n<parameter name='NodeList' value='`$prop.ansible.nodelist`'/>\n<parameter name='Timeout' value='`$prop.ansible.timeout`'/>\n<parameter name='Version' value='`$prop.ansible.version`'/>\n<parameter name='Id' value='`$upgrade-software-input.common-header.request-id`'/>\n<parameter name='PlaybookName' value='`$prop.lcm.upgrade-software.playbookname`'/>",
51         "y": 414,
52         "z": "455a25b6.fcbc5c"
53     },
54     {
55         "comments": "",
56         "id": "e3dc71b8.c785c8",
57         "name": "switch",
58         "outputs": 1,
59         "type": "switchNode",
60         "wires": [
61             [
62                 "86baeda9.1ff078",
63                 "195ba453.c1b374",
64                 "931e0cc5.50a74"
65             ]
66         ],
67         "x": 595,
68         "xml": "<switch test=\"`$org.onap.appc.adapter.ansible.result.code`\">\n",
69         "y": 462,
70         "z": "455a25b6.fcbc5c"
71     },
72     {
73         "comments": "",
74         "id": "86baeda9.1ff078",
75         "name": "outcome 500",
76         "outputs": 1,
77         "type": "other",
78         "wires": [
79             [
80                 "d1ce272a.df817"
81             ]
82         ],
83         "x": 740,
84         "xml": "<outcome value='500'>\n",
85         "y": 460.00000762939453,
86         "z": "455a25b6.fcbc5c"
87     },
88     {
89         "comments": "",
90         "id": "195ba453.c1b374",
91         "name": "outcome 100",
92         "outputs": 1,
93         "type": "other",
94         "wires": [
95             [
96                 "245ca838.b01f4"
97             ]
98         ],
99         "x": 743,
100         "xml": "<outcome value='100'>\n",
101         "y": 503.00003814697266,
102         "z": "455a25b6.fcbc5c"
103     },
104     {
105         "comments": "",
106         "id": "245ca838.b01f4",
107         "name": "execute reqExecResult",
108         "outputs": 1,
109         "type": "execute",
110         "wires": [
111             [
112                 "b1d260a0.f027c8",
113                 "7c135a2c.b77b1c"
114             ]
115         ],
116         "x": 921.0000305175781,
117         "xml": "<execute plugin='org.onap.ccsdk.sli.adaptors.ansible.AnsibleAdapter' method='reqExecResult' >\n    <parameter name='AgentUrl' value='`$prop.ansible.agenturl`'/>\n\t<parameter name='User' value='`$prop.ansible.user`'/>\n\t<parameter name='Password' value='`$prop.ansible.password`'/>\n\t<parameter name='Id' value='`$org.onap.appc.adapter.ansible.Id`'/>\n\t<parameter name='PlaybookName' value='`$prop.lcm.upgrade-software.playbookname`'/>\n\t\n\n\n\n\n",
118         "y": 503.00003814697266,
119         "z": "455a25b6.fcbc5c"
120     },
121     {
122         "comments": "",
123         "id": "f27679b0.21ec",
124         "name": "failure",
125         "outputs": 1,
126         "type": "failure",
127         "wires": [
128             [
129                 "d1ce272a.df817"
130             ]
131         ],
132         "x": 486,
133         "xml": "<outcome value='failure'>\n",
134         "y": 371.0000305175781,
135         "z": "455a25b6.fcbc5c"
136     },
137     {
138         "comments": "",
139         "id": "bc899025.fa2868",
140         "name": "other",
141         "outputs": 1,
142         "type": "other",
143         "wires": [
144             [
145                 "e3dc71b8.c785c8"
146             ]
147         ],
148         "x": 488,
149         "xml": "<outcome value='Other'>\n",
150         "y": 423,
151         "z": "455a25b6.fcbc5c"
152     },
153     {
154         "comments": "",
155         "id": "b1d260a0.f027c8",
156         "name": "failure",
157         "outputs": 1,
158         "type": "failure",
159         "wires": [
160             [
161                 "d1ce272a.df817"
162             ]
163         ],
164         "x": 1082.0000610351562,
165         "xml": "<outcome value='failure'>\n",
166         "y": 480.00000762939453,
167         "z": "455a25b6.fcbc5c"
168     },
169     {
170         "comments": "",
171         "id": "931e0cc5.50a74",
172         "name": "outcome 101",
173         "outputs": 1,
174         "type": "other",
175         "wires": [
176             [
177                 "d1ce272a.df817"
178             ]
179         ],
180         "x": 737,
181         "xml": "<outcome value='101'>\n",
182         "y": 418.00003814697266,
183         "z": "455a25b6.fcbc5c"
184     },
185     {
186         "comments": "",
187         "id": "7c135a2c.b77b1c",
188         "name": "success",
189         "outputs": 1,
190         "type": "success",
191         "wires": [
192             [
193                 "a9adb7fd.3d4988"
194             ]
195         ],
196         "x": 1089.0000610351562,
197         "xml": "<outcome value='success'>\n",
198         "y": 528.0000381469727,
199         "z": "455a25b6.fcbc5c"
200     },
201     {
202         "comments": "",
203         "id": "6546fdb6.d892ac",
204         "name": "return success",
205         "type": "returnSuccess",
206         "wires": [],
207         "x": 1371.9999389648438,
208         "xml": "<return status='success'>\n<parameter name='status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />\n<parameter name='status.message' value='`$org.onap.appc.adapter.ansible.message`'/>",
209         "y": 580.0000381469727,
210         "z": "455a25b6.fcbc5c"
211     },
212     {
213         "id": "c7222a65.c32fa",
214         "name": "DGSTART",
215         "outputs": 1,
216         "type": "dgstart",
217         "wires": [
218             [
219                 "5f2faaca.f39734"
220             ]
221         ],
222         "x": 109,
223         "y": 196,
224         "z": "455a25b6.fcbc5c"
225     },
226     {
227         "atomic": "false",
228         "comments": "",
229         "id": "c5d4c45f.4457e",
230         "name": "block",
231         "outputs": 1,
232         "type": "block",
233         "wires": [
234             [
235                 "70dc7b0c.2f14e4",
236                 "2144c479.557abc",
237                 "2dcfb067.346e98"
238             ]
239         ],
240         "x": 104.91668701171875,
241         "xml": "<block>\n",
242         "y": 377.0833435058594,
243         "z": "455a25b6.fcbc5c"
244     },
245     {
246         "comments": "",
247         "id": "2144c479.557abc",
248         "name": "execute Properties",
249         "outputs": 1,
250         "type": "execute",
251         "wires": [
252             []
253         ],
254         "x": 279.00001525878906,
255         "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >\n    <parameter name='fileName' value='%SDNC_CONFIG_DIR%/lcm-dg.properties' />\n    <parameter name='contextPrefix' value='prop' />\n",
256         "y": 319.0833435058594,
257         "z": "455a25b6.fcbc5c"
258     },
259     {
260         "comments": "",
261         "id": "3ab47119.0770ce",
262         "name": "execute DmaapMsg",
263         "outputs": 1,
264         "type": "execute",
265         "wires": [
266             [
267                 "29d7b192.efbf56"
268             ]
269         ],
270         "x": 1089.0000610351562,
271         "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n    <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.lcm.dmaap.publish.templatefile`\" />\n    <parameter name='restapiUrl' value='`$prop.lcm.dmaap.url`' />\n    <parameter name='restapiUser' value='`$prop.lcm.dmaap.user`' />\n    <parameter name='restapiPassword' value='`$prop.lcm.dmaap.password`' />\n    <parameter name='format' value='json' />\n    <parameter name='httpMethod' value='POST' />\n    <parameter name='contentType' value='application/json' />\n    <parameter name=\"responsePrefix\" value=\"lcm\" />\n",
272         "y": 324.0833435058594,
273         "z": "455a25b6.fcbc5c"
274     },
275     {
276         "comments": "",
277         "id": "29d7b192.efbf56",
278         "name": "failure",
279         "outputs": 1,
280         "type": "failure",
281         "wires": [
282             [
283                 "3b3f2df3.e75202"
284             ]
285         ],
286         "x": 1259,
287         "xml": "<outcome value='failure'>\n",
288         "y": 323.0833435058594,
289         "z": "455a25b6.fcbc5c"
290     },
291     {
292         "atomic": "false",
293         "comments": "",
294         "id": "d1ce272a.df817",
295         "name": "block",
296         "outputs": 1,
297         "type": "block",
298         "wires": [
299             [
300                 "3ab47119.0770ce",
301                 "be81ce81.d8751",
302                 "e34055b3.f4fc"
303             ]
304         ],
305         "x": 892,
306         "xml": "<block>\n",
307         "y": 348.0833435058594,
308         "z": "455a25b6.fcbc5c"
309     },
310     {
311         "comments": "",
312         "id": "d0e97f8b.a0a97",
313         "name": "execute DmaapMsg",
314         "outputs": 1,
315         "type": "execute",
316         "wires": [
317             [
318                 "f13ad0f8.38e418"
319             ]
320         ],
321         "x": 1392.4999389648438,
322         "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n    <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.lcm.dmaap.publish.templatefile`\" />\n    <parameter name='restapiUrl' value='`$prop.lcm.dmaap.url`' />\n    <parameter name='restapiUser' value='`$prop.lcm.dmaap.user`' />\n    <parameter name='restapiPassword' value='`$prop.lcm.dmaap.password`' />\n    <parameter name='format' value='json' />\n    <parameter name='httpMethod' value='POST' />\n    <parameter name='contentType' value='application/json' />\n    <parameter name=\"responsePrefix\" value=\"lcm\" />\n",
323         "y": 529.0833511352539,
324         "z": "455a25b6.fcbc5c"
325     },
326     {
327         "comments": "",
328         "id": "f13ad0f8.38e418",
329         "name": "failure",
330         "outputs": 1,
331         "type": "failure",
332         "wires": [
333             [
334                 "8b1d7157.857a38"
335             ]
336         ],
337         "x": 1552.4999389648438,
338         "xml": "<outcome value='failure'>\n",
339         "y": 529.0833511352539,
340         "z": "455a25b6.fcbc5c"
341     },
342     {
343         "comments": "",
344         "id": "3b3f2df3.e75202",
345         "name": "record",
346         "outputs": 1,
347         "type": "record",
348         "wires": [
349             []
350         ],
351         "x": 1391,
352         "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\"> \n\t<parameter name=\"logger\" value=\"message-log\"/> \n\t<parameter name=\"field1\" value='Failed to Publish to DMaap'/>",
353         "y": 323.0833435058594,
354         "z": "455a25b6.fcbc5c"
355     },
356     {
357         "comments": "",
358         "id": "be81ce81.d8751",
359         "name": "return failure",
360         "type": "returnFailure",
361         "wires": [],
362         "x": 1063.9166870117188,
363         "xml": "<return status='failure'>\n<parameter name='status.code' value='401' />\n<parameter name='status.message' value='`$org.onap.appc.adapter.ansible.message`' />\n",
364         "y": 361.0833435058594,
365         "z": "455a25b6.fcbc5c"
366     },
367     {
368         "comments": "",
369         "id": "8b1d7157.857a38",
370         "name": "record",
371         "outputs": 1,
372         "type": "record",
373         "wires": [
374             []
375         ],
376         "x": 1673.9166870117188,
377         "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\"> \n\t<parameter name=\"logger\" value=\"message-log\"/> \n\t<parameter name=\"field1\" value='Failed to Publish to DMaap'/>",
378         "y": 530.0833511352539,
379         "z": "455a25b6.fcbc5c"
380     },
381     {
382         "comments": "",
383         "id": "e34055b3.f4fc",
384         "name": "set",
385         "type": "set",
386         "wires": [],
387         "x": 1041.0000610351562,
388         "xml": "<set>\n<parameter name='lcm-dmaap.version' value='`$prop.lcm.dmaap.version`'/>\n<parameter name='lcm-dmaap.correlation-id' value='`$upgrade-software-input.common-header.sub-request-id`'/>\n<parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>\n<parameter name='lcm-dmaap.rpc-name' value='upgrade-software'/>\n<parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>\n<parameter name='lcm-dmaap.timestamp' value='`$upgrade-software-input.common-header.timestamp`'/>\n<parameter name='lcm-dmaap.api-ver' value='`$upgrade-software-input.common-header.api-ver`'/>\n<parameter name='lcm-dmaap.originator-id' value='`$upgrade-software-input.common-header.originator-id`'/>\n<parameter name='lcm-dmaap.request-id' value='`$upgrade-software-input.common-header.originator-id`'/>\n<parameter name='lcm-dmaap.sub-request-id' value='`$upgrade-software-input.common-header.sub-request-id`'/>\n<parameter name='lcm-dmaap.flags.mode' value='`$upgrade-software-input.common-header.flags.mode`'/>\n<parameter name='lcm-dmaap.flags.force' value='`$upgrade-software-input.common-header.flags.force`'/>\n<parameter name='lcm-dmaap.flags.ttl' value='`$upgrade-software-input.common-header.flags.ttl`'/>\n<parameter name='lcm-dmaap.payload' value='`$org.onap.appc.adapter.ansible.results`'/>\n<parameter name='lcm-dmaap.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />\n<parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>\n",
389         "y": 271.0833435058594,
390         "z": "455a25b6.fcbc5c"
391     },
392     {
393         "atomic": "false",
394         "comments": "",
395         "id": "a9adb7fd.3d4988",
396         "name": "block",
397         "outputs": 1,
398         "type": "block",
399         "wires": [
400             [
401                 "d0e97f8b.a0a97",
402                 "c5897c80.8110a",
403                 "6546fdb6.d892ac"
404             ]
405         ],
406         "x": 1221.9999389648438,
407         "xml": "<block>\n",
408         "y": 528.0833206176758,
409         "z": "455a25b6.fcbc5c"
410     },
411     {
412         "comments": "",
413         "id": "c5897c80.8110a",
414         "name": "set",
415         "type": "set",
416         "wires": [],
417         "x": 1352.1666870117188,
418         "xml": "<set>\n<parameter name='lcm-dmaap.version' value='`$prop.lcm.dmaap.version`'/>\n<parameter name='lcm-dmaap.correlation-id' value='`$upgrade-software-input.common-header.sub-request-id`'/>\n<parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>\n<parameter name='lcm-dmaap.rpc-name' value='upgrade-software'/>\n<parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>\n<parameter name='lcm-dmaap.timestamp' value='`$upgrade-software-input.common-header.timestamp`'/>\n<parameter name='lcm-dmaap.api-ver' value='`$upgrade-software-input.common-header.api-ver`'/>\n<parameter name='lcm-dmaap.originator-id' value='`$upgrade-software-input.common-header.originator-id`'/>\n<parameter name='lcm-dmaap.request-id' value='`$upgrade-software-input.common-header.originator-id`'/>\n<parameter name='lcm-dmaap.sub-request-id' value='`$upgrade-software-input.common-header.sub-request-id`'/>\n<parameter name='lcm-dmaap.flags.mode' value='`$upgrade-software-input.common-header.flags.mode`'/>\n<parameter name='lcm-dmaap.flags.force' value='`$upgrade-software-input.common-header.flags.force`'/>\n<parameter name='lcm-dmaap.flags.ttl' value='`$upgrade-software-input.common-header.flags.ttl`'/>\n<parameter name='lcm-dmaap.payload' value='`$org.onap.appc.adapter.ansible.results`'/>\n<parameter name='lcm-dmaap.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />\n<parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>\n",
419         "y": 481.0833511352539,
420         "z": "455a25b6.fcbc5c"
421     },
422     {
423         "comments": "",
424         "id": "704e725e.7e874c",
425         "name": "not-found",
426         "outputs": 1,
427         "type": "not-found",
428         "wires": [
429             [
430                 "28042a17.b7aa2e"
431             ]
432         ],
433         "x": 482,
434         "xml": "<outcome value='not-found'>\n",
435         "y": 324,
436         "z": "455a25b6.fcbc5c"
437     },
438     {
439         "comments": "",
440         "id": "e7d4edd8.d7f83",
441         "name": "set Defaults",
442         "type": "set",
443         "wires": [],
444         "x": 866,
445         "xml": "<set>\n<parameter name='$org.onap.appc.adapter.ansible.result.code' value='401'/>\n<parameter name='org.onap.appc.adapter.ansible.message' value='Ansible Adapter was not found'/>\n",
446         "y": 271,
447         "z": "455a25b6.fcbc5c"
448     },
449     {
450         "atomic": "false",
451         "comments": "",
452         "id": "28042a17.b7aa2e",
453         "name": "block",
454         "outputs": 1,
455         "type": "block",
456         "wires": [
457             [
458                 "e7d4edd8.d7f83",
459                 "d1ce272a.df817"
460             ]
461         ],
462         "x": 666,
463         "xml": "<block>\n",
464         "y": 316,
465         "z": "455a25b6.fcbc5c"
466     },
467     {
468         "comments": "",
469         "id": "2dcfb067.346e98",
470         "name": "set default status value",
471         "type": "set",
472         "wires": [],
473         "x": 293,
474         "xml": "<set>\n<parameter name='status.code' value='200' />\n<parameter name='status.message' value='unexpected return from DG' />\n",
475         "y": 363,
476         "z": "455a25b6.fcbc5c"
477     }
478 ]