mirror of https://github.com/apache/jclouds.git
Merge pull request #712 from aplowe/swift-keyston
swift keystone 2.0: adjusting default modules for swift-keystone to include RegionModule
This commit is contained in:
commit
91a8895cea
|
@ -26,6 +26,7 @@ import java.util.Properties;
|
||||||
|
|
||||||
import org.jclouds.apis.ApiMetadata;
|
import org.jclouds.apis.ApiMetadata;
|
||||||
import org.jclouds.openstack.keystone.v2_0.config.CredentialTypes;
|
import org.jclouds.openstack.keystone.v2_0.config.CredentialTypes;
|
||||||
|
import org.jclouds.openstack.keystone.v2_0.config.KeystoneAuthenticationModule;
|
||||||
import org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties;
|
import org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties;
|
||||||
import org.jclouds.openstack.services.ServiceType;
|
import org.jclouds.openstack.services.ServiceType;
|
||||||
import org.jclouds.openstack.swift.blobstore.config.SwiftBlobStoreContextModule;
|
import org.jclouds.openstack.swift.blobstore.config.SwiftBlobStoreContextModule;
|
||||||
|
@ -36,9 +37,10 @@ import org.jclouds.rest.RestContext;
|
||||||
import com.google.common.collect.ImmutableSet;
|
import com.google.common.collect.ImmutableSet;
|
||||||
import com.google.common.reflect.TypeToken;
|
import com.google.common.reflect.TypeToken;
|
||||||
import com.google.inject.Module;
|
import com.google.inject.Module;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementation of {@link ApiMetadata} for OpenStack Swift authenticated with KeyStone
|
* Implementation of {@link ApiMetadata} for OpenStack Swift authenticated with KeyStone
|
||||||
*
|
*
|
||||||
* @author Adrian Cole
|
* @author Adrian Cole
|
||||||
*/
|
*/
|
||||||
public class SwiftKeystoneApiMetadata extends SwiftApiMetadata {
|
public class SwiftKeystoneApiMetadata extends SwiftApiMetadata {
|
||||||
|
@ -78,14 +80,16 @@ public class SwiftKeystoneApiMetadata extends SwiftApiMetadata {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Builder extends SwiftApiMetadata.Builder {
|
public static class Builder extends SwiftApiMetadata.Builder {
|
||||||
protected Builder(){
|
protected Builder() {
|
||||||
super(SwiftKeystoneClient.class, SwiftKeystoneAsyncClient.class);
|
super(SwiftKeystoneClient.class, SwiftKeystoneAsyncClient.class);
|
||||||
id("swift-keystone")
|
id("swift-keystone")
|
||||||
.name("OpenStack Swift with Keystone authentication")
|
.name("OpenStack Swift with Keystone authentication")
|
||||||
.identityName("tenantName:user or user")
|
.identityName("tenantName:user or user")
|
||||||
.credentialName("password")
|
.credentialName("password")
|
||||||
.context(CONTEXT_TOKEN)
|
.context(CONTEXT_TOKEN)
|
||||||
.defaultModules(ImmutableSet.<Class<? extends Module>>of(KeystoneStorageEndpointModule.class, SwiftKeystoneRestClientModule.class, SwiftBlobStoreContextModule.class));
|
.defaultProperties(SwiftKeystoneApiMetadata.defaultProperties())
|
||||||
|
.defaultModules(ImmutableSet.<Class<? extends Module>>of(KeystoneStorageEndpointModule.class, KeystoneAuthenticationModule.RegionModule.class,
|
||||||
|
SwiftKeystoneRestClientModule.class, SwiftBlobStoreContextModule.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue