Thông tin GceAvd

public class GceAvdInfo
extends Object

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


Cấu trúc để lưu giữ dữ liệu liên quan cho một phiên bản AVD GCE nhất định.

Tóm tắt

Lớp lồng ghép

class GceAvdInfo.LogFileEntry

 

Trường

public static final BUILD_VARS

Hàm khởi tạo công khai

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

Phương thức công khai

getBuildVars()

Trả về hàm băm thông tin biến bản dựng của thiết bị AVD GCE.

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

Trả về các loại từ đường dẫn nhật ký cục bộ hoặc từ xa.

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

Phân tích cú pháp một tệp nhất định để lấy thông tin thiết bị AVD GCE.

static parseGceInfoFromOxygenClientOutput(CommandResult oxygenRes, int remoteAdbPort)

Phân tích cú pháp một đầu ra dòng lệnh nhất định từ tệp nhị phân của ứng dụng Oxygen để lấy thông tin AVD đã thuê.

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

Phân tích cú pháp một chuỗi nhất định để lấy thông tin thiết bị AVD GCE.

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()

Trường

XÂY DỰNG_VARS

public static final  BUILD_VARS

Hàm khởi tạo công khai

Thông tin GceAvd

public GceAvdInfo (String instanceName, 
                HostAndPort hostAndPort)

Tham số
instanceName String

hostAndPort HostAndPort

Thông tin GceAvd

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

Tham số
instanceName String

hostAndPort HostAndPort

errorType ErrorIdentifier

errors String

status GceAvdInfo.GceStatus

Phương thức công khai

Hàm getBuildVar

public  getBuildVars ()

Trả về hàm băm thông tin biến bản dựng của thiết bị AVD GCE.

Các khoá biến thể bản dựng có thể dùng được mô tả trong BUILD_VARS, ví dụ: build_id, build_target, chi nhánh, kernel_build_id, kernel_build_target, kernel_branch, system_build_id, system_build_target, system_branch, emulator_build_id, emulator_build_target, trình mô phỏng_branch.

Giá trị trả về

getDeviceOffset

public Integer getDeviceOffset ()

Giá trị trả về
Integer

nhận loại lỗi

public ErrorIdentifier getErrorType ()

Giá trị trả về
ErrorIdentifier

lỗi nhận

public String getErrors ()

Giá trị trả về
String

getInstanceUser

public String getInstanceUser ()

Giá trị trả về
String

getLog

public  getLogs ()

Trả về các loại từ đường dẫn nhật ký cục bộ hoặc từ xa.

Giá trị trả về

Mã thiết bị nhậnOxygenation

public String getOxygenationDeviceId ()

Giá trị trả về
String

getSkipDeviceLogCollection

public boolean getSkipDeviceLogCollection ()

Giá trị trả về
boolean

getStatus

public GceAvdInfo.GceStatus getStatus ()

Giá trị trả về
GceAvdInfo.GceStatus

lưu trữ vàCổng

public HostAndPort hostAndPort ()

Giá trị trả về
HostAndPort

tên thực thể

public String instanceName ()

Giá trị trả về
String

isIpĐược định cấu hình sẵn

public boolean isIpPreconfigured ()

Giá trị trả về
boolean

Thiết bị oxy

public boolean isOxygenationDevice ()

Giá trị trả về
boolean

phân tích cú phápGceInfoFromFile

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

Phân tích cú pháp một tệp nhất định để lấy thông tin thiết bị AVD GCE.

Tham số
f File: tệp ERROR(/File) để đọc kết quả JSON từ Trình điều khiển GCE.

descriptor DeviceDescriptor: mã mô tả của thiết bị cần thông tin.

remoteAdbPort int: cổng từ xa nên được sử dụng cho kết nối adb

Giá trị trả về
GceAvdInfo GceAvdInfo của thiết bị nếu tìm thấy hoặc rỗng nếu có lỗi.

Gửi
TargetSetupError

parseGceInfoTừOxygenClientOutput

public static  parseGceInfoFromOxygenClientOutput (CommandResult oxygenRes, 
                int remoteAdbPort)

Phân tích cú pháp một đầu ra dòng lệnh nhất định từ tệp nhị phân của ứng dụng Oxygen để lấy thông tin AVD đã thuê.

Tham số
oxygenRes CommandResult: CommandResult trong quá trình thực thi lệnh ứng dụng Oxy.

remoteAdbPort int: cổng từ xa nên được sử dụng cho kết nối adb

Giá trị trả về
Đã cho thuê thành công ERROR(/List) thiết bị. Sẽ gửi TargetSetupError nếu không cho thuê thiết bị.

Gửi
TargetSetupError

phân tích cú phápGceInfoFromString

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

Phân tích cú pháp một chuỗi nhất định để lấy thông tin thiết bị AVD GCE.

Tham số
data String: Chuỗi JSON.

descriptor DeviceDescriptor: mã mô tả của thiết bị cần thông tin.

remoteAdbPort int: cổng từ xa nên được sử dụng cho kết nối adb

Giá trị trả về
GceAvdInfo GceAvdInfo của thiết bị nếu tìm thấy hoặc rỗng nếu có lỗi.

Gửi
TargetSetupError

setDeviceOffset

public void setDeviceOffset (Integer deviceOffset)

Tham số
deviceOffset Integer

Loại lỗi đặt

public void setErrorType (ErrorIdentifier errorType)

Tham số
errorType ErrorIdentifier

Lỗi set

public void setErrors (String errors)

Tham số
errors String

setInstanceUser

public void setInstanceUser (String instanceUser)

Tham số
instanceUser String

Đã định cấu hình sẵn

public void setIpPreconfigured (boolean isIpPreconfigured)

Tham số
isIpPreconfigured boolean

setSkipBugreportCollection

public void setSkipBugreportCollection (boolean skipDeviceLogCollection)

Tham số
skipDeviceLogCollection boolean

setSkipDeviceLogCollection

public void setSkipDeviceLogCollection (boolean skipDeviceLogCollection)

Tham số
skipDeviceLogCollection boolean

setStatus

public void setStatus (GceAvdInfo.GceStatus status)

Tham số
status GceAvdInfo.GceStatus

toString

public String toString ()

Giá trị trả về
String