From 92c2b3543ff39dbdb58e9ef48650c04d106a9595 Mon Sep 17 00:00:00 2001 From: Haroon-Dweikat-Ntx Date: Thu, 19 Dec 2024 16:32:57 +0200 Subject: [PATCH] lint fixes --- nutanix/services/prismv2/data_source_backup_target_v2.go | 1 + nutanix/services/prismv2/data_source_backup_targets_v2.go | 4 +++- nutanix/services/prismv2/data_source_nutanix_pc_v2.go | 1 + nutanix/services/prismv2/data_source_nutanix_pcs_v2.go | 1 + nutanix/services/prismv2/data_source_restore_point_v2.go | 2 ++ nutanix/services/prismv2/data_source_restore_points_v2.go | 2 ++ nutanix/services/prismv2/data_source_restore_source_v2.go | 2 ++ nutanix/services/prismv2/resource_nutanix_backup_target_v2.go | 3 ++- .../prismv2/resource_nutanix_pc_registration_v2_test.go | 1 + nutanix/services/prismv2/resource_nutanix_restore_pc_v2.go | 3 ++- .../services/prismv2/resource_nutanix_restore_source_v2.go | 3 ++- 11 files changed, 19 insertions(+), 4 deletions(-) diff --git a/nutanix/services/prismv2/data_source_backup_target_v2.go b/nutanix/services/prismv2/data_source_backup_target_v2.go index 5e5563b3..6ec825d0 100644 --- a/nutanix/services/prismv2/data_source_backup_target_v2.go +++ b/nutanix/services/prismv2/data_source_backup_target_v2.go @@ -7,6 +7,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/nutanix/ntnx-api-golang-clients/prism-go-client/v4/models/prism/v4/management" + conns "github.com/terraform-providers/terraform-provider-nutanix/nutanix" "github.com/terraform-providers/terraform-provider-nutanix/utils" ) diff --git a/nutanix/services/prismv2/data_source_backup_targets_v2.go b/nutanix/services/prismv2/data_source_backup_targets_v2.go index 802153ef..3ac6ca0f 100644 --- a/nutanix/services/prismv2/data_source_backup_targets_v2.go +++ b/nutanix/services/prismv2/data_source_backup_targets_v2.go @@ -2,9 +2,11 @@ package prismv2 import ( "context" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/nutanix/ntnx-api-golang-clients/prism-go-client/v4/models/prism/v4/management" + conns "github.com/terraform-providers/terraform-provider-nutanix/nutanix" "github.com/terraform-providers/terraform-provider-nutanix/utils" ) @@ -50,7 +52,7 @@ func DatasourceNutanixBackupTargetsV2Read(ctx context.Context, d *schema.Resourc } func flattenBackupTargets(backupTargets []management.BackupTarget) []map[string]interface{} { - if backupTargets == nil || len(backupTargets) == 0 { + if len(backupTargets) == 0 { return []map[string]interface{}{} } diff --git a/nutanix/services/prismv2/data_source_nutanix_pc_v2.go b/nutanix/services/prismv2/data_source_nutanix_pc_v2.go index 24c4616d..f68e57f1 100644 --- a/nutanix/services/prismv2/data_source_nutanix_pc_v2.go +++ b/nutanix/services/prismv2/data_source_nutanix_pc_v2.go @@ -7,6 +7,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" commonConfig "github.com/nutanix/ntnx-api-golang-clients/prism-go-client/v4/models/common/v1/config" "github.com/nutanix/ntnx-api-golang-clients/prism-go-client/v4/models/prism/v4/config" + conns "github.com/terraform-providers/terraform-provider-nutanix/nutanix" "github.com/terraform-providers/terraform-provider-nutanix/utils" ) diff --git a/nutanix/services/prismv2/data_source_nutanix_pcs_v2.go b/nutanix/services/prismv2/data_source_nutanix_pcs_v2.go index 0f48f1cf..5b53ca24 100644 --- a/nutanix/services/prismv2/data_source_nutanix_pcs_v2.go +++ b/nutanix/services/prismv2/data_source_nutanix_pcs_v2.go @@ -6,6 +6,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/nutanix/ntnx-api-golang-clients/prism-go-client/v4/models/prism/v4/config" + conns "github.com/terraform-providers/terraform-provider-nutanix/nutanix" "github.com/terraform-providers/terraform-provider-nutanix/utils" ) diff --git a/nutanix/services/prismv2/data_source_restore_point_v2.go b/nutanix/services/prismv2/data_source_restore_point_v2.go index 1824ad79..bb0f8d6e 100644 --- a/nutanix/services/prismv2/data_source_restore_point_v2.go +++ b/nutanix/services/prismv2/data_source_restore_point_v2.go @@ -2,10 +2,12 @@ package prismv2 import ( "context" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/nutanix/ntnx-api-golang-clients/prism-go-client/v4/models/prism/v4/config" "github.com/nutanix/ntnx-api-golang-clients/prism-go-client/v4/models/prism/v4/management" + conns "github.com/terraform-providers/terraform-provider-nutanix/nutanix" "github.com/terraform-providers/terraform-provider-nutanix/utils" ) diff --git a/nutanix/services/prismv2/data_source_restore_points_v2.go b/nutanix/services/prismv2/data_source_restore_points_v2.go index b40da82c..b9351467 100644 --- a/nutanix/services/prismv2/data_source_restore_points_v2.go +++ b/nutanix/services/prismv2/data_source_restore_points_v2.go @@ -2,10 +2,12 @@ package prismv2 import ( "context" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" "github.com/nutanix/ntnx-api-golang-clients/prism-go-client/v4/models/prism/v4/management" + conns "github.com/terraform-providers/terraform-provider-nutanix/nutanix" "github.com/terraform-providers/terraform-provider-nutanix/utils" ) diff --git a/nutanix/services/prismv2/data_source_restore_source_v2.go b/nutanix/services/prismv2/data_source_restore_source_v2.go index e3027222..e82dc185 100644 --- a/nutanix/services/prismv2/data_source_restore_source_v2.go +++ b/nutanix/services/prismv2/data_source_restore_source_v2.go @@ -2,9 +2,11 @@ package prismv2 import ( "context" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/nutanix/ntnx-api-golang-clients/prism-go-client/v4/models/prism/v4/management" + conns "github.com/terraform-providers/terraform-provider-nutanix/nutanix" "github.com/terraform-providers/terraform-provider-nutanix/utils" ) diff --git a/nutanix/services/prismv2/resource_nutanix_backup_target_v2.go b/nutanix/services/prismv2/resource_nutanix_backup_target_v2.go index 564f3b61..fca6213d 100644 --- a/nutanix/services/prismv2/resource_nutanix_backup_target_v2.go +++ b/nutanix/services/prismv2/resource_nutanix_backup_target_v2.go @@ -3,13 +3,14 @@ package prismv2 import ( "context" "encoding/json" + "log" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" "github.com/nutanix/ntnx-api-golang-clients/prism-go-client/v4/models/prism/v4/config" "github.com/nutanix/ntnx-api-golang-clients/prism-go-client/v4/models/prism/v4/management" - "log" conns "github.com/terraform-providers/terraform-provider-nutanix/nutanix" "github.com/terraform-providers/terraform-provider-nutanix/utils" diff --git a/nutanix/services/prismv2/resource_nutanix_pc_registration_v2_test.go b/nutanix/services/prismv2/resource_nutanix_pc_registration_v2_test.go index 4d5317ea..0ffdba76 100644 --- a/nutanix/services/prismv2/resource_nutanix_pc_registration_v2_test.go +++ b/nutanix/services/prismv2/resource_nutanix_pc_registration_v2_test.go @@ -5,6 +5,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + acc "github.com/terraform-providers/terraform-provider-nutanix/nutanix/acctest" ) diff --git a/nutanix/services/prismv2/resource_nutanix_restore_pc_v2.go b/nutanix/services/prismv2/resource_nutanix_restore_pc_v2.go index 31d67cb6..3adc16d4 100644 --- a/nutanix/services/prismv2/resource_nutanix_restore_pc_v2.go +++ b/nutanix/services/prismv2/resource_nutanix_restore_pc_v2.go @@ -3,13 +3,14 @@ package prismv2 import ( "context" "encoding/json" - "github.com/nutanix/ntnx-api-golang-clients/prism-go-client/v4/models/prism/v4/management" "log" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/nutanix/ntnx-api-golang-clients/prism-go-client/v4/models/prism/v4/config" + "github.com/nutanix/ntnx-api-golang-clients/prism-go-client/v4/models/prism/v4/management" + conns "github.com/terraform-providers/terraform-provider-nutanix/nutanix" "github.com/terraform-providers/terraform-provider-nutanix/utils" ) diff --git a/nutanix/services/prismv2/resource_nutanix_restore_source_v2.go b/nutanix/services/prismv2/resource_nutanix_restore_source_v2.go index cf1c96f0..b6ae3264 100644 --- a/nutanix/services/prismv2/resource_nutanix_restore_source_v2.go +++ b/nutanix/services/prismv2/resource_nutanix_restore_source_v2.go @@ -3,13 +3,14 @@ package prismv2 import ( "context" "encoding/json" + "log" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" "github.com/nutanix/ntnx-api-golang-clients/prism-go-client/v4/models/prism/v4/config" "github.com/nutanix/ntnx-api-golang-clients/prism-go-client/v4/models/prism/v4/management" - "log" conns "github.com/terraform-providers/terraform-provider-nutanix/nutanix" "github.com/terraform-providers/terraform-provider-nutanix/utils"