bmc

package
v0.0.0-...-5a60d54 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BMCInfo

type BMCInfo struct {
	// BMC endpoint.
	Endpoint string `json:"endpoint"`
	// BMC port. Defaults to 623.
	Port *uint32 `json:"port,omitempty"`
	// BMC user value.
	User string `json:"user,omitempty"`
	// BMC password value.
	Pass string `json:"pass,omitempty"`
	// BMC Interface Type. Defaults to lanplus.
	Interface *string `json:"interface,omitempty"`
}

type Client

type Client struct {
	IPMIClient *goipmi.Client
}

Client is a holder for the IPMIClient. SEE https://www.intel.com/content/dam/www/public/us/en/documents/product-briefs/ipmi-second-gen-interface-spec-v2-rev1-1.pdf

func NewClient

func NewClient(bmcInfo *BMCInfo) (*Client, error)

NewClient creates an ipmi client to use.

func (*Client) Close

func (c *Client) Close() error

Close the client.

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