diff options
author | daniel <dc443y@att.com> | 2017-09-26 16:21:02 -0500 |
---|---|---|
committer | Jorge Hernandez <jh1730@att.com> | 2017-09-27 02:09:37 +0000 |
commit | 6d0d6858c14920f366fa12336316ea8d5c66e46d (patch) | |
tree | 035472e4b55551808b077ed178597f17efbc8ac5 /controlloop/common/simulators | |
parent | 83e5f06aef61e32463c97241fd6a5cfef6679206 (diff) |
Fix Use Case Template
This is a WIP for getting guard to work. Currently
the A&AI GET and named queries are connecting to
the simulator and working in the labs. Guard is not
connecting to simulator and needs further analysis.
Issue-ID: POLICY-259
Change-Id: If9875bfd83cbd82dcae04a876b3818ec9c07b1f7
Signed-off-by: Daniel Cruz <dc443y@att.com>
Diffstat (limited to 'controlloop/common/simulators')
2 files changed, 8 insertions, 0 deletions
diff --git a/controlloop/common/simulators/src/main/java/org/onap/policy/simulators/AaiSimulatorJaxRs.java b/controlloop/common/simulators/src/main/java/org/onap/policy/simulators/AaiSimulatorJaxRs.java index 59e97c239..ad106e555 100644 --- a/controlloop/common/simulators/src/main/java/org/onap/policy/simulators/AaiSimulatorJaxRs.java +++ b/controlloop/common/simulators/src/main/java/org/onap/policy/simulators/AaiSimulatorJaxRs.java @@ -36,6 +36,7 @@ public class AaiSimulatorJaxRs { @GET @Path("/v8/network/generic-vnfs/generic-vnf/{vnfId}") + @Consumes(MediaType.APPLICATION_JSON) @Produces("application/json") public String aaiGetQuery (@PathParam("vnfID") String vnfId) { @@ -63,6 +64,7 @@ public class AaiSimulatorJaxRs { @GET @Path("/v11/network/generic-vnfs/generic-vnf?vnf-name={vnfName}") + @Consumes(MediaType.APPLICATION_JSON) @Produces("application/json") public String getByVnfName (@PathParam("vnfName") String vnfName) { @@ -72,6 +74,7 @@ public class AaiSimulatorJaxRs { @GET @Path("/v11/network/generic-vnfs/generic-vnf/{vnfId}") + @Consumes(MediaType.APPLICATION_JSON) @Produces("application/json") public String getByVnfId (@PathParam("vnfId") String vnfId) { @@ -81,6 +84,7 @@ public class AaiSimulatorJaxRs { @GET @Path("/v11/nodes/vservers?vserver-name={vserverName}") + @Consumes(MediaType.APPLICATION_JSON) @Produces("application/json") public String getByVserverName (@PathParam("vserverName") String vserverName) { diff --git a/controlloop/common/simulators/src/main/java/org/onap/policy/simulators/VfcSimulatorJaxRs.java b/controlloop/common/simulators/src/main/java/org/onap/policy/simulators/VfcSimulatorJaxRs.java index 926536e31..53ae7bc4b 100644 --- a/controlloop/common/simulators/src/main/java/org/onap/policy/simulators/VfcSimulatorJaxRs.java +++ b/controlloop/common/simulators/src/main/java/org/onap/policy/simulators/VfcSimulatorJaxRs.java @@ -20,6 +20,7 @@ package org.onap.policy.simulators; +import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.POST; import javax.ws.rs.Path; @@ -27,12 +28,14 @@ import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.servlet.http.HttpServletResponse; import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; @Path("/api/nslcm/v1") public class VfcSimulatorJaxRs { @POST @Path("/ns/{nsInstanceId}/heal") + @Consumes(MediaType.APPLICATION_JSON) @Produces("application/json") public String vfcPostQuery(@PathParam("nsInstanceId") String nsInstanceId, @Context final HttpServletResponse response) @@ -47,6 +50,7 @@ public class VfcSimulatorJaxRs { @GET @Path("/jobs/{jobId}") + @Consumes(MediaType.APPLICATION_JSON) @Produces("application/json") public String vfcGetQuery(@PathParam("jobId") String jobId) { return "{\"jobId\" : "+jobId+",\"responseDescriptor\" : {\"progress\" : \"40\",\"status\" : \"finished\",\"statusDescription\" : \"OMC VMs are decommissioned in VIM\",\"errorCode\" : null,\"responseId\": 101 ,\"responseHistoryList\": [{\"progress\" : \"40\",\"status\" : \"proccessing\",\"statusDescription\" : \"OMC VMs are decommissioned in VIM\",\"errorCode\" : null,\"responseId\" : \"1\"}, {\"progress\" : \"41\",\"status\" : \"proccessing\",\"statusDescription\" : \"OMC VMs are decommissioned in VIM\",\"errorCode\" : null,\"responseId\" : \"2\"}]}}"; |