diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ee51fea281f99f2edef2ff6fc8ec1379987f2fbb..8fa400ba556746a9c1d6b20b753e47017e93e5a0 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 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 25aa1da0553c14b448646637a6a697f4f3c205b3..e7396981855cef44ba5af330b369db0d87e1b5b5 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); 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 ca866f165084edc70aef0790382d19477ad1fbd6..38769e3810471583a9f3dadf4ac6d02f74069b1c 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()); }