Skip to content

Commit 7ba34cc

Browse files
ppapapetrou76marclop
authored andcommitted
remove plural aliases and update docs (#47)
1 parent d05811e commit 7ba34cc

15 files changed

+0
-351
lines changed

cmd/platform/allocator/list.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -93,26 +93,12 @@ var listAllocatorsCmd = &cobra.Command{
9393
RunE: listAllocators,
9494
}
9595

96-
// CommandPlural represents the list action for allocator.
97-
var CommandPlural = &cobra.Command{
98-
Use: "allocators",
99-
Short: allocatorListMessage,
100-
Long: allocatorListMessage + allocatorQueryExample + allocatorFilterExample,
101-
PreRunE: cobra.MaximumNArgs(0),
102-
RunE: listAllocators,
103-
}
104-
10596
func init() {
10697
Command.AddCommand(listAllocatorsCmd)
10798

108-
CommandPlural.Flags().StringArrayP("filter", "f", nil, allocatorFilterCmdMessage)
10999
listAllocatorsCmd.Flags().StringArrayP("filter", "f", nil, allocatorFilterCmdMessage)
110-
CommandPlural.Flags().Bool("unhealthy", false, "Searches for unhealthy allocators")
111100
listAllocatorsCmd.Flags().Bool("unhealthy", false, "Searches for unhealthy allocators")
112-
CommandPlural.Flags().String("query", "", queryFlagHelp)
113101
listAllocatorsCmd.Flags().String("query", "", queryFlagHelp)
114-
CommandPlural.Flags().Bool("metadata", false, "Shows allocators metadata")
115102
listAllocatorsCmd.Flags().Bool("metadata", false, "Shows allocators metadata")
116-
CommandPlural.Flags().Bool("all", false, "Shows all allocators (including those with no instances or not connected)")
117103
listAllocatorsCmd.Flags().Bool("all", false, "Shows all allocators (including those with no instances or not connected)")
118104
}

cmd/platform/constructor/command.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,6 @@ var Command = &cobra.Command{
4343
},
4444
}
4545

46-
// CommandPlural is the list action of constructor.
47-
var CommandPlural = &cobra.Command{
48-
Use: "constructors",
49-
Short: constructorListMessage,
50-
PreRunE: cobra.MaximumNArgs(0),
51-
RunE: listConstructors,
52-
}
53-
5446
func listConstructors(cmd *cobra.Command, args []string) error {
5547
a, err := constructor.List(constructor.Params{
5648
API: ecctl.Get().API,

cmd/platform/enrollment-token/command.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,6 @@ var listTokensCmd = &cobra.Command{
102102
RunE: listTokens,
103103
}
104104

105-
// CommandPlural is the plural list action.
106-
var CommandPlural = &cobra.Command{
107-
Use: "enrollment-tokens",
108-
Short: "Retrieves a list of persistent enrollment tokens",
109-
PreRunE: cobra.MaximumNArgs(0),
110-
RunE: listTokens,
111-
}
112-
113105
func init() {
114106
Command.AddCommand(
115107
createTokenCmd,

cmd/platform/platform.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,14 @@ var infoCmd = &cobra.Command{
6262
func init() {
6363
Command.AddCommand(
6464
cmdallocator.Command,
65-
cmdallocator.CommandPlural,
6665
cmdconstructor.Command,
67-
cmdconstructor.CommandPlural,
6866
cmddeploymentdemplate.Command,
6967
cmdenrollmenttoken.Command,
70-
cmdenrollmenttoken.CommandPlural,
7168
cmdinstanceconfig.Command,
7269
cmdproxy.Command,
73-
cmdproxy.CommandPlural,
7470
cmdrepository.Command,
7571
cmdrole.Command,
7672
cmdstack.Command,
77-
cmdstack.CommandPlural,
7873
)
7974

8075
Command.AddCommand(infoCmd)

cmd/platform/proxy/command.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,6 @@ var Command = &cobra.Command{
4242
},
4343
}
4444

45-
// CommandPlural is the list action for proxies
46-
var CommandPlural = &cobra.Command{
47-
Use: "proxies",
48-
Short: proxyListMessage,
49-
PreRunE: cobra.MaximumNArgs(0),
50-
RunE: listProxies,
51-
}
52-
5345
func listProxies(cmd *cobra.Command, args []string) error {
5446
a, err := proxy.List(proxy.Params{
5547
API: ecctl.Get().API,
@@ -91,6 +83,5 @@ func init() {
9183
listProxiesCmd,
9284
showProxyCmd,
9385
cmdfilteredgroup.Command,
94-
cmdfilteredgroup.CommandPlural,
9586
)
9687
}

cmd/platform/proxy/filteredgroup/list.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,6 @@ var platformProxyFilteredGroupsListCmd = &cobra.Command{
4949
RunE: listProxyFilteredGroups,
5050
}
5151

52-
// CommandPlural represents the list action for proxies filtered group.
53-
var CommandPlural = &cobra.Command{
54-
Use: "filtered-groups",
55-
Short: filteredGroupsUse,
56-
PreRunE: cobra.MaximumNArgs(0),
57-
RunE: listProxyFilteredGroups,
58-
}
59-
6052
func init() {
6153
Command.AddCommand(
6254
platformProxyFilteredGroupsListCmd,

cmd/platform/stack/command.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,6 @@ var Command = &cobra.Command{
3737
},
3838
}
3939

40-
// CommandPlural is the list action for stack.
41-
var CommandPlural = &cobra.Command{
42-
Use: "stacks",
43-
Short: "Lists Elastic StackPacks",
44-
PreRunE: cobra.MaximumNArgs(0),
45-
RunE: listStackPacks,
46-
}
47-
4840
var stackListCmd = &cobra.Command{
4941
Use: "list",
5042
Short: "Lists Elastic StackPacks",
@@ -123,5 +115,4 @@ func init() {
123115
)
124116

125117
stackListCmd.Flags().BoolP("deleted", "d", false, "Shows deleted stackpacks")
126-
CommandPlural.Flags().BoolP("deleted", "d", false, "Shows deleted stackpacks")
127118
}

docs/ecctl_platform.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,13 @@ ecctl platform [flags]
4141

4242
* [ecctl](ecctl.md) - Elastic Cloud Control
4343
* [ecctl platform allocator](ecctl_platform_allocator.md) - Manages allocators
44-
* [ecctl platform allocators](ecctl_platform_allocators.md) - Returns all allocators that have instances or are connected in the region. Use --all flag or --output json to show all. Use --query to match any of the allocators properties.
4544
* [ecctl platform constructor](ecctl_platform_constructor.md) - Manages constructors
46-
* [ecctl platform constructors](ecctl_platform_constructors.md) - Returns all of the constructors in the region
4745
* [ecctl platform deployment-template](ecctl_platform_deployment-template.md) - Manages deployment templates
4846
* [ecctl platform enrollment-token](ecctl_platform_enrollment-token.md) - Manages tokens
49-
* [ecctl platform enrollment-tokens](ecctl_platform_enrollment-tokens.md) - Retrieves a list of persistent enrollment tokens
5047
* [ecctl platform info](ecctl_platform_info.md) - Shows information about the platform
5148
* [ecctl platform instance-configuration](ecctl_platform_instance-configuration.md) - Manages instance configurations
52-
* [ecctl platform proxies](ecctl_platform_proxies.md) - Returns all of the proxies in the region
5349
* [ecctl platform proxy](ecctl_platform_proxy.md) - Manages proxies
5450
* [ecctl platform repository](ecctl_platform_repository.md) - Manages snapshot repositories
5551
* [ecctl platform role](ecctl_platform_role.md) - Manages platform roles
5652
* [ecctl platform stack](ecctl_platform_stack.md) - Manages Elastic StackPacks
57-
* [ecctl platform stacks](ecctl_platform_stacks.md) - Lists Elastic StackPacks
5853

docs/ecctl_platform_allocators.md

Lines changed: 0 additions & 68 deletions
This file was deleted.

docs/ecctl_platform_constructors.md

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)