Fix issue that domain globs not supported during wwctl node delete.

Signed-off-by: xu yang <xyang@ciq.com>
This commit is contained in:
xu yang
2024-10-10 04:30:55 +00:00
parent f0e4dccf57
commit f7c4b32fc2
2 changed files with 2 additions and 13 deletions

View File

@@ -158,19 +158,7 @@ func NodeDeleteParameterCheck(ndp *wwapiv1.NodeDeleteParameter, console bool) (n
node_args := hostlist.Expand(ndp.NodeNames)
for _, r := range node_args {
var match bool
for _, n := range nodes {
if n.Id.Get() == r {
nodeList = append(nodeList, n)
match = true
}
}
if !match {
wwlog.Error("ERROR: No match for node: %s\n", r)
}
}
nodeList = node.FilterByName(nodes, node_args)
if len(nodeList) == 0 {
wwlog.Info("No nodes found")