diff options
Diffstat (limited to 'openecomp-be/lib/openecomp-tosca-lib/src')
2 files changed, 6 insertions, 2 deletions
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<String, PropertyDefinition> 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<String, PropertyDefinition> manageSubstitutionNodeTypeProperties( + public Map<String, PropertyDefinition> manageSubstitutionNodeTypeProperties( ServiceTemplate substitutionServiceTemplate) { Map<String, PropertyDefinition> substitutionNodeTypeProperties = new HashMap<>(); Map<String, ParameterDefinition> properties = |