Audit and correct documentation, cobra help text, and log messages for accuracy
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
var (
|
||||
baseCmd = &cobra.Command{
|
||||
DisableFlagsInUseLine: true,
|
||||
Use: "hostfile [OPTIONS]",
|
||||
Use: "hostfile [OPTIONS]",
|
||||
Short: "update hostfile on master",
|
||||
Long: "Manage the hostfile on the master node\n",
|
||||
RunE: CobraRunE,
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
var (
|
||||
baseCmd = &cobra.Command{
|
||||
Use: "print",
|
||||
Short: "print wareweulf.conf",
|
||||
Short: "print warewulf.conf",
|
||||
Long: "This command prints the actual used warewulf.conf, can be used to create an empty valid warewulf.conf",
|
||||
RunE: CobraRunE,
|
||||
Args: cobra.NoArgs,
|
||||
|
||||
@@ -44,13 +44,13 @@ func init() {
|
||||
baseCmd.PersistentFlags().BoolVarP(&SetUpdate, "update", "u", false, "Overwrite files in an existing image with the files of remote image")
|
||||
baseCmd.PersistentFlags().BoolVarP(&SetBuild, "build", "b", false, "Build image after pulling")
|
||||
baseCmd.PersistentFlags().BoolVar(&SyncUser, "syncuser", false, "Synchronize UIDs/GIDs from host to image")
|
||||
baseCmd.PersistentFlags().BoolVar(&OciNoHttps, "nohttps", false, "Ignore wrong TLS certificates, superseedes env WAREWULF_OCI_NOHTTPS")
|
||||
baseCmd.PersistentFlags().StringVar(&OciUsername, "username", "", "Set username for the access to the registry, superseedes env WAREWULF_OCI_USERNAME")
|
||||
baseCmd.PersistentFlags().StringVar(&OciPassword, "password", "", "Set password for the access to the registry, superseedes env WAREWULF_OCI_PASSWORD")
|
||||
baseCmd.PersistentFlags().StringVar(&OciPassword, "passwd", "", "Set password for the access to the registry, superseedes env WAREWULF_OCI_PASSWORD")
|
||||
baseCmd.PersistentFlags().BoolVar(&OciNoHttps, "nohttps", false, "Ignore wrong TLS certificates, supersedes env WAREWULF_OCI_NOHTTPS")
|
||||
baseCmd.PersistentFlags().StringVar(&OciUsername, "username", "", "Set username for the access to the registry, supersedes env WAREWULF_OCI_USERNAME")
|
||||
baseCmd.PersistentFlags().StringVar(&OciPassword, "password", "", "Set password for the access to the registry, supersedes env WAREWULF_OCI_PASSWORD")
|
||||
baseCmd.PersistentFlags().StringVar(&OciPassword, "passwd", "", "Set password for the access to the registry, supersedes env WAREWULF_OCI_PASSWORD")
|
||||
_ = baseCmd.PersistentFlags().MarkHidden("passwd")
|
||||
baseCmd.PersistentFlags().StringVar(&Platform, "platform", "", "Set other hardware platform e.g. amd64 or arm64, superseedes env WAREWULF_OCI_PLATFORM")
|
||||
baseCmd.PersistentFlags().StringVar(&Platform, "arch", "", "Set other hardware platform, superseedes env WAREWULF_OCI_PLATFORM")
|
||||
baseCmd.PersistentFlags().StringVar(&Platform, "platform", "", "Set other hardware platform e.g. amd64 or arm64, supersedes env WAREWULF_OCI_PLATFORM")
|
||||
baseCmd.PersistentFlags().StringVar(&Platform, "arch", "", "Set other hardware platform, supersedes env WAREWULF_OCI_PLATFORM")
|
||||
_ = baseCmd.PersistentFlags().MarkHidden("arch")
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
|
||||
|
||||
if write && !build {
|
||||
// when write = true and build = false, we will print a warnning, this is the default case
|
||||
wwlog.Warn("Syncuser is completed. Rebuild image or add `--build` flag for automatic rebuild after syncuser.")
|
||||
wwlog.Info("Syncuser is completed. Rebuild image or add `--build` flag for automatic rebuild after syncuser.")
|
||||
} else if write && build {
|
||||
// if write = true and build = true, then it'll trigger the image build after sync
|
||||
cbp := &wwapiv1.ImageBuildParameter{
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
var (
|
||||
baseCmd = &cobra.Command{
|
||||
DisableFlagsInUseLine: true,
|
||||
Use: "export NODENAME",
|
||||
Use: "export NODENAME",
|
||||
Short: "Export nodes as yaml to stdout",
|
||||
Long: "This command exports the given nodes as yaml to stdout.",
|
||||
RunE: CobraRunE,
|
||||
|
||||
@@ -17,7 +17,7 @@ import (
|
||||
var (
|
||||
baseCmd = &cobra.Command{
|
||||
DisableFlagsInUseLine: true,
|
||||
Use: "node COMMAND [OPTONS]",
|
||||
Use: "node COMMAND [OPTIONS]",
|
||||
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" +
|
||||
|
||||
@@ -27,7 +27,7 @@ func init() {
|
||||
panic(err)
|
||||
}
|
||||
baseCmd.PersistentFlags().StringVarP(&OverlayDir, "output", "o", "", `Do not create an overlay image for distribution but write to
|
||||
the given directory. An overlay must also be ge given to use this option.`)
|
||||
the given directory. An overlay must also be given to use this option.`)
|
||||
baseCmd.PersistentFlags().IntVar(&Workers, "workers", 0, "The number of parallel workers building overlays (<=0 indicates 1 worker per CPU)")
|
||||
}
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
var (
|
||||
baseCmd = &cobra.Command{
|
||||
DisableFlagsInUseLine: true,
|
||||
Use: "edit [OPTIONS] NODENAME",
|
||||
Short: "Edit node(s) with editor",
|
||||
Use: "edit [OPTIONS] PROFILE",
|
||||
Short: "Edit profile(s) with editor",
|
||||
Long: "This command opens an editor for the given profiles.",
|
||||
RunE: CobraRunE,
|
||||
ValidArgsFunction: completions.Profiles,
|
||||
|
||||
Reference in New Issue
Block a user