summaryrefslogtreecommitdiffstats
path: root/catalog-be/src
diff options
context:
space:
mode:
authorfranciscovila <javier.paradela.vila@est.tech>2023-06-20 10:38:45 +0100
committerMichael Morris <michael.morris@est.tech>2023-06-23 18:55:13 +0000
commitdf1d6ebebe45708040048abc33aebb8980a0c9f2 (patch)
tree38b49640c955eb0e36878145b0568d60f6c46bb2 /catalog-be/src
parentdfcf12ff9461b8c508d5932cf210e9a8203e7ea1 (diff)
Support custom tosca functions in operation input values1.13.1
Issue-ID: SDC-4545 Signed-off-by: franciscovila <javier.paradela.vila@est.tech> Change-Id: Icd466d4e2e1d2136f6e41b5c345e9244d5f295f6
Diffstat (limited to 'catalog-be/src')
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ServiceImportBusinessLogic.java18
1 files changed, 11 insertions, 7 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ServiceImportBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ServiceImportBusinessLogic.java
index 7d2f8c3170..b6a7fccff4 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ServiceImportBusinessLogic.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ServiceImportBusinessLogic.java
@@ -2296,13 +2296,17 @@ public class ServiceImportBusinessLogic {
//Inputs
ListDataDefinition<OperationInputDefinition> instanceInputs = instanceOperation.getInputs();
mergeOperationInputDefinitions(templateOperation.getInputs(), instanceInputs);
- component.getProperties()
- .forEach(property -> instanceInputs.getListToscaDataDefinition().stream()
- .filter(instanceInput -> instanceInput.getToscaFunction() instanceof ToscaGetFunctionDataDefinition &&
- property.getName().equals(instanceInput.getToscaFunction() != null ?
- ((ToscaGetFunctionDataDefinition) instanceInput.getToscaFunction()).getPropertyName() : null))
- .forEach(oldInput -> oldInput.setType(property.getType()))
- );
+ if (null != instanceInputs) {
+ component.getProperties()
+ .forEach(property -> instanceInputs.getListToscaDataDefinition().stream()
+ .filter(instanceInput ->
+ instanceInput.getToscaFunction() instanceof ToscaGetFunctionDataDefinition &&
+ property.getName().equals(instanceInput.getToscaFunction() != null ?
+ ((ToscaGetFunctionDataDefinition) instanceInput.getToscaFunction()).getPropertyName() :
+ null))
+ .forEach(oldInput -> oldInput.setType(property.getType()))
+ );
+ }
templateOperation.setInputs(instanceInputs);
//Implementation
templateOperation.setImplementation(instanceOperation.getImplementation());