machine

package
v0.0.0-...-30ff302 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBootDeviceSetter

func NewBootDeviceSetter(opts ...Option) (oob.BootDeviceSetter, error)

NewBootDeviceSetter returns an oob.BootDeviceSetter interface

func NewPowerSetter

func NewPowerSetter(opts ...Option) (oob.PowerSetter, error)

NewPowerSetter returns an oob.PowerSetter interface

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 (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 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