> +import org.jclouds.compute.domain.ImageBuilder;
> +import org.jclouds.compute.domain.OperatingSystem;
> +import org.jclouds.compute.domain.OsFamily;
> +import org.jclouds.profitbricks.domain.OSType;
> +
> +public class PBImageToImage implements 
> Function<org.jclouds.profitbricks.domain.image.Image, Image> {
> +
> +   @Override
> +   public Image apply(org.jclouds.profitbricks.domain.image.Image i) {
> +      checkNotNull(i);
> +
> +//        Location location = new LocationBuilder()
> +//                .id( null ) 
> +//                .description( i.getRegion().toString() )
> +//                .scope( LocationScope.REGION )
> +//                .build();

My comment was because the location is commented. If the information is 
available, then it should better be set.

The location you set here must be one of the locations returned by the 
[PBComputeServiceAdapter#listLocations](https://github.com/devcsrj/jclouds-labs/blob/master/profitbricks-c2/src/main/java/org/jclouds/profitbricks/compute/PBComputeServiceAdapter.java#L142-L151)
 method. The adapter returns a `VirtualdataCenter` but in the end it is 
transformed to a `Location` with the 
[VdcToLocation](https://github.com/devcsrj/jclouds-labs/blob/master/profitbricks-c2/src/main/java/org/jclouds/profitbricks/functions/VdcToLocation.java)
 function.

Is there a way you can get or build such a `Location` object given the image?

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

Reply via email to