From 4523097c4fa9b1b0e5d3385593b9024b86d45b39 Mon Sep 17 00:00:00 2001 From: Alistair Yan <52126234+1riatsila1@users.noreply.github.com> Date: Fri, 1 Nov 2024 12:28:12 +0000 Subject: [PATCH] fix: align structure with scaffolding framework (#59) --- .github/workflows/lint-test-code.yaml | 8 +-- Justfile | 55 ++++++------------- cmd/client_tester/go.mod | 9 --- cmd/client_tester/main.go | 23 -------- .../docs => docs}/data-sources/agent.md | 0 .../docs => docs}/data-sources/group.md | 0 .../data-sources/network_group_assignment.md | 0 .../docs => docs}/data-sources/sensor.md | 0 .../data-sources/sensor_group_assignment.md | 0 .../data-sources/wired_network.md | 0 .../data-sources/wireless_network.md | 0 .../docs => docs}/index.md | 0 .../docs => docs}/resources/agent.md | 0 .../resources/agent_group_assignment.md | 0 .../docs => docs}/resources/group.md | 0 .../resources/network_group_assignment.md | 0 .../docs => docs}/resources/sensor.md | 0 .../resources/sensor_group_assignment.md | 0 .../docs => docs}/resources/service_test.md | 0 .../service_test_group_assignment.md | 0 .../docs => docs}/resources/wired_network.md | 0 .../resources/wireless_network.md | 0 .../examples => examples}/full-demo/main.tf | 0 .../future_plan.tf => future_plan.tf | 0 pkg/config-api-provider/go.mod => go.mod | 4 +- pkg/config-api-provider/go.sum => go.sum | 0 .../provider/config/config.go | 0 .../provider/datasources}/agent.go | 2 +- .../provider/datasources}/group.go | 2 +- .../datasources}/network_group_assignment.go | 2 +- .../provider/datasources}/sensor.go | 2 +- .../datasources}/sensor_group_assignment.go | 2 +- .../provider/datasources}/wired_network.go | 2 +- .../provider/datasources}/wireless_network.go | 2 +- .../provider/provider.go | 4 +- .../provider/resources/agent.go | 2 +- .../resources/agent_group_assignment.go | 0 .../provider/resources/group.go | 2 +- .../resources/network_group_assignment.go | 2 +- .../provider/resources/sensor.go | 2 +- .../resources/sensor_group_assignment.go | 2 +- .../provider/resources/service.go | 0 .../resources/service_group_assignment.go | 2 +- .../provider/resources/wired_network.go | 2 +- .../provider/resources/wireless_network.go | 2 +- .../provider/util/error_handling.go | 0 .../provider/util/group.go | 0 .../provider/util/retry.go | 2 +- pkg/config-api-provider/main.go => main.go | 2 +- .../test => test}/data-sources/agent_test.go | 4 +- .../test => test}/data-sources/group_test.go | 4 +- .../network_group_assignment_test.go | 4 +- .../sensor_group_assignment_test.go | 4 +- .../test => test}/data-sources/sensor_test.go | 4 +- .../data-sources/wired_network_test.go | 4 +- .../data-sources/wireless_network_test.go | 4 +- .../test => test}/provider/provider.go | 2 +- .../resources/agent_group_assignment_test.go | 6 +- .../test => test}/resources/agent_test.go | 4 +- .../test => test}/resources/group_test.go | 4 +- .../network_group_assignment_test.go | 4 +- .../resources/sensor_group_assignment_test.go | 4 +- .../test => test}/resources/sensor_test.go | 4 +- .../test => test}/resources/service_test.go | 6 +- .../service_test_group_assignment_test.go | 6 +- .../resources/wired_network_test.go | 4 +- .../resources/wireless_network_test.go | 4 +- .../test => test}/util/utils.go | 2 +- 68 files changed, 80 insertions(+), 135 deletions(-) delete mode 100644 cmd/client_tester/go.mod delete mode 100644 cmd/client_tester/main.go rename {pkg/config-api-provider/docs => docs}/data-sources/agent.md (100%) rename {pkg/config-api-provider/docs => docs}/data-sources/group.md (100%) rename {pkg/config-api-provider/docs => docs}/data-sources/network_group_assignment.md (100%) rename {pkg/config-api-provider/docs => docs}/data-sources/sensor.md (100%) rename {pkg/config-api-provider/docs => docs}/data-sources/sensor_group_assignment.md (100%) rename {pkg/config-api-provider/docs => docs}/data-sources/wired_network.md (100%) rename {pkg/config-api-provider/docs => docs}/data-sources/wireless_network.md (100%) rename {pkg/config-api-provider/docs => docs}/index.md (100%) rename {pkg/config-api-provider/docs => docs}/resources/agent.md (100%) rename {pkg/config-api-provider/docs => docs}/resources/agent_group_assignment.md (100%) rename {pkg/config-api-provider/docs => docs}/resources/group.md (100%) rename {pkg/config-api-provider/docs => docs}/resources/network_group_assignment.md (100%) rename {pkg/config-api-provider/docs => docs}/resources/sensor.md (100%) rename {pkg/config-api-provider/docs => docs}/resources/sensor_group_assignment.md (100%) rename {pkg/config-api-provider/docs => docs}/resources/service_test.md (100%) rename {pkg/config-api-provider/docs => docs}/resources/service_test_group_assignment.md (100%) rename {pkg/config-api-provider/docs => docs}/resources/wired_network.md (100%) rename {pkg/config-api-provider/docs => docs}/resources/wireless_network.md (100%) rename {pkg/config-api-provider/examples => examples}/full-demo/main.tf (100%) rename pkg/config-api-provider/future_plan.tf => future_plan.tf (100%) rename pkg/config-api-provider/go.mod => go.mod (97%) rename pkg/config-api-provider/go.sum => go.sum (100%) rename {pkg/config-api-provider => internal}/provider/config/config.go (100%) rename {pkg/config-api-provider/provider/data-sources => internal/provider/datasources}/agent.go (97%) rename {pkg/config-api-provider/provider/data-sources => internal/provider/datasources}/group.go (96%) rename {pkg/config-api-provider/provider/data-sources => internal/provider/datasources}/network_group_assignment.go (96%) rename {pkg/config-api-provider/provider/data-sources => internal/provider/datasources}/sensor.go (97%) rename {pkg/config-api-provider/provider/data-sources => internal/provider/datasources}/sensor_group_assignment.go (97%) rename {pkg/config-api-provider/provider/data-sources => internal/provider/datasources}/wired_network.go (97%) rename {pkg/config-api-provider/provider/data-sources => internal/provider/datasources}/wireless_network.go (97%) rename {pkg/config-api-provider => internal}/provider/provider.go (96%) rename {pkg/config-api-provider => internal}/provider/resources/agent.go (98%) rename {pkg/config-api-provider => internal}/provider/resources/agent_group_assignment.go (100%) rename {pkg/config-api-provider => internal}/provider/resources/group.go (98%) rename {pkg/config-api-provider => internal}/provider/resources/network_group_assignment.go (98%) rename {pkg/config-api-provider => internal}/provider/resources/sensor.go (98%) rename {pkg/config-api-provider => internal}/provider/resources/sensor_group_assignment.go (98%) rename {pkg/config-api-provider => internal}/provider/resources/service.go (100%) rename {pkg/config-api-provider => internal}/provider/resources/service_group_assignment.go (98%) rename {pkg/config-api-provider => internal}/provider/resources/wired_network.go (97%) rename {pkg/config-api-provider => internal}/provider/resources/wireless_network.go (97%) rename {pkg/config-api-provider => internal}/provider/util/error_handling.go (100%) rename {pkg/config-api-provider => internal}/provider/util/group.go (100%) rename {pkg/config-api-provider => internal}/provider/util/retry.go (88%) rename pkg/config-api-provider/main.go => main.go (85%) rename {pkg/config-api-provider/test => test}/data-sources/agent_test.go (94%) rename {pkg/config-api-provider/test => test}/data-sources/group_test.go (95%) rename {pkg/config-api-provider/test => test}/data-sources/network_group_assignment_test.go (95%) rename {pkg/config-api-provider/test => test}/data-sources/sensor_group_assignment_test.go (95%) rename {pkg/config-api-provider/test => test}/data-sources/sensor_test.go (94%) rename {pkg/config-api-provider/test => test}/data-sources/wired_network_test.go (95%) rename {pkg/config-api-provider/test => test}/data-sources/wireless_network_test.go (95%) rename {pkg/config-api-provider/test => test}/provider/provider.go (88%) rename {pkg/config-api-provider/test => test}/resources/agent_group_assignment_test.go (95%) rename {pkg/config-api-provider/test => test}/resources/agent_test.go (97%) rename {pkg/config-api-provider/test => test}/resources/group_test.go (98%) rename {pkg/config-api-provider/test => test}/resources/network_group_assignment_test.go (99%) rename {pkg/config-api-provider/test => test}/resources/sensor_group_assignment_test.go (99%) rename {pkg/config-api-provider/test => test}/resources/sensor_test.go (97%) rename {pkg/config-api-provider/test => test}/resources/service_test.go (88%) rename {pkg/config-api-provider/test => test}/resources/service_test_group_assignment_test.go (97%) rename {pkg/config-api-provider/test => test}/resources/wired_network_test.go (95%) rename {pkg/config-api-provider/test => test}/resources/wireless_network_test.go (96%) rename {pkg/config-api-provider/test => test}/util/utils.go (99%) diff --git a/.github/workflows/lint-test-code.yaml b/.github/workflows/lint-test-code.yaml index d7e66363..59f98f6e 100644 --- a/.github/workflows/lint-test-code.yaml +++ b/.github/workflows/lint-test-code.yaml @@ -36,12 +36,12 @@ jobs: run: just setup-dev - name: Run Code Linting Test - run: just lint >> "$GITHUB_STEP_SUMMARY" + run: just lint - name: Check package files up to date run: | just tidy - git diff --exit-code -- pkg/config-api-client/go.* pkg/config-api-provider/go.* + git diff --exit-code -- go.* pkg/config-api-client/go.* - name: Run Tests run: | @@ -51,7 +51,7 @@ jobs: - name: Check Provider docs up to date run: | just generate-provider-docs - git diff --exit-code -- pkg/config-api-provider/docs + git diff --exit-code -- docs - name: Check Provider docs valid run: just validate-provider-docs @@ -60,6 +60,6 @@ jobs: uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} - files: ./pkg/config-api-client/.coverage,./pkg/config-api-provider/.coverage + files: ./pkg/config-api-client/.coverage,.coverage flage: client,provider fail_ci_if_error: true diff --git a/Justfile b/Justfile index 1ac6e9c1..635eecdc 100644 --- a/Justfile +++ b/Justfile @@ -1,6 +1,6 @@ TMP_DIR := "tmp" CONFIG_API_CLIENT_DIR := "pkg/config-api-client" -CONFIG_API_PROVIDER_DIR := "pkg/config-api-provider" +CONFIG_API_PROVIDER_DIR := "." TOOLS_PROVIDER_DIR := "tools" OPENAPI_SPEC := "pkg/config-api-client/api" SOURCE_OPEN_API_SPEC_FILE := ".openapi.source.yaml" @@ -12,11 +12,11 @@ retrieve-config-api-openapi-spec: cp {{ TMP_DIR }}/oas/openapi.yaml {{ OPENAPI_SPEC }}/{{ SOURCE_OPEN_API_SPEC_FILE }} rm -rf {{ TMP_DIR }} -cleanup-old-files: +cleanup-old-client-files: cd {{ CONFIG_API_CLIENT_DIR }} && cat .openapi-generator/FILES | xargs -n 1 rm -f generate-config-api-client: retrieve-config-api-openapi-spec - just cleanup-old-files + just cleanup-old-client-files docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli generate \ --input-spec /local/{{ OPENAPI_SPEC }}/{{ SOURCE_OPEN_API_SPEC_FILE }} \ --generator-name go \ @@ -45,56 +45,41 @@ fmt-client: tidy-client: cd {{ CONFIG_API_CLIENT_DIR }} && go mod tidy -lint-client: - #!/usr/bin/env bash - - cd pkg/config-api-client - - if [ -n "$(gofmt -d .)" ]; then - echo "Error: (gofmt) formatting required" >&2 - exit 1 - fi - - if [ -n "$(golines . --dry-run)" ]; then - echo "Error: (golines) formatting required" >&2 - exit 1 - fi - - golangci-lint run - -lint-provider: +lint: #!/usr/bin/env bash - cd pkg/config-api-provider - - if [ -n "$(gofmt -d .)" ]; then + output=$(gofmt -d .) + if [ -n "$output" ]; then + echo "$output" echo "Error: (gofmt) formatting required" >&2 exit 1 fi - if [ -n "$(golines . --dry-run)" ]; then + output=$(golines . --dry-run) + if [ -n "$output" ]; then + echo "$output" echo "Error: (golines) formatting required" >&2 exit 1 fi golangci-lint run -fmt-provider: - gofmt -w {{ CONFIG_API_PROVIDER_DIR }} - golines -w {{ CONFIG_API_PROVIDER_DIR }} +fmt: + gofmt -w . + golines -w . tidy-provider: - cd {{ CONFIG_API_PROVIDER_DIR }} && go mod tidy + cd {{ CONFIG_API_PROVIDER_DIR }} go mod tidy test-provider +ARGS='': cd {{ CONFIG_API_PROVIDER_DIR }} && TF_ACC=1 go test -v ./... -race -covermode=atomic -coverprofile=.coverage {{ ARGS }} generate-provider-docs: - cd {{ TOOLS_PROVIDER_DIR }} && go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs generate --provider-dir ../{{ CONFIG_API_PROVIDER_DIR }} -provider-name uxi + cd {{ TOOLS_PROVIDER_DIR }} && go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs generate --provider-dir ../{{ CONFIG_API_PROVIDER_DIR }} --provider-name uxi sed -i.backup '/subcategory: ""/d' ./{{ CONFIG_API_PROVIDER_DIR }}/docs/index.md && rm ./{{ CONFIG_API_PROVIDER_DIR }}/docs/index.md.backup validate-provider-docs: - cd {{ TOOLS_PROVIDER_DIR }} && go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs validate --provider-dir ../{{ CONFIG_API_PROVIDER_DIR }} -provider-name uxi + cd {{ TOOLS_PROVIDER_DIR }} && go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs validate --provider-dir ../{{ CONFIG_API_PROVIDER_DIR }} --provider-name uxi coverage-provider: cd {{ CONFIG_API_PROVIDER_DIR }} && go tool cover -html=.coverage -o=.coverage.html @@ -110,14 +95,6 @@ coverage: just coverage-client just coverage-provider -lint: - just lint-client - just lint-provider - -fmt: - just fmt-client - just fmt-provider - tidy: just tidy-client just tidy-provider diff --git a/cmd/client_tester/go.mod b/cmd/client_tester/go.mod deleted file mode 100644 index b8b34e68..00000000 --- a/cmd/client_tester/go.mod +++ /dev/null @@ -1,9 +0,0 @@ -// NOTE: This module is just here for demonstration purposes - -module alistair/client_tester - -go 1.22.5 - -replace github.com/aruba-uxi/configuration-api-terraform-provider/pkg/config-api-client => ../../pkg/config-api-client - -require github.com/aruba-uxi/configuration-api-terraform-provider/pkg/config-api-client v0.0.0-00010101000000-000000000000 diff --git a/cmd/client_tester/main.go b/cmd/client_tester/main.go deleted file mode 100644 index 18a31574..00000000 --- a/cmd/client_tester/main.go +++ /dev/null @@ -1,23 +0,0 @@ -// NOTE: This module is just here for demonstration purposes - -package main - -import ( - "context" - "fmt" - - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/config-api-client" -) - -func main() { - config := config_api_client.NewConfiguration() - config.Host = "localhost:80" - config.Scheme = "http" - client := config_api_client.NewAPIClient(config) - - resp, httpResp, err := client.ConfigurationAPI.GetLivezHealthLivezGet(context.Background()).Execute() - - fmt.Println(resp) - fmt.Println(httpResp) - fmt.Println(err) -} diff --git a/pkg/config-api-provider/docs/data-sources/agent.md b/docs/data-sources/agent.md similarity index 100% rename from pkg/config-api-provider/docs/data-sources/agent.md rename to docs/data-sources/agent.md diff --git a/pkg/config-api-provider/docs/data-sources/group.md b/docs/data-sources/group.md similarity index 100% rename from pkg/config-api-provider/docs/data-sources/group.md rename to docs/data-sources/group.md diff --git a/pkg/config-api-provider/docs/data-sources/network_group_assignment.md b/docs/data-sources/network_group_assignment.md similarity index 100% rename from pkg/config-api-provider/docs/data-sources/network_group_assignment.md rename to docs/data-sources/network_group_assignment.md diff --git a/pkg/config-api-provider/docs/data-sources/sensor.md b/docs/data-sources/sensor.md similarity index 100% rename from pkg/config-api-provider/docs/data-sources/sensor.md rename to docs/data-sources/sensor.md diff --git a/pkg/config-api-provider/docs/data-sources/sensor_group_assignment.md b/docs/data-sources/sensor_group_assignment.md similarity index 100% rename from pkg/config-api-provider/docs/data-sources/sensor_group_assignment.md rename to docs/data-sources/sensor_group_assignment.md diff --git a/pkg/config-api-provider/docs/data-sources/wired_network.md b/docs/data-sources/wired_network.md similarity index 100% rename from pkg/config-api-provider/docs/data-sources/wired_network.md rename to docs/data-sources/wired_network.md diff --git a/pkg/config-api-provider/docs/data-sources/wireless_network.md b/docs/data-sources/wireless_network.md similarity index 100% rename from pkg/config-api-provider/docs/data-sources/wireless_network.md rename to docs/data-sources/wireless_network.md diff --git a/pkg/config-api-provider/docs/index.md b/docs/index.md similarity index 100% rename from pkg/config-api-provider/docs/index.md rename to docs/index.md diff --git a/pkg/config-api-provider/docs/resources/agent.md b/docs/resources/agent.md similarity index 100% rename from pkg/config-api-provider/docs/resources/agent.md rename to docs/resources/agent.md diff --git a/pkg/config-api-provider/docs/resources/agent_group_assignment.md b/docs/resources/agent_group_assignment.md similarity index 100% rename from pkg/config-api-provider/docs/resources/agent_group_assignment.md rename to docs/resources/agent_group_assignment.md diff --git a/pkg/config-api-provider/docs/resources/group.md b/docs/resources/group.md similarity index 100% rename from pkg/config-api-provider/docs/resources/group.md rename to docs/resources/group.md diff --git a/pkg/config-api-provider/docs/resources/network_group_assignment.md b/docs/resources/network_group_assignment.md similarity index 100% rename from pkg/config-api-provider/docs/resources/network_group_assignment.md rename to docs/resources/network_group_assignment.md diff --git a/pkg/config-api-provider/docs/resources/sensor.md b/docs/resources/sensor.md similarity index 100% rename from pkg/config-api-provider/docs/resources/sensor.md rename to docs/resources/sensor.md diff --git a/pkg/config-api-provider/docs/resources/sensor_group_assignment.md b/docs/resources/sensor_group_assignment.md similarity index 100% rename from pkg/config-api-provider/docs/resources/sensor_group_assignment.md rename to docs/resources/sensor_group_assignment.md diff --git a/pkg/config-api-provider/docs/resources/service_test.md b/docs/resources/service_test.md similarity index 100% rename from pkg/config-api-provider/docs/resources/service_test.md rename to docs/resources/service_test.md diff --git a/pkg/config-api-provider/docs/resources/service_test_group_assignment.md b/docs/resources/service_test_group_assignment.md similarity index 100% rename from pkg/config-api-provider/docs/resources/service_test_group_assignment.md rename to docs/resources/service_test_group_assignment.md diff --git a/pkg/config-api-provider/docs/resources/wired_network.md b/docs/resources/wired_network.md similarity index 100% rename from pkg/config-api-provider/docs/resources/wired_network.md rename to docs/resources/wired_network.md diff --git a/pkg/config-api-provider/docs/resources/wireless_network.md b/docs/resources/wireless_network.md similarity index 100% rename from pkg/config-api-provider/docs/resources/wireless_network.md rename to docs/resources/wireless_network.md diff --git a/pkg/config-api-provider/examples/full-demo/main.tf b/examples/full-demo/main.tf similarity index 100% rename from pkg/config-api-provider/examples/full-demo/main.tf rename to examples/full-demo/main.tf diff --git a/pkg/config-api-provider/future_plan.tf b/future_plan.tf similarity index 100% rename from pkg/config-api-provider/future_plan.tf rename to future_plan.tf diff --git a/pkg/config-api-provider/go.mod b/go.mod similarity index 97% rename from pkg/config-api-provider/go.mod rename to go.mod index f12e74d1..dc0fd089 100644 --- a/pkg/config-api-provider/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration +module github.com/aruba-uxi/configuration-api-terraform-provider go 1.21 @@ -68,4 +68,4 @@ require ( google.golang.org/protobuf v1.34.0 // indirect ) -replace github.com/aruba-uxi/configuration-api-terraform-provider/pkg/config-api-client => ../config-api-client +replace github.com/aruba-uxi/configuration-api-terraform-provider/pkg/config-api-client => ./pkg/config-api-client diff --git a/pkg/config-api-provider/go.sum b/go.sum similarity index 100% rename from pkg/config-api-provider/go.sum rename to go.sum diff --git a/pkg/config-api-provider/provider/config/config.go b/internal/provider/config/config.go similarity index 100% rename from pkg/config-api-provider/provider/config/config.go rename to internal/provider/config/config.go diff --git a/pkg/config-api-provider/provider/data-sources/agent.go b/internal/provider/datasources/agent.go similarity index 97% rename from pkg/config-api-provider/provider/data-sources/agent.go rename to internal/provider/datasources/agent.go index 18a64333..0ed9666f 100644 --- a/pkg/config-api-provider/provider/data-sources/agent.go +++ b/internal/provider/datasources/agent.go @@ -3,8 +3,8 @@ package datasources import ( "context" + "github.com/aruba-uxi/configuration-api-terraform-provider/internal/provider/util" config_api_client "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/config-api-client" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/provider/util" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/datasource/schema" "github.com/hashicorp/terraform-plugin-framework/types" diff --git a/pkg/config-api-provider/provider/data-sources/group.go b/internal/provider/datasources/group.go similarity index 96% rename from pkg/config-api-provider/provider/data-sources/group.go rename to internal/provider/datasources/group.go index 0dffd5ad..00656c4a 100644 --- a/pkg/config-api-provider/provider/data-sources/group.go +++ b/internal/provider/datasources/group.go @@ -3,8 +3,8 @@ package datasources import ( "context" + "github.com/aruba-uxi/configuration-api-terraform-provider/internal/provider/util" config_api_client "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/config-api-client" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/provider/util" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/datasource/schema" "github.com/hashicorp/terraform-plugin-framework/types" diff --git a/pkg/config-api-provider/provider/data-sources/network_group_assignment.go b/internal/provider/datasources/network_group_assignment.go similarity index 96% rename from pkg/config-api-provider/provider/data-sources/network_group_assignment.go rename to internal/provider/datasources/network_group_assignment.go index 17f2b058..fa2c8528 100644 --- a/pkg/config-api-provider/provider/data-sources/network_group_assignment.go +++ b/internal/provider/datasources/network_group_assignment.go @@ -3,8 +3,8 @@ package datasources import ( "context" + "github.com/aruba-uxi/configuration-api-terraform-provider/internal/provider/util" config_api_client "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/config-api-client" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/provider/util" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/datasource/schema" "github.com/hashicorp/terraform-plugin-framework/types" diff --git a/pkg/config-api-provider/provider/data-sources/sensor.go b/internal/provider/datasources/sensor.go similarity index 97% rename from pkg/config-api-provider/provider/data-sources/sensor.go rename to internal/provider/datasources/sensor.go index 74ad3557..cdaf419d 100644 --- a/pkg/config-api-provider/provider/data-sources/sensor.go +++ b/internal/provider/datasources/sensor.go @@ -3,8 +3,8 @@ package datasources import ( "context" + "github.com/aruba-uxi/configuration-api-terraform-provider/internal/provider/util" config_api_client "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/config-api-client" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/provider/util" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/datasource/schema" "github.com/hashicorp/terraform-plugin-framework/types" diff --git a/pkg/config-api-provider/provider/data-sources/sensor_group_assignment.go b/internal/provider/datasources/sensor_group_assignment.go similarity index 97% rename from pkg/config-api-provider/provider/data-sources/sensor_group_assignment.go rename to internal/provider/datasources/sensor_group_assignment.go index 8c08841c..f4a2f9de 100644 --- a/pkg/config-api-provider/provider/data-sources/sensor_group_assignment.go +++ b/internal/provider/datasources/sensor_group_assignment.go @@ -3,8 +3,8 @@ package datasources import ( "context" + "github.com/aruba-uxi/configuration-api-terraform-provider/internal/provider/util" config_api_client "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/config-api-client" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/provider/util" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/datasource/schema" "github.com/hashicorp/terraform-plugin-framework/types" diff --git a/pkg/config-api-provider/provider/data-sources/wired_network.go b/internal/provider/datasources/wired_network.go similarity index 97% rename from pkg/config-api-provider/provider/data-sources/wired_network.go rename to internal/provider/datasources/wired_network.go index f0e5869e..f00a664f 100644 --- a/pkg/config-api-provider/provider/data-sources/wired_network.go +++ b/internal/provider/datasources/wired_network.go @@ -3,8 +3,8 @@ package datasources import ( "context" + "github.com/aruba-uxi/configuration-api-terraform-provider/internal/provider/util" config_api_client "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/config-api-client" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/provider/util" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/datasource/schema" "github.com/hashicorp/terraform-plugin-framework/types" diff --git a/pkg/config-api-provider/provider/data-sources/wireless_network.go b/internal/provider/datasources/wireless_network.go similarity index 97% rename from pkg/config-api-provider/provider/data-sources/wireless_network.go rename to internal/provider/datasources/wireless_network.go index e9bdb04e..42db0ac5 100644 --- a/pkg/config-api-provider/provider/data-sources/wireless_network.go +++ b/internal/provider/datasources/wireless_network.go @@ -3,8 +3,8 @@ package datasources import ( "context" + "github.com/aruba-uxi/configuration-api-terraform-provider/internal/provider/util" config_api_client "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/config-api-client" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/provider/util" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/datasource/schema" "github.com/hashicorp/terraform-plugin-framework/types" diff --git a/pkg/config-api-provider/provider/provider.go b/internal/provider/provider.go similarity index 96% rename from pkg/config-api-provider/provider/provider.go rename to internal/provider/provider.go index 1032f40c..ec13ccd5 100644 --- a/pkg/config-api-provider/provider/provider.go +++ b/internal/provider/provider.go @@ -4,8 +4,8 @@ import ( "context" "os" - datasources "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/provider/data-sources" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/provider/resources" + "github.com/aruba-uxi/configuration-api-terraform-provider/internal/provider/datasources" + "github.com/aruba-uxi/configuration-api-terraform-provider/internal/provider/resources" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/path" "github.com/hashicorp/terraform-plugin-framework/provider" diff --git a/pkg/config-api-provider/provider/resources/agent.go b/internal/provider/resources/agent.go similarity index 98% rename from pkg/config-api-provider/provider/resources/agent.go rename to internal/provider/resources/agent.go index de9bb6ca..97dd19a3 100644 --- a/pkg/config-api-provider/provider/resources/agent.go +++ b/internal/provider/resources/agent.go @@ -3,8 +3,8 @@ package resources import ( "context" + "github.com/aruba-uxi/configuration-api-terraform-provider/internal/provider/util" "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/config-api-client" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/provider/util" "github.com/hashicorp/terraform-plugin-framework/path" "github.com/hashicorp/terraform-plugin-framework/resource" diff --git a/pkg/config-api-provider/provider/resources/agent_group_assignment.go b/internal/provider/resources/agent_group_assignment.go similarity index 100% rename from pkg/config-api-provider/provider/resources/agent_group_assignment.go rename to internal/provider/resources/agent_group_assignment.go diff --git a/pkg/config-api-provider/provider/resources/group.go b/internal/provider/resources/group.go similarity index 98% rename from pkg/config-api-provider/provider/resources/group.go rename to internal/provider/resources/group.go index cc6c715a..e880286f 100644 --- a/pkg/config-api-provider/provider/resources/group.go +++ b/internal/provider/resources/group.go @@ -3,8 +3,8 @@ package resources import ( "context" + "github.com/aruba-uxi/configuration-api-terraform-provider/internal/provider/util" "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/config-api-client" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/provider/util" "github.com/hashicorp/terraform-plugin-framework/path" "github.com/hashicorp/terraform-plugin-framework/resource" diff --git a/pkg/config-api-provider/provider/resources/network_group_assignment.go b/internal/provider/resources/network_group_assignment.go similarity index 98% rename from pkg/config-api-provider/provider/resources/network_group_assignment.go rename to internal/provider/resources/network_group_assignment.go index dd7552c0..51778fd7 100644 --- a/pkg/config-api-provider/provider/resources/network_group_assignment.go +++ b/internal/provider/resources/network_group_assignment.go @@ -2,8 +2,8 @@ package resources import ( "context" + "github.com/aruba-uxi/configuration-api-terraform-provider/internal/provider/util" "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/config-api-client" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/provider/util" "github.com/hashicorp/terraform-plugin-framework/path" "github.com/hashicorp/terraform-plugin-framework/resource" diff --git a/pkg/config-api-provider/provider/resources/sensor.go b/internal/provider/resources/sensor.go similarity index 98% rename from pkg/config-api-provider/provider/resources/sensor.go rename to internal/provider/resources/sensor.go index 58d23144..83f2fc5e 100644 --- a/pkg/config-api-provider/provider/resources/sensor.go +++ b/internal/provider/resources/sensor.go @@ -2,8 +2,8 @@ package resources import ( "context" + "github.com/aruba-uxi/configuration-api-terraform-provider/internal/provider/util" "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/config-api-client" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/provider/util" "github.com/hashicorp/terraform-plugin-framework/path" "github.com/hashicorp/terraform-plugin-framework/resource" diff --git a/pkg/config-api-provider/provider/resources/sensor_group_assignment.go b/internal/provider/resources/sensor_group_assignment.go similarity index 98% rename from pkg/config-api-provider/provider/resources/sensor_group_assignment.go rename to internal/provider/resources/sensor_group_assignment.go index 6f4fd945..838a23a8 100644 --- a/pkg/config-api-provider/provider/resources/sensor_group_assignment.go +++ b/internal/provider/resources/sensor_group_assignment.go @@ -3,8 +3,8 @@ package resources import ( "context" + "github.com/aruba-uxi/configuration-api-terraform-provider/internal/provider/util" config_api_client "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/config-api-client" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/provider/util" "github.com/hashicorp/terraform-plugin-framework/path" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/resource/schema" diff --git a/pkg/config-api-provider/provider/resources/service.go b/internal/provider/resources/service.go similarity index 100% rename from pkg/config-api-provider/provider/resources/service.go rename to internal/provider/resources/service.go diff --git a/pkg/config-api-provider/provider/resources/service_group_assignment.go b/internal/provider/resources/service_group_assignment.go similarity index 98% rename from pkg/config-api-provider/provider/resources/service_group_assignment.go rename to internal/provider/resources/service_group_assignment.go index 6da541bb..69d96491 100644 --- a/pkg/config-api-provider/provider/resources/service_group_assignment.go +++ b/internal/provider/resources/service_group_assignment.go @@ -2,8 +2,8 @@ package resources import ( "context" + "github.com/aruba-uxi/configuration-api-terraform-provider/internal/provider/util" "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/config-api-client" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/provider/util" "github.com/hashicorp/terraform-plugin-framework/path" "github.com/hashicorp/terraform-plugin-framework/resource" diff --git a/pkg/config-api-provider/provider/resources/wired_network.go b/internal/provider/resources/wired_network.go similarity index 97% rename from pkg/config-api-provider/provider/resources/wired_network.go rename to internal/provider/resources/wired_network.go index 368c46a5..ee13df30 100644 --- a/pkg/config-api-provider/provider/resources/wired_network.go +++ b/internal/provider/resources/wired_network.go @@ -3,8 +3,8 @@ package resources import ( "context" + "github.com/aruba-uxi/configuration-api-terraform-provider/internal/provider/util" "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/config-api-client" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/provider/util" "github.com/hashicorp/terraform-plugin-framework/path" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/resource/schema" diff --git a/pkg/config-api-provider/provider/resources/wireless_network.go b/internal/provider/resources/wireless_network.go similarity index 97% rename from pkg/config-api-provider/provider/resources/wireless_network.go rename to internal/provider/resources/wireless_network.go index be6da395..3cd0329f 100644 --- a/pkg/config-api-provider/provider/resources/wireless_network.go +++ b/internal/provider/resources/wireless_network.go @@ -3,8 +3,8 @@ package resources import ( "context" + "github.com/aruba-uxi/configuration-api-terraform-provider/internal/provider/util" "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/config-api-client" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/provider/util" "github.com/hashicorp/terraform-plugin-framework/path" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/resource/schema" diff --git a/pkg/config-api-provider/provider/util/error_handling.go b/internal/provider/util/error_handling.go similarity index 100% rename from pkg/config-api-provider/provider/util/error_handling.go rename to internal/provider/util/error_handling.go diff --git a/pkg/config-api-provider/provider/util/group.go b/internal/provider/util/group.go similarity index 100% rename from pkg/config-api-provider/provider/util/group.go rename to internal/provider/util/group.go diff --git a/pkg/config-api-provider/provider/util/retry.go b/internal/provider/util/retry.go similarity index 88% rename from pkg/config-api-provider/provider/util/retry.go rename to internal/provider/util/retry.go index 7d9f03d4..8147578c 100644 --- a/pkg/config-api-provider/provider/util/retry.go +++ b/internal/provider/util/retry.go @@ -6,7 +6,7 @@ import ( "strconv" "time" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/provider/config" + "github.com/aruba-uxi/configuration-api-terraform-provider/internal/provider/config" ) func RetryFor429[T any](f func() (T, *http.Response, error)) (T, *http.Response, error) { diff --git a/pkg/config-api-provider/main.go b/main.go similarity index 85% rename from pkg/config-api-provider/main.go rename to main.go index 86ff5d77..f6021808 100644 --- a/pkg/config-api-provider/main.go +++ b/main.go @@ -8,7 +8,7 @@ import ( "flag" "log" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/provider" + "github.com/aruba-uxi/configuration-api-terraform-provider/internal/provider" "github.com/hashicorp/terraform-plugin-framework/providerserver" ) diff --git a/pkg/config-api-provider/test/data-sources/agent_test.go b/test/data-sources/agent_test.go similarity index 94% rename from pkg/config-api-provider/test/data-sources/agent_test.go rename to test/data-sources/agent_test.go index 458373b3..6fcf5582 100644 --- a/pkg/config-api-provider/test/data-sources/agent_test.go +++ b/test/data-sources/agent_test.go @@ -4,8 +4,8 @@ import ( "regexp" "testing" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/test/provider" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/test/util" + "github.com/aruba-uxi/configuration-api-terraform-provider/test/provider" + "github.com/aruba-uxi/configuration-api-terraform-provider/test/util" "github.com/h2non/gock" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" diff --git a/pkg/config-api-provider/test/data-sources/group_test.go b/test/data-sources/group_test.go similarity index 95% rename from pkg/config-api-provider/test/data-sources/group_test.go rename to test/data-sources/group_test.go index cb8ffa0a..a440ca56 100644 --- a/pkg/config-api-provider/test/data-sources/group_test.go +++ b/test/data-sources/group_test.go @@ -5,8 +5,8 @@ import ( "regexp" "testing" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/test/provider" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/test/util" + "github.com/aruba-uxi/configuration-api-terraform-provider/test/provider" + "github.com/aruba-uxi/configuration-api-terraform-provider/test/util" "github.com/h2non/gock" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" diff --git a/pkg/config-api-provider/test/data-sources/network_group_assignment_test.go b/test/data-sources/network_group_assignment_test.go similarity index 95% rename from pkg/config-api-provider/test/data-sources/network_group_assignment_test.go rename to test/data-sources/network_group_assignment_test.go index e4bae6a0..3fcfb560 100644 --- a/pkg/config-api-provider/test/data-sources/network_group_assignment_test.go +++ b/test/data-sources/network_group_assignment_test.go @@ -4,8 +4,8 @@ import ( "regexp" "testing" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/test/provider" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/test/util" + "github.com/aruba-uxi/configuration-api-terraform-provider/test/provider" + "github.com/aruba-uxi/configuration-api-terraform-provider/test/util" "github.com/h2non/gock" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" diff --git a/pkg/config-api-provider/test/data-sources/sensor_group_assignment_test.go b/test/data-sources/sensor_group_assignment_test.go similarity index 95% rename from pkg/config-api-provider/test/data-sources/sensor_group_assignment_test.go rename to test/data-sources/sensor_group_assignment_test.go index 530a752b..708fd9bf 100644 --- a/pkg/config-api-provider/test/data-sources/sensor_group_assignment_test.go +++ b/test/data-sources/sensor_group_assignment_test.go @@ -4,8 +4,8 @@ import ( "regexp" "testing" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/test/provider" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/test/util" + "github.com/aruba-uxi/configuration-api-terraform-provider/test/provider" + "github.com/aruba-uxi/configuration-api-terraform-provider/test/util" "github.com/h2non/gock" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" diff --git a/pkg/config-api-provider/test/data-sources/sensor_test.go b/test/data-sources/sensor_test.go similarity index 94% rename from pkg/config-api-provider/test/data-sources/sensor_test.go rename to test/data-sources/sensor_test.go index 1ffb89ab..b95f5627 100644 --- a/pkg/config-api-provider/test/data-sources/sensor_test.go +++ b/test/data-sources/sensor_test.go @@ -4,8 +4,8 @@ import ( "regexp" "testing" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/test/provider" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/test/util" + "github.com/aruba-uxi/configuration-api-terraform-provider/test/provider" + "github.com/aruba-uxi/configuration-api-terraform-provider/test/util" "github.com/h2non/gock" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" diff --git a/pkg/config-api-provider/test/data-sources/wired_network_test.go b/test/data-sources/wired_network_test.go similarity index 95% rename from pkg/config-api-provider/test/data-sources/wired_network_test.go rename to test/data-sources/wired_network_test.go index 0be48206..8163d500 100644 --- a/pkg/config-api-provider/test/data-sources/wired_network_test.go +++ b/test/data-sources/wired_network_test.go @@ -4,8 +4,8 @@ import ( "regexp" "testing" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/test/provider" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/test/util" + "github.com/aruba-uxi/configuration-api-terraform-provider/test/provider" + "github.com/aruba-uxi/configuration-api-terraform-provider/test/util" "github.com/nbio/st" "github.com/h2non/gock" diff --git a/pkg/config-api-provider/test/data-sources/wireless_network_test.go b/test/data-sources/wireless_network_test.go similarity index 95% rename from pkg/config-api-provider/test/data-sources/wireless_network_test.go rename to test/data-sources/wireless_network_test.go index 32723160..636e2fcb 100644 --- a/pkg/config-api-provider/test/data-sources/wireless_network_test.go +++ b/test/data-sources/wireless_network_test.go @@ -4,8 +4,8 @@ import ( "regexp" "testing" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/test/provider" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/test/util" + "github.com/aruba-uxi/configuration-api-terraform-provider/test/provider" + "github.com/aruba-uxi/configuration-api-terraform-provider/test/util" "github.com/nbio/st" "github.com/h2non/gock" diff --git a/pkg/config-api-provider/test/provider/provider.go b/test/provider/provider.go similarity index 88% rename from pkg/config-api-provider/test/provider/provider.go rename to test/provider/provider.go index dc04bb91..da07a5e6 100644 --- a/pkg/config-api-provider/test/provider/provider.go +++ b/test/provider/provider.go @@ -1,7 +1,7 @@ package provider import ( - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/provider" + "github.com/aruba-uxi/configuration-api-terraform-provider/internal/provider" "github.com/hashicorp/terraform-plugin-framework/providerserver" "github.com/hashicorp/terraform-plugin-go/tfprotov6" ) diff --git a/pkg/config-api-provider/test/resources/agent_group_assignment_test.go b/test/resources/agent_group_assignment_test.go similarity index 95% rename from pkg/config-api-provider/test/resources/agent_group_assignment_test.go rename to test/resources/agent_group_assignment_test.go index 59fc9b93..f9de4b77 100644 --- a/pkg/config-api-provider/test/resources/agent_group_assignment_test.go +++ b/test/resources/agent_group_assignment_test.go @@ -1,11 +1,11 @@ package resource_test import ( - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/test/provider" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/test/util" + "github.com/aruba-uxi/configuration-api-terraform-provider/test/provider" + "github.com/aruba-uxi/configuration-api-terraform-provider/test/util" "testing" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/provider/resources" + "github.com/aruba-uxi/configuration-api-terraform-provider/internal/provider/resources" "github.com/h2non/gock" "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) diff --git a/pkg/config-api-provider/test/resources/agent_test.go b/test/resources/agent_test.go similarity index 97% rename from pkg/config-api-provider/test/resources/agent_test.go rename to test/resources/agent_test.go index 93038a25..dc36ee1e 100644 --- a/pkg/config-api-provider/test/resources/agent_test.go +++ b/test/resources/agent_test.go @@ -1,8 +1,8 @@ package resource_test import ( - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/test/provider" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/test/util" + "github.com/aruba-uxi/configuration-api-terraform-provider/test/provider" + "github.com/aruba-uxi/configuration-api-terraform-provider/test/util" "github.com/h2non/gock" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" diff --git a/pkg/config-api-provider/test/resources/group_test.go b/test/resources/group_test.go similarity index 98% rename from pkg/config-api-provider/test/resources/group_test.go rename to test/resources/group_test.go index fa2f4261..c49c62e2 100644 --- a/pkg/config-api-provider/test/resources/group_test.go +++ b/test/resources/group_test.go @@ -5,8 +5,8 @@ import ( "testing" config_api_client "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/config-api-client" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/test/provider" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/test/util" + "github.com/aruba-uxi/configuration-api-terraform-provider/test/provider" + "github.com/aruba-uxi/configuration-api-terraform-provider/test/util" "github.com/h2non/gock" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" diff --git a/pkg/config-api-provider/test/resources/network_group_assignment_test.go b/test/resources/network_group_assignment_test.go similarity index 99% rename from pkg/config-api-provider/test/resources/network_group_assignment_test.go rename to test/resources/network_group_assignment_test.go index 0585a229..b1e87b01 100644 --- a/pkg/config-api-provider/test/resources/network_group_assignment_test.go +++ b/test/resources/network_group_assignment_test.go @@ -4,8 +4,8 @@ import ( "regexp" "testing" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/test/provider" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/test/util" + "github.com/aruba-uxi/configuration-api-terraform-provider/test/provider" + "github.com/aruba-uxi/configuration-api-terraform-provider/test/util" "github.com/h2non/gock" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" diff --git a/pkg/config-api-provider/test/resources/sensor_group_assignment_test.go b/test/resources/sensor_group_assignment_test.go similarity index 99% rename from pkg/config-api-provider/test/resources/sensor_group_assignment_test.go rename to test/resources/sensor_group_assignment_test.go index 952928c4..5603ddc6 100644 --- a/pkg/config-api-provider/test/resources/sensor_group_assignment_test.go +++ b/test/resources/sensor_group_assignment_test.go @@ -4,8 +4,8 @@ import ( "regexp" "testing" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/test/provider" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/test/util" + "github.com/aruba-uxi/configuration-api-terraform-provider/test/provider" + "github.com/aruba-uxi/configuration-api-terraform-provider/test/util" "github.com/h2non/gock" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" diff --git a/pkg/config-api-provider/test/resources/sensor_test.go b/test/resources/sensor_test.go similarity index 97% rename from pkg/config-api-provider/test/resources/sensor_test.go rename to test/resources/sensor_test.go index 6c84d0a4..f15ef9ef 100644 --- a/pkg/config-api-provider/test/resources/sensor_test.go +++ b/test/resources/sensor_test.go @@ -1,8 +1,8 @@ package resource_test import ( - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/test/provider" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/test/util" + "github.com/aruba-uxi/configuration-api-terraform-provider/test/provider" + "github.com/aruba-uxi/configuration-api-terraform-provider/test/util" "regexp" "testing" diff --git a/pkg/config-api-provider/test/resources/service_test.go b/test/resources/service_test.go similarity index 88% rename from pkg/config-api-provider/test/resources/service_test.go rename to test/resources/service_test.go index b69e97de..0a39e6b0 100644 --- a/pkg/config-api-provider/test/resources/service_test.go +++ b/test/resources/service_test.go @@ -1,12 +1,12 @@ package resource_test import ( - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/test/provider" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/test/util" + "github.com/aruba-uxi/configuration-api-terraform-provider/test/provider" + "github.com/aruba-uxi/configuration-api-terraform-provider/test/util" "regexp" "testing" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/provider/resources" + "github.com/aruba-uxi/configuration-api-terraform-provider/internal/provider/resources" "github.com/h2non/gock" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/tfversion" diff --git a/pkg/config-api-provider/test/resources/service_test_group_assignment_test.go b/test/resources/service_test_group_assignment_test.go similarity index 97% rename from pkg/config-api-provider/test/resources/service_test_group_assignment_test.go rename to test/resources/service_test_group_assignment_test.go index 4986c7e9..b4c92fd8 100644 --- a/pkg/config-api-provider/test/resources/service_test_group_assignment_test.go +++ b/test/resources/service_test_group_assignment_test.go @@ -5,10 +5,10 @@ import ( "testing" config_api_client "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/config-api-client" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/test/provider" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/test/util" + "github.com/aruba-uxi/configuration-api-terraform-provider/test/provider" + "github.com/aruba-uxi/configuration-api-terraform-provider/test/util" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/provider/resources" + "github.com/aruba-uxi/configuration-api-terraform-provider/internal/provider/resources" "github.com/h2non/gock" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" diff --git a/pkg/config-api-provider/test/resources/wired_network_test.go b/test/resources/wired_network_test.go similarity index 95% rename from pkg/config-api-provider/test/resources/wired_network_test.go rename to test/resources/wired_network_test.go index ec0c97ce..79d81873 100644 --- a/pkg/config-api-provider/test/resources/wired_network_test.go +++ b/test/resources/wired_network_test.go @@ -1,8 +1,8 @@ package resource_test import ( - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/test/provider" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/test/util" + "github.com/aruba-uxi/configuration-api-terraform-provider/test/provider" + "github.com/aruba-uxi/configuration-api-terraform-provider/test/util" "regexp" "testing" diff --git a/pkg/config-api-provider/test/resources/wireless_network_test.go b/test/resources/wireless_network_test.go similarity index 96% rename from pkg/config-api-provider/test/resources/wireless_network_test.go rename to test/resources/wireless_network_test.go index 54fdf7f0..c1e7fd9c 100644 --- a/pkg/config-api-provider/test/resources/wireless_network_test.go +++ b/test/resources/wireless_network_test.go @@ -1,8 +1,8 @@ package resource_test import ( - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/test/provider" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/test/util" + "github.com/aruba-uxi/configuration-api-terraform-provider/test/provider" + "github.com/aruba-uxi/configuration-api-terraform-provider/test/util" "regexp" "testing" diff --git a/pkg/config-api-provider/test/util/utils.go b/test/util/utils.go similarity index 99% rename from pkg/config-api-provider/test/util/utils.go rename to test/util/utils.go index 1d5e3afb..edde3e12 100644 --- a/pkg/config-api-provider/test/util/utils.go +++ b/test/util/utils.go @@ -4,7 +4,7 @@ import ( "encoding/json" "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/config-api-client" - "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/terraform-provider-configuration/provider/resources" + "github.com/aruba-uxi/configuration-api-terraform-provider/internal/provider/resources" "github.com/h2non/gock" )