brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjcorb...@apache.org
Subject [1/4] brooklyn-server git commit: BROOKLYN-399: configure “jclouds.regions” for aws
Date Mon, 28 Nov 2016 11:47:02 GMT
Repository: brooklyn-server
Updated Branches:
  refs/heads/master 72aaf2b4a -> 1fe92f8b1


BROOKLYN-399: configure “jclouds.regions” for aws

Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/66dfed9f
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/66dfed9f
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/66dfed9f

Branch: refs/heads/master
Commit: 66dfed9f03e195326a3b5f4da0804e3e954efd7e
Parents: 4964751
Author: Aled Sage <aled.sage@gmail.com>
Authored: Wed Nov 23 18:23:32 2016 +0000
Committer: Aled Sage <aled.sage@gmail.com>
Committed: Wed Nov 23 18:25:40 2016 +0000

----------------------------------------------------------------------
 .../location/jclouds/ComputeServiceRegistryImpl.java         | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/66dfed9f/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/ComputeServiceRegistryImpl.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/ComputeServiceRegistryImpl.java
b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/ComputeServiceRegistryImpl.java
index 0424917..5538e6e 100644
--- a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/ComputeServiceRegistryImpl.java
+++ b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/ComputeServiceRegistryImpl.java
@@ -31,6 +31,7 @@ import org.apache.brooklyn.core.config.Sanitizer;
 import org.apache.brooklyn.core.location.cloud.CloudLocationConfig;
 import org.apache.brooklyn.util.collections.MutableMap;
 import org.apache.brooklyn.util.core.config.ConfigBag;
+import org.apache.brooklyn.util.text.Strings;
 import org.apache.brooklyn.util.time.Duration;
 import org.jclouds.Constants;
 import org.jclouds.ContextBuilder;
@@ -38,6 +39,7 @@ import org.jclouds.compute.ComputeService;
 import org.jclouds.compute.ComputeServiceContext;
 import org.jclouds.ec2.reference.EC2Constants;
 import org.jclouds.encryption.bouncycastle.config.BouncyCastleCryptoModule;
+import org.jclouds.location.reference.LocationConstants;
 import org.jclouds.logging.slf4j.config.SLF4JLoggingModule;
 import org.jclouds.sshj.config.SshjSshClientModule;
 import org.slf4j.Logger;
@@ -111,6 +113,12 @@ public class ComputeServiceRegistryImpl implements ComputeServiceRegistry,
Jclou
                  */
             }
             
+            // See https://issues.apache.org/jira/browse/BROOKLYN-399
+            String region = conf.get(CLOUD_REGION_ID);
+            if (Strings.isNonBlank(region)) {
+                properties.setProperty(LocationConstants.PROPERTY_REGIONS, region);
+            }
+            
             // occasionally can get com.google.common.util.concurrent.UncheckedExecutionException:
java.lang.RuntimeException: 
             //     security group eu-central-1/jclouds#brooklyn-bxza-alex-eu-central-shoul-u2jy-nginx-ielm
is not available after creating
             // the default timeout was 500ms so let's raise it in case that helps


Mime
View raw message