Move wwctl kernel list to wwctl container kernels

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2024-12-04 17:45:32 -07:00
committed by Christian Goll
parent 098c288ce2
commit 6f4d33b19e
9 changed files with 59 additions and 44 deletions

View File

@@ -0,0 +1,24 @@
package kernels
import (
"github.com/spf13/cobra"
"github.com/warewulf/warewulf/internal/app/wwctl/completions"
)
var (
baseCmd = &cobra.Command{
DisableFlagsInUseLine: true,
Use: "kernels [OPTIONS]",
Short: "List available container kernels",
Long: "This command lists the kernels that are available in the imported containers.",
RunE: CobraRunE,
Aliases: []string{"kernel"},
ValidArgsFunction: completions.Containers,
}
)
// GetRootCommand returns the root cobra.Command for the application.
func GetCommand() *cobra.Command {
return baseCmd
}