>  
>        InstanceTemplate instanceTemplate = InstanceTemplate.builder()
> -              .forMachineType(machineType);
> +              .forMachineType(hardware.getUri());
> +
> +      if (hardware.getUserMetadata().get("imageSpaceGb").equals("0")) {
> +         // The machine needs a boot disk - create a 1GB drive for this 
> purpose
> +         // TODO need to delete it at end!
> +         Operation operation = 
> api.getDiskApiForProject(userProject.get()).createInZone(name + "-disk", 10,
> +                 template.getLocation().getId());
> +         waitOperationDone(operation);
> +         
> instanceTemplate.addDisk(InstanceTemplate.PersistentDisk.Mode.READ_WRITE, 
> operation.getTargetLink());
> +      }

Oh, I like that. I'll tweak this to ditch the above and instead use the 
imageSpaceGb to determine what the supportsImage returns. New change incoming! 
=)

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

Reply via email to