Commit a0c2a267 authored by Marta Różańska's avatar Marta Różańska
Browse files

Merge branch 'proactive-dev' into 'morph-rc1.5'

change to check if IAAS nodes are already collected by SAL (BYON nodes are not...

See merge request !26
parents fe67f2d5 16dfefa2
Pipeline #16141 passed with stages
in 4 minutes and 56 seconds
......@@ -6,7 +6,7 @@
<groupId>cloud.morphemic.connectors</groupId>
<artifactId>connectors</artifactId>
<version>1.4-SNAPSHOT</version>
<version>1.5-SNAPSHOT</version>
<modules>
<module>proactive_client</module>
</modules>
......
......@@ -5,12 +5,12 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>cloud.morphemic.connectors</groupId>
<version>1.4-SNAPSHOT</version>
<version>1.5-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>proactive_client</artifactId>
<version>1.4-SNAPSHOT</version>
<version>1.5-SNAPSHOT</version>
<properties>
<java.version>1.8</java.version>
......@@ -20,7 +20,7 @@
<dependency>
<groupId>org.activeeon</groupId>
<artifactId>scheduling-abstraction-layer</artifactId>
<version>3.5-SNAPSHOT</version>
<version>3.6-SNAPSHOT</version>
</dependency>
</dependencies>
......
......@@ -261,7 +261,7 @@
<dependency>
<groupId>cloud.morphemic.connectors</groupId>
<artifactId>proactive_client</artifactId>
<version>1.4-SNAPSHOT</version>
<version>1.5-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>org.hibernate.validator</groupId>
......
......@@ -4,6 +4,8 @@ import cloud.morphemic.connectors.proactive.ProactiveClientServiceConnector;
import com.google.common.base.MoreObjects;
import org.activeeon.morphemic.PAGateway;
import org.activeeon.morphemic.model.NodeCandidate;
import org.activeeon.morphemic.model.NodeType;
import org.activeeon.morphemic.model.NodeTypeRequirement;
import org.apache.commons.lang3.ObjectUtils;
import org.json.JSONArray;
import org.json.JSONObject;
......@@ -11,10 +13,7 @@ import org.mule.api.annotations.param.Payload;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Optional;
import java.util.UUID;
import java.util.*;
public class ProactiveClientServiceForIntegrationImpl extends ProactiveClientServiceConnector implements ProactiveClientServiceForIntegration {
private static final Logger log = LoggerFactory.getLogger(ProactiveClientServiceForIntegrationImpl.class);
......@@ -108,7 +107,10 @@ public class ProactiveClientServiceForIntegrationImpl extends ProactiveClientSer
log.info("ProactiveClientServiceForIntegrationImpl->checkNodeCandidatesUpdateFinished: starting...");
Optional<PAGateway> paGatewayOptional = getPAGateway();
if(paGatewayOptional.isPresent()) {
List<NodeCandidate> nodeCandidates = paGatewayOptional.get().findNodeCandidates(null);
NodeTypeRequirement nodeTypeRequirement = new NodeTypeRequirement();
nodeTypeRequirement.setNodeTypes(Collections.singletonList(NodeType.IAAS));
log.info("ProactiveClientServiceForIntegrationImpl->checkNodeCandidatesUpdateFinished: checking only for occurrence of IAAS nodeCandidates, passing requirement: {}", nodeTypeRequirement);
List<NodeCandidate> nodeCandidates = paGatewayOptional.get().findNodeCandidates(Collections.singletonList(nodeTypeRequirement));
log.info("ProactiveClientServiceForIntegrationImpl->checkNodeCandidatesUpdateFinished: nodeCandidates size= {}", nodeCandidates.size());
if (nodeCandidates.isEmpty()) {
......
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