1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
|
[
{
"id": "9e493c5d.c18c7",
"type": "method",
"name": "saltstack-adaptor-1.0",
"xml": "<method rpc='saltstack-adaptor-1.0-exec-SLSFile' mode='sync'>\n",
"comments": "",
"outputs": 1,
"x": 343,
"y": 177,
"z": "c817b245.e1acf",
"wires": [
[
"382f8817.0dda08"
]
]
},
{
"id": "5ab60e1a.76a",
"type": "service-logic",
"name": "APPC 2.0.1",
"module": "APPC",
"version": "2.0.1",
"comments": "",
"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'>",
"outputs": 1,
"x": 134,
"y": 255,
"z": "c817b245.e1acf",
"wires": [
[
"9e493c5d.c18c7"
]
]
},
{
"id": "69ba9b5b.21dc44",
"type": "returnFailure",
"name": "return failure",
"xml": "<return status='failure'>\n<parameter name='error-code' value='200' />\n<parameter name='error-message' value='`$org.openecomp.appc.adaptor.saltstack.message`' />\n<parameter name='output.status.results' value='`$org.openecomp.appc.adaptor.saltstack.results`' />\n",
"comments": "",
"x": 1053,
"y": 359,
"z": "c817b245.e1acf",
"wires": []
},
{
"id": "382f8817.0dda08",
"type": "execute",
"name": "execute",
"xml": "<execute plugin='org.openecomp.appc.adaptor.saltstack.SaltstackAdaptor' 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 '*' test.ping --out=json --static'/>\n <parameter name='SlsExec' value='false'/>\n <parameter name='Timeout' value='`$Timeout`'/>\n",
"comments": "",
"outputs": 1,
"x": 552,
"y": 179,
"z": "c817b245.e1acf",
"wires": [
[
"11467754.fc8b19",
"7eb57428.8570cc"
]
]
},
{
"id": "c0b1e722.890768",
"type": "switchNode",
"name": "switch",
"xml": "<switch test=\"`$org.onap.appc.adaptor.saltstack.result.code`\">\n",
"comments": "",
"outputs": 1,
"x": 335,
"y": 339,
"z": "c817b245.e1acf",
"wires": [
[
"7bf12507.627b6c",
"d23ec77b.c9a8f8"
]
]
},
{
"id": "7bf12507.627b6c",
"type": "other",
"name": "other",
"xml": "<outcome value='Other'>\n",
"comments": "",
"outputs": 1,
"x": 526,
"y": 337,
"z": "c817b245.e1acf",
"wires": [
[
"69ba9b5b.21dc44"
]
]
},
{
"id": "11467754.fc8b19",
"type": "failure",
"name": "failure",
"xml": "<outcome value='failure'>\n",
"comments": "",
"outputs": 1,
"x": 802,
"y": 176,
"z": "c817b245.e1acf",
"wires": [
[
"69ba9b5b.21dc44"
]
]
},
{
"id": "7eb57428.8570cc",
"type": "other",
"name": "other",
"xml": "<outcome value='Other'>\n",
"comments": "",
"outputs": 1,
"x": 157,
"y": 337,
"z": "c817b245.e1acf",
"wires": [
[
"c0b1e722.890768"
]
]
},
{
"id": "d23ec77b.c9a8f8",
"type": "success",
"name": "success",
"xml": "<outcome value='200'>\n",
"comments": "",
"outputs": 1,
"x": 142,
"y": 453,
"z": "c817b245.e1acf",
"wires": [
[
"cc2bc9e2.787ab8"
]
]
},
{
"id": "745755b2.4509cc",
"type": "returnSuccess",
"name": "return success",
"xml": "<return status='success'>\n<parameter name='output.status.code' value='`$org.openecomp.appc.adaptor.saltstack.result.code`' />\n<parameter name='output.status.message' value='`$org.openecomp.appc.adaptor.saltstack.message`'/>\n<parameter name='output.status.results' value = '`$org.openecomp.appc.adaptor.saltstack.results`'/>\n",
"comments": "",
"x": 833,
"y": 650,
"z": "c817b245.e1acf",
"wires": []
},
{
"id": "cf1290d3.278fd",
"type": "dgstart",
"name": "DGSTART",
"outputs": 1,
"x": 112,
"y": 155,
"z": "c817b245.e1acf",
"wires": [
[
"5ab60e1a.76a"
]
]
},
{
"id": "5697d7dc.4e0678",
"type": "comment",
"name": "SaltStack Adaptor DG",
"info": "",
"comments": "",
"x": 484,
"y": 38,
"z": "c817b245.e1acf",
"wires": []
},
{
"id": "c923d8a1.848318",
"type": "comment",
"name": "request-method = reqExecCommand, req-action = \"execute multiple SLS commands\"",
"info": "Here we basically test if minion1 is active by pinging to it, then install vim package to it. \n",
"comments": "",
"x": 502,
"y": 121,
"z": "c817b245.e1acf",
"wires": []
},
{
"id": "27be8370.edc93c",
"type": "other",
"name": "other",
"xml": "<outcome value='Other'>\n",
"comments": "",
"outputs": 1,
"x": 187,
"y": 655,
"z": "c817b245.e1acf",
"wires": [
[
"f4628658.b3b638"
]
]
},
{
"id": "186009ee.e1eae6",
"type": "execute",
"name": "execute",
"xml": "<execute plugin='org.openecomp.appc.adaptor.saltstack.SaltstackAdaptor' 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='cd /srv/salt/; salt 'minion1' state.apply vim --out=json --static'/>\n <parameter name='SlsExec' value='true'/>\n <parameter name='Timeout' value='`$Timeout`'/>\n",
"comments": "",
"outputs": 1,
"x": 564,
"y": 542,
"z": "c817b245.e1acf",
"wires": [
[
"c056efff.509e2",
"27be8370.edc93c"
]
]
},
{
"id": "c056efff.509e2",
"type": "failure",
"name": "failure",
"xml": "<outcome value='failure'>\n",
"comments": "",
"outputs": 1,
"x": 782,
"y": 548,
"z": "c817b245.e1acf",
"wires": [
[
"69ba9b5b.21dc44"
]
]
},
{
"id": "f4628658.b3b638",
"type": "switchNode",
"name": "switch",
"xml": "<switch test=\"`$org.onap.appc.adaptor.saltstack.result.code`\">\n",
"comments": "",
"outputs": 1,
"x": 369,
"y": 652,
"z": "c817b245.e1acf",
"wires": [
[
"f79c7587.586f88",
"ca95f193.0b712"
]
]
},
{
"id": "f79c7587.586f88",
"type": "other",
"name": "other",
"xml": "<outcome value='Other'>\n",
"comments": "",
"outputs": 1,
"x": 574,
"y": 726,
"z": "c817b245.e1acf",
"wires": [
[
"69ba9b5b.21dc44"
]
]
},
{
"id": "ca95f193.0b712",
"type": "success",
"name": "success",
"xml": "<outcome value='200'>\n",
"comments": "",
"outputs": 1,
"x": 567,
"y": 652,
"z": "c817b245.e1acf",
"wires": [
[
"745755b2.4509cc"
]
]
},
{
"id": "cc2bc9e2.787ab8",
"type": "switchNode",
"name": "switch",
"xml": "<switch test=\"`$test1.minion1`\">\n",
"comments": "",
"outputs": 1,
"x": 314,
"y": 453,
"z": "c817b245.e1acf",
"wires": [
[
"c139043.a0224f8",
"e16e55cf.bf6f48"
]
]
},
{
"id": "e16e55cf.bf6f48",
"type": "other",
"name": "outcome",
"xml": "<outcome value='true'>\n",
"comments": "",
"outputs": 1,
"x": 384,
"y": 544,
"z": "c817b245.e1acf",
"wires": [
[
"186009ee.e1eae6"
]
]
},
{
"id": "c139043.a0224f8",
"type": "other",
"name": "other",
"xml": "<outcome value='Other'>\n",
"comments": "",
"outputs": 1,
"x": 508,
"y": 453,
"z": "c817b245.e1acf",
"wires": [
[
"69ba9b5b.21dc44"
]
]
},
{
"id": "7874f92a.9a1f38",
"type": "comment",
"name": "Assumptions for this DG (example-server)",
"info": "1) Here we assume, the saltstack server is the example-vagrant based server. Where, the master saltstact controlls minion1 and minion2. \n2) We assume that sls file called vim.sls is already present in the path /srv/salt on the server.",
"comments": "",
"x": 484,
"y": 80,
"z": "c817b245.e1acf",
"wires": []
}
]
|