Merge "Add backup/restore scripts"
[sdnc/oam.git] / platform-logic / lcm / src / main / json / LCM_upgrade-software.json
1 [
2     {
3         "id": "4c3f9752.77dec",
4         "type": "method",
5         "name": "upgrade-software",
6         "xml": "<method rpc='upgrade-software' mode='sync'>\n",
7         "comments": "",
8         "outputs": 1,
9         "x": 489,
10         "y": 152,
11         "z": "e0b620f9.dad4e8",
12         "wires": [
13             [
14                 "83650b67.6cd8c"
15             ]
16         ]
17     },
18     {
19         "id": "d837d6cb.338428",
20         "type": "service-logic",
21         "name": "LCM ${project.version}",
22         "module": "LCM",
23         "version": "${project.version}",
24         "comments": "",
25         "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}'>",
26         "outputs": 1,
27         "x": 276.99993896484375,
28         "y": 153,
29         "z": "e0b620f9.dad4e8",
30         "wires": [
31             [
32                 "4c3f9752.77dec"
33             ]
34         ]
35     },
36     {
37         "id": "3421e2b7.29c266",
38         "type": "execute",
39         "name": "execute AnsibleA.reqExec",
40         "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`'/>",
41         "comments": "",
42         "outputs": 1,
43         "x": 277.00001525878906,
44         "y": 370,
45         "z": "e0b620f9.dad4e8",
46         "wires": [
47             [
48                 "199ed9da.f92c0e",
49                 "c8dd71a.7a9241",
50                 "50f87fc.8f6068"
51             ]
52         ]
53     },
54     {
55         "id": "32b073b0.4096bc",
56         "type": "switchNode",
57         "name": "switch",
58         "xml": "<switch test=\"`$org.onap.appc.adapter.ansible.result.code`\">\n",
59         "comments": "",
60         "outputs": 1,
61         "x": 578,
62         "y": 418,
63         "z": "e0b620f9.dad4e8",
64         "wires": [
65             [
66                 "df999599.1b565",
67                 "96b44eb0.622268",
68                 "a80c397d.561b48"
69             ]
70         ]
71     },
72     {
73         "id": "df999599.1b565",
74         "type": "other",
75         "name": "outcome 500",
76         "xml": "<outcome value='500'>\n",
77         "comments": "",
78         "outputs": 1,
79         "x": 723,
80         "y": 416.00000762939453,
81         "z": "e0b620f9.dad4e8",
82         "wires": [
83             [
84                 "f25faee.c20865"
85             ]
86         ]
87     },
88     {
89         "id": "96b44eb0.622268",
90         "type": "other",
91         "name": "outcome 100",
92         "xml": "<outcome value='100'>\n",
93         "comments": "",
94         "outputs": 1,
95         "x": 726,
96         "y": 459.00003814697266,
97         "z": "e0b620f9.dad4e8",
98         "wires": [
99             [
100                 "fcf5e1f3.334ad"
101             ]
102         ]
103     },
104     {
105         "id": "fcf5e1f3.334ad",
106         "type": "execute",
107         "name": "execute reqExecResult",
108         "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",
109         "comments": "",
110         "outputs": 1,
111         "x": 904.0000305175781,
112         "y": 459.00003814697266,
113         "z": "e0b620f9.dad4e8",
114         "wires": [
115             [
116                 "9223dd62.33b848",
117                 "52b60d15.5c8824"
118             ]
119         ]
120     },
121     {
122         "id": "c8dd71a.7a9241",
123         "type": "failure",
124         "name": "failure",
125         "xml": "<outcome value='failure'>\n",
126         "comments": "",
127         "outputs": 1,
128         "x": 469,
129         "y": 327.0000305175781,
130         "z": "e0b620f9.dad4e8",
131         "wires": [
132             [
133                 "f25faee.c20865"
134             ]
135         ]
136     },
137     {
138         "id": "199ed9da.f92c0e",
139         "type": "other",
140         "name": "other",
141         "xml": "<outcome value='Other'>\n",
142         "comments": "",
143         "outputs": 1,
144         "x": 471,
145         "y": 379,
146         "z": "e0b620f9.dad4e8",
147         "wires": [
148             [
149                 "32b073b0.4096bc"
150             ]
151         ]
152     },
153     {
154         "id": "9223dd62.33b848",
155         "type": "failure",
156         "name": "failure",
157         "xml": "<outcome value='failure'>\n",
158         "comments": "",
159         "outputs": 1,
160         "x": 1065.0000610351562,
161         "y": 436.00000762939453,
162         "z": "e0b620f9.dad4e8",
163         "wires": [
164             [
165                 "f25faee.c20865"
166             ]
167         ]
168     },
169     {
170         "id": "a80c397d.561b48",
171         "type": "other",
172         "name": "outcome 101",
173         "xml": "<outcome value='101'>\n",
174         "comments": "",
175         "outputs": 1,
176         "x": 720,
177         "y": 374.00003814697266,
178         "z": "e0b620f9.dad4e8",
179         "wires": [
180             [
181                 "f25faee.c20865"
182             ]
183         ]
184     },
185     {
186         "id": "52b60d15.5c8824",
187         "type": "success",
188         "name": "success",
189         "xml": "<outcome value='success'>\n",
190         "comments": "",
191         "outputs": 1,
192         "x": 1072.0000610351562,
193         "y": 484.00003814697266,
194         "z": "e0b620f9.dad4e8",
195         "wires": [
196             [
197                 "9c548e74.79765"
198             ]
199         ]
200     },
201     {
202         "id": "6d12b2b7.836454",
203         "type": "returnSuccess",
204         "name": "return success",
205         "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`'/>",
206         "comments": "",
207         "x": 1354.9999389648438,
208         "y": 536.0000381469727,
209         "z": "e0b620f9.dad4e8",
210         "wires": []
211     },
212     {
213         "id": "c4c2701e.31e65",
214         "type": "dgstart",
215         "name": "DGSTART",
216         "outputs": 1,
217         "x": 92,
218         "y": 152,
219         "z": "e0b620f9.dad4e8",
220         "wires": [
221             [
222                 "d837d6cb.338428"
223             ]
224         ]
225     },
226     {
227         "id": "83650b67.6cd8c",
228         "type": "block",
229         "name": "block",
230         "xml": "<block>\n",
231         "atomic": "false",
232         "comments": "",
233         "outputs": 1,
234         "x": 87.91668701171875,
235         "y": 333.0833435058594,
236         "z": "e0b620f9.dad4e8",
237         "wires": [
238             [
239                 "3421e2b7.29c266",
240                 "af5cebbf.24ded",
241                 "9b7242c2.970088"
242             ]
243         ]
244     },
245     {
246         "id": "af5cebbf.24ded",
247         "type": "execute",
248         "name": "execute Properties",
249         "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",
250         "comments": "",
251         "outputs": 1,
252         "x": 262.00001525878906,
253         "y": 275.0833435058594,
254         "z": "e0b620f9.dad4e8",
255         "wires": [
256             []
257         ]
258     },
259     {
260         "id": "17a67139.0163e7",
261         "type": "execute",
262         "name": "execute DmaapMsg",
263         "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",
264         "comments": "",
265         "outputs": 1,
266         "x": 1072.0000610351562,
267         "y": 280.0833435058594,
268         "z": "e0b620f9.dad4e8",
269         "wires": [
270             [
271                 "4b59a568.89eb14"
272             ]
273         ]
274     },
275     {
276         "id": "4b59a568.89eb14",
277         "type": "failure",
278         "name": "failure",
279         "xml": "<outcome value='failure'>\n",
280         "comments": "",
281         "outputs": 1,
282         "x": 1242,
283         "y": 279.0833435058594,
284         "z": "e0b620f9.dad4e8",
285         "wires": [
286             [
287                 "81a1b456.34658"
288             ]
289         ]
290     },
291     {
292         "id": "f25faee.c20865",
293         "type": "block",
294         "name": "block",
295         "xml": "<block>\n",
296         "atomic": "false",
297         "comments": "",
298         "outputs": 1,
299         "x": 875,
300         "y": 304.0833435058594,
301         "z": "e0b620f9.dad4e8",
302         "wires": [
303             [
304                 "17a67139.0163e7",
305                 "e10545e8.eea44",
306                 "d8fbd5c3.79579"
307             ]
308         ]
309     },
310     {
311         "id": "3095e5cd.210e32",
312         "type": "execute",
313         "name": "execute DmaapMsg",
314         "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",
315         "comments": "",
316         "outputs": 1,
317         "x": 1375.4999389648438,
318         "y": 485.0833511352539,
319         "z": "e0b620f9.dad4e8",
320         "wires": [
321             [
322                 "8bc4822b.c5137"
323             ]
324         ]
325     },
326     {
327         "id": "8bc4822b.c5137",
328         "type": "failure",
329         "name": "failure",
330         "xml": "<outcome value='failure'>\n",
331         "comments": "",
332         "outputs": 1,
333         "x": 1535.4999389648438,
334         "y": 485.0833511352539,
335         "z": "e0b620f9.dad4e8",
336         "wires": [
337             [
338                 "b21f8cea.572bf8"
339             ]
340         ]
341     },
342     {
343         "id": "81a1b456.34658",
344         "type": "record",
345         "name": "record",
346         "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'/>",
347         "comments": "",
348         "outputs": 1,
349         "x": 1374,
350         "y": 279.0833435058594,
351         "z": "e0b620f9.dad4e8",
352         "wires": [
353             []
354         ]
355     },
356     {
357         "id": "e10545e8.eea44",
358         "type": "returnFailure",
359         "name": "return failure",
360         "xml": "<return status='failure'>\n<parameter name='status.code' value='401' />\n<parameter name='status.message' value='`$org.onap.appc.adapter.ansible.message`' />\n",
361         "comments": "",
362         "x": 1046.9166870117188,
363         "y": 317.0833435058594,
364         "z": "e0b620f9.dad4e8",
365         "wires": []
366     },
367     {
368         "id": "b21f8cea.572bf8",
369         "type": "record",
370         "name": "record",
371         "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'/>",
372         "comments": "",
373         "outputs": 1,
374         "x": 1656.9166870117188,
375         "y": 486.0833511352539,
376         "z": "e0b620f9.dad4e8",
377         "wires": [
378             []
379         ]
380     },
381     {
382         "id": "d8fbd5c3.79579",
383         "type": "set",
384         "name": "set",
385         "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.request-id + '-' + $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.request-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.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",
386         "comments": "",
387         "x": 1024.0000610351562,
388         "y": 227.08334350585938,
389         "z": "e0b620f9.dad4e8",
390         "wires": []
391     },
392     {
393         "id": "9c548e74.79765",
394         "type": "block",
395         "name": "block",
396         "xml": "<block>\n",
397         "atomic": "false",
398         "comments": "",
399         "outputs": 1,
400         "x": 1204.9999389648438,
401         "y": 484.0833206176758,
402         "z": "e0b620f9.dad4e8",
403         "wires": [
404             [
405                 "3095e5cd.210e32",
406                 "dfdfe757.04d0d8",
407                 "6d12b2b7.836454"
408             ]
409         ]
410     },
411     {
412         "id": "dfdfe757.04d0d8",
413         "type": "set",
414         "name": "set",
415         "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.request-id + '-' + $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.request-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.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",
416         "comments": "",
417         "x": 1335.1666870117188,
418         "y": 437.0833511352539,
419         "z": "e0b620f9.dad4e8",
420         "wires": []
421     },
422     {
423         "id": "50f87fc.8f6068",
424         "type": "not-found",
425         "name": "not-found",
426         "xml": "<outcome value='not-found'>\n",
427         "comments": "",
428         "outputs": 1,
429         "x": 465,
430         "y": 280,
431         "z": "e0b620f9.dad4e8",
432         "wires": [
433             [
434                 "71cef7a8.a94c"
435             ]
436         ]
437     },
438     {
439         "id": "711ed4cf.9ec76c",
440         "type": "set",
441         "name": "set Defaults",
442         "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",
443         "comments": "",
444         "x": 849,
445         "y": 227,
446         "z": "e0b620f9.dad4e8",
447         "wires": []
448     },
449     {
450         "id": "71cef7a8.a94c",
451         "type": "block",
452         "name": "block",
453         "xml": "<block>\n",
454         "atomic": "false",
455         "comments": "",
456         "outputs": 1,
457         "x": 649,
458         "y": 272,
459         "z": "e0b620f9.dad4e8",
460         "wires": [
461             [
462                 "711ed4cf.9ec76c",
463                 "f25faee.c20865"
464             ]
465         ]
466     },
467     {
468         "id": "9b7242c2.970088",
469         "type": "set",
470         "name": "set default status value",
471         "xml": "<set>\n<parameter name='status.code' value='200' />\n<parameter name='status.message' value='unexpected return from DG' />\n",
472         "comments": "",
473         "x": 276,
474         "y": 319,
475         "z": "e0b620f9.dad4e8",
476         "wires": []
477     }
478 ]