Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feat/2.1/associate-category-to-v…
Browse files Browse the repository at this point in the history
…g' into feat/2.1/deploy-pc
  • Loading branch information
Haroon-Dweikat-Ntx committed Jan 19, 2025
2 parents 6a4dbb4 + 0e9625d commit 635cec3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func ResourceNutanixAssociateCategoryToVolumeGroupV2Create(ctx context.Context,

resp, err := conn.VolumeAPIInstance.AssociateCategory(utils.StringPtr(extID.(string)), body)
if err != nil {
return diag.Errorf("error while Assosiating Category to Volume Group : %v", err)
return diag.Errorf("error while Associating Category to Volume Group : %v", err)
}

TaskRef := resp.Data.GetValue().(volumesPrism.TaskReference)
Expand All @@ -102,7 +102,7 @@ func ResourceNutanixAssociateCategoryToVolumeGroupV2Create(ctx context.Context,

resourceUUID, err := taskconn.TaskRefAPI.GetTaskById(taskUUID, nil)
if err != nil {
return diag.Errorf("error while fetching Assoicate Category to Volume Group Task : %v", err)
return diag.Errorf("error while fetching Associate Category to Volume Group Task : %v", err)
}
rUUID := resourceUUID.Data.GetValue().(taskPoll.Task)

Expand Down Expand Up @@ -200,8 +200,7 @@ func expandCategoryEntityType(entityType string) *config.EntityType {
return nil
}

switch entityType {
case "CATEGORY":
if entityType == "CATEGORY" {
p := config.ENTITYTYPE_CATEGORY
return &p
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package volumesv2
import (
"context"
"encoding/json"
"log"

"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
Expand All @@ -12,7 +13,6 @@ import (
volumesClient "github.com/nutanix/ntnx-api-golang-clients/volumes-go-client/v4/models/volumes/v4/config"
conns "github.com/terraform-providers/terraform-provider-nutanix/nutanix"
"github.com/terraform-providers/terraform-provider-nutanix/utils"
"log"
)

// ResourceNutanixVolumeAttachVMToVolumeGroupV2 Attach an AHV VM to the given Volume Group.
Expand Down

0 comments on commit 635cec3

Please sign in to comment.