Documentation
¶
Overview ¶
Container for the CrOSProvision state machine
Index ¶
- type CrOSService
- func NewCrOSService(dut *lab_api.Dut, dutClient api.DutServiceClient, req *api.InstallRequest) (*CrOSService, error)
- func NewCrOSServiceFromCrOSProvisionRequest(dutClient api.DutServiceClient, req *api.CrosProvisionRequest) *CrOSService
- func NewCrOSServiceFromExistingConnection(conn common_utils.ServiceAdapterInterface, imagePath *conf.StoragePath, ...) CrOSService
- func (c *CrOSService) CleanupOnFailure(states []common_utils.ServiceState, executionErr error) error
- func (c *CrOSService) InstallZippedImage(ctx context.Context, remoteImagePath string, outputFile string) error
- func (c *CrOSService) InstallZstdCompressedFile(ctx context.Context, remoteImagePath string, outputPath string) error
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.
Click to show internal directories.
Click to hide internal directories.