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 staticgetScpCommand (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 staticgetSshCommand (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命令的列表。 |
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2019-10-02 (世界標準時間)。
[]
[]