From 618dc907a1eb76a0515bbda93a1b4e48b84aa95a Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Wed, 21 Dec 2011 23:57:14 -0800 Subject: [PATCH] hardened compute adapter --- .../strategy/impl/AdaptingComputeServiceStrategies.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/compute/src/main/java/org/jclouds/compute/strategy/impl/AdaptingComputeServiceStrategies.java b/compute/src/main/java/org/jclouds/compute/strategy/impl/AdaptingComputeServiceStrategies.java index fa6119e236..5651be3689 100644 --- a/compute/src/main/java/org/jclouds/compute/strategy/impl/AdaptingComputeServiceStrategies.java +++ b/compute/src/main/java/org/jclouds/compute/strategy/impl/AdaptingComputeServiceStrategies.java @@ -159,8 +159,9 @@ public class AdaptingComputeServiceStrategies implements CreateNodeW public NodeMetadata createNodeWithGroupEncodedIntoName(String group, String name, Template template) { checkState(group != null, "group (that which groups identical nodes together) must be specified"); checkState(name != null && name.indexOf(group) != -1, "name should have %s encoded into it", group); - checkState(template != null, "template must be specified"); - + checkState(template != null, "template was null"); + checkState(template.getOptions() != null, "template options was null"); + NodeAndInitialCredentials from = client.createNodeWithGroupEncodedIntoName(group, name, template); LoginCredentials fromNode = from.getCredentials(); LoginCredentials creds = prioritizeCredentialsFromTemplate.apply(template, fromNode);