Package org.jclouds.compute.callables
Class RunScriptOnNodeAsInitScriptUsingSsh
java.lang.Object
org.jclouds.compute.callables.SudoAwareInitManager
org.jclouds.compute.callables.RunScriptOnNodeAsInitScriptUsingSsh
- All Implemented Interfaces:
Callable<ExecResponse>,RunScriptOnNode
- Direct Known Subclasses:
RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilComplete
public class RunScriptOnNodeAsInitScriptUsingSsh
extends SudoAwareInitManager
implements RunScriptOnNode
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jclouds.compute.callables.RunScriptOnNode
RunScriptOnNode.Factory -
Field Summary
FieldsFields inherited from class org.jclouds.compute.callables.SudoAwareInitManager
computeLogger, init, initFile, logger, node, runAsRoot, ssh, sshFactory -
Constructor Summary
ConstructorsConstructorDescriptionRunScriptOnNodeAsInitScriptUsingSsh(com.google.common.base.Function<NodeMetadata, SshClient> sshFactory, com.google.common.eventbus.EventBus eventBus, InitScriptConfigurationForTasks initScriptConfiguration, NodeMetadata node, Statement script, RunScriptOptions options) -
Method Summary
Modifier and TypeMethodDescriptioncall()Note thatRunScriptOnNode.init()must be called first.static InitScriptcreateInitScript(InitScriptConfigurationForTasks config, String name, Statement script) protected ExecResponsedoCall()init()verifies that the command can execute on the node.protected voidprotected voidMethods inherited from class org.jclouds.compute.callables.SudoAwareInitManager
execScriptAsDefaultUser, getInitFile, getNode, getStatement, refreshAndRunAction, runAction, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jclouds.compute.callables.RunScriptOnNode
getNode, getStatement
-
Field Details
-
eventBus
protected final com.google.common.eventbus.EventBus eventBus
-
-
Constructor Details
-
RunScriptOnNodeAsInitScriptUsingSsh
public RunScriptOnNodeAsInitScriptUsingSsh(com.google.common.base.Function<NodeMetadata, SshClient> sshFactory, com.google.common.eventbus.EventBus eventBus, InitScriptConfigurationForTasks initScriptConfiguration, NodeMetadata node, Statement script, RunScriptOptions options)
-
-
Method Details
-
init
Description copied from interface:RunScriptOnNodeverifies 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 connection.- Specified by:
initin interfaceRunScriptOnNode- Overrides:
initin classSudoAwareInitManager
-
call
Description copied from interface:RunScriptOnNodeNote thatRunScriptOnNode.init()must be called first.- Specified by:
callin interfaceCallable<ExecResponse>- Specified by:
callin interfaceRunScriptOnNode
-
createInitScript
public static InitScript createInitScript(InitScriptConfigurationForTasks config, String name, Statement script) -
refreshSshIfNewAdminCredentialsConfigured
-
doCall
-
setupLinkToInitFile
protected void setupLinkToInitFile()
-