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) SetCredential ¶
func (b *BMC) SetCredential(cred *credential.Credential)
SetCredential sets the BMC credential.
Click to show internal directories.
Click to hide internal directories.