Lots of updates with the node management CLI tools

This commit is contained in:
Gregory Kurtzer
2020-11-22 20:35:13 -08:00
parent 5181940952
commit 5cd1dc901e
18 changed files with 579 additions and 139 deletions

View File

@@ -14,8 +14,13 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
os.Exit(1)
}
nodeDB.AddGroup(args[0])
for _, g := range args {
err = nodeDB.AddGroup(g)
if err != nil {
wwlog.Printf(wwlog.ERROR, "%s\n", err)
os.Exit(1)
}
}
nodeDB.Persist()

View File

@@ -8,10 +8,10 @@ var (
Short: "Add a new node group",
Long: "Add a new node group ",
RunE: CobraRunE,
Args: cobra.MinimumNArgs(1),
}
SetVnfs string
SetKernel string
// SetGroupLevel bool
)
func init() {