GceAvdInfo
public
class
GceAvdInfo
extends Object
| java.lang.Object | |
| ↳ | com.android.tradefed.device.cloud.GceAvdInfo |
Struttura per contenere i dati pertinenti per una determinata istanza AVD GCE.
Riepilogo
Classi nidificate | |
|---|---|
class |
GceAvdInfo.LogFileEntry
|
Campi | |
|---|---|
public
static
final
List<String> |
BUILD_VARS
|
Costruttori pubblici | |
|---|---|
GceAvdInfo(String instanceName, HostAndPort hostAndPort)
|
|
GceAvdInfo(String instanceName, HostAndPort hostAndPort, ErrorIdentifier errorType, String errors, GceAvdInfo.GceStatus status)
|
|
Metodi pubblici | |
|---|---|
HashMap<String, String>
|
getBuildVars()
Restituisce l'hash delle informazioni sulle variabili di build del dispositivo AVD GCE. |
Integer
|
getDeviceOffset()
|
ErrorIdentifier
|
getErrorType()
|
String
|
getErrors()
|
String
|
getInstanceUser()
|
List<GceAvdInfo.LogFileEntry>
|
getLogs()
Restituisce la mappa dai percorsi dei log locali o remoti ai tipi. |
String
|
getOxygenationDeviceId()
|
boolean
|
getSkipDeviceLogCollection()
|
GceAvdInfo.GceStatus
|
getStatus()
|
HostAndPort
|
hostAndPort()
|
String
|
instanceName()
|
boolean
|
isIpPreconfigured()
|
static
GceAvdInfo
|
parseGceInfoFromFile(File f, DeviceDescriptor descriptor, int remoteAdbPort)
Analizza un determinato file per ottenere le informazioni sul dispositivo GCE AVD. |
static
List<GceAvdInfo>
|
parseGceInfoFromOxygenClientOutput(CommandResult oxygenRes, TestDeviceOptions deviceOptions)
Analizza un output della riga di comando specificato dal binario del client Oxygen per ottenere informazioni sull'AVD in leasing. |
static
GceAvdInfo
|
parseGceInfoFromString(String data, DeviceDescriptor descriptor, int remoteAdbPort)
Analizza una determinata stringa per ottenere le informazioni sul dispositivo AVD GCE. |
void
|
setDeviceOffset(Integer deviceOffset)
|
void
|
setErrorType(ErrorIdentifier errorType)
|
void
|
setErrors(String errors)
|
void
|
setInstanceUser(String instanceUser)
|
void
|
setIpPreconfigured(boolean isIpPreconfigured)
|
void
|
setOxygenationDeviceId(String deviceId)
|
void
|
setSkipBugreportCollection(boolean skipDeviceLogCollection)
|
void
|
setSkipDeviceLogCollection(boolean skipDeviceLogCollection)
|
void
|
setStatus(GceAvdInfo.GceStatus status)
|
String
|
toString()
|
Campi
BUILD_VARS
public static final List<String> BUILD_VARS
Costruttori pubblici
GceAvdInfo
public GceAvdInfo (String instanceName,
HostAndPort hostAndPort)| Parametri | |
|---|---|
instanceName |
String |
hostAndPort |
HostAndPort |
GceAvdInfo
public GceAvdInfo (String instanceName,
HostAndPort hostAndPort,
ErrorIdentifier errorType,
String errors,
GceAvdInfo.GceStatus status)| Parametri | |
|---|---|
instanceName |
String |
hostAndPort |
HostAndPort |
errorType |
ErrorIdentifier |
errors |
String |
status |
GceAvdInfo.GceStatus |
Metodi pubblici
getBuildVars
public HashMap<String, String> getBuildVars ()
Restituisce l'hash delle informazioni sulle variabili di build del dispositivo AVD GCE.
Le chiavi delle variabili di build possibili sono descritte in BUILD_VARS, ad esempio: build_id, build_target, branch, kernel_build_id, kernel_build_target, kernel_branch, system_build_id, system_build_target, system_branch, emulator_build_id, emulator_build_target, emulator_branch.
| Resi | |
|---|---|
HashMap<String, String> |
|
getDeviceOffset
public Integer getDeviceOffset ()
| Resi | |
|---|---|
Integer |
|
getErrors
public String getErrors ()
| Resi | |
|---|---|
String |
|
getInstanceUser
public String getInstanceUser ()
| Resi | |
|---|---|
String |
|
getLogs
public List<GceAvdInfo.LogFileEntry> getLogs ()
Restituisce la mappa dai percorsi dei log locali o remoti ai tipi.
| Resi | |
|---|---|
List<GceAvdInfo.LogFileEntry> |
|
getOxygenationDeviceId
public String getOxygenationDeviceId ()
| Resi | |
|---|---|
String |
|
getSkipDeviceLogCollection
public boolean getSkipDeviceLogCollection ()
| Resi | |
|---|---|
boolean |
|
hostAndPort
public HostAndPort hostAndPort ()
| Resi | |
|---|---|
HostAndPort |
|
instanceName
public String instanceName ()
| Resi | |
|---|---|
String |
|
isIpPreconfigured
public boolean isIpPreconfigured ()
| Resi | |
|---|---|
boolean |
|
parseGceInfoFromFile
public static GceAvdInfo parseGceInfoFromFile (File f, DeviceDescriptor descriptor, int remoteAdbPort)
Analizza un determinato file per ottenere le informazioni sul dispositivo GCE AVD.
| Parametri | |
|---|---|
f |
File: file File per leggere l'output JSON da GCE Driver. |
descriptor |
DeviceDescriptor: il descrittore del dispositivo che richiede le informazioni. |
remoteAdbPort |
int: la porta remota da utilizzare per la connessione adb |
| Resi | |
|---|---|
GceAvdInfo |
il GceAvdInfo del dispositivo, se trovato, o null se si è verificato un errore. |
| Genera | |
|---|---|
TargetSetupError |
|
parseGceInfoFromOxygenClientOutput
public static List<GceAvdInfo> parseGceInfoFromOxygenClientOutput (CommandResult oxygenRes, TestDeviceOptions deviceOptions)
Analizza un output della riga di comando specificato dal binario del client Oxygen per ottenere informazioni sugli AVD in leasing.
| Parametri | |
|---|---|
oxygenRes |
CommandResult: il CommandResult dall'esecuzione del comando client Oxygen. |
deviceOptions |
TestDeviceOptions: il TestDeviceOptions che descrive le opzioni del dispositivo |
| Resi | |
|---|---|
List<GceAvdInfo> |
List dei dispositivi sono stati noleggiati correttamente. Genererà TargetSetupError
se non è stato possibile noleggiare un dispositivo. |
| Genera | |
|---|---|
TargetSetupError |
|
parseGceInfoFromString
public static GceAvdInfo parseGceInfoFromString (String data, DeviceDescriptor descriptor, int remoteAdbPort)
Analizza una determinata stringa per ottenere le informazioni sul dispositivo AVD GCE.
| Parametri | |
|---|---|
data |
String: stringa JSON. |
descriptor |
DeviceDescriptor: il descrittore del dispositivo che richiede le informazioni. |
remoteAdbPort |
int: la porta remota da utilizzare per la connessione adb |
| Resi | |
|---|---|
GceAvdInfo |
il GceAvdInfo del dispositivo, se trovato, o null se si è verificato un errore. |
| Genera | |
|---|---|
TargetSetupError |
|
setDeviceOffset
public void setDeviceOffset (Integer deviceOffset)
| Parametri | |
|---|---|
deviceOffset |
Integer |
setErrorType
public void setErrorType (ErrorIdentifier errorType)
| Parametri | |
|---|---|
errorType |
ErrorIdentifier |
setErrors
public void setErrors (String errors)
| Parametri | |
|---|---|
errors |
String |
setInstanceUser
public void setInstanceUser (String instanceUser)
| Parametri | |
|---|---|
instanceUser |
String |
setIpPreconfigured
public void setIpPreconfigured (boolean isIpPreconfigured)
| Parametri | |
|---|---|
isIpPreconfigured |
boolean |
setOxygenationDeviceId
public void setOxygenationDeviceId (String deviceId)
| Parametri | |
|---|---|
deviceId |
String |
setSkipBugreportCollection
public void setSkipBugreportCollection (boolean skipDeviceLogCollection)
| Parametri | |
|---|---|
skipDeviceLogCollection |
boolean |
setSkipDeviceLogCollection
public void setSkipDeviceLogCollection (boolean skipDeviceLogCollection)
| Parametri | |
|---|---|
skipDeviceLogCollection |
boolean |
toString
public String toString ()
| Resi | |
|---|---|
String |
|