Update CLI to all use the new expand bracket capability

This commit is contained in:
Gregory Kurtzer
2021-10-15 21:37:47 -07:00
parent 6b12edc122
commit 51c15f3c39
13 changed files with 40 additions and 12 deletions

View File

@@ -7,6 +7,7 @@ import (
"github.com/hpcng/warewulf/internal/pkg/node"
"github.com/hpcng/warewulf/internal/pkg/power"
"github.com/hpcng/warewulf/internal/pkg/wwlog"
"github.com/hpcng/warewulf/pkg/hostlist"
"github.com/spf13/cobra"
)
@@ -25,6 +26,8 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
os.Exit(1)
}
args = hostlist.Expand(args)
if len(args) > 0 {
nodes = node.FilterByName(nodes, args)
} else {