From 8f95f6c9359c3551c6c6f28eb997ce03bba46bb1 Mon Sep 17 00:00:00 2001 From: sebdet Date: Tue, 19 Mar 2019 11:10:19 +0100 Subject: Fix tosca parser Fix the parser so that we support the new tosca policy discussed Issue-ID: CLAMP-186 Change-Id: I3051dddf749f1969f8b1d12d726c65f6aad48d51 Signed-off-by: sebdet --- .../java/org/onap/clamp/clds/tosca/ToscaYamlToJsonConvertor.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/main') diff --git a/src/main/java/org/onap/clamp/clds/tosca/ToscaYamlToJsonConvertor.java b/src/main/java/org/onap/clamp/clds/tosca/ToscaYamlToJsonConvertor.java index 8a172abbc..16a817ea4 100644 --- a/src/main/java/org/onap/clamp/clds/tosca/ToscaYamlToJsonConvertor.java +++ b/src/main/java/org/onap/clamp/clds/tosca/ToscaYamlToJsonConvertor.java @@ -109,19 +109,12 @@ public class ToscaYamlToJsonConvertor { LinkedHashMap dataNodes) { map.entrySet().stream().forEach(n -> { if (n.getKey().contains(ToscaSchemaConstants.NODE_TYPES) && n.getValue() instanceof Map) { - parseNodeAndDataType((LinkedHashMap) n.getValue(), nodeTypes, dataNodes); - } else if (n.getKey().contains(ToscaSchemaConstants.DATA_TYPES) && n.getValue() instanceof Map) { - parseNodeAndDataType((LinkedHashMap) n.getValue(), nodeTypes, dataNodes); - } else if (n.getKey().contains(ToscaSchemaConstants.POLICY_NODE)) { - nodeTypes.put(n.getKey(), n.getValue()); - } else if (n.getKey().contains(ToscaSchemaConstants.POLICY_DATA)) { - dataNodes.put(n.getKey(), n.getValue()); } @@ -149,7 +142,7 @@ public class ToscaYamlToJsonConvertor { .getValue(); if (parentPropertiesMap.containsKey(ToscaSchemaConstants.TYPE) && ((String) parentPropertiesMap.get(ToscaSchemaConstants.TYPE)) - .contains(ToscaSchemaConstants.TYPE_LIST) + .contains(ToscaSchemaConstants.TYPE_MAP) && parentPropertiesMap.containsKey(ToscaSchemaConstants.ENTRY_SCHEMA)) { parentPropertiesMap = (LinkedHashMap) parentPropertiesMap .get(ToscaSchemaConstants.ENTRY_SCHEMA); -- cgit 1.2.3-korg