mirror of https://github.com/apache/jclouds.git
added ability to run scripts literally
This commit is contained in:
parent
f81a0bc016
commit
79334201bf
|
@ -349,6 +349,9 @@ public interface ComputeService {
|
||||||
* @see org.jclouds.compute.predicates.NodePredicates#runningInGroup(String)
|
* @see org.jclouds.compute.predicates.NodePredicates#runningInGroup(String)
|
||||||
* @see org.jclouds.scriptbuilder.domain.Statements
|
* @see org.jclouds.scriptbuilder.domain.Statements
|
||||||
*/
|
*/
|
||||||
|
@Beta
|
||||||
|
ListenableFuture<ExecResponse> submitScriptOnNode(String id, String runScript, RunScriptOptions options);
|
||||||
|
|
||||||
@Beta
|
@Beta
|
||||||
ListenableFuture<ExecResponse> submitScriptOnNode(String id, Statement runScript, RunScriptOptions options);
|
ListenableFuture<ExecResponse> submitScriptOnNode(String id, Statement runScript, RunScriptOptions options);
|
||||||
|
|
||||||
|
@ -377,4 +380,5 @@ public interface ComputeService {
|
||||||
@Beta
|
@Beta
|
||||||
Optional<ImageExtension> getImageExtension();
|
Optional<ImageExtension> getImageExtension();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -512,7 +512,7 @@ public class BaseComputeService implements ComputeService {
|
||||||
@Override
|
@Override
|
||||||
public Map<NodeMetadata, ExecResponse> runScriptOnNodesMatching(Predicate<NodeMetadata> filter, String runScript)
|
public Map<NodeMetadata, ExecResponse> runScriptOnNodesMatching(Predicate<NodeMetadata> filter, String runScript)
|
||||||
throws RunScriptOnNodesException {
|
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
|
@Override
|
||||||
public Map<? extends NodeMetadata, ExecResponse> runScriptOnNodesMatching(Predicate<NodeMetadata> filter,
|
public Map<? extends NodeMetadata, ExecResponse> runScriptOnNodesMatching(Predicate<NodeMetadata> filter,
|
||||||
String runScript, RunScriptOptions options) throws RunScriptOnNodesException {
|
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
|
@Override
|
||||||
public ExecResponse runScriptOnNode(String id, String runScript, RunScriptOptions options) {
|
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;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ListenableFuture<ExecResponse> submitScriptOnNode(String id, String runScript, RunScriptOptions options) {
|
||||||
|
return submitScriptOnNode(id, Statements.literal(checkNotNull(runScript, "runScript")), options);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue