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

Filtering t3a hardware types

parent d4002364
......@@ -221,7 +221,9 @@ public class PAGateway {
List<NodeCandidate> allNodeCandidates = EntityManagerHelper.createQuery("SELECT nc FROM NodeCandidate nc",
NodeCandidate.class).getResultList();
allNodeCandidates.forEach(nodeCandidate -> {
if (NodeCandidateUtils.verifyAllFilters(requirements, nodeCandidate)) {
// Hardware types t3a are not YET, handled by jclouds.
if (NodeCandidateUtils.verifyAllFilters(requirements, nodeCandidate) &&
!nodeCandidate.getHardware().getName().startsWith("t3a")) {
filteredNodeCandidates.add(nodeCandidate);
}
});
......
......@@ -240,7 +240,10 @@ 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::convertObjectToJson).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