GceRemoteCmdFormatter
public class GceRemoteCmdFormatter
extends Object
java.lang.Object | |
↳ | com.android.tradefed.device.cloud.GceRemoteCmdFormatter |
用于格式化命令以到达远程 gce 设备的实用程序类。
概括
公共构造函数 | |
---|---|
GceRemoteCmdFormatter () |
公共方法 | |
---|---|
static | getScpCommand (File sshKey, extraOptions, String user, String hostName, String remoteFile, String localFile, GceRemoteCmdFormatter.ScpMode mode) getScpCommand (File sshKey, extraOptions, String user, String hostName, String remoteFile, String localFile, GceRemoteCmdFormatter.ScpMode mode) 用于创建 scp 命令以从远程 gce 设备获取文件的实用程序。 |
static | getSshCommand (File sshKey, extraOptions, String user, String hostName, String... command) getSshCommand (File sshKey, extraOptions, String user, String hostName, String... command) 基于某些参数为 gce 设备创建 ssh 命令的实用程序。 |
公共构造函数
GceRemoteCmdFormatter
public GceRemoteCmdFormatter ()
公共方法
getScp命令
public staticgetScpCommand (File sshKey, extraOptions, String user, String hostName, String remoteFile, String localFile, GceRemoteCmdFormatter.ScpMode mode)
用于创建 scp 命令以从远程 gce 设备获取文件的实用程序。
参数 | |
---|---|
sshKey | File :ssh 密钥ERROR(/File) 。 |
extraOptions | ERROR(/String) 列表。可以为空。 |
user | String |
hostName | String : 连接到 gce 设备的主机名。 |
remoteFile | String : 要在远程 gce 设备上获取的文件。 |
localFile | String : 放置远程文件的本地文件。 |
mode | GceRemoteCmdFormatter.ScpMode :我们是将本地文件推送到远程还是拉取远程 |
退货 | |
---|---|
代表 gce 设备的 scp 命令的列表。 |
getSsh命令
public staticgetSshCommand (File sshKey, extraOptions, String user, String hostName, String... command)
基于某些参数为 gce 设备创建 ssh 命令的实用程序。
参数 | |
---|---|
sshKey | File :ssh 密钥ERROR(/File) 。 |
extraOptions | ERROR(/String) 列表。可以为空。 |
user | String |
hostName | String : 连接到 gce 设备的主机名。 |
command | String :在 gce 设备上运行的实际命令。 |
退货 | |
---|---|
代表 gce 设备的 ssh 命令的列表。 |