bmc

package
v0.0.0-...-6816ca5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBMC

func NewBMC(opts ...Option) (oob.BMC, error)

NewBMC returns an oob.BMC interface.

Types

type Action

type Action struct {
	common.Accessory
	CreateUserRequest    *v1.CreateUserRequest
	DeleteUserRequest    *v1.DeleteUserRequest
	UpdateUserRequest    *v1.UpdateUserRequest
	ResetBMCRequest      *v1.ResetRequest
	DeactivateSOLRequest *v1.DeactivateSOLRequest
}

Action for making bmc actions on BMCs, implements oob.User interface.

func NewBMCResetter

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

NewBMCResetter returns an oob.BMCResetter interface.

func (Action) BMCReset

func (m Action) BMCReset(ctx context.Context, rType string) (err error)

BMCReset functionality for machines.

func (Action) CreateUser

func (m Action) CreateUser(ctx context.Context) error

CreateUser functionality for machines.

func (Action) DeactivateSOL

func (m Action) DeactivateSOL(ctx context.Context) error

DeactivateSOL deactivates a serial-over-LAN session on the device.

func (Action) DeleteUser

func (m Action) DeleteUser(ctx context.Context) error

DeleteUser functionality for machines.

func (Action) UpdateUser

func (m Action) UpdateUser(ctx context.Context) error

UpdateUser functionality for machines.

type Option

type Option func(a *Action) error

Option to add to an Actions.

func WithCreateUserRequest

func WithCreateUserRequest(in *v1.CreateUserRequest) Option

WithCreateUserRequest adds CreateUserRequest to an Action struct.

func WithDeactivateSOLRequest

func WithDeactivateSOLRequest(in *v1.DeactivateSOLRequest) Option

WithDeactivateSOLRequest adds a DeactivateSOLRequest to the Action.

func WithDeleteUserRequest

func WithDeleteUserRequest(in *v1.DeleteUserRequest) Option

WithDeleteUserRequest adds DeleteUserRequest to an Action struct.

func WithLogger

func WithLogger(l logr.Logger) Option

WithLogger adds a logr to an Action struct.

func WithResetRequest

func WithResetRequest(in *v1.ResetRequest) Option

WithResetRequest adds ResetRequest 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.

func WithUpdateUserRequest

func WithUpdateUserRequest(in *v1.UpdateUserRequest) Option

WithUpdateUserRequest adds UpdateUserRequest to an Action struct.

Jump to

Keyboard shortcuts

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