氧气客户端
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 | 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 finalsGceDeviceParamsToOxygenMap
公共构造函数
氧气客户端
public OxygenClient (File clientBinary)
OxygenClient 类的构造函数。
参数 | |
---|---|
clientBinary | File :可执行的 Oxygen 客户端二进制文件。 |
公共方法
通过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 | TestDeviceOptions : TestDeviceOptions |
退货 | |
---|---|
String | 'override_fetch_cvd_path' 的值,如果不存在则为 null |
租赁设备
public CommandResult leaseDevice (IBuildInfo b, TestDeviceOptions deviceOptions, MultiMap<String, String> attributes)
尝试通过调用 Oxygen 客户端二进制文件来租赁设备。
参数 | |
---|---|
b | IBuildInfo : IBuildInfo |
deviceOptions | TestDeviceOptions : TestDeviceOptions |
attributes | MultiMap :与当前调用关联的属性 |
退货 | |
---|---|
CommandResult | Oxygen 二进制文件返回的CommandResult 。 |
租赁多个设备
public CommandResult leaseMultipleDevices (buildInfos, TestDeviceOptions deviceOptions, MultiMap<String, String> attributes)
尝试通过调用 Oxygen 客户端二进制文件来租赁多个设备。
参数 | |
---|---|
buildInfos | ERROR(/List ) ERROR(/List ) |
deviceOptions | TestDeviceOptions : TestDeviceOptions |
attributes | MultiMap :与当前调用关联的属性 |
退货 | |
---|---|
CommandResult | Oxygen 二进制文件返回的CommandResult 。 |
不等待启动指定
public Boolean noWaitForBootSpecified (TestDeviceOptions deviceOptions)
检查 Oxygen 租用请求中是否指定了 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 | 一个布尔值,指示设备释放是否成功。 |