ipmitool

package
v0.0.0-...-6410feb Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BOOTDEVS = []string{"pxe", "disk", "safe", "diag", "cdrom", "bios"}
	SOLOPTS  = []string{"default", "skip", "enable"}
)

Functions

func CreateOrSetAdminUser

func CreateOrSetAdminUser(exector IPMIExecutor, channel uint8, rootId int, username string, password string) error

func DoBMCReset

func DoBMCReset(exector IPMIExecutor) error

func DoHardShutdown

func DoHardShutdown(exector IPMIExecutor) error

func DoPowerCycle

func DoPowerCycle(exector IPMIExecutor) error

func DoPowerOn

func DoPowerOn(exector IPMIExecutor) error

func DoPowerReset

func DoPowerReset(exector IPMIExecutor) error

func DoReboot

func DoReboot(exector IPMIExecutor) error

func DoRebootToBIOS

func DoRebootToBIOS(exector IPMIExecutor) error

func DoRebootToDisk

func DoRebootToDisk(exector IPMIExecutor) error

func DoRebootToPXE

func DoRebootToPXE(exector IPMIExecutor) error

func DoSoftShutdown

func DoSoftShutdown(exector IPMIExecutor) error

func EnableLanAccess

func EnableLanAccess(exector IPMIExecutor, channel uint8) error

func ExecuteCommands

func ExecuteCommands(exector IPMIExecutor, args ...Args) ([]string, error)

func GetACPIPowerStatus

func GetACPIPowerStatus(exector IPMIExecutor) ([]int64, error)

func GetBootFlags

func GetBootFlags(exector IPMIExecutor) (*types.SIPMIBootFlags, error)

func GetChassisPowerStatus

func GetChassisPowerStatus(exector IPMIExecutor) (string, error)

func GetIPMILanPort

func GetIPMILanPort(exector IPMIExecutor) (string, error)

func GetLanConfig

func GetLanConfig(exector IPMIExecutor, channel uint8) (*types.SIPMILanConfig, error)

func GetSysGuid

func GetSysGuid(exector IPMIExecutor) string

func GetSysInfo

func GetSysInfo(exector IPMIExecutor) (*types.SSystemInfo, error)

func HexStr2Bytes

func HexStr2Bytes(hs string) ([]int64, error)

func ListLanUsers

func ListLanUsers(exector IPMIExecutor, channel uint8) ([]compute.IPMIUser, error)

func SetBootFlagPXE

func SetBootFlagPXE(exector IPMIExecutor) error

func SetBootFlags

func SetBootFlags(
	exector IPMIExecutor,
	bootdev string,
	sol tristate.TriState,
	enablePersistent bool,
) error

func SetDellIPMILanPortShared

func SetDellIPMILanPortShared(exector IPMIExecutor) error

func SetHuaweiIPMILanPortShared

func SetHuaweiIPMILanPortShared(exector IPMIExecutor) error

func SetIPMILanPortDedicated

func SetIPMILanPortDedicated(exector IPMIExecutor) error

func SetIdUserPasswd

func SetIdUserPasswd(exector IPMIExecutor, channel uint8, id int, user string, password string) error

func SetLanDHCP

func SetLanDHCP(exector IPMIExecutor, lanChannel uint8) error

func SetLanPasswd

func SetLanPasswd(exector IPMIExecutor, rootId int, password string) error

func SetLanStatic

func SetLanStatic(
	exector IPMIExecutor,
	channel uint8,
	ip string,
	mask string,
	gateway string,
) error

func SetLanStaticIP

func SetLanStaticIP(exector IPMIExecutor, channel uint8, ip string) error

func SetLanUserAdminPasswd

func SetLanUserAdminPasswd(exector IPMIExecutor, channel uint8, id int, password string) error

func SetRebootToBIOS

func SetRebootToBIOS(exector IPMIExecutor) error

func SetRebootToDisk

func SetRebootToDisk(exector IPMIExecutor) error

func SetRebootToPXE

func SetRebootToPXE(exector IPMIExecutor) error

Types

type Args

type Args []string

type IPMIExecutor

type IPMIExecutor interface {
	GetMode() string
	ExecuteCommand(args ...string) ([]string, error)
}

type IPMIParser

type IPMIParser struct{}

func (*IPMIParser) GetDefaultTimeout

func (parser *IPMIParser) GetDefaultTimeout() time.Duration

type LanPlusIPMI

type LanPlusIPMI struct {
	IPMIParser
	// contains filtered or unexported fields
}

func NewLanPlusIPMI

func NewLanPlusIPMI(host, user, password string) *LanPlusIPMI

func NewLanPlusIPMIWithPort

func NewLanPlusIPMIWithPort(host, user, password string, port int) *LanPlusIPMI

func (*LanPlusIPMI) ExecuteCommand

func (ipmi *LanPlusIPMI) ExecuteCommand(args ...string) ([]string, error)

func (*LanPlusIPMI) GetCommand

func (ipmi *LanPlusIPMI) GetCommand(args ...string) (*procutils.Command, context.CancelFunc)

func (*LanPlusIPMI) GetMode

func (ipmi *LanPlusIPMI) GetMode() string

type SSHIPMI

type SSHIPMI struct {
	IPMIParser
	// contains filtered or unexported fields
}

func NewSSHIPMI

func NewSSHIPMI(cli *ssh.Client) *SSHIPMI

func (*SSHIPMI) ExecuteCommand

func (ipmi *SSHIPMI) ExecuteCommand(args ...string) ([]string, error)

func (*SSHIPMI) GetCommand

func (ipmi *SSHIPMI) GetCommand(args ...string) *procutils.Command

func (*SSHIPMI) GetMode

func (ipmi *SSHIPMI) GetMode() string

Jump to

Keyboard shortcuts

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