From fdd1b1da294df5f79c01b1b712bffefad1e54269 Mon Sep 17 00:00:00 2001 From: CaiWanting Date: Mon, 16 Dec 2024 16:56:39 +0800 Subject: [PATCH] feat(CodeArts): move codearts inspector and deploy to new directory (#6019) --- huaweicloud/provider.go | 19 +++++++++++-------- ...icloud_codearts_deploy_application_test.go | 2 +- ..._huaweicloud_codearts_deploy_group_test.go | 11 ++++++++++- ...e_huaweicloud_codearts_deploy_host_test.go | 2 +- ...ud_codearts_inspector_website_scan_test.go | 2 +- ...eicloud_codearts_inspector_website_test.go | 2 +- .../resource_huaweicloud_codearts_project.go | 5 ----- ...esource_huaweicloud_codearts_repository.go | 5 ----- ...huaweicloud_codearts_deploy_application.go | 7 +------ ...ource_huaweicloud_codearts_deploy_group.go | 7 +------ ...source_huaweicloud_codearts_deploy_host.go | 7 +------ ..._huaweicloud_codearts_inspector_website.go | 7 +------ ...eicloud_codearts_inspector_website_scan.go | 7 +------ 13 files changed, 30 insertions(+), 53 deletions(-) rename huaweicloud/services/acceptance/{codearts => codeartsdeploy}/resource_huaweicloud_codearts_deploy_application_test.go (99%) rename huaweicloud/services/acceptance/{codearts => codeartsdeploy}/resource_huaweicloud_codearts_deploy_group_test.go (97%) rename huaweicloud/services/acceptance/{codearts => codeartsdeploy}/resource_huaweicloud_codearts_deploy_host_test.go (99%) rename huaweicloud/services/acceptance/{codearts => codeartsinspector}/resource_huaweicloud_codearts_inspector_website_scan_test.go (99%) rename huaweicloud/services/acceptance/{codearts => codeartsinspector}/resource_huaweicloud_codearts_inspector_website_test.go (99%) rename huaweicloud/services/{codearts => codeartsdeploy}/resource_huaweicloud_codearts_deploy_application.go (98%) rename huaweicloud/services/{codearts => codeartsdeploy}/resource_huaweicloud_codearts_deploy_group.go (98%) rename huaweicloud/services/{codearts => codeartsdeploy}/resource_huaweicloud_codearts_deploy_host.go (98%) rename huaweicloud/services/{codearts => codeartsinspector}/resource_huaweicloud_codearts_inspector_website.go (98%) rename huaweicloud/services/{codearts => codeartsinspector}/resource_huaweicloud_codearts_inspector_website_scan.go (98%) diff --git a/huaweicloud/provider.go b/huaweicloud/provider.go index d1fb29c78f..e0db052495 100644 --- a/huaweicloud/provider.go +++ b/huaweicloud/provider.go @@ -42,6 +42,8 @@ import ( "github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/services/cnad" "github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/services/coc" "github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/services/codearts" + "github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/services/codeartsdeploy" + "github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/services/codeartsinspector" "github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/services/cph" "github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/services/cpts" "github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/services/cse" @@ -2175,14 +2177,15 @@ func Provider() *schema.Provider { "huaweicloud_cpts_task": cpts.ResourceTask(), // CodeArts - "huaweicloud_codearts_project": codearts.ResourceProject(), - "huaweicloud_codearts_repository": codearts.ResourceRepository(), - "huaweicloud_codearts_deploy_application": codearts.ResourceDeployApplication(), - "huaweicloud_codearts_deploy_group": codearts.ResourceDeployGroup(), - "huaweicloud_codearts_deploy_host": codearts.ResourceDeployHost(), - - "huaweicloud_codearts_inspector_website": codearts.ResourceInspectorWebsite(), - "huaweicloud_codearts_inspector_website_scan": codearts.ResourceInspectorWebsiteScan(), + "huaweicloud_codearts_project": codearts.ResourceProject(), + "huaweicloud_codearts_repository": codearts.ResourceRepository(), + + "huaweicloud_codearts_deploy_application": codeartsdeploy.ResourceDeployApplication(), + "huaweicloud_codearts_deploy_group": codeartsdeploy.ResourceDeployGroup(), + "huaweicloud_codearts_deploy_host": codeartsdeploy.ResourceDeployHost(), + + "huaweicloud_codearts_inspector_website": codeartsinspector.ResourceInspectorWebsite(), + "huaweicloud_codearts_inspector_website_scan": codeartsinspector.ResourceInspectorWebsiteScan(), "huaweicloud_dsc_instance": dsc.ResourceDscInstance(), "huaweicloud_dsc_asset_obs": dsc.ResourceAssetObs(), diff --git a/huaweicloud/services/acceptance/codearts/resource_huaweicloud_codearts_deploy_application_test.go b/huaweicloud/services/acceptance/codeartsdeploy/resource_huaweicloud_codearts_deploy_application_test.go similarity index 99% rename from huaweicloud/services/acceptance/codearts/resource_huaweicloud_codearts_deploy_application_test.go rename to huaweicloud/services/acceptance/codeartsdeploy/resource_huaweicloud_codearts_deploy_application_test.go index a1bb6ba1d5..30307ba9f4 100644 --- a/huaweicloud/services/acceptance/codearts/resource_huaweicloud_codearts_deploy_application_test.go +++ b/huaweicloud/services/acceptance/codeartsdeploy/resource_huaweicloud_codearts_deploy_application_test.go @@ -1,4 +1,4 @@ -package codearts +package codeartsdeploy import ( "fmt" diff --git a/huaweicloud/services/acceptance/codearts/resource_huaweicloud_codearts_deploy_group_test.go b/huaweicloud/services/acceptance/codeartsdeploy/resource_huaweicloud_codearts_deploy_group_test.go similarity index 97% rename from huaweicloud/services/acceptance/codearts/resource_huaweicloud_codearts_deploy_group_test.go rename to huaweicloud/services/acceptance/codeartsdeploy/resource_huaweicloud_codearts_deploy_group_test.go index 73a3809b05..6a568b3449 100644 --- a/huaweicloud/services/acceptance/codearts/resource_huaweicloud_codearts_deploy_group_test.go +++ b/huaweicloud/services/acceptance/codeartsdeploy/resource_huaweicloud_codearts_deploy_group_test.go @@ -1,4 +1,4 @@ -package codearts +package codeartsdeploy import ( "fmt" @@ -191,6 +191,15 @@ func TestAccDeployGroup_errorCheck(t *testing.T) { }) } +func testProject_basic(name string) string { + return fmt.Sprintf(` +resource "huaweicloud_codearts_project" "test" { + name = "%s" + type = "scrum" +} +`, name) +} + func testDeployGroup_basic(name string) string { return fmt.Sprintf(` %s diff --git a/huaweicloud/services/acceptance/codearts/resource_huaweicloud_codearts_deploy_host_test.go b/huaweicloud/services/acceptance/codeartsdeploy/resource_huaweicloud_codearts_deploy_host_test.go similarity index 99% rename from huaweicloud/services/acceptance/codearts/resource_huaweicloud_codearts_deploy_host_test.go rename to huaweicloud/services/acceptance/codeartsdeploy/resource_huaweicloud_codearts_deploy_host_test.go index 5c12790383..136d03efe3 100644 --- a/huaweicloud/services/acceptance/codearts/resource_huaweicloud_codearts_deploy_host_test.go +++ b/huaweicloud/services/acceptance/codeartsdeploy/resource_huaweicloud_codearts_deploy_host_test.go @@ -1,4 +1,4 @@ -package codearts +package codeartsdeploy import ( "fmt" diff --git a/huaweicloud/services/acceptance/codearts/resource_huaweicloud_codearts_inspector_website_scan_test.go b/huaweicloud/services/acceptance/codeartsinspector/resource_huaweicloud_codearts_inspector_website_scan_test.go similarity index 99% rename from huaweicloud/services/acceptance/codearts/resource_huaweicloud_codearts_inspector_website_scan_test.go rename to huaweicloud/services/acceptance/codeartsinspector/resource_huaweicloud_codearts_inspector_website_scan_test.go index 6e7c697a57..52caaea114 100644 --- a/huaweicloud/services/acceptance/codearts/resource_huaweicloud_codearts_inspector_website_scan_test.go +++ b/huaweicloud/services/acceptance/codeartsinspector/resource_huaweicloud_codearts_inspector_website_scan_test.go @@ -1,4 +1,4 @@ -package codearts +package codeartsinspector import ( "fmt" diff --git a/huaweicloud/services/acceptance/codearts/resource_huaweicloud_codearts_inspector_website_test.go b/huaweicloud/services/acceptance/codeartsinspector/resource_huaweicloud_codearts_inspector_website_test.go similarity index 99% rename from huaweicloud/services/acceptance/codearts/resource_huaweicloud_codearts_inspector_website_test.go rename to huaweicloud/services/acceptance/codeartsinspector/resource_huaweicloud_codearts_inspector_website_test.go index 8ec5f56ab2..db316b9818 100644 --- a/huaweicloud/services/acceptance/codearts/resource_huaweicloud_codearts_inspector_website_test.go +++ b/huaweicloud/services/acceptance/codeartsinspector/resource_huaweicloud_codearts_inspector_website_test.go @@ -1,4 +1,4 @@ -package codearts +package codeartsinspector import ( "fmt" diff --git a/huaweicloud/services/codearts/resource_huaweicloud_codearts_project.go b/huaweicloud/services/codearts/resource_huaweicloud_codearts_project.go index d40fa7936d..db23e66828 100644 --- a/huaweicloud/services/codearts/resource_huaweicloud_codearts_project.go +++ b/huaweicloud/services/codearts/resource_huaweicloud_codearts_project.go @@ -1,8 +1,3 @@ -// --------------------------------------------------------------- -// *** AUTO GENERATED CODE *** -// @Product ProjectMan -// --------------------------------------------------------------- - package codearts import ( diff --git a/huaweicloud/services/codearts/resource_huaweicloud_codearts_repository.go b/huaweicloud/services/codearts/resource_huaweicloud_codearts_repository.go index 0268b9df16..ef3360d968 100644 --- a/huaweicloud/services/codearts/resource_huaweicloud_codearts_repository.go +++ b/huaweicloud/services/codearts/resource_huaweicloud_codearts_repository.go @@ -1,8 +1,3 @@ -// --------------------------------------------------------------- -// *** AUTO GENERATED CODE *** -// @Product CodeHub -// --------------------------------------------------------------- - package codearts import ( diff --git a/huaweicloud/services/codearts/resource_huaweicloud_codearts_deploy_application.go b/huaweicloud/services/codeartsdeploy/resource_huaweicloud_codearts_deploy_application.go similarity index 98% rename from huaweicloud/services/codearts/resource_huaweicloud_codearts_deploy_application.go rename to huaweicloud/services/codeartsdeploy/resource_huaweicloud_codearts_deploy_application.go index 6adb8ec6ed..966aed5c21 100644 --- a/huaweicloud/services/codearts/resource_huaweicloud_codearts_deploy_application.go +++ b/huaweicloud/services/codeartsdeploy/resource_huaweicloud_codearts_deploy_application.go @@ -1,9 +1,4 @@ -// --------------------------------------------------------------- -// *** AUTO GENERATED CODE *** -// @Product CodeArts -// --------------------------------------------------------------- - -package codearts +package codeartsdeploy import ( "context" diff --git a/huaweicloud/services/codearts/resource_huaweicloud_codearts_deploy_group.go b/huaweicloud/services/codeartsdeploy/resource_huaweicloud_codearts_deploy_group.go similarity index 98% rename from huaweicloud/services/codearts/resource_huaweicloud_codearts_deploy_group.go rename to huaweicloud/services/codeartsdeploy/resource_huaweicloud_codearts_deploy_group.go index 505064e7d3..124ad0ad2a 100644 --- a/huaweicloud/services/codearts/resource_huaweicloud_codearts_deploy_group.go +++ b/huaweicloud/services/codeartsdeploy/resource_huaweicloud_codearts_deploy_group.go @@ -1,9 +1,4 @@ -// --------------------------------------------------------------- -// *** AUTO GENERATED CODE *** -// @Product CodeArts -// --------------------------------------------------------------- - -package codearts +package codeartsdeploy import ( "context" diff --git a/huaweicloud/services/codearts/resource_huaweicloud_codearts_deploy_host.go b/huaweicloud/services/codeartsdeploy/resource_huaweicloud_codearts_deploy_host.go similarity index 98% rename from huaweicloud/services/codearts/resource_huaweicloud_codearts_deploy_host.go rename to huaweicloud/services/codeartsdeploy/resource_huaweicloud_codearts_deploy_host.go index 825fc3a38c..9bd532983a 100644 --- a/huaweicloud/services/codearts/resource_huaweicloud_codearts_deploy_host.go +++ b/huaweicloud/services/codeartsdeploy/resource_huaweicloud_codearts_deploy_host.go @@ -1,9 +1,4 @@ -// --------------------------------------------------------------- -// *** AUTO GENERATED CODE *** -// @Product CodeArts -// --------------------------------------------------------------- - -package codearts +package codeartsdeploy import ( "context" diff --git a/huaweicloud/services/codearts/resource_huaweicloud_codearts_inspector_website.go b/huaweicloud/services/codeartsinspector/resource_huaweicloud_codearts_inspector_website.go similarity index 98% rename from huaweicloud/services/codearts/resource_huaweicloud_codearts_inspector_website.go rename to huaweicloud/services/codeartsinspector/resource_huaweicloud_codearts_inspector_website.go index b62a4e0e82..cce6a75a15 100644 --- a/huaweicloud/services/codearts/resource_huaweicloud_codearts_inspector_website.go +++ b/huaweicloud/services/codeartsinspector/resource_huaweicloud_codearts_inspector_website.go @@ -1,9 +1,4 @@ -// --------------------------------------------------------------- -// *** AUTO GENERATED CODE *** -// @Product CodeArts -// --------------------------------------------------------------- - -package codearts +package codeartsinspector import ( "context" diff --git a/huaweicloud/services/codearts/resource_huaweicloud_codearts_inspector_website_scan.go b/huaweicloud/services/codeartsinspector/resource_huaweicloud_codearts_inspector_website_scan.go similarity index 98% rename from huaweicloud/services/codearts/resource_huaweicloud_codearts_inspector_website_scan.go rename to huaweicloud/services/codeartsinspector/resource_huaweicloud_codearts_inspector_website_scan.go index 243693f6e0..bcde50e4c2 100644 --- a/huaweicloud/services/codearts/resource_huaweicloud_codearts_inspector_website_scan.go +++ b/huaweicloud/services/codeartsinspector/resource_huaweicloud_codearts_inspector_website_scan.go @@ -1,9 +1,4 @@ -// --------------------------------------------------------------- -// *** AUTO GENERATED CODE *** -// @Product CodeArts -// --------------------------------------------------------------- - -package codearts +package codeartsinspector import ( "context"