OxygenClient

public class OxygenClient
extends Object

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


酸素デバイスのリースまたは解放のための Oxygen クライアント バイナリの使用を管理するクラス。

概要

フィールド

public static final sGceDeviceParamsToOxygenMap

パブリック コンストラクタ

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

OxygenClient クラスのコンストラクタ。

パブリック メソッド

void closeLHPConnection(Process p)

指定された Process で、リモート酸素添加デバイスへの接続を閉じます。

Integer createServerSocket()

未使用のサーバー ソケットを作成するヘルパー。

Process createTunnelViaLHP(OxygenClient.LHPTunnelMode mode, String portNumber, String instanceName, String deviceId)

特定のインスタンス名への adb または ssh トンネルを作成し、指定されたトンネルモードに基づいて、LHP を介してエンドポイントをデバイスに割り当てます。

String getOverrideCvdPath(TestDeviceOptions deviceOptions)

指定された TestDeviceOptions の「override_cvd_path」引数の値を返します。

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

Oxygen クライアント バイナリを呼び出して、デバイスのリースを試みます。

CommandResult 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

パブリック コンストラクタ

OxygenClient

public OxygenClient (File clientBinary, 
                IRunUtil runUtil)

パラメータ
clientBinary File

runUtil IRunUtil

OxygenClient

public OxygenClient (File clientBinary)

OxygenClient クラスのコンストラクタ。

パラメータ
clientBinary File: 実行可能な Oxygen クライアント バイナリ ファイル。

パブリック メソッド

CloseLHPConnection

public void closeLHPConnection (Process p)

指定された Process で、リモート酸素添加デバイスへの接続を閉じます。

パラメータ
p Process

createServerSocket

public Integer createServerSocket ()

未使用のサーバー ソケットを作成するヘルパー。

戻り値
Integer

createTunnelViaLHP

public Process createTunnelViaLHP (OxygenClient.LHPTunnelMode mode, 
                String portNumber, 
                String instanceName, 
                String deviceId)

指定したインスタンス名に adb または ssh のトンネルを作成し、指定されたトンネルモードに基づいて、LHP を介してエンドポイントをデバイスに割り当てます。

パラメータ
mode OxygenClient.LHPTunnelMode

portNumber String

instanceName String

deviceId String

戻り値
Process LHP を介した adb トンネルの Process

getOverrideCvdPath

public String getOverrideCvdPath (TestDeviceOptions deviceOptions)

指定された TestDeviceOptions の「override_cvd_path」引数の値を返します。

パラメータ
deviceOptions TestDeviceOptions: TestDeviceOptions

戻り値
String 「override_cvd_path」の値、この値がない場合は null

リース デバイス

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

Oxygen クライアント バイナリを呼び出して、デバイスのリースを試みます。

パラメータ
b IBuildInfo: IBuildInfo

deviceOptions TestDeviceOptions: TestDeviceOptions

attributes MultiMap: 現在の呼び出しに関連付けられている属性

戻り値
CommandResult 酸素バイナリが返した CommandResult

leaseMultipleDevices

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

Oxygen クライアント バイナリを呼び出して、複数のデバイスのリースを試みます。

パラメータ
buildInfos : ERROR(/List)

deviceOptions TestDeviceOptions: TestDeviceOptions

attributes MultiMap: 現在の呼び出しに関連付けられている属性

戻り値
CommandResult 酸素バイナリが返した CommandResult

noWaitForBootSpecified

public Boolean noWaitForBootSpecified (TestDeviceOptions deviceOptions)

酸素リース リクエストで no_wait_for_boot が指定されているかどうかを確認する

パラメータ
deviceOptions TestDeviceOptions: TestDeviceOptions

戻り値
Boolean no_wait_for_boot が指定されている場合は true

リリース

public boolean release (GceAvdInfo gceAvdInfo, 
                TestDeviceOptions deviceOptions)

Oxygen クライアント バイナリを使用して、デバイスのリリースを試みます。

パラメータ
gceAvdInfo GceAvdInfo: GceAvdInfo

deviceOptions TestDeviceOptions: TestDeviceOptions

戻り値
boolean デバイスのリリースが成功したかどうかを示すブール値。