wwctl commands without NodeInfo
mostly remove Get and calls for the id Signed-off-by: Christian Goll <cgoll@suse.com>
This commit is contained in:
committed by
Jonathon Anderson
parent
28a7b9fe84
commit
457c7c16b1
@@ -43,24 +43,24 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
|
||||
|
||||
for _, node := range nodes {
|
||||
|
||||
if node.Ipmi.Ipaddr.Get() == "" {
|
||||
wwlog.Error("%s: No IPMI IP address", node.Id.Get())
|
||||
if node.Ipmi.Ipaddr.IsUnspecified() {
|
||||
wwlog.Error("%s: No IPMI IP address", node.Id())
|
||||
continue
|
||||
}
|
||||
var ipmiInterface = "lan"
|
||||
if node.Ipmi.Interface.Get() != "" {
|
||||
ipmiInterface = node.Ipmi.Interface.Get()
|
||||
if node.Ipmi.Interface != "" {
|
||||
ipmiInterface = node.Ipmi.Interface
|
||||
}
|
||||
var ipmiPort = "623"
|
||||
if node.Ipmi.Port.Get() != "" {
|
||||
ipmiPort = node.Ipmi.Port.Get()
|
||||
if node.Ipmi.Port != "" {
|
||||
ipmiPort = node.Ipmi.Port
|
||||
}
|
||||
ipmiCmd := power.IPMI{
|
||||
NodeName: node.Id.Get(),
|
||||
HostName: node.Ipmi.Ipaddr.Get(),
|
||||
NodeName: node.Id(),
|
||||
HostName: node.Ipmi.Ipaddr.String(),
|
||||
Port: ipmiPort,
|
||||
User: node.Ipmi.UserName.Get(),
|
||||
Password: node.Ipmi.Password.Get(),
|
||||
User: node.Ipmi.UserName,
|
||||
Password: node.Ipmi.Password,
|
||||
Interface: ipmiInterface,
|
||||
AuthType: "MD5",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user