Brooklyn

brooklyn.util.task.ssh
[Java] Class SshTasks

java.lang.Object
  brooklyn.util.task.ssh.SshTasks

@Beta
public class SshTasks

Conveniences for generating Task instances to perform SSH activities on an SshMachineLocation. See also SshEffectorTasks for inferring the SshMachineLocation from context.

Since:
0.6.0


Method Summary
static ProcessTaskFactory dontRequireTtyForSudo(SshMachineLocation machine, boolean requireSuccess)

creates a task which returns modifies sudoers to ensure non-tty access is permitted; also gives nice warnings if sudo is not permitted

static ProcessTaskFactory newSshExecTaskFactory(SshMachineLocation machine, java.lang.String... commands)

static SshFetchTaskFactory newSshFetchTaskFactory(SshMachineLocation machine, java.lang.String remoteFile)

static SshPutTaskFactory newSshPutTaskFactory(SshMachineLocation machine, java.lang.String remoteFile)

static Function returningStdoutLoggingInfo(Logger logger, boolean requireZero)

Function for use in ProcessTaskFactory#returning(Function)#returning(Function) which logs all information, optionally requires zero exit code, and then returns stdout

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Method Detail

dontRequireTtyForSudo

public static ProcessTaskFactory dontRequireTtyForSudo(SshMachineLocation machine, boolean requireSuccess)
creates a task which returns modifies sudoers to ensure non-tty access is permitted; also gives nice warnings if sudo is not permitted


newSshExecTaskFactory

public static ProcessTaskFactory newSshExecTaskFactory(SshMachineLocation machine, java.lang.String... commands)


newSshFetchTaskFactory

public static SshFetchTaskFactory newSshFetchTaskFactory(SshMachineLocation machine, java.lang.String remoteFile)


newSshPutTaskFactory

public static SshPutTaskFactory newSshPutTaskFactory(SshMachineLocation machine, java.lang.String remoteFile)


returningStdoutLoggingInfo

public static Function returningStdoutLoggingInfo(Logger logger, boolean requireZero)
Function for use in ProcessTaskFactory#returning(Function)#returning(Function) which logs all information, optionally requires zero exit code, and then returns stdout


 

Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.