Commit 4b63a4d8 authored by Mohamed Khalil Labidi's avatar Mohamed Khalil Labidi
Browse files

Change name of method

parent a2802794
......@@ -225,7 +225,7 @@ public class NodeCandidateUtils {
return nodeCandidate;
}
private static JSONObject apply(Object object) {
private static JSONObject convertObjectToJson(Object object) {
JSONObject myJson = null;
try {
myJson = new JSONObject(new ObjectMapper().writeValueAsString(object));
......@@ -247,7 +247,7 @@ public class NodeCandidateUtils {
LOGGER.info("Getting images from Proactive ...");
JSONArray images = connectorIaasGateway.getImages(paCloud.getDummyInfrastructureName());
LOGGER.info("Returned images: " + images.toString());
List<JSONObject> consolidatedImages = images.toList().parallelStream().map(NodeCandidateUtils::apply).filter(record -> !blacklistedRegions.contains(record.get("location"))).collect(Collectors.toList());
List<JSONObject> consolidatedImages = images.toList().parallelStream().map(NodeCandidateUtils::convertObjectToJson).filter(record -> !blacklistedRegions.contains(record.get("location"))).collect(Collectors.toList());
LOGGER.info("Consolidated images: " + consolidatedImages.toString());
//TODO: (Optimization) An images per region map structure <region,[image1,image2]> could be the best here.
......
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