1b891a20cd913aa1757f0c9c1e5ab0a1638462f6
[ccsdk/sli/adaptors.git] / saltstack-adapter / saltstack-directed-graphs-sample / reqExecCommand / APPC_saltstack-adapter-1.0-exec-multi-sls.json
1 [
2   {
3     "id": "65f5c0d6.9c4ce",
4     "type": "method",
5     "name": "saltstack-adapter-1.0",
6     "xml": "<method rpc='saltstack-adapter-1.0-exec-multi-sls' mode='sync'>\n",
7     "comments": "",
8     "outputs": 1,
9     "x": 615,
10     "y": 273,
11     "z": "6df02477.0463cc",
12     "wires": [
13       [
14         "c332cb01.51a3e8"
15       ]
16     ]
17   },
18   {
19     "id": "bf71bd6e.1be5b",
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": 406,
28     "y": 351,
29     "z": "6df02477.0463cc",
30     "wires": [
31       [
32         "65f5c0d6.9c4ce"
33       ]
34     ]
35   },
36   {
37     "id": "40ce8a6.5f7d174",
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.ansible.message`' />\n<parameter name='output.status.results' value='`$org.openecomp.appc.adapter.ansible.results`' />\n",
41     "comments": "",
42     "x": 1325,
43     "y": 455,
44     "z": "6df02477.0463cc",
45     "wires": []
46   },
47   {
48     "id": "c332cb01.51a3e8",
49     "type": "execute",
50     "name": "execute",
51     "xml": "<execute plugin='org.openecomp.appc.adapter.ansible.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": 824,
55     "y": 275,
56     "z": "6df02477.0463cc",
57     "wires": [
58       [
59         "5b387684.e51be8",
60         "4bb6b32e.adfc2c"
61       ]
62     ]
63   },
64   {
65     "id": "16dfbd4f.b6da73",
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": 607,
72     "y": 435,
73     "z": "6df02477.0463cc",
74     "wires": [
75       [
76         "24d22f52.ef59a",
77         "ac765880.a6c548"
78       ]
79     ]
80   },
81   {
82     "id": "24d22f52.ef59a",
83     "type": "other",
84     "name": "other",
85     "xml": "<outcome value='Other'>\n",
86     "comments": "",
87     "outputs": 1,
88     "x": 798,
89     "y": 433,
90     "z": "6df02477.0463cc",
91     "wires": [
92       [
93         "40ce8a6.5f7d174"
94       ]
95     ]
96   },
97   {
98     "id": "5b387684.e51be8",
99     "type": "failure",
100     "name": "failure",
101     "xml": "<outcome value='failure'>\n",
102     "comments": "",
103     "outputs": 1,
104     "x": 1074,
105     "y": 272,
106     "z": "6df02477.0463cc",
107     "wires": [
108       [
109         "40ce8a6.5f7d174"
110       ]
111     ]
112   },
113   {
114     "id": "4bb6b32e.adfc2c",
115     "type": "other",
116     "name": "other",
117     "xml": "<outcome value='Other'>\n",
118     "comments": "",
119     "outputs": 1,
120     "x": 429,
121     "y": 433,
122     "z": "6df02477.0463cc",
123     "wires": [
124       [
125         "16dfbd4f.b6da73"
126       ]
127     ]
128   },
129   {
130     "id": "ac765880.a6c548",
131     "type": "success",
132     "name": "success",
133     "xml": "<outcome value='200'>\n",
134     "comments": "",
135     "outputs": 1,
136     "x": 414,
137     "y": 549,
138     "z": "6df02477.0463cc",
139     "wires": [
140       [
141         "2dda30fc.8747"
142       ]
143     ]
144   },
145   {
146     "id": "e45accfe.91615",
147     "type": "returnSuccess",
148     "name": "return success",
149     "xml": "<return status='success'>\n<parameter name='output.status.code' value='`$org.openecomp.appc.adapter.ansible.result.code`' />\n<parameter name='output.status.message' value='`$org.openecomp.appc.adapter.ansible.message`'/>\n<parameter name='output.status.results' value = '`$org.openecomp.appc.adapter.ansible.results`'/>\n",
150     "comments": "",
151     "x": 1345,
152     "y": 757,
153     "z": "6df02477.0463cc",
154     "wires": []
155   },
156   {
157     "id": "11a891ad.55bc1e",
158     "type": "dgstart",
159     "name": "DGSTART",
160     "outputs": 1,
161     "x": 384,
162     "y": 251,
163     "z": "6df02477.0463cc",
164     "wires": [
165       [
166         "bf71bd6e.1be5b"
167       ]
168     ]
169   },
170   {
171     "id": "a56383b.496c48",
172     "type": "comment",
173     "name": "SaltStack Adaptor DG",
174     "info": "",
175     "comments": "",
176     "x": 756,
177     "y": 134,
178     "z": "6df02477.0463cc",
179     "wires": []
180   },
181   {
182     "id": "cfda30b5.5e166",
183     "type": "comment",
184     "name": "request-method = reqExecCommand, req-action = \"execute multiple SLS commands\"",
185     "info": "Here we basically test if minion1 is active by pinging to it, then install vim package to it. \n",
186     "comments": "",
187     "x": 773,
188     "y": 217,
189     "z": "6df02477.0463cc",
190     "wires": []
191   },
192   {
193     "id": "a8efb922.f23ce8",
194     "type": "other",
195     "name": "other",
196     "xml": "<outcome value='Other'>\n",
197     "comments": "",
198     "outputs": 1,
199     "x": 459,
200     "y": 751,
201     "z": "6df02477.0463cc",
202     "wires": [
203       [
204         "3ff32215.20cd0e"
205       ]
206     ]
207   },
208   {
209     "id": "df0c0907.d17838",
210     "type": "execute",
211     "name": "execute",
212     "xml": "<execute plugin='org.openecomp.appc.adapter.ansible.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='Cmd' value='salt &apos;minion1&apos; pkg.install vim --out=json --static'/>\n                        <parameter name='SlsExec' value='false'/>\n                        <parameter name='Timeout' value='`$Timeout`'/>\n",
213     "comments": "",
214     "outputs": 1,
215     "x": 836,
216     "y": 638,
217     "z": "6df02477.0463cc",
218     "wires": [
219       [
220         "1e5bbe2e.9cbb82",
221         "a8efb922.f23ce8"
222       ]
223     ]
224   },
225   {
226     "id": "1e5bbe2e.9cbb82",
227     "type": "failure",
228     "name": "failure",
229     "xml": "<outcome value='failure'>\n",
230     "comments": "",
231     "outputs": 1,
232     "x": 1054,
233     "y": 644,
234     "z": "6df02477.0463cc",
235     "wires": [
236       [
237         "40ce8a6.5f7d174"
238       ]
239     ]
240   },
241   {
242     "id": "3ff32215.20cd0e",
243     "type": "switchNode",
244     "name": "switch",
245     "xml": "<switch test=\"`$org.onap.appc.adapter.saltstack.result.code`\">\n",
246     "comments": "",
247     "outputs": 1,
248     "x": 647,
249     "y": 745,
250     "z": "6df02477.0463cc",
251     "wires": [
252       [
253         "8e2c712b.784b4",
254         "3d74cfe5.d41f5"
255       ]
256     ]
257   },
258   {
259     "id": "8e2c712b.784b4",
260     "type": "other",
261     "name": "other",
262     "xml": "<outcome value='Other'>\n",
263     "comments": "",
264     "outputs": 1,
265     "x": 830,
266     "y": 823,
267     "z": "6df02477.0463cc",
268     "wires": [
269       [
270         "40ce8a6.5f7d174"
271       ]
272     ]
273   },
274   {
275     "id": "3d74cfe5.d41f5",
276     "type": "success",
277     "name": "success",
278     "xml": "<outcome value='200'>\n",
279     "comments": "",
280     "outputs": 1,
281     "x": 829,
282     "y": 758,
283     "z": "6df02477.0463cc",
284     "wires": [
285       [
286         "8313564b.004798"
287       ]
288     ]
289   },
290   {
291     "id": "2dda30fc.8747",
292     "type": "switchNode",
293     "name": "switch",
294     "xml": "<switch test=\"`$test1.minion1`\">\n",
295     "comments": "",
296     "outputs": 1,
297     "x": 586,
298     "y": 549,
299     "z": "6df02477.0463cc",
300     "wires": [
301       [
302         "e0133af5.2ca028",
303         "7f28f521.cf47cc"
304       ]
305     ]
306   },
307   {
308     "id": "7f28f521.cf47cc",
309     "type": "other",
310     "name": "outcome",
311     "xml": "<outcome value='true'>\n",
312     "comments": "",
313     "outputs": 1,
314     "x": 656,
315     "y": 640,
316     "z": "6df02477.0463cc",
317     "wires": [
318       [
319         "df0c0907.d17838"
320       ]
321     ]
322   },
323   {
324     "id": "e0133af5.2ca028",
325     "type": "other",
326     "name": "other",
327     "xml": "<outcome value='Other'>\n",
328     "comments": "",
329     "outputs": 1,
330     "x": 780,
331     "y": 549,
332     "z": "6df02477.0463cc",
333     "wires": [
334       [
335         "40ce8a6.5f7d174"
336       ]
337     ]
338   },
339   {
340     "id": "8313564b.004798",
341     "type": "switchNode",
342     "name": "switch",
343     "xml": "<switch test=\"`$test2.minion1.retcode`\">\n",
344     "comments": "",
345     "outputs": 1,
346     "x": 986,
347     "y": 752,
348     "z": "6df02477.0463cc",
349     "wires": [
350       [
351         "13d18d2d.71fbf3",
352         "2e940add.522a36"
353       ]
354     ]
355   },
356   {
357     "id": "13d18d2d.71fbf3",
358     "type": "other",
359     "name": "other",
360     "xml": "<outcome value='Other'>\n",
361     "comments": "",
362     "outputs": 1,
363     "x": 1165,
364     "y": 825,
365     "z": "6df02477.0463cc",
366     "wires": [
367       [
368         "40ce8a6.5f7d174"
369       ]
370     ]
371   },
372   {
373     "id": "2e940add.522a36",
374     "type": "success",
375     "name": "success",
376     "xml": "<outcome value='0'>\n",
377     "comments": "",
378     "outputs": 1,
379     "x": 1156,
380     "y": 754,
381     "z": "6df02477.0463cc",
382     "wires": [
383       [
384         "e45accfe.91615"
385       ]
386     ]
387   },
388   {
389     "id": "6d6678d2.6a9bd8",
390     "type": "comment",
391     "name": "Assumptions for this DG (example-server)",
392     "info": "Here we assume, the saltstack server is the example-vagrant based server. Where, the master saltstact controlls minion1 and minion2. ",
393     "comments": "",
394     "x": 756,
395     "y": 173,
396     "z": "6df02477.0463cc",
397     "wires": []
398   }
399 ]