6025dbd6d7c4db82c12f09ceea87a02429919ec5
[ccsdk/apps.git] /
1 {
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   "dsl_definitions" : {
28     "dynamic-rest-source": {
29       "type" : "basic-type",
30       "url" : "http://localhost:8080",
31       "userId" : {
32         "get_input": "rest-user-name"
33       }
34     },
35     "dynamic-db-source": {
36       "type" : "maria-db",
37       "url" : "jdbc:mysql://localhost:3306/sdnctl",
38       "username" : "sdnctl",
39       "password" : {
40         "get_attribute": [
41           "BPP",
42           "dynamic-db-source.password"
43         ]
44       }
45     }
46   },
47   "topology_template": {
48     "inputs": {
49       "request-id": {
50         "required": true,
51         "type": "string"
52       },
53       "action-name": {
54         "required": true,
55         "type": "string"
56       },
57       "scope-type": {
58         "required": true,
59         "type": "string"
60       },
61       "hostname": {
62         "required": true,
63         "type": "string"
64       }
65     },
66     "node_templates": {
67       "resource-assignment-process": {
68         "type": "dg-generic",
69         "properties": {
70           "content": {
71             "get_artifact": [
72               "SELF",
73               "dg-resource-assignment-process"
74             ]
75           },
76           "dependency-node-templates": [
77             "resource-assignment"
78           ]
79         },
80         "artifacts": {
81           "dg-resource-assignment-process": {
82             "type": "artifact-directed-graph",
83             "file": "Plans/CONFIG_ResourceAssignment_1.0.0.xml"
84           }
85         }
86       },
87       "activate-process": {
88         "type": "dg-generic",
89         "properties": {
90           "content": {
91             "get_artifact": [
92               "SELF",
93               "dg-activate-process"
94             ]
95           },
96           "dependency-node-templates": [
97             "activate-jython"
98           ]
99         },
100         "artifacts": {
101           "dg-activate-process": {
102             "type": "artifact-directed-graph",
103             "file": "Plans/CONFIG_ActivateNetconf_1.0.0.xml"
104           }
105         }
106       },
107       "assign-activate-process": {
108         "type": "dg-generic",
109         "properties": {
110           "content": {
111             "get_artifact": [
112               "SELF",
113               "dg-assign-activate-process"
114             ]
115           },
116           "dependency-node-templates": [
117             "resource-assignment",
118             "activate-jython"
119           ]
120         },
121         "artifacts": {
122           "dg-assign-activate-process": {
123             "type": "artifact-directed-graph",
124             "file": "Plans/CONFIG_AssignActivateNetconf_1.0.0.xml"
125           }
126         }
127       },
128       "resource-assignment": {
129         "type": "component-resource-resolution",
130         "interfaces": {
131           "ResourceResolutionComponent": {
132             "operations": {
133               "process": {
134                 "inputs": {
135                   "action-name": {
136                     "get_input": "action-name"
137                   },
138                   "resource-type": "vnf-type",
139                   "request-id": {
140                     "get_input": "request-id"
141                   },
142                   "resource-id": {
143                     "get_input": "hostname"
144                   },
145                   "artifact-prefix-names": [
146                     "baseconfig"
147                   ]
148                 },
149                 "outputs": {
150                   "resource-assignment-params": {
151                     "get_attribute": [
152                       "SELF",
153                       "assignment-params"
154                     ]
155                   },
156                   "status": "success"
157                 }
158               }
159             }
160           }
161         },
162         "artifacts": {
163           "baseconfig-template": {
164             "type": "artifact-template-velocity",
165             "file": "Templates/baseconfig-template.vtl"
166           },
167           "baseconfig-mapping": {
168             "type": "artifact-mapping-resource",
169             "file": "Definitions/baseconfig-mapping.json"
170           }
171         }
172       },
173       "resource-assignment-py": {
174         "type": "component-resource-resolution",
175         "interfaces": {
176           "ResourceResolutionComponent": {
177             "operations": {
178               "process": {
179                 "implementation": {
180                   "primary": "component-script"
181                 },
182                 "inputs": {
183                   "action-name": {
184                     "get_input": "action-name"
185                   }
186                 },
187                 "outputs": {
188                   "resource-assignment-params": "",
189                   "status": ""
190                 }
191               }
192             }
193           }
194         },
195         "artifacts": {
196           "component-script": {
197             "type": "artifact-script-jython",
198             "file": "Scripts/python/SamplePythonComponentNode.py"
199           }
200         }
201       },
202       "activate-jython": {
203         "type": "component-jython-executor",
204         "interfaces": {
205           "ComponentJythonExecutor": {
206             "operations": {
207               "process": {
208                 "implementation": {
209                   "primary": "component-script"
210                 },
211                 "inputs": {
212                   "instance-dependencies": [
213                     "json-parser-service"
214                   ]
215                 },
216                 "outputs": {
217                   "response-data": "",
218                   "status": ""
219                 }
220               }
221             }
222           }
223         },
224         "artifacts": {
225           "component-script": {
226             "type": "artifact-script-jython",
227             "file": "Scripts/python/SamplePythonComponentNode.py"
228           }
229         }
230       },
231       "activate-netconf": {
232         "type": "component-netconf-executor",
233         "interfaces": {
234           "ComponentNetconfExecutor": {
235             "operations": {
236               "process": {
237                 "implementation": {
238                   "primary": "component-script"
239                 },
240                 "inputs": {
241                   "script-type": "jython",
242                   "script-class-reference": "Scripts/python/NetconfRpcExample.py",
243                   "instance-dependencies": [
244                   ]
245                 },
246                 "outputs": {
247                   "response-data": "",
248                   "status": ""
249                 }
250               }
251             }
252           }
253         },
254         "requirements": {
255           "netconf-connection": {
256             "capability": "netconf",
257             "node": "sample-netconf-device",
258             "relationship": "tosca.relationships.ConnectsTo"
259           }
260         },
261         "artifacts": {
262           "hostname-template": {
263             "type": "artifact-template-velocity",
264             "file": "Templates/hostname-template.vtl"
265           },
266           "hostname-mapping": {
267             "type": "artifact-mapping-resource",
268             "file": "Definitions/hostname-mapping.json"
269           },
270           "component-script": {
271             "type": "artifact-script-jython",
272             "file": "Scripts/python/NetconfRpcExample.py"
273           }
274         }
275       },
276       "sample-netconf-device": {
277         "type": "vnf-netconf-device",
278         "capabilities": {
279           "netconf": {
280             "properties": {
281               "login-key": "sample-key",
282               "login-account": "sample-account",
283               "target-ip-address": {
284                 "get_attribute": [
285                   "resource-assignment",
286                   "",
287                   "assignment-params",
288                   "$.ipAddress"
289                 ]
290               },
291               "port-number": 830,
292               "connection-time-out": 30
293             }
294           }
295         }
296       }
297     },
298     "workflows": {
299       "resource-assignment": {
300         "inputs": {
301           "resource-assignment-properties": {
302             "required": true,
303             "type": "dt-resource-assignment-properties"
304           }
305         },
306         "steps": {
307           "call-resource-assignment": {
308             "description": "Resource Assignment Workflow",
309             "target": "resource-assignment-process",
310             "activities": [
311               {
312                 "call_operation": "CONFIG.ResourceAssignment"
313               }
314             ]
315           }
316         }
317       },
318       "activate": {
319         "inputs": {
320           "request-id": {
321             "required": true,
322             "type": "string"
323           },
324           "action-name": {
325             "required": true,
326             "type": "string"
327           },
328           "scope-type": {
329             "required": true,
330             "type": "string"
331           },
332           "hostname": {
333             "required": true,
334             "type": "string"
335           }
336         },
337         "steps": {
338           "activate-process": {
339             "description": "Netconf Activation Workflow",
340             "target": "activate-process",
341             "activities": [
342               {
343                 "call_operation": "CONFIG.ActivateProcess"
344               }
345             ]
346           }
347         }
348       },
349       "assign-activate": {
350         "inputs": {
351           "assign-activate-properties": {
352             "required": true,
353             "type": "dt-assign-activate-properties"
354           }
355         },
356         "steps": {
357           "activate-process": {
358             "description": "Resource Assign and Netconf Activation Workflow",
359             "target": "assign-activate-process",
360             "activities": [
361               {
362                 "call_operation": "CONFIG.AssignActivateProcess"
363               }
364             ]
365           }
366         }
367       }
368     }
369   }
370 }