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 ¶
const PostInstallStateName = "Post Install (cleanup/reboot)"
const PrepareStateName = "Firmware Prepare (download/extract archives)"
const UpdateRoStateName = "Firmware Update RO"
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 ¶
func (s FirmwarePostInstallState) Execute(ctx context.Context, log *log.Logger) (*api.FirmwareProvisionResponse, api.InstallResponse_Status, error)
Execute deletes all folders with firmware image archives.
func (FirmwarePostInstallState) Name ¶
func (s FirmwarePostInstallState) Name() string
func (FirmwarePostInstallState) Next ¶
func (s FirmwarePostInstallState) Next() ServiceState
type FirmwarePrepareState ¶
type FirmwarePrepareState struct {
// contains filtered or unexported fields
}
func (FirmwarePrepareState) Execute ¶
func (s FirmwarePrepareState) Execute(ctx context.Context, log *log.Logger) (*api.FirmwareProvisionResponse, api.InstallResponse_Status, error)
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 ¶
func (s FirmwarePrepareState) Next() ServiceState
type FirmwareUpdateRoState ¶
type FirmwareUpdateRoState struct {
// contains filtered or unexported fields
}
FirmwareUpdateRoState updates firmware with write protection disabled.
func (FirmwareUpdateRoState) Execute ¶
func (s FirmwareUpdateRoState) Execute(ctx context.Context, log *log.Logger) (*api.FirmwareProvisionResponse, api.InstallResponse_Status, error)
Execute flashes firmware with write-protection disabled using futility.
func (FirmwareUpdateRoState) Name ¶
func (s FirmwareUpdateRoState) Name() string
func (FirmwareUpdateRoState) Next ¶
func (s FirmwareUpdateRoState) Next() ServiceState
type FirmwareUpdateRwState ¶
type FirmwareUpdateRwState struct {
// contains filtered or unexported fields
}
FirmwareUpdateRwState updates firmware with write protection disabled.
func (FirmwareUpdateRwState) Execute ¶
func (s FirmwareUpdateRwState) Execute(ctx context.Context, log *log.Logger) (*api.FirmwareProvisionResponse, api.InstallResponse_Status, error)
Execute flashes firmware using futility with write-protection enabled.
func (FirmwareUpdateRwState) Name ¶
func (s FirmwareUpdateRwState) Name() string
func (FirmwareUpdateRwState) Next ¶
func (s FirmwareUpdateRwState) Next() ServiceState
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. TODO: Get rid of this state machine.
func NewFirmwarePrepareState ¶
func NewFirmwarePrepareState(service *firmwareservice.FirmwareService) ServiceState