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