ec229df2d3dcb004144d0e34f72e7d8b50027049
[ccsdk/apps.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         "properties": {
108           "request-id": "1234"
109         },
110         "interfaces": {
111           "ResourceAssignmentComponent": {
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                   "template-content": {
129                     "get_artifact": [
130                       "SELF",
131                       "baseconfig-template"
132                     ]
133                   },
134                   "mapping-content": {
135                     "get_artifact": [
136                       "SELF",
137                       "baseconfig-mapping"
138                     ]
139                   }
140                 },
141                 "outputs": {
142                   "resource-assignment-params": {
143                     "get_attribute": [
144                       "SELF",
145                       "assignment-params"
146                     ]
147                   },
148                   "status": "success"
149                 }
150               }
151             }
152           }
153         },
154         "artifacts": {
155           "baseconfig-template": {
156             "type": "artifact-template-velocity",
157             "file": "Templates/baseconfig-template.vtl"
158           },
159           "baseconfig-mapping": {
160             "type": "artifact-mapping-resource",
161             "file": "Definitions/baseconfig-mapping.json"
162           }
163         }
164       },
165       "resource-assignment-py": {
166         "type": "component-resource-assignment",
167         "properties": {
168           "request-id": "1234"
169         },
170         "interfaces": {
171           "ResourceAssignmentComponent": {
172             "operations": {
173               "process": {
174                 "implementation": {
175                   "primary": "component-script"
176                 },
177                 "inputs": {
178                   "action-name": {
179                     "get_input": "action-name"
180                   }
181                 },
182                 "outputs": {
183                   "resource-assignment-params": "",
184                   "status": ""
185                 }
186               }
187             }
188           }
189         },
190         "artifacts": {
191           "component-script": {
192             "type": "artifact-script-jython",
193             "file": "Scripts/SamplePythonComponentNode.py"
194           }
195         }
196       },
197       "activate-jython": {
198         "type": "component-jython-executor",
199         "interfaces": {
200           "JythonExecutorComponent": {
201             "operations": {
202               "process": {
203                 "implementation": {
204                   "primary": "component-script"
205                 },
206                 "inputs": {
207                   "instance-dependencies": [
208                     "json-parser-service",
209                     "netconf-rpc-service"
210                   ]
211                 },
212                 "outputs": {
213                   "response-data": "",
214                   "status": ""
215                 }
216               }
217             }
218           }
219         },
220         "artifacts": {
221           "component-script": {
222             "type": "artifact-script-jython",
223             "file": "Scripts/SamplePythonComponentNode.py"
224           }
225         }
226       }
227     },
228     "workflows": {
229       "resource-assignment": {
230         "inputs": {
231           "resource-assignment-properties": {
232             "required": true,
233             "type": "dt-resource-assignment-properties"
234           }
235         },
236         "steps": {
237           "call-resource-assignment": {
238             "description": "Resource Assignment Workflow",
239             "target": "resource-assignment-process",
240             "activities": [
241               {
242                 "call_operation": "CONFIG.ResourceAssignment"
243               }
244             ]
245           }
246         }
247       },
248       "activate": {
249         "inputs": {
250           "request-id": {
251             "required": true,
252             "type": "string"
253           },
254           "action-name": {
255             "required": true,
256             "type": "string"
257           },
258           "scope-type": {
259             "required": true,
260             "type": "string"
261           },
262           "hostname": {
263             "required": true,
264             "type": "string"
265           }
266         },
267         "steps": {
268           "activate-process": {
269             "description": "Netconf Activation Workflow",
270             "target": "activate-process",
271             "activities": [
272               {
273                 "call_operation": "CONFIG.ActivateProcess"
274               }
275             ]
276           }
277         }
278       },
279       "assign-activate": {
280         "inputs": {
281           "assign-activate-properties": {
282             "required": true,
283             "type": "dt-assign-activate-properties"
284           }
285         },
286         "steps": {
287           "activate-process": {
288             "description": "Resource Assign and Netconf Activation Workflow",
289             "target": "assign-activate-process",
290             "activities": [
291               {
292                 "call_operation": "CONFIG.AssignActivateProcess"
293               }
294             ]
295           }
296         }
297       }
298     }
299   }
300 }