Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove short-form flags #295

Merged
merged 1 commit into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/src/_parts/commands/k8s.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Canonical Kubernetes CLI

```
-h, --help help for k8s
-o, --output-format string set the output format to one of plain, json or yaml (default "plain")
-t, --timeout duration the max time to wait for the command to execute (default 1m30s)
--output-format string set the output format to one of plain, json or yaml (default "plain")
--timeout duration the max time to wait for the command to execute (default 1m30s)
```

### SEE ALSO
Expand Down
6 changes: 3 additions & 3 deletions docs/src/_parts/commands/k8s_bootstrap.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ k8s bootstrap [flags]

```
--address string microcluster address, defaults to the node IP address
--config string path to the YAML file containing your custom cluster bootstrap configuration.
--file string path to the YAML file containing your custom cluster bootstrap configuration.
-h, --help help for bootstrap
--interactive interactively configure the most important cluster options
--name string node name, defaults to hostname
Expand All @@ -23,8 +23,8 @@ k8s bootstrap [flags]
### Options inherited from parent commands

```
-o, --output-format string set the output format to one of plain, json or yaml (default "plain")
-t, --timeout duration the max time to wait for the command to execute (default 1m30s)
--output-format string set the output format to one of plain, json or yaml (default "plain")
--timeout duration the max time to wait for the command to execute (default 1m30s)
```

### SEE ALSO
Expand Down
4 changes: 2 additions & 2 deletions docs/src/_parts/commands/k8s_completion.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ See each sub-command's help for details on how to use the generated script.
### Options inherited from parent commands

```
-o, --output-format string set the output format to one of plain, json or yaml (default "plain")
-t, --timeout duration the max time to wait for the command to execute (default 1m30s)
--output-format string set the output format to one of plain, json or yaml (default "plain")
--timeout duration the max time to wait for the command to execute (default 1m30s)
```

### SEE ALSO
Expand Down
4 changes: 2 additions & 2 deletions docs/src/_parts/commands/k8s_completion_bash.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ k8s completion bash
### Options inherited from parent commands

```
-o, --output-format string set the output format to one of plain, json or yaml (default "plain")
-t, --timeout duration the max time to wait for the command to execute (default 1m30s)
--output-format string set the output format to one of plain, json or yaml (default "plain")
--timeout duration the max time to wait for the command to execute (default 1m30s)
```

### SEE ALSO
Expand Down
4 changes: 2 additions & 2 deletions docs/src/_parts/commands/k8s_completion_fish.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ k8s completion fish [flags]
### Options inherited from parent commands

```
-o, --output-format string set the output format to one of plain, json or yaml (default "plain")
-t, --timeout duration the max time to wait for the command to execute (default 1m30s)
--output-format string set the output format to one of plain, json or yaml (default "plain")
--timeout duration the max time to wait for the command to execute (default 1m30s)
```

### SEE ALSO
Expand Down
4 changes: 2 additions & 2 deletions docs/src/_parts/commands/k8s_completion_powershell.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ k8s completion powershell [flags]
### Options inherited from parent commands

```
-o, --output-format string set the output format to one of plain, json or yaml (default "plain")
-t, --timeout duration the max time to wait for the command to execute (default 1m30s)
--output-format string set the output format to one of plain, json or yaml (default "plain")
--timeout duration the max time to wait for the command to execute (default 1m30s)
```

### SEE ALSO
Expand Down
4 changes: 2 additions & 2 deletions docs/src/_parts/commands/k8s_completion_zsh.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ k8s completion zsh [flags]
### Options inherited from parent commands

```
-o, --output-format string set the output format to one of plain, json or yaml (default "plain")
-t, --timeout duration the max time to wait for the command to execute (default 1m30s)
--output-format string set the output format to one of plain, json or yaml (default "plain")
--timeout duration the max time to wait for the command to execute (default 1m30s)
```

### SEE ALSO
Expand Down
4 changes: 2 additions & 2 deletions docs/src/_parts/commands/k8s_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ k8s config [flags]
### Options inherited from parent commands

```
-o, --output-format string set the output format to one of plain, json or yaml (default "plain")
-t, --timeout duration the max time to wait for the command to execute (default 1m30s)
--output-format string set the output format to one of plain, json or yaml (default "plain")
--timeout duration the max time to wait for the command to execute (default 1m30s)
```

### SEE ALSO
Expand Down
4 changes: 2 additions & 2 deletions docs/src/_parts/commands/k8s_disable.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ k8s disable <functionality> ... [flags]
### Options inherited from parent commands

```
-o, --output-format string set the output format to one of plain, json or yaml (default "plain")
-t, --timeout duration the max time to wait for the command to execute (default 1m30s)
--output-format string set the output format to one of plain, json or yaml (default "plain")
--timeout duration the max time to wait for the command to execute (default 1m30s)
```

### SEE ALSO
Expand Down
4 changes: 2 additions & 2 deletions docs/src/_parts/commands/k8s_enable.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ k8s enable <functionality> ... [flags]
### Options inherited from parent commands

```
-o, --output-format string set the output format to one of plain, json or yaml (default "plain")
-t, --timeout duration the max time to wait for the command to execute (default 1m30s)
--output-format string set the output format to one of plain, json or yaml (default "plain")
--timeout duration the max time to wait for the command to execute (default 1m30s)
```

### SEE ALSO
Expand Down
4 changes: 2 additions & 2 deletions docs/src/_parts/commands/k8s_get-join-token.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ k8s get-join-token <node-name> [flags]
### Options inherited from parent commands

```
-o, --output-format string set the output format to one of plain, json or yaml (default "plain")
-t, --timeout duration the max time to wait for the command to execute (default 1m30s)
--output-format string set the output format to one of plain, json or yaml (default "plain")
--timeout duration the max time to wait for the command to execute (default 1m30s)
```

### SEE ALSO
Expand Down
4 changes: 2 additions & 2 deletions docs/src/_parts/commands/k8s_get.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ k8s get <functionality.key> [flags]
### Options inherited from parent commands

```
-o, --output-format string set the output format to one of plain, json or yaml (default "plain")
-t, --timeout duration the max time to wait for the command to execute (default 1m30s)
--output-format string set the output format to one of plain, json or yaml (default "plain")
--timeout duration the max time to wait for the command to execute (default 1m30s)
```

### SEE ALSO
Expand Down
4 changes: 2 additions & 2 deletions docs/src/_parts/commands/k8s_join-cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ k8s join-cluster <join-token> [flags]
### Options inherited from parent commands

```
-o, --output-format string set the output format to one of plain, json or yaml (default "plain")
-t, --timeout duration the max time to wait for the command to execute (default 1m30s)
--output-format string set the output format to one of plain, json or yaml (default "plain")
--timeout duration the max time to wait for the command to execute (default 1m30s)
```

### SEE ALSO
Expand Down
4 changes: 2 additions & 2 deletions docs/src/_parts/commands/k8s_kubectl.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ k8s kubectl [flags]
### Options inherited from parent commands

```
-o, --output-format string set the output format to one of plain, json or yaml (default "plain")
-t, --timeout duration the max time to wait for the command to execute (default 1m30s)
--output-format string set the output format to one of plain, json or yaml (default "plain")
--timeout duration the max time to wait for the command to execute (default 1m30s)
```

### SEE ALSO
Expand Down
4 changes: 2 additions & 2 deletions docs/src/_parts/commands/k8s_remove-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ k8s remove-node <node-name> [flags]
### Options inherited from parent commands

```
-o, --output-format string set the output format to one of plain, json or yaml (default "plain")
-t, --timeout duration the max time to wait for the command to execute (default 1m30s)
--output-format string set the output format to one of plain, json or yaml (default "plain")
--timeout duration the max time to wait for the command to execute (default 1m30s)
```

### SEE ALSO
Expand Down
4 changes: 2 additions & 2 deletions docs/src/_parts/commands/k8s_set.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ k8s set <functionality.key=value> ... [flags]
### Options inherited from parent commands

```
-o, --output-format string set the output format to one of plain, json or yaml (default "plain")
-t, --timeout duration the max time to wait for the command to execute (default 1m30s)
--output-format string set the output format to one of plain, json or yaml (default "plain")
--timeout duration the max time to wait for the command to execute (default 1m30s)
```

### SEE ALSO
Expand Down
4 changes: 2 additions & 2 deletions docs/src/_parts/commands/k8s_status.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ k8s status [flags]
### Options inherited from parent commands

```
-o, --output-format string set the output format to one of plain, json or yaml (default "plain")
-t, --timeout duration the max time to wait for the command to execute (default 1m30s)
--output-format string set the output format to one of plain, json or yaml (default "plain")
--timeout duration the max time to wait for the command to execute (default 1m30s)
```

### SEE ALSO
Expand Down
4 changes: 2 additions & 2 deletions src/k8s/cmd/k8s/k8s.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ func NewRootCmd(env cmdutil.ExecutionEnvironment) *cobra.Command {
cmd.PersistentFlags().StringVar(&opts.stateDir, "state-dir", "", "directory with the dqlite datastore")
cmd.PersistentFlags().BoolVarP(&opts.logDebug, "debug", "d", false, "show all debug messages")
cmd.PersistentFlags().BoolVarP(&opts.logVerbose, "verbose", "v", true, "show all information messages")
cmd.PersistentFlags().StringVarP(&opts.outputFormat, "output-format", "o", "plain", "set the output format to one of plain, json or yaml")
cmd.PersistentFlags().DurationVarP(&opts.timeout, "timeout", "t", 90*time.Second, "the max time to wait for the command to execute")
cmd.PersistentFlags().StringVar(&opts.outputFormat, "output-format", "plain", "set the output format to one of plain, json or yaml")
cmd.PersistentFlags().DurationVar(&opts.timeout, "timeout", 90*time.Second, "the max time to wait for the command to execute")

// By default, the state dir is set to a fixed directory in the snap.
// This shouldn't be overwritten by the user.
Expand Down
5 changes: 3 additions & 2 deletions src/k8s/cmd/k8s/k8s_bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func newBootstrapCmd(env cmdutil.ExecutionEnvironment) *cobra.Command {
PreRun: chainPreRunHooks(hookRequireRoot(env)),
Run: func(cmd *cobra.Command, args []string) {
if opts.interactive && opts.configFile != "" {
cmd.PrintErrln("Error: --interactive and --config flags cannot be set at the same time.")
cmd.PrintErrln("Error: --interactive and --file flags cannot be set at the same time.")
env.Exit(1)
return
}
Expand Down Expand Up @@ -118,9 +118,10 @@ func newBootstrapCmd(env cmdutil.ExecutionEnvironment) *cobra.Command {
}

cmd.PersistentFlags().BoolVar(&opts.interactive, "interactive", false, "interactively configure the most important cluster options")
cmd.PersistentFlags().StringVar(&opts.configFile, "config", "", "path to the YAML file containing your custom cluster bootstrap configuration.")
cmd.PersistentFlags().StringVar(&opts.configFile, "file", "", "path to the YAML file containing your custom cluster bootstrap configuration.")
cmd.Flags().StringVar(&opts.name, "name", "", "node name, defaults to hostname")
cmd.Flags().StringVar(&opts.address, "address", "", "microcluster address, defaults to the node IP address")

return cmd
}

Expand Down
Loading