Commit 68602594 authored by Jan Marchel's avatar Jan Marchel
Browse files

adding Node Candidate type Edge and all things related to it

parent 1d234989
Pipeline #21183 passed with stages
in 12 minutes and 15 seconds
......@@ -123,7 +123,7 @@ public class NodeCandidatesFetchingServiceImpl implements NodeCandidatesFetching
if (nodeType.isPresent()) {
result.add(createNodeTypeRequirement(Collections.singletonList(NodeType.valueOf(getValueAsString(nodeType.get().getValue()))), resourceName));
} else {
result.add(createNodeTypeRequirement(Arrays.asList(NodeType.IAAS, NodeType.BYON), resourceName));
result.add(createNodeTypeRequirement(Arrays.asList(NodeType.IAAS, NodeType.BYON, NodeType.EDGE), resourceName));
}
getAttribute(requirementsMap, "totalMemoryHasMin").ifPresent(attribute -> result.add(createRequirement(HARDWARE_CLASS, "ram", RequirementOperator.GEQ, getValueAsString(attribute.getValue()))));
......
......@@ -2,6 +2,6 @@ package eu.paasage.upperware.profiler.generator.communication.impl;
public enum NodeType {
IAAS, PAAS, FAAS, BYON
IAAS, PAAS, FAAS, BYON, EDGE
}
package eu.passage.upperware.commons.model.edge;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import eu.passage.upperware.commons.model.internal.IpAddress;
import eu.passage.upperware.commons.model.internal.LoginCredential;
......@@ -11,14 +8,9 @@ import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.SuperBuilder;
import org.activeeon.morphemic.model.NodeCandidate;
import org.hibernate.annotations.GenericGenerator;
import javax.persistence.*;
import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Data
@NoArgsConstructor
......@@ -36,7 +28,7 @@ public class EdgeNode implements Serializable {
@JsonProperty("loginCredential")
private LoginCredential loginCredential;
@JsonProperty("ipAddresses")
private List<IpAddress> ipAddresses;
private List<IpAddress> ipAddresses = null;
@JsonProperty("nodeProperties")
private NodeProperties nodeProperties;
@JsonProperty("reason")
......
......@@ -102,7 +102,8 @@ public class NodeCandidatesConverter implements ArgumentConverter {
if (NodeCandidate.NodeCandidateTypeEnum.FAAS.equals(nodeCandidate.getNodeCandidateType())) {
return nodeCandidate.getPricePerInvocation();
} else if (NodeCandidate.NodeCandidateTypeEnum.IAAS.equals(nodeCandidate.getNodeCandidateType()) ||
NodeCandidate.NodeCandidateTypeEnum.BYON.equals(nodeCandidate.getNodeCandidateType())) {
NodeCandidate.NodeCandidateTypeEnum.BYON.equals(nodeCandidate.getNodeCandidateType()) ||
NodeCandidate.NodeCandidateTypeEnum.EDGE.equals(nodeCandidate.getNodeCandidateType())) {
return nodeCandidate.getPrice();
} else {
throw new IllegalStateException("Type of Node Candidate: " + nodeCandidate.getNodeCandidateType() + "is not supported");
......
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