aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common/simulators/src/main/java/org
diff options
context:
space:
mode:
authorHockla, Ali (ah999m) <ah999m@att.com>2017-11-08 17:27:16 -0600
committerHockla, Ali (ah999m) <ah999m@att.com>2017-11-08 17:33:31 -0600
commit48c62738bf4c5653e36c6ea1e8e33e649b8526fc (patch)
treeb80c35c608012e842861ef14cb9034a86406ac40 /controlloop/common/simulators/src/main/java/org
parent9cbbe8c6abd790ab84ff47214db1f63bb5c2e1d7 (diff)
Fix SO Request body
- Renamed modelNameVersionId to modelVersionId in SOModelInfo - Removed requestID from SO Request body - As a result of this, an SOResponseWrapper was needed in order to attach the control loop event requestId to use in the SOResponse rule in drl (the requestID that is returned in the SO response is a newly generated requestId with no relation to the Policy control loop event requestId as per Arthur) - Updated drl to reflect the above mentioned change - Updated simulator and junits to reflect changes - Added an additional null httpResponse check/logger statement in SOManager and RestManager Issue-ID: POLICY-438 Change-Id: I5f414ba69b60b5565cca9073b47f4c4835e5abbf Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
Diffstat (limited to 'controlloop/common/simulators/src/main/java/org')
-rw-r--r--controlloop/common/simulators/src/main/java/org/onap/policy/simulators/SoSimulatorJaxRs.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/controlloop/common/simulators/src/main/java/org/onap/policy/simulators/SoSimulatorJaxRs.java b/controlloop/common/simulators/src/main/java/org/onap/policy/simulators/SoSimulatorJaxRs.java
index 2dd4d0908..e70a88517 100644
--- a/controlloop/common/simulators/src/main/java/org/onap/policy/simulators/SoSimulatorJaxRs.java
+++ b/controlloop/common/simulators/src/main/java/org/onap/policy/simulators/SoSimulatorJaxRs.java
@@ -27,9 +27,6 @@ import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
-import org.onap.policy.so.SORequest;
-import org.onap.policy.so.util.Serialization;
-
@Path("/serviceInstances")
public class SoSimulatorJaxRs {
@@ -37,10 +34,13 @@ public class SoSimulatorJaxRs {
@Path("/v5/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules")
@Consumes(MediaType.APPLICATION_JSON)
@Produces("application/json")
- public String SoPostQuery(@PathParam("serviceInstanceId") String serviceInstanceId, @PathParam("vnfInstanceId") String vnfInstanceId, String req)
+ public String SoPostQuery(@PathParam("serviceInstanceId") String serviceInstanceId, @PathParam("vnfInstanceId") String vnfInstanceId)
{
- SORequest request = Serialization.gsonPretty.fromJson(req, SORequest.class);
- return "{\"requestReferences\": {\"instanceId\": \"ff305d54-75b4-ff1b-bdb2-eb6b9e5460ff\", \"requestId\": " + request.requestId + "}}";
+
+ // the requestID contained in the SO Response is a newly generated requestID
+ // with no relation to the requestID in Policy controlLoopEvent
+ return "{\"requestReferences\": {\"instanceId\": \"ff305d54-75b4-ff1b-bdb2-eb6b9e5460ff\", \"requestId\": \"rq1234d1-5a33-ffdf-23ab-12abad84e331\" }}";
+
}
}