c21f4c9d0f487885e07af609d31f37140aae11f5
[ccsdk/cds.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   "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-resolution",
110         "interfaces": {
111           "ResourceResolutionComponent": {
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-resolution",
155         "interfaces": {
156           "ResourceResolutionComponent": {
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           "ComponentJythonExecutor": {
186             "operations": {
187               "process": {
188                 "implementation": {
189                   "primary": "component-script"
190                 },
191                 "inputs": {
192                   "instance-dependencies": [
193                     "json-parser-service"
194                   ]
195                 },
196                 "outputs": {
197                   "response-data": "",
198                   "status": ""
199                 }
200               }
201             }
202           }
203         },
204         "artifacts": {
205           "component-script": {
206             "type": "artifact-script-jython",
207             "file": "Scripts/python/SamplePythonComponentNode.py"
208           }
209         }
210       },
211       "activate-netconf": {
212         "type": "component-netconf-executor",
213         "interfaces": {
214           "ComponentNetconfExecutor": {
215             "operations": {
216               "process": {
217                 "implementation": {
218                   "primary": "component-script"
219                 },
220                 "inputs": {
221                   "script-type": "jython",
222                   "script-class-reference": "Scripts/python/NetconfRpcExample.py",
223                   "instance-dependencies": [
224                   ]
225                 },
226                 "outputs": {
227                   "response-data": "",
228                   "status": ""
229                 }
230               }
231             }
232           }
233         },
234         "requirements": {
235           "netconf-connection": {
236             "capability": "netconf",
237             "node": "sample-netconf-device",
238             "relationship": "tosca.relationships.ConnectsTo"
239           }
240         },
241         "artifacts": {
242           "hostname-template": {
243             "type": "artifact-template-velocity",
244             "file": "Templates/hostname-template.vtl"
245           },
246           "hostname-mapping": {
247             "type": "artifact-mapping-resource",
248             "file": "Definitions/hostname-mapping.json"
249           },
250           "component-script": {
251             "type": "artifact-script-jython",
252             "file": "Scripts/python/NetconfRpcExample.py"
253           }
254         }
255       },
256       "sample-netconf-device": {
257         "type": "vnf-netconf-device",
258         "capabilities": {
259           "netconf": {
260             "properties": {
261               "login-key": "sample-key",
262               "login-account": "sample-account",
263               "target-ip-address": {
264                 "get_attribute": [
265                   "resource-assignment",
266                   "",
267                   "assignment-params",
268                   "$.ipAddress"
269                 ]
270               },
271               "port-number": 830,
272               "connection-time-out": 30
273             }
274           }
275         }
276       }
277     },
278     "workflows": {
279       "resource-assignment": {
280         "inputs": {
281           "resource-assignment-properties": {
282             "required": true,
283             "type": "dt-resource-assignment-properties"
284           }
285         },
286         "steps": {
287           "call-resource-assignment": {
288             "description": "Resource Assignment Workflow",
289             "target": "resource-assignment-process",
290             "activities": [
291               {
292                 "call_operation": "CONFIG.ResourceAssignment"
293               }
294             ]
295           }
296         }
297       },
298       "activate": {
299         "inputs": {
300           "request-id": {
301             "required": true,
302             "type": "string"
303           },
304           "action-name": {
305             "required": true,
306             "type": "string"
307           },
308           "scope-type": {
309             "required": true,
310             "type": "string"
311           },
312           "hostname": {
313             "required": true,
314             "type": "string"
315           }
316         },
317         "steps": {
318           "activate-process": {
319             "description": "Netconf Activation Workflow",
320             "target": "activate-process",
321             "activities": [
322               {
323                 "call_operation": "CONFIG.ActivateProcess"
324               }
325             ]
326           }
327         }
328       },
329       "assign-activate": {
330         "inputs": {
331           "assign-activate-properties": {
332             "required": true,
333             "type": "dt-assign-activate-properties"
334           }
335         },
336         "steps": {
337           "activate-process": {
338             "description": "Resource Assign and Netconf Activation Workflow",
339             "target": "assign-activate-process",
340             "activities": [
341               {
342                 "call_operation": "CONFIG.AssignActivateProcess"
343               }
344             ]
345           }
346         }
347       }
348     }
349   }
350 }