using a better location supplier

This commit is contained in:
Mike Arnold 2012-03-20 22:45:25 -05:00
parent b5e8458446
commit d8fc0a9786
1 changed files with 3 additions and 1 deletions

View File

@ -38,7 +38,9 @@ import org.jclouds.json.config.GsonModule.DateAdapter;
import org.jclouds.json.config.GsonModule.Iso8601DateAdapter;
import org.jclouds.location.suppliers.ImplicitLocationSupplier;
import org.jclouds.location.suppliers.RegionIdToURISupplier;
import org.jclouds.location.suppliers.implicit.GetRegionIdMatchingProviderURIOrNull;
import org.jclouds.location.suppliers.implicit.OnlyLocationOrFirstRegionOptionallyMatchingRegionId;
import org.jclouds.location.suppliers.implicit.OnlyLocationOrFirstZone;
import org.jclouds.openstack.keystone.v2_0.config.KeystoneAuthenticationModule;
import org.jclouds.openstack.services.ServiceType;
import org.jclouds.openstack.swift.CommonSwiftAsyncClient;
@ -77,7 +79,7 @@ public class HPCloudObjectStorageRestClientModule extends
super.installLocations();
// TODO: select this from KeystoneProperties.VERSION;
install(KeystoneAuthenticationModule.forRegions());
bind(ImplicitLocationSupplier.class).to(OnlyLocationOrFirstRegionOptionallyMatchingRegionId.class).in(Scopes.SINGLETON);
bind(ImplicitLocationSupplier.class).to(OnlyLocationOrFirstZone.class).in(Scopes.SINGLETON);
}
@Override