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. |
Le contenu et les exemples de code de cette page sont soumis aux licences décrites dans la Licence de contenu. Java et OpenJDK sont des marques ou des marques déposées d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2019/10/02 (UTC).