in openstack-swift there are regions, not zones

This commit is contained in:
Adrian Cole 2012-05-10 20:08:04 -07:00
parent e461db5952
commit e96f2333ee
3 changed files with 2 additions and 9 deletions

View File

@ -18,8 +18,6 @@
*/ */
package org.jclouds.hpcloud.objectstorage; package org.jclouds.hpcloud.objectstorage;
import static org.jclouds.Constants.PROPERTY_BUILD_VERSION;
import java.net.URI; import java.net.URI;
import java.util.Properties; import java.util.Properties;
@ -55,8 +53,6 @@ public class HPCloudObjectStorageProviderMetadata extends BaseProviderMetadata {
public static Properties defaultProperties() { public static Properties defaultProperties() {
Properties properties = new Properties(); Properties properties = new Properties();
properties.setProperty(PROPERTY_BUILD_VERSION, "???"); //FIXME
// properties.setProperty(PROPERTY_VCLOUD_DEFAULT_NETWORK, "orgNet-.*-External"); FIXME: needed?
return properties; return properties;
} }

View File

@ -37,9 +37,7 @@ import org.jclouds.http.annotation.Redirection;
import org.jclouds.http.annotation.ServerError; import org.jclouds.http.annotation.ServerError;
import org.jclouds.json.config.GsonModule.DateAdapter; import org.jclouds.json.config.GsonModule.DateAdapter;
import org.jclouds.json.config.GsonModule.Iso8601DateAdapter; import org.jclouds.json.config.GsonModule.Iso8601DateAdapter;
import org.jclouds.location.suppliers.ImplicitLocationSupplier;
import org.jclouds.location.suppliers.RegionIdToURISupplier; import org.jclouds.location.suppliers.RegionIdToURISupplier;
import org.jclouds.location.suppliers.implicit.OnlyLocationOrFirstZone;
import org.jclouds.openstack.keystone.v2_0.config.KeystoneAuthenticationModule; import org.jclouds.openstack.keystone.v2_0.config.KeystoneAuthenticationModule;
import org.jclouds.openstack.services.ServiceType; import org.jclouds.openstack.services.ServiceType;
import org.jclouds.openstack.swift.CommonSwiftAsyncClient; import org.jclouds.openstack.swift.CommonSwiftAsyncClient;
@ -54,7 +52,6 @@ import org.jclouds.rest.config.RestClientModule;
import com.google.common.base.Supplier; import com.google.common.base.Supplier;
import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap;
import com.google.inject.Provides; import com.google.inject.Provides;
import com.google.inject.Scopes;
/** /**
* *
@ -81,7 +78,6 @@ public class HPCloudObjectStorageRestClientModule extends
super.installLocations(); super.installLocations();
// TODO: select this from KeystoneProperties.VERSION; // TODO: select this from KeystoneProperties.VERSION;
install(KeystoneAuthenticationModule.forRegions()); install(KeystoneAuthenticationModule.forRegions());
bind(ImplicitLocationSupplier.class).to(OnlyLocationOrFirstZone.class).in(Scopes.SINGLETON);
} }
@Override @Override

View File

@ -51,7 +51,8 @@ public class HPCloudObjectStorageExpectTest extends BaseRestClientExpectTest<Blo
Set<? extends Location> locations = clientWhenServersExist.listAssignableLocations(); Set<? extends Location> locations = clientWhenServersExist.listAssignableLocations();
assertNotNull(locations); assertNotNull(locations);
assertEquals(locations.size(), 1); assertEquals(locations.size(), 1);
assertEquals(locations.iterator().next().getId(), "region-a.geo-1"); // TODO: does this location make sense?
assertEquals(locations.iterator().next().getId(), "hpcloud-objectstorage");
} }
@Override @Override