summaryrefslogtreecommitdiffstats
path: root/models-tosca
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2020-03-03 16:14:34 +0000
committerliamfallon <liam.fallon@est.tech>2020-03-03 16:14:38 +0000
commit106c7fdc3e64431e64d66a7546033f6c21f9bfb4 (patch)
tree484d5aa3be4e087ca0843118dbcfde669db68df2 /models-tosca
parenta0780033bbd69d3e8f68c9e2cfef24bb83d4eae9 (diff)
Return incoming service templates on create
We should return the incoming service template on create requests. This change is required for CSIT tests. Issue-ID: POLICY-1402 Change-Id: I1072c9c16d2b267c34fa015e7e7a355ba9f5338a Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'models-tosca')
-rw-r--r--models-tosca/src/main/java/org/onap/policy/models/tosca/simple/provider/SimpleToscaProvider.java12
-rw-r--r--models-tosca/src/test/java/org/onap/policy/models/tosca/simple/serialization/MonitoringPolicySerializationTest.java6
2 files changed, 9 insertions, 9 deletions
diff --git a/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/provider/SimpleToscaProvider.java b/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/provider/SimpleToscaProvider.java
index 805f9dfed..86174ffc0 100644
--- a/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/provider/SimpleToscaProvider.java
+++ b/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/provider/SimpleToscaProvider.java
@@ -199,8 +199,8 @@ public class SimpleToscaProvider {
JpaToscaServiceTemplate writtenServiceTemplate = appendToServiceTemplate(dao, incomingServiceTemplate);
- LOGGER.debug("<-createDataTypes: returnServiceTempalate={}", writtenServiceTemplate);
- return writtenServiceTemplate;
+ LOGGER.debug("<-createDataTypes: writtenServiceTemplate={}", writtenServiceTemplate);
+ return incomingServiceTemplate;
}
/**
@@ -366,8 +366,8 @@ public class SimpleToscaProvider {
JpaToscaServiceTemplate writtenServiceTemplate = appendToServiceTemplate(dao, incomingServiceTemplate);
- LOGGER.debug("<-createPolicyTypes: returnServiceTempalate={}", writtenServiceTemplate);
- return writtenServiceTemplate;
+ LOGGER.debug("<-createPolicyTypes: writtenServiceTemplate={}", writtenServiceTemplate);
+ return incomingServiceTemplate;
}
/**
@@ -538,8 +538,8 @@ public class SimpleToscaProvider {
JpaToscaServiceTemplate writtenServiceTemplate = appendToServiceTemplate(dao, incomingServiceTemplate);
- LOGGER.debug("<-createPolicies: serviceTemplate={}", writtenServiceTemplate);
- return writtenServiceTemplate;
+ LOGGER.debug("<-createPolicies: writtenServiceTemplate={}", writtenServiceTemplate);
+ return incomingServiceTemplate;
}
/**
diff --git a/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/serialization/MonitoringPolicySerializationTest.java b/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/serialization/MonitoringPolicySerializationTest.java
index f6f1b2c42..500ba9fa2 100644
--- a/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/serialization/MonitoringPolicySerializationTest.java
+++ b/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/serialization/MonitoringPolicySerializationTest.java
@@ -278,7 +278,7 @@ public class MonitoringPolicySerializationTest {
private void verifyVcpeMonitoringOutputserialization(String serializedServiceTemplate) {
- JsonObject serviceTemplateJsonObject = new JsonParser().parse(serializedServiceTemplate).getAsJsonObject();
+ JsonObject serviceTemplateJsonObject = JsonParser.parseString(serializedServiceTemplate).getAsJsonObject();
assertEquals(YAML_VERSION, serviceTemplateJsonObject.get(DEFINITION_VERSION).getAsString());
JsonObject topologyTemplateJsonObject = serviceTemplateJsonObject.get(TOPOLOGY_TEMPLATE).getAsJsonObject();
JsonArray policiesJsonArray = topologyTemplateJsonObject.get(POLICIES).getAsJsonArray();
@@ -295,7 +295,7 @@ public class MonitoringPolicySerializationTest {
private void verifyVdnsMonitoringOutputserialization(String serializedServiceTemplate) {
- JsonObject serviceTemplateJsonObject = new JsonParser().parse(serializedServiceTemplate).getAsJsonObject();
+ JsonObject serviceTemplateJsonObject = JsonParser.parseString(serializedServiceTemplate).getAsJsonObject();
assertEquals(YAML_VERSION, serviceTemplateJsonObject.get(DEFINITION_VERSION).getAsString());
JsonObject topologyTemplateJsonObject = serviceTemplateJsonObject.get(TOPOLOGY_TEMPLATE).getAsJsonObject();
JsonArray policiesJsonArray = topologyTemplateJsonObject.get(POLICIES).getAsJsonArray();
@@ -312,7 +312,7 @@ public class MonitoringPolicySerializationTest {
private void verifyVfwMonitoringOutputserialization(String serializedServiceTemplate) {
- JsonObject serviceTemplateJsonObject = new JsonParser().parse(serializedServiceTemplate).getAsJsonObject();
+ JsonObject serviceTemplateJsonObject = JsonParser.parseString(serializedServiceTemplate).getAsJsonObject();
assertEquals(YAML_VERSION, serviceTemplateJsonObject.get(DEFINITION_VERSION).getAsString());
JsonObject topologyTemplateJsonObject = serviceTemplateJsonObject.get(TOPOLOGY_TEMPLATE).getAsJsonObject();
JsonArray policiesJsonArray = topologyTemplateJsonObject.get(POLICIES).getAsJsonArray();