state_machine

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

Documentation

Overview

Last step of FirmwareService State Machine. Cleans up temporary folders and reboots the DUT.

First step of FirmwareService State Machine. Installs RW firmware.

First step of FirmwareService State Machine. Installs RW firmware.

Index

Constants

View Source
const PostInstallStateName = "Post Install (cleanup/reboot)"
View Source
const PrepareStateName = "Firmware Prepare (download/extract archives)"
View Source
const UpdateRoStateName = "Firmware Update RO"
View Source
const UpdateRwStateName = "Firmware Update RW"

Variables

This section is empty.

Functions

This section is empty.

Types

type FirmwarePostInstallState

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

FirmwarePostInstallState cleans up temporary folders and reboots the DUT.

func (FirmwarePostInstallState) Execute

Execute deletes all folders with firmware image archives.

func (FirmwarePostInstallState) Name

func (FirmwarePostInstallState) Next

type FirmwarePrepareState

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

func (FirmwarePrepareState) Execute

FirmwarePrepareState downloads and extracts every image from the request. The already downloaded images will not be downloaded and extracted again.

func (FirmwarePrepareState) Name

func (s FirmwarePrepareState) Name() string

func (FirmwarePrepareState) Next

type FirmwareUpdateRoState

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

FirmwareUpdateRoState updates firmware with write protection disabled.

func (FirmwareUpdateRoState) Execute

Execute flashes firmware with write-protection disabled using futility.

func (FirmwareUpdateRoState) Name

func (s FirmwareUpdateRoState) Name() string

func (FirmwareUpdateRoState) Next

type FirmwareUpdateRwState

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

FirmwareUpdateRwState updates firmware with write protection disabled.

func (FirmwareUpdateRwState) Execute

Execute flashes firmware using futility with write-protection enabled.

func (FirmwareUpdateRwState) Name

func (s FirmwareUpdateRwState) Name() string

func (FirmwareUpdateRwState) Next

type ServiceState

type ServiceState interface {
	// Execute Runs the state
	Execute(ctx context.Context, log *log.Logger) (*api.FirmwareProvisionResponse, api.InstallResponse_Status, error)
	// Next gets the next state in the state machine
	Next() ServiceState
	// Name gets the fully qualified name of this state
	Name() string
}

ServiceState is a single state representation.

func NewFirmwarePrepareState

func NewFirmwarePrepareState(service *firmwareservice.FirmwareService) ServiceState

Jump to

Keyboard shortcuts

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