You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@Parameter(name = ApiConstants.INPUTS, type = CommandType.MAP, description = "Input variables of the IaC template. They must be specified as key-pairs, for instance: 'inputs[0].first-input=\"First input value\" inputs[0].second-input=\"Second input value\"'")
41
+
privateMap<String, Map<String, String>> inputs;
42
+
43
+
publicMap<String, String> getInputs() {
44
+
if (inputs.size() > 1) {
45
+
thrownewInvalidParameterValueException("Please, specify the inputs as key-pairs, indexed with [0]. For instance: 'inputs[0].first-input=\"First input value\" inputs[0].second-input=\"Second input value\"'");
// como que tu vai fazer com collections? o tosca permite passar collections como inputs? e, o tosca permite definir apenas 1 item da collection como o que vem do input?
@@ -294,6 +310,14 @@ protected void populateNodeTemplateAttributes(ToscaNodeTemplate nodeTemplate, Ma
294
310
});
295
311
}
296
312
313
+
/**
314
+
* Resolve the unresolved/pending properties of a node template by the <code>$get_attribute</code> and <code>$get_property</code> TOSCA functions.
315
+
* @param nodeTemplate The node template from which the pending dependencies will be resolved.
316
+
* @param serviceTemplate The TOSCA service template the node template belongs to.
317
+
* @param toscaFunction The TOSCA function used to resolve the pending dependencies. Current supported functions are: <code>$get_attribute</code> and <code>$get_property</code>.
318
+
* @throws InvalidParameterValueException When the return value of the <code>$get_attribute</code> and <code>$get_property</code> function calls is null
319
+
* or when the return value does not passes the validation function.
logger.error("The field [{}] of the target node [{}] has not been defined. Thus, it is not possible to resolve the property [{}] of the [{}] node template.", targetField, targetNode.getName(), unresolvedProperty.getDefinition().getName(), nodeTemplate.getName());
339
+
thrownewInvalidParameterValueException(String.format("The field [%s] of the target node [%s] has not been defined. Unable to deploy [%s].", targetField, targetNode.getName(), nodeTemplate.getName()));
340
+
}
341
+
312
342
if (unresolvedProperty.getDefinition().getValidation() != null) {
313
343
logger.debug("The unresolved property [{}] has a validation clause. Executing it.", unresolvedProperty.getDefinition().getName());
0 commit comments