HostOrchestratorUtil

public class HostOrchestratorUtil
extends Object

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


Utility to execute commands via Host Orchestrator on remote instances.

Summary

Fields

public static final String URL_HOST_KERNEL_LOG

public static final String URL_HO_LOG

Public constructors

HostOrchestratorUtil(boolean useOxygenation, boolean useCvdOxygen, File sshPrivateKeyPath, String instanceUser, GceAvdInfo gceAvd, File avdDriverBinary)
HostOrchestratorUtil(boolean useOxygenation, boolean useCvdOxygen, File sshPrivateKeyPath, String instanceUser, GceAvdInfo gceAvd, OxygenClient oxygenClient)

Public methods

void collectLogByCommand(ITestLogger testLogger, String logName, String url)

Execute a command via Host Orchestrator and log its output

CommandResult powerwashGce()

Attempt to powerwash a GCE instance via Host Orchestrator.

File pullCvdHostLogs()

Pull CF host logs via Host Orchestrator.

CommandResult restoreSnapshotGce()

Attempt to restore snapshot of a Cuttlefish instance via Host Orchestrator.

CommandResult snapshotGce()

Attempt to snapshot a Cuttlefish instance via Host Orchestrator.

CommandResult stopGce()

Attempt to stop a Cuttlefish instance via Host Orchestrator.

Fields

URL_HOST_KERNEL_LOG

public static final String URL_HOST_KERNEL_LOG

URL_HO_LOG

public static final String URL_HO_LOG

Public constructors

HostOrchestratorUtil

public HostOrchestratorUtil (boolean useOxygenation, 
                boolean useCvdOxygen, 
                File sshPrivateKeyPath, 
                String instanceUser, 
                GceAvdInfo gceAvd, 
                File avdDriverBinary)

Parameters
useOxygenation boolean

useCvdOxygen boolean

sshPrivateKeyPath File

instanceUser String

gceAvd GceAvdInfo

avdDriverBinary File

HostOrchestratorUtil

public HostOrchestratorUtil (boolean useOxygenation, 
                boolean useCvdOxygen, 
                File sshPrivateKeyPath, 
                String instanceUser, 
                GceAvdInfo gceAvd, 
                OxygenClient oxygenClient)

Parameters
useOxygenation boolean

useCvdOxygen boolean

sshPrivateKeyPath File

instanceUser String

gceAvd GceAvdInfo

oxygenClient OxygenClient

Public methods

collectLogByCommand

public void collectLogByCommand (ITestLogger testLogger, 
                String logName, 
                String url)

Execute a command via Host Orchestrator and log its output

Parameters
testLogger ITestLogger: The ITestLogger where to log the files.

logName String: the log name to use when reporting to the ITestLogger

url String: the Host Orchestrator API to be executed.

powerwashGce

public CommandResult powerwashGce ()

Attempt to powerwash a GCE instance via Host Orchestrator.

Returns
CommandResult A CommandResult containing the status and logs.

pullCvdHostLogs

public File pullCvdHostLogs ()

Pull CF host logs via Host Orchestrator.

Returns
File

restoreSnapshotGce

public CommandResult restoreSnapshotGce ()

Attempt to restore snapshot of a Cuttlefish instance via Host Orchestrator.

Returns
CommandResult

snapshotGce

public CommandResult snapshotGce ()

Attempt to snapshot a Cuttlefish instance via Host Orchestrator.

Returns
CommandResult

stopGce

public CommandResult stopGce ()

Attempt to stop a Cuttlefish instance via Host Orchestrator.

Returns
CommandResult