You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by na...@apache.org on 2018/01/12 07:33:57 UTC
jclouds git commit: Properly resolve the identity endpoint fro the
service catalog
Repository: jclouds
Updated Branches:
refs/heads/keystonev3 c41b6f7c3 -> 7ae03aebf
Properly resolve the identity endpoint fro the service catalog
Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/7ae03aeb
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/7ae03aeb
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/7ae03aeb
Branch: refs/heads/keystonev3
Commit: 7ae03aebffae2165ce7064abdd92759730b218da
Parents: c41b6f7
Author: Ignasi Barrera <na...@apache.org>
Authored: Fri Jan 12 08:33:46 2018 +0100
Committer: Ignasi Barrera <na...@apache.org>
Committed: Fri Jan 12 08:33:46 2018 +0100
----------------------------------------------------------------------
.../keystone/catalog/config/KeystoneAdminURLModule.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jclouds/blob/7ae03aeb/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/catalog/config/KeystoneAdminURLModule.java
----------------------------------------------------------------------
diff --git a/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/catalog/config/KeystoneAdminURLModule.java b/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/catalog/config/KeystoneAdminURLModule.java
index 391f14d..a70a222 100644
--- a/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/catalog/config/KeystoneAdminURLModule.java
+++ b/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/catalog/config/KeystoneAdminURLModule.java
@@ -16,11 +16,13 @@
*/
package org.jclouds.openstack.keystone.catalog.config;
+import static org.jclouds.openstack.keystone.config.KeystoneProperties.KEYSTONE_VERSION;
import static org.jclouds.util.Suppliers2.getLastValueInMap;
import java.net.URI;
import java.util.NoSuchElementException;
+import javax.inject.Named;
import javax.inject.Singleton;
import org.jclouds.location.Provider;
@@ -52,11 +54,12 @@ public class KeystoneAdminURLModule extends AbstractModule {
@Singleton
@Identity
protected final Supplier<URI> provideIdentityAdminUrl(final RegionIdToAdminURISupplier.Factory factory,
- @ApiVersion final String version, @Provider final Supplier<URI> providerURI) {
+ @ApiVersion final String version, @Named(KEYSTONE_VERSION) String keystoneVersion,
+ @Provider final Supplier<URI> providerURI) {
// There is a convention to use service types such as "identityv3" for specific endpoints. let's look first for
// those endpoints, and fallback to the default "identity" one or the project URL.
Supplier<URI> identityServiceForSpecificVersionInType = getLastValueInMap(factory.createForApiTypeAndVersion(
- ServiceType.IDENTITY + "v" + version, version));
+ ServiceType.IDENTITY + "v" + keystoneVersion, version));
Supplier<URI> identityServiceForVersion = Suppliers2.onThrowable(identityServiceForSpecificVersionInType,
NoSuchElementException.class,
getLastValueInMap(factory.createForApiTypeAndVersion(ServiceType.IDENTITY, version)));