outofband

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFirmwareTempFile          = errors.New("error firmware temp file")
	ErrSaveAction                = errors.New("error occurred in action state save")
	ErrActionTypeAssertion       = errors.New("error occurred in action object type assertion")
	ErrContextCancelled          = errors.New("context canceled")
	ErrUnexpected                = errors.New("unexpected error occurred")
	ErrInstalledFirmwareNotEqual = errors.New("installed and expected firmware not equal")
	ErrInstalledFirmwareEqual    = errors.New("installed and expected firmware are equal, no action necessary")
	ErrInstalledVersionUnknown   = errors.New("installed version unknown")
	ErrComponentNotFound         = errors.New("component not identified for firmware install")
	ErrRequireHostPoweredOff     = errors.New("expected host to be powered off")
)
View Source
var (
	ErrBMCQuery                    = errors.New("error occurred in bmc query")
	ErrMaxBMCQueryAttempts         = errors.New("reached maximum BMC query attempts")
	ErrTaskNotFound                = errors.New("task not found")
	ErrFirmwareInstallFailed       = errors.New("firmware install failed")
	ErrFirmwareTaskStateUnexpected = errors.New("BMC returned unexpected firmware task state")
	ErrQueryorMethod               = errors.New("BMC queryor method error")

	ErrFirmwareInstallProvider = errors.New("firmware install provider not identified")
)
View Source
var (
	ErrDownload = errors.New("error downloading file")
	ErrChecksum = errors.New("error validating file checksum")
	ErrFormat   = errors.New("bad checksum format")
)

Functions

func BmcResetParams added in v1.0.0

func BmcResetParams(steps []constants.FirmwareInstallStep) (bmcResetOnInstallFailure, bmcResetPostInstall bool)

NOTE: the constants.FirmwareInstallStep type will be moved to the FirmwareInstallProperties struct type which will make this easier

func NewActionStateMachine

func NewActionStateMachine(actionID string, steps []bconsts.FirmwareInstallStep, preInstallBMCReset bool) (*sm.ActionStateMachine, error)

func NewDeviceQueryor

func NewDeviceQueryor(ctx context.Context, asset *model.Asset, logger *logrus.Entry) model.DeviceQueryor

NewDeviceQueryor returns a bmc queryor that implements the DeviceQueryor interface

Types

type ErrBmcQuery

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

func (*ErrBmcQuery) Error

func (e *ErrBmcQuery) Error() string

type Transition added in v1.0.0

type Transition struct {
	Name           sw.TransitionType
	DestState      sw.State
	Handler        sw.Transition
	Kind           TransitionKind
	PostTransition sw.Transition
	TransitionDoc  sw.TransitionRuleDoc
	DestStateDoc   sw.StateDoc
}

Transition is an internal type to hold all attributes required to build a stateswitch.TransitionRule.

type TransitionKind added in v1.0.0

type TransitionKind string

TransitionKind type groups firmware install transitions.

const (
	PreInstall    TransitionKind = "PreInstall"
	Install       TransitionKind = "Install"
	PowerStateOff TransitionKind = "PowerStateOff"
	PowerStateOn  TransitionKind = "PowerStateOn"
)

type Transitions added in v1.0.0

type Transitions []Transition

func (Transitions) ByKind added in v1.0.0

func (ts Transitions) ByKind(kind TransitionKind) (found Transitions, err error)

func (Transitions) ByName added in v1.0.0

func (ts Transitions) ByName(name sw.TransitionType) (t Transition, err error)

func (Transitions) Remove added in v1.0.0

func (ts Transitions) Remove(name sw.TransitionType) (final Transitions)

Jump to

Keyboard shortcuts

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