Skip to content

Commit

Permalink
docs: Remove reegion mentions
Browse files Browse the repository at this point in the history
In most cases drop in replacement with the word `platform`

Signed-off-by: Marc Lopez <marc5.12@outlook.com>
  • Loading branch information
marclop committed Nov 15, 2019
1 parent d05811e commit f610c00
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion cmd/deployment/elasticsearch/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Read all the simple query string syntax in https://www.elastic.co/guide/en/elast

var listElasticsearchCmd = &cobra.Command{
Use: "list",
Short: "Returns the list of Elasticsearch clusters for a region",
Short: "Returns the list of Elasticsearch clusters",
Example: elasticSearchQueryExamples,
PreRunE: cobra.MaximumNArgs(0),
RunE: func(cmd *cobra.Command, args []string) error {
Expand Down
4 changes: 2 additions & 2 deletions cmd/platform/allocator/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (

const (
allocatorFilterCmdMessage = `Post-query filter out allocators based on metadata tags, for instance 'instanceType:i3.large'`
allocatorListMessage = `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.`
allocatorListMessage = `Returns all allocators that have instances or are connected to the platform. Use --all flag or --output json to show all. Use --query to match any of the allocators properties.`
allocatorQueryExample = `
Query examples:
Expand Down Expand Up @@ -79,7 +79,7 @@ func listAllocators(cmd *cobra.Command, args []string) error {
}

if cmd.Flag("output").Value.String() != "json" && !allFlag {
fmt.Printf("Showing allocators that have instances or are connected in the region. Use --all flag or --output json to show all\n")
fmt.Printf("Showing allocators that have instances or are connected in the platform. Use --all flag or --output json to show all\n")
}

return ecctl.Get().Formatter.Format(filepath.Join("allocator", templateName), a)
Expand Down
2 changes: 1 addition & 1 deletion cmd/platform/constructor/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
)

const (
constructorListMessage = `Returns all of the constructors in the region`
constructorListMessage = `Returns all of the constructors in the platform`
constructorShowMessage = `Returns information about the constructor with given ID`
constructorMaintenanceMessage = `Sets/un-sets a constructor's maintenance mode`
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/platform/proxy/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
)

const (
proxyListMessage = `Returns all of the proxies in the region`
proxyListMessage = `Returns all of the proxies in the platform`
proxyShowMessage = `Returns information about the proxy with given id`
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/platform/proxy/filteredgroup/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
)

const (
filteredGroupsUse = `Returns all proxies filtered groups in the region`
filteredGroupsUse = `Returns all proxies filtered groups in the platform`
)

func listProxyFilteredGroups(cmd *cobra.Command, args []string) error {
Expand Down
13 changes: 8 additions & 5 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,10 @@ func Execute(v, c, o, r string) int {

func init() {
RootCmd.PersistentFlags().String("config", "config", "Config name, used to have multiple configs in $HOME/.ecctl/<env>")
RootCmd.PersistentFlags().String("host", "https://api.elastic-cloud.com", "Base URL to use")
RootCmd.PersistentFlags().String("host", "", "Base URL to use")
RootCmd.PersistentFlags().String("user", "", "Username to use to authenticate (If empty will look for EC_USER environment variable)")
RootCmd.PersistentFlags().String("pass", "", "Password to use to authenticate (If empty will look for EC_PASS environment variable)")
RootCmd.PersistentFlags().String("apikey", "", "API key to use to authenticate (If empty will look for EC_APIKEY environment variable)")
RootCmd.PersistentFlags().String("region", "", "Elastic Cloud region")
RootCmd.Flag("region").Annotations = map[string][]string{
cobra.BashCompCustom: {"__ecctl_valid_regions"},
}
RootCmd.PersistentFlags().Bool("verbose", false, "Enable verbose mode")
RootCmd.PersistentFlags().String("output", "text", "Output format [text|json]")
RootCmd.PersistentFlags().Bool("force", false, "Do not ask for confirmation")
Expand All @@ -117,6 +113,13 @@ func init() {
RootCmd.PersistentFlags().Bool("insecure", false, "Skips all TLS validation")
RootCmd.PersistentFlags().BoolP("quiet", "q", false, "Suppresses the configuration file used for the run, if any")
RootCmd.PersistentFlags().Duration("timeout", time.Second*30, "Timeout to use on all HTTP calls")
RootCmd.PersistentFlags().String("region", "", "Elastic Cloud region")
RootCmd.Flag("region").Annotations = map[string][]string{
cobra.BashCompCustom: {"__ecctl_valid_regions"},
}
// Remove this line after ESS Public API is available.
RootCmd.PersistentFlags().MarkHidden("region")

defaultViper.BindPFlags(RootCmd.PersistentFlags())
}

Expand Down

0 comments on commit f610c00

Please sign in to comment.