wwctl profile args and completions
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
@@ -37,9 +37,6 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
|
||||
if np == r {
|
||||
wwlog.Verbose("Removing profile from node %s: %s", n.Id(), r)
|
||||
n.Profiles = append(n.Profiles[:i], n.Profiles[i+1:]...)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to update node: %w", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ var (
|
||||
Aliases: []string{"remove", "rm", "del"},
|
||||
RunE: CobraRunE,
|
||||
Args: cobra.MinimumNArgs(1),
|
||||
ValidArgsFunction: completions.Profiles,
|
||||
ValidArgsFunction: completions.Profiles(0), // no limit
|
||||
}
|
||||
SetYes bool
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user