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 ()

公共方法

获取Scp命令

public static  getScpCommand (File sshKey, 
                 extraOptions, 
                String user, 
                String hostName, 
                String remoteFile, 
                String localFile, 
                GceRemoteCmdFormatter.ScpMode mode)

用于创建 scp 命令以从远程 gce 设备获取文件的实用程序。

参数
sshKey File :ssh 密钥ERROR(/File)

extraOptions :可以添加额外 ssh 选项的String列表。可以为空。

user String

hostName String :连接到 gce 设备的主机名。

remoteFile String :要在远程 gce 设备上获取的文件。

localFile String : 本地文件放置远程文件的位置。

mode GceRemoteCmdFormatter.ScpMode :我们是将本地文件推送到远程还是拉取远程

退货
表示 gce 设备的 scp 命令的列表。

获取Ssh命令

public static  getSshCommand (File sshKey, 
                 extraOptions, 
                String user, 
                String hostName, 
                String... command)

用于根据某些参数为 gce 设备创建 ssh 命令的实用程序。

参数
sshKey File :ssh 密钥ERROR(/File)

extraOptions :可以添加额外 ssh 选项的String列表。可以为空。

user String

hostName String :连接到 gce 设备的主机名。

command String :在 gce 设备上运行的实际命令。

退货
表示 gce 设备的 ssh 命令的列表。