氧氣客戶端

public class OxygenClient
extends Object

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


管理使用 Oxygen 客戶端二進製文件來租用或釋放 Oxygen 設備的類。

概括

領域

public static final sGceDeviceParamsToOxygenMap

公共構造函數

OxygenClient (File clientBinary, IRunUtil runUtil)
OxygenClient (File clientBinary)

OxygenClient 類的構造函數。

公共方法

String getOverrideFetchCvdPath ( TestDeviceOptions deviceOptions)

返回給定 TestDeviceOptions 中“override_fetch_cvd_path”參數的值。

CommandResult leaseDevice ( IBuildInfo b, TestDeviceOptions deviceOptions, MultiMap <String, String> attributes)

嘗試通過調用 Oxygen 客戶端二進製文件來租用設備。

CommandResult leaseMultipleDevices ( buildInfos, TestDeviceOptions deviceOptions, MultiMap <String, String> attributes) leaseMultipleDevices ( buildInfos, TestDeviceOptions deviceOptions, MultiMap <String, String> attributes)

嘗試通過調用 Oxygen 客戶端二進製文件來租用多個設備。

Boolean noWaitForBootSpecified ( TestDeviceOptions deviceOptions)

檢查是否在氧氣租賃請求中指定了 no_wait_for_boot

boolean release ( GceAvdInfo gceAvdInfo, TestDeviceOptions deviceOptions)

嘗試使用 Oxygen 客戶端二進製文件釋放設備。

領域

sGceDeviceParamsToOxygenMap

public static final  sGceDeviceParamsToOxygenMap

公共構造函數

氧氣客戶端

public OxygenClient (File clientBinary, 
                IRunUtil runUtil)

參數
clientBinary File

runUtil IRunUtil

氧氣客戶端

public OxygenClient (File clientBinary)

OxygenClient 類的構造函數。

參數
clientBinary File :可執行的 Oxygen 客戶端二進製文件。

公共方法

getOverrideFetchCvdPath

public String getOverrideFetchCvdPath (TestDeviceOptions deviceOptions)

返回給定 TestDeviceOptions 中“override_fetch_cvd_path”參數的值。

參數
deviceOptions TestDeviceOptionsTestDeviceOptions

退貨
String 'override_fetch_cvd_path' 的值,如果不存在則為 null

租賃設備

public CommandResult leaseDevice (IBuildInfo b, 
                TestDeviceOptions deviceOptions, 
                MultiMap<String, String> attributes)

嘗試通過調用 Oxygen 客戶端二進製文件來租用設備。

參數
b IBuildInfo : IBuildInfo

deviceOptions TestDeviceOptionsTestDeviceOptions

attributes MultiMap :與當前調用關聯的屬性

退貨
CommandResult Oxygen 二進製文件返回的CommandResult

租賃多台設備

public CommandResult leaseMultipleDevices ( buildInfos, 
                TestDeviceOptions deviceOptions, 
                MultiMap<String, String> attributes)

嘗試通過調用 Oxygen 客戶端二進製文件來租用多個設備。

參數
buildInfos : ERROR(/List ) ERROR(/List )

deviceOptions TestDeviceOptionsTestDeviceOptions

attributes MultiMap :與當前調用關聯的屬性

退貨
CommandResult Oxygen 二進製文件返回的CommandResult

noWaitForBootSpecified

public Boolean noWaitForBootSpecified (TestDeviceOptions deviceOptions)

檢查是否在氧氣租賃請求中指定了 no_wait_for_boot

參數
deviceOptions TestDeviceOptionsTestDeviceOptions

退貨
Boolean如果指定了 no_wait_for_boot,則為真

發布

public boolean release (GceAvdInfo gceAvdInfo, 
                TestDeviceOptions deviceOptions)

嘗試使用 Oxygen 客戶端二進製文件釋放設備。

參數
gceAvdInfo GceAvdInfoGceAvdInfo

deviceOptions TestDeviceOptionsTestDeviceOptions

退貨
boolean一個布爾值,指示設備發布是否成功。