jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Phillips <notificati...@github.com>
Subject Re: [jclouds-labs] CloudSigma2 ComputeService and SecurityGroupExtension (#70)
Date Sun, 21 Sep 2014 15:07:02 GMT
> +                                                                                   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());

If this blows up here, what will happen with any drives already created?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/70/files#r17826017
Mime
View raw message