ipmitool

package
v2.2.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// ProviderName for the provider implementation
	ProviderName = "ipmitool"
	// ProviderProtocol for the provider implementation
	ProviderProtocol = "ipmi"
)

Variables

Functions

This section is empty.

Types

type Config

type Config struct {
	CipherSuite  string
	IpmitoolPath string
	Log          logr.Logger
	Port         string
}

type Conn

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

Conn for Ipmitool connection details

func New

func New(host, user, pass string, opts ...Option) (*Conn, error)

func (*Conn) BmcReset

func (c *Conn) BmcReset(ctx context.Context, resetType string) (ok bool, err error)

BmcReset will reset a BMC

func (*Conn) BootDeviceSet

func (c *Conn) BootDeviceSet(ctx context.Context, bootDevice string, setPersistent, efiBoot bool) (ok bool, err error)

BootDeviceSet sets the next boot device with options

func (*Conn) ClearSystemEventLog

func (c *Conn) ClearSystemEventLog(ctx context.Context) (err error)

func (*Conn) Close

func (c *Conn) Close(ctx context.Context) (err error)

Close a connection to a BMC

func (*Conn) Compatible

func (c *Conn) Compatible(ctx context.Context) bool

Compatible tests whether a BMC is compatible with the ipmitool provider

func (*Conn) DeactivateSOL added in v2.2.1

func (c *Conn) DeactivateSOL(ctx context.Context) (err error)

DeactivateSOL will deactivate active SOL sessions

func (*Conn) GetSystemEventLog added in v2.2.0

func (c *Conn) GetSystemEventLog(ctx context.Context) (entries [][]string, err error)

func (*Conn) GetSystemEventLogRaw added in v2.2.0

func (c *Conn) GetSystemEventLogRaw(ctx context.Context) (eventlog string, err error)

func (*Conn) Name

func (c *Conn) Name() string

func (*Conn) Open

func (c *Conn) Open(ctx context.Context) (err error)

Open a connection to a BMC

func (*Conn) PowerSet

func (c *Conn) PowerSet(ctx context.Context, state string) (ok bool, err error)

PowerSet sets the power state of a BMC machine

func (*Conn) PowerStateGet

func (c *Conn) PowerStateGet(ctx context.Context) (state string, err error)

PowerStateGet gets the power state of a BMC machine

func (*Conn) SendNMI added in v2.2.3

func (c *Conn) SendNMI(ctx context.Context) error

SendNMI tells the BMC to issue an NMI to the device

func (*Conn) UserRead

func (c *Conn) UserRead(ctx context.Context) (users []map[string]string, err error)

UserRead list all users

type Option

type Option func(*Config)

Option for setting optional Client values

func WithCipherSuite

func WithCipherSuite(cipherSuite string) Option

func WithIpmitoolPath

func WithIpmitoolPath(ipmitoolPath string) Option

func WithLogger

func WithLogger(log logr.Logger) Option

func WithPort

func WithPort(port string) Option

Jump to

Keyboard shortcuts

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