Starting March 27, 2025, we recommend using android-latest-release
instead of aosp-main
to build and contribute to AOSP. For more information, see Changes to AOSP.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-07-19 UTC."],[],[]]