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 2015/11/16 23:06:46 UTC

jclouds-labs git commit: JCLOUDS-1033: Don't fail if no private key has been provided in DigitalOcean

Repository: jclouds-labs
Updated Branches:
  refs/heads/master c57ac931d -> d91ea5f47


JCLOUDS-1033: Don't fail if no private key has been provided in DigitalOcean


Project: http://git-wip-us.apache.org/repos/asf/jclouds-labs/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds-labs/commit/d91ea5f4
Tree: http://git-wip-us.apache.org/repos/asf/jclouds-labs/tree/d91ea5f4
Diff: http://git-wip-us.apache.org/repos/asf/jclouds-labs/diff/d91ea5f4

Branch: refs/heads/master
Commit: d91ea5f47f48f5550a5a26924f4f92ea1f0c1ffa
Parents: c57ac93
Author: Ignasi Barrera <na...@apache.org>
Authored: Mon Nov 2 13:03:55 2015 +0100
Committer: Ignasi Barrera <na...@apache.org>
Committed: Mon Nov 16 22:58:29 2015 +0100

----------------------------------------------------------------------
 .../compute/strategy/CreateKeyPairsThenCreateNodes.java  | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/d91ea5f4/digitalocean2/src/main/java/org/jclouds/digitalocean2/compute/strategy/CreateKeyPairsThenCreateNodes.java
----------------------------------------------------------------------
diff --git a/digitalocean2/src/main/java/org/jclouds/digitalocean2/compute/strategy/CreateKeyPairsThenCreateNodes.java b/digitalocean2/src/main/java/org/jclouds/digitalocean2/compute/strategy/CreateKeyPairsThenCreateNodes.java
index 3e4aae3..bc304b7 100644
--- a/digitalocean2/src/main/java/org/jclouds/digitalocean2/compute/strategy/CreateKeyPairsThenCreateNodes.java
+++ b/digitalocean2/src/main/java/org/jclouds/digitalocean2/compute/strategy/CreateKeyPairsThenCreateNodes.java
@@ -16,7 +16,6 @@
  */
 package org.jclouds.digitalocean2.compute.strategy;
 
-import static com.google.common.base.Preconditions.checkArgument;
 import static com.google.common.base.Preconditions.checkNotNull;
 
 import java.security.PublicKey;
@@ -101,11 +100,11 @@ public class CreateKeyPairsThenCreateNodes extends CreateNodesWithGroupEncodedIn
          generateKeyPairAndAddKeyToSet(options, generatedSshKeyIds, group);
       }
 
-      // If there is a script to run in the node, make sure a private key has been configured so jclouds will be able to
-      // access the node
-      if (options.getRunScript() != null) {
-         checkArgument(!Strings.isNullOrEmpty(options.getLoginPrivateKey()),
-               "no private key configured for: %s; please use options.overrideLoginPrivateKey(rsa_private_text)", group);
+      // If there is a script to run in the node, make sure a private key has
+      // been configured so jclouds will be able to access the node
+      if (options.getRunScript() != null && Strings.isNullOrEmpty(options.getLoginPrivateKey())) {
+         logger.warn(">> A runScript has been configured but no SSH key has been provided."
+               + " Authentication will delegate to the ssh-agent");
       }
 
       // If there is a key configured, then make sure there is a key pair for it