ipmi

package
v0.5.7 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ipmi

type Ipmi struct {
	Username string
	Password string
	Host     string
	// contains filtered or unexported fields
}

Ipmi holds the date for an ipmi connection

func New

func New(username string, password string, host string) (ipmi *Ipmi, err error)

New returns a new ipmi instance

func (*Ipmi) BootDeviceSet added in v0.4.6

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

BootDeviceSet sets the next boot device with options

func (*Ipmi) ForceRestart added in v0.4.15

func (i *Ipmi) ForceRestart(ctx context.Context) (status bool, err error)

ForceRestart does the chassis power cycle even if the chassis is turned off. From the RedFish spec (https://www.dmtf.org/sites/default/files/standards/documents/DSP2046_2018.1.pdf):

Perform an immediate (non-graceful) shutdown, followed by a restart.

func (*Ipmi) IsOn

func (i *Ipmi) IsOn(ctx context.Context) (status bool, err error)

IsOn tells if a machine is currently powered on

func (*Ipmi) PowerCycle

func (i *Ipmi) PowerCycle(ctx context.Context) (status bool, err error)

PowerCycle reboots the machine via bmc

func (*Ipmi) PowerCycleBmc

func (i *Ipmi) PowerCycleBmc(ctx context.Context) (status bool, err error)

PowerCycleBmc reboots the bmc we are connected to

func (*Ipmi) PowerOff

func (i *Ipmi) PowerOff(ctx context.Context) (status bool, err error)

PowerOff power off the machine via bmc

func (*Ipmi) PowerOn

func (i *Ipmi) PowerOn(ctx context.Context) (status bool, err error)

PowerOn power on the machine via bmc

func (*Ipmi) PowerOnForce

func (i *Ipmi) PowerOnForce(ctx context.Context) (status bool, err error)

PowerOnForce power on the machine via bmc even when the machine is already on (Thanks HP!)

func (*Ipmi) PowerReset added in v0.4.6

func (i *Ipmi) PowerReset(ctx context.Context) (status bool, err error)

PowerReset reboots the machine via bmc

func (*Ipmi) PowerResetBmc added in v0.4.6

func (i *Ipmi) PowerResetBmc(ctx context.Context, resetType string) (ok bool, err error)

PowerResetBmc reboots the bmc we are connected to

func (*Ipmi) PowerSoft added in v0.4.6

func (i *Ipmi) PowerSoft(ctx context.Context) (status bool, err error)

PowerSoft power off the machine via bmc

func (*Ipmi) PowerState added in v0.4.6

func (i *Ipmi) PowerState(ctx context.Context) (state string, err error)

PowerState returns the current power state of the machine

func (*Ipmi) PxeOnce

func (i *Ipmi) PxeOnce(ctx context.Context) (status bool, err error)

PxeOnce makes the machine to boot via pxe once using MBR

func (*Ipmi) PxeOnceEfi

func (i *Ipmi) PxeOnceEfi(ctx context.Context) (status bool, err error)

PxeOnceEfi makes the machine to boot via pxe once using EFI

func (*Ipmi) PxeOnceMbr

func (i *Ipmi) PxeOnceMbr(ctx context.Context) (status bool, err error)

PxeOnceMbr makes the machine to boot via pxe once using MBR

func (*Ipmi) ReadUsers added in v0.4.6

func (i *Ipmi) ReadUsers(ctx context.Context) (users []map[string]string, err error)

ReadUsers list all BMC users

Jump to

Keyboard shortcuts

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