> +                                                                             
>       Template template) {
> +      CloudSigma2TemplateOptions options = 
> template.getOptions().as(CloudSigma2TemplateOptions.class);
> +      Image image = template.getImage();
> +      Hardware hardware = template.getHardware();
> +
> +      DriveInfo drive = api.getLibraryDrive(image.getProviderId());
> +
> +      if (!drive.getMedia().equals(MediaType.CDROM)) {
> +         logger.debug(">> cloning library drive %s...", 
> image.getProviderId());
> +
> +         drive = api.cloneLibraryDrive(image.getProviderId(), null);
> +         driveCloned.apply(drive);
> +
> +         // Refresh the drive object and verify the clone operation didn't 
> time out
> +         drive = api.getDriveInfo(drive.getUuid());
> +         checkState(drive.getStatus() == DriveStatus.UNMOUNTED, "Resource is 
> in invalid status: %s", drive.getStatus());

@nacx Could you comment?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/70/files#r18004073

Reply via email to