From d4c0023b87a21cc6159952672e4942a5724991ce Mon Sep 17 00:00:00 2001 From: Ali Fahs Date: Fri, 27 May 2022 18:38:47 +0200 Subject: [PATCH] temp fix --- .../morphemic/nc/NodeCandidateUtils.java | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/nc/NodeCandidateUtils.java b/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/nc/NodeCandidateUtils.java index 3d26d19c..3bf985a5 100644 --- a/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/nc/NodeCandidateUtils.java +++ b/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/nc/NodeCandidateUtils.java @@ -300,16 +300,13 @@ public class NodeCandidateUtils { try { if (paCloud.getCloudProviderName().equals("openstack")){ - if((!entries.contains(pair)) && openstackOsList.contains(os)) { - entries.add(pair); - JSONArray nodeCandidates = nodeCandidatesCache.get(Quartet.with(paCloud, region, imageReq, "")); - nodeCandidates.forEach(nc -> { - JSONObject nodeCandidate = (JSONObject) nc; - EntityManagerHelper.persist(createLocation(nodeCandidate, paCloud)); - EntityManagerHelper.persist(createNodeCandidate(nodeCandidate, image, paCloud)); - }); - - } + entries.add(pair); + JSONArray nodeCandidates = nodeCandidatesCache.get(Quartet.with(paCloud, region, imageReq, "")); + nodeCandidates.forEach(nc -> { + JSONObject nodeCandidate = (JSONObject) nc; + EntityManagerHelper.persist(createLocation(nodeCandidate, paCloud)); + EntityManagerHelper.persist(createNodeCandidate(nodeCandidate, image, paCloud)); + }); } else { JSONArray nodeCandidates = nodeCandidatesCache.get(Quartet.with(paCloud, region, imageReq, "")); -- GitLab