Skip to content

Commit e09a209

Browse files
committed
[CLOUDGA-26189] Use new API's get instance-types, cloud-regions & node configs
1 parent fd954a4 commit e09a209

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

internal/client/client.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -903,8 +903,8 @@ func (a *AuthApiClient) GetCdcStreamIDByStreamName(cdcStreamName string) (string
903903
return "", fmt.Errorf("couldn't find any cdcStream with the given name")
904904
}
905905

906-
func (a *AuthApiClient) GetSupportedNodeConfigurations(cloud string, tier string, region string) ybmclient.ApiGetSupportedNodeConfigurationsRequest {
907-
return a.ApiClient.ClusterApi.GetSupportedNodeConfigurations(a.ctx).AccountId(a.AccountID).Cloud(cloud).Tier(tier).Regions([]string{region})
906+
func (a *AuthApiClient) GetSupportedNodeConfigurations(cloud string, tier string, region string) ybmclient.ApiGetSupportedNodeConfigurationsByAccountRequest {
907+
return a.ApiClient.ClusterApi.GetSupportedNodeConfigurationsByAccount(a.ctx, a.AccountID).Cloud(cloud).Tier(tier).Regions([]string{region})
908908
}
909909

910910
func (a *AuthApiClient) GetSupportedNodeConfigurationsV2(cloud string, tier string, regions []string, geoPartitioned bool) map[string][]ybmclient.NodeConfigurationResponseItem {
@@ -916,7 +916,7 @@ func (a *AuthApiClient) GetSupportedNodeConfigurationsV2(cloud string, tier stri
916916
if len(regions) == 1 || cloud == "AZURE" || (geoPartitioned) {
917917
isMultiRegion = false
918918
}
919-
instanceResp, resp, err := a.ApiClient.ClusterApi.GetSupportedNodeConfigurations(a.ctx).AccountId(a.AccountID).Cloud(cloud).Tier(tier).Regions(regions).IsMultiRegion(isMultiRegion).Execute()
919+
instanceResp, resp, err := a.ApiClient.ClusterApi.GetSupportedNodeConfigurationsByAccount(a.ctx, a.AccountID).Cloud(cloud).Tier(tier).Regions(regions).IsMultiRegion(isMultiRegion).Execute()
920920
if err != nil {
921921
b, _ := httputil.DumpResponse(resp, true)
922922
logrus.Debug(b)
@@ -995,8 +995,8 @@ func (a *AuthApiClient) PerformNodeOperation(clusterId string) ybmclient.ApiPerf
995995
return a.ApiClient.ClusterApi.PerformNodeOperation(a.ctx, a.AccountID, a.ProjectID, clusterId)
996996
}
997997

998-
func (a *AuthApiClient) GetSupportedCloudRegions() ybmclient.ApiGetSupportedCloudRegionsRequest {
999-
return a.ApiClient.ClusterApi.GetSupportedCloudRegions(a.ctx)
998+
func (a *AuthApiClient) GetSupportedCloudRegions() ybmclient.ApiGetSupportedCloudRegionsByAccountRequest {
999+
return a.ApiClient.ClusterApi.GetSupportedCloudRegionsByAccount(a.ctx, a.AccountID)
10001000
}
10011001
func (a *AuthApiClient) ListTasks() ybmclient.ApiListTasksRequest {
10021002
return a.ApiClient.TaskApi.ListTasks(a.ctx, a.AccountID)

0 commit comments

Comments
 (0)