From b3d4898d9e8452ea0b8d848c048e712d43b8d9a3 Mon Sep 17 00:00:00 2001 From: Michael Lando Date: Sun, 11 Jun 2017 14:22:02 +0300 Subject: [SDC-29] rebase continue work to align source Change-Id: I218f1c5ee23fb2c8314f1c70921d3ad8682c10f4 Signed-off-by: Michael Lando --- .../java/org/openecomp/sdc/tosca/services/ToscaAnalyzerService.java | 4 ++++ .../openecomp/sdc/tosca/services/impl/ToscaAnalyzerServiceImpl.java | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'openecomp-be/lib/openecomp-tosca-lib/src') diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ToscaAnalyzerService.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ToscaAnalyzerService.java index 7d408ab82e..ac7cab6c51 100644 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ToscaAnalyzerService.java +++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ToscaAnalyzerService.java @@ -24,6 +24,7 @@ import org.openecomp.sdc.tosca.datatypes.ToscaElementTypes; import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel; import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate; import org.openecomp.sdc.tosca.datatypes.model.NodeType; +import org.openecomp.sdc.tosca.datatypes.model.PropertyDefinition; import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment; import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate; @@ -76,4 +77,7 @@ public interface ToscaAnalyzerService { boolean isRequirementExistInNodeTemplate(NodeTemplate nodeTemplate, String requirementId, RequirementAssignment requirementAssignment); + + public Map manageSubstitutionNodeTypeProperties( + ServiceTemplate substitutionServiceTemplate); } diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/impl/ToscaAnalyzerServiceImpl.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/impl/ToscaAnalyzerServiceImpl.java index e7aacb96cf..eaf3fb492f 100644 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/impl/ToscaAnalyzerServiceImpl.java +++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/impl/ToscaAnalyzerServiceImpl.java @@ -94,7 +94,7 @@ public class ToscaAnalyzerServiceImpl implements ToscaAnalyzerService { .filter(nodeTypes -> Objects.nonNull(nodeTypes) && nodeTypes.containsKey(nodeTypeKey)) .findFirst(); if (nodeTypeMap.isPresent()) { - return Optional.ofNullable(nodeTypeMap.get().values().iterator().next()); + return Optional.ofNullable(nodeTypeMap.get().get(nodeTypeKey)); } return Optional.empty(); } @@ -601,7 +601,7 @@ public class ToscaAnalyzerServiceImpl implements ToscaAnalyzerService { return substitutionNodeType; } - private Map manageSubstitutionNodeTypeProperties( + public Map manageSubstitutionNodeTypeProperties( ServiceTemplate substitutionServiceTemplate) { Map substitutionNodeTypeProperties = new HashMap<>(); Map properties = -- cgit 1.2.3-korg