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 staticgetScpCommand (File sshKey, extraOptions, String user, String hostName, String remoteFile, String localFile, GceRemoteCmdFormatter.ScpMode mode)
用於建立 scp 命令以從遠端 gce 裝置取得檔案的實用程式。
參數 | |
---|---|
sshKey | File :ssh 密鑰ERROR(/File) 。 |
extraOptions | String 清單。可以為空。 |
user | String |
hostName | String :連接 gce 裝置的主機名稱。 |
remoteFile | String :要在遠端 gce 裝置上取得的檔案。 |
localFile | String : 本機檔案放置遠端檔案的位置。 |
mode | GceRemoteCmdFormatter.ScpMode :我們是將本機檔案推送到遠端還是拉取遠端 |
退貨 | |
---|---|
表示 gce 設備的 scp 指令的清單。 |
取得Ssh命令
public staticgetSshCommand (File sshKey, extraOptions, String user, String hostName, String... command)
用於根據某些參數為 gce 裝置建立 ssh 命令的實用程式。
參數 | |
---|---|
sshKey | File :ssh 密鑰ERROR(/File) 。 |
extraOptions | String 清單。可以為空。 |
user | String |
hostName | String :連接 gce 裝置的主機名稱。 |
command | String :在 gce 裝置上執行的實際命令。 |
退貨 | |
---|---|
表示 gce 設備的 ssh 指令的清單。 |