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 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 選項添加的ERROR(/String)列表。可以為空。

user String

hostName String : 連接到 gce 設備的主機名。

remoteFile String : 要在遠程 gce 設備上獲取的文件。

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

mode GceRemoteCmdFormatter.ScpMode :我們是將本地文件推送到遠程還是拉取遠程

退貨
代表 gce 設備的 scp 命令的列表。

getSsh命令

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

基於某些參數為 gce 設備創建 ssh 命令的實用程序。

參數
sshKey File :ssh 密鑰ERROR(/File)

extraOptions :可以為額外的 ssh 選項添加的ERROR(/String)列表。可以為空。

user String

hostName String : 連接到 gce 設備的主機名。

command String :在 gce 設備上運行的實際命令。

退貨
代表 gce 設備的 ssh 命令的列表。