Lots of updates with the node management CLI tools
This commit is contained in:
@@ -14,7 +14,13 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
nodeDB.AddNode(args[0], args[1])
|
||||
for _, a := range args {
|
||||
err = nodeDB.AddNode(SetGroup, a)
|
||||
if err != nil {
|
||||
wwlog.Printf(wwlog.ERROR, "%s\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
nodeDB.Persist()
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ var (
|
||||
Short: "Add new node",
|
||||
Long: "Add new node ",
|
||||
RunE: CobraRunE,
|
||||
Args: cobra.MinimumNArgs(1),
|
||||
}
|
||||
SetGroup string
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user