Skip to content

Commit

Permalink
fix edge cluster deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
spacegospod committed Oct 1, 2024
1 parent 5c0dcd7 commit c4f8f8a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions internal/api_client/sddc_manager_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,8 @@ func GetError(body []byte) *vcf.Error {
return &dest
}

// LogError traverses a vcf.Error structure and logs its error message as well as
// the messages of any nested errors
func LogError(err *vcf.Error) {
if err != nil {
if err.Message != nil {
Expand Down
4 changes: 2 additions & 2 deletions internal/nsx_edge_cluster/edge_cluster_operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,11 @@ func getNodeSpec(node map[string]interface{}, client *vcf.ClientWithResponses) (
interRackCluster := node["inter_rack_cluster"].(bool)

var clusterId string
if computeClusterId, contains := node["compute_cluster_id"]; contains {
if computeClusterId := node["compute_cluster_id"]; computeClusterId != "" {
clusterId = computeClusterId.(string)
}

if computeClusterName, contains := node["compute_cluster_name"]; contains {
if computeClusterName := node["compute_cluster_name"]; computeClusterName != "" {
if clusterId != "" {
return nil, errors.New("you cannot set compute_cluster_id and compute_cluster_name at the same time")
}
Expand Down

0 comments on commit c4f8f8a

Please sign in to comment.