Added IpmiGateway in case of separate BMC and control network

This commit is contained in:
Shannon V. Davidson
2020-12-10 09:52:22 -06:00
parent 56482caea0
commit 643a69b75b
11 changed files with 41 additions and 2 deletions

View File

@@ -164,6 +164,16 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
os.Exit(1)
}
}
if SetIpmiGateway != "" {
wwlog.Printf(wwlog.VERBOSE, "Node: %s, Setting IPMI gateway to: %s\n", n.Id.Get(), SetIpmiGateway)
n.IpmiGateway.Set(SetIpmiGateway)
err := nodeDB.NodeUpdate(n)
if err != nil {
wwlog.Printf(wwlog.ERROR, "%s\n", err)
os.Exit(1)
}
}
if SetIpmiUsername != "" {
wwlog.Printf(wwlog.VERBOSE, "Node: %s, Setting IPMI IP username to: %s\n", n.Id.Get(), SetIpmiUsername)