mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
Co-authored-by: James Rasell <jrasell@hashicorp.com>
This commit is contained in:
3
.changelog/23671.txt
Normal file
3
.changelog/23671.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
```release-note:improvement
|
||||
cli: Added synopsis for `operator root` and `operator gossip` command
|
||||
```
|
||||
@@ -731,6 +731,11 @@ func Commands(metaPtr *Meta, agentUi cli.Ui) map[string]cli.CommandFactory {
|
||||
Meta: meta,
|
||||
}, nil
|
||||
},
|
||||
"operator gossip": func() (cli.Command, error) {
|
||||
return &OperatorGossipCommand{
|
||||
Meta: meta,
|
||||
}, nil
|
||||
},
|
||||
"operator gossip keyring": func() (cli.Command, error) {
|
||||
return &OperatorGossipKeyringCommand{
|
||||
Meta: meta,
|
||||
@@ -819,6 +824,11 @@ func Commands(metaPtr *Meta, agentUi cli.Ui) map[string]cli.CommandFactory {
|
||||
Meta: meta,
|
||||
}, nil
|
||||
},
|
||||
"operator root": func() (cli.Command, error) {
|
||||
return &OperatorRootCommand{
|
||||
Meta: meta,
|
||||
}, nil
|
||||
},
|
||||
"operator root keyring": func() (cli.Command, error) {
|
||||
return &OperatorRootKeyringCommand{
|
||||
Meta: meta,
|
||||
|
||||
33
command/operator_gossip.go
Normal file
33
command/operator_gossip.go
Normal file
@@ -0,0 +1,33 @@
|
||||
// Copyright (c) HashiCorp, Inc.
|
||||
// SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
package command
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/mitchellh/cli"
|
||||
)
|
||||
|
||||
type OperatorGossipCommand struct {
|
||||
Meta
|
||||
}
|
||||
|
||||
func (*OperatorGossipCommand) Help() string {
|
||||
helpText := `
|
||||
Usage: nomad operator gossip <subcommand> [options] [args]
|
||||
|
||||
This command is accessed by using one of the subcommands below.
|
||||
`
|
||||
return strings.TrimSpace(helpText)
|
||||
}
|
||||
|
||||
func (*OperatorGossipCommand) Synopsis() string {
|
||||
return "Provides access to the Gossip protocol"
|
||||
}
|
||||
|
||||
func (f *OperatorGossipCommand) Name() string { return "operator gossip" }
|
||||
|
||||
func (f *OperatorGossipCommand) Run(_ []string) int {
|
||||
return cli.RunResultHelp
|
||||
}
|
||||
34
command/operator_root.go
Normal file
34
command/operator_root.go
Normal file
@@ -0,0 +1,34 @@
|
||||
// Copyright (c) HashiCorp, Inc.
|
||||
// SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
package command
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/mitchellh/cli"
|
||||
)
|
||||
|
||||
type OperatorRootCommand struct {
|
||||
Meta
|
||||
}
|
||||
|
||||
func (*OperatorRootCommand) Help() string {
|
||||
helpText := `
|
||||
Usage: nomad operator root <subcommand> [options] [args]
|
||||
|
||||
This command is accessed by using one of the subcommands below.
|
||||
`
|
||||
|
||||
return strings.TrimSpace(helpText)
|
||||
}
|
||||
|
||||
func (*OperatorRootCommand) Synopsis() string {
|
||||
return "Provides access to root encryption keys"
|
||||
}
|
||||
|
||||
func (f *OperatorRootCommand) Name() string { return "operator root" }
|
||||
|
||||
func (f *OperatorRootCommand) Run(_ []string) int {
|
||||
return cli.RunResultHelp
|
||||
}
|
||||
Reference in New Issue
Block a user