b538f50d366c109012350b92dc7d5f0c9895df99
[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                 "outputs": {
218                   "response-data": "",
219                   "status": ""
220                 }
221               }
222             }
223           }
224         },
225         "artifacts": {
226           "component-script": {
227             "type": "artifact-script-jython",
228             "file": "Scripts/SamplePythonComponentNode.py"
229           }
230         }
231       }
232     },
233     "workflows": {
234       "resource-assignment": {
235         "inputs": {
236           "resource-assignment-properties": {
237             "required": true,
238             "type": "resource-assignment-properties"
239           }
240         },
241         "steps": {
242           "call-resource-assignment": {
243             "description": "Resource Assignment Workflow",
244             "target": "resource-assignment-process",
245             "activities": [
246               {
247                 "call_operation": "CONFIG.ResourceAssignment"
248               }
249             ]
250           }
251         }
252       },
253       "activate": {
254         "inputs": {
255           "activate-properties": {
256             "required": true,
257             "type": "activate-properties"
258           }
259         },
260         "steps": {
261           "activate-process": {
262             "description": "Netconf Activation Workflow",
263             "target": "activate-process",
264             "activities": [
265               {
266                 "call_operation": "CONFIG.ActivateProcess"
267               }
268             ]
269           }
270         }
271       },
272       "assign-activate": {
273         "inputs": {
274           "assign-activate-properties": {
275             "required": true,
276             "type": "assign-activate-properties"
277           }
278         },
279         "steps": {
280           "activate-process": {
281             "description": "Resource Assign and Netconf Activation Workflow",
282             "target": "assign-activate-process",
283             "activities": [
284               {
285                 "call_operation": "CONFIG.AssignActivateProcess"
286               }
287             ]
288           }
289         }
290       }
291     }
292   }
293 }