blob: 822cc68b7509d88d9a338638b81b1a47ee74116e [file] [log] [blame]
Arundathi Patilb3fc4622019-02-13 22:49:40 +05301{
2 "metadata": {
3 "template_author": "Brinda Santh Muthuramalingam",
4 "author-email": "brindasanth@in.ibm.com",
5 "user-groups": "ADMIN, OPERATION",
6 "template_name": "baseconfiguration",
7 "template_version": "1.0.0",
8 "template_tags": "brinda, tosca"
9 },
10 "imports": [
11 {
12 "file": "Definitions/data_types.json"
13 },
14 {
15 "file": "Definitions/relationship_types.json"
16 },
17 {
18 "file": "Definitions/artifact_types.json"
19 },
20 {
21 "file": "Definitions/node_types.json"
22 },
23 {
24 "file": "Definitions/policy_types.json"
25 }
26 ],
27 "topology_template": {
28 "inputs": {
29 "request-id": {
30 "required": true,
31 "type": "string"
32 },
33 "action-name": {
34 "required": true,
35 "type": "string"
36 },
37 "scope-type": {
38 "required": true,
39 "type": "string"
40 },
41 "hostname": {
42 "required": true,
43 "type": "string"
44 }
45 },
46 "node_templates": {
47 "resource-assignment-process": {
48 "type": "dg-generic",
49 "properties": {
50 "content": {
51 "get_artifact": [
52 "SELF",
53 "dg-resource-assignment-process"
54 ]
55 },
56 "dependency-node-templates": [
57 "resource-assignment"
58 ]
59 },
60 "artifacts": {
61 "dg-resource-assignment-process": {
62 "type": "artifact-directed-graph",
63 "file": "Plans/CONFIG_ResourceAssignment_1.0.0.xml"
64 }
65 }
66 },
67 "activate-process": {
68 "type": "dg-generic",
69 "properties": {
70 "content": {
71 "get_artifact": [
72 "SELF",
73 "dg-activate-process"
74 ]
75 },
76 "dependency-node-templates": [
77 "activate-jython"
78 ]
79 },
80 "artifacts": {
81 "dg-activate-process": {
82 "type": "artifact-directed-graph",
83 "file": "Plans/CONFIG_ActivateNetconf_1.0.0.xml"
84 }
85 }
86 },
87 "assign-activate-process": {
88 "type": "dg-generic",
89 "properties": {
90 "content": {
91 "get_artifact": [
92 "SELF",
93 "dg-assign-activate-process"
94 ]
95 },
96 "dependency-node-templates": [
97 "resource-assignment",
98 "activate-jython"
99 ]
100 },
101 "artifacts": {
102 "dg-assign-activate-process": {
103 "type": "artifact-directed-graph",
104 "file": "Plans/CONFIG_AssignActivateNetconf_1.0.0.xml"
105 }
106 }
107 },
108 "resource-assignment": {
109 "type": "component-resource-assignment",
110 "interfaces": {
111 "ResourceAssignmentComponent": {
112 "operations": {
113 "process": {
114 "inputs": {
115 "action-name": {
116 "get_input": "action-name"
117 },
118 "resource-type": "vnf-type",
119 "request-id": {
120 "get_input": "request-id"
121 },
122 "resource-id": {
123 "get_input": "hostname"
124 },
125 "artifact-prefix-names": [
126 "baseconfig"
127 ]
128 },
129 "outputs": {
130 "resource-assignment-params": {
131 "get_attribute": [
132 "SELF",
133 "assignment-params"
134 ]
135 },
136 "status": "success"
137 }
138 }
139 }
140 }
141 },
142 "artifacts": {
143 "baseconfig-template": {
144 "type": "artifact-template-velocity",
145 "file": "Templates/baseconfig-template.vtl"
146 },
147 "baseconfig-mapping": {
148 "type": "artifact-mapping-resource",
149 "file": "Definitions/baseconfig-mapping.json"
150 }
151 }
152 },
153 "resource-assignment-py": {
154 "type": "component-resource-assignment",
155 "interfaces": {
156 "ResourceAssignmentComponent": {
157 "operations": {
158 "process": {
159 "implementation": {
160 "primary": "component-script"
161 },
162 "inputs": {
163 "action-name": {
164 "get_input": "action-name"
165 }
166 },
167 "outputs": {
168 "resource-assignment-params": "",
169 "status": ""
170 }
171 }
172 }
173 }
174 },
175 "artifacts": {
176 "component-script": {
177 "type": "artifact-script-jython",
178 "file": "Scripts/python/SamplePythonComponentNode.py"
179 }
180 }
181 },
182 "activate-jython": {
183 "type": "component-jython-executor",
184 "interfaces": {
185 "JythonExecutorComponent": {
186 "operations": {
187 "process": {
188 "implementation": {
189 "primary": "component-script"
190 },
191 "inputs": {
192 "instance-dependencies": [
193 "json-parser-service",
194 "netconf-rpc-service"
195 ]
196 },
197 "outputs": {
198 "response-data": "",
199 "status": ""
200 }
201 }
202 }
203 }
204 },
205 "artifacts": {
206 "component-script": {
207 "type": "artifact-script-jython",
208 "file": "Scripts/python/SamplePythonComponentNode.py"
209 }
210 }
211 },
212 "activate-netconf": {
213 "type": "component-netconf-executor",
214 "interfaces": {
215 "NetconfExecutorComponent": {
216 "operations": {
217 "process": {
218 "implementation": {
219 "primary": "component-script"
220 },
221 "inputs": {
222 "instance-dependencies": [
223 "json-parser-service",
224 "netconf-rpc-service"
225 ]
226 },
227 "outputs": {
228 "response-data": "",
229 "status": ""
230 }
231 }
232 }
233 }
234 },
235 "requirements": {
236 "netconf-connection": {
237 "capability": "netconf",
238 "node": "sample-netconf-device",
239 "relationship": "tosca.relationships.ConnectsTo"
240 }
241 },
242 "artifacts": {
243 "component-script": {
244 "type": "artifact-script-jython",
245 "file": "Scripts/python/DefaultGetNetConfig.py"
246 }
247 }
248 },
249 "sample-netconf-device": {
250 "type": "vnf-netconf-device",
251 "capabilities": {
252 "netconf": {
253 "properties": {
254 "login-key": "sample-key",
255 "login-account": "sample-account",
256 "target-ip-address": "localhost",
257 "port-number": 830,
258 "connection-time-out": 30
259 }
260 }
261 }
262 }
263 },
264 "workflows": {
265 "resource-assignment": {
266 "inputs": {
267 "resource-assignment-properties": {
268 "required": true,
269 "type": "dt-resource-assignment-properties"
270 }
271 },
272 "steps": {
273 "call-resource-assignment": {
274 "description": "Resource Assignment Workflow",
275 "target": "resource-assignment-process",
276 "activities": [
277 {
278 "call_operation": "CONFIG.ResourceAssignment"
279 }
280 ]
281 }
282 }
283 },
284 "activate": {
285 "inputs": {
286 "request-id": {
287 "required": true,
288 "type": "string"
289 },
290 "action-name": {
291 "required": true,
292 "type": "string"
293 },
294 "scope-type": {
295 "required": true,
296 "type": "string"
297 },
298 "hostname": {
299 "required": true,
300 "type": "string"
301 }
302 },
303 "steps": {
304 "activate-process": {
305 "description": "Netconf Activation Workflow",
306 "target": "activate-process",
307 "activities": [
308 {
309 "call_operation": "CONFIG.ActivateProcess"
310 }
311 ]
312 }
313 }
314 },
315 "assign-activate": {
316 "inputs": {
317 "assign-activate-properties": {
318 "required": true,
319 "type": "dt-assign-activate-properties"
320 }
321 },
322 "steps": {
323 "activate-process": {
324 "description": "Resource Assign and Netconf Activation Workflow",
325 "target": "assign-activate-process",
326 "activities": [
327 {
328 "call_operation": "CONFIG.AssignActivateProcess"
329 }
330 ]
331 }
332 }
333 }
334 }
335 }
336}