Stay organized with collections
Save and categorize content based on your preferences.
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
Public methods |
static
|
getScpCommand(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.
|
static
|
getSshCommand(File sshKey, extraOptions, String user, String hostName, String... command)
Utility to create a ssh command for a gce device based on some parameters.
|
Public constructors
public GceRemoteCmdFormatter ()
Public methods
public static getScpCommand (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 static getSshCommand (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. |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2023-07-19 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{"lastModified": "Last updated 2023-07-19 UTC."}