diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VdcAsyncClient.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VdcAsyncClient.java index 34bd9febad..4d62bea509 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VdcAsyncClient.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VdcAsyncClient.java @@ -29,6 +29,7 @@ import org.jclouds.rest.annotations.ExceptionParser; import org.jclouds.rest.annotations.JAXBResponseParser; import org.jclouds.rest.annotations.PayloadParam; import org.jclouds.rest.annotations.RequestFilters; +import org.jclouds.vcloud.director.v1_5.domain.CaptureVAppParams; import org.jclouds.vcloud.director.v1_5.domain.CloneMediaParams; import org.jclouds.vcloud.director.v1_5.domain.CloneVAppParams; import org.jclouds.vcloud.director.v1_5.domain.CloneVAppTemplateParams; @@ -64,6 +65,17 @@ public interface VdcAsyncClient { @ExceptionParser(ThrowVCloudErrorOn4xx.class) ListenableFuture getVdc(@EndpointParam(parser = ReferenceToEndpoint.class) Reference vdcRef); + /** + * @see VdcClient#captureVApp(Reference, CaptureVAppParams) + */ + @POST + @Path("/action/captureVApp") + @Consumes + @JAXBResponseParser + @ExceptionParser(ThrowVCloudErrorOn4xx.class) + ListenableFuture captureVApp(@EndpointParam(parser = ReferenceToEndpoint.class) Reference vdcRef, + @PayloadParam(value = "?") CaptureVAppParams params); + /** * @see VdcClient#cloneMedia(Reference, CloneMediaParams) */ diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VdcClient.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VdcClient.java index 6fefa33d1e..27391ce221 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VdcClient.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VdcClient.java @@ -65,6 +65,15 @@ public interface VdcClient { */ Vdc getVdc(Reference vdcRef); + /** + * Captures a vApp into vApp template. + * The status of vApp template will be in UNRESOLVED(0) until the capture task is finished. + * + * @return a VApp resource which will contain a task. + * The user should should wait for this task to finish to be able to use the vApp. + */ + VAppTemplate captureVApp(Reference vdcRef, CloneMediaParams params); + /** * Clones a media into new one. * The status of the returned media is UNRESOLVED(0) until the task for cloning finish.