Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseBMCMAC ¶
func ParseBMCMAC(mac string) (net.HardwareAddr, error)
ParseBMCMAC parses a MAC address string into net.HardwareAddr.
func ValidateBootDevice ¶
ValidateBootDevice checks if a boot device string is valid.
Types ¶
type BMCNetConfig ¶
type BMCNetConfig struct {
IPAddress string `json:"ipAddress"`
Netmask string `json:"netmask"`
Gateway string `json:"gateway"`
MACAddress string `json:"macAddress"`
DHCP bool `json:"dhcp"`
VLANEnabled bool `json:"vlanEnabled"`
VLANID int `json:"vlanId"`
}
BMCNetConfig holds BMC network configuration.
type BootDevice ¶
type BootDevice string
BootDevice represents an IPMI boot target.
const ( // BootPXE boots from network. BootPXE BootDevice = "pxe" // BootDisk boots from local disk. BootDisk BootDevice = "disk" // BootCDROM boots from CD/DVD. BootCDROM BootDevice = "cdrom" // BootBIOS enters BIOS setup. BootBIOS BootDevice = "bios" )
type ChassisStatus ¶
type ChassisStatus struct {
PowerOn bool `json:"powerOn"`
PowerFault bool `json:"powerFault"`
Intrusion bool `json:"intrusion"`
LastEvent string `json:"lastEvent"`
}
ChassisStatus holds chassis power state information.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles local IPMI operations via ipmitool.
func (*Manager) ChassisControl ¶
ChassisControl sends a chassis control command (power on/off/cycle/reset).
func (*Manager) DevicePath ¶
DevicePath returns the IPMI device path.
func (*Manager) GetBMCNetwork ¶
GetBMCNetwork reads the BMC network configuration.
func (*Manager) SetNextBoot ¶
func (m *Manager) SetNextBoot(ctx context.Context, device BootDevice) error
SetNextBoot sets the boot device for the next boot only.
type SensorReading ¶
type SensorReading struct {
Name string `json:"name"`
Value float64 `json:"value"`
Unit string `json:"unit"`
Status string `json:"status"`
LowerCrit float64 `json:"lowerCrit,omitempty"`
UpperCrit float64 `json:"upperCrit,omitempty"`
}
SensorReading represents an IPMI sensor value.
Click to show internal directories.
Click to hide internal directories.