A bunch of changes including reworking the assets -> node API

This commit is contained in:
Gregory Kurtzer
2020-11-20 17:59:06 -08:00
parent dd2d83788a
commit 221e71b384
28 changed files with 367 additions and 291 deletions

View File

@@ -2,8 +2,8 @@ package mkdir
import (
"fmt"
"github.com/hpcng/warewulf/internal/pkg/assets"
"github.com/hpcng/warewulf/internal/pkg/config"
"github.com/hpcng/warewulf/internal/pkg/node"
"github.com/hpcng/warewulf/internal/pkg/overlay"
"github.com/hpcng/warewulf/internal/pkg/util"
"github.com/hpcng/warewulf/internal/pkg/wwlog"
@@ -42,13 +42,19 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
fmt.Printf("Created directory within overlay: %s:%s\n", args[0], args[1])
if NoOverlayUpdate == false {
nodes, err := assets.FindAllNodes()
n, err := node.New()
if err != nil {
wwlog.Printf(wwlog.ERROR, "Could not open node configuration: %s\n", err)
os.Exit(1)
}
nodes, err := n.FindAllNodes()
if err != nil {
wwlog.Printf(wwlog.ERROR, "Cloud not get nodeList: %s\n", err)
os.Exit(1)
}
var updateNodes []assets.NodeInfo
var updateNodes []node.NodeInfo
for _, node := range nodes {
if SystemOverlay == true && node.SystemOverlay == args[0] {