From 5c81422f424bee04c1a6d1c8cb1ef9b37ebab866 Mon Sep 17 00:00:00 2001 From: mklkun Date: Thu, 17 Jun 2021 14:11:28 +0100 Subject: [PATCH] Fix getAllCloudImages endpoint --- .../src/main/java/org/activeeon/morphemic/PAGateway.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/PAGateway.java b/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/PAGateway.java index bf5c3d92..52fbc52d 100644 --- a/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/PAGateway.java +++ b/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/PAGateway.java @@ -368,7 +368,8 @@ public class PAGateway { JSONArray imagesArray = connectorIaasGateway.getImages(paCloud.getDummyInfrastructureName()); List imagesIDs = IntStream.range(0, imagesArray.length()) .mapToObj(imagesArray::get) - .map(blaBla -> ((JSONObject)blaBla).optString("id")).collect(Collectors.toList()); + .map(blaBla -> cloudID + "/" + ((JSONObject)blaBla).optString("id")) + .collect(Collectors.toList()); LOGGER.debug("Filtering images related to cloud ID \'" + cloudID + "\'."); allImages.stream().filter(blaTest -> imagesIDs.contains(blaTest.getId())).forEach(filteredImages::add); return filteredImages; -- GitLab