diff --git a/compute/src/main/java/org/jclouds/compute/ComputeService.java b/compute/src/main/java/org/jclouds/compute/ComputeService.java index 617f1c77c3..64c771c5a3 100644 --- a/compute/src/main/java/org/jclouds/compute/ComputeService.java +++ b/compute/src/main/java/org/jclouds/compute/ComputeService.java @@ -349,6 +349,9 @@ public interface ComputeService { * @see org.jclouds.compute.predicates.NodePredicates#runningInGroup(String) * @see org.jclouds.scriptbuilder.domain.Statements */ + @Beta + ListenableFuture submitScriptOnNode(String id, String runScript, RunScriptOptions options); + @Beta ListenableFuture submitScriptOnNode(String id, Statement runScript, RunScriptOptions options); @@ -377,4 +380,5 @@ public interface ComputeService { @Beta Optional getImageExtension(); + } diff --git a/compute/src/main/java/org/jclouds/compute/internal/BaseComputeService.java b/compute/src/main/java/org/jclouds/compute/internal/BaseComputeService.java index f3a76b1062..5c4eedba47 100644 --- a/compute/src/main/java/org/jclouds/compute/internal/BaseComputeService.java +++ b/compute/src/main/java/org/jclouds/compute/internal/BaseComputeService.java @@ -512,7 +512,7 @@ public class BaseComputeService implements ComputeService { @Override public Map runScriptOnNodesMatching(Predicate filter, String runScript) throws RunScriptOnNodesException { - return runScriptOnNodesMatching(filter, Statements.exec(checkNotNull(runScript, "runScript"))); + return runScriptOnNodesMatching(filter, Statements.literal(checkNotNull(runScript, "runScript"))); } /** @@ -527,7 +527,7 @@ public class BaseComputeService implements ComputeService { @Override public Map runScriptOnNodesMatching(Predicate filter, String runScript, RunScriptOptions options) throws RunScriptOnNodesException { - return runScriptOnNodesMatching(filter, Statements.exec(checkNotNull(runScript, "runScript")), options); + return runScriptOnNodesMatching(filter, Statements.literal(checkNotNull(runScript, "runScript")), options); } /** @@ -585,7 +585,7 @@ public class BaseComputeService implements ComputeService { */ @Override public ExecResponse runScriptOnNode(String id, String runScript, RunScriptOptions options) { - return runScriptOnNode(id, Statements.exec(checkNotNull(runScript, "runScript")), options); + return runScriptOnNode(id, Statements.literal(checkNotNull(runScript, "runScript")), options); } /** @@ -614,6 +614,14 @@ public class BaseComputeService implements ComputeService { return response; } + /** + * {@inheritDoc} + */ + @Override + public ListenableFuture submitScriptOnNode(String id, String runScript, RunScriptOptions options) { + return submitScriptOnNode(id, Statements.literal(checkNotNull(runScript, "runScript")), options); + } + /** * {@inheritDoc} */