APPC Generic Saltstack DG addition
[appc.git] / appc-directed-graph / appc-dgraph / provider / src / main / resources / json / APPC / APPC_Generic_SalststackDG.json
1 [
2   {
3     "id": "e38cb54f.9ca9f8",
4     "type": "dgstart",
5     "name": "DGSTART",
6     "outputs": 1,
7     "x": 205,
8     "y": 127,
9     "z": "8d1f21aa.54c4d",
10     "wires": [
11       [
12         "4bab3a4b.258874"
13       ]
14     ]
15   },
16   {
17     "id": "4bab3a4b.258874",
18     "type": "service-logic",
19     "name": "APPC 4.0.0",
20     "module": "APPC",
21     "version": "4.0.0",
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='APPC' version='4.0.0'>",
24     "outputs": 1,
25     "x": 282.4652862548828,
26     "y": 76.61805725097656,
27     "z": "8d1f21aa.54c4d",
28     "wires": [
29       [
30         "50553ff1.9574a"
31       ]
32     ]
33   },
34   {
35     "id": "50553ff1.9574a",
36     "type": "method",
37     "name": "method Generic_SaltstackDG",
38     "xml": "<method rpc='Generic_SaltstackDG' mode='sync'>\n",
39     "comments": "",
40     "outputs": 1,
41     "x": 534.0277862548828,
42     "y": 76.61805725097656,
43     "z": "8d1f21aa.54c4d",
44     "wires": [
45       [
46         "5f98d930.7a8b18"
47       ]
48     ]
49   },
50   {
51     "id": "6819c6e8.678398",
52     "type": "call",
53     "name": "call: saltstack-adapter-1.0",
54     "xml": "<call module=\"APPC\" rpc=\"saltstack-adapter-1.0\" mode=\"sync\">",
55     "comments": "",
56     "outputs": 1,
57     "x": 373.3822479248047,
58     "y": 727.6304321289062,
59     "z": "8d1f21aa.54c4d",
60     "wires": [
61       [
62         "5ba5a458.bd343c",
63         "60f88818.d3d458",
64         "1d8a5754.a5bfa9"
65       ]
66     ]
67   },
68   {
69     "id": "8965bd62.c94ad",
70     "type": "execute",
71     "name": "execute params",
72     "xml": " <execute plugin=\"org.onap.appc.encryptiontool.wrapper.EncryptionToolDGWrapper\" method =\"getProperty\">\n <parameter name=\"prefix\" value =\"property\"/>\n\n \n  ",
73     "comments": "",
74     "outputs": 1,
75     "x": 591.7984008789062,
76     "y": 350.02760314941406,
77     "z": "8d1f21aa.54c4d",
78     "wires": [
79       [
80         "15bd90c9.26106f",
81         "616cf1c.003711"
82       ]
83     ]
84   },
85   {
86     "id": "fc232c3a.c22b1",
87     "type": "returnFailure",
88     "name": "return failure",
89     "xml": "<return status='failure'>\n<parameter name='error-code' value=\"401\" />\n<parameter name='error-message' value=\"`$property.error-message`\" />\n",
90     "comments": "",
91     "x": 1228.8195495605469,
92     "y": 644.5471343994141,
93     "z": "8d1f21aa.54c4d",
94     "wires": []
95   },
96   {
97     "id": "77b68006.68a1",
98     "type": "block",
99     "name": "block",
100     "xml": "<block>\n",
101     "atomic": "false",
102     "comments": "",
103     "outputs": 1,
104     "x": 1060.090202331543,
105     "y": 644.7263355255127,
106     "z": "8d1f21aa.54c4d",
107     "wires": [
108       [
109         "fc232c3a.c22b1"
110       ]
111     ]
112   },
113   {
114     "id": "616cf1c.003711",
115     "type": "not-found",
116     "name": "not-found",
117     "xml": "<outcome value='not-found'>\n",
118     "comments": "",
119     "outputs": 1,
120     "x": 862.0277557373047,
121     "y": 642.3471527099609,
122     "z": "8d1f21aa.54c4d",
123     "wires": [
124       [
125         "77b68006.68a1"
126       ]
127     ]
128   },
129   {
130     "id": "15bd90c9.26106f",
131     "type": "failure",
132     "name": "failure",
133     "xml": "<outcome value='failure'>\n",
134     "comments": "",
135     "outputs": 1,
136     "x": 843.0404510498047,
137     "y": 576.2013397216797,
138     "z": "8d1f21aa.54c4d",
139     "wires": [
140       [
141         "77b68006.68a1"
142       ]
143     ]
144   },
145   {
146     "id": "9bf9a511.09ec78",
147     "type": "execute",
148     "name": "execute Convert payload to DG Context ",
149     "xml": "<execute plugin=\"org.onap.sdnc.config.generator.convert.ConvertNode\" method=\"convertJson2DGContext\">\n<parameter name=\"jsonData\" value=\"`$tmp.merge.mergedData`\" />\n<parameter name=\"isEscaped\" value=\"Y\" />\n<parameter name=\"blockKeys\" value=\"EnvParameters,SlsName,Timeout,NodeList\" />\n<parameter name=\"responsePrefix\" value=\"tmp.convertnode\" />",
150     "comments": "",
151     "outputs": 1,
152     "x": 644.6145477294922,
153     "y": 166.60910034179688,
154     "z": "8d1f21aa.54c4d",
155     "wires": [
156       [
157         "e8f47f42.c57a2",
158         "79fbc9a5.3b3c58"
159       ]
160     ]
161   },
162   {
163     "id": "3058a57d.09569a",
164     "type": "set",
165     "name": "set Payload params ",
166     "xml": "<set>\n<parameter name='SlsName' value='`$SlsName`' />\n<parameter name='NodeList' value='`$NodeList`'/>\n<parameter name='vnf_id' value='`$vnf-id`' />\n<parameter name='AgentUrl' value='`$agenturl`'/>\n<parameter name='Port' value='`$port`'/>\n <parameter name='User' value='`$user`'/>\n  <parameter name='Password' value='`$password`'/>\n  <parameter name='EnvParameters' value='`$EnvParameters`'/>\n  <parameter name='Timeout' value='`$Timeout`'/>\n\n\n\n",
167     "comments": "",
168     "x": 495.9220733642578,
169     "y": 626.0113525390625,
170     "z": "8d1f21aa.54c4d",
171     "wires": []
172   },
173   {
174     "id": "79fbc9a5.3b3c58",
175     "type": "failure",
176     "name": "failure",
177     "xml": "<outcome value='failure'>\n",
178     "comments": "",
179     "outputs": 1,
180     "x": 927.8527374267578,
181     "y": 198.263916015625,
182     "z": "8d1f21aa.54c4d",
183     "wires": [
184       [
185         "9353cc05.2510e"
186       ]
187     ]
188   },
189   {
190     "id": "e8f47f42.c57a2",
191     "type": "not-found",
192     "name": "not-found",
193     "xml": "<outcome value='not-found'>\n",
194     "comments": "",
195     "outputs": 1,
196     "x": 923.6860504150391,
197     "y": 256.5472412109375,
198     "z": "8d1f21aa.54c4d",
199     "wires": [
200       [
201         "46965e7b.1d0b3"
202       ]
203     ]
204   },
205   {
206     "id": "9353cc05.2510e",
207     "type": "block",
208     "name": "block",
209     "xml": "<block>\n",
210     "atomic": "false",
211     "comments": "",
212     "outputs": 1,
213     "x": 1050.5194854736328,
214     "y": 202.4305419921875,
215     "z": "8d1f21aa.54c4d",
216     "wires": [
217       [
218         "40ee8f23.eaa99"
219       ]
220     ]
221   },
222   {
223     "id": "46965e7b.1d0b3",
224     "type": "block",
225     "name": "block",
226     "xml": "<block>\n",
227     "atomic": "false",
228     "comments": "",
229     "outputs": 1,
230     "x": 1049.8526763916016,
231     "y": 263.913818359375,
232     "z": "8d1f21aa.54c4d",
233     "wires": [
234       [
235         "8ee3f2b6.bd308"
236       ]
237     ]
238   },
239   {
240     "id": "8ee3f2b6.bd308",
241     "type": "returnFailure",
242     "name": "return failure",
243     "xml": "<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"401\"/>\n\t<parameter name=\"error-message\" value=\"Unable to process convert payload to context.\"/>\n\t\n",
244     "comments": "",
245     "x": 1199.0526275634766,
246     "y": 266.09722900390625,
247     "z": "8d1f21aa.54c4d",
248     "wires": []
249   },
250   {
251     "id": "5f98d930.7a8b18",
252     "type": "block",
253     "name": "block : atomic",
254     "xml": "<block atomic=\"true\">",
255     "atomic": "true",
256     "outputs": 1,
257     "x": 330.119384765625,
258     "y": 189.19715881347656,
259     "z": "8d1f21aa.54c4d",
260     "wires": [
261       [
262         "6819c6e8.678398",
263         "8965bd62.c94ad",
264         "9bf9a511.09ec78",
265         "3058a57d.09569a",
266         "d218d7d2.b9b368",
267         "be7dc38b.4b2f5",
268         "4cf90dde.d09894",
269         "f3549fc.54c8a6",
270         "4d75ad1e.f322c4"
271       ]
272     ]
273   },
274   {
275     "id": "40ee8f23.eaa99",
276     "type": "returnFailure",
277     "name": "return failure",
278     "xml": "<return status=\"failure\">\n<parameter name=\"error-code\" value=\"401\"/>\n\t<parameter name=\"error-message\" value=\"`$tmp.convertnode.error-message`\"/>\n\t\n\t",
279     "comments": "",
280     "x": 1193.085952758789,
281     "y": 199.83050537109375,
282     "z": "8d1f21aa.54c4d",
283     "wires": []
284   },
285   {
286     "id": "37477c51.2b0464",
287     "type": "returnFailure",
288     "name": "return failure",
289     "xml": "<return status=\"failure\">\n<parameter name='error-code' value=\"401\" />\n<parameter name='error-message' value='`$org.onap.appc.adapter.saltstack.message`'/>\n<parameter name='output-payload' value='`$org.onap.appc.adapter.saltstack.output`'/>",
290     "comments": "",
291     "x": 1082.9717254638672,
292     "y": 796.2043304443359,
293     "z": "8d1f21aa.54c4d",
294     "wires": []
295   },
296   {
297     "id": "5ba5a458.bd343c",
298     "type": "failure",
299     "name": "failure",
300     "xml": "<outcome value='failure'>\n",
301     "comments": "",
302     "outputs": 1,
303     "x": 796.7693634033203,
304     "y": 777.7805938720703,
305     "z": "8d1f21aa.54c4d",
306     "wires": [
307       [
308         "37477c51.2b0464"
309       ]
310     ]
311   },
312   {
313     "id": "60f88818.d3d458",
314     "type": "not-found",
315     "name": "not-found",
316     "xml": "<outcome value='not-found'>\n",
317     "comments": "",
318     "outputs": 1,
319     "x": 772.9694366455078,
320     "y": 860.3305206298828,
321     "z": "8d1f21aa.54c4d",
322     "wires": [
323       [
324         "66737fa9.c07ec"
325       ]
326     ]
327   },
328   {
329     "id": "d218d7d2.b9b368",
330     "type": "set",
331     "name": "set Payload params ",
332     "xml": "<set>\n<parameter name='SlsName' value='`$block_SlsName`' />\n<parameter name='NodeList' value ='`$block_NodeList`'/>\n<parameter name='vnf_id' value='`$vnf-id`' />\n<parameter name='EnvParameters' value='`$block_EnvParameters`'/>\n<parameter name='Timeout' value='`$block_Timeout`'/>\n\n\n\n",
333     "comments": "",
334     "x": 644.4444732666016,
335     "y": 223.22222900390625,
336     "z": "8d1f21aa.54c4d",
337     "wires": []
338   },
339   {
340     "id": "66737fa9.c07ec",
341     "type": "returnFailure",
342     "name": "return failure",
343     "xml": "<return status=\"failure\">\n<parameter name='error-code' value=\"401\" />\n<parameter name='error-message' value='saltstack-adapter-1.0.0 Dg not found'/>",
344     "comments": "",
345     "x": 1027.6111297607422,
346     "y": 904.2460784912109,
347     "z": "8d1f21aa.54c4d",
348     "wires": []
349   },
350   {
351     "id": "1d8a5754.a5bfa9",
352     "type": "success",
353     "name": "success",
354     "xml": "<outcome value='success'>\n",
355     "comments": "",
356     "outputs": 1,
357     "x": 570.4683074951172,
358     "y": 942.1984710693359,
359     "z": "8d1f21aa.54c4d",
360     "wires": [
361       [
362         "6fd24c30.fc4b14"
363       ]
364     ]
365   },
366   {
367     "id": "be7dc38b.4b2f5",
368     "type": "record",
369     "name": "record",
370     "xml": "<record plugin=\"onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"level\" value=\"info\"/>\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name='field2' value='`$user`'/>\n  <parameter name='field3' value='`$password`'/>\n    <parameter name='field4' value='`$agenturl`'/>\n    <parameter name='field5' value='`$port`'/>",
371     "comments": "",
372     "outputs": 1,
373     "x": 511.1778106689453,
374     "y": 529.3556518554688,
375     "z": "8d1f21aa.54c4d",
376     "wires": [
377       []
378     ]
379   },
380   {
381     "id": "4cf90dde.d09894",
382     "type": "set",
383     "name": "set properties",
384     "xml": "<set>\n<parameter name=\"user\" value='`$property.user`'/>\n<parameter name=\"password\" value='`$property.password`'/>\n<parameter name=\"agenturl\" value='`$property.url`'/>\n<parameter name=\"port\" value='`$property.port`'/>\n\n\n",
385     "comments": "",
386     "x": 566.0055389404297,
387     "y": 429.066650390625,
388     "z": "8d1f21aa.54c4d",
389     "wires": []
390   },
391   {
392     "id": "f3549fc.54c8a6",
393     "type": "get-resource",
394     "name": "get-resource: APPC.protocol",
395     "xml": "<get-resource\n\tplugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' \n\tresource='SQL'\n\tkey=\"SELECT DISTINCT PROTOCOL FROM PROTOCOL_REFERENCE WHERE ACTION = $input.action AND VNF_TYPE = $vnf-type ;\"\n    force='true'\n\tpfx='APPC.protocol'>\n",
396     "comments": "",
397     "outputs": 1,
398     "x": 639.1110992431641,
399     "y": 273.022216796875,
400     "z": "8d1f21aa.54c4d",
401     "wires": [
402       [
403         "feac9596.8aec28",
404         "3a91d47a.b79b5c"
405       ]
406     ]
407   },
408   {
409     "id": "3add0af2.e80156",
410     "type": "set",
411     "name": "set protocol",
412     "xml": "<set>\n<parameter name='APPC.protocol.PROTOCOL' value='`$APPC.protocol.PROTOCOL`' />\n\n\n\n\n\n",
413     "comments": "",
414     "x": 1074.111099243164,
415     "y": 378.022216796875,
416     "z": "8d1f21aa.54c4d",
417     "wires": []
418   },
419   {
420     "id": "feac9596.8aec28",
421     "type": "failure",
422     "name": "failure",
423     "xml": "<outcome value='failure'>\n",
424     "comments": "",
425     "outputs": 1,
426     "x": 891.1110992431641,
427     "y": 324.022216796875,
428     "z": "8d1f21aa.54c4d",
429     "wires": [
430       [
431         "f8c45479.728dd8"
432       ]
433     ]
434   },
435   {
436     "id": "f8c45479.728dd8",
437     "type": "block",
438     "name": "block",
439     "xml": "<block>\n",
440     "atomic": "false",
441     "comments": "",
442     "outputs": 1,
443     "x": 1038.111099243164,
444     "y": 333.022216796875,
445     "z": "8d1f21aa.54c4d",
446     "wires": [
447       []
448     ]
449   },
450   {
451     "id": "3a91d47a.b79b5c",
452     "type": "success",
453     "name": "success",
454     "xml": "<outcome value='success'>\n",
455     "comments": "",
456     "outputs": 1,
457     "x": 888.1110992431641,
458     "y": 373.022216796875,
459     "z": "8d1f21aa.54c4d",
460     "wires": [
461       [
462         "3add0af2.e80156"
463       ]
464     ]
465   },
466   {
467     "id": "4d75ad1e.f322c4",
468     "type": "record",
469     "name": "record",
470     "xml": "<record plugin=\"onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"level\" value=\"info\"/>\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name='field2' value='`$user`'/>\n  <parameter name='field3' value='`$APPC.protocol.PROTOCOL`'/>\n    <parameter name='field4' value='`$url`'/>\n    <parameter name='field5' value='`$port`'/>",
471     "comments": "",
472     "outputs": 1,
473     "x": 676.1110992431641,
474     "y": 310.022216796875,
475     "z": "8d1f21aa.54c4d",
476     "wires": [
477       []
478     ]
479   },
480   {
481     "id": "6fd24c30.fc4b14",
482     "type": "set",
483     "name": "set payloadResponse",
484     "xml": "<set>\n<parameter name='error-code' value='400' />\n<parameter name='error-message' value='`$org.onap.appc.adapter.saltstack.message`'/>\n<parameter name='output-payload' value='`$org.onap.appc.adapter.saltstack.output`'/>",
485     "comments": "",
486     "x": 869,
487     "y": 1005,
488     "z": "8d1f21aa.54c4d",
489     "wires": []
490   }
491 ]