GceRemoteCmdFormatter

public class GceRemoteCmdFormatter
extends Object

java.lang.Object
com.android.tradefed.util.GceRemoteCmdFormatter


Classe di utilità per formattare i comandi per raggiungere un dispositivo GCE remoto.

Riepilogo

Costruttori pubblici

GceRemoteCmdFormatter()

Metodi pubblici

static List<String> getScpCommand(File sshKey, List<String> extraOptions, String user, String hostName, String remoteFile, String localFile, GceRemoteCmdFormatter.ScpMode mode)

Utilità per creare un comando scp per recuperare un file da un dispositivo GCE remoto.

static List<String> getSshCommand(File sshKey, List<String> extraOptions, String user, String hostName, String... command)

Utilità per creare un comando ssh per un dispositivo GCE in base ad alcuni parametri.

Costruttori pubblici

GceRemoteCmdFormatter

public GceRemoteCmdFormatter ()

Metodi pubblici

getScpCommand

public static List<String> getScpCommand (File sshKey, 
                List<String> extraOptions, 
                String user, 
                String hostName, 
                String remoteFile, 
                String localFile, 
                GceRemoteCmdFormatter.ScpMode mode)

Utilità per creare un comando scp per recuperare un file da un dispositivo GCE remoto.

Parametri
sshKey File: la chiave SSH File.

extraOptions List: un elenco di String che possono essere aggiunte per opzioni SSH aggiuntive. Può essere null.

user String

hostName String: il nome host a cui connettersi al dispositivo GCE.

remoteFile String: il file da recuperare sul dispositivo GCE remoto.

localFile String: il file locale in cui inserire il file remoto.

mode GceRemoteCmdFormatter.ScpMode: indica se stiamo eseguendo il push del file locale sul dispositivo remoto o il pull del file remoto

Resi
List<String> Un elenco che rappresenta il comando scp per un dispositivo GCE.

getSshCommand

public static List<String> getSshCommand (File sshKey, 
                List<String> extraOptions, 
                String user, 
                String hostName, 
                String... command)

Utilità per creare un comando ssh per un dispositivo GCE in base ad alcuni parametri.

Parametri
sshKey File: la chiave SSH File.

extraOptions List: un elenco di String che possono essere aggiunte per opzioni SSH aggiuntive. Può essere null.

user String

hostName String: il nome host a cui connettersi al dispositivo GCE.

command String: il comando effettivo da eseguire sul dispositivo GCE.

Resi
List<String> Un elenco che rappresenta il comando ssh per un dispositivo GCE.