0137cd2bd70bee9882b47e200aa6b3da09709286
[ccsdk/cds.git] /
1 {
2   "metadata": {
3     "template_author": "Brinda Santh Muthuramalingam",
4     "author-email": "brindasanth@gmail.com",
5     "user-groups": "ADMIN, OPERATION",
6     "template_name": "baseconfiguration",
7     "template_version": "1.0.0",
8     "template_tags": "brinda, tosca"
9   },
10   "topology_template": {
11     "inputs": {
12       "request-id": {
13         "required": true,
14         "type": "string"
15       },
16       "action-name": {
17         "required": true,
18         "type": "string"
19       },
20       "scope-type": {
21         "required": true,
22         "type": "string"
23       },
24       "hostname": {
25         "required": true,
26         "type": "string"
27       }
28     },
29     "node_templates": {
30       "activate-process": {
31         "type": "bpmn-activate",
32         "properties": {
33           "process-name": {
34             "get_input": "action-name"
35           },
36           "version": {
37             "get_property": [
38               "SELF",
39               "process-name"
40             ]
41           },
42           "content": {
43             "get_artifact": [
44               "SELF",
45               "activate-process"
46             ]
47           }
48         },
49         "artifacts": {
50           "activate-process": {
51             "type": "artifact-bpmn-camunda",
52             "file": "Plans/ActivateProcess.bpmn"
53           }
54         }
55       },
56       "resource-assignment": {
57         "type": "component-resource-assignment",
58         "properties": {
59           "request-id": "1234"
60         },
61         "interfaces": {
62           "DefaultComponentNode": {
63             "operations": {
64               "process": {
65                 "inputs": {
66                   "action-name": {
67                     "get_input": "action-name"
68                   },
69                   "resource-type": "vnf-type",
70                   "request-id": {
71                     "get_input": "request-id"
72                   },
73                   "resource-id": {
74                     "get_input": "hostname"
75                   },
76                   "template-content": {
77                     "get_artifact": [
78                       "SELF",
79                       "baseconfig-template"
80                     ]
81                   },
82                   "mapping-content": {
83                     "get_artifact": [
84                       "SELF",
85                       "baseconfig-mapping"
86                     ]
87                   }
88                 },
89                 "outputs": {
90                   "resource-assignment-params": {
91                     "get_attribute": [
92                       "SELF",
93                       "assignment-params"
94                     ]
95                   },
96                   "status": "success"
97                 }
98               }
99             }
100           }
101         },
102         "artifacts": {
103           "baseconfig-template": {
104             "type": "artifact-template-velocity",
105             "file": "Templates/baseconfig-template.vtl"
106           },
107           "baseconfig-mapping": {
108             "type": "artifact-mapping-resource",
109             "file": "Mappings/baseconfig-mapping.json"
110           }
111         }
112       },
113       "resource-assignment-py": {
114         "type": "component-resource-assignment",
115         "properties": {
116           "request-id": "1234"
117         },
118         "interfaces": {
119           "DefaultComponentNode": {
120             "operations": {
121               "process": {
122                 "implementation": {
123                   "primary": "component-script"
124                 },
125                 "inputs": {
126                   "action-name": {
127                     "get_input": "action-name"
128                   }
129                 },
130                 "outputs": {
131                   "resource-assignment-params": "",
132                   "status": ""
133                 }
134               }
135             }
136           }
137         },
138         "artifacts": {
139           "component-script": {
140             "type": "artifact-script-python",
141             "file": "Scripts/baseconfig-template.vtl"
142           }
143         }
144       }
145     },
146     "workflows": {
147       "activate-process": {
148         "steps": {
149           "call-resource-assignment": {
150             "description": "Invoke Resource Assignment Component",
151             "target": "resource-assignment",
152             "activities": [
153               {
154                 "call_operation": "ResourceAssignmentNode.process"
155               }
156             ],
157             "on_success": [
158               "download-baseconfig"
159             ]
160           },
161           "download-baseconfig": {
162             "description": "Call Download Base Config Component",
163             "target": "activate-netconf",
164             "activities": [
165               {
166                 "call_operation": "NetconfTransactionNode.process"
167               }
168             ],
169             "on_success": [
170               "download-licence"
171             ]
172           },
173           "download-licence": {
174             "description": "Call Download Licence Component",
175             "target": "activate-netconf",
176             "activities": [
177               {
178                 "call_operation": "NetconfTransactionNode.process"
179               }
180             ]
181           }
182         }
183       }
184     }
185   },
186   "artifact_types": {
187     "artifact-template-velocity": {
188       "description": " Velocity Template used for Configuration",
189       "version": "1.0.0",
190       "file_ext": [
191         "vtl"
192       ],
193       "derived_from": "tosca.artifacts.Implementation"
194     },
195     "artifact-mapping-resource": {
196       "description": " Velocity Template Resource Mapping File used along with Configuration template",
197       "version": "1.0.0",
198       "file_ext": [
199         "json"
200       ],
201       "derived_from": "tosca.artifacts.Implementation"
202     },
203     "artifact-script-kotlin": {
204       "description": " Kotlin Script Template used for Configuration",
205       "version": "1.0.0",
206       "file_ext": [
207         "kt"
208       ],
209       "derived_from": "tosca.artifacts.Implementation"
210     },
211     "artifact-script-python": {
212       "description": " Kotlin Script Template used for Configuration",
213       "version": "1.0.0",
214       "file_ext": [
215         "py"
216       ],
217       "derived_from": "tosca.artifacts.Implementation"
218     },
219     "artifact-bpmn-camunda": {
220       "description": " Camunda BPM File",
221       "version": "1.0.0",
222       "file_ext": [
223         "bpmn"
224       ],
225       "derived_from": "tosca.artifacts.Implementation"
226     },
227     "artifact-component-jar": {
228       "description": "Component Jar",
229       "version": "1.0.0",
230       "file_ext": [
231         "jar"
232       ],
233       "derived_from": "tosca.artifacts.Implementation"
234     }
235   },
236   "node_types": {
237     "bpmn-activate": {
238       "description": "This is BPMN Activate node type",
239       "version": "1.0.0",
240       "properties": {
241         "content": {
242           "required": false,
243           "type": "string"
244         },
245         "process-name": {
246           "required": false,
247           "type": "string"
248         },
249         "version": {
250           "required": false,
251           "type": "string",
252           "default": "LATEST"
253         }
254       },
255       "derived_from": "tosca.nodes.DG"
256     },
257     "tosca.nodes.Component": {
258       "description": "This is Resource Assignment Component API",
259       "version": "1.0.0",
260       "derived_from": "tosca.nodes.Root"
261     },
262     "tosca.nodes.DG": {
263       "description": "This is Directed Graph Node Type",
264       "version": "1.0.0",
265       "derived_from": "tosca.nodes.Root"
266     },
267     "tosca.nodes.component.Python": {
268       "description": "This is Resource Assignment Python Component API",
269       "version": "1.0.0",
270       "derived_from": "tosca.nodes.Root"
271     },
272     "component-resource-assignment": {
273       "description": "This is Resource Assignment Component API",
274       "version": "1.0.0",
275       "properties": {
276         "request-id": {
277           "description": "Request Id used to store the generated configuration, in the database along with the template-name",
278           "required": true,
279           "type": "string"
280         }
281       },
282       "interfaces": {
283         "DefaultComponentNode": {
284           "operations": {
285             "process": {
286               "inputs": {
287                 "action-name": {
288                   "description": "Recipe Name to get from Database, Either (message & mask-info ) or ( resource-id & resource-type & action-name & template-name ) should be present. Message will be given higest priority",
289                   "required": false,
290                   "type": "string"
291                 },
292                 "resource-type": {
293                   "required": false,
294                   "type": "string"
295                 },
296                 "request-id": {
297                   "description": "Request Id used to store the generated configuration, in the database along with the template-name",
298                   "required": true,
299                   "type": "string"
300                 },
301                 "resource-id": {
302                   "description": "Id used to pull the data content from the data base. Either template-data or resource-id should be present",
303                   "required": true,
304                   "type": "string"
305                 },
306                 "template-content": {
307                   "description": "Id used to pull the data content from the data base. Either template-data or resource-id should be present",
308                   "required": true,
309                   "type": "string"
310                 },
311                 "mapping-content": {
312                   "description": "Id used to pull the data content from the data base. Either template-data or resource-id should be present",
313                   "required": true,
314                   "type": "string"
315                 }
316               },
317               "outputs": {
318                 "resource-assignment-params": {
319                   "required": true,
320                   "type": "string"
321                 },
322                 "status": {
323                   "required": true,
324                   "type": "string"
325                 }
326               }
327             }
328           }
329         }
330       },
331       "derived_from": "tosca.nodes.Component"
332     },
333     "component-resource-assignment-python": {
334       "description": "This is Resource Assignment Component API",
335       "version": "1.0.0",
336       "properties": {
337         "request-id": {
338           "description": "Request Id used to store the generated configuration, in the database along with the template-name",
339           "required": true,
340           "type": "string"
341         }
342       },
343       "interfaces": {
344         "DefaultComponentNode": {
345           "operations": {
346             "process": {
347               "inputs": {
348                 "action-name": {
349                   "description": "Recipe Name to get from Database, Either (message & mask-info ) or ( resource-id & resource-type & action-name & template-name ) should be present. Message will be given higest priority",
350                   "required": false,
351                   "type": "string"
352                 }
353               },
354               "outputs": {
355                 "resource-assignment-params": {
356                   "required": true,
357                   "type": "string"
358                 },
359                 "status": {
360                   "required": true,
361                   "type": "string"
362                 }
363               }
364             }
365           }
366         }
367       },
368       "derived_from": "tosca.nodes.component.Python"
369     }
370   },
371   "data_types": {
372     "sample-property": {
373       "description": "This is sample data type",
374       "version": "1.0.0",
375       "properties": {
376         "content": {
377           "required": false,
378           "type": "string"
379         },
380         "process-name": {
381           "required": false,
382           "type": "string"
383         },
384         "version": {
385           "required": false,
386           "type": "string",
387           "default": "LATEST"
388         }
389       },
390       "derived_from": "tosca.datatypes.Root"
391     }
392   }
393 }