Updates around VNFS restructure and kernel restructure. More coming.
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
"github.com/hpcng/warewulf/internal/pkg/node"
|
||||
"github.com/hpcng/warewulf/internal/pkg/util"
|
||||
"github.com/hpcng/warewulf/internal/pkg/vnfs"
|
||||
"github.com/hpcng/warewulf/internal/pkg/wwlog"
|
||||
"github.com/manifoldco/promptui"
|
||||
"github.com/spf13/cobra"
|
||||
@@ -43,6 +44,23 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
if SetVnfs != "" {
|
||||
if vnfs.ValidSource(SetVnfs) == true {
|
||||
imageFile := vnfs.ImageFile(SetVnfs)
|
||||
if util.IsFile(imageFile) == false {
|
||||
wwlog.Printf(wwlog.ERROR, "VNFS has not been built: %s\n", SetVnfs)
|
||||
if SetForce == false {
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
wwlog.Printf(wwlog.ERROR, "VNFS does not exist: %s\n", SetVnfs)
|
||||
if SetForce == false {
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for _, n := range nodes {
|
||||
wwlog.Printf(wwlog.VERBOSE, "Evaluating node: %s\n", n.Id.Get())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user