X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=openecomp-be%2Fapi%2Fopenecomp-sdc-rest-webapp%2Fvendor-software-products-rest%2Fvendor-software-products-rest-services%2Fsrc%2Fmain%2Fjava%2Forg%2Fopenecomp%2Fsdcrests%2Fvsp%2Frest%2FVendorSoftwareProducts.java;h=d848d41f7c95ff63c744eea2981ac0af8b9d68cd;hb=8e9c0653dd6c6862123c9609ae34e1206d86456e;hp=53fe2af31d318d9fdfadd3674f3409a6c19578c9;hpb=7d92498efd0ea61097b241287c004965d46b2c12;p=sdc.git diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/VendorSoftwareProducts.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/VendorSoftwareProducts.java index 53fe2af31d..d848d41f7c 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/VendorSoftwareProducts.java +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/VendorSoftwareProducts.java @@ -23,13 +23,28 @@ package org.openecomp.sdcrests.vsp.rest; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; -import org.openecomp.sdcrests.vendorsoftwareproducts.types.*; +import org.openecomp.sdcrests.item.types.ItemCreationDto; +import org.openecomp.sdcrests.vendorsoftwareproducts.types.PackageInfoDto; +import org.openecomp.sdcrests.vendorsoftwareproducts.types.QuestionnaireResponseDto; +import org.openecomp.sdcrests.vendorsoftwareproducts.types.VersionSoftwareProductActionRequestDto; +import org.openecomp.sdcrests.vendorsoftwareproducts.types.VspComputeDto; +import org.openecomp.sdcrests.vendorsoftwareproducts.types.VspDescriptionDto; +import org.openecomp.sdcrests.vendorsoftwareproducts.types.VspRequestDto; import org.openecomp.sdcrests.vendorsoftwareproducts.types.validation.IsValidJson; import org.springframework.validation.annotation.Validated; import javax.validation.Valid; import javax.validation.constraints.NotNull; -import javax.ws.rs.*; +import javax.ws.rs.Consumes; +import javax.ws.rs.DELETE; +import javax.ws.rs.GET; +import javax.ws.rs.HeaderParam; +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 java.io.File; @@ -48,8 +63,8 @@ public interface VendorSoftwareProducts extends VspEntities { @POST @Path("/") @ApiOperation(value = "Create a new vendor software product", - response = VspCreationDto.class) - Response createVsp(@Valid VspDescriptionDto vspDescriptionDto, + response = ItemCreationDto.class) + Response createVsp(@Valid VspRequestDto vspRequestDto, @NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user); @@ -58,13 +73,12 @@ public interface VendorSoftwareProducts extends VspEntities { @ApiOperation(value = "Get list of vendor software products and their description", responseContainer = "List") Response listVsps(@ApiParam( - value = "Currently supported values: 'Final' - only vendor software products with final " + value = "Currently supported values: 'Certified' - only vendor software products with final " + " version will be return - with their latest final version") - @QueryParam("versionFilter") String versionFilter, + @QueryParam("versionFilter") String versionStatus, @NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user); - @GET @Path("/{vspId}/versions/{versionId}") @ApiOperation(value = "Get details of a vendor software product") @@ -127,9 +141,9 @@ public interface VendorSoftwareProducts extends VspEntities { + "Checkin: Unlocks it and activates the edited version to all users.| " + "Submit: Finalize its active version.|" + "Create_Package: Creates a CSAR zip file.|") - Response actOnVendorSoftwareProduct(@PathParam("vspId") String vspId, + Response actOnVendorSoftwareProduct(VersionSoftwareProductActionRequestDto request, + @PathParam("vspId") String vspId, @PathParam("versionId") String versionId, - VersionSoftwareProductActionRequestDto request, @NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user) throws IOException; @@ -183,4 +197,14 @@ public interface VendorSoftwareProducts extends VspEntities { @NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user); + @GET + @Path("/{vspId}/versions/{versionId}/compute-flavors") + @ApiOperation(value = "Get list of vendor software product compute-flavors", + response = VspComputeDto.class, + responseContainer = "List") + Response listComputes(@ApiParam(value = "Vendor software product Id") + @PathParam("vspId") String vspId, + @PathParam("versionId") String versionId, + @NotNull(message = USER_MISSING_ERROR_MSG) + @HeaderParam(USER_ID_HEADER_PARAM) String user); }