saltstack to take env and file param
[ccsdk/sli/adaptors.git] / saltstack-adapter / saltstack-directed-graphs-sample / reqExecSLS / APPC_saltstack-adapter-1.0-exec-SLS-applyTo.json
1 [
2   {
3     "id": "edb39979.b1ccd8",
4     "type": "method",
5     "name": "saltstack-adapter-1.0",
6     "xml": "<method rpc='saltstack-adapter-1.0-exec-SLS-NodeList' mode='sync'>\n",
7     "comments": "",
8     "outputs": 1,
9     "x": 476,
10     "y": 245,
11     "z": "671ca899.284f68",
12     "wires": [
13       [
14         "95c9ba42.6e4aa8"
15       ]
16     ]
17   },
18   {
19     "id": "a16ea11e.f8d1c",
20     "type": "service-logic",
21     "name": "APPC 2.0.1",
22     "module": "APPC",
23     "version": "2.0.1",
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='APPC' version='2.0.1'>",
26     "outputs": 1,
27     "x": 267,
28     "y": 323,
29     "z": "671ca899.284f68",
30     "wires": [
31       [
32         "edb39979.b1ccd8"
33       ]
34     ]
35   },
36   {
37     "id": "1591f92e.029ca7",
38     "type": "returnFailure",
39     "name": "return failure",
40     "xml": "<return status='failure'>\n<parameter name='error-code' value='200' />\n<parameter name='error-message' value='`$org.openecomp.appc.adapter.saltstack.message`' />\n<parameter name='output.status.results' value='`$org.openecomp.appc.adapter.saltstack.results`' />\n",
41     "comments": "",
42     "x": 1191,
43     "y": 315,
44     "z": "671ca899.284f68",
45     "wires": []
46   },
47   {
48     "id": "95c9ba42.6e4aa8",
49     "type": "execute",
50     "name": "execute",
51     "xml": "<execute plugin='org.openecomp.appc.adapter.saltstack.SaltstackAdapter' method='reqExecCommand' >\n                        <parameter name='HostName' value='`$AgentUrl`'/>\n                        <parameter name='Port' value='`$Port`'/>\n                        <parameter name='User' value='`$User`'/>\n                        <parameter name='Password' value='`$Password`'/>\n                        <parameter name='Id' value='test1'/>\n                        <parameter name='Cmd' value='salt &apos;*&apos; test.ping --out=json --static'/>\n                        <parameter name='SlsExec' value='false'/>\n                        <parameter name='Timeout' value='`$Timeout`'/>\n",
52     "comments": "",
53     "outputs": 1,
54     "x": 684,
55     "y": 251,
56     "z": "671ca899.284f68",
57     "wires": [
58       [
59         "cd0c458a.2430b8",
60         "69e531e3.4efc3"
61       ]
62     ]
63   },
64   {
65     "id": "38b44d70.9c85d2",
66     "type": "switchNode",
67     "name": "switch",
68     "xml": "<switch test=\"`$org.onap.appc.adapter.saltstack.result.code`\">\n",
69     "comments": "",
70     "outputs": 1,
71     "x": 472,
72     "y": 405,
73     "z": "671ca899.284f68",
74     "wires": [
75       [
76         "505df598.069b9c",
77         "5d7292e.22ec06c"
78       ]
79     ]
80   },
81   {
82     "id": "505df598.069b9c",
83     "type": "other",
84     "name": "other",
85     "xml": "<outcome value='Other'>\n",
86     "comments": "",
87     "outputs": 1,
88     "x": 658,
89     "y": 463,
90     "z": "671ca899.284f68",
91     "wires": [
92       [
93         "1591f92e.029ca7"
94       ]
95     ]
96   },
97   {
98     "id": "cd0c458a.2430b8",
99     "type": "failure",
100     "name": "failure",
101     "xml": "<outcome value='failure'>\n",
102     "comments": "",
103     "outputs": 1,
104     "x": 935,
105     "y": 244,
106     "z": "671ca899.284f68",
107     "wires": [
108       [
109         "1591f92e.029ca7"
110       ]
111     ]
112   },
113   {
114     "id": "69e531e3.4efc3",
115     "type": "other",
116     "name": "other",
117     "xml": "<outcome value='Other'>\n",
118     "comments": "",
119     "outputs": 1,
120     "x": 282,
121     "y": 412,
122     "z": "671ca899.284f68",
123     "wires": [
124       [
125         "38b44d70.9c85d2"
126       ]
127     ]
128   },
129   {
130     "id": "5d7292e.22ec06c",
131     "type": "success",
132     "name": "success",
133     "xml": "<outcome value='200'>\n",
134     "comments": "",
135     "outputs": 1,
136     "x": 661,
137     "y": 405,
138     "z": "671ca899.284f68",
139     "wires": [
140       [
141         "c9df0cea.f2361"
142       ]
143     ]
144   },
145   {
146     "id": "e4f7eb59.0abb58",
147     "type": "returnSuccess",
148     "name": "return success",
149     "xml": "<return status='success'>\n<parameter name='output.status.code' value='`$org.openecomp.appc.adapter.saltstack.result.code`' />\n<parameter name='output.status.message' value='`$org.openecomp.appc.adapter.saltstack.message`'/>\n<parameter name='output.status.results' value = '`$org.openecomp.appc.adapter.saltstack.results`'/>\n",
150     "comments": "",
151     "x": 1079,
152     "y": 564,
153     "z": "671ca899.284f68",
154     "wires": []
155   },
156   {
157     "id": "8e586da4.570f1",
158     "type": "dgstart",
159     "name": "DGSTART",
160     "outputs": 1,
161     "x": 245,
162     "y": 223,
163     "z": "671ca899.284f68",
164     "wires": [
165       [
166         "a16ea11e.f8d1c"
167       ]
168     ]
169   },
170   {
171     "id": "71387074.137c1",
172     "type": "comment",
173     "name": "SaltStack Adaptor DG",
174     "info": "",
175     "comments": "",
176     "x": 623,
177     "y": 110,
178     "z": "671ca899.284f68",
179     "wires": []
180   },
181   {
182     "id": "c5e8c62d.021758",
183     "type": "comment",
184     "name": "request-method = reqExecSLS, req-action = \"execute SLS\"",
185     "info": "Here we basically test if minion1 is active by pinging to it, then respective sls file is executed on to it. \n",
186     "comments": "",
187     "x": 634,
188     "y": 195,
189     "z": "671ca899.284f68",
190     "wires": []
191   },
192   {
193     "id": "1805797.a241487",
194     "type": "comment",
195     "name": "Assumptions for this DG (example-server)",
196     "info": "Here we assume, the saltstack server is the example-vagrant based server. Where, the master saltstact controllers minion1 and minion2. ",
197     "comments": "",
198     "x": 626,
199     "y": 151,
200     "z": "671ca899.284f68",
201     "wires": []
202   },
203   {
204     "id": "c9df0cea.f2361",
205     "type": "switchNode",
206     "name": "switch",
207     "xml": "<switch test=\"`$test1.minion1`\">\n",
208     "comments": "",
209     "outputs": 1,
210     "x": 825,
211     "y": 405,
212     "z": "671ca899.284f68",
213     "wires": [
214       [
215         "d83d6024.2454d",
216         "f4d70bbc.f0bc38"
217       ]
218     ]
219   },
220   {
221     "id": "d83d6024.2454d",
222     "type": "other",
223     "name": "other",
224     "xml": "<outcome value='Other'>\n",
225     "comments": "",
226     "outputs": 1,
227     "x": 991,
228     "y": 459,
229     "z": "671ca899.284f68",
230     "wires": [
231       [
232         "1591f92e.029ca7"
233       ]
234     ]
235   },
236   {
237     "id": "f4d70bbc.f0bc38",
238     "type": "other",
239     "name": "outcome",
240     "xml": "<outcome value='true'>\n",
241     "comments": "",
242     "outputs": 1,
243     "x": 994,
244     "y": 401,
245     "z": "671ca899.284f68",
246     "wires": [
247       [
248         "e86d9995.b65c58"
249       ]
250     ]
251   },
252   {
253     "id": "e86d9995.b65c58",
254     "type": "execute",
255     "name": "execute",
256     "xml": "<execute plugin='org.openecomp.appc.adapter.saltstack.SaltstackAdapter' method='reqExecCommand' >\n                        <parameter name='HostName' value='`$AgentUrl`'/>\n                        <parameter name='Port' value='`$Port`'/>\n                        <parameter name='User' value='`$User`'/>\n                        <parameter name='Password' value='`$Password`'/>\n                        <parameter name='Id' value='test2'/>\n                        <parameter name='SlsName' value='test-file.sls'/>\n                        <parameter name='NodeList' value='minion1'/>\n                        <parameter name='Timeout' value='`$Timeout`'/>\n",
257     "comments": "",
258     "outputs": 1,
259     "x": 398,
260     "y": 593,
261     "z": "671ca899.284f68",
262     "wires": [
263       [
264         "89ff1c2a.08f52",
265         "e20c4c85.43d3c"
266       ]
267     ]
268   },
269   {
270     "id": "89ff1c2a.08f52",
271     "type": "failure",
272     "name": "failure",
273     "xml": "<outcome value='failure'>\n",
274     "comments": "",
275     "outputs": 1,
276     "x": 583,
277     "y": 562,
278     "z": "671ca899.284f68",
279     "wires": [
280       [
281         "6032e33e.5b044c"
282       ]
283     ]
284   },
285   {
286     "id": "e20c4c85.43d3c",
287     "type": "other",
288     "name": "other",
289     "xml": "<outcome value='Other'>\n",
290     "comments": "",
291     "outputs": 1,
292     "x": 581,
293     "y": 634,
294     "z": "671ca899.284f68",
295     "wires": [
296       [
297         "8bb4c177.499c8"
298       ]
299     ]
300   },
301   {
302     "id": "8bb4c177.499c8",
303     "type": "switchNode",
304     "name": "switch",
305     "xml": "<switch test=\"`$org.onap.appc.adapter.saltstack.result.code`\">\n",
306     "comments": "",
307     "outputs": 1,
308     "x": 733,
309     "y": 622,
310     "z": "671ca899.284f68",
311     "wires": [
312       [
313         "905334fe.934d68",
314         "9c217c10.9d539"
315       ]
316     ]
317   },
318   {
319     "id": "9c217c10.9d539",
320     "type": "success",
321     "name": "success",
322     "xml": "<outcome value='200'>\n",
323     "comments": "",
324     "outputs": 1,
325     "x": 896,
326     "y": 568,
327     "z": "671ca899.284f68",
328     "wires": [
329       [
330         "e4f7eb59.0abb58"
331       ]
332     ]
333   },
334   {
335     "id": "905334fe.934d68",
336     "type": "other",
337     "name": "other",
338     "xml": "<outcome value='Other'>\n",
339     "comments": "",
340     "outputs": 1,
341     "x": 893,
342     "y": 637,
343     "z": "671ca899.284f68",
344     "wires": [
345       [
346         "7026a88c.5bffd8"
347       ]
348     ]
349   },
350   {
351     "id": "6032e33e.5b044c",
352     "type": "returnFailure",
353     "name": "return failure",
354     "xml": "<return status='failure'>\n<parameter name='error-code' value='200' />\n<parameter name='error-message' value='`$org.openecomp.appc.adapter.saltstack.message`' />\n<parameter name='output.status.results' value='`$org.openecomp.appc.adapter.saltstack.results`' />\n",
355     "comments": "",
356     "x": 735,
357     "y": 559,
358     "z": "671ca899.284f68",
359     "wires": []
360   },
361   {
362     "id": "7026a88c.5bffd8",
363     "type": "returnFailure",
364     "name": "return failure",
365     "xml": "<return status='failure'>\n<parameter name='error-code' value='200' />\n<parameter name='error-message' value='`$org.openecomp.appc.adapter.saltstack.message`' />\n<parameter name='output.status.results' value='`$org.openecomp.appc.adapter.saltstack.results`' />\n",
366     "comments": "",
367     "x": 1054,
368     "y": 637,
369     "z": "671ca899.284f68",
370     "wires": []
371   }
372 ]