GceAvdInfo
public
class
GceAvdInfo
extends Object
| java.lang.Object | |
| ↳ | com.android.tradefed.device.cloud.GceAvdInfo |
Struktur zum Speichern relevanter Daten für eine bestimmte GCE-AVD-Instanz.
Zusammenfassung
Verschachtelte Klassen | |
|---|---|
class |
GceAvdInfo.LogFileEntry
|
Felder | |
|---|---|
public
static
final
|
BUILD_VARS
|
Öffentliche Konstruktoren | |
|---|---|
GceAvdInfo(String instanceName, HostAndPort hostAndPort)
|
|
GceAvdInfo(String instanceName, HostAndPort hostAndPort, ErrorIdentifier errorType, String errors, GceAvdInfo.GceStatus status)
|
|
Öffentliche Methoden | |
|---|---|
|
getBuildVars()
Gibt den Hash der Buildvariableninformationen des GCE-AVD-Geräts zurück. |
Integer
|
getDeviceOffset()
|
ErrorIdentifier
|
getErrorType()
|
String
|
getErrors()
|
String
|
getInstanceUser()
|
|
getLogs()
Die Zuordnung von lokalen oder Remote-Protokollpfaden zu Typen zurückgeben. |
String
|
getOxygenationDeviceId()
|
boolean
|
getSkipDeviceLogCollection()
|
GceAvdInfo.GceStatus
|
getStatus()
|
HostAndPort
|
hostAndPort()
|
String
|
instanceName()
|
boolean
|
isIpPreconfigured()
|
static
GceAvdInfo
|
parseGceInfoFromFile(File f, DeviceDescriptor descriptor, int remoteAdbPort)
Eine bestimmte Datei parsen, um die Geräteinformationen der GCE-AVD zu erhalten |
static
|
parseGceInfoFromOxygenClientOutput(CommandResult oxygenRes, TestDeviceOptions deviceOptions)
Eine bestimmte Befehlszeilenausgabe aus der Oxygen-Client-Binärdatei parsen, um Informationen zu gelicheten AVDs zu erhalten. |
static
GceAvdInfo
|
parseGceInfoFromString(String data, DeviceDescriptor descriptor, int remoteAdbPort)
Einen bestimmten String parsen, um die GCE-AVD-Geräteinformationen zu erhalten. |
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()
|
Felder
BUILD_VARS
public static finalBUILD_VARS
Öffentliche Konstruktoren
GceAvdInfo
public GceAvdInfo (String instanceName,
HostAndPort hostAndPort)| Parameter | |
|---|---|
instanceName |
String |
hostAndPort |
HostAndPort |
GceAvdInfo
public GceAvdInfo (String instanceName,
HostAndPort hostAndPort,
ErrorIdentifier errorType,
String errors,
GceAvdInfo.GceStatus status)| Parameter | |
|---|---|
instanceName |
String |
hostAndPort |
HostAndPort |
errorType |
ErrorIdentifier |
errors |
String |
status |
GceAvdInfo.GceStatus |
Öffentliche Methoden
getBuildVars
publicgetBuildVars ()
Gibt den Hash der Buildvariableninformationen des GCE-AVD-Geräts zurück.
Mögliche Schlüssel für Build-Variablen werden in BUILD_VARS beschrieben, z. B.: 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.
| Returns | |
|---|---|
|
|
getDeviceOffset
public Integer getDeviceOffset ()
| Returns | |
|---|---|
Integer |
|
getErrors
public String getErrors ()
| Returns | |
|---|---|
String |
|
getInstanceUser
public String getInstanceUser ()
| Returns | |
|---|---|
String |
|
getLogs
publicgetLogs ()
Die Zuordnung von lokalen oder Remote-Protokollpfaden zu Typen zurückgeben.
| Returns | |
|---|---|
|
|
getOxygenationDeviceId
public String getOxygenationDeviceId ()
| Returns | |
|---|---|
String |
|
getSkipDeviceLogCollection
public boolean getSkipDeviceLogCollection ()
| Returns | |
|---|---|
boolean |
|
hostAndPort
public HostAndPort hostAndPort ()
| Returns | |
|---|---|
HostAndPort |
|
instanceName
public String instanceName ()
| Returns | |
|---|---|
String |
|
isIpPreconfigured
public boolean isIpPreconfigured ()
| Returns | |
|---|---|
boolean |
|
parseGceInfoFromFile
public static GceAvdInfo parseGceInfoFromFile (File f, DeviceDescriptor descriptor, int remoteAdbPort)
Eine bestimmte Datei parsen, um die Geräteinformationen der GCE-AVD zu erhalten
| Parameter | |
|---|---|
f |
File: ERROR(/File)-Datei zum Lesen der JSON-Ausgabe aus dem GCE-Treiber. |
descriptor |
DeviceDescriptor: den Deskriptor des Geräts, für das die Informationen benötigt werden. |
remoteAdbPort |
int: der Remote-Port, der für die adb-Verbindung verwendet werden soll |
| Returns | |
|---|---|
GceAvdInfo |
die GceAvdInfo des Geräts, falls es gefunden wurde, oder „null“, falls ein Fehler aufgetreten ist. |
| Ausgabe | |
|---|---|
TargetSetupError |
|
parseGceInfoFromOxygenClientOutput
public staticparseGceInfoFromOxygenClientOutput (CommandResult oxygenRes, TestDeviceOptions deviceOptions)
Eine bestimmte Befehlszeilenausgabe aus der Oxygen-Client-Binärdatei parsen, um Informationen zu gelicheten AVDs zu erhalten.
| Parameter | |
|---|---|
oxygenRes |
CommandResult: CommandResult aus der Ausführung des Oxygen-Clientbefehls. |
deviceOptions |
TestDeviceOptions: die TestDeviceOptions, die die Geräteoptionen beschreibt |
| Returns | |
|---|---|
|
ERROR(/List) der Geräte wurden erfolgreich geleast. Wird TargetSetupError geworfen, wenn ein Gerät nicht geleast werden konnte. |
| Ausgabe | |
|---|---|
TargetSetupError |
|
parseGceInfoFromString
public static GceAvdInfo parseGceInfoFromString (String data, DeviceDescriptor descriptor, int remoteAdbPort)
Einen bestimmten String parsen, um die GCE-AVD-Geräteinformationen zu erhalten.
| Parameter | |
|---|---|
data |
String: JSON-String. |
descriptor |
DeviceDescriptor: den Deskriptor des Geräts, für das die Informationen benötigt werden. |
remoteAdbPort |
int: der Remote-Port, der für die adb-Verbindung verwendet werden soll |
| Returns | |
|---|---|
GceAvdInfo |
die GceAvdInfo des Geräts, falls es gefunden wurde, oder „null“, falls ein Fehler aufgetreten ist. |
| Ausgabe | |
|---|---|
TargetSetupError |
|
setDeviceOffset
public void setDeviceOffset (Integer deviceOffset)
| Parameter | |
|---|---|
deviceOffset |
Integer |
setErrorType
public void setErrorType (ErrorIdentifier errorType)
| Parameter | |
|---|---|
errorType |
ErrorIdentifier |
setErrors
public void setErrors (String errors)
| Parameter | |
|---|---|
errors |
String |
setInstanceUser
public void setInstanceUser (String instanceUser)
| Parameter | |
|---|---|
instanceUser |
String |
setIpPreconfigured
public void setIpPreconfigured (boolean isIpPreconfigured)
| Parameter | |
|---|---|
isIpPreconfigured |
boolean |
setOxygenationDeviceId
public void setOxygenationDeviceId (String deviceId)
| Parameter | |
|---|---|
deviceId |
String |
setSkipBugreportCollection
public void setSkipBugreportCollection (boolean skipDeviceLogCollection)
| Parameter | |
|---|---|
skipDeviceLogCollection |
boolean |
setSkipDeviceLogCollection
public void setSkipDeviceLogCollection (boolean skipDeviceLogCollection)
| Parameter | |
|---|---|
skipDeviceLogCollection |
boolean |
toString
public String toString ()
| Returns | |
|---|---|
String |
|