From 0d970b85421b126521d07d2ba5445b5818b9a034 Mon Sep 17 00:00:00 2001 From: Mickael Stanislas Date: Thu, 5 Oct 2023 10:11:21 +0200 Subject: [PATCH] chore: migrate cloudavenue sdk to infrapi (#556) --- .golangci.yml | 2 +- go.mod | 2 +- go.sum | 4 ++-- internal/client/client.go | 2 +- internal/client/client_test.go | 2 +- internal/helpers/api_errors.go | 2 +- internal/helpers/auth.go | 2 +- internal/helpers/auth_test.go | 2 +- internal/provider/edgegw/edgegateway_datasource.go | 2 +- internal/provider/edgegw/edgegateway_resource.go | 2 +- internal/provider/publicip/publicip_resource.go | 2 +- internal/provider/vdc/vdc_resource.go | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 9d638443..34b03b91 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -108,7 +108,7 @@ linters-settings: - prefix(github.com/hashicorp/terraform-plugin-framework-validators/) - prefix(github.com/hashicorp) - prefix(github.com/FrangipaneTeam) - - prefix(github.com/orange-cloudavenue/terraform-provider-cloudavenue,github.com/orange-cloudavenue/cloudavenue-sdk-go) + - prefix(github.com/orange-cloudavenue/terraform-provider-cloudavenue,github.com/orange-cloudavenue/cloudavenue-sdk-go,github.com/orange-cloudavenue/infrapi-sdk-go) - blank # Blank section: contains all blank imports. This section is not present unless explicitly enabled. - dot # Dot section: contains all dot imports. This section is not present unless explicitly enabled. skip-generated: true diff --git a/go.mod b/go.mod index 23238763..c7409789 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,7 @@ require ( github.com/hashicorp/terraform-plugin-log v0.9.0 github.com/hashicorp/terraform-plugin-sdk/v2 v2.29.0 github.com/iancoleman/strcase v0.3.0 - github.com/orange-cloudavenue/cloudavenue-sdk-go v0.1.3 + github.com/orange-cloudavenue/infrapi-sdk-go v0.1.4-0.20231005074857-89878ea119fb github.com/orange-cloudavenue/netbackup-sdk-go v0.0.2-0.20230928095122-108fd1ec28ae github.com/rs/zerolog v1.31.0 github.com/thanhpk/randstr v1.0.6 diff --git a/go.sum b/go.sum index e1b15e07..d574bb5b 100644 --- a/go.sum +++ b/go.sum @@ -216,8 +216,8 @@ github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE= -github.com/orange-cloudavenue/cloudavenue-sdk-go v0.1.3 h1:nnFO5vxf70gWZkPcM153LYwHA1fa+0QqtzH2t71AMFA= -github.com/orange-cloudavenue/cloudavenue-sdk-go v0.1.3/go.mod h1:bMSQ+EQ0CtwIca1J133sM9fc/4cAfLXN3r4TpnS0BDY= +github.com/orange-cloudavenue/infrapi-sdk-go v0.1.4-0.20231005074857-89878ea119fb h1:1/Wc21Tp9RnDOUTjKBm9x3wi+UgUkDc2bv0fHJc5f2o= +github.com/orange-cloudavenue/infrapi-sdk-go v0.1.4-0.20231005074857-89878ea119fb/go.mod h1:pGa9mB6s+weCi5QtNe5nicp7yL0C/e+i+3wHRh4cjBE= github.com/orange-cloudavenue/netbackup-sdk-go v0.0.2-0.20230928095122-108fd1ec28ae h1:eOxAQKxWiC1iJzhhLW2bD4UCe55viWa0v3IejsbKjdE= github.com/orange-cloudavenue/netbackup-sdk-go v0.0.2-0.20230928095122-108fd1ec28ae/go.mod h1:KaxPSw6c1JNm+F9YRydHVEhoNjIfrjadKl0BPhRLPvM= github.com/peterhellberg/link v1.2.0 h1:UA5pg3Gp/E0F2WdX7GERiNrPQrM1K6CVJUUWfHa4t6c= diff --git a/internal/client/client.go b/internal/client/client.go index f12d7219..365f628f 100644 --- a/internal/client/client.go +++ b/internal/client/client.go @@ -9,7 +9,7 @@ import ( "github.com/vmware/go-vcloud-director/v2/govcd" - apiclient "github.com/orange-cloudavenue/cloudavenue-sdk-go" + apiclient "github.com/orange-cloudavenue/infrapi-sdk-go" ) var ( diff --git a/internal/client/client_test.go b/internal/client/client_test.go index d120c951..fb409cd3 100644 --- a/internal/client/client_test.go +++ b/internal/client/client_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - apiclient "github.com/orange-cloudavenue/cloudavenue-sdk-go" + apiclient "github.com/orange-cloudavenue/infrapi-sdk-go" ) func TestCloudAvenueClient(t *testing.T) { diff --git a/internal/helpers/api_errors.go b/internal/helpers/api_errors.go index 2c49046a..7a1a3768 100644 --- a/internal/helpers/api_errors.go +++ b/internal/helpers/api_errors.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/diag" - "github.com/orange-cloudavenue/cloudavenue-sdk-go" + cloudavenue "github.com/orange-cloudavenue/infrapi-sdk-go" ) // APIError is an error returned by the CloudAvenue API. diff --git a/internal/helpers/auth.go b/internal/helpers/auth.go index b8449fd6..8e9aafe1 100644 --- a/internal/helpers/auth.go +++ b/internal/helpers/auth.go @@ -5,7 +5,7 @@ import ( "context" "errors" - apiclient "github.com/orange-cloudavenue/cloudavenue-sdk-go" + apiclient "github.com/orange-cloudavenue/infrapi-sdk-go" ) // GetAuthContextWithTO is a helper function to create the auth context with the token api and the terraform context with timeout. diff --git a/internal/helpers/auth_test.go b/internal/helpers/auth_test.go index 2e10fa10..2f2cf384 100644 --- a/internal/helpers/auth_test.go +++ b/internal/helpers/auth_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - apiclient "github.com/orange-cloudavenue/cloudavenue-sdk-go" + apiclient "github.com/orange-cloudavenue/infrapi-sdk-go" ) func TestGetAuthContextWithTO(t *testing.T) { diff --git a/internal/provider/edgegw/edgegateway_datasource.go b/internal/provider/edgegw/edgegateway_datasource.go index 902d4393..178238b3 100644 --- a/internal/provider/edgegw/edgegateway_datasource.go +++ b/internal/provider/edgegw/edgegateway_datasource.go @@ -10,7 +10,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/datasource" - apiclient "github.com/orange-cloudavenue/cloudavenue-sdk-go" + apiclient "github.com/orange-cloudavenue/infrapi-sdk-go" "github.com/orange-cloudavenue/terraform-provider-cloudavenue/internal/client" "github.com/orange-cloudavenue/terraform-provider-cloudavenue/internal/helpers" "github.com/orange-cloudavenue/terraform-provider-cloudavenue/internal/metrics" diff --git a/internal/provider/edgegw/edgegateway_resource.go b/internal/provider/edgegw/edgegateway_resource.go index bc38c790..283174f0 100644 --- a/internal/provider/edgegw/edgegateway_resource.go +++ b/internal/provider/edgegw/edgegateway_resource.go @@ -17,7 +17,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" - apiclient "github.com/orange-cloudavenue/cloudavenue-sdk-go" + apiclient "github.com/orange-cloudavenue/infrapi-sdk-go" "github.com/orange-cloudavenue/terraform-provider-cloudavenue/internal/client" "github.com/orange-cloudavenue/terraform-provider-cloudavenue/internal/helpers" "github.com/orange-cloudavenue/terraform-provider-cloudavenue/internal/metrics" diff --git a/internal/provider/publicip/publicip_resource.go b/internal/provider/publicip/publicip_resource.go index 5da165fa..424a912a 100644 --- a/internal/provider/publicip/publicip_resource.go +++ b/internal/provider/publicip/publicip_resource.go @@ -19,7 +19,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" - apiclient "github.com/orange-cloudavenue/cloudavenue-sdk-go" + apiclient "github.com/orange-cloudavenue/infrapi-sdk-go" "github.com/orange-cloudavenue/terraform-provider-cloudavenue/internal/client" "github.com/orange-cloudavenue/terraform-provider-cloudavenue/internal/helpers" "github.com/orange-cloudavenue/terraform-provider-cloudavenue/internal/metrics" diff --git a/internal/provider/vdc/vdc_resource.go b/internal/provider/vdc/vdc_resource.go index 8953d993..4fe6c5c7 100644 --- a/internal/provider/vdc/vdc_resource.go +++ b/internal/provider/vdc/vdc_resource.go @@ -16,7 +16,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" - apiclient "github.com/orange-cloudavenue/cloudavenue-sdk-go" + apiclient "github.com/orange-cloudavenue/infrapi-sdk-go" "github.com/orange-cloudavenue/terraform-provider-cloudavenue/internal/client" "github.com/orange-cloudavenue/terraform-provider-cloudavenue/internal/helpers" "github.com/orange-cloudavenue/terraform-provider-cloudavenue/internal/metrics"