Skip to content

Commit

Permalink
cmd: specify that deployment template commands are ECE specific (#232)
Browse files Browse the repository at this point in the history
Adds text to specify that deployment template commands are ECE specific.
  • Loading branch information
karencfv authored Mar 26, 2020
1 parent 46ad1cd commit 2bfa679
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 13 deletions.
9 changes: 5 additions & 4 deletions cmd/platform/deployment-template/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ import (

"github.com/elastic/cloud-sdk-go/pkg/input"
"github.com/elastic/cloud-sdk-go/pkg/models"
"github.com/elastic/cloud-sdk-go/pkg/util/cmdutil"
sdkcmdutil "github.com/elastic/cloud-sdk-go/pkg/util/cmdutil"
"github.com/pkg/errors"
"github.com/spf13/cobra"

cmdutil "github.com/elastic/ecctl/cmd/util"
"github.com/elastic/ecctl/pkg/ecctl"
"github.com/elastic/ecctl/pkg/platform/deployment"
)
Expand All @@ -43,7 +44,7 @@ const (
// Command represents the top level deployment-template command.
var Command = &cobra.Command{
Use: "deployment-template",
Short: "Manages deployment templates",
Short: cmdutil.AdminReqDescription("Manages deployment templates"),
PreRunE: cobra.MaximumNArgs(0),
Run: func(cmd *cobra.Command, args []string) {
cmd.Help()
Expand Down Expand Up @@ -122,7 +123,7 @@ var platformDeploymentTemplateCreateCmd = &cobra.Command{
Short: "Creates a platform deployment template",
PreRunE: cobra.MaximumNArgs(0),
RunE: func(cmd *cobra.Command, args []string) error {
if err := cmdutil.FileOrStdin(cmd, "file-template"); err != nil {
if err := sdkcmdutil.FileOrStdin(cmd, "file-template"); err != nil {
return err
}

Expand Down Expand Up @@ -155,7 +156,7 @@ var platformDeploymentTemplateUpdateCmd = &cobra.Command{
Short: "Updates a platform deployment template",
PreRunE: cobra.MinimumNArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
if err := cmdutil.FileOrStdin(cmd, "file-template"); err != nil {
if err := sdkcmdutil.FileOrStdin(cmd, "file-template"); err != nil {
return err
}
tc, err := parseTemplateFile(cmd.Flag("file-template").Value.String())
Expand Down
2 changes: 1 addition & 1 deletion docs/ecctl_platform.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ ecctl platform [flags]
* [ecctl](ecctl.md) - Elastic Cloud Control
* [ecctl platform allocator](ecctl_platform_allocator.md) - Manages allocators (Available for ECE only)
* [ecctl platform constructor](ecctl_platform_constructor.md) - Manages constructors (Available for ECE only)
* [ecctl platform deployment-template](ecctl_platform_deployment-template.md) - Manages deployment templates
* [ecctl platform deployment-template](ecctl_platform_deployment-template.md) - Manages deployment templates (Available for ECE only)
* [ecctl platform enrollment-token](ecctl_platform_enrollment-token.md) - Manages tokens (Available for ECE only)
* [ecctl platform info](ecctl_platform_info.md) - Shows information about the platform (Available for ECE only)
* [ecctl platform instance-configuration](ecctl_platform_instance-configuration.md) - Manages instance configurations (Available for ECE only)
Expand Down
4 changes: 2 additions & 2 deletions docs/ecctl_platform_deployment-template.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## ecctl platform deployment-template

Manages deployment templates
Manages deployment templates (Available for ECE only)

### Synopsis

Manages deployment templates
Manages deployment templates (Available for ECE only)

```
ecctl platform deployment-template [flags]
Expand Down
2 changes: 1 addition & 1 deletion docs/ecctl_platform_deployment-template_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ ecctl platform deployment-template create -f <template file>.json [flags]

### SEE ALSO

* [ecctl platform deployment-template](ecctl_platform_deployment-template.md) - Manages deployment templates
* [ecctl platform deployment-template](ecctl_platform_deployment-template.md) - Manages deployment templates (Available for ECE only)

2 changes: 1 addition & 1 deletion docs/ecctl_platform_deployment-template_delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ ecctl platform deployment-template delete <template id> [flags]

### SEE ALSO

* [ecctl platform deployment-template](ecctl_platform_deployment-template.md) - Manages deployment templates
* [ecctl platform deployment-template](ecctl_platform_deployment-template.md) - Manages deployment templates (Available for ECE only)

2 changes: 1 addition & 1 deletion docs/ecctl_platform_deployment-template_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ ecctl platform deployment-template list [flags]

### SEE ALSO

* [ecctl platform deployment-template](ecctl_platform_deployment-template.md) - Manages deployment templates
* [ecctl platform deployment-template](ecctl_platform_deployment-template.md) - Manages deployment templates (Available for ECE only)

2 changes: 1 addition & 1 deletion docs/ecctl_platform_deployment-template_pull.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ ecctl platform deployment-template pull --path <path> [flags]

### SEE ALSO

* [ecctl platform deployment-template](ecctl_platform_deployment-template.md) - Manages deployment templates
* [ecctl platform deployment-template](ecctl_platform_deployment-template.md) - Manages deployment templates (Available for ECE only)

2 changes: 1 addition & 1 deletion docs/ecctl_platform_deployment-template_show.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ ecctl platform deployment-template show <template id> [flags]

### SEE ALSO

* [ecctl platform deployment-template](ecctl_platform_deployment-template.md) - Manages deployment templates
* [ecctl platform deployment-template](ecctl_platform_deployment-template.md) - Manages deployment templates (Available for ECE only)

2 changes: 1 addition & 1 deletion docs/ecctl_platform_deployment-template_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ ecctl platform deployment-template update <template id> -f <template file>.json

### SEE ALSO

* [ecctl platform deployment-template](ecctl_platform_deployment-template.md) - Manages deployment templates
* [ecctl platform deployment-template](ecctl_platform_deployment-template.md) - Manages deployment templates (Available for ECE only)

0 comments on commit 2bfa679

Please sign in to comment.