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
logger.debug("Resolving the unresolved property [{}] of the node template [{}] by the [{}] TOSCA function.", unresolvedProperty.getDefinition().getName(), nodeTemplateName, ToscaConstants.GET_INPUT_FUNCTION);
logger.debug("Resolving the [{}] function call triggered by the [{}] property of the [{}] node template.", ToscaConstants.GET_INPUT_FUNCTION, callerProperty.getDefinition().getName(), nodeTemplateName);
if (propertyValidationFunction != null && !propertyValidationFunction.evaluate(inputValue)) {
156
157
thrownewInvalidParameterValueException(String.format("The input [%s] of the node template [%s] is invalid. The value [%s] does not satisfy the validation rules.", targetInput, nodeTemplateName, inputValue));
157
158
}
158
159
159
-
logger.debug("The input [{}] of the property [{}] of the node template [{}] has been resolved successfully.", targetInput, unresolvedProperty.getDefinition().getName(), nodeTemplateName);
160
-
unresolvedProperty.setEvaluatedValue(inputValue);
160
+
logger.debug("The input [{}] of the property [{}] of the node template [{}] has been successfully retrieved.", targetInput, callerProperty.getDefinition().getName(), nodeTemplateName);
@@ -360,55 +360,41 @@ protected void populateNodeTemplateAttributes(ToscaNodeTemplate nodeTemplate, Ma
360
360
}
361
361
362
362
/**
363
-
* Resolve the unresolved/pending properties of a node template by the <code>$get_attribute</code> and <code>$get_property</code> TOSCA functions.
364
-
* @param nodeTemplate The node template from which the pending dependencies will be resolved.
363
+
* Executes the <code>$get_attribute</code> and <code>$get_property</code> TOSCA functions called by a node template.
364
+
* @param nodeTemplate The node template from which the functions are called.
365
365
* @param serviceTemplate The TOSCA service template the node template belongs to.
366
-
* @param toscaFunction The TOSCA function used to resolve the pending dependencies. Current supported functions are: <code>$get_attribute</code> and <code>$get_property</code>.
367
366
* @throws InvalidParameterValueException When the return value of the <code>$get_attribute</code> and <code>$get_property</code> function calls is null
368
-
* or when the return value does not passes the validation function.
367
+
* or when the return value does not pass the validation function.
logger.debug("Node template [{}] has no function calls to the [{}] and [{}] TOSCA function.", nodeTemplate.getName(), ToscaConstants.GET_ATTRIBUTE_FUNCTION, ToscaConstants.GET_PROPERTY_FUNCTION);
375
374
return;
376
375
}
377
376
378
-
logger.info("Resolving the unresolved properties of the node template [{}] by the [{}] TOSCA function.", nodeTemplate.getName(), toscaFunction);
379
-
for (ToscaPropertyunresolvedProperty : unresolvedProperties) {
logger.info("Handling the [{}] and [{}] TOSCA function calls performed by the [{}] node template.", ToscaConstants.GET_ATTRIBUTE_FUNCTION, ToscaConstants.GET_PROPERTY_FUNCTION, nodeTemplate.getName());
378
+
for (ToscaGetterFunctionCallContextfunctionCall : functionCalls) {
logger.error("The value of the property [{}] of node template [{}] is not valid. Aborting IaC template deployment.", unresolvedProperty.getDefinition().getName(), nodeTemplate.getName());
387
-
thrownewInvalidParameterValueException(String.format("The value of the property [%s] of node template [%s] is not valid. Please, check the value and try again.", unresolvedProperty.getDefinition().getName(), nodeTemplate.getName()));
386
+
logger.error("The value of the property [{}] of node template [{}] is not valid. Aborting IaC template deployment.", callerProperty.getDefinition().getName(), nodeTemplate.getName());
387
+
thrownewInvalidParameterValueException(String.format("The value of the property [%s] of node template [%s] is not valid. Please, check the value and try again.", callerProperty.getDefinition().getName(), nodeTemplate.getName()));
388
388
}
389
389
}
390
390
391
-
logger.debug("The unresolved property [{}] of node template [{}] will be resolved to value [{}].", unresolvedProperty.getDefinition().getName(), nodeTemplate.getName(), valueToBeResolved);
logger.debug("The unresolved property [{}] of node template [{}] will be resolved to value [{}].", callerProperty.getDefinition().getName(), nodeTemplate.getName(), valueToBeResolved);
thrownewInvalidParameterValueException(String.format("The field [%s] of the target node [%s] has not been defined. Unable to deploy [%s].", targetField, targetNode.getName(), nodeTemplate.getName()));
407
+
thrownewInvalidParameterValueException(String.format("The field [%s] of the target node [%s] referenced by the TOSCA function [%s] has not been defined. Unable to deploy [%s].", targetField, targetNode.getName(), toscaFunction, nodeTemplate.getName()));
0 commit comments