96ae88e590187175221bd6989c2e63e83e1a75a2
[ccsdk/apps.git] /
1 <!-- QUESTION
2      lines 74-78 and 157-161: if I have to resolve the variables I need based on
3      the pnf id, do I need to specify a restconf-connection? Another point, the
4      connection is aimed to ODL, not to the PNF, so I am not sure what to fill
5      for this model (lines 122-137)
6 -->
7 {
8   "tosca_definitions_version" : "controller_blueprint_1_0_0",
9   "metadata" : {
10     "template_author" : "Rodrigo Ottero",
11     "author-email" : "rodrigo.ottero@est.tech",
12     "user-groups" : "ADMIN, OPERATION",
13     "template_name" : "pnf restconf",
14     "template_version" : "1.0.0",
15     "template_tags" : "pnf, restconf, config, configuration"
16   },
17   "imports" : [ {
18     "file" : "Definitions/data_types.json"
19   }, {
20     "file" : "Definitions/relationship_types.json"
21   }, {
22     "file" : "Definitions/artifact_types.json"
23   }, {
24     "file" : "Definitions/node_types.json"
25   }, {
26     "file" : "Definitions/policy_types.json"
27   } ],
28   "topology_template" : {
29     "inputs" : {
30       "serviceInstanceId" : {
31         "required" : true,
32         "type" : "string"
33       },
34       "identifier" : {
35         "required" : true,
36         "type" : "string"
37       }
38     },
39     "workflows" : {
40       "config-assign" : {
41         "steps" : {
42           "activate-process" : {
43             "description" : "Create a configlet",
44             "target" : "config-assign-process",
45             "activities" : [ {
46               "call_operation" : ""
47             } ]
48           }
49         },
50         "inputs" : {
51           "config-assign-properties" : {
52             "description" : "Dynamic PropertyDefinition for workflow(config-assign).",
53             "required" : true,
54             "type" : "dt-config-assign-properties"
55           }
56         }
57       },
58       "configure" : {
59         "steps" : {
60           "activate-process" : {
61             "description" : "Send a configlet to the pnf",
62             "target" : "configure-process",
63             "activities" : [ {
64               "call_operation" : ""
65             } ]
66           }
67         },
68         "inputs" : {
69           "configure-properties" : {
70             "description" : "Dynamic PropertyDefinition for workflow(configure).",
71             "required" : true,
72             "type" : "dt-configure-properties"
73           }
74         }
75       }
76     },
77     "node_templates" : {
78       "config-assign-process" : {
79         "type" : "dg-generic",
80         "properties" : {
81           "content" : {
82             "get_artifact" : [ "SELF", "dg-config-assign-process" ]
83           },
84           "dependency-node-templates" : [ "config-assign" ]
85         },
86         "artifacts" : {
87           "dg-config-assign-process" : {
88             "type" : "artifact-directed-graph",
89             "file" : "Plans/CONFIG_configAssign.xml"
90           }
91         }
92       },
93       "config-assign" : {
94         "type" : "component-restconf-executor",
95         "requirements" : {
96           "restconf-connection" : {
97             "capability" : "restconf",
98             "node" : "sample-restconf-server",
99             "relationship" : "tosca.relationships.ConnectsTo"
100           }
101         },
102         "interfaces" : {
103           "ComponentRestconfExecutor" : {
104             "operations" : {
105               "process" : {
106                 "implementation" : {
107                   "primary" : "component-script"
108                 },
109                 "inputs" : {
110                   "script-type" : "kotlin",
111                   "script-class-reference" : "Scripts/kotlin/RestconfAssignConfig.kts",
112                   "instance-dependencies" : [ ],
113                   "artifact-prefix-names": [
114                       "config-assign"
115                   ]
116                 },
117                 "outputs" : {
118                   "response-data" : "",
119                   "status" : ""
120                 }
121               }
122             }
123           }
124         },
125         "artifacts" : {
126           "config-assign-template" : {
127             "type" : "artifact-template-velocity",
128             "file" : "Templates/config-assign-restconf-configlet-template.vtl"
129           },
130           "config-assign-mapping" : {
131             "type" : "artifact-mapping-resource",
132             "file" : "Templates/config-assign-pnf-mapping.json"
133           },
134           "component-script" : {
135             "type" : "artifact-script-kotlin",
136             "file" : "Scripts/kotlin/RestconfAssignConfig.py"
137           }
138         }
139       },
140       "configure-process" : {
141         "type" : "dg-generic",
142         "properties" : {
143           "content" : {
144             "get_artifact" : [ "SELF", "dg-configure-process" ]
145           },
146           "dependency-node-templates" : [ "configure" ]
147         },
148         "artifacts" : {
149           "dg-config-assign-process" : {
150             "type" : "artifact-directed-graph",
151             "file" : "Plans/CONFIG_configure.xml"
152           }
153         }
154       },
155       "configure" : {
156         "type" : "component-restconf-executor",
157         "requirements" : {
158           "restconf-connection" : {
159             "capability" : "restconf",
160             "node" : "sample-restconf-server",
161             "relationship" : "tosca.relationships.ConnectsTo"
162           }
163         },
164         "interfaces" : {
165           "ComponentRestconfExecutor" : {
166             "operations" : {
167               "process" : {
168                 "implementation" : {
169                   "primary" : "component-script"
170                 },
171                 "inputs" : {
172                   "script-type" : "kotlin",
173                   "script-class-reference" : "Scripts/kotlin/RestconfConfigure.kts",
174                   "instance-dependencies" : [ ],
175                   "artifact-prefix-names": [
176                       "configure-restconf-mount", "configure-restconf-unmount"
177                   ]
178                 },
179                 "outputs" : {
180                   "response-data" : "",
181                   "status" : ""
182                 }
183               }
184             }
185           }
186         },
187         "artifacts" : {
188           "configure-mount-template" : {
189             "type" : "artifact-template-velocity",
190             "file" : "Templates/configure-restconf-mount-template.vtl"
191           },
192           "configure-unmount-template" : {
193             "type" : "artifact-template-velocity",
194             "file" : "Templates/configure-restconf-unmount-template.vtl"
195           },
196           "configure-mapping" : {
197             "type" : "artifact-mapping-resource",
198             "file" : "Templates/configure-pnf-mapping.json"
199           },
200           "component-script" : {
201             "type" : "artifact-script-kotlin",
202             "file" : "Scripts/kotlin/RestconfConfigure.py"
203           }
204         }
205       },
206       "sample-restconf-device" : {
207         "type" : "pnf-netconf-device",
208         "capabilities" : {
209           "restconf" : {
210             "properties" : {
211               "login-key" : {
212                 "get_input" : "password"
213               },
214               "login-account" : {
215                 "get_input" : "username"
216               },
217               "target-ip-address" : {
218                 "get_input" : "ip"
219               },
220               "port-number" : 830,
221               "connection-time-out" : 5
222             }
223           }
224         }
225       }
226     }
227   }
228 }