>  
>        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());
> +      }

No, and frankly, I'm not sure if I want to keep this here. @richardcloudsoft 
did something similar in his v1beta14 version, and I aped it. The reasoning is 
to deal with the f1-micro and g1-small machine types, which have no image space 
by default. Let me think about this one a bit and get back to it.

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

Reply via email to