Skip to content

Commit 1eb24df

Browse files
authored
docs: specify all ECE specific commands and add icons to .adoc files (#352)
Adds ECE specific text to all subcommands not just commands as it was before. Additionally, this text is substituted for {ece-icon} on the .adoc files so our online documentation looks better with an icon instead of text.
1 parent 0fab35b commit 1eb24df

File tree

178 files changed

+492
-447
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

178 files changed

+492
-447
lines changed

cmd/auth/command.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626
// Command is the auth subcommand
2727
var Command = &cobra.Command{
2828
Use: "auth",
29-
Short: "Manages the platform auth",
29+
Short: "Manages authentication settings",
3030
PreRunE: cobra.MaximumNArgs(0),
3131
Run: func(cmd *cobra.Command, args []string) {
3232
cmd.Help()

cmd/platform/allocator/list.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import (
2525
"github.com/elastic/cloud-sdk-go/pkg/api/platformapi/allocatorapi"
2626
"github.com/spf13/cobra"
2727

28+
cmdutil "github.com/elastic/ecctl/cmd/util"
2829
"github.com/elastic/ecctl/pkg/ecctl"
2930
)
3031

@@ -88,7 +89,7 @@ func listAllocators(cmd *cobra.Command, args []string) error {
8889

8990
var listAllocatorsCmd = &cobra.Command{
9091
Use: "list",
91-
Short: allocatorListMessage,
92+
Short: cmdutil.AdminReqDescription(allocatorListMessage),
9293
Long: allocatorListMessage + allocatorQueryExample + allocatorFilterExample,
9394
PreRunE: cobra.MaximumNArgs(0),
9495
RunE: listAllocators,

cmd/platform/allocator/maintenance.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,13 @@ import (
2323
"github.com/elastic/cloud-sdk-go/pkg/api/platformapi/allocatorapi"
2424
"github.com/spf13/cobra"
2525

26+
cmdutil "github.com/elastic/ecctl/cmd/util"
2627
"github.com/elastic/ecctl/pkg/ecctl"
2728
)
2829

2930
var maintenanceAllocatorCmd = &cobra.Command{
3031
Use: "maintenance <allocator id>",
31-
Short: "Sets the allocator in Maintenance mode",
32+
Short: cmdutil.AdminReqDescription("Sets the allocator in Maintenance mode"),
3233
PreRunE: cobra.MinimumNArgs(1),
3334

3435
RunE: func(cmd *cobra.Command, args []string) error {

cmd/platform/allocator/search.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const (
4040
// Command represents the allocator search command.
4141
var searchAllocatorCmd = &cobra.Command{
4242
Use: `search`,
43-
Short: "Performs advanced allocator searching",
43+
Short: cmdutil.AdminReqDescription("Performs advanced allocator searching"),
4444
Long: queryExamples,
4545
PreRunE: cobra.MaximumNArgs(0),
4646
RunE: func(cmd *cobra.Command, args []string) error {

cmd/platform/allocator/show.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import (
2323
"github.com/elastic/cloud-sdk-go/pkg/api/platformapi/allocatorapi"
2424
"github.com/spf13/cobra"
2525

26+
cmdutil "github.com/elastic/ecctl/cmd/util"
2627
"github.com/elastic/ecctl/pkg/ecctl"
2728
)
2829

@@ -46,7 +47,7 @@ func showAllocator(cmd *cobra.Command, args []string) error {
4647

4748
var showAllocatorCmd = &cobra.Command{
4849
Use: "show <allocator id>",
49-
Short: "Returns information about the allocator",
50+
Short: cmdutil.AdminReqDescription("Returns information about the allocator"),
5051
PreRunE: cobra.MinimumNArgs(1),
5152
RunE: showAllocator,
5253
}

cmd/platform/allocator/vacate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ const vacateExamples = ` ecctl platform allocator vacate i-05e245252362f7f1d
6969

7070
var vacateAllocatorCmd = &cobra.Command{
7171
Use: "vacate <allocator-id>",
72-
Short: "Moves all the resources from the specified allocator",
72+
Short: cmdutil.AdminReqDescription("Moves all the resources from the specified allocator"),
7373
Example: vacateExamples,
7474
PreRunE: cobra.MinimumNArgs(1),
7575
Aliases: []string{"move-nodes"},

cmd/platform/command.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,13 @@ import (
2828
cmdrepository "github.com/elastic/ecctl/cmd/platform/repository"
2929
cmdrole "github.com/elastic/ecctl/cmd/platform/role"
3030
cmdrunner "github.com/elastic/ecctl/cmd/platform/runner"
31+
cmdutil "github.com/elastic/ecctl/cmd/util"
3132
)
3233

3334
// Command is the platform subcommand
3435
var Command = &cobra.Command{
3536
Use: "platform",
36-
Short: "Manages the platform",
37+
Short: cmdutil.AdminReqDescription("Manages the platform"),
3738
PreRunE: cobra.MaximumNArgs(0),
3839
Run: func(cmd *cobra.Command, args []string) {
3940
cmd.Help()

cmd/platform/constructor/list.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,13 @@ import (
2323
"github.com/elastic/cloud-sdk-go/pkg/api/platformapi/constructorapi"
2424
"github.com/spf13/cobra"
2525

26+
cmdutil "github.com/elastic/ecctl/cmd/util"
2627
"github.com/elastic/ecctl/pkg/ecctl"
2728
)
2829

2930
var listConstructorsCmd = &cobra.Command{
3031
Use: "list",
31-
Short: `Returns all of the constructors in the platform`,
32+
Short: cmdutil.AdminReqDescription("Returns all of the constructors in the platform"),
3233
PreRunE: cobra.NoArgs,
3334
RunE: listConstructors,
3435
}

cmd/platform/constructor/maintenance.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,13 @@ import (
2323
"github.com/elastic/cloud-sdk-go/pkg/api/platformapi/constructorapi"
2424
"github.com/spf13/cobra"
2525

26+
cmdutil "github.com/elastic/ecctl/cmd/util"
2627
"github.com/elastic/ecctl/pkg/ecctl"
2728
)
2829

2930
var maintenanceConstructorCmd = &cobra.Command{
3031
Use: "maintenance <constructor id>",
31-
Short: constructorMaintenanceMessage,
32+
Short: cmdutil.AdminReqDescription(constructorMaintenanceMessage),
3233
PreRunE: cobra.ExactArgs(1),
3334
RunE: func(cmd *cobra.Command, args []string) error {
3435
unset, _ := cmd.Flags().GetBool("unset")

cmd/platform/constructor/resync.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,17 @@ import (
2121
"fmt"
2222

2323
"github.com/elastic/cloud-sdk-go/pkg/api/platformapi/constructorapi"
24-
"github.com/elastic/cloud-sdk-go/pkg/util/cmdutil"
24+
sdkcmdutil "github.com/elastic/cloud-sdk-go/pkg/util/cmdutil"
2525
"github.com/spf13/cobra"
2626

27+
cmdutil "github.com/elastic/ecctl/cmd/util"
2728
"github.com/elastic/ecctl/pkg/ecctl"
2829
)
2930

3031
var resyncConstructorCmd = &cobra.Command{
3132
Use: "resync {<constructor id> | --all}",
32-
Short: "Resynchronizes the search index and cache for the selected constructor or all",
33-
PreRunE: cmdutil.CheckInputHas1ArgsOr0ArgAndAll,
33+
Short: cmdutil.AdminReqDescription("Resynchronizes the search index and cache for the selected constructor or all"),
34+
PreRunE: sdkcmdutil.CheckInputHas1ArgsOr0ArgAndAll,
3435
RunE: func(cmd *cobra.Command, args []string) error {
3536
all, _ := cmd.Flags().GetBool("all")
3637

0 commit comments

Comments
 (0)