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