Skip to content

Commit

Permalink
[CLOUDGA-14851] Update CLI with new tracks (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-yb authored Jul 7, 2023
1 parent 32f0ccd commit 899d261
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ ybm cluster create
--region-info=region=<region-name>,num-nodes=<number-of-nodes>,vpc=<vpc-name> \
--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
Expand Down
2 changes: 1 addition & 1 deletion cmd/cluster/update_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func init() {
updateClusterCmd.Flags().StringArray("region-info", []string{}, `[OPTIONAL] Region information for the cluster. Please provide key value pairs, region=<region-name>,num-nodes=<number-of-nodes>,vpc=<vpc-name> 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.")

}

Expand Down
2 changes: 1 addition & 1 deletion docs/ybm_cluster_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion internal/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit 899d261

Please sign in to comment.