aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/api/openecomp-sdc-rest-webapp/externaltesting-rest/externaltesting-rest-services/src/main/java/org/openecomp/sdcrests/externaltesting/rest/ExternalTesting.java
diff options
context:
space:
mode:
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.java101
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);
}