Documentation ¶
Index ¶
Constants ¶
View Source
const ( // AddressFile is the filename of the BMC address configuration file. AddressFile = "/etc/neco/bmc-address.json" // UserFile is the filename of the BMC user credentials. UserFile = "/etc/neco/bmc-user.json" )
Variables ¶
This section is empty.
Functions ¶
func LoadConfig ¶
func LoadConfig() (*AddressConfig, *UserConfig, error)
LoadConfig loads AddressConfig and UserConfig.
Types ¶
type AddressConfig ¶
type AddressConfig struct {
IPv4 IPv4Config `json:"ipv4"`
}
AddressConfig represents BMC NIC configuration in JSON format.
func (AddressConfig) Validate ¶
func (c AddressConfig) Validate() error
Validate validates address configuration.
type BMCPassword ¶
type BMCPassword struct { Raw string `json:"raw"` Hash string `json:"hash"` Salt string `json:"salt"` }
BMCPassword represents password for a BMC user.
type Credentials ¶
type Credentials struct {
Password BMCPassword `json:"password"`
}
Credentials represents credentials of a BMC user.
type IPv4Config ¶
type IPv4Config struct { Address string `json:"address"` Netmask string `json:"netmask"` Gateway string `json:"gateway"` }
IPv4Config represents NIC configuration parameters for IPv4 network.
func (IPv4Config) Validate ¶
func (c IPv4Config) Validate() error
Validate validates IPv4 configuration.
type UserConfig ¶
type UserConfig struct { Root Credentials `json:"root"` Repair Credentials `json:"repair"` Power Credentials `json:"power"` Support Credentials `json:"support"` }
UserConfig represents a set of BMC user credentials in JSON format.
Click to show internal directories.
Click to hide internal directories.