bmc

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultBMCPort = 443

DefaultBMCPort is the default Redfish HTTPS port.

Variables

This section is empty.

Functions

This section is empty.

Types

type BMC

type BMC struct {
	MAC        net.HardwareAddr       `json:"mac"`
	IP         net.IP                 `json:"ip"`
	Port       int                    `json:"port"` // Custom port (0 = default 443)
	Credential *credential.Credential `json:"credential"`
}

BMC represents the Board Management Controller subsystem of an NV-Switch tray. It has its own MAC address, IP address, port, and credentials for Redfish access.

func New

func New(mac string, ip string, cred *credential.Credential) (*BMC, error)

New creates a new BMC instance by parsing MAC and IP from strings.

func NewFromAddr

func NewFromAddr(mac net.HardwareAddr, ip net.IP, cred *credential.Credential) (*BMC, error)

NewFromAddr creates a new BMC instance from native net types.

func (*BMC) GetCredential

func (b *BMC) GetCredential() *credential.Credential

GetCredential returns the BMC credential or nil.

func (*BMC) GetIP

func (b *BMC) GetIP() net.IP

GetIP returns the BMC IP address.

func (*BMC) GetMAC

func (b *BMC) GetMAC() net.HardwareAddr

GetMAC returns the BMC MAC address.

func (*BMC) GetPort

func (b *BMC) GetPort() int

GetPort returns the effective port (custom or default 443).

func (*BMC) SetCredential

func (b *BMC) SetCredential(cred *credential.Credential)

SetCredential sets the BMC credential.

func (*BMC) SetIP

func (b *BMC) SetIP(ip string) error

SetIP sets the BMC IP address.

func (*BMC) SetPort

func (b *BMC) SetPort(port int)

SetPort sets a custom port for BMC access.

Jump to

Keyboard shortcuts

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