ashservice

package
v0.0.0-...-0342304 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2024 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AshInstallState

type AshInstallState struct {
	// contains filtered or unexported fields
}

Second step of AshInstall State Machine. Responsible for installation

func (AshInstallState) Execute

func (s AshInstallState) Execute(ctx context.Context) error

func (AshInstallState) Name

func (s AshInstallState) Name() string

func (AshInstallState) Next

type AshPostInstallState

type AshPostInstallState struct {
	// contains filtered or unexported fields
}

Third step of AshInstall State Machine. Responsible for general clean-up

func (AshPostInstallState) Execute

func (s AshPostInstallState) Execute(ctx context.Context) error

func (AshPostInstallState) Name

func (s AshPostInstallState) Name() string

func (AshPostInstallState) Next

type AshPrepareState

type AshPrepareState struct {
	// contains filtered or unexported fields
}

First step of AshInstall State Machine. Responsible for preparing the machine for the installation

func (AshPrepareState) Execute

func (s AshPrepareState) Execute(ctx context.Context) error

func (AshPrepareState) Name

func (s AshPrepareState) Name() string

func (AshPrepareState) Next

type AshService

type AshService struct {
	// contains filtered or unexported fields
}

AshService inherits ServiceInterface

func NewAshService

func NewAshService(dut *lab_api.Dut, dutClient api.DutServiceClient, req *api.InstallAshRequest) AshService

func NewAshServiceFromExistingConnection

func NewAshServiceFromExistingConnection(conn services.ServiceAdapterInterface, imagePath *conf.StoragePath) AshService

NewAshServiceFromExistingConnection is equivalent to the above constructor, but recycles a ServiceAdapter. Generally useful for tests.

func (*AshService) CleanUpStagingDirectory

func (a *AshService) CleanUpStagingDirectory(ctx context.Context) error

CleanUpStagingDirectory simply deletes the staging directory

func (*AshService) CleanupOnFailure

func (a *AshService) CleanupOnFailure(states []services.ServiceState, executionErr error) error

CleanupOnFailure is called if one of service's states failes to Execute() and should clean up the temporary files, and undo the execution, if feasible.

func (*AshService) CopyImageToDUT

func (a *AshService) CopyImageToDUT(ctx context.Context) error

CopyImageToDUT copies the desired image to the DUT, passing through the caching layer.

func (*AshService) CreateBinaryDirectories

func (a *AshService) CreateBinaryDirectories(ctx context.Context) error

CreateBinaryDirectories creates all directories which will house the binaries for the install

func (AshService) CreateStagingDirectory

func (a AshService) CreateStagingDirectory(ctx context.Context) error

CreateStagingDirectory ensures a clean staging directory is present

func (*AshService) Deploy

func (a *AshService) Deploy(ctx context.Context) error

Deploy rsyncs files relevant to the install to the correct bin locations

func (*AshService) GetFirstState

func (a *AshService) GetFirstState() services.ServiceState

GetFirstState returns the first state of this state machine

func (*AshService) KillChrome

func (a *AshService) KillChrome(ctx context.Context) error

KillChrome tries to pkill chrome, retrying/re-polling every two seconds

func (*AshService) MountRootFS

func (a *AshService) MountRootFS(ctx context.Context) error

MountRootFS mounts the root filesystem as a read/write

func (*AshService) ReloadBus

func (a *AshService) ReloadBus(ctx context.Context) error

ReloadBus kill the bus daemon with a SIGHUP

func (*AshService) StartChrome

func (a *AshService) StartChrome(ctx context.Context) error

StartChrome restarts the ui

func (*AshService) StopChrome

func (a *AshService) StopChrome(ctx context.Context) error

StopChrome stops the UI

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL