Skip to content

Commit 911a7ea

Browse files
authored
docs: Set deployment node command as ECE only (#446)
When adding documentation regarding ECE specific commands we forgot to mark the ecctl deplyoment note command and its subcommands as one of them. This patch fixes this issue.
1 parent c3dc300 commit 911a7ea

13 files changed

+39
-38
lines changed

cmd/deployment/note/command.go

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,25 +23,26 @@ import (
2323
"github.com/elastic/cloud-sdk-go/pkg/api"
2424
"github.com/elastic/cloud-sdk-go/pkg/api/deploymentapi"
2525
"github.com/elastic/cloud-sdk-go/pkg/api/deploymentapi/noteapi"
26-
"github.com/elastic/cloud-sdk-go/pkg/util/cmdutil"
26+
sdkcmdutil "github.com/elastic/cloud-sdk-go/pkg/util/cmdutil"
2727
"github.com/spf13/cobra"
2828

29+
cmdutil "github.com/elastic/ecctl/cmd/util"
2930
"github.com/elastic/ecctl/pkg/ecctl"
3031
)
3132

3233
// Command represents the deployment note subcommand.
3334
var Command = &cobra.Command{
3435
Use: "note",
35-
Short: "Manages a deployment's notes",
36+
Short: cmdutil.AdminReqDescription("Manages a deployment's notes"),
3637
PreRunE: cobra.MaximumNArgs(0),
3738
Run: func(cmd *cobra.Command, args []string) { cmd.Help() },
3839
}
3940

4041
var deploymentNoteCreateCmd = &cobra.Command{
4142
Use: "create <deployment id> --comment <comment content>",
4243
Aliases: []string{"add"},
43-
Short: "Adds a note to a deployment",
44-
PreRunE: cmdutil.MinimumNArgsAndUUID(1),
44+
Short: cmdutil.AdminReqDescription("Adds a note to a deployment"),
45+
PreRunE: sdkcmdutil.MinimumNArgsAndUUID(1),
4546
RunE: func(cmd *cobra.Command, args []string) error {
4647
comment, _ := cmd.Flags().GetString("comment")
4748
esID, err := getElasticsearchID(args[0], ecctl.Get().API)
@@ -63,8 +64,8 @@ var deploymentNoteCreateCmd = &cobra.Command{
6364

6465
var deploymentNoteListCmd = &cobra.Command{
6566
Use: "list <deployment id>",
66-
Short: "Lists the deployment notes",
67-
PreRunE: cmdutil.MinimumNArgsAndUUID(1),
67+
Short: cmdutil.AdminReqDescription("Lists the deployment notes"),
68+
PreRunE: sdkcmdutil.MinimumNArgsAndUUID(1),
6869
RunE: func(cmd *cobra.Command, args []string) error {
6970
esID, err := getElasticsearchID(args[0], ecctl.Get().API)
7071
if err != nil {
@@ -86,8 +87,8 @@ var deploymentNoteListCmd = &cobra.Command{
8687

8788
var deploymentNoteUpdateCmd = &cobra.Command{
8889
Use: "update <deployment id> --id <note id> --comment <comment content>",
89-
Short: "Updates the deployment notes",
90-
PreRunE: cmdutil.MinimumNArgsAndUUID(1),
90+
Short: cmdutil.AdminReqDescription("Updates the deployment notes"),
91+
PreRunE: sdkcmdutil.MinimumNArgsAndUUID(1),
9192
RunE: func(cmd *cobra.Command, args []string) error {
9293
comment, _ := cmd.Flags().GetString("comment")
9394
noteID, _ := cmd.Flags().GetString("id")
@@ -113,8 +114,8 @@ var deploymentNoteUpdateCmd = &cobra.Command{
113114

114115
var deploymentNoteShowCmd = &cobra.Command{
115116
Use: "show <deployment id> --id <note id>",
116-
Short: "Shows a deployment note",
117-
PreRunE: cmdutil.MinimumNArgsAndUUID(1),
117+
Short: cmdutil.AdminReqDescription("Shows a deployment note"),
118+
PreRunE: sdkcmdutil.MinimumNArgsAndUUID(1),
118119
RunE: func(cmd *cobra.Command, args []string) error {
119120
noteID, _ := cmd.Flags().GetString("id")
120121
esID, err := getElasticsearchID(args[0], ecctl.Get().API)

docs/ecctl_deployment.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ ecctl deployment [flags]
4646
* xref:ecctl_deployment_delete[ecctl deployment delete] - Deletes a previously shutdown deployment {ece-icon} (Available for ECE only)
4747
* xref:ecctl_deployment_elasticsearch[ecctl deployment elasticsearch] - Manages Elasticsearch resources
4848
* xref:ecctl_deployment_list[ecctl deployment list] - Lists the platform's deployments
49-
* xref:ecctl_deployment_note[ecctl deployment note] - Manages a deployment's notes
49+
* xref:ecctl_deployment_note[ecctl deployment note] - Manages a deployment's notes {ece-icon} (Available for ECE only)
5050
* xref:ecctl_deployment_plan[ecctl deployment plan] - Manages deployment plans
5151
* xref:ecctl_deployment_resource[ecctl deployment resource] - Manages deployment resources
5252
* xref:ecctl_deployment_restore[ecctl deployment restore] - Restores a previously shut down deployment and all of its associated sub-resources

docs/ecctl_deployment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ ecctl deployment [flags]
4242
* [ecctl deployment delete](ecctl_deployment_delete.md) - Deletes a previously shutdown deployment (Available for ECE only)
4343
* [ecctl deployment elasticsearch](ecctl_deployment_elasticsearch.md) - Manages Elasticsearch resources
4444
* [ecctl deployment list](ecctl_deployment_list.md) - Lists the platform's deployments
45-
* [ecctl deployment note](ecctl_deployment_note.md) - Manages a deployment's notes
45+
* [ecctl deployment note](ecctl_deployment_note.md) - Manages a deployment's notes (Available for ECE only)
4646
* [ecctl deployment plan](ecctl_deployment_plan.md) - Manages deployment plans
4747
* [ecctl deployment resource](ecctl_deployment_resource.md) - Manages deployment resources
4848
* [ecctl deployment restore](ecctl_deployment_restore.md) - Restores a previously shut down deployment and all of its associated sub-resources

docs/ecctl_deployment_note.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[#ecctl_deployment_note]
22
== ecctl deployment note
33

4-
Manages a deployment's notes
4+
Manages a deployment's notes {ece-icon} (Available for ECE only)
55

66
----
77
ecctl deployment note [flags]
@@ -42,7 +42,7 @@ ecctl deployment note [flags]
4242
=== SEE ALSO
4343

4444
* xref:ecctl_deployment[ecctl deployment] - Manages deployments
45-
* xref:ecctl_deployment_note_create[ecctl deployment note create] - Adds a note to a deployment
46-
* xref:ecctl_deployment_note_list[ecctl deployment note list] - Lists the deployment notes
47-
* xref:ecctl_deployment_note_show[ecctl deployment note show] - Shows a deployment note
48-
* xref:ecctl_deployment_note_update[ecctl deployment note update] - Updates the deployment notes
45+
* xref:ecctl_deployment_note_create[ecctl deployment note create] - Adds a note to a deployment {ece-icon} (Available for ECE only)
46+
* xref:ecctl_deployment_note_list[ecctl deployment note list] - Lists the deployment notes {ece-icon} (Available for ECE only)
47+
* xref:ecctl_deployment_note_show[ecctl deployment note show] - Shows a deployment note {ece-icon} (Available for ECE only)
48+
* xref:ecctl_deployment_note_update[ecctl deployment note update] - Updates the deployment notes {ece-icon} (Available for ECE only)

docs/ecctl_deployment_note.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## ecctl deployment note
22

3-
Manages a deployment's notes
3+
Manages a deployment's notes (Available for ECE only)
44

55
```
66
ecctl deployment note [flags]
@@ -38,8 +38,8 @@ ecctl deployment note [flags]
3838
### SEE ALSO
3939

4040
* [ecctl deployment](ecctl_deployment.md) - Manages deployments
41-
* [ecctl deployment note create](ecctl_deployment_note_create.md) - Adds a note to a deployment
42-
* [ecctl deployment note list](ecctl_deployment_note_list.md) - Lists the deployment notes
43-
* [ecctl deployment note show](ecctl_deployment_note_show.md) - Shows a deployment note
44-
* [ecctl deployment note update](ecctl_deployment_note_update.md) - Updates the deployment notes
41+
* [ecctl deployment note create](ecctl_deployment_note_create.md) - Adds a note to a deployment (Available for ECE only)
42+
* [ecctl deployment note list](ecctl_deployment_note_list.md) - Lists the deployment notes (Available for ECE only)
43+
* [ecctl deployment note show](ecctl_deployment_note_show.md) - Shows a deployment note (Available for ECE only)
44+
* [ecctl deployment note update](ecctl_deployment_note_update.md) - Updates the deployment notes (Available for ECE only)
4545

docs/ecctl_deployment_note_create.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[#ecctl_deployment_note_create]
22
== ecctl deployment note create
33

4-
Adds a note to a deployment
4+
Adds a note to a deployment {ece-icon} (Available for ECE only)
55

66
----
77
ecctl deployment note create <deployment id> --comment <comment content> [flags]
@@ -42,4 +42,4 @@ ecctl deployment note create <deployment id> --comment <comment content> [flags]
4242
[float]
4343
=== SEE ALSO
4444

45-
* xref:ecctl_deployment_note[ecctl deployment note] - Manages a deployment's notes
45+
* xref:ecctl_deployment_note[ecctl deployment note] - Manages a deployment's notes {ece-icon} (Available for ECE only)

docs/ecctl_deployment_note_create.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## ecctl deployment note create
22

3-
Adds a note to a deployment
3+
Adds a note to a deployment (Available for ECE only)
44

55
```
66
ecctl deployment note create <deployment id> --comment <comment content> [flags]
@@ -38,5 +38,5 @@ ecctl deployment note create <deployment id> --comment <comment content> [flags]
3838

3939
### SEE ALSO
4040

41-
* [ecctl deployment note](ecctl_deployment_note.md) - Manages a deployment's notes
41+
* [ecctl deployment note](ecctl_deployment_note.md) - Manages a deployment's notes (Available for ECE only)
4242

docs/ecctl_deployment_note_list.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[#ecctl_deployment_note_list]
22
== ecctl deployment note list
33

4-
Lists the deployment notes
4+
Lists the deployment notes {ece-icon} (Available for ECE only)
55

66
----
77
ecctl deployment note list <deployment id> [flags]
@@ -41,4 +41,4 @@ ecctl deployment note list <deployment id> [flags]
4141
[float]
4242
=== SEE ALSO
4343

44-
* xref:ecctl_deployment_note[ecctl deployment note] - Manages a deployment's notes
44+
* xref:ecctl_deployment_note[ecctl deployment note] - Manages a deployment's notes {ece-icon} (Available for ECE only)

docs/ecctl_deployment_note_list.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## ecctl deployment note list
22

3-
Lists the deployment notes
3+
Lists the deployment notes (Available for ECE only)
44

55
```
66
ecctl deployment note list <deployment id> [flags]
@@ -37,5 +37,5 @@ ecctl deployment note list <deployment id> [flags]
3737

3838
### SEE ALSO
3939

40-
* [ecctl deployment note](ecctl_deployment_note.md) - Manages a deployment's notes
40+
* [ecctl deployment note](ecctl_deployment_note.md) - Manages a deployment's notes (Available for ECE only)
4141

docs/ecctl_deployment_note_show.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[#ecctl_deployment_note_show]
22
== ecctl deployment note show
33

4-
Shows a deployment note
4+
Shows a deployment note {ece-icon} (Available for ECE only)
55

66
----
77
ecctl deployment note show <deployment id> --id <note id> [flags]
@@ -42,4 +42,4 @@ ecctl deployment note show <deployment id> --id <note id> [flags]
4242
[float]
4343
=== SEE ALSO
4444

45-
* xref:ecctl_deployment_note[ecctl deployment note] - Manages a deployment's notes
45+
* xref:ecctl_deployment_note[ecctl deployment note] - Manages a deployment's notes {ece-icon} (Available for ECE only)

0 commit comments

Comments
 (0)