GceAvdInfo

public class GceAvdInfo
extends Object

java.lang.Object
   ↳ com.android.tradefed.device.cloud.GceAvdInfo


用於保留特定 GCE AVD 執行個體相關資料的結構。

摘要

巢狀類別

class GceAvdInfo.LogFileEntry

 

欄位

public static final BUILD_VARS

公用建構函式

GceAvdInfo(String instanceName, HostAndPort hostAndPort)
GceAvdInfo(String instanceName, HostAndPort hostAndPort, ErrorIdentifier errorType, String errors, GceAvdInfo.GceStatus status)

公用方法

getBuildVars()

傳回 GCE AVD 裝置的建構變數資訊雜湊。

Integer getDeviceOffset()
ErrorIdentifier getErrorType()
String getErrors()
String getInstanceUser()
getLogs()

從本機或遠端記錄路徑將地圖傳回類型。

String getOxygenationDeviceId()
boolean getSkipDeviceLogCollection()
GceAvdInfo.GceStatus getStatus()
HostAndPort hostAndPort()
String instanceName()
boolean isIpPreconfigured()
boolean isOxygenationDevice()
static GceAvdInfo parseGceInfoFromFile(File f, DeviceDescriptor descriptor, int remoteAdbPort)

剖析指定檔案,取得 GCE AVD 裝置資訊。

static parseGceInfoFromOxygenClientOutput(CommandResult oxygenRes, int remoteAdbPort)

剖析 Oxygen 用戶端二進位檔中的特定指令列輸出內容,取得已租用的 AVD 資訊。

static GceAvdInfo parseGceInfoFromString(String data, DeviceDescriptor descriptor, int remoteAdbPort)

剖析指定字串,取得 GCE AVD 裝置資訊。

void setDeviceOffset(Integer deviceOffset)
void setErrorType(ErrorIdentifier errorType)
void setErrors(String errors)
void setInstanceUser(String instanceUser)
void setIpPreconfigured(boolean isIpPreconfigured)
void setSkipBugreportCollection(boolean skipDeviceLogCollection)
void setSkipDeviceLogCollection(boolean skipDeviceLogCollection)
void setStatus(GceAvdInfo.GceStatus status)
String toString()

欄位

版本變數

public static final  BUILD_VARS

公用建構函式

GceAvdInfo

public GceAvdInfo (String instanceName, 
                HostAndPort hostAndPort)

參數
instanceName String

hostAndPort HostAndPort

GceAvdInfo

public GceAvdInfo (String instanceName, 
                HostAndPort hostAndPort, 
                ErrorIdentifier errorType, 
                String errors, 
                GceAvdInfo.GceStatus status)

參數
instanceName String

hostAndPort HostAndPort

errorType ErrorIdentifier

errors String

status GceAvdInfo.GceStatus

公用方法

getBuildVars

public  getBuildVars ()

傳回 GCE AVD 裝置的建構變數資訊雜湊。

「BUILD_VARS」中會說明可能的建構變數金鑰,例如:build_id、build_target、分支版本、kernel_build_id、kernel_build_target、kernel_branch、system_build_id、system_build_target、system_branch、 emulator_build_id、 emulator_build_target、 emulator_branch。

傳回

getDeviceOffset

public Integer getDeviceOffset ()

傳回
Integer

getErrorType

public ErrorIdentifier getErrorType ()

傳回
ErrorIdentifier

getErrors

public String getErrors ()

傳回
String

getInstanceUser

public String getInstanceUser ()

傳回
String

getLogs

public  getLogs ()

從本機或遠端記錄路徑將地圖傳回型別。

傳回

getOxygenationDeviceId

public String getOxygenationDeviceId ()

傳回
String

getSkipDeviceLogCollection

public boolean getSkipDeviceLogCollection ()

傳回
boolean

getStatus

public GceAvdInfo.GceStatus getStatus ()

傳回
GceAvdInfo.GceStatus

主機 AndPort

public HostAndPort hostAndPort ()

傳回
HostAndPort

執行個體名稱

public String instanceName ()

傳回
String

isIpPre 設定

public boolean isIpPreconfigured ()

傳回
boolean

isOxygenationDevice

public boolean isOxygenationDevice ()

傳回
boolean

parseGceInfoFromFile

public static GceAvdInfo parseGceInfoFromFile (File f, 
                DeviceDescriptor descriptor, 
                int remoteAdbPort)

剖析指定檔案,取得 GCE AVD 裝置資訊。

參數
f FileERROR(/File) 檔案,用於讀取 GCE 驅動程式的 JSON 輸出。

descriptor DeviceDescriptor:需要資訊的裝置描述元。

remoteAdbPort int:應用於 ADB 連線的遠端通訊埠

傳回
GceAvdInfo 裝置的 GceAvdInfo (如果有的話);如果發生錯誤,則為空值。

擲回
TargetSetupError

parseGceInfoFromOxygenClientOutput

public static  parseGceInfoFromOxygenClientOutput (CommandResult oxygenRes, 
                int remoteAdbPort)

剖析 Oxygen 用戶端二進位檔中的指定指令列輸出內容,取得已租用的 AVD 資訊。

參數
oxygenRes CommandResult:Oxygen 用戶端指令執行作業中的 CommandResult

remoteAdbPort int:應用於 ADB 連線的遠端通訊埠

傳回
已成功釋出 ERROR(/List) 的裝置。如果無法租用裝置,就會擲回 TargetSetupError

擲回
TargetSetupError

parseGceInfoFromString

public static GceAvdInfo parseGceInfoFromString (String data, 
                DeviceDescriptor descriptor, 
                int remoteAdbPort)

剖析指定字串,取得 GCE AVD 裝置資訊。

參數
data String:JSON 字串。

descriptor DeviceDescriptor:需要資訊的裝置描述元。

remoteAdbPort int:應用於 ADB 連線的遠端通訊埠

傳回
GceAvdInfo 裝置的 GceAvdInfo (如果有的話);如果發生錯誤,則為空值。

擲回
TargetSetupError

setDeviceOffset

public void setDeviceOffset (Integer deviceOffset)

參數
deviceOffset Integer

setErrorType

public void setErrorType (ErrorIdentifier errorType)

參數
errorType ErrorIdentifier

setErrors

public void setErrors (String errors)

參數
errors String

setInstanceUser

public void setInstanceUser (String instanceUser)

參數
instanceUser String

setIpPre 設定

public void setIpPreconfigured (boolean isIpPreconfigured)

參數
isIpPreconfigured boolean

setSkipBugreportCollection

public void setSkipBugreportCollection (boolean skipDeviceLogCollection)

參數
skipDeviceLogCollection boolean

setSkipDeviceLogCollection

public void setSkipDeviceLogCollection (boolean skipDeviceLogCollection)

參數
skipDeviceLogCollection boolean

設定狀態

public void setStatus (GceAvdInfo.GceStatus status)

參數
status GceAvdInfo.GceStatus

toString

public String toString ()

傳回
String