> +   @Override
> +   public ListenableFuture<Image> createImage(ImageTemplate template) {
> +      checkState(template instanceof CloneImageTemplate, " digitalocean only 
> supports creating images through cloning.");
> +      final CloneImageTemplate cloneTemplate = (CloneImageTemplate) template;
> +
> +      // Droplet needs to be stopped
> +      int powerOffEvent = 
> api.getDropletApi().powerOff(Integer.parseInt(cloneTemplate.getSourceNodeId()));
> +      nodeStoppedPredicate.apply(powerOffEvent);
> +
> +      int snapshotEvent = 
> api.getDropletApi().snapshot(Integer.parseInt(cloneTemplate.getSourceNodeId()),
> +            cloneTemplate.getName());
> +
> +      logger.info(">> registered new Image, waiting for it to become 
> available");
> +
> +      // Until the process completes we don't have enough information to 
> build
> +      // an image to return

[minor] No need to wrap the comment?

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

Reply via email to