Documentation ¶
Index ¶
- type AshInstallState
- type AshPostInstallState
- type AshPrepareState
- type AshService
- func (a *AshService) CleanUpStagingDirectory(ctx context.Context) error
- func (a *AshService) CleanupOnFailure(states []services.ServiceState, executionErr error) error
- func (a *AshService) CopyImageToDUT(ctx context.Context) error
- func (a *AshService) CreateBinaryDirectories(ctx context.Context) error
- func (a AshService) CreateStagingDirectory(ctx context.Context) error
- func (a *AshService) Deploy(ctx context.Context) error
- func (a *AshService) GetFirstState() services.ServiceState
- func (a *AshService) KillChrome(ctx context.Context) error
- func (a *AshService) MountRootFS(ctx context.Context) error
- func (a *AshService) ReloadBus(ctx context.Context) error
- func (a *AshService) StartChrome(ctx context.Context) error
- func (a *AshService) StopChrome(ctx context.Context) error
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) Name ¶
func (s AshInstallState) Name() string
func (AshInstallState) Next ¶
func (s AshInstallState) Next() services.ServiceState
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 ¶
func (s AshPostInstallState) Next() services.ServiceState
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) Name ¶
func (s AshPrepareState) Name() string
func (AshPrepareState) Next ¶
func (s AshPrepareState) Next() services.ServiceState
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