diff options
4 files changed, 13 insertions, 10 deletions
diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/catalogrest/CatalogQuery.java b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/catalogrest/CatalogQuery.java index a98778bf5d..e8e3f34f28 100644 --- a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/catalogrest/CatalogQuery.java +++ b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/catalogrest/CatalogQuery.java @@ -8,9 +8,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -21,13 +21,14 @@ package org.onap.so.adapters.catalogdb.catalogrest; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.apache.commons.lang3.StringEscapeUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.io.IOException; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import com.fasterxml.jackson.databind.ObjectMapper; public abstract class CatalogQuery { protected static Logger logger = LoggerFactory.getLogger(CatalogQuery.class); @@ -103,9 +104,10 @@ public abstract class CatalogQuery { return false; } ObjectMapper mapper = new ObjectMapper(); - mapper.readValue(jsonInString, String.class); + mapper.readTree(jsonInString); return true; } catch (IOException e) { + logger.error("Invalid json: {}", jsonInString); return false; } } diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/catalogrest/QueryServiceVnfs.java b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/catalogrest/QueryServiceVnfs.java index f945208854..8cd6ada792 100644 --- a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/catalogrest/QueryServiceVnfs.java +++ b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/catalogrest/QueryServiceVnfs.java @@ -28,6 +28,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import javax.xml.bind.annotation.XmlRootElement; +import org.apache.commons.lang3.StringEscapeUtils; import org.onap.so.db.catalog.beans.VnfResourceCustomization; import org.onap.so.db.catalog.beans.VnfcInstanceGroupCustomization; import org.slf4j.Logger; @@ -120,7 +121,7 @@ public class QueryServiceVnfs extends CatalogQuery { put(valueMap, "NF_NAMING_CODE", o.getNfNamingCode()); put(valueMap, "VNFC_INSTANCE_GROUP_ORDER", o.getVnfcInstanceGroupOrder()); put(valueMap, "MULTI_STEP_DESIGN", o.getMultiStageDesign()); - if (isJSONValid(o.getResourceInput())) { + if (isJSONValid(StringEscapeUtils.unescapeJava(o.getResourceInput()))) { put(valueMap, "RESOURCE_INPUT", o.getResourceInput()); } diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfResourceCustomization.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfResourceCustomization.java index 094a1f0bf3..8e1814f225 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfResourceCustomization.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfResourceCustomization.java @@ -156,7 +156,7 @@ public class VnfResourceCustomization implements Serializable { .append("vfModuleCustomizations", vfModuleCustomizations) .append("vnfcInstanceGroupOrder", vnfcInstanceGroupOrder) .append("vnfcInstanceGroupCustomizations", vnfcInstanceGroupCustomizations) - .append("controllerActor", controllerActor).toString(); + .append("controllerActor", controllerActor).append("resourceInput", resourceInput).toString(); } @PrePersist diff --git a/version.properties b/version.properties index 922c4fa961..e377fcf8e3 100644 --- a/version.properties +++ b/version.properties @@ -3,8 +3,8 @@ # because they are used in Jenkins, whose plug-in doesn't support major=1 -minor=6 -patch=1 +minor=7 +patch=0 base_version=${major}.${minor}.${patch} |