service

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: 7 Imported by: 0

Documentation

Overview

Container for the CrOSProvision state machine

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CrOSService

type CrOSService struct {
	Connection       common_utils.ServiceAdapterInterface
	MachineMetadata  metadata.MachineMetadata
	ImagePath        *conf.StoragePath
	OverwritePayload *conf.StoragePath
	PreserveStateful bool
	DlcSpecs         []*api.CrOSProvisionMetadata_DLCSpec
	UpdateFirmware   bool
	UpdateCros       bool
	QuickResetDevice bool
}

CrOSService inherits ServiceInterface

func NewCrOSService

func NewCrOSService(dut *lab_api.Dut, dutClient api.DutServiceClient, req *api.InstallRequest) (*CrOSService, error)

func NewCrOSServiceFromCrOSProvisionRequest

func NewCrOSServiceFromCrOSProvisionRequest(dutClient api.DutServiceClient, req *api.CrosProvisionRequest) *CrOSService

func NewCrOSServiceFromExistingConnection

func NewCrOSServiceFromExistingConnection(conn common_utils.ServiceAdapterInterface, imagePath *conf.StoragePath, overwritePayload *conf.StoragePath, preserverStateful bool, dlcSpecs []*api.CrOSProvisionMetadata_DLCSpec, updateFirmware bool) CrOSService

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

func (*CrOSService) CleanupOnFailure

func (c *CrOSService) CleanupOnFailure(states []common_utils.ServiceState, executionErr error) error

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

func (*CrOSService) InstallZippedImage

func (c *CrOSService) InstallZippedImage(ctx context.Context, remoteImagePath string, outputFile string) error

InstallZippedImage installs a remote zipped image to disk.

func (*CrOSService) InstallZstdCompressedFile

func (c *CrOSService) InstallZstdCompressedFile(ctx context.Context, remoteImagePath string, outputPath string) error

InstallZstdCompressedFile installs a compressed (zstd) file to target.

Jump to

Keyboard shortcuts

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