GceAvdInfo
public
class
GceAvdInfo
extends Object
| java.lang.Object | |
| ↳ | com.android.tradefed.device.cloud.GceAvdInfo |
特定の GCE AVD インスタンスの関連データを保持する構造体。
概要
ネストされたクラス | |
|---|---|
class |
GceAvdInfo.LogFileEntry
|
フィールド | |
|---|---|
public
static
final
List<String> |
BUILD_VARS
|
パブリック コンストラクタ | |
|---|---|
GceAvdInfo(String instanceName, HostAndPort hostAndPort)
|
|
GceAvdInfo(String instanceName, HostAndPort hostAndPort, ErrorIdentifier errorType, String errors, GceAvdInfo.GceStatus status)
|
|
パブリック メソッド | |
|---|---|
HashMap<String, String>
|
getBuildVars()
GCE AVD デバイスのビルド変数情報ハッシュを返します。 |
Integer
|
getDeviceOffset()
|
ErrorIdentifier
|
getErrorType()
|
String
|
getErrors()
|
String
|
getInstanceUser()
|
List<GceAvdInfo.LogFileEntry>
|
getLogs()
ローカルまたはリモートのログパスから型へのマップを返します。 |
String
|
getOxygenationDeviceId()
|
boolean
|
getSkipDeviceLogCollection()
|
GceAvdInfo.GceStatus
|
getStatus()
|
HostAndPort
|
hostAndPort()
|
String
|
instanceName()
|
boolean
|
isIpPreconfigured()
|
static
GceAvdInfo
|
parseGceInfoFromFile(File f, DeviceDescriptor descriptor, int remoteAdbPort)
指定されたファイルを解析して、GCE AVD デバイス情報を取得します。 |
static
List<GceAvdInfo>
|
parseGceInfoFromOxygenClientOutput(CommandResult oxygenRes, TestDeviceOptions deviceOptions)
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
|
setOxygenationDeviceId(String deviceId)
|
void
|
setSkipBugreportCollection(boolean skipDeviceLogCollection)
|
void
|
setSkipDeviceLogCollection(boolean skipDeviceLogCollection)
|
void
|
setStatus(GceAvdInfo.GceStatus status)
|
String
|
toString()
|
フィールド
BUILD_VARS
public static final List<String> 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 HashMap<String, String> getBuildVars ()
GCE AVD デバイスのビルド変数情報ハッシュを返します。
ビルド変数のキーとして指定できるのは、BUILD_VARS に記載されているものです(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 など)。
| 戻り値 | |
|---|---|
HashMap<String, String> |
|
getDeviceOffset
public Integer getDeviceOffset ()
| 戻り値 | |
|---|---|
Integer |
|
getErrors
public String getErrors ()
| 戻り値 | |
|---|---|
String |
|
getInstanceUser
public String getInstanceUser ()
| 戻り値 | |
|---|---|
String |
|
getLogs
public List<GceAvdInfo.LogFileEntry> getLogs ()
ローカルまたはリモートのログパスから型へのマップを返します。
| 戻り値 | |
|---|---|
List<GceAvdInfo.LogFileEntry> |
|
getOxygenationDeviceId
public String getOxygenationDeviceId ()
| 戻り値 | |
|---|---|
String |
|
getSkipDeviceLogCollection
public boolean getSkipDeviceLogCollection ()
| 戻り値 | |
|---|---|
boolean |
|
hostAndPort
public HostAndPort hostAndPort ()
| 戻り値 | |
|---|---|
HostAndPort |
|
instanceName
public String instanceName ()
| 戻り値 | |
|---|---|
String |
|
isIpPreconfigured
public boolean isIpPreconfigured ()
| 戻り値 | |
|---|---|
boolean |
|
parseGceInfoFromFile
public static GceAvdInfo parseGceInfoFromFile (File f, DeviceDescriptor descriptor, int remoteAdbPort)
指定されたファイルを解析して、GCE AVD デバイス情報を取得します。
| パラメータ | |
|---|---|
f |
File: GCE ドライバから JSON 出力を読み取る File ファイル。 |
descriptor |
DeviceDescriptor: 情報を必要とするデバイスの記述子。 |
remoteAdbPort |
int: adb 接続に使用するリモートポート |
| 戻り値 | |
|---|---|
GceAvdInfo |
デバイスの GceAvdInfo(見つかった場合)。エラーの場合は null。 |
| 例外 | |
|---|---|
TargetSetupError |
|
parseGceInfoFromOxygenClientOutput
public static List<GceAvdInfo> parseGceInfoFromOxygenClientOutput (CommandResult oxygenRes, TestDeviceOptions deviceOptions)
Oxygen クライアント バイナリから指定されたコマンドライン出力を解析して、リースされた AVD 情報を取得します。
| パラメータ | |
|---|---|
oxygenRes |
CommandResult: Oxygen クライアント コマンド実行からの CommandResult。 |
deviceOptions |
TestDeviceOptions: デバイス オプションを説明する TestDeviceOptions |
| 戻り値 | |
|---|---|
List<GceAvdInfo> |
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(見つかった場合)。エラーの場合は null。 |
| 例外 | |
|---|---|
TargetSetupError |
|
setDeviceOffset
public void setDeviceOffset (Integer deviceOffset)
| パラメータ | |
|---|---|
deviceOffset |
Integer |
setErrors
public void setErrors (String errors)
| パラメータ | |
|---|---|
errors |
String |
setInstanceUser
public void setInstanceUser (String instanceUser)
| パラメータ | |
|---|---|
instanceUser |
String |
setIpPreconfigured
public void setIpPreconfigured (boolean isIpPreconfigured)
| パラメータ | |
|---|---|
isIpPreconfigured |
boolean |
setOxygenationDeviceId
public void setOxygenationDeviceId (String deviceId)
| パラメータ | |
|---|---|
deviceId |
String |
setSkipBugreportCollection
public void setSkipBugreportCollection (boolean skipDeviceLogCollection)
| パラメータ | |
|---|---|
skipDeviceLogCollection |
boolean |
setSkipDeviceLogCollection
public void setSkipDeviceLogCollection (boolean skipDeviceLogCollection)
| パラメータ | |
|---|---|
skipDeviceLogCollection |
boolean |
toString
public String toString ()
| 戻り値 | |
|---|---|
String |
|