Explicitly enforce the number or arguments accepted by some wwctl subcommands. #1717
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
@@ -13,6 +13,7 @@ var (
|
||||
Long: "This command opens an editor for the given nodes.",
|
||||
RunE: CobraRunE,
|
||||
ValidArgsFunction: completions.Nodes,
|
||||
Args: cobra.ArbitraryArgs,
|
||||
}
|
||||
NoHeader bool
|
||||
)
|
||||
|
||||
@@ -13,6 +13,7 @@ var (
|
||||
Long: "This command exports the given nodes as yaml to stdout.",
|
||||
RunE: CobraRunE,
|
||||
ValidArgsFunction: completions.Nodes,
|
||||
Args: cobra.ArbitraryArgs,
|
||||
}
|
||||
NoHeader bool
|
||||
)
|
||||
|
||||
@@ -25,6 +25,7 @@ func GetCommand() *cobra.Command {
|
||||
RunE: CobraRunE(&vars),
|
||||
Aliases: []string{"ls"},
|
||||
ValidArgsFunction: completions.Nodes,
|
||||
Args: cobra.ArbitraryArgs,
|
||||
}
|
||||
baseCmd.PersistentFlags().BoolVarP(&vars.showNet, "net", "n", false, "Show node network configurations")
|
||||
baseCmd.PersistentFlags().BoolVarP(&vars.showIpmi, "ipmi", "i", false, "Show node IPMI configurations")
|
||||
|
||||
@@ -23,6 +23,7 @@ var (
|
||||
"node ranges. For example: n00[00-4].cluster[0-1] will identify the first 5 nodes\n" +
|
||||
"in cluster0 and cluster1.",
|
||||
Aliases: []string{"nodes"},
|
||||
Args: cobra.NoArgs,
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ var (
|
||||
Long: "View and monitor the status of nodes as they are provisioned and check in.",
|
||||
RunE: CobraRunE,
|
||||
ValidArgsFunction: completions.Nodes,
|
||||
Args: cobra.ArbitraryArgs,
|
||||
}
|
||||
SetWatch bool
|
||||
SetUpdate int
|
||||
|
||||
Reference in New Issue
Block a user