30636cf5534e8138d40cff72f5afb9f867fee190
[appc.git] /
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP : APP-C
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property.  All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 [
22   {
23     "id": "45094e01.04b5",
24     "type": "dgstart",
25     "name": "DGSTART",
26     "outputs": 1,
27     "x": 118,
28     "y": 60,
29     "z": "4469619c.5c5ce",
30     "wires": [
31       [
32         "2edc368c.b0f64a"
33       ]
34     ]
35   },
36   {
37     "id": "2edc368c.b0f64a",
38     "type": "service-logic",
39     "name": "APPC 2.0.0",
40     "module": "APPC",
41     "version": "2.0.0",
42     "comments": "",
43     "xml": "<service-logic xmlns='http://www.openecomp.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd' module='APPC' version='2.0.0'>",
44     "outputs": 1,
45     "x": 271.0000762939453,
46     "y": 59.566673278808594,
47     "z": "4469619c.5c5ce",
48     "wires": [
49       [
50         "65d6d2.3359293"
51       ]
52     ]
53   },
54   {
55     "id": "65d6d2.3359293",
56     "type": "method",
57     "name": "StopApplication_VM_VSCP",
58     "xml": "<method rpc='StopApplication_VM_vSCP' mode='sync'>\n",
59     "comments": "",
60     "outputs": 1,
61     "x": 483.5000915527344,
62     "y": 59.56667232513428,
63     "z": "4469619c.5c5ce",
64     "wires": [
65       [
66         "a649fe4e.d578c"
67       ]
68     ]
69   },
70   {
71     "id": "a649fe4e.d578c",
72     "type": "block",
73     "name": "block : atomic",
74     "xml": "<block atomic='true'>",
75     "atomic": "true",
76     "comments": "",
77     "outputs": 1,
78     "x": 172,
79     "y": 140,
80     "z": "4469619c.5c5ce",
81     "wires": [
82       [
83         "3befe32a.cda1ac",
84         "38e0f472.ba404c",
85         "bb87dbed.34a348",
86         "593a11f2.81bf1",
87         "d6d1b7f.22dce48"
88       ]
89     ]
90   },
91   {
92     "id": "3befe32a.cda1ac",
93     "type": "switchNode",
94     "name": "Connection details already exist ?",
95     "xml": "<switch test='`length($connection-details) == 0`'>\n\n\n",
96     "comments": "",
97     "outputs": 1,
98     "x": 455,
99     "y": 200,
100     "z": "4469619c.5c5ce",
101     "wires": [
102       [
103         "4e1f878a.293dd8"
104       ]
105     ]
106   },
107   {
108     "id": "4e1f878a.293dd8",
109     "type": "outcomeTrue",
110     "name": "none found",
111     "xml": "<outcome value='true'>\n",
112     "comments": "",
113     "outputs": 1,
114     "x": 704.5,
115     "y": 200,
116     "z": "4469619c.5c5ce",
117     "wires": [
118       [
119         "c48be551.f0b508"
120       ]
121     ]
122   },
123   {
124     "id": "631a6eca.08715",
125     "type": "outcome",
126     "name": "failure",
127     "xml": "<outcome value='failure'>\n",
128     "comments": "",
129     "outputs": 1,
130     "x": 690,
131     "y": 380,
132     "z": "4469619c.5c5ce",
133     "wires": [
134       [
135         "ba6732ad.5b2b7"
136       ]
137     ]
138   },
139   {
140     "id": "90519af5.3cf8f8",
141     "type": "not-found",
142     "name": "not-found",
143     "xml": "<outcome value='not-found'>\n",
144     "comments": "",
145     "outputs": 1,
146     "x": 699,
147     "y": 320,
148     "z": "4469619c.5c5ce",
149     "wires": [
150       [
151         "7bf6eaa2.0c00b4"
152       ]
153     ]
154   },
155   {
156     "id": "c48be551.f0b508",
157     "type": "execute",
158     "name": "Execute retrieve connection",
159     "xml": "<execute plugin='org.openecomp.appc.dg.ssh.SshDBPlugin' method='retrieveConnectionDetails' >\n<parameter name=\"vnf-host-ip-address\" value=\"`$vnf-host-ip-address`\" />\n<parameter name='vnf-type' value=\"`$vnf.type`\" />\n",
160     "comments": "",
161     "outputs": 1,
162     "x": 936.5,
163     "y": 200,
164     "z": "4469619c.5c5ce",
165     "wires": [
166       [
167         "c24e43e3.47358"
168       ]
169     ]
170   },
171   {
172     "id": "c24e43e3.47358",
173     "type": "failure",
174     "name": "failure",
175     "xml": "<outcome value='failure'>\n",
176     "comments": "",
177     "outputs": 1,
178     "x": 1130,
179     "y": 200,
180     "z": "4469619c.5c5ce",
181     "wires": [
182       [
183         "7000ea12.cc2c54"
184       ]
185     ]
186   },
187   {
188     "id": "cba91b7e.1a9828",
189     "type": "execute",
190     "name": "Execute stop node",
191     "xml": "<execute plugin='com.att.appc.dg.vSCP.v3_5_5.VSCPDGUtils' method='stopNode'>\n<parameter name=\"node-name\" value=\"`$healthcheck.vm[0].nodeName`\" />\n<parameter name=\"node-status\" value=\"`$healthcheck.vm[0].status`\" />\n<parameter name=\"vm-url\" value=\"`$stop-vm-url`\" />\n<parameter name=\"connection-details\" value=\"`$connection-details`\" />",
192     "comments": "",
193     "outputs": 1,
194     "x": 907.5,
195     "y": 440,
196     "z": "4469619c.5c5ce",
197     "wires": [
198       [
199         "3e771072.dff42",
200         "4c818d83.efdfa4"
201       ]
202     ]
203   },
204   {
205     "id": "7000ea12.cc2c54",
206     "type": "block",
207     "name": "block",
208     "xml": "<block>",
209     "atomic": "true",
210     "comments": "",
211     "outputs": 1,
212     "x": 1270,
213     "y": 200,
214     "z": "4469619c.5c5ce",
215     "wires": [
216       [
217         "9ed7e5c6.794218",
218         "625a967b.641258"
219       ]
220     ]
221   },
222   {
223     "id": "9ed7e5c6.794218",
224     "type": "set",
225     "name": "Set event message",
226     "xml": "<set>\n<parameter name=\"event-message\" value=\"`'Failed to retrieve connection details for vnfc : ' + $vnfcType`\"/> ",
227     "comments": "",
228     "x": 1609.5,
229     "y": 200,
230     "z": "4469619c.5c5ce",
231     "wires": []
232   },
233   {
234     "id": "2e18822.6fd057e",
235     "type": "set",
236     "name": "Set event message",
237     "xml": "<set>\n<parameter name='event-message' value=\"`'Stop failed for the node : ' + $healthcheck.vm[0].nodeName`\"/>",
238     "comments": "",
239     "x": 1609.5,
240     "y": 440,
241     "z": "4469619c.5c5ce",
242     "wires": []
243   },
244   {
245     "id": "3e771072.dff42",
246     "type": "other",
247     "name": "other",
248     "xml": "<outcome value='Other'>\n",
249     "comments": "",
250     "outputs": 1,
251     "x": 1130,
252     "y": 440,
253     "z": "4469619c.5c5ce",
254     "wires": [
255       [
256         "87e9f084.dc614"
257       ]
258     ]
259   },
260   {
261     "id": "38e0f472.ba404c",
262     "type": "set",
263     "name": "init",
264     "xml": "<set>\n<parameter name='current-dg-name' value=\"StopApplication_VM_vSCP\"/>\n<parameter name=\"healthcheck.vmCount\" value=\"1\" />\n<parameter name=\"retry-healthcheck\" value=\"false\"/>\n<parameter name=\"exitLoop\" value=\"false\"/>\n<parameter name=\"stopSucceeded\" value=\"false\"/>\n<parameter name=\"healthcheck.vm[0].url\" value=\"`$stop-vm-url`\" />",
265     "comments": "",
266     "outputs": 1,
267     "x": 370,
268     "y": 140,
269     "z": "4469619c.5c5ce",
270     "wires": [
271       []
272     ]
273   },
274   {
275     "id": "bb87dbed.34a348",
276     "type": "execute",
277     "name": "Healthcheck to get Node Name",
278     "xml": "<execute plugin='com.att.appc.dg.vSCP.v3_5_5.VSCPDGUtils' method='healthCheckVMs'>\n<parameter name=\"org.openecomp.appc.identity.url\" value=\"`$AICIdentity`\" />\n<parameter name=\"connection-details\" value=\"`$connection-details`\" />\n<parameter name=\"org.openecomp.appc.provider.name\" value=\"OpenStack\"/>\n<parameter name=\"retry-healthcheck\" value=\"`$retry-healthcheck`\"/>",
279     "comments": "",
280     "outputs": 1,
281     "x": 447.5,
282     "y": 320,
283     "z": "4469619c.5c5ce",
284     "wires": [
285       [
286         "90519af5.3cf8f8",
287         "631a6eca.08715"
288       ]
289     ]
290   },
291   {
292     "id": "593a11f2.81bf1",
293     "type": "switchNode",
294     "name": "Healthcheck status ?",
295     "xml": "<switch test=\"`$healthcheck.vm[0].status`\">\n",
296     "comments": "",
297     "outputs": 1,
298     "x": 414.5,
299     "y": 440,
300     "z": "4469619c.5c5ce",
301     "wires": [
302       [
303         "4c418f9c.9c0fb",
304         "13d3d83.6ec2928",
305         "1d8db4ea.ee850b"
306       ]
307     ]
308   },
309   {
310     "id": "4c418f9c.9c0fb",
311     "type": "other",
312     "name": "DOWN",
313     "xml": "<outcome value='DOWN'>\n",
314     "comments": "",
315     "outputs": 1,
316     "x": 690.5,
317     "y": 560,
318     "z": "4469619c.5c5ce",
319     "wires": [
320       [
321         "a188ecb2.2c019"
322       ]
323     ]
324   },
325   {
326     "id": "87e9f084.dc614",
327     "type": "block",
328     "name": "block",
329     "xml": "<block>",
330     "atomic": "true",
331     "comments": "",
332     "outputs": 1,
333     "x": 1272,
334     "y": 440,
335     "z": "4469619c.5c5ce",
336     "wires": [
337       [
338         "2e18822.6fd057e",
339         "625a967b.641258"
340       ]
341     ]
342   },
343   {
344     "id": "2572bd6f.e17262",
345     "type": "returnSuccess",
346     "name": "return success",
347     "xml": "<return status='success'>\n",
348     "comments": "",
349     "x": 1295,
350     "y": 500,
351     "z": "4469619c.5c5ce",
352     "wires": []
353   },
354   {
355     "id": "13d3d83.6ec2928",
356     "type": "other",
357     "name": "UP",
358     "xml": "<outcome value='UP'>\n",
359     "comments": "",
360     "outputs": 1,
361     "x": 690,
362     "y": 440,
363     "z": "4469619c.5c5ce",
364     "wires": [
365       [
366         "cba91b7e.1a9828"
367       ]
368     ]
369   },
370   {
371     "id": "4c818d83.efdfa4",
372     "type": "success",
373     "name": "success",
374     "xml": "<outcome value='success'>\n",
375     "comments": "",
376     "outputs": 1,
377     "x": 1134,
378     "y": 500,
379     "z": "4469619c.5c5ce",
380     "wires": [
381       [
382         "2572bd6f.e17262"
383       ]
384     ]
385   },
386   {
387     "id": "d6d1b7f.22dce48",
388     "type": "execute",
389     "name": "Select vnf-host-ip via connection test",
390     "xml": "<execute plugin='com.att.appc.dg.vSCP.v3_5_5.VSCPDGUtils' method='selectActiveConnectionDetails'>\n<parameter name=\"connection-details\" value=\"`$connection-details`\" />\n<parameter name=\"vnf-host-ip-address\" value=\"`$vnf-host-ip-address`\" />\n<parameter name=\"vnf-host-ip2-address\" value=\"`$vnf-host-ip2-address`\" />\n\n",
391     "comments": "",
392     "outputs": 1,
393     "x": 464.5,
394     "y": 260,
395     "z": "4469619c.5c5ce",
396     "wires": [
397       [
398         "d9e8802e.e0979"
399       ]
400     ]
401   },
402   {
403     "id": "d9e8802e.e0979",
404     "type": "failure",
405     "name": "failure",
406     "xml": "<outcome value='failure'>\n",
407     "comments": "",
408     "outputs": 1,
409     "x": 690,
410     "y": 260,
411     "z": "4469619c.5c5ce",
412     "wires": [
413       [
414         "960cbdd2.f45fa"
415       ]
416     ]
417   },
418   {
419     "id": "960cbdd2.f45fa",
420     "type": "block",
421     "name": "block",
422     "xml": "<block>",
423     "atomic": "true",
424     "comments": "",
425     "outputs": 1,
426     "x": 1270,
427     "y": 260,
428     "z": "4469619c.5c5ce",
429     "wires": [
430       [
431         "93f6e97f.86f498",
432         "625a967b.641258"
433       ]
434     ]
435   },
436   {
437     "id": "93f6e97f.86f498",
438     "type": "set",
439     "name": "Set event message",
440     "xml": "<set>\n<parameter name=\"event-message\" value=\"`'Failed to ssh to vnfc : ' + $vnfcType`\"/> ",
441     "comments": "",
442     "x": 1609.5,
443     "y": 260,
444     "z": "4469619c.5c5ce",
445     "wires": []
446   },
447   {
448     "id": "7bf6eaa2.0c00b4",
449     "type": "block",
450     "name": "block",
451     "xml": "<block>",
452     "atomic": "true",
453     "comments": "",
454     "outputs": 1,
455     "x": 1270,
456     "y": 320,
457     "z": "4469619c.5c5ce",
458     "wires": [
459       [
460         "fbbe6078.75537",
461         "625a967b.641258"
462       ]
463     ]
464   },
465   {
466     "id": "fbbe6078.75537",
467     "type": "set",
468     "name": "Set event message",
469     "xml": "<set>\n<parameter name=\"event-message\" value=\"Health Check not found\"/> ",
470     "comments": "",
471     "x": 1609.5,
472     "y": 320,
473     "z": "4469619c.5c5ce",
474     "wires": []
475   },
476   {
477     "id": "ba6732ad.5b2b7",
478     "type": "block",
479     "name": "block",
480     "xml": "<block>",
481     "atomic": "true",
482     "comments": "",
483     "outputs": 1,
484     "x": 1270,
485     "y": 380,
486     "z": "4469619c.5c5ce",
487     "wires": [
488       [
489         "5d6a8bd9.c4f1a4",
490         "625a967b.641258"
491       ]
492     ]
493   },
494   {
495     "id": "5d6a8bd9.c4f1a4",
496     "type": "set",
497     "name": "Set event message",
498     "xml": "<set>\n<parameter name=\"event-message\" value=\"Health Check failed\"/> ",
499     "comments": "",
500     "x": 1609.5,
501     "y": 380,
502     "z": "4469619c.5c5ce",
503     "wires": []
504   },
505   {
506     "id": "625a967b.641258",
507     "type": "returnFailure",
508     "name": "return failure",
509     "xml": "<return status='failure'>\n<parameter name='error-code' value='401' />\n<parameter name='error-message' value='`$error-message`' />\n<parameter name='output.status.code' value='401'/>\n",
510     "comments": "",
511     "x": 1589,
512     "y": 500,
513     "z": "4469619c.5c5ce",
514     "wires": []
515   },
516   {
517     "id": "a188ecb2.2c019",
518     "type": "block",
519     "name": "block",
520     "xml": "<block>",
521     "atomic": "true",
522     "comments": "",
523     "outputs": 1,
524     "x": 870,
525     "y": 560,
526     "z": "4469619c.5c5ce",
527     "wires": [
528       [
529         "623a9eea.473fc",
530         "6b885833.1ca728"
531       ]
532     ]
533   },
534   {
535     "id": "623a9eea.473fc",
536     "type": "set",
537     "name": "Set success message",
538     "xml": "<set>\n<parameter name='success-message' value=\"`'Node already down: ' + $healthcheck.vm[0].nodeName`\"/>",
539     "comments": "",
540     "x": 1177.5,
541     "y": 560,
542     "z": "4469619c.5c5ce",
543     "wires": []
544   },
545   {
546     "id": "1d8db4ea.ee850b",
547     "type": "other",
548     "name": "UNKNOWN",
549     "xml": "<outcome value='UNKNOWN'>\n",
550     "comments": "",
551     "outputs": 1,
552     "x": 705,
553     "y": 620,
554     "z": "4469619c.5c5ce",
555     "wires": [
556       [
557         "5945a3dd.87e51c"
558       ]
559     ]
560   },
561   {
562     "id": "5945a3dd.87e51c",
563     "type": "block",
564     "name": "block",
565     "xml": "<block>",
566     "atomic": "true",
567     "comments": "",
568     "outputs": 1,
569     "x": 870,
570     "y": 620,
571     "z": "4469619c.5c5ce",
572     "wires": [
573       [
574         "4a02e5a3.cf7dcc",
575         "6b885833.1ca728"
576       ]
577     ]
578   },
579   {
580     "id": "4a02e5a3.cf7dcc",
581     "type": "set",
582     "name": "Set success message",
583     "xml": "<set>\n<parameter name='success-message' value=\"Application Shutdown unnessecary for node in state UNKNOWN.\"/>",
584     "comments": "",
585     "x": 1177.5,
586     "y": 620,
587     "z": "4469619c.5c5ce",
588     "wires": []
589   },
590   {
591     "id": "6b885833.1ca728",
592     "type": "returnSuccess",
593     "name": "return success",
594     "xml": "<return status='success'>\n",
595     "comments": "",
596     "x": 1157,
597     "y": 680,
598     "z": "4469619c.5c5ce",
599     "wires": []
600   }
601 ]