Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Implements extra API Calls for AdvancedCluster TPF #2852

Merged
merged 10 commits into from
Dec 4, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,12 @@
// copied from model_advanced_cluster.go
func getAdvancedClusterContainerID(containers []admin.CloudProviderContainer, cluster *admin.CloudRegionConfig20240805) string {
for i := range containers {
if cluster.GetProviderName() == constant.GCP {
return containers[i].GetId()
}
if containers[i].GetProviderName() == cluster.GetProviderName() &&
containers[i].GetRegion() == cluster.GetRegionName() || // For Azure
containers[i].GetRegionName() == cluster.GetRegionName() { // For AWS
gpc := cluster.GetProviderName() == constant.GCP
azure := containers[i].GetProviderName() == cluster.GetProviderName() && containers[i].GetRegion() == cluster.GetRegionName()
aws := containers[i].GetRegionName() == cluster.GetRegionName()

if check gpc || azure || aws {

Check failure on line 60 in internal/service/advancedclustertpf/resource_compatibility_reuse.go

View workflow job for this annotation

GitHub Actions / tflint

expected ';', found gpc

Check failure on line 60 in internal/service/advancedclustertpf/resource_compatibility_reuse.go

View workflow job for this annotation

GitHub Actions / tf-validate

expected ';', found gpc

Check failure on line 60 in internal/service/advancedclustertpf/resource_compatibility_reuse.go

View workflow job for this annotation

GitHub Actions / tf-validate

syntax error: unexpected name gpc, expected {

Check failure on line 60 in internal/service/advancedclustertpf/resource_compatibility_reuse.go

View workflow job for this annotation

GitHub Actions / build

expected ';', found gpc

Check failure on line 60 in internal/service/advancedclustertpf/resource_compatibility_reuse.go

View workflow job for this annotation

GitHub Actions / lint

syntax error: unexpected name gpc, expected { (typecheck)

Check failure on line 60 in internal/service/advancedclustertpf/resource_compatibility_reuse.go

View workflow job for this annotation

GitHub Actions / lint

expected ';', found gpc (typecheck)

Check failure on line 60 in internal/service/advancedclustertpf/resource_compatibility_reuse.go

View workflow job for this annotation

GitHub Actions / lint

syntax error: unexpected name gpc, expected {) (typecheck)

Check failure on line 60 in internal/service/advancedclustertpf/resource_compatibility_reuse.go

View workflow job for this annotation

GitHub Actions / lint

syntax error: unexpected name gpc, expected {) (typecheck)
EspenAlbert marked this conversation as resolved.
Show resolved Hide resolved
return containers[i].GetId()

Check failure on line 61 in internal/service/advancedclustertpf/resource_compatibility_reuse.go

View workflow job for this annotation

GitHub Actions / tflint

expected '{', found 'return'

Check failure on line 61 in internal/service/advancedclustertpf/resource_compatibility_reuse.go

View workflow job for this annotation

GitHub Actions / tf-validate

expected '{', found 'return'

Check failure on line 61 in internal/service/advancedclustertpf/resource_compatibility_reuse.go

View workflow job for this annotation

GitHub Actions / build

expected '{', found 'return'

Check failure on line 61 in internal/service/advancedclustertpf/resource_compatibility_reuse.go

View workflow job for this annotation

GitHub Actions / lint

expected '{', found 'return' (typecheck)
}
}
return ""
Expand Down
Loading