From a08401bd15bf1fa9aa6ae6e7be7984b33ff599d0 Mon Sep 17 00:00:00 2001 From: swaroopar Date: Sat, 1 Jun 2024 07:17:22 +0000 Subject: [PATCH 1/6] fix typo in API method tag name --- .../xpanse/api/controllers/ServiceModificationApi.java | 4 ++-- .../eclipse/xpanse/api/controllers/ServiceTemplateApi.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/api/src/main/java/org/eclipse/xpanse/api/controllers/ServiceModificationApi.java b/modules/api/src/main/java/org/eclipse/xpanse/api/controllers/ServiceModificationApi.java index bf703509d..173e55ed8 100644 --- a/modules/api/src/main/java/org/eclipse/xpanse/api/controllers/ServiceModificationApi.java +++ b/modules/api/src/main/java/org/eclipse/xpanse/api/controllers/ServiceModificationApi.java @@ -70,7 +70,7 @@ public class ServiceModificationApi { * @return response */ @Tag(name = "ServiceModification", - description = "APIs to manage modifications of the service instances.") + description = "APIs to manage modifications of the service instances") @Operation(description = "Start a modification to modify the deployed service instance.") @PutMapping(value = "/services/modify/{serviceId}", produces = MediaType.APPLICATION_JSON_VALUE) @@ -109,7 +109,7 @@ public UUID modify(@Parameter(name = "serviceId", description = "id of deployed */ @Tag(name = "ServiceModification", description = "APIs to manage modifications of the service instances.") - @Operation(description = "List modification audits of the service instance.") + @Operation(description = "List modification audits of the service instance") @GetMapping(value = "/services/{serviceId}/modifications", produces = MediaType.APPLICATION_JSON_VALUE) @ResponseStatus(HttpStatus.OK) diff --git a/modules/api/src/main/java/org/eclipse/xpanse/api/controllers/ServiceTemplateApi.java b/modules/api/src/main/java/org/eclipse/xpanse/api/controllers/ServiceTemplateApi.java index 314931845..b93b2f44a 100644 --- a/modules/api/src/main/java/org/eclipse/xpanse/api/controllers/ServiceTemplateApi.java +++ b/modules/api/src/main/java/org/eclipse/xpanse/api/controllers/ServiceTemplateApi.java @@ -190,7 +190,7 @@ public ServiceTemplateDetailVo reRegisterServiceTemplate( @PathVariable("id") String id) { ServiceTemplateEntity templateEntity = serviceTemplateManage.reRegisterServiceTemplate(UUID.fromString(id)); - log.info("Unregister service template with id {} successfully.", id); + log.info("Re-register service template with id {} successfully.", id); return convertToServiceTemplateDetailVo(templateEntity); } From 9ca8723f8c331e6a821bf0b1b8c25f71aeba1ad0 Mon Sep 17 00:00:00 2001 From: swaroopar Date: Sat, 1 Jun 2024 17:12:14 +0000 Subject: [PATCH 2/6] fix get environment variable --- .../xpanse/plugins/scs/common/keystone/ScsKeystoneManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/scs/src/main/java/org/eclipse/xpanse/plugins/scs/common/keystone/ScsKeystoneManager.java b/plugins/scs/src/main/java/org/eclipse/xpanse/plugins/scs/common/keystone/ScsKeystoneManager.java index 9560db18e..05b19be48 100644 --- a/plugins/scs/src/main/java/org/eclipse/xpanse/plugins/scs/common/keystone/ScsKeystoneManager.java +++ b/plugins/scs/src/main/java/org/eclipse/xpanse/plugins/scs/common/keystone/ScsKeystoneManager.java @@ -96,7 +96,7 @@ public OSClient.OSClientV3 getAuthenticatedClient(UUID serviceId, // there is no need to return the authenticated client because the below method already sets // the authentication details in the thread context. String url = Objects.nonNull(serviceId) ? getUrlFromDeploymentVariables(serviceId) - : System.getProperty(ScsEnvironmentConstants.AUTH_URL); + : System.getenv(ScsEnvironmentConstants.AUTH_URL); return OSFactory .builderV3() From 63063b5ab69bf839c59faaa054f7a6706eacc591 Mon Sep 17 00:00:00 2001 From: swaroopar Date: Sun, 2 Jun 2024 04:47:01 +0000 Subject: [PATCH 3/6] fix tofu-maker health check error --- .../opentofu/tofumaker/config/TofuMakerApiClientConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/deployment/src/main/java/org/eclipse/xpanse/modules/deployment/deployers/opentofu/tofumaker/config/TofuMakerApiClientConfig.java b/modules/deployment/src/main/java/org/eclipse/xpanse/modules/deployment/deployers/opentofu/tofumaker/config/TofuMakerApiClientConfig.java index 72d99e677..86b0b2c09 100644 --- a/modules/deployment/src/main/java/org/eclipse/xpanse/modules/deployment/deployers/opentofu/tofumaker/config/TofuMakerApiClientConfig.java +++ b/modules/deployment/src/main/java/org/eclipse/xpanse/modules/deployment/deployers/opentofu/tofumaker/config/TofuMakerApiClientConfig.java @@ -7,7 +7,7 @@ import jakarta.annotation.PostConstruct; import jakarta.annotation.Resource; -import org.eclipse.xpanse.modules.deployment.deployers.terraform.terraformboot.generated.ApiClient; +import org.eclipse.xpanse.modules.deployment.deployers.opentofu.tofumaker.generated.ApiClient; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Profile; From bc77384689035497ea1ee501840067bb79416cd9 Mon Sep 17 00:00:00 2001 From: swaroopar Date: Sun, 2 Jun 2024 04:52:27 +0000 Subject: [PATCH 4/6] fix tofu-maker health check error --- .../opentofu/tofumaker/config/TofuMakerApiClientConfigTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/deployment/src/test/java/org/eclipse/xpanse/modules/deployment/deployers/opentofu/tofumaker/config/TofuMakerApiClientConfigTest.java b/modules/deployment/src/test/java/org/eclipse/xpanse/modules/deployment/deployers/opentofu/tofumaker/config/TofuMakerApiClientConfigTest.java index 528bfb63c..195e04120 100644 --- a/modules/deployment/src/test/java/org/eclipse/xpanse/modules/deployment/deployers/opentofu/tofumaker/config/TofuMakerApiClientConfigTest.java +++ b/modules/deployment/src/test/java/org/eclipse/xpanse/modules/deployment/deployers/opentofu/tofumaker/config/TofuMakerApiClientConfigTest.java @@ -2,7 +2,7 @@ import static org.mockito.Mockito.verify; -import org.eclipse.xpanse.modules.deployment.deployers.terraform.terraformboot.generated.ApiClient; +import org.eclipse.xpanse.modules.deployment.deployers.opentofu.tofumaker.generated.ApiClient; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; From 37e88a6ee226528f793c78b9e561622c8e1fe992 Mon Sep 17 00:00:00 2001 From: swaroopar Date: Sun, 2 Jun 2024 04:57:57 +0000 Subject: [PATCH 5/6] keep backend system names consistent --- .../xpanse/modules/models/system/enums/BackendSystemType.java | 2 +- .../modules/models/system/enums/BackendSystemTypeTest.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/models/src/main/java/org/eclipse/xpanse/modules/models/system/enums/BackendSystemType.java b/modules/models/src/main/java/org/eclipse/xpanse/modules/models/system/enums/BackendSystemType.java index bdff26851..73041d9c7 100644 --- a/modules/models/src/main/java/org/eclipse/xpanse/modules/models/system/enums/BackendSystemType.java +++ b/modules/models/src/main/java/org/eclipse/xpanse/modules/models/system/enums/BackendSystemType.java @@ -19,7 +19,7 @@ public enum BackendSystemType { DATABASE("Database"), TERRAFORM_BOOT("Terraform Boot"), TOFU_MAKER("Tofu Maker"), - POLICY_MAN("PolicyMan"), + POLICY_MAN("Policy Man"), OPEN_TELEMETRY_COLLECTOR("OpenTelemetry Collector"); private final String code; diff --git a/modules/models/src/test/java/org/eclipse/xpanse/modules/models/system/enums/BackendSystemTypeTest.java b/modules/models/src/test/java/org/eclipse/xpanse/modules/models/system/enums/BackendSystemTypeTest.java index 1c145d146..debd18795 100644 --- a/modules/models/src/test/java/org/eclipse/xpanse/modules/models/system/enums/BackendSystemTypeTest.java +++ b/modules/models/src/test/java/org/eclipse/xpanse/modules/models/system/enums/BackendSystemTypeTest.java @@ -30,7 +30,7 @@ public void testGetByValue() { BackendSystemType type3 = BackendSystemType.getByValue("tofu maker"); Assertions.assertEquals(type3, BackendSystemType.TOFU_MAKER); - BackendSystemType type4 = BackendSystemType.getByValue("policyMan"); + BackendSystemType type4 = BackendSystemType.getByValue("policy man"); Assertions.assertEquals(type4, BackendSystemType.POLICY_MAN); BackendSystemType type5 = BackendSystemType.getByValue("OpenTelemetry Collector"); @@ -71,7 +71,7 @@ public void testToValue() { Assertions.assertEquals("TOFU_MAKER", string3); String value4 = BackendSystemType.POLICY_MAN.toValue(); - Assertions.assertEquals("PolicyMan", value4); + Assertions.assertEquals("Policy Man", value4); String name4 = BackendSystemType.POLICY_MAN.name(); Assertions.assertEquals("POLICY_MAN", name4); String string4 = BackendSystemType.POLICY_MAN.toString(); From 285e67ceda5a617fab5a9c4f4648ed7aec78959a Mon Sep 17 00:00:00 2001 From: swaroopar Date: Sun, 2 Jun 2024 05:00:26 +0000 Subject: [PATCH 6/6] keep backend system names consistent for identity provider --- .../xpanse/modules/models/system/enums/BackendSystemType.java | 2 +- .../modules/models/system/enums/BackendSystemTypeTest.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/models/src/main/java/org/eclipse/xpanse/modules/models/system/enums/BackendSystemType.java b/modules/models/src/main/java/org/eclipse/xpanse/modules/models/system/enums/BackendSystemType.java index 73041d9c7..81c12198c 100644 --- a/modules/models/src/main/java/org/eclipse/xpanse/modules/models/system/enums/BackendSystemType.java +++ b/modules/models/src/main/java/org/eclipse/xpanse/modules/models/system/enums/BackendSystemType.java @@ -15,7 +15,7 @@ */ public enum BackendSystemType { - IDENTITY_PROVIDER("IdentityProvider"), + IDENTITY_PROVIDER("Identity Provider"), DATABASE("Database"), TERRAFORM_BOOT("Terraform Boot"), TOFU_MAKER("Tofu Maker"), diff --git a/modules/models/src/test/java/org/eclipse/xpanse/modules/models/system/enums/BackendSystemTypeTest.java b/modules/models/src/test/java/org/eclipse/xpanse/modules/models/system/enums/BackendSystemTypeTest.java index debd18795..66c97c740 100644 --- a/modules/models/src/test/java/org/eclipse/xpanse/modules/models/system/enums/BackendSystemTypeTest.java +++ b/modules/models/src/test/java/org/eclipse/xpanse/modules/models/system/enums/BackendSystemTypeTest.java @@ -18,7 +18,7 @@ class BackendSystemTypeTest { @Test public void testGetByValue() { - BackendSystemType type = BackendSystemType.getByValue("identityProvider"); + BackendSystemType type = BackendSystemType.getByValue("identity provider"); Assertions.assertEquals(type, BackendSystemType.IDENTITY_PROVIDER); BackendSystemType type1 = BackendSystemType.getByValue("database"); @@ -43,7 +43,7 @@ public void testGetByValue() { @Test public void testToValue() { String value = BackendSystemType.IDENTITY_PROVIDER.toValue(); - Assertions.assertEquals("IdentityProvider", value); + Assertions.assertEquals("Identity Provider", value); String name = BackendSystemType.IDENTITY_PROVIDER.name(); Assertions.assertEquals("IDENTITY_PROVIDER", name); String string = BackendSystemType.IDENTITY_PROVIDER.toString();