f756ef7ede2d79890d386725347aa340b2970e9e
[ccsdk/cds.git] / components / model-catalog / blueprint-model / starter-blueprint / baseconfiguration / Definitions / activation-blueprint.json
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-generic",
43         "properties": {
44           "content": {
45             "get_artifact": [
46               "SELF",
47               "dg-resource-assignment-process"
48             ]
49           }
50         },
51         "artifacts": {
52           "dg-resource-assignment-process": {
53             "type": "artifact-directed-graph",
54             "file": "Plans/CONFIG_ResourceAssignment_1.0.0.xml"
55           }
56         }
57       },
58       "activate-process": {
59         "type": "dg-generic",
60         "properties": {
61           "content": {
62             "get_artifact": [
63               "SELF",
64               "dg-activate-process"
65             ]
66           }
67         },
68         "artifacts": {
69           "dg-activate-process": {
70             "type": "artifact-directed-graph",
71             "file": "Plans/CONFIG_ActivateNetconf_1.0.0.xml"
72           }
73         }
74       },
75       "assign-activate-process": {
76         "type": "dg-generic",
77         "properties": {
78           "content": {
79             "get_artifact": [
80               "SELF",
81               "dg-assign-activate-process"
82             ]
83           }
84         },
85         "artifacts": {
86           "dg-assign-activate-process": {
87             "type": "artifact-directed-graph",
88             "file": "Plans/CONFIG_AssignActivateNetconf_1.0.0.xml"
89           }
90         }
91       },
92       "resource-assignment": {
93         "type": "component-resource-assignment",
94         "properties": {
95           "request-id": "1234"
96         },
97         "interfaces": {
98           "ResourceAssignmentComponent": {
99             "operations": {
100               "process": {
101                 "inputs": {
102                   "action-name": {
103                     "get_input": "action-name"
104                   },
105                   "resource-type": "vnf-type",
106                   "request-id": {
107                     "get_input": "request-id"
108                   },
109                   "resource-id": {
110                     "get_input": "hostname"
111                   },
112                   "artifact-prefix-names": [
113                     "baseconfig"
114                   ],
115                   "template-content": {
116                     "get_artifact": [
117                       "SELF",
118                       "baseconfig-template"
119                     ]
120                   },
121                   "mapping-content": {
122                     "get_artifact": [
123                       "SELF",
124                       "baseconfig-mapping"
125                     ]
126                   }
127                 },
128                 "outputs": {
129                   "resource-assignment-params": {
130                     "get_attribute": [
131                       "SELF",
132                       "assignment-params"
133                     ]
134                   },
135                   "status": "success"
136                 }
137               }
138             }
139           }
140         },
141         "artifacts": {
142           "baseconfig-template": {
143             "type": "artifact-template-velocity",
144             "file": "Templates/baseconfig-template.vtl"
145           },
146           "baseconfig-mapping": {
147             "type": "artifact-mapping-resource",
148             "file": "Definitions/baseconfig-mapping.json"
149           }
150         }
151       },
152       "resource-assignment-py": {
153         "type": "component-resource-assignment",
154         "properties": {
155           "request-id": "1234"
156         },
157         "interfaces": {
158           "ResourceAssignmentComponent": {
159             "operations": {
160               "process": {
161                 "implementation": {
162                   "primary": "component-script"
163                 },
164                 "inputs": {
165                   "action-name": {
166                     "get_input": "action-name"
167                   }
168                 },
169                 "outputs": {
170                   "resource-assignment-params": "",
171                   "status": ""
172                 }
173               }
174             }
175           }
176         },
177         "artifacts": {
178           "component-script": {
179             "type": "artifact-script-jython",
180             "file": "Scripts/SamplePythonComponentNode.py"
181           }
182         }
183       },
184       "activate-jython": {
185         "type": "component-jython-executor",
186         "interfaces": {
187           "JythonExecutorComponent": {
188             "operations": {
189               "process": {
190                 "implementation": {
191                   "primary": "component-script"
192                 },
193                 "inputs": {
194                   "instance-dependencies": [
195                     "json-parser-service",
196                     "netconf-rpc-service"
197                   ]
198                 },
199                 "outputs": {
200                   "response-data": "",
201                   "status": ""
202                 }
203               }
204             }
205           }
206         },
207         "artifacts": {
208           "component-script": {
209             "type": "artifact-script-jython",
210             "file": "Scripts/SamplePythonComponentNode.py"
211           }
212         }
213       }
214     },
215     "workflows": {
216       "resource-assignment": {
217         "inputs": {
218           "resource-assignment-properties": {
219             "required": true,
220             "type": "resource-assignment-properties"
221           }
222         },
223         "steps": {
224           "call-resource-assignment": {
225             "description": "Resource Assignment Workflow",
226             "target": "resource-assignment-process",
227             "activities": [
228               {
229                 "call_operation": "CONFIG.ResourceAssignment"
230               }
231             ]
232           }
233         }
234       },
235       "activate": {
236         "inputs": {
237           "activate-properties": {
238             "required": true,
239             "type": "activate-properties"
240           }
241         },
242         "steps": {
243           "activate-process": {
244             "description": "Netconf Activation Workflow",
245             "target": "activate-process",
246             "activities": [
247               {
248                 "call_operation": "CONFIG.ActivateProcess"
249               }
250             ]
251           }
252         }
253       },
254       "assign-activate": {
255         "inputs": {
256           "assign-activate-properties": {
257             "required": true,
258             "type": "assign-activate-properties"
259           }
260         },
261         "steps": {
262           "activate-process": {
263             "description": "Resource Assign and Netconf Activation Workflow",
264             "target": "assign-activate-process",
265             "activities": [
266               {
267                 "call_operation": "CONFIG.AssignActivateProcess"
268               }
269             ]
270           }
271         }
272       }
273     }
274   }
275 }