GceRemoteCmdFormatter
public
class
GceRemoteCmdFormatter
extends Object
java.lang.Object | |
↳ | com.android.tradefed.device.cloud.GceRemoteCmdFormatter |
Utility class to format commands to reach a remote gce device.
Summary
Nested classes | |
---|---|
enum |
GceRemoteCmdFormatter.ScpMode
SCP can be used to push or pull file depending of the structure of the args. |
Public constructors | |
---|---|
GceRemoteCmdFormatter()
|
Public methods | |
---|---|
static
|
getScpCommand(File sshKey,
Utility to create a scp command to fetch a file from a remote gce device. |
static
|
getSshCommand(File sshKey,
Utility to create a ssh command for a gce device based on some parameters. |
Public constructors
GceRemoteCmdFormatter
public GceRemoteCmdFormatter ()
Public methods
getScpCommand
public staticgetScpCommand (File sshKey, extraOptions, String user, String hostName, String remoteFile, String localFile, GceRemoteCmdFormatter.ScpMode mode)
Utility to create a scp command to fetch a file from a remote gce device.
Parameters | |
---|---|
sshKey |
File : the ssh key ERROR(/File) . |
extraOptions |
: a List of String that can be added for extra ssh options. can be
null. |
user |
String |
hostName |
String : the hostname where to connect to the gce device. |
remoteFile |
String : the file to be fetched on the remote gce device. |
localFile |
String : the local file where to put the remote file. |
mode |
GceRemoteCmdFormatter.ScpMode : whether we are pushing the local file to the remote or pulling the remote |
Returns | |
---|---|
|
a list representing the scp command for a gce device. |
getSshCommand
public staticgetSshCommand (File sshKey, extraOptions, String user, String hostName, String... command)
Utility to create a ssh command for a gce device based on some parameters.
Parameters | |
---|---|
sshKey |
File : the ssh key ERROR(/File) . |
extraOptions |
: a List of String that can be added for extra ssh options. can be
null. |
user |
String |
hostName |
String : the hostname where to connect to the gce device. |
command |
String : the actual command to run on the gce device. |
Returns | |
---|---|
|
a list representing the ssh command for a gce device. |
इस पेज पर मौजूद कॉन्टेंट और कोड सैंपल कॉन्टेंट के लाइसेंस में बताए गए लाइसेंस के हिसाब से हैं. Java और OpenJDK, Oracle और/या इससे जुड़ी हुई कंपनियों के ट्रेडमार्क या रजिस्टर किए हुए ट्रेडमार्क हैं.
आखिरी बार 2019-10-02 (UTC) को अपडेट किया गया.