expose statement being executed in runscript

This commit is contained in:
Adrian Cole 2011-03-01 16:46:30 -05:00
parent c5d43b88b1
commit b40c8ccb1b
3 changed files with 15 additions and 0 deletions

View File

@ -50,6 +50,11 @@ public interface RunScriptOnNode extends Callable<ExecResponse> {
@Override @Override
ExecResponse call(); ExecResponse call();
/**
* @return statement that will be executed
*/
Statement getStatement();
/** /**
* verifies that the command can execute on the node. For example, if this is ssh, it may attempt * verifies that the command can execute on the node. For example, if this is ssh, it may attempt
* to find a reachable socket. If this is using an API, it may attempt to validate that * to find a reachable socket. If this is using an API, it may attempt to validate that

View File

@ -156,4 +156,9 @@ public class RunScriptOnNodeAsInitScriptUsingSsh implements RunScriptOnNode {
return Objects.toStringHelper(this).add("node", node).add("name", name).add("runAsRoot", runAsRoot).toString(); return Objects.toStringHelper(this).add("node", node).add("name", name).add("runAsRoot", runAsRoot).toString();
} }
@Override
public Statement getStatement() {
return init;
}
} }

View File

@ -124,4 +124,9 @@ public class RunScriptOnNodeUsingSsh implements RunScriptOnNode {
.toString(); .toString();
} }
@Override
public Statement getStatement() {
return statement;
}
} }