Update templates for IPMI
This commit is contained in:
@@ -23,6 +23,10 @@ type TemplateStruct struct {
|
||||
Hostname string
|
||||
GroupName string
|
||||
Vnfs string
|
||||
IpmiIpaddr string
|
||||
IpmiNetmask string
|
||||
IpmiUserName string
|
||||
IpmiPassword string
|
||||
NetDevs map[string]*node.NetDevs
|
||||
}
|
||||
AllNodes []node.NodeInfo
|
||||
@@ -134,6 +138,10 @@ func buildOverlay(nodeList []node.NodeInfo, overlayType string) error {
|
||||
t.Self.Hostname = node.HostName.Get()
|
||||
t.Self.GroupName = node.Gid.Get()
|
||||
t.Self.Vnfs = node.Vnfs.Get()
|
||||
t.Self.IpmiIpaddr = node.IpmiIpaddr.Get()
|
||||
t.Self.IpmiNetmask = node.IpmiNetmask.Get()
|
||||
t.Self.IpmiUserName = node.IpmiUserName.Get()
|
||||
t.Self.IpmiPassword = node.IpmiPassword.Get()
|
||||
t.Self.NetDevs = node.NetDevs
|
||||
t.AllNodes = allNodes
|
||||
|
||||
|
||||
@@ -8,15 +8,13 @@ if [ ! -e /dev/ipmi0 ]; then
|
||||
ls -la /dev/ipmi0
|
||||
fi
|
||||
|
||||
IP="{{.Self.IpmiIpaddr}}"
|
||||
NETMASK="{{.Self.IpmiNetmask}}"
|
||||
GATEWAY="{{.Self.NetDevs.eth0.Gateway}}"
|
||||
USER="{{.Self.IpmiUserName}}"
|
||||
PASS="{{.Self.IpmiPassword}}"
|
||||
IP="{{$.Self.IpmiIpaddr}}"
|
||||
NETMASK="{{$.Self.IpmiNetmask}}"
|
||||
USER="{{$.Self.IpmiUserName}}"
|
||||
PASS="{{$.Self.IpmiPassword}}"
|
||||
|
||||
echo IP is $IP
|
||||
echo NETMASK is $NETMASK
|
||||
echo GATEWAY is $GATEWAY
|
||||
echo USER is $USER
|
||||
echo PASS is $PASS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user