bmc

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2026 License: Apache-2.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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