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