saltstack to take env and file param
[ccsdk/sli/adaptors.git] / saltstack-adapter / saltstack-directed-graphs-sample / reqExecSLSFile / APPC_saltstack-adapter-1.0-SLSFILE.json
1 [
2   {
3     "id": "3228200a.5dc1a",
4     "type": "method",
5     "name": "saltstack-adapter-1.0",
6     "xml": "<method rpc='saltstack-adapter-1.0-SLSFILE' mode='sync'>\n",
7     "comments": "",
8     "outputs": 1,
9     "x": 679,
10     "y": 282,
11     "z": "6d4f912d.f07bc",
12     "wires": [
13       [
14         "50b2729f.712eac"
15       ]
16     ]
17   },
18   {
19     "id": "9fb54163.4fb28",
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": 456,
28     "y": 281,
29     "z": "6d4f912d.f07bc",
30     "wires": [
31       [
32         "3228200a.5dc1a"
33       ]
34     ]
35   },
36   {
37     "id": "49109fbc.a7a14",
38     "type": "returnSuccess",
39     "name": "return success",
40     "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",
41     "comments": "",
42     "x": 1058,
43     "y": 374,
44     "z": "6d4f912d.f07bc",
45     "wires": []
46   },
47   {
48     "id": "d030a396.56232",
49     "type": "dgstart",
50     "name": "DGSTART",
51     "outputs": 1,
52     "x": 287,
53     "y": 280,
54     "z": "6d4f912d.f07bc",
55     "wires": [
56       [
57         "9fb54163.4fb28"
58       ]
59     ]
60   },
61   {
62     "id": "281900c4.fd3e8",
63     "type": "comment",
64     "name": "SaltStack Adaptor DG",
65     "info": "",
66     "comments": "",
67     "x": 664,
68     "y": 159,
69     "z": "6d4f912d.f07bc",
70     "wires": []
71   },
72   {
73     "id": "431a69db.2d2c58",
74     "type": "comment",
75     "name": "request-method = reqExecSLS, req-action = \"execute SLS\"",
76     "info": "This would be the ideal adaptor the orchestrator DG will call, this just takes in SlsName.",
77     "comments": "",
78     "x": 675,
79     "y": 244,
80     "z": "6d4f912d.f07bc",
81     "wires": []
82   },
83   {
84     "id": "4202e1ce.09495",
85     "type": "comment",
86     "name": "Assumptions for this DG (example-server)",
87     "info": "Here we assume, the saltstack server is the example-vagrant based server. Where, the master saltstact controllers minion1 and minion2. ",
88     "comments": "",
89     "x": 667,
90     "y": 200,
91     "z": "6d4f912d.f07bc",
92     "wires": []
93   },
94   {
95     "id": "50b2729f.712eac",
96     "type": "execute",
97     "name": "execute",
98     "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='SlsFile' value='file/location/test-file.sls'/>\n",
99     "comments": "",
100     "outputs": 1,
101     "x": 369,
102     "y": 411,
103     "z": "6d4f912d.f07bc",
104     "wires": [
105       [
106         "71746570.35f0dc",
107         "3e4f7a4a.ae0dc6"
108       ]
109     ]
110   },
111   {
112     "id": "71746570.35f0dc",
113     "type": "failure",
114     "name": "failure",
115     "xml": "<outcome value='failure'>\n",
116     "comments": "",
117     "outputs": 1,
118     "x": 562,
119     "y": 372,
120     "z": "6d4f912d.f07bc",
121     "wires": [
122       [
123         "e59a1a81.112a08"
124       ]
125     ]
126   },
127   {
128     "id": "3e4f7a4a.ae0dc6",
129     "type": "other",
130     "name": "other",
131     "xml": "<outcome value='Other'>\n",
132     "comments": "",
133     "outputs": 1,
134     "x": 560,
135     "y": 444,
136     "z": "6d4f912d.f07bc",
137     "wires": [
138       [
139         "59e320fa.12908"
140       ]
141     ]
142   },
143   {
144     "id": "59e320fa.12908",
145     "type": "switchNode",
146     "name": "switch",
147     "xml": "<switch test=\"`$org.onap.appc.adapter.saltstack.result.code`\">\n",
148     "comments": "",
149     "outputs": 1,
150     "x": 712,
151     "y": 432,
152     "z": "6d4f912d.f07bc",
153     "wires": [
154       [
155         "f81ed07.2135c3",
156         "eb55b5a9.f0d2f8"
157       ]
158     ]
159   },
160   {
161     "id": "eb55b5a9.f0d2f8",
162     "type": "success",
163     "name": "success",
164     "xml": "<outcome value='200'>\n",
165     "comments": "",
166     "outputs": 1,
167     "x": 875,
168     "y": 378,
169     "z": "6d4f912d.f07bc",
170     "wires": [
171       [
172         "49109fbc.a7a14"
173       ]
174     ]
175   },
176   {
177     "id": "f81ed07.2135c3",
178     "type": "other",
179     "name": "other",
180     "xml": "<outcome value='Other'>\n",
181     "comments": "",
182     "outputs": 1,
183     "x": 872,
184     "y": 447,
185     "z": "6d4f912d.f07bc",
186     "wires": [
187       [
188         "6549631f.8e516c"
189       ]
190     ]
191   },
192   {
193     "id": "e59a1a81.112a08",
194     "type": "returnFailure",
195     "name": "return failure",
196     "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",
197     "comments": "",
198     "x": 722,
199     "y": 356,
200     "z": "6d4f912d.f07bc",
201     "wires": []
202   },
203   {
204     "id": "6549631f.8e516c",
205     "type": "returnFailure",
206     "name": "return failure",
207     "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",
208     "comments": "",
209     "x": 1042,
210     "y": 444,
211     "z": "6d4f912d.f07bc",
212     "wires": []
213   }
214 ]