> +
> +import com.google.common.base.Function;
> +import com.google.common.base.Supplier;
> +
> +/**
> + * @author Jeremy Daggett
> + */
> +@Singleton
> +public class RegionToCDNEndpoint implements Function<Object, URI> { 
> +
> +   private final Supplier<Map<String, Supplier<URI>>> endpointsSupplier;
> +
> +   @Inject
> +   public RegionToCDNEndpoint(@ApiVersion final String apiVersion, final 
> RegionIdToURISupplier.Factory factory) {
> +      this.endpointsSupplier = 
> factory.createForApiTypeAndVersion(ServiceType.OBJECT_CDN, apiVersion);
> +   }

This was where the magic happened! Change as follows to respect the 
`ServiceType` configured when creating the context :)
```java
@Inject
 public RegionToCDNEndpoint(@ApiVersion final String apiVersion,
        @Named(KeystoneProperties.SERVICE_TYPE) final String serviceType,
        final RegionIdToURISupplier.Factory factory) {
    this.endpointsSupplier = factory.createForApiTypeAndVersion(serviceType, 
apiVersion);
 }
```

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

Reply via email to