GceRemoteCmdFormatter

public class GceRemoteCmdFormatter
extends Object

java.lang.Object
com.android.tradefed.device.cloud.GceRemoteCmdFormatter


用於格式化命令以到達遠程gce設備的實用程序類。

概括

嵌套類

enum GceRemoteCmdFormatter.ScpMode

根據args的結構,SCP可用於推入或拉出文件。

公共建設者

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

公開方法

getScpCommand

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 :可添加的String列表,用於額外的ssh選項。可以為null。

user String

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

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

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

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

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

getSshCommand

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

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

參數
sshKey File :ssh鍵ERROR(/File)

extraOptions :可添加的String列表,用於額外的ssh選項。可以為null。

user String

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

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

退貨
一個表示gce設備的ssh命令的列表。