ipmitool

package
v2.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

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) 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) GetCiphers

func (c *Conn) GetCiphers(ctx context.Context) (output string, err error)

GetCiphers gets a list of ciphers supported for IPMI.

func (*Conn) GetSOLCiphers

func (c *Conn) GetSOLCiphers(ctx context.Context) (output string, err error)

GetSOLCiphers gets a list of ciphers supported for SOL.

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) SolActivate

func (c *Conn) SolActivate(ctx context.Context, stdin ...byte) (output string, err error)

SolActivate activates and connects to the serial-over-lan interface. It needs stdin, or the connection will be immediately dropped.

func (*Conn) SolDeactivate

func (c *Conn) SolDeactivate(ctx context.Context) (output string, err error)

SolDeactivate disconnects the serial-over-lan interface.

func (*Conn) SolInfo

func (c *Conn) SolInfo(ctx context.Context) (info string, err error)

SolInfo gets the status of the serial-over-lan interface

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