org.jclouds.compute.callables
Class SudoAwareInitManager

java.lang.Object
  extended by org.jclouds.compute.callables.SudoAwareInitManager
Direct Known Subclasses:
RunScriptOnNodeAsInitScriptUsingSsh

public class SudoAwareInitManager
extends Object

Author:
Adrian Cole

Field Summary
protected  Logger computeLogger
           
protected  InitBuilder init
           
protected  Logger logger
           
protected  NodeMetadata node
           
protected  boolean runAsRoot
           
protected  SshClient ssh
           
protected  com.google.common.base.Function<NodeMetadata,SshClient> sshFactory
           
 
Constructor Summary
SudoAwareInitManager(com.google.common.base.Function<NodeMetadata,SshClient> sshFactory, boolean runAsRoot, NodeMetadata node, InitBuilder init)
           
 
Method Summary
protected  String execScriptAsDefaultUser(String action)
           
 NodeMetadata getNode()
           
 InitBuilder getStatement()
           
 SudoAwareInitManager init()
           
 ExecResponse refreshAndRunAction(String action)
           
 ExecResponse runAction(String action)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

computeLogger

@Named(value="jclouds.compute")
protected Logger computeLogger

logger

protected Logger logger

node

protected NodeMetadata node

init

protected final InitBuilder 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,
                            InitBuilder init)
Method Detail

init

@PostConstruct
public SudoAwareInitManager init()

refreshAndRunAction

public ExecResponse refreshAndRunAction(String action)

runAction

public ExecResponse runAction(String action)

execScriptAsDefaultUser

protected String execScriptAsDefaultUser(String action)

getNode

public NodeMetadata getNode()

toString

public String toString()
Overrides:
toString in class Object

getStatement

public InitBuilder getStatement()


Copyright © 2009-2011 jclouds. All Rights Reserved.