From 8ae33f231556bc4d8317d68552f7a1d6ace7bce9 Mon Sep 17 00:00:00 2001 From: Andrew Donald Kennedy Date: Tue, 14 Aug 2012 02:23:54 +0100 Subject: [PATCH] Added binding for optional extensions --- .../keystone/v2_0/config/KeystoneRestClientModule.java | 7 +++++++ .../openstack/nova/v2_0/config/NovaRestClientModule.java | 3 +-- .../glance/v1_0/config/GlanceRestClientModule.java | 3 +++ .../quantum/v1_0/config/QuantumRestClientModule.java | 3 +++ .../openstack/swift/v1/config/SwiftRestClientModule.java | 3 +++ 5 files changed, 17 insertions(+), 2 deletions(-) diff --git a/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/config/KeystoneRestClientModule.java b/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/config/KeystoneRestClientModule.java index 7904ba0dda..6d265cacbf 100644 --- a/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/config/KeystoneRestClientModule.java +++ b/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/config/KeystoneRestClientModule.java @@ -51,6 +51,7 @@ import org.jclouds.openstack.v2_0.ServiceType; import org.jclouds.openstack.v2_0.domain.Extension; import org.jclouds.openstack.v2_0.features.ExtensionApi; import org.jclouds.openstack.v2_0.features.ExtensionAsyncApi; +import org.jclouds.openstack.v2_0.functions.PresentWhenExtensionAnnotationNamespaceEqualsAnyNamespaceInExtensionsSet; import org.jclouds.openstack.v2_0.services.Identity; import org.jclouds.rest.ConfiguresRestClient; import org.jclouds.rest.annotations.ApiVersion; @@ -123,6 +124,12 @@ public class KeystoneRestClientModule ext @Override protected void configure() { install(new NovaParserModule()); - bind(ImplicitOptionalConverter.class).to( - PresentWhenExtensionAnnotationNamespaceEqualsAnyNamespaceInExtensionsSet.class); + bind(ImplicitOptionalConverter.class).to(PresentWhenExtensionAnnotationNamespaceEqualsAnyNamespaceInExtensionsSet.class); super.configure(); } diff --git a/labs/openstack-glance/src/main/java/org/jclouds/openstack/glance/v1_0/config/GlanceRestClientModule.java b/labs/openstack-glance/src/main/java/org/jclouds/openstack/glance/v1_0/config/GlanceRestClientModule.java index 7234f344f6..e6d266a052 100644 --- a/labs/openstack-glance/src/main/java/org/jclouds/openstack/glance/v1_0/config/GlanceRestClientModule.java +++ b/labs/openstack-glance/src/main/java/org/jclouds/openstack/glance/v1_0/config/GlanceRestClientModule.java @@ -40,8 +40,10 @@ import org.jclouds.openstack.glance.v1_0.handlers.GlanceErrorHandler; import org.jclouds.openstack.v2_0.domain.Extension; import org.jclouds.openstack.v2_0.features.ExtensionApi; import org.jclouds.openstack.v2_0.features.ExtensionAsyncApi; +import org.jclouds.openstack.v2_0.functions.PresentWhenExtensionAnnotationNamespaceEqualsAnyNamespaceInExtensionsSet; import org.jclouds.rest.ConfiguresRestClient; import org.jclouds.rest.config.RestClientModule; +import org.jclouds.rest.functions.ImplicitOptionalConverter; import com.google.common.cache.CacheBuilder; import com.google.common.cache.CacheLoader; @@ -76,6 +78,7 @@ public class GlanceRestClientModule @Override protected void configure() { bind(DateAdapter.class).to(Iso8601DateAdapter.class); + bind(ImplicitOptionalConverter.class).to(PresentWhenExtensionAnnotationNamespaceEqualsAnyNamespaceInExtensionsSet.class); super.configure(); }