ipmi

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	IPMIClient *goipmi.Client
}

Client is a holder for the IPMIClient.

func NewClient

func NewClient(bmcInfo metalv1.BMC) (*Client, error)

NewClient creates an ipmi client to use.

func (*Client) Close

func (c *Client) Close() error

Close the client.

func (*Client) EnableUser

func (c *Client) EnableUser(uid byte) (*goipmi.EnableUserResponse, error)

EnableUser sets a user as enabled. Actually the same underlying command as SetUserPass (see 22.30).

func (*Client) GetLANConfig

func (c *Client) GetLANConfig(param uint8) (*goipmi.LANConfigResponse, error)

GetLANConfig fetches a given param from the LAN Config. (see 23.2).

func (*Client) GetUserName

func (c *Client) GetUserName(uid byte) (*goipmi.GetUserNameResponse, error)

GetUserName fetches a un string given a uid. This is how we check if a user slot is available.

nb: a "failure" here can actually mean that the slot is just open for use or you can also have a user with "" as the name which won't fail this check and is still open for use. (see 22.29).

func (*Client) GetUserSummary

func (c *Client) GetUserSummary() (*goipmi.GetUserSummaryResponse, error)

GetUserSummary returns stats about user table, including max users allowed.

func (*Client) IsFake

func (c *Client) IsFake() bool

IsFake returns false.

func (*Client) IsPoweredOn

func (c *Client) IsPoweredOn() (bool, error)

IsPoweredOn checks current power state.

func (*Client) PowerCycle

func (c *Client) PowerCycle() error

PowerCycle will power cycle a given machine.

func (*Client) PowerOff

func (c *Client) PowerOff() error

PowerOff will power off a given machine.

func (*Client) PowerOn

func (c *Client) PowerOn() error

PowerOn will power on a given machine.

func (*Client) SetPXE

func (c *Client) SetPXE(mode types.PXEMode) error

SetPXE makes sure the node will pxe boot next time.

func (*Client) SetUserAccess

func (c *Client) SetUserAccess(options, uid, limits, session byte) (*goipmi.SetUserAccessResponse, error)

SetUserAccess tweaks the privileges for a given uid (see 22.26).

func (*Client) SetUserName

func (c *Client) SetUserName(uid byte, name string) (*goipmi.SetUserNameResponse, error)

SetUserName sets a string for the given uid (see 22.28).

func (*Client) SetUserPass

func (c *Client) SetUserPass(uid byte, pass string) (*goipmi.SetUserPassResponse, error)

SetUserPass sets the password for a given uid (see 22.30). nb: This naively assumes you'll pass a 16 char or less pw string.

The goipmi function does not support longer right now.

func (*Client) Status

func (c *Client) Status() (*goipmi.ChassisStatusResponse, error)

Status fetches the chassis status.

Jump to

Keyboard shortcuts

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