Commit ed7e3243 authored by Mohamed Khalil Labidi's avatar Mohamed Khalil Labidi
Browse files

Merge branch 'fix-getAllCloudImages' into 'proactive-dev'

Fix getAllCloudImages endpoint

See merge request !87
parents 2e949775 5c81422f
......@@ -368,7 +368,8 @@ public class PAGateway {
JSONArray imagesArray = connectorIaasGateway.getImages(paCloud.getDummyInfrastructureName());
List<String> 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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment