Hi, I tried testing this but hit a different problem with 2.0.0-SNAPSHOT. I've 
run out of time for testing just now, but will try to look again within the 
next few days.

`MachineTypeInZoneToHardware.apply` builds `Hardware` instances with 
`supportsImage` being `Predicates.<Image>alwaysFalse()`. Our attempt to 
provision a VM then fails with:

    Caused by: java.util.NoSuchElementException: no hardware profiles support 
images matching params: Predicates.or(Predicates.alwaysFalse(),<snip>)
        at 
org.jclouds.compute.domain.internal.TemplateBuilderImpl.throwNoSuchElementExceptionAfterLoggingHardwareIds(TemplateBuilderImpl.java:771)
        at 
org.jclouds.compute.domain.internal.TemplateBuilderImpl.resolveHardware(TemplateBuilderImpl.java:795)
        at 
org.jclouds.compute.domain.internal.TemplateBuilderImpl.build(TemplateBuilderImpl.java:708)
        at 
brooklyn.location.jclouds.templates.PortableTemplateBuilder.newJcloudsTemplate(PortableTemplateBuilder.java:70)


This is because the hardware profiles all have imageSpaceGb=0, which causes 
this behaviour in `MachineTypeInZoneToHardware`; e.g.:

    {id=us-central1-a/n1-standard-8, providerId=12908560197989714867, 
uri=https://www.googleapis.com/compute/v1/projects/jclouds-gce/zones/us-central1-a/machineTypes/n1-standard-8,
 name=n1-standard-8, 
uri=https://www.googleapis.com/compute/v1/projects/jclouds-gce/zones/us-central1-a/machineTypes/n1-standard-8,
 location={scope=ZONE, id=us-central1-a, description=us-central1-a, 
parent=google-compute-engine, 
metadata={selfLink=https://www.googleapis.com/compute/v1/projects/jclouds-gce/zones/us-central1-a}},
 processors=[{cores=8.0, speed=1.0}], ram=30720, hypervisor=kvm, 
supportsImage=Predicates.alwaysFalse(), userMetadata={imageSpaceGb=0}}


---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/40#issuecomment-56673476

Reply via email to