From a105e370a82523866363aa9cb01a4e7e9703a6a9 Mon Sep 17 00:00:00 2001 From: Adam Lowe Date: Thu, 12 Jul 2012 11:10:16 +0100 Subject: [PATCH 1/2] swift keystone 2.0: adjusting default modules to include KeystoneAuthenticationModule.RegionModule --- .../swift/SwiftKeystoneApiMetadata.java | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftKeystoneApiMetadata.java b/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftKeystoneApiMetadata.java index 803054168e..fcef42c32e 100644 --- a/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftKeystoneApiMetadata.java +++ b/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftKeystoneApiMetadata.java @@ -26,6 +26,7 @@ import java.util.Properties; import org.jclouds.apis.ApiMetadata; 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.services.ServiceType; 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.reflect.TypeToken; import com.google.inject.Module; + /** * Implementation of {@link ApiMetadata} for OpenStack Swift authenticated with KeyStone - * + * * @author Adrian Cole */ public class SwiftKeystoneApiMetadata extends SwiftApiMetadata { @@ -78,14 +80,15 @@ public class SwiftKeystoneApiMetadata extends SwiftApiMetadata { } public static class Builder extends SwiftApiMetadata.Builder { - protected Builder(){ + protected Builder() { super(SwiftKeystoneClient.class, SwiftKeystoneAsyncClient.class); id("swift-keystone") - .name("OpenStack Swift with Keystone authentication") - .identityName("tenantName:user or user") - .credentialName("password") - .context(CONTEXT_TOKEN) - .defaultModules(ImmutableSet.>of(KeystoneStorageEndpointModule.class, SwiftKeystoneRestClientModule.class, SwiftBlobStoreContextModule.class)); + .name("OpenStack Swift with Keystone authentication") + .identityName("tenantName:user or user") + .credentialName("password") + .context(CONTEXT_TOKEN) + .defaultModules(ImmutableSet.>of(KeystoneStorageEndpointModule.class, KeystoneAuthenticationModule.RegionModule.class, + SwiftKeystoneRestClientModule.class, SwiftBlobStoreContextModule.class)); } @Override From dfed1b21891ee0f8101b6dc16a1a2873ace65802 Mon Sep 17 00:00:00 2001 From: Adam Lowe Date: Thu, 12 Jul 2012 14:40:38 +0100 Subject: [PATCH 2/2] swift keystone 2.0: applying defaultProperties() --- .../org/jclouds/openstack/swift/SwiftKeystoneApiMetadata.java | 1 + 1 file changed, 1 insertion(+) diff --git a/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftKeystoneApiMetadata.java b/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftKeystoneApiMetadata.java index fcef42c32e..eb5cc1d94f 100644 --- a/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftKeystoneApiMetadata.java +++ b/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftKeystoneApiMetadata.java @@ -87,6 +87,7 @@ public class SwiftKeystoneApiMetadata extends SwiftApiMetadata { .identityName("tenantName:user or user") .credentialName("password") .context(CONTEXT_TOKEN) + .defaultProperties(SwiftKeystoneApiMetadata.defaultProperties()) .defaultModules(ImmutableSet.>of(KeystoneStorageEndpointModule.class, KeystoneAuthenticationModule.RegionModule.class, SwiftKeystoneRestClientModule.class, SwiftBlobStoreContextModule.class)); }