2018-03-21 17:16:13 +00:00
|
|
|
package command
|
2015-06-01 11:46:21 +00:00
|
|
|
|
|
|
|
import (
|
2018-03-21 17:16:13 +00:00
|
|
|
"fmt"
|
2015-06-01 11:46:21 +00:00
|
|
|
"os"
|
|
|
|
|
2015-08-16 01:34:47 +00:00
|
|
|
"github.com/hashicorp/nomad/command/agent"
|
2017-08-16 22:42:15 +00:00
|
|
|
"github.com/hashicorp/nomad/version"
|
2019-02-20 13:01:35 +00:00
|
|
|
colorable "github.com/mattn/go-colorable"
|
2015-06-01 11:46:21 +00:00
|
|
|
"github.com/mitchellh/cli"
|
|
|
|
)
|
|
|
|
|
2018-03-21 18:18:26 +00:00
|
|
|
const (
|
|
|
|
// EnvNomadCLINoColor is an env var that toggles colored UI output.
|
|
|
|
EnvNomadCLINoColor = `NOMAD_CLI_NO_COLOR`
|
2021-10-06 14:02:42 +00:00
|
|
|
|
|
|
|
// EnvNomadCLIForceColor is an env var that forces colored UI output.
|
|
|
|
EnvNomadCLIForceColor = `NOMAD_CLI_FORCE_COLOR`
|
2018-03-21 18:18:26 +00:00
|
|
|
)
|
|
|
|
|
2018-03-21 17:16:13 +00:00
|
|
|
// DeprecatedCommand is a command that wraps an existing command and prints a
|
|
|
|
// deprecation notice and points the user to the new command. Deprecated
|
|
|
|
// commands are always hidden from help output.
|
|
|
|
type DeprecatedCommand struct {
|
|
|
|
cli.Command
|
|
|
|
Meta
|
|
|
|
|
|
|
|
// Old is the old command name, New is the new command name.
|
|
|
|
Old, New string
|
|
|
|
}
|
|
|
|
|
|
|
|
// Help wraps the embedded Help command and prints a warning about deprecations.
|
|
|
|
func (c *DeprecatedCommand) Help() string {
|
|
|
|
c.warn()
|
|
|
|
return c.Command.Help()
|
|
|
|
}
|
|
|
|
|
|
|
|
// Run wraps the embedded Run command and prints a warning about deprecation.
|
|
|
|
func (c *DeprecatedCommand) Run(args []string) int {
|
|
|
|
c.warn()
|
|
|
|
return c.Command.Run(args)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *DeprecatedCommand) warn() {
|
|
|
|
c.Ui.Warn(wrapAtLength(fmt.Sprintf(
|
|
|
|
"WARNING! The \"nomad %s\" command is deprecated. Please use \"nomad %s\" "+
|
2022-06-20 19:21:19 +00:00
|
|
|
"instead. This command will be removed a later version of Nomad.",
|
2018-03-21 17:16:13 +00:00
|
|
|
c.Old,
|
|
|
|
c.New)))
|
|
|
|
c.Ui.Warn("")
|
|
|
|
}
|
|
|
|
|
2018-04-18 16:02:11 +00:00
|
|
|
// NamedCommand is a interface to denote a commmand's name.
|
|
|
|
type NamedCommand interface {
|
|
|
|
Name() string
|
|
|
|
}
|
|
|
|
|
2015-09-20 20:37:11 +00:00
|
|
|
// Commands returns the mapping of CLI commands for Nomad. The meta
|
2015-06-01 11:46:21 +00:00
|
|
|
// parameter lets you set meta options for all commands.
|
2018-03-30 18:42:11 +00:00
|
|
|
func Commands(metaPtr *Meta, agentUi cli.Ui) map[string]cli.CommandFactory {
|
2015-06-01 11:46:21 +00:00
|
|
|
if metaPtr == nil {
|
2018-03-21 17:16:13 +00:00
|
|
|
metaPtr = new(Meta)
|
2015-06-01 11:46:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
meta := *metaPtr
|
|
|
|
if meta.Ui == nil {
|
2015-09-16 23:08:39 +00:00
|
|
|
meta.Ui = &cli.BasicUi{
|
2016-03-24 21:43:20 +00:00
|
|
|
Reader: os.Stdin,
|
2019-02-20 13:01:35 +00:00
|
|
|
Writer: colorable.NewColorableStdout(),
|
|
|
|
ErrorWriter: colorable.NewColorableStderr(),
|
2015-06-01 11:46:21 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-03-21 17:16:13 +00:00
|
|
|
all := map[string]cli.CommandFactory{
|
2017-09-11 17:46:17 +00:00
|
|
|
"acl": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &ACLCommand{
|
2017-09-11 17:46:17 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"acl bootstrap": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &ACLBootstrapCommand{
|
2017-09-11 17:46:17 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2017-09-15 04:31:05 +00:00
|
|
|
"acl policy": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &ACLPolicyCommand{
|
2017-09-15 04:31:05 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"acl policy apply": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &ACLPolicyApplyCommand{
|
2017-09-15 04:31:05 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2017-09-17 18:22:07 +00:00
|
|
|
"acl policy delete": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &ACLPolicyDeleteCommand{
|
2017-09-17 18:22:07 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2017-09-17 13:36:54 +00:00
|
|
|
"acl policy info": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &ACLPolicyInfoCommand{
|
2017-09-17 13:36:54 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2017-10-13 20:45:10 +00:00
|
|
|
"acl policy list": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &ACLPolicyListCommand{
|
2017-10-13 20:45:10 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2022-08-12 07:52:32 +00:00
|
|
|
"acl role": func() (cli.Command, error) {
|
|
|
|
return &ACLRoleCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"acl role create": func() (cli.Command, error) {
|
|
|
|
return &ACLRoleCreateCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"acl role delete": func() (cli.Command, error) {
|
|
|
|
return &ACLRoleDeleteCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"acl role info": func() (cli.Command, error) {
|
|
|
|
return &ACLRoleInfoCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"acl role list": func() (cli.Command, error) {
|
|
|
|
return &ACLRoleListCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"acl role update": func() (cli.Command, error) {
|
|
|
|
return &ACLRoleUpdateCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2017-09-15 04:55:25 +00:00
|
|
|
"acl token": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &ACLTokenCommand{
|
2017-09-15 04:55:25 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"acl token create": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &ACLTokenCreateCommand{
|
2017-09-15 04:55:25 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2017-09-15 23:54:41 +00:00
|
|
|
"acl token update": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &ACLTokenUpdateCommand{
|
2017-09-15 23:54:41 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2017-09-15 16:29:46 +00:00
|
|
|
"acl token delete": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &ACLTokenDeleteCommand{
|
2017-09-15 16:29:46 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2017-09-16 00:03:22 +00:00
|
|
|
"acl token info": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &ACLTokenInfoCommand{
|
2017-09-16 00:03:22 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2019-04-12 15:48:36 +00:00
|
|
|
"acl token list": func() (cli.Command, error) {
|
|
|
|
return &ACLTokenListCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2017-10-13 20:45:10 +00:00
|
|
|
"acl token self": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &ACLTokenSelfCommand{
|
2017-10-13 20:45:10 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2018-03-21 00:37:28 +00:00
|
|
|
"alloc": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &AllocCommand{
|
2018-03-21 00:37:28 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2019-04-28 21:35:17 +00:00
|
|
|
"alloc exec": func() (cli.Command, error) {
|
|
|
|
return &AllocExecCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2019-04-03 10:46:15 +00:00
|
|
|
"alloc signal": func() (cli.Command, error) {
|
|
|
|
return &AllocSignalCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2019-04-01 14:21:03 +00:00
|
|
|
"alloc stop": func() (cli.Command, error) {
|
|
|
|
return &AllocStopCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2018-03-21 00:37:28 +00:00
|
|
|
"alloc fs": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &AllocFSCommand{
|
2018-03-21 00:37:28 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"alloc logs": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &AllocLogsCommand{
|
2018-03-21 00:37:28 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2019-04-01 12:56:02 +00:00
|
|
|
"alloc restart": func() (cli.Command, error) {
|
|
|
|
return &AllocRestartCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2022-08-05 13:30:17 +00:00
|
|
|
"alloc checks": func() (cli.Command, error) {
|
|
|
|
return &AllocChecksCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2018-03-21 00:37:28 +00:00
|
|
|
"alloc status": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &AllocStatusCommand{
|
2018-03-21 00:37:28 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2015-09-27 19:02:14 +00:00
|
|
|
"alloc-status": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &AllocStatusCommand{
|
2015-09-27 19:02:14 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2015-08-16 01:34:47 +00:00
|
|
|
"agent": func() (cli.Command, error) {
|
|
|
|
return &agent.Command{
|
2017-08-16 22:42:15 +00:00
|
|
|
Version: version.GetVersion(),
|
2018-03-30 18:42:11 +00:00
|
|
|
Ui: agentUi,
|
2017-08-16 22:42:15 +00:00
|
|
|
ShutdownCh: make(chan struct{}),
|
2015-08-16 01:34:47 +00:00
|
|
|
}, nil
|
|
|
|
},
|
2015-09-22 18:01:41 +00:00
|
|
|
"agent-info": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &AgentInfoCommand{
|
2015-09-14 20:13:52 +00:00
|
|
|
Meta: meta,
|
2015-09-11 19:31:13 +00:00
|
|
|
}, nil
|
|
|
|
},
|
2016-04-10 08:13:25 +00:00
|
|
|
"check": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &AgentCheckCommand{
|
2015-09-25 04:31:15 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2022-02-08 21:52:35 +00:00
|
|
|
"config": func() (cli.Command, error) {
|
|
|
|
return &ConfigCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"config validate": func() (cli.Command, error) {
|
|
|
|
return &ConfigValidateCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2020-08-11 19:39:44 +00:00
|
|
|
// operator debug was released in 0.12 as debug. This top-level alias preserves compatibility
|
2020-06-25 16:51:23 +00:00
|
|
|
"debug": func() (cli.Command, error) {
|
2020-08-11 19:39:44 +00:00
|
|
|
return &OperatorDebugCommand{
|
2020-06-25 16:51:23 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2017-06-30 17:59:19 +00:00
|
|
|
"deployment": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &DeploymentCommand{
|
2017-06-30 17:59:19 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2017-06-30 21:27:13 +00:00
|
|
|
"deployment fail": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &DeploymentFailCommand{
|
2017-06-30 21:27:13 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2017-06-30 17:59:19 +00:00
|
|
|
"deployment list": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &DeploymentListCommand{
|
2017-06-30 17:59:19 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2017-06-30 21:27:13 +00:00
|
|
|
"deployment pause": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &DeploymentPauseCommand{
|
2017-06-30 21:27:13 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2017-06-30 23:22:06 +00:00
|
|
|
"deployment promote": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &DeploymentPromoteCommand{
|
2017-06-30 23:22:06 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2017-06-30 21:27:13 +00:00
|
|
|
"deployment resume": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &DeploymentResumeCommand{
|
2017-06-30 21:27:13 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2017-06-30 19:35:59 +00:00
|
|
|
"deployment status": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &DeploymentStatusCommand{
|
2017-06-30 19:35:59 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2020-06-15 19:01:54 +00:00
|
|
|
"deployment unblock": func() (cli.Command, error) {
|
|
|
|
return &DeploymentUnblockCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2018-03-21 00:37:28 +00:00
|
|
|
"eval": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &EvalCommand{
|
2018-03-21 00:37:28 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2022-07-06 14:30:11 +00:00
|
|
|
"eval delete": func() (cli.Command, error) {
|
|
|
|
return &EvalDeleteCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2021-12-15 16:58:38 +00:00
|
|
|
"eval list": func() (cli.Command, error) {
|
|
|
|
return &EvalListCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2018-03-21 00:37:28 +00:00
|
|
|
"eval status": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &EvalStatusCommand{
|
2018-03-21 00:37:28 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2016-05-25 21:11:14 +00:00
|
|
|
"eval-status": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &EvalStatusCommand{
|
2015-09-14 20:13:52 +00:00
|
|
|
Meta: meta,
|
2015-09-11 17:50:39 +00:00
|
|
|
}, nil
|
|
|
|
},
|
2019-04-28 21:35:17 +00:00
|
|
|
"exec": func() (cli.Command, error) {
|
|
|
|
return &AllocExecCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2022-10-06 21:00:29 +00:00
|
|
|
"fmt": func() (cli.Command, error) {
|
|
|
|
return &FormatCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2016-02-05 19:01:29 +00:00
|
|
|
"fs": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &AllocFSCommand{
|
2016-02-02 22:36:11 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2015-09-21 00:06:02 +00:00
|
|
|
"init": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &JobInitCommand{
|
2015-09-21 00:06:02 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2016-03-21 19:46:35 +00:00
|
|
|
"inspect": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &JobInspectCommand{
|
2016-03-21 19:46:35 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2016-12-05 05:22:13 +00:00
|
|
|
"job": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &JobCommand{
|
2016-12-05 05:22:13 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2021-10-12 20:30:36 +00:00
|
|
|
"job allocs": func() (cli.Command, error) {
|
|
|
|
return &JobAllocsCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2017-07-01 00:37:12 +00:00
|
|
|
"job deployments": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &JobDeploymentsCommand{
|
2017-07-01 00:37:12 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2016-12-05 05:22:13 +00:00
|
|
|
"job dispatch": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &JobDispatchCommand{
|
2016-12-05 05:22:13 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2018-05-09 20:04:27 +00:00
|
|
|
"job eval": func() (cli.Command, error) {
|
|
|
|
return &JobEvalCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2017-06-30 00:16:20 +00:00
|
|
|
"job history": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &JobHistoryCommand{
|
2017-07-19 22:39:32 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2018-03-21 00:37:28 +00:00
|
|
|
"job init": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &JobInitCommand{
|
2018-03-21 00:37:28 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"job inspect": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &JobInspectCommand{
|
2018-03-21 00:37:28 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2019-04-12 18:56:02 +00:00
|
|
|
"job periodic": func() (cli.Command, error) {
|
|
|
|
return &JobPeriodicCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"job periodic force": func() (cli.Command, error) {
|
|
|
|
return &JobPeriodicForceCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2018-03-21 00:37:28 +00:00
|
|
|
"job plan": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &JobPlanCommand{
|
2018-03-21 00:37:28 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2017-07-19 22:39:32 +00:00
|
|
|
"job promote": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &JobPromoteCommand{
|
2017-06-30 00:16:20 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2017-06-30 03:28:52 +00:00
|
|
|
"job revert": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &JobRevertCommand{
|
2017-06-30 03:28:52 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2018-03-21 00:37:28 +00:00
|
|
|
"job run": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &JobRunCommand{
|
2018-03-21 00:37:28 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2020-10-06 07:58:46 +00:00
|
|
|
"job scale": func() (cli.Command, error) {
|
|
|
|
return &JobScaleCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"job scaling-events": func() (cli.Command, error) {
|
|
|
|
return &JobScalingEventsCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2017-08-09 15:05:55 +00:00
|
|
|
"job status": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &JobStatusCommand{
|
2017-08-09 15:05:55 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2018-03-21 00:37:28 +00:00
|
|
|
"job stop": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &JobStopCommand{
|
2018-03-21 00:37:28 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"job validate": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &JobValidateCommand{
|
2018-03-21 00:37:28 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2020-05-26 16:39:39 +00:00
|
|
|
"license": func() (cli.Command, error) {
|
|
|
|
return &LicenseCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"license get": func() (cli.Command, error) {
|
|
|
|
return &LicenseGetCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2016-07-18 18:39:38 +00:00
|
|
|
"logs": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &AllocLogsCommand{
|
2016-07-18 18:39:38 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2019-10-07 20:41:52 +00:00
|
|
|
"monitor": func() (cli.Command, error) {
|
|
|
|
return &MonitorCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2017-09-07 23:56:15 +00:00
|
|
|
"namespace": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &NamespaceCommand{
|
2017-09-07 23:56:15 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"namespace apply": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &NamespaceApplyCommand{
|
2017-09-07 23:56:15 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"namespace delete": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &NamespaceDeleteCommand{
|
2017-09-07 23:56:15 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2017-10-13 21:36:02 +00:00
|
|
|
"namespace inspect": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &NamespaceInspectCommand{
|
2017-10-13 21:36:02 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2017-09-07 23:56:15 +00:00
|
|
|
"namespace list": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &NamespaceListCommand{
|
2017-09-07 23:56:15 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2017-10-13 21:36:02 +00:00
|
|
|
"namespace status": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &NamespaceStatusCommand{
|
2017-10-13 21:36:02 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2018-02-23 23:56:36 +00:00
|
|
|
"node": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &NodeCommand{
|
2018-02-23 23:56:36 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2018-03-21 00:37:28 +00:00
|
|
|
"node config": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &NodeConfigCommand{
|
2018-03-21 00:37:28 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2015-09-22 18:01:41 +00:00
|
|
|
"node-drain": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &NodeDrainCommand{
|
2015-09-14 20:13:52 +00:00
|
|
|
Meta: meta,
|
2015-09-11 22:48:36 +00:00
|
|
|
}, nil
|
|
|
|
},
|
2018-02-23 23:56:36 +00:00
|
|
|
"node drain": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &NodeDrainCommand{
|
2018-02-23 23:56:36 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2018-02-27 21:54:27 +00:00
|
|
|
"node eligibility": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &NodeEligibilityCommand{
|
2018-02-27 21:54:27 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2015-09-22 18:01:41 +00:00
|
|
|
"node-status": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &NodeStatusCommand{
|
2015-09-14 20:13:52 +00:00
|
|
|
Meta: meta,
|
2015-09-11 19:58:16 +00:00
|
|
|
}, nil
|
|
|
|
},
|
2018-02-23 23:56:36 +00:00
|
|
|
"node status": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &NodeStatusCommand{
|
2018-02-23 23:56:36 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2017-02-10 01:58:20 +00:00
|
|
|
"operator": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &OperatorCommand{
|
2017-02-10 01:58:20 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
|
2022-02-19 00:47:39 +00:00
|
|
|
"operator api": func() (cli.Command, error) {
|
|
|
|
return &OperatorAPICommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
|
2017-12-18 21:16:23 +00:00
|
|
|
"operator autopilot": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &OperatorAutopilotCommand{
|
2017-12-18 21:16:23 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
|
|
|
|
"operator autopilot get-config": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &OperatorAutopilotGetCommand{
|
2017-12-18 21:16:23 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
|
|
|
|
"operator autopilot set-config": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &OperatorAutopilotSetCommand{
|
2017-12-18 21:16:23 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2020-08-11 19:39:44 +00:00
|
|
|
"operator debug": func() (cli.Command, error) {
|
|
|
|
return &OperatorDebugCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2022-06-20 19:21:19 +00:00
|
|
|
|
|
|
|
// COMPAT(1.4.0): deprecated, remove in Nomad 1.5.0
|
|
|
|
// Note: we can't just put this in the DeprecatedCommand list
|
|
|
|
// because the flags have changed too. So we've provided the
|
|
|
|
// deprecation warning in the original command and when it's
|
|
|
|
// time to remove it we can remove the entire command
|
|
|
|
"operator keyring": func() (cli.Command, error) {
|
|
|
|
return &OperatorKeyringCommand{
|
2018-03-21 00:37:28 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2022-06-20 19:21:19 +00:00
|
|
|
|
|
|
|
"operator gossip keyring": func() (cli.Command, error) {
|
|
|
|
return &OperatorGossipKeyringCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"operator gossip keyring install": func() (cli.Command, error) {
|
|
|
|
return &OperatorGossipKeyringInstallCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"operator gossip keyring use": func() (cli.Command, error) {
|
|
|
|
return &OperatorGossipKeyringUseCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"operator gossip keyring list": func() (cli.Command, error) {
|
|
|
|
return &OperatorGossipKeyringListCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"operator gossip keyring remove": func() (cli.Command, error) {
|
|
|
|
return &OperatorGossipKeyringRemoveCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"operator gossip keyring generate": func() (cli.Command, error) {
|
|
|
|
return &OperatorGossipKeyringGenerateCommand{
|
2018-03-21 00:37:28 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2022-06-20 19:21:19 +00:00
|
|
|
|
2020-10-06 02:30:01 +00:00
|
|
|
"operator metrics": func() (cli.Command, error) {
|
|
|
|
return &OperatorMetricsCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2017-02-10 01:58:20 +00:00
|
|
|
"operator raft": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &OperatorRaftCommand{
|
2017-02-10 01:58:20 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
|
|
|
|
"operator raft list-peers": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &OperatorRaftListCommand{
|
2017-02-10 01:58:20 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
|
|
|
|
"operator raft remove-peer": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &OperatorRaftRemoveCommand{
|
2017-02-10 01:58:20 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2021-12-16 15:32:11 +00:00
|
|
|
"operator raft info": func() (cli.Command, error) {
|
2020-08-21 21:16:42 +00:00
|
|
|
return &OperatorRaftInfoCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2021-12-16 15:32:11 +00:00
|
|
|
"operator raft logs": func() (cli.Command, error) {
|
2020-08-21 21:16:42 +00:00
|
|
|
return &OperatorRaftLogsCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2021-12-16 15:32:11 +00:00
|
|
|
"operator raft state": func() (cli.Command, error) {
|
2020-08-21 21:16:42 +00:00
|
|
|
return &OperatorRaftStateCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2022-07-06 14:13:48 +00:00
|
|
|
"operator scheduler": func() (cli.Command, error) {
|
|
|
|
return &OperatorSchedulerCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"operator scheduler get-config": func() (cli.Command, error) {
|
|
|
|
return &OperatorSchedulerGetConfig{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"operator scheduler set-config": func() (cli.Command, error) {
|
|
|
|
return &OperatorSchedulerSetConfig{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2022-08-26 18:03:56 +00:00
|
|
|
"operator root keyring": func() (cli.Command, error) {
|
|
|
|
return &OperatorRootKeyringCommand{
|
2022-06-07 20:06:44 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2022-08-26 18:03:56 +00:00
|
|
|
"operator root keyring list": func() (cli.Command, error) {
|
|
|
|
return &OperatorRootKeyringListCommand{
|
2022-06-14 15:22:42 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2022-08-26 18:03:56 +00:00
|
|
|
"operator root keyring remove": func() (cli.Command, error) {
|
|
|
|
return &OperatorRootKeyringRemoveCommand{
|
2022-06-14 15:22:42 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2022-08-26 18:03:56 +00:00
|
|
|
"operator root keyring rotate": func() (cli.Command, error) {
|
|
|
|
return &OperatorRootKeyringRotateCommand{
|
2022-06-14 15:22:42 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2020-05-21 23:11:45 +00:00
|
|
|
"operator snapshot": func() (cli.Command, error) {
|
|
|
|
return &OperatorSnapshotCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"operator snapshot save": func() (cli.Command, error) {
|
|
|
|
return &OperatorSnapshotSaveCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2020-05-21 23:43:47 +00:00
|
|
|
"operator snapshot inspect": func() (cli.Command, error) {
|
|
|
|
return &OperatorSnapshotInspectCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2021-12-16 15:32:11 +00:00
|
|
|
"operator snapshot state": func() (cli.Command, error) {
|
2021-11-04 14:16:12 +00:00
|
|
|
return &OperatorSnapshotStateCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2020-06-06 13:16:58 +00:00
|
|
|
"operator snapshot restore": func() (cli.Command, error) {
|
|
|
|
return &OperatorSnapshotRestoreCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2020-05-21 23:11:45 +00:00
|
|
|
|
2016-05-13 00:17:02 +00:00
|
|
|
"plan": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &JobPlanCommand{
|
2016-05-13 00:17:02 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
|
2020-03-06 15:09:10 +00:00
|
|
|
"plugin": func() (cli.Command, error) {
|
|
|
|
return &PluginCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"plugin status": func() (cli.Command, error) {
|
|
|
|
return &PluginStatusCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
|
2017-10-13 21:36:02 +00:00
|
|
|
"quota": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &QuotaCommand{
|
2017-10-13 21:36:02 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
|
|
|
|
"quota apply": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &QuotaApplyCommand{
|
2017-10-13 21:36:02 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
|
|
|
|
"quota delete": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &QuotaDeleteCommand{
|
2017-10-13 21:36:02 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
|
|
|
|
"quota init": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &QuotaInitCommand{
|
2017-10-13 21:36:02 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
|
|
|
|
"quota inspect": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &QuotaInspectCommand{
|
2017-10-13 21:36:02 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
|
|
|
|
"quota list": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &QuotaListCommand{
|
2017-10-13 21:36:02 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
|
|
|
|
"quota status": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &QuotaStatusCommand{
|
2017-10-13 21:36:02 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
|
2020-11-06 10:16:24 +00:00
|
|
|
"recommendation": func() (cli.Command, error) {
|
|
|
|
return &RecommendationCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"recommendation apply": func() (cli.Command, error) {
|
|
|
|
return &RecommendationApplyCommand{
|
2020-11-11 20:52:57 +00:00
|
|
|
RecommendationAutocompleteCommand: RecommendationAutocompleteCommand{
|
|
|
|
Meta: meta,
|
|
|
|
},
|
2020-11-06 10:16:24 +00:00
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"recommendation dismiss": func() (cli.Command, error) {
|
|
|
|
return &RecommendationDismissCommand{
|
2020-11-11 20:52:57 +00:00
|
|
|
RecommendationAutocompleteCommand: RecommendationAutocompleteCommand{
|
|
|
|
Meta: meta,
|
|
|
|
},
|
2020-11-06 10:16:24 +00:00
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"recommendation info": func() (cli.Command, error) {
|
|
|
|
return &RecommendationInfoCommand{
|
2020-11-11 20:52:57 +00:00
|
|
|
RecommendationAutocompleteCommand: RecommendationAutocompleteCommand{
|
|
|
|
Meta: meta,
|
|
|
|
},
|
2020-11-06 10:16:24 +00:00
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"recommendation list": func() (cli.Command, error) {
|
|
|
|
return &RecommendationListCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
|
2015-09-22 18:01:41 +00:00
|
|
|
"run": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &JobRunCommand{
|
2015-09-16 23:08:39 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2020-10-05 13:18:30 +00:00
|
|
|
"scaling": func() (cli.Command, error) {
|
|
|
|
return &ScalingCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"scaling policy": func() (cli.Command, error) {
|
|
|
|
return &ScalingPolicyCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"scaling policy info": func() (cli.Command, error) {
|
|
|
|
return &ScalingPolicyInfoCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"scaling policy list": func() (cli.Command, error) {
|
|
|
|
return &ScalingPolicyListCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2017-09-19 14:47:10 +00:00
|
|
|
"sentinel": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &SentinelCommand{
|
2017-09-19 14:47:10 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"sentinel list": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &SentinelListCommand{
|
2017-09-19 14:47:10 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"sentinel apply": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &SentinelApplyCommand{
|
2017-09-19 14:47:10 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"sentinel delete": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &SentinelDeleteCommand{
|
2017-09-19 14:47:10 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"sentinel read": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &SentinelReadCommand{
|
2017-09-19 14:47:10 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2018-03-21 00:37:28 +00:00
|
|
|
"server": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &ServerCommand{
|
2018-03-21 00:37:28 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"server force-leave": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &ServerForceLeaveCommand{
|
2018-03-21 00:37:28 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"server join": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &ServerJoinCommand{
|
2018-03-21 00:37:28 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"server members": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &ServerMembersCommand{
|
2018-03-21 00:37:28 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2015-09-22 18:01:41 +00:00
|
|
|
"server-force-leave": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &ServerForceLeaveCommand{
|
2015-09-14 20:13:52 +00:00
|
|
|
Meta: meta,
|
2015-09-13 00:09:03 +00:00
|
|
|
}, nil
|
|
|
|
},
|
2015-09-22 18:01:41 +00:00
|
|
|
"server-join": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &ServerJoinCommand{
|
2015-09-14 20:13:52 +00:00
|
|
|
Meta: meta,
|
2015-09-12 20:55:51 +00:00
|
|
|
}, nil
|
|
|
|
},
|
2015-09-22 18:01:41 +00:00
|
|
|
"server-members": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &ServerMembersCommand{
|
2015-09-16 01:22:51 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2022-03-21 10:59:03 +00:00
|
|
|
"service": func() (cli.Command, error) {
|
|
|
|
return &ServiceCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"service list": func() (cli.Command, error) {
|
|
|
|
return &ServiceListCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"service info": func() (cli.Command, error) {
|
|
|
|
return &ServiceInfoCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"service delete": func() (cli.Command, error) {
|
|
|
|
return &ServiceDeleteCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2017-08-14 17:35:13 +00:00
|
|
|
"status": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &StatusCommand{
|
2017-08-14 17:35:13 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2015-09-17 00:35:58 +00:00
|
|
|
"stop": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &JobStopCommand{
|
2015-09-17 00:35:58 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2020-01-13 10:34:46 +00:00
|
|
|
"system": func() (cli.Command, error) {
|
|
|
|
return &SystemCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"system gc": func() (cli.Command, error) {
|
|
|
|
return &SystemGCCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"system reconcile": func() (cli.Command, error) {
|
|
|
|
return &SystemReconcileCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"system reconcile summaries": func() (cli.Command, error) {
|
|
|
|
return &SystemReconcileSummariesCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2017-10-10 06:01:55 +00:00
|
|
|
"ui": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &UiCommand{
|
2017-10-10 06:01:55 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2015-09-25 01:29:46 +00:00
|
|
|
"validate": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &JobValidateCommand{
|
2015-09-25 01:29:46 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2022-07-12 16:49:39 +00:00
|
|
|
"var": func() (cli.Command, error) {
|
|
|
|
return &VarCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2022-09-09 21:55:20 +00:00
|
|
|
"var purge": func() (cli.Command, error) {
|
|
|
|
return &VarPurgeCommand{
|
2022-07-12 16:49:39 +00:00
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2022-08-15 17:43:29 +00:00
|
|
|
"var init": func() (cli.Command, error) {
|
|
|
|
return &VarInitCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2022-09-09 21:55:20 +00:00
|
|
|
"var list": func() (cli.Command, error) {
|
|
|
|
return &VarListCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"var put": func() (cli.Command, error) {
|
|
|
|
return &VarPutCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"var get": func() (cli.Command, error) {
|
|
|
|
return &VarGetCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2015-06-01 11:46:21 +00:00
|
|
|
"version": func() (cli.Command, error) {
|
2018-03-21 17:16:13 +00:00
|
|
|
return &VersionCommand{
|
2017-08-16 22:42:15 +00:00
|
|
|
Version: version.GetVersion(),
|
2017-07-17 18:04:07 +00:00
|
|
|
Ui: meta.Ui,
|
2015-06-01 11:46:21 +00:00
|
|
|
}, nil
|
|
|
|
},
|
2020-03-06 15:09:10 +00:00
|
|
|
"volume": func() (cli.Command, error) {
|
|
|
|
return &VolumeCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2021-03-12 20:57:49 +00:00
|
|
|
"volume init": func() (cli.Command, error) {
|
|
|
|
return &VolumeInitCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2020-03-06 15:09:10 +00:00
|
|
|
"volume status": func() (cli.Command, error) {
|
|
|
|
return &VolumeStatusCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"volume register": func() (cli.Command, error) {
|
|
|
|
return &VolumeRegisterCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"volume deregister": func() (cli.Command, error) {
|
|
|
|
return &VolumeDeregisterCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2020-08-11 14:18:54 +00:00
|
|
|
"volume detach": func() (cli.Command, error) {
|
|
|
|
return &VolumeDetachCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2021-03-23 13:11:18 +00:00
|
|
|
"volume create": func() (cli.Command, error) {
|
|
|
|
return &VolumeCreateCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"volume delete": func() (cli.Command, error) {
|
|
|
|
return &VolumeDeleteCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2022-03-01 18:30:30 +00:00
|
|
|
"volume snapshot": func() (cli.Command, error) {
|
|
|
|
return &VolumeSnapshotCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2021-04-01 15:16:52 +00:00
|
|
|
"volume snapshot create": func() (cli.Command, error) {
|
|
|
|
return &VolumeSnapshotCreateCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"volume snapshot delete": func() (cli.Command, error) {
|
|
|
|
return &VolumeSnapshotDeleteCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
"volume snapshot list": func() (cli.Command, error) {
|
|
|
|
return &VolumeSnapshotListCommand{
|
|
|
|
Meta: meta,
|
|
|
|
}, nil
|
|
|
|
},
|
2015-06-01 11:46:21 +00:00
|
|
|
}
|
2018-03-21 17:16:13 +00:00
|
|
|
|
|
|
|
deprecated := map[string]cli.CommandFactory{
|
|
|
|
"client-config": func() (cli.Command, error) {
|
|
|
|
return &DeprecatedCommand{
|
|
|
|
Old: "client-config",
|
|
|
|
New: "node config",
|
|
|
|
Meta: meta,
|
|
|
|
Command: &NodeConfigCommand{
|
|
|
|
Meta: meta,
|
|
|
|
},
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
|
|
|
|
"keygen": func() (cli.Command, error) {
|
|
|
|
return &DeprecatedCommand{
|
|
|
|
Old: "keygen",
|
2022-06-20 19:21:19 +00:00
|
|
|
New: "operator gossip keyring generate",
|
|
|
|
Meta: meta,
|
|
|
|
Command: &OperatorGossipKeyringGenerateCommand{
|
|
|
|
Meta: meta,
|
|
|
|
},
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
|
|
|
|
"operator keygen": func() (cli.Command, error) {
|
|
|
|
return &DeprecatedCommand{
|
|
|
|
Old: "operator keygen",
|
|
|
|
New: "operator gossip keyring generate",
|
2018-03-21 17:16:13 +00:00
|
|
|
Meta: meta,
|
2022-06-20 19:21:19 +00:00
|
|
|
Command: &OperatorGossipKeyringGenerateCommand{
|
2018-03-21 17:16:13 +00:00
|
|
|
Meta: meta,
|
|
|
|
},
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
|
|
|
|
"keyring": func() (cli.Command, error) {
|
|
|
|
return &DeprecatedCommand{
|
|
|
|
Old: "keyring",
|
2022-06-20 19:21:19 +00:00
|
|
|
New: "operator gossip keyring",
|
2018-03-21 17:16:13 +00:00
|
|
|
Meta: meta,
|
|
|
|
Command: &OperatorKeyringCommand{
|
|
|
|
Meta: meta,
|
|
|
|
},
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
|
|
|
|
"server-force-leave": func() (cli.Command, error) {
|
|
|
|
return &DeprecatedCommand{
|
|
|
|
Old: "server-force-leave",
|
|
|
|
New: "server force-leave",
|
|
|
|
Meta: meta,
|
|
|
|
Command: &ServerForceLeaveCommand{
|
|
|
|
Meta: meta,
|
|
|
|
},
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
|
|
|
|
"server-join": func() (cli.Command, error) {
|
|
|
|
return &DeprecatedCommand{
|
|
|
|
Old: "server-join",
|
|
|
|
New: "server join",
|
|
|
|
Meta: meta,
|
|
|
|
Command: &ServerJoinCommand{
|
|
|
|
Meta: meta,
|
|
|
|
},
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
|
|
|
|
"server-members": func() (cli.Command, error) {
|
|
|
|
return &DeprecatedCommand{
|
|
|
|
Old: "server-members",
|
|
|
|
New: "server members",
|
|
|
|
Meta: meta,
|
|
|
|
Command: &ServerMembersCommand{
|
|
|
|
Meta: meta,
|
|
|
|
},
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
for k, v := range deprecated {
|
|
|
|
all[k] = v
|
|
|
|
}
|
2020-06-22 14:27:09 +00:00
|
|
|
|
|
|
|
for k, v := range EntCommands(metaPtr, agentUi) {
|
|
|
|
all[k] = v
|
|
|
|
}
|
|
|
|
|
2018-03-21 17:16:13 +00:00
|
|
|
return all
|
2015-06-01 11:46:21 +00:00
|
|
|
}
|