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;
@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);
@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")
+ "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;
@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);
}