machine

package
v0.0.0-...-db6aa9b Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	common.Accessory
	PowerRequest      *v1.PowerRequest
	BootDeviceRequest *v1.DeviceRequest
}

Action for making power actions on BMCs, implements oob.Machine interface.

func NewBootDeviceSetter

func NewBootDeviceSetter(opts ...Option) (*Action, error)

NewBootDeviceSetter returns an oob.BootDeviceSetter interface.

func NewPowerSetter

func NewPowerSetter(opts ...Option) (*Action, error)

NewPowerSetter returns an oob.PowerSetter interface.

func (Action) BootDeviceSet

func (m Action) BootDeviceSet(ctx context.Context, device string, persistent, efiBoot bool) (result string, err error)

BootDeviceSet functionality for machines.

func (Action) PowerSet

func (m Action) PowerSet(ctx context.Context, action string) (result string, err error)

PowerSet functionality for machines.

type Option

type Option func(a *Action) error

Option to add to an Actions.

func WithDeviceRequest

func WithDeviceRequest(in *v1.DeviceRequest) Option

WithDeviceRequest adds DeviceRequest to an Action struct.

func WithLogger

func WithLogger(l logr.Logger) Option

WithLogger adds a logr to an Action struct.

func WithPowerRequest

func WithPowerRequest(in *v1.PowerRequest) Option

WithPowerRequest adds PowerRequest to an Action struct.

func WithSkipRedfishVersions

func WithSkipRedfishVersions(versions []string) Option

WithSkipRedfishVersions sets the Redfish versions to skip in the Action struct.

func WithStatusMessage

func WithStatusMessage(s chan string) Option

WithStatusMessage adds a status message chan to an Action struct.

Jump to

Keyboard shortcuts

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