saltstack to take env and file param
[ccsdk/sli/adaptors.git] / saltstack-adapter / saltstack-directed-graphs-sample / reqExecCommand / APPC_saltstack-adapter-1.0-exe-nonSLS.json
1 [
2   {
3     "id": "d86e7ee4.ee3f1",
4     "type": "method",
5     "name": "saltstack-adapter-1.0",
6     "xml": "<method rpc='saltstack-adapter-1.0-exe-nonSLS' mode='sync'>\n",
7     "comments": "",
8     "outputs": 1,
9     "x": 492,
10     "y": 216,
11     "z": "5945fc3c.78efc4",
12     "wires": [
13       [
14         "38662e01.1d3c22"
15       ]
16     ]
17   },
18   {
19     "id": "9997883e.ec9028",
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": 283,
28     "y": 289,
29     "z": "5945fc3c.78efc4",
30     "wires": [
31       [
32         "d86e7ee4.ee3f1"
33       ]
34     ]
35   },
36   {
37     "id": "d40bf650.8338e8",
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": 1007,
43     "y": 373,
44     "z": "5945fc3c.78efc4",
45     "wires": []
46   },
47   {
48     "id": "38662e01.1d3c22",
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='cd /srv/salt; ls -l'/>\n                        <parameter name='SlsExec' value='false'/>\n                        <parameter name='Timeout' value='`$Timeout`'/>\n",
52     "comments": "",
53     "outputs": 1,
54     "x": 700,
55     "y": 212,
56     "z": "5945fc3c.78efc4",
57     "wires": [
58       [
59         "7b75e382.6344dc",
60         "6f108926.d7baf8"
61       ]
62     ]
63   },
64   {
65     "id": "24fb9f79.a6c6c",
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": 486,
72     "y": 372,
73     "z": "5945fc3c.78efc4",
74     "wires": [
75       [
76         "c526c44.c850738",
77         "9c394980.2a56a8"
78       ]
79     ]
80   },
81   {
82     "id": "c526c44.c850738",
83     "type": "other",
84     "name": "outcome",
85     "xml": "<outcome value='Other'>\n",
86     "comments": "",
87     "outputs": 1,
88     "x": 675,
89     "y": 371,
90     "z": "5945fc3c.78efc4",
91     "wires": [
92       [
93         "d40bf650.8338e8"
94       ]
95     ]
96   },
97   {
98     "id": "7b75e382.6344dc",
99     "type": "failure",
100     "name": "failure",
101     "xml": "<outcome value='failure'>\n",
102     "comments": "",
103     "outputs": 1,
104     "x": 951,
105     "y": 210,
106     "z": "5945fc3c.78efc4",
107     "wires": [
108       [
109         "d40bf650.8338e8"
110       ]
111     ]
112   },
113   {
114     "id": "6f108926.d7baf8",
115     "type": "other",
116     "name": "other",
117     "xml": "<outcome value='Other'>\n",
118     "comments": "",
119     "outputs": 1,
120     "x": 298,
121     "y": 378,
122     "z": "5945fc3c.78efc4",
123     "wires": [
124       [
125         "24fb9f79.a6c6c"
126       ]
127     ]
128   },
129   {
130     "id": "9c394980.2a56a8",
131     "type": "success",
132     "name": "success",
133     "xml": "<outcome value='200'>\n",
134     "comments": "",
135     "outputs": 1,
136     "x": 667,
137     "y": 460,
138     "z": "5945fc3c.78efc4",
139     "wires": [
140       [
141         "1f81a3db.54cd1c"
142       ]
143     ]
144   },
145   {
146     "id": "1f81a3db.54cd1c",
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": 887,
152     "y": 460,
153     "z": "5945fc3c.78efc4",
154     "wires": []
155   },
156   {
157     "id": "fcad80f8.ba2d9",
158     "type": "dgstart",
159     "name": "DGSTART",
160     "outputs": 1,
161     "x": 261,
162     "y": 189,
163     "z": "5945fc3c.78efc4",
164     "wires": [
165       [
166         "9997883e.ec9028"
167       ]
168     ]
169   },
170   {
171     "id": "b86e624d.49f0f",
172     "type": "comment",
173     "name": "SaltStack Adaptor DG",
174     "info": "",
175     "comments": "",
176     "x": 630,
177     "y": 75,
178     "z": "5945fc3c.78efc4",
179     "wires": []
180   },
181   {
182     "id": "83c0578d.061f98",
183     "type": "comment",
184     "name": "request-method = reqExecCommand, req-action = \"execute a single non SLS command\"",
185     "info": "",
186     "comments": "",
187     "x": 650,
188     "y": 155,
189     "z": "5945fc3c.78efc4",
190     "wires": []
191   },
192   {
193     "id": "f104feb6.558f7",
194     "type": "comment",
195     "name": "Assumptions for this DG",
196     "info": "Here we assume, the saltstack server is the example-vagrant based server. Where, the master saltstact controlls minion1 and minion2. ",
197     "comments": "",
198     "x": 627,
199     "y": 115,
200     "z": "5945fc3c.78efc4",
201     "wires": []
202   }
203 ]