162411f8ddc29c291a3d8eeae401f2399ec53b26
[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                   "instance-dependencies": [
222
223                   ],
224                   "artifact-prefix-names": [
225                     "hostname"
226                   ]
227                 },
228                 "outputs": {
229                   "response-data": "",
230                   "status": ""
231                 }
232               }
233             }
234           }
235         },
236         "requirements": {
237           "netconf-connection": {
238             "capability": "netconf",
239             "node": "sample-netconf-device",
240             "relationship": "tosca.relationships.ConnectsTo"
241           }
242         },
243         "artifacts": {
244           "hostname-template": {
245             "type": "artifact-template-velocity",
246             "file": "Templates/hostname-template.vtl"
247           },
248           "hostname-mapping": {
249             "type": "artifact-mapping-resource",
250             "file": "Templates/hostname-mapping.json"
251           },
252           "component-script": {
253             "type": "artifact-script-jython",
254             "file": "Scripts/python/NetconfRpcExample.py"
255           }
256         }
257       },
258       "sample-netconf-device": {
259         "type": "vnf-netconf-device",
260         "capabilities": {
261           "netconf": {
262             "properties": {
263               "login-key": "sample-key",
264               "login-account": "sample-account",
265               "target-ip-address": {
266                 "get_attribute": [
267                   "resource-assignment",
268                   "",
269                   "assignment-params",
270                   "$.ipAddress"
271                 ]
272               },
273               "port-number": 830,
274               "connection-time-out": 30
275             }
276           }
277         }
278       }
279     },
280     "workflows": {
281       "resource-assignment": {
282         "inputs": {
283           "resource-assignment-properties": {
284             "required": true,
285             "type": "dt-resource-assignment-properties"
286           }
287         },
288         "steps": {
289           "call-resource-assignment": {
290             "description": "Resource Assignment Workflow",
291             "target": "resource-assignment-process",
292             "activities": [
293               {
294                 "call_operation": "CONFIG.ResourceAssignment"
295               }
296             ]
297           }
298         }
299       },
300       "activate": {
301         "inputs": {
302           "request-id": {
303             "required": true,
304             "type": "string"
305           },
306           "action-name": {
307             "required": true,
308             "type": "string"
309           },
310           "scope-type": {
311             "required": true,
312             "type": "string"
313           },
314           "hostname": {
315             "required": true,
316             "type": "string"
317           }
318         },
319         "steps": {
320           "activate-process": {
321             "description": "Netconf Activation Workflow",
322             "target": "activate-process",
323             "activities": [
324               {
325                 "call_operation": "CONFIG.ActivateProcess"
326               }
327             ]
328           }
329         }
330       },
331       "assign-activate": {
332         "inputs": {
333           "assign-activate-properties": {
334             "required": true,
335             "type": "dt-assign-activate-properties"
336           }
337         },
338         "steps": {
339           "activate-process": {
340             "description": "Resource Assign and Netconf Activation Workflow",
341             "target": "assign-activate-process",
342             "activities": [
343               {
344                 "call_operation": "CONFIG.AssignActivateProcess"
345               }
346             ]
347           }
348         }
349       }
350     }
351   }
352 }