add docstring for node patterns
Signed-off-by: Tobias Ribizel <mail@ribizel.de>
This commit is contained in:
@@ -3,6 +3,7 @@ package list
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/warewulf/warewulf/internal/app/wwctl/completions"
|
||||
"github.com/warewulf/warewulf/internal/pkg/hostlist"
|
||||
)
|
||||
|
||||
type variables struct {
|
||||
@@ -21,7 +22,7 @@ func GetCommand() *cobra.Command {
|
||||
Use: "list [OPTIONS] [PATTERN]",
|
||||
Short: "List nodes",
|
||||
Long: "This command lists all configured nodes. Optionally, it will list only\n" +
|
||||
"nodes matching a PATTERN.",
|
||||
"nodes matching a PATTERN.\n" + hostlist.Docstring,
|
||||
RunE: CobraRunE(&vars),
|
||||
Aliases: []string{"ls"},
|
||||
ValidArgsFunction: completions.Nodes,
|
||||
|
||||
@@ -3,6 +3,7 @@ package sensors
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/warewulf/warewulf/internal/app/wwctl/completions"
|
||||
"github.com/warewulf/warewulf/internal/pkg/hostlist"
|
||||
)
|
||||
|
||||
type variables struct {
|
||||
@@ -18,7 +19,7 @@ func GetCommand() *cobra.Command {
|
||||
DisableFlagsInUseLine: true,
|
||||
Use: "sensors [OPTIONS] PATTERN",
|
||||
Short: "Show node IPMI sensor information",
|
||||
Long: "Show IPMI sensor information for nodes matching PATTERN.",
|
||||
Long: "Show IPMI sensor information for nodes matching PATTERN.\n" + hostlist.Docstring,
|
||||
Args: cobra.MinimumNArgs(1),
|
||||
RunE: CobraRunE(&vars),
|
||||
ValidArgsFunction: completions.Nodes,
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"github.com/warewulf/warewulf/internal/app/wwctl/completions"
|
||||
"github.com/warewulf/warewulf/internal/app/wwctl/flags"
|
||||
"github.com/warewulf/warewulf/internal/pkg/node"
|
||||
"github.com/warewulf/warewulf/internal/pkg/hostlist"
|
||||
)
|
||||
|
||||
type variables struct {
|
||||
@@ -23,7 +24,7 @@ func GetCommand() *cobra.Command {
|
||||
DisableFlagsInUseLine: true,
|
||||
Use: "set [OPTIONS] PATTERN",
|
||||
Short: "Configure node properties",
|
||||
Long: "This command sets configuration properties for nodes matching PATTERN.\n\nNote: use the string 'UNSET' to remove a configuration",
|
||||
Long: "This command sets configuration properties for nodes matching PATTERN.\n\nNote: use the string 'UNSET' to remove a configuration\n" + hostlist.Docstring,
|
||||
Aliases: []string{"modify"},
|
||||
Args: cobra.MinimumNArgs(1), // require pattern as a mandatory arg
|
||||
RunE: CobraRunE(&vars),
|
||||
|
||||
Reference in New Issue
Block a user