7d3a17a68b74f1e4734243fd951e9795774f4032
[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     },
210     "workflows": {
211       "resource-assignment": {
212         "inputs": {
213           "resource-assignment-properties": {
214             "required": true,
215             "type": "dt-resource-assignment-properties"
216           }
217         },
218         "steps": {
219           "call-resource-assignment": {
220             "description": "Resource Assignment Workflow",
221             "target": "resource-assignment-process",
222             "activities": [
223               {
224                 "call_operation": "CONFIG.ResourceAssignment"
225               }
226             ]
227           }
228         }
229       },
230       "activate": {
231         "inputs": {
232           "request-id": {
233             "required": true,
234             "type": "string"
235           },
236           "action-name": {
237             "required": true,
238             "type": "string"
239           },
240           "scope-type": {
241             "required": true,
242             "type": "string"
243           },
244           "hostname": {
245             "required": true,
246             "type": "string"
247           }
248         },
249         "steps": {
250           "activate-process": {
251             "description": "Netconf Activation Workflow",
252             "target": "activate-process",
253             "activities": [
254               {
255                 "call_operation": "CONFIG.ActivateProcess"
256               }
257             ]
258           }
259         }
260       },
261       "assign-activate": {
262         "inputs": {
263           "assign-activate-properties": {
264             "required": true,
265             "type": "dt-assign-activate-properties"
266           }
267         },
268         "steps": {
269           "activate-process": {
270             "description": "Resource Assign and Netconf Activation Workflow",
271             "target": "assign-activate-process",
272             "activities": [
273               {
274                 "call_operation": "CONFIG.AssignActivateProcess"
275               }
276             ]
277           }
278         }
279       }
280     }
281   }
282 }