Added controllers, services, and lots of various optimizations and fixes

This commit is contained in:
Gregory Kurtzer
2020-11-30 23:07:42 -08:00
parent 210d0044a5
commit 4d752a67db
35 changed files with 1147 additions and 365 deletions

View File

@@ -21,11 +21,11 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
nodeList, err := nodeDB.SearchByNameList(args)
for _, n := range nodeList {
if SetGroup != "" && SetGroup != n.GroupName.String() {
wwlog.Printf(wwlog.DEBUG, "skipping node of different group: %s/%s\n", n.GroupName, n.Id)
if SetGroup != "" && SetGroup != n.Gid.String() {
wwlog.Printf(wwlog.DEBUG, "skipping node of different group: %s/%s\n", n.Gid, n.Id)
continue
}
err := nodeDB.DelNode(n.GroupName.String(), n.Id.String())
err := nodeDB.DelNode(n.Cid.Get(), n.Gid.Get(), n.Id.Get())
if err != nil {
wwlog.Printf(wwlog.ERROR, "%s\n", err)
} else {