Package org.jclouds.compute.callables
Class SudoAwareInitManager
- java.lang.Object
-
- org.jclouds.compute.callables.SudoAwareInitManager
-
- Direct Known Subclasses:
RunScriptOnNodeAsInitScriptUsingSsh
public class SudoAwareInitManager extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected Logger
computeLogger
protected InitScript
init
protected String
initFile
protected Logger
logger
protected NodeMetadata
node
protected boolean
runAsRoot
protected SshClient
ssh
protected com.google.common.base.Function<NodeMetadata,SshClient>
sshFactory
-
Constructor Summary
Constructors Constructor Description SudoAwareInitManager(com.google.common.base.Function<NodeMetadata,SshClient> sshFactory, boolean runAsRoot, NodeMetadata node, InitScriptConfigurationForTasks initScriptConfiguration, InitScript init)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
execScriptAsDefaultUser(String action)
String
getInitFile()
NodeMetadata
getNode()
InitScript
getStatement()
SudoAwareInitManager
init()
ExecResponse
refreshAndRunAction(String action)
ExecResponse
runAction(String action)
String
toString()
-
-
-
Field Detail
-
computeLogger
@Named("jclouds.compute") protected Logger computeLogger
-
logger
protected Logger logger
-
node
protected NodeMetadata node
-
initFile
protected final String initFile
-
init
protected final InitScript init
-
runAsRoot
protected final boolean runAsRoot
-
sshFactory
protected final com.google.common.base.Function<NodeMetadata,SshClient> sshFactory
-
ssh
protected SshClient ssh
-
-
Constructor Detail
-
SudoAwareInitManager
public SudoAwareInitManager(com.google.common.base.Function<NodeMetadata,SshClient> sshFactory, boolean runAsRoot, NodeMetadata node, InitScriptConfigurationForTasks initScriptConfiguration, InitScript init)
-
-
Method Detail
-
getInitFile
public String getInitFile()
- Returns:
- the absolute path to the file on disk relating to this task.
-
init
public SudoAwareInitManager init()
-
refreshAndRunAction
public ExecResponse refreshAndRunAction(String action)
-
runAction
public ExecResponse runAction(String action)
-
getNode
public NodeMetadata getNode()
-
getStatement
public InitScript getStatement()
-
-