diff options
author | atulpurohit <atul.purohit1@vodafone.com> | 2019-11-01 15:01:03 +0530 |
---|---|---|
committer | Ofir Sonsino <ofir.sonsino@intl.att.com> | 2019-12-20 07:21:05 +0000 |
commit | 39116c7da381ff5e5b2ce7ae80f103dfc77c0253 (patch) | |
tree | b8af768fdbacd6116ce7ed145899fac8632ef79d /openecomp-be/api/openecomp-sdc-rest-webapp/externaltesting-rest/externaltesting-rest-services/src/main/java/org/openecomp/sdcrests/externaltesting/rest/ExternalTesting.java | |
parent | e38ef745ab296de90cb428f26348de32e4295420 (diff) |
Unique identifier for test execution
Issue-ID: SDC-2584
Co-authored-by: nikhil.soni@vodafone.com
Signed-off-by: atulpurohit <atul.purohit1@vodafone.com>
Change-Id: I3e7f1a84935cbcd26f8a42a6e2d2dbcb7533cb19
Signed-off-by: atulpurohit <atul.purohit1@vodafone.com>
Diffstat (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/externaltesting-rest/externaltesting-rest-services/src/main/java/org/openecomp/sdcrests/externaltesting/rest/ExternalTesting.java')
-rw-r--r-- | openecomp-be/api/openecomp-sdc-rest-webapp/externaltesting-rest/externaltesting-rest-services/src/main/java/org/openecomp/sdcrests/externaltesting/rest/ExternalTesting.java | 101 |
1 files changed, 55 insertions, 46 deletions
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/externaltesting-rest/externaltesting-rest-services/src/main/java/org/openecomp/sdcrests/externaltesting/rest/ExternalTesting.java b/openecomp-be/api/openecomp-sdc-rest-webapp/externaltesting-rest/externaltesting-rest-services/src/main/java/org/openecomp/sdcrests/externaltesting/rest/ExternalTesting.java index c25456f1ae..5f70570429 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/externaltesting-rest/externaltesting-rest-services/src/main/java/org/openecomp/sdcrests/externaltesting/rest/ExternalTesting.java +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/externaltesting-rest/externaltesting-rest-services/src/main/java/org/openecomp/sdcrests/externaltesting/rest/ExternalTesting.java @@ -18,17 +18,23 @@ package org.openecomp.sdcrests.externaltesting.rest; import io.swagger.v3.oas.annotations.OpenAPIDefinition; import io.swagger.v3.oas.annotations.info.Info; +import java.util.List; +import javax.ws.rs.Consumes; +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.PUT; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.QueryParam; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; +import org.apache.cxf.jaxrs.ext.multipart.Attachment; +import org.apache.cxf.jaxrs.ext.multipart.Multipart; import org.openecomp.core.externaltesting.api.ClientConfiguration; import org.openecomp.core.externaltesting.api.RemoteTestingEndpointDefinition; -import org.openecomp.core.externaltesting.api.VtpTestExecutionRequest; import org.springframework.validation.annotation.Validated; -import javax.ws.rs.*; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; -import java.util.List; - - @Path("/v1.0/externaltesting") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) @@ -37,55 +43,58 @@ import java.util.List; public interface ExternalTesting { - @GET - @Path("/config") - Response getConfig(); + @GET + @Path("/config") + Response getConfig(); - @PUT - @Path("/config") - Response setConfig(ClientConfiguration config); + @PUT + @Path("/config") + Response setConfig(ClientConfiguration config); - @GET - @Path("/testcasetree") - Response getTestCasesAsTree(); + @GET + @Path("/testcasetree") + Response getTestCasesAsTree(); - @GET - @Path("/endpoints") - Response getEndpoints(); + @GET + @Path("/endpoints") + Response getEndpoints(); - @PUT - @Path("/endpoints") - Response setEndpoints(List<RemoteTestingEndpointDefinition> endpoints); + @PUT + @Path("/endpoints") + Response setEndpoints(List<RemoteTestingEndpointDefinition> endpoints); - @GET - @Path("/endpoints/{endpointId}/scenarios") - Response getScenarios(@PathParam("endpointId") String endpointId); + @GET + @Path("/endpoints/{endpointId}/scenarios") + Response getScenarios(@PathParam("endpointId") String endpointId); - @GET - @Path("/endpoints/{endpointId}/scenarios/{scenario}/testsuites") - Response getTestsuites(@PathParam("endpointId") String endpointId, @PathParam("scenario") String scenario); + @GET + @Path("/endpoints/{endpointId}/scenarios/{scenario}/testsuites") + Response getTestsuites(@PathParam("endpointId") String endpointId, @PathParam("scenario") String scenario); - @GET - @Path("/endpoints/{endpointId}/scenarios/{scenario}/testcases") - Response getTestcases(@PathParam("endpointId") String endpointId, - @PathParam("scenario") String scenario); + @GET + @Path("/endpoints/{endpointId}/scenarios/{scenario}/testcases") + Response getTestcases(@PathParam("endpointId") String endpointId, @PathParam("scenario") String scenario); - @GET - @Path("/endpoints/{endpointId}/scenarios/{scenario}/testsuites/{testsuite}/testcases/{testcase}") - Response getTestcase(@PathParam("endpointId") String endpointId, - @PathParam("scenario") String scenario, - @PathParam("testsuite") String testsuite, - @PathParam("testcase") String testcase); + @GET + @Path("/endpoints/{endpointId}/scenarios/{scenario}/testsuites/{testsuite}/testcases/{testcase}") + Response getTestcase(@PathParam("endpointId") String endpointId, @PathParam("scenario") String scenario, + @PathParam("testsuite") String testsuite, @PathParam("testcase") String testcase); - @POST - @Path("/endpoints/{endpointId}/executions/{executionId}") - Response getExecution(@PathParam("endpointId") String endpointId, - @PathParam("executionId") String executionId); + @POST + @Path("/endpoints/{endpointId}/executions/{executionId}") + Response getExecution(@PathParam("endpointId") String endpointId, @PathParam("executionId") String executionId); - @POST - @Path("/executions") - Response execute(List<VtpTestExecutionRequest> req, - @QueryParam("requestId") String requestId); + @POST + @Path("/executions") + @Consumes(MediaType.MULTIPART_FORM_DATA) + Response execute(@QueryParam("vspId") String vspId, @QueryParam("vspVersionId") String vspVersionId, + @QueryParam("requestId") String requestId, + @Multipart(value = "files", required = false) List<Attachment> files, + @Multipart(value = "testdata", required = false) String testData); + @GET + @Path("/executions") + Response getValidationResult(@QueryParam("requestId") String requestId, + @QueryParam("endPoint") List<String> endPoints); } |