628a7d04dc067a9e4d61de76291892974bc978d9
[ccsdk/cds.git] /
1 {
2   "tosca_definitions_version" : "controller_blueprint_1_0_0",
3   "metadata" : {
4     "template_author" : "Rodrigo Ottero",
5     "author-email" : "rodrigo.ottero@est.tech",
6     "user-groups" : "ADMIN, OPERATION",
7     "template_name" : "configuration_over_restconf",
8     "template_version" : "1.0.0",
9     "template_tags" : "pnf, restconf, config, configuration"
10   },
11   "imports" : [ {
12     "file" : "Definitions/data_types.json"
13   }, {
14     "file" : "Definitions/relationship_types.json"
15   }, {
16     "file" : "Definitions/artifact_types.json"
17   }, {
18     "file" : "Definitions/node_types.json"
19   }, {
20     "file" : "Definitions/policy_types.json"
21   } ],
22   "dsl_definitions" : {
23     "config-assign-properties" : {
24       "resolution-key" : {
25         "get_input" : "resolution-key"
26       }
27     },
28     "config-deploy-properties" : {
29       "resolution-key" : {
30         "get_input" : "resolution-key"
31       }
32     }
33
34   },
35   "topology_template" : {
36     "workflows" : {
37       "config-assign" : {
38         "steps" : {
39           "activate-process" : {
40             "description" : "Create a configlet",
41             "target" : "config-assign-process",
42             "activities" : [ {
43               "call_operation" : ""
44             } ]
45           }
46         },
47         "inputs" : {
48           "resolution-key" : {
49             "required" : true,
50             "type" : "string"
51           },
52           "artifact-name" : {
53             "required" : true,
54             "type" : "list",
55             "entry_schema" : {
56               "type" : "string"
57             }
58           },
59           "store-result" : {
60             "required" : true,
61             "type" : "boolean"
62           },
63           "config-assign-properties" : {
64             "description" : "Dynamic PropertyDefinition for workflow(config-assign).",
65             "required" : true,
66             "type" : "dt-config-assign-properties"
67           }
68         }
69       },
70       "config-deploy" : {
71         "steps" : {
72           "activate-process" : {
73             "description" : "Send a configlet to the pnf",
74             "target" : "config-deploy-process",
75             "activities" : [ {
76               "call_operation" : ""
77             } ]
78           }
79         },
80         "inputs" : {
81           "resolution-key" : {
82             "required" : true,
83             "type" : "string"
84           },
85           "config-deploy-properties" : {
86             "description" : "Dynamic PropertyDefinition for workflow(config-deploy).",
87             "required" : true,
88             "type" : "dt-config-deploy-properties"
89           }
90         }
91       }
92     },
93     "node_templates" : {
94       "config-assign-process" : {
95         "type" : "dg-generic",
96         "properties" : {
97           "content" : {
98             "get_artifact" : [ "SELF", "dg-config-assign-process" ]
99           },
100           "dependency-node-templates" : [ "config-assign" ]
101         },
102         "artifacts" : {
103           "dg-config-assign-process" : {
104             "type" : "artifact-directed-graph",
105             "file" : "Plans/CONFIG_configAssign.xml"
106           }
107         }
108       },
109       "config-assign" : {
110         "type" : "component-resource-resolution",
111         "interfaces" : {
112           "ResourceResolutionComponent" : {
113             "operations" : {
114               "process" : {
115                 "inputs" : {
116                   "resolution-key" : {
117                     "get_input" : "resolution-key"
118                   },
119                   "store-result" : true,
120                   "artifact-prefix-names" : ["config-assign"]
121                 },
122                 "outputs" : {
123                   "resource-assignment-params" : {
124                     "get_attribute" : [ "SELF", "assignment-params" ]
125                   },
126                   "status" : "success"
127                 }
128               }
129             }
130           }
131         },
132         "artifacts" : {
133           "config-assign-template" : {
134             "type" : "artifact-template-velocity",
135             "file" : "Templates/config-assign-restconf-configlet-template.vtl"
136           },
137           "config-assign-mapping" : {
138             "type" : "artifact-mapping-resource",
139             "file" : "Definitions/config-assign-pnf-mapping.json"
140           }
141         }
142       },
143       "config-deploy-process" : {
144         "type" : "dg-generic",
145         "properties" : {
146           "content" : {
147             "get_artifact" : [ "SELF", "dg-config-deploy-process" ]
148           },
149           "dependency-node-templates" : [ "config-deploy" ]
150         },
151         "artifacts" : {
152           "dg-config-assign-process" : {
153             "type" : "artifact-directed-graph",
154             "file" : "Plans/CONFIG_configDeploy.xml"
155           }
156         }
157       },
158       "config-deploy" : {
159         "type" : "component-restconf-executor",
160         "interfaces" : {
161           "ComponentRestconfExecutor" : {
162             "operations" : {
163               "process" : {
164                 "implementation" : {
165                   "primary" : "component-script"
166                 },
167                 "inputs" : {
168                   "script-type" : "jython",
169                   "script-class-reference" : "Scripts/python/RestconfConfigDeploy.py",
170                   "instance-dependencies" : [ ],
171                   "dynamic-properties" : "*config-deploy-properties"
172                 },
173                 "outputs" : {
174                   "response-data" : "",
175                   "status" : "success"
176                 }
177               }
178             }
179           }
180         },
181         "artifacts" : {
182           "config-deploy-template" : {
183             "type" : "artifact-template-velocity",
184             "file" : "Templates/config-deploy-restconf-mount-template.vtl"
185           },
186           "config-deploy-mapping" : {
187             "type" : "artifact-mapping-resource",
188             "file" : "Definitions/config-deploy-pnf-mapping.json"
189           },
190           "component-script" : {
191             "type" : "artifact-script-jython",
192             "file" : "Scripts/python/RestconfConfigDeploy.py"
193           }
194         }
195       }
196     }
197   }
198 }