氧氣客戶端

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 類別的建構子。

公共方法

void closeLHPConnection (Process p)

使用給定的Process關閉與遠端氧合設備的連線。

Process createTunnelViaLHP ( OxygenClient.LHPTunnelMode mode)

建立到給定實例名稱的 adb 或 ssh 隧道,並根據給定的隧道模式透過 LHP 將端點指派給裝置。

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)

檢查 Oxygen 租用請求中是否指定了 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 用戶端二進位。

公共方法

關閉LHP連接

public void closeLHPConnection (Process p)

使用給定的Process關閉與遠端氧合設備的連線。

參數
p Process

透過LHP創建隧道

public Process createTunnelViaLHP (OxygenClient.LHPTunnelMode mode)

建立到給定實例名稱的 adb 或 ssh 隧道,並根據給定的隧道模式透過 LHP 將端點指派給裝置。

參數
mode OxygenClient.LHPTunnelMode

退貨
Process adb over LHP 隧道的Process

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 IBuildInfoIBuildInfo

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

不等待啟動指定

public Boolean noWaitForBootSpecified (TestDeviceOptions deviceOptions)

檢查 Oxygen 租用請求中是否指定了 no_wait_for_boot

參數
deviceOptions TestDeviceOptionsTestDeviceOptions

退貨
Boolean如果指定 no_wait_for_boot,則為 true

發布

public boolean release (GceAvdInfo gceAvdInfo, 
                TestDeviceOptions deviceOptions)

嘗試使用 Oxygen 用戶端二進位檔案釋放設備。

參數
gceAvdInfo GceAvdInfo : GceAvdInfo

deviceOptions TestDeviceOptionsTestDeviceOptions

退貨
boolean一個布林值,指示設備釋放是否成功。