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 命令的列表。