Add IPMI Port Configuration
This commit adds the ability to configure the default IPMI port for a profile or per node. If the port is not set, we default to 623. Updated some areas to default to 'lan' for IPMI interface if it has not been set.
This commit is contained in:
@@ -72,6 +72,7 @@ func (config *nodeYaml) FindAllNodes() ([]NodeInfo, error) {
|
||||
n.Init.Set(node.Init)
|
||||
n.IpmiIpaddr.Set(node.IpmiIpaddr)
|
||||
n.IpmiNetmask.Set(node.IpmiNetmask)
|
||||
n.IpmiPort.Set(node.IpmiPort)
|
||||
n.IpmiGateway.Set(node.IpmiGateway)
|
||||
n.IpmiUserName.Set(node.IpmiUserName)
|
||||
n.IpmiPassword.Set(node.IpmiPassword)
|
||||
@@ -121,6 +122,7 @@ func (config *nodeYaml) FindAllNodes() ([]NodeInfo, error) {
|
||||
n.Init.SetAlt(config.NodeProfiles[p].Init, p)
|
||||
n.IpmiIpaddr.SetAlt(config.NodeProfiles[p].IpmiIpaddr, p)
|
||||
n.IpmiNetmask.SetAlt(config.NodeProfiles[p].IpmiNetmask, p)
|
||||
n.IpmiPort.SetAlt(config.NodeProfiles[p].IpmiPort, p)
|
||||
n.IpmiGateway.SetAlt(config.NodeProfiles[p].IpmiGateway, p)
|
||||
n.IpmiUserName.SetAlt(config.NodeProfiles[p].IpmiUserName, p)
|
||||
n.IpmiPassword.SetAlt(config.NodeProfiles[p].IpmiPassword, p)
|
||||
@@ -187,6 +189,7 @@ func (config *nodeYaml) FindAllProfiles() ([]NodeInfo, error) {
|
||||
p.KernelVersion.Set(profile.KernelVersion)
|
||||
p.KernelArgs.Set(profile.KernelArgs)
|
||||
p.IpmiNetmask.Set(profile.IpmiNetmask)
|
||||
p.IpmiPort.Set(profile.IpmiPort)
|
||||
p.IpmiGateway.Set(profile.IpmiGateway)
|
||||
p.IpmiUserName.Set(profile.IpmiUserName)
|
||||
p.IpmiPassword.Set(profile.IpmiPassword)
|
||||
|
||||
@@ -28,6 +28,7 @@ type NodeConf struct {
|
||||
IpmiPassword string `yaml:"ipmi password,omitempty"`
|
||||
IpmiIpaddr string `yaml:"ipmi ipaddr,omitempty"`
|
||||
IpmiNetmask string `yaml:"ipmi netmask,omitempty"`
|
||||
IpmiPort string `yaml:"ipmi port,omitempty"`
|
||||
IpmiGateway string `yaml:"ipmi gateway,omitempty"`
|
||||
IpmiInterface string `yaml:"ipmi interface,omitempty"`
|
||||
RuntimeOverlay string `yaml:"runtime overlay,omitempty"`
|
||||
@@ -75,6 +76,7 @@ type NodeInfo struct {
|
||||
KernelArgs Entry
|
||||
IpmiIpaddr Entry
|
||||
IpmiNetmask Entry
|
||||
IpmiPort Entry
|
||||
IpmiGateway Entry
|
||||
IpmiUserName Entry
|
||||
IpmiPassword Entry
|
||||
|
||||
@@ -63,6 +63,7 @@ func (config *nodeYaml) NodeUpdate(node NodeInfo) error {
|
||||
config.Nodes[nodeID].KernelArgs = node.KernelArgs.GetReal()
|
||||
config.Nodes[nodeID].IpmiIpaddr = node.IpmiIpaddr.GetReal()
|
||||
config.Nodes[nodeID].IpmiNetmask = node.IpmiNetmask.GetReal()
|
||||
config.Nodes[nodeID].IpmiPort = node.IpmiPort.GetReal()
|
||||
config.Nodes[nodeID].IpmiGateway = node.IpmiGateway.GetReal()
|
||||
config.Nodes[nodeID].IpmiUserName = node.IpmiUserName.GetReal()
|
||||
config.Nodes[nodeID].IpmiPassword = node.IpmiPassword.GetReal()
|
||||
@@ -147,6 +148,7 @@ func (config *nodeYaml) ProfileUpdate(profile NodeInfo) error {
|
||||
config.NodeProfiles[profileID].KernelArgs = profile.KernelArgs.GetReal()
|
||||
config.NodeProfiles[profileID].IpmiIpaddr = profile.IpmiIpaddr.GetReal()
|
||||
config.NodeProfiles[profileID].IpmiNetmask = profile.IpmiNetmask.GetReal()
|
||||
config.NodeProfiles[profileID].IpmiPort = profile.IpmiPort.GetReal()
|
||||
config.NodeProfiles[profileID].IpmiGateway = profile.IpmiGateway.GetReal()
|
||||
config.NodeProfiles[profileID].IpmiUserName = profile.IpmiUserName.GetReal()
|
||||
config.NodeProfiles[profileID].IpmiPassword = profile.IpmiPassword.GetReal()
|
||||
|
||||
Reference in New Issue
Block a user