Thông tin GceAvd

public class GceAvdInfo
extends Object

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


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

Bản tóm tắt

Các lớp lồng nhau

class GceAvdInfo.LogFileEntry

Lĩnh vực

public static final BUILD_VARS

Nhà thầu xây dựng công cộng

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

Phương pháp công khai

getBuildVars ()

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

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

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

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

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

static parseGceInfoFromOxygenClientOutput ( CommandResult oxygenRes, int remoteAdbPort)

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

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

Phân tích một chuỗi nhất định để lấy thông tin thiết bị 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 skipBugreportCollection)
void setStatus ( GceAvdInfo.GceStatus status)
String toString ()

Lĩnh vực

BUILD_VARS

public static final  BUILD_VARS

Nhà thầu xây dựng công cộng

Thông tin GceAvd

public GceAvdInfo (String instanceName, 
                HostAndPort hostAndPort)

Thông số
instanceName String

hostAndPort HostAndPort

Thông tin GceAvd

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

Thông số
instanceName String

hostAndPort HostAndPort

errorType ErrorIdentifier

errors String

status GceAvdInfo.GceStatus

Phương pháp công khai

getBuildVars

public  getBuildVars ()

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

Các khóa biến xây dựng có thể có được mô tả trong BUILD_VARS, ví dụ: build_id, build_target, nhánh, kernel_build_id, kernel_build_target, kernel_branch, system_build_id, system_build_target, system_branch, emulator_build_id, emulator_build_target, emulator_branch.

Trả lại

getDeviceOffset

public Integer getDeviceOffset ()

Trả lại
Integer

getErrorType

public ErrorIdentifier getErrorType ()

Trả lại
ErrorIdentifier

nhận được lỗi

public String getErrors ()

Trả lại
String

getInstanceUser

public String getInstanceUser ()

Trả lại
String

lấy Nhật ký

public  getLogs ()

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

Trả lại

getSkipBugreportBộ sưu tập

public boolean getSkipBugreportCollection ()

Trả lại
boolean

nhận được trạng thái

public GceAvdInfo.GceStatus getStatus ()

Trả lại
GceAvdInfo.GceStatus

máy chủAndPort

public HostAndPort hostAndPort ()

Trả lại
HostAndPort

tên cá thể

public String instanceName ()

Trả lại
String

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

public boolean isIpPreconfigured ()

Trả lại
boolean

phân tích cú phápGceInfoFromFile

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

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

Thông số
f File : Tệp ERROR(/File) để đọc đầu ra JSON từ Trình điều khiển GCE.

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

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

Trả lại
GceAvdInfo GceAvdInfo của thiết bị nếu tìm thấy hoặc null nếu có lỗi.

Ném
TargetSetupError

phân tích cú phápGceInfoFromOxygenClientOutput

public static  parseGceInfoFromOxygenClientOutput (CommandResult oxygenRes, 
                int remoteAdbPort)

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

Thông số
oxygenRes CommandResult : CommandResult từ việc thực thi lệnh của máy khách Oxygen.

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

Trả lại
ERROR(/List) của các thiết bị được thuê thành công. Sẽ ném TargetSetupError nếu không thuê được thiết bị.

Ném
TargetSetupError

phân tích cú phápGceInfoFromString

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

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

Thông số
data String : chuỗi JSON.

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

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

Trả lại
GceAvdInfo GceAvdInfo của thiết bị nếu tìm thấy hoặc null nếu có lỗi.

Ném
TargetSetupError

setDeviceOffset

public void setDeviceOffset (Integer deviceOffset)

Thông số
deviceOffset Integer

setErrorType

public void setErrorType (ErrorIdentifier errorType)

Thông số
errorType ErrorIdentifier

setErrors

public void setErrors (String errors)

Thông số
errors String

setInstanceUser

public void setInstanceUser (String instanceUser)

Thông số
instanceUser String

setIpĐược cấu hình sẵn

public void setIpPreconfigured (boolean isIpPreconfigured)

Thông số
isIpPreconfigured boolean

setSkipBugreportBộ sưu tập

public void setSkipBugreportCollection (boolean skipBugreportCollection)

Thông số
skipBugreportCollection boolean

setStatus

public void setStatus (GceAvdInfo.GceStatus status)

Thông số
status GceAvdInfo.GceStatus

toString

public String toString ()

Trả lại
String