From 899d26115fe666e4bf83f54fc68578d048df4eea Mon Sep 17 00:00:00 2001 From: Daniel Isen <54864769+daniel-yb@users.noreply.github.com> Date: Fri, 7 Jul 2023 17:11:20 -0400 Subject: [PATCH] [CLOUDGA-14851] Update CLI with new tracks (#166) --- README.md | 2 +- cmd/cluster/update_cluster.go | 2 +- docs/ybm_cluster_update.md | 2 +- internal/client/client.go | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 58460d68..3f1fc85f 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ ybm cluster create --region-info=region=,num-nodes=,vpc= \ --cluster-tier=[Sandbox or Dedicated] \ --fault-tolerance=[NONE or ZONE or Region] \ - --database-version=[Stable or Preview] + --database-version=[Production or Innovation or Preview] ``` #### List Clusters diff --git a/cmd/cluster/update_cluster.go b/cmd/cluster/update_cluster.go index 4a49efd4..85e70a9d 100644 --- a/cmd/cluster/update_cluster.go +++ b/cmd/cluster/update_cluster.go @@ -175,7 +175,7 @@ func init() { updateClusterCmd.Flags().StringArray("region-info", []string{}, `[OPTIONAL] Region information for the cluster. Please provide key value pairs, region=,num-nodes=,vpc= as the value. If provided, region and num-nodes are mandatory, vpc is optional.`) updateClusterCmd.Flags().String("cluster-tier", "", "[OPTIONAL] The tier of the cluster. Sandbox or Dedicated.") updateClusterCmd.Flags().String("fault-tolerance", "", "[OPTIONAL] The fault tolerance of the cluster. The possible values are NONE, ZONE and REGION.") - updateClusterCmd.Flags().String("database-version", "", "[OPTIONAL] The database version of the cluster. Stable or Preview.") + updateClusterCmd.Flags().String("database-version", "", "[OPTIONAL] The database version of the cluster. Production or Innovation or Preview.") } diff --git a/docs/ybm_cluster_update.md b/docs/ybm_cluster_update.md index 3bdd3807..df076313 100644 --- a/docs/ybm_cluster_update.md +++ b/docs/ybm_cluster_update.md @@ -17,7 +17,7 @@ ybm cluster update [flags] --cluster-name string [REQUIRED] Name of the cluster. --cluster-tier string [OPTIONAL] The tier of the cluster. Sandbox or Dedicated. --cluster-type string [OPTIONAL] Cluster replication type. SYNCHRONOUS or GEO_PARTITIONED. - --database-version string [OPTIONAL] The database version of the cluster. Stable or Preview. + --database-version string [OPTIONAL] The database version of the cluster. Production or Innovation or Preview. --fault-tolerance string [OPTIONAL] The fault tolerance of the cluster. The possible values are NONE, ZONE and REGION. -h, --help help for update --new-name string [OPTIONAL] The new name to be given to the cluster. diff --git a/internal/client/client.go b/internal/client/client.go index 4f11b7e5..182f1791 100644 --- a/internal/client/client.go +++ b/internal/client/client.go @@ -695,7 +695,8 @@ func (a *AuthApiClient) GetTrackIdByName(trackName string) (string, error) { } for _, track := range tracksNameResp.GetData() { - if track.Spec.GetName() == trackName { + // Temporary backwards compatibility between Stable and Production tracks. + if track.Spec.GetName() == trackName || (track.Spec.GetName() == "Production" && trackName == "Stable") { return track.Info.GetId(), nil } }