A bunch of changes including reworking the assets -> node API
This commit is contained in:
@@ -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] {
|
||||
|
||||
Reference in New Issue
Block a user