RemoteSshUtil
public
class
RemoteSshUtil
extends Object
| java.lang.Object | |
| ↳ | com.android.tradefed.device.cloud.RemoteSshUtil |
用于在远程实例上执行 ssh 命令的实用程序。
摘要
公共构造函数 | |
|---|---|
RemoteSshUtil()
|
|
公共方法 | |
|---|---|
static
CommandResult
|
remoteSshCommandExec(GceAvdInfo remoteInstance, TestDeviceOptions options, IRunUtil runUtil, long timeoutMs, OutputStream stdout, OutputStream stderr, String... command)
使用 ssh 在远程实例上执行命令。 |
static
CommandResult
|
remoteSshCommandExec(GceAvdInfo remoteInstance, TestDeviceOptions options, IRunUtil runUtil, long timeoutMs, String... command)
使用 ssh 在远程实例上执行命令。 |
公共构造函数
RemoteSshUtil
public RemoteSshUtil ()
公共方法
remoteSshCommandExec
public static CommandResult remoteSshCommandExec (GceAvdInfo remoteInstance, TestDeviceOptions options, IRunUtil runUtil, long timeoutMs, OutputStream stdout, OutputStream stderr, String... command)
使用 ssh 在远程实例上执行命令。
| 参数 | |
|---|---|
remoteInstance |
GceAvdInfo:用于描述设备的 GceAvdInfo。 |
options |
TestDeviceOptions:一个 TestDeviceOptions,用于描述要为 GCE 设备使用的设备选项。 |
runUtil |
IRunUtil:用于执行命令的 IRunUtil。 |
timeoutMs |
long:提取完成所需的毫秒数 |
stdout |
OutputStream:用于记录标准输出的 ERROR(/OutputStream)。 |
stderr |
OutputStream:用于记录 stderr 的 ERROR(/OutputStream)。 |
command |
String:要执行的命令。 |
| 返回 | |
|---|---|
CommandResult |
包含状态和日志的 CommandResult。 |
remoteSshCommandExec
public static CommandResult remoteSshCommandExec (GceAvdInfo remoteInstance, TestDeviceOptions options, IRunUtil runUtil, long timeoutMs, String... command)
使用 ssh 在远程实例上执行命令。
| 参数 | |
|---|---|
remoteInstance |
GceAvdInfo:用于描述设备的 GceAvdInfo。 |
options |
TestDeviceOptions:一个 TestDeviceOptions,用于描述要为 GCE 设备使用的设备选项。 |
runUtil |
IRunUtil:用于执行命令的 IRunUtil。 |
timeoutMs |
long:提取完成所需的毫秒数 |
command |
String:要执行的命令。 |
| 返回 | |
|---|---|
CommandResult |
包含状态和日志的 CommandResult。 |