>
> 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());
> + }
'k, my tweaks look good - verifying live tests now, but in expect tests,
they're properly skipping the f1-micro I added to the machineType list. In the
1.7 version, I'd like to come up with a robust way of using the machineTypes
with imageSpaceGb==0, but for 1.6.2, this workaround seems sufficient.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/16/files#r5402890