From 90e6797c3d2846ee3d656f4bbf70db3ef1c3f5d5 Mon Sep 17 00:00:00 2001 From: Jan Marchel Date: Mon, 7 Feb 2022 17:29:21 +0100 Subject: [PATCH 1/3] fix --- .../adapter/planexecutor/colosseum/NodeTaskExecutor.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/adapter/src/main/java/eu/melodic/upperware/adapter/planexecutor/colosseum/NodeTaskExecutor.java b/adapter/src/main/java/eu/melodic/upperware/adapter/planexecutor/colosseum/NodeTaskExecutor.java index 25aa1da05..e73969818 100644 --- a/adapter/src/main/java/eu/melodic/upperware/adapter/planexecutor/colosseum/NodeTaskExecutor.java +++ b/adapter/src/main/java/eu/melodic/upperware/adapter/planexecutor/colosseum/NodeTaskExecutor.java @@ -61,12 +61,13 @@ public class NodeTaskExecutor extends RunnableTaskExecutor { JSONObject nodeCandidateInformationJSON = new JSONObject(); if(taskBody.getNodeCandidate().getCloud().getApi().getProviderName().equals("openstack")){ nodeCandidateInformationJSON.put("hardwareProviderId", checkEmptiness(taskBody.getNodeCandidate().getHardware().getProviderId().substring(4), "hardwareProviderId")); + nodeCandidateInformationJSON.put("cloudID", checkEmptiness(taskBody.getNodeCandidate().getCloud().getId(), "cloudID")); }else{ nodeCandidateInformationJSON.put("hardwareProviderId", checkEmptiness(taskBody.getNodeCandidate().getHardware().getProviderId(), "hardwareProviderId")); + nodeCandidateInformationJSON.put("cloudID", checkEmptiness(StringUtils.substring(taskBody.getNodeCandidate().getCloud().getId(), 0,7),"cloudID")); } nodeCandidateInformationJSON.put("hardwareProviderId", checkEmptiness(taskBody.getNodeCandidate().getHardware().getProviderId(), "hardwareProviderId")); nodeCandidateInformationJSON.put("ID", checkEmptiness(taskBody.getNodeCandidate().getId(), "ID")); - nodeCandidateInformationJSON.put("cloudID", checkEmptiness(taskBody.getNodeCandidate().getCloud().getId(), "cloudID")); nodeCandidateInformationJSON.put("locationName", checkEmptiness(taskBody.getNodeCandidate().getLocation().getName(), "locationName")); nodeCandidateInformationJSON.put("imageProviderId", checkEmptiness(taskBody.getNodeCandidate().getImage().getProviderId(), "imageProviderId")); nodeJSON.put("nodeCandidateInformation", nodeCandidateInformationJSON); -- GitLab From e5a100315edc4119ec85a7b77f2b3dcef251e0ca Mon Sep 17 00:00:00 2001 From: Jan Marchel Date: Mon, 7 Feb 2022 16:56:10 +0000 Subject: [PATCH 2/3] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ee51fea28..8fa400ba5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -416,6 +416,7 @@ deploy:adapter: - rc3.1 - morphemic-rc1.5 - proactive-dev + - fix-cloud-id image: $DOCKER_DIND_IMAGE services: - $DOCKER_DIND_SERVICE -- GitLab From c142187a609f4772440b5a79027709f265c0edcd Mon Sep 17 00:00:00 2001 From: Jan Marchel Date: Mon, 21 Feb 2022 10:29:07 +0100 Subject: [PATCH 3/3] fix cloud id --- .../guibackend/service/deployment/DeploymentMapper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui-backend/src/main/java/eu/melodic/upperware/guibackend/service/deployment/DeploymentMapper.java b/gui-backend/src/main/java/eu/melodic/upperware/guibackend/service/deployment/DeploymentMapper.java index ca866f165..38769e381 100644 --- a/gui-backend/src/main/java/eu/melodic/upperware/guibackend/service/deployment/DeploymentMapper.java +++ b/gui-backend/src/main/java/eu/melodic/upperware/guibackend/service/deployment/DeploymentMapper.java @@ -37,7 +37,7 @@ public class DeploymentMapper { .api(mapApiToRequest(cloudDefinition.getApi())) .credential(mapCredentialToRequest(cloudDefinition.getCredential())) .endpoint(StringUtils.isBlank(cloudDefinition.getEndpoint().trim()) ? null : cloudDefinition.getEndpoint()) - .id(RandomStringUtils.random(16, true, true)) + .id(RandomStringUtils.random(8, true, true)) .build()).collect(Collectors.toList()); } -- GitLab