From 8b6be264a6f4b658632b7e263737eaae92e337aa Mon Sep 17 00:00:00 2001 From: talio Date: Thu, 15 Mar 2018 14:46:20 +0200 Subject: Interface definition Add separate Interface definition for node type and node template Change-Id: I0c4446227dd096959158fd4a4741cb5aa043e495 Issue-ID: SDC-1043 Signed-off-by: talio --- .../org/openecomp/core/impl/ToscaConverterImpl.java | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core') diff --git a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/main/java/org/openecomp/core/impl/ToscaConverterImpl.java b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/main/java/org/openecomp/core/impl/ToscaConverterImpl.java index e9a8f58426..a625bb6fc2 100644 --- a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/main/java/org/openecomp/core/impl/ToscaConverterImpl.java +++ b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/main/java/org/openecomp/core/impl/ToscaConverterImpl.java @@ -49,7 +49,6 @@ import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel; import org.openecomp.sdc.tosca.datatypes.model.ArtifactDefinition; import org.openecomp.sdc.tosca.datatypes.model.CapabilityAssignment; import org.openecomp.sdc.tosca.datatypes.model.Import; -import org.openecomp.sdc.tosca.datatypes.model.InterfaceDefinition; import org.openecomp.sdc.tosca.datatypes.model.NodeFilter; import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate; import org.openecomp.sdc.tosca.datatypes.model.NodeType; @@ -62,18 +61,15 @@ import org.openecomp.sdc.tosca.services.ToscaUtil; import org.openecomp.sdc.translator.services.heattotosca.globaltypes.GlobalTypesGenerator; import org.yaml.snakeyaml.error.YAMLException; -import java.io.ByteArrayInputStream; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; -import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Optional; -import java.util.jar.Manifest; import java.util.regex.Pattern; public class ToscaConverterImpl implements ToscaConverter { @@ -84,8 +80,7 @@ public class ToscaConverterImpl implements ToscaConverter { } @Override - public ToscaServiceModel convert(FileContentHandler fileContentHandler) - throws IOException { + public ToscaServiceModel convert(FileContentHandler fileContentHandler) { Map csarFiles = new HashMap<>(fileContentHandler.getFiles()); ToscaServiceModel toscaServiceModel = new ToscaServiceModel(); Map serviceTemplates = new HashMap<>(); @@ -197,16 +192,6 @@ public class ToscaConverterImpl implements ToscaConverter { serviceTemplates.put(serviceTemplateName, serviceTemplate); } - private Optional getManifestContent(Map csarFiles) { - for (Map.Entry csarFileEntry : csarFiles.entrySet()) { - if (csarFileEntry.getKey().contains(manifestFileName)) { - return Optional.of(csarFileEntry.getValue()); - } - } - - return Optional.empty(); - } - private Optional getServiceTemplateFromCsar(String fileName, Map csarFiles) { byte[] fileContent = csarFiles.get(fileName); -- cgit 1.2.3-korg