Files
warewulf/internal/app/wwctl/resource/root.go
Christian Goll 5ff27061a3 added remote resources
Signed-off-by: Christian Goll <cgoll@suse.com>
2025-01-16 23:00:37 -07:00

31 lines
841 B
Go

package resource
import (
"github.com/spf13/cobra"
"github.com/warewulf/warewulf/internal/app/wwctl/resource/add"
"github.com/warewulf/warewulf/internal/app/wwctl/resource/delete"
"github.com/warewulf/warewulf/internal/app/wwctl/resource/list"
"github.com/warewulf/warewulf/internal/app/wwctl/resource/set"
)
var (
baseCmd = &cobra.Command{
DisableFlagsInUseLine: true,
Use: "resource COMMAND [OPTIONS]",
Short: "manage resources",
Long: "Management of global resources",
}
)
func init() {
baseCmd.AddCommand(list.GetCommand())
baseCmd.AddCommand(set.GetCommand())
baseCmd.AddCommand(add.GetCommand())
baseCmd.AddCommand(delete.GetCommand())
}
// GetRootCommand returns the root cobra.Command for the application.
func GetCommand() *cobra.Command {
return baseCmd
}