Files
warewulf/internal/app/wwctl/node/root.go
Jonathon Anderson 5b50ef724c Fix 'nodes' alias for 'node' not 'profile'
Fixes #609

Signed-off-by: Jonathon Anderson <janderson@ciq.co>
2023-01-06 14:17:46 -07:00

46 lines
1.6 KiB
Go

package node
import (
"github.com/hpcng/warewulf/internal/app/wwctl/node/add"
"github.com/hpcng/warewulf/internal/app/wwctl/node/console"
"github.com/hpcng/warewulf/internal/app/wwctl/node/delete"
"github.com/hpcng/warewulf/internal/app/wwctl/node/edit"
"github.com/hpcng/warewulf/internal/app/wwctl/node/export"
"github.com/hpcng/warewulf/internal/app/wwctl/node/imprt"
"github.com/hpcng/warewulf/internal/app/wwctl/node/list"
"github.com/hpcng/warewulf/internal/app/wwctl/node/sensors"
"github.com/hpcng/warewulf/internal/app/wwctl/node/set"
nodestatus "github.com/hpcng/warewulf/internal/app/wwctl/node/status"
"github.com/spf13/cobra"
)
var (
baseCmd = &cobra.Command{
DisableFlagsInUseLine: true,
Use: "node COMMAND [OPTONS]",
Short: "Node management",
Long: "Management of node settings. All node ranges can use brackets to identify\n" +
"node ranges. For example: n00[00-4].cluster[0-1] will identify the first 5 nodes\n" +
"in cluster0 and cluster1.",
Aliases: []string{"nodes"},
}
)
func init() {
baseCmd.AddCommand(sensors.GetCommand())
baseCmd.AddCommand(list.GetCommand())
baseCmd.AddCommand(set.GetCommand())
baseCmd.AddCommand(add.GetCommand())
baseCmd.AddCommand(delete.GetCommand())
baseCmd.AddCommand(console.GetCommand())
baseCmd.AddCommand(nodestatus.GetCommand())
baseCmd.AddCommand(edit.GetCommand())
baseCmd.AddCommand(imprt.GetCommand())
baseCmd.AddCommand(export.GetCommand())
}
// GetRootCommand returns the root cobra.Command for the application.
func GetCommand() *cobra.Command {
return baseCmd
}