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