Add declarative acceptance tests
[ccsdk/cds.git] / components / model-catalog / blueprint-model / uat-blueprints / pnf_config / Definitions / activation-blueprint.json
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-deploy-properties" : {
24       "resolution-key" : {
25         "get_input" : "resolution-key"
26       }
27     }
28   },
29   "topology_template" : {
30     "workflows" : {
31       "config-assign" : {
32         "steps" : {
33           "activate-process" : {
34             "description" : "Create a configlet",
35             "target" : "config-assign-process",
36             "activities" : [ {
37               "call_operation" : ""
38             } ]
39           }
40         },
41         "inputs" : {
42           "resolution-key" : {
43             "required" : true,
44             "type" : "string"
45           },
46           "store-result" : {
47             "required" : true,
48             "type" : "boolean"
49           },
50           "config-assign-properties" : {
51             "description" : "Dynamic PropertyDefinition for workflow(config-assign).",
52             "required" : true,
53             "type" : "dt-config-assign-properties"
54           }
55         }
56       },
57       "config-deploy" : {
58         "steps" : {
59           "activate-process" : {
60             "description" : "Send a configlet to the pnf",
61             "target" : "config-deploy-process",
62             "activities" : [ {
63               "call_operation" : ""
64             } ]
65           }
66         },
67         "inputs" : {
68           "resolution-key" : {
69             "required" : true,
70             "type" : "string"
71           },
72           "config-deploy-properties" : {
73             "description" : "Dynamic PropertyDefinition for workflow(config-deploy).",
74             "required" : true,
75             "type" : "dt-config-deploy-properties"
76           }
77         }
78       }
79     },
80     "node_templates" : {
81       "config-assign-process" : {
82         "type" : "dg-generic",
83         "properties" : {
84           "content" : {
85             "get_artifact" : [ "SELF", "dg-config-assign-process" ]
86           },
87           "dependency-node-templates" : [ "config-assign" ]
88         },
89         "artifacts" : {
90           "dg-config-assign-process" : {
91             "type" : "artifact-directed-graph",
92             "file" : "Plans/CONFIG_configAssign.xml"
93           }
94         }
95       },
96       "config-assign" : {
97         "type" : "component-resource-resolution",
98         "interfaces" : {
99           "ResourceResolutionComponent" : {
100             "operations" : {
101               "process" : {
102                 "inputs" : {
103                   "resolution-key" : {
104                     "get_input" : "resolution-key"
105                   },
106                   "store-result" : true,
107                   "artifact-prefix-names" : ["config-assign"]
108                 },
109                 "outputs" : {
110                   "resource-assignment-params" : {
111                     "get_attribute" : [ "SELF", "assignment-params" ]
112                   },
113                   "status" : "success"
114                 }
115               }
116             }
117           }
118         },
119         "artifacts" : {
120           "config-assign-template" : {
121             "type" : "artifact-template-velocity",
122             "file" : "Templates/config-assign-restconf-configlet-template.vtl"
123           },
124           "config-assign-mapping" : {
125             "type" : "artifact-mapping-resource",
126             "file" : "Definitions/config-assign-pnf-mapping.json"
127           }
128         }
129       },
130       "config-deploy-process" : {
131         "type" : "dg-generic",
132         "properties" : {
133           "content" : {
134             "get_artifact" : [ "SELF", "dg-config-deploy-process" ]
135           },
136           "dependency-node-templates" : [ "config-deploy" ]
137         },
138         "artifacts" : {
139           "dg-config-assign-process" : {
140             "type" : "artifact-directed-graph",
141             "file" : "Plans/CONFIG_configDeploy.xml"
142           }
143         }
144       },
145       "config-deploy" : {
146         "type" : "component-script-executor",
147         "interfaces" : {
148           "ComponentScriptExecutor" : {
149             "operations" : {
150               "process" : {
151                 "implementation" : {
152                   "primary" : "component-script"
153                 },
154                 "inputs" : {
155                   "script-type" : "jython",
156                   "script-class-reference" : "Scripts/python/RestconfConfigDeploy.py",
157                   "dynamic-properties" : "*config-deploy-properties"
158                 },
159                 "outputs" : {
160                   "response-data" : "",
161                   "status" : "success"
162                 }
163               }
164             }
165           }
166         },
167         "artifacts" : {
168           "config-deploy-template" : {
169             "type" : "artifact-template-velocity",
170             "file" : "Templates/config-deploy-restconf-mount-template.vtl"
171           },
172           "config-deploy-mapping" : {
173             "type" : "artifact-mapping-resource",
174             "file" : "Definitions/config-deploy-pnf-mapping.json"
175           },
176           "component-script" : {
177             "type" : "artifact-script-jython",
178             "file" : "Scripts/python/RestconfConfigDeploy.py"
179           }
180         }
181       }
182     }
183   }
184 }