ipAddresses) {
+ this.ipAddresses = ipAddresses;
+ }
+
+ public EdgeNode nodeProperties(NodeProperties nodeProperties) {
+ this.nodeProperties = nodeProperties;
+ return this;
+ }
+
+ /**
+ * Further properties of this node.
+ * @return nodeProperties
+ **/
+ public NodeProperties getNodeProperties() {
+ return nodeProperties;
+ }
+
+ public void setNodeProperties(NodeProperties nodeProperties) {
+ this.nodeProperties = nodeProperties;
+ }
+
+ public EdgeNode reason(String reason) {
+ this.reason = reason;
+ return this;
+ }
+
+
+
+ public EdgeNode diagnostic(String diagnostic) {
+ this.diagnostic = diagnostic;
+ return this;
+ }
+
+
+ public EdgeNode id(String id) {
+ this.id = id;
+ return this;
+ }
+
+ public EdgeNode userId(String userId) {
+ this.userId = userId;
+ return this;
+ }
+
+
+ public EdgeNode allocated(Boolean allocated) {
+ this.allocated = allocated;
+ return this;
+ }
+
+ /**
+ * Signals if the node was allocated by cloudiator
+ * @return allocated
+ **/
+ public Boolean isAllocated() {
+ return allocated;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ EdgeNode edgeNode = (EdgeNode) o;
+ return Objects.equals(this.name, edgeNode.name) &&
+ Objects.equals(this.loginCredential, edgeNode.loginCredential) &&
+ Objects.equals(this.ipAddresses, edgeNode.ipAddresses) &&
+ Objects.equals(this.nodeProperties, edgeNode.nodeProperties) &&
+ Objects.equals(this.reason, edgeNode.reason) &&
+ Objects.equals(this.diagnostic, edgeNode.diagnostic) &&
+ Objects.equals(this.nodeCandidate, edgeNode.nodeCandidate) &&
+ Objects.equals(this.id, edgeNode.id) &&
+ Objects.equals(this.userId, edgeNode.userId) &&
+ Objects.equals(this.allocated, edgeNode.allocated) &&
+ Objects.equals(this.jobId, edgeNode.jobId);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(name, loginCredential, ipAddresses, nodeProperties, reason, diagnostic, nodeCandidate, id, userId, allocated);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class EdgeNode {\n");
+
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" loginCredential: ").append(toIndentedString(loginCredential)).append("\n");
+ sb.append(" ipAddresses: ").append(toIndentedString(ipAddresses)).append("\n");
+ sb.append(" nodeProperties: ").append(toIndentedString(nodeProperties)).append("\n");
+ sb.append(" reason: ").append(toIndentedString(reason)).append("\n");
+ sb.append(" diagnostic: ").append(toIndentedString(diagnostic)).append("\n");
+ sb.append(" nodeCandidate: ").append(toIndentedString(nodeCandidate)).append("\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" userId: ").append(toIndentedString(userId)).append("\n");
+ sb.append(" allocated: ").append(toIndentedString(allocated)).append("\n");
+ sb.append(" jobId: ").append(toIndentedString(jobId)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/model/NodeCandidate.java b/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/model/NodeCandidate.java
index abe81c4818f4d726d5879c518136a9e994fb5afc..6b824a2311527b0f241e820230091319aafaa6bc 100644
--- a/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/model/NodeCandidate.java
+++ b/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/model/NodeCandidate.java
@@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
import org.activeeon.morphemic.service.EntityManagerHelper;
import org.hibernate.annotations.GenericGenerator;
@@ -19,6 +20,7 @@ import java.util.Optional;
/**
* A node creatable by the system
*/
+@Slf4j
@AllArgsConstructor
@NoArgsConstructor
@Entity
@@ -48,6 +50,8 @@ public class NodeCandidate implements Serializable {
BYON("BYON"),
+ EDGE("EDGE"),
+
SIMULATION("SIMULATION");
private String value;
@@ -82,6 +86,10 @@ public class NodeCandidate implements Serializable {
@JsonProperty("jobIdForByon")
private String jobIdForBYON;
+ @Column(name = "JOB_ID_FOR_EDGE")
+ @JsonProperty("jobIdForEdge")
+ private String jobIdForEDGE;
+
@Column(name = "PRICE")
@JsonProperty("price")
private Double price = null;
@@ -156,10 +164,16 @@ public class NodeCandidate implements Serializable {
return jobIdForBYON;
}
+ public String getJobIdForEDGE() {
+ return jobIdForEDGE;
+ }
+
public void setJobIdForBYON(String jobIdForBYON) {
this.jobIdForBYON = jobIdForBYON;
}
+ public void setJobIdForEDGE(String jobIdForEDGE) { this.jobIdForEDGE = jobIdForEDGE; }
+
public NodeCandidate price(Double price) {
this.price = price;
return this;
@@ -301,9 +315,30 @@ public class NodeCandidate implements Serializable {
* @return true if yes, false if not
*/
public boolean isByonNodeCandidate() {
- return nodeCandidateType.value.equals("BYON");
+ if (nodeCandidateType.equals(NodeCandidateTypeEnum.BYON)) {
+ LOGGER.info(" Is BYON: YES");
+ return true;
+ } else {
+ LOGGER.info(" Is BYON: NO");
+ return false;
+ }
+ }
+
+ /**
+ * Check if a node candidate is of BYON type
+ * @return true if yes, false if not
+ */
+ public boolean isEdgeNodeCandidate() {
+ if (nodeCandidateType.equals(NodeCandidateTypeEnum.EDGE)) {
+ LOGGER.info(" Is EDGE: YES");
+ return true;
+ } else {
+ LOGGER.info(" Is EDGE: NO");
+ return false;
+ }
}
+
/**
* Find the first node candidate that
* @param hardware A given stored hardware
@@ -329,6 +364,7 @@ public class NodeCandidate implements Serializable {
return Objects.equals(this.id, nodeCandidate.id) &&
Objects.equals(this.nodeCandidateType, nodeCandidate.nodeCandidateType) &&
Objects.equals(this.jobIdForBYON, nodeCandidate.jobIdForBYON) &&
+ Objects.equals(this.jobIdForEDGE, nodeCandidate.jobIdForEDGE) &&
Objects.equals(this.price, nodeCandidate.price) &&
Objects.equals(this.cloud, nodeCandidate.cloud) &&
Objects.equals(this.image, nodeCandidate.image) &&
@@ -341,7 +377,7 @@ public class NodeCandidate implements Serializable {
@Override
public int hashCode() {
- return Objects.hash(id, nodeCandidateType, jobIdForBYON, price, cloud, image, hardware, location, pricePerInvocation, memoryPrice, environment);
+ return Objects.hash(id, nodeCandidateType, jobIdForBYON, jobIdForEDGE, price, cloud, image, hardware, location, pricePerInvocation, memoryPrice, environment);
}
@Override
@@ -352,6 +388,7 @@ public class NodeCandidate implements Serializable {
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" nodeCandidateType: ").append(toIndentedString(nodeCandidateType)).append("\n");
sb.append(" jobIdForBYON: ").append(toIndentedString(jobIdForBYON)).append("\n");
+ sb.append(" jobIdForEDGE: ").append(toIndentedString(jobIdForEDGE)).append("\n");
sb.append(" price: ").append(toIndentedString(price)).append("\n");
sb.append(" cloud: ").append(toIndentedString(cloud)).append("\n");
sb.append(" image: ").append(toIndentedString(image)).append("\n");
diff --git a/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/model/NodeType.java b/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/model/NodeType.java
index c3899c47f84b279171caf2e8b6d8a20a15180b7f..971bc1b5efde59584a24205d111f84d210b1625f 100644
--- a/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/model/NodeType.java
+++ b/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/model/NodeType.java
@@ -43,13 +43,23 @@ public enum NodeType implements Enumerator {
*
* @see #BYON_VALUE
*/
- BYON(3, "BYON", "BYON"), /**
+ BYON(3, "BYON", "BYON"),
+
+ /**
+ * The 'EDGE' literal object.
+ *
+ *
+ * @see #EDGE_VALUE
+ */
+ EDGE(4, "EDGE", "EDGE"), /**
+
+ /**
* The 'SIMULATION' literal object.
*
*
* @see #SIMULATION_VALUE
*/
- SIMULATION(4, "SIMULATION", "SIMULATION");
+ SIMULATION(5, "SIMULATION", "SIMULATION");
/**
* The 'IAAS' literal value.
@@ -99,6 +109,18 @@ public enum NodeType implements Enumerator {
*/
public static final int BYON_VALUE = 3;
+ /**
+ * The 'EDGE' literal value.
+ *
+ *
+ * If the meaning of 'EDGE' literal object isn't clear,
+ * there really should be more of a description here...
+ *
+ *
+ * @see #EDGE
+ */
+ public static final int EDGE_VALUE = 4;
+
/**
* The 'SIMULATION' literal value.
*
@@ -109,7 +131,7 @@ public enum NodeType implements Enumerator {
*
* @see #SIMULATION
*/
- public static final int SIMULATION_VALUE = 4;
+ public static final int SIMULATION_VALUE = 5;
/**
* An array of all the 'Node Type' enumerators.
@@ -122,6 +144,7 @@ public enum NodeType implements Enumerator {
PAAS,
FAAS,
BYON,
+ EDGE,
SIMULATION,
};
@@ -179,6 +202,7 @@ public enum NodeType implements Enumerator {
case PAAS_VALUE: return PAAS;
case FAAS_VALUE: return FAAS;
case BYON_VALUE: return BYON;
+ case EDGE_VALUE: return EDGE;
case SIMULATION_VALUE: return SIMULATION;
}
return null;
diff --git a/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/model/NodeTypeRequirement.java b/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/model/NodeTypeRequirement.java
index a9355cb1faa2e8d03a8ba97047ca30e54347eedb..6dd8b3c47c880582eb09b19caf0448e8f759fc30 100644
--- a/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/model/NodeTypeRequirement.java
+++ b/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/model/NodeTypeRequirement.java
@@ -19,6 +19,9 @@ public class NodeTypeRequirement extends Requirement {
@JsonProperty("jobIdForByon")
private String jobIdForBYON;
+ @JsonProperty("jobIdForEDGE")
+ private String jobIdForEDGE;
+
/**
* Get nodeType
* @return nodeType
@@ -36,12 +39,13 @@ public class NodeTypeRequirement extends Requirement {
NodeTypeRequirement nodeTypeRequirement = (NodeTypeRequirement) o;
return Objects.equals(this.nodeTypes, nodeTypeRequirement.nodeTypes) &&
Objects.equals(this.jobIdForBYON, nodeTypeRequirement.jobIdForBYON) &&
+ Objects.equals(this.jobIdForEDGE, nodeTypeRequirement.jobIdForEDGE) &&
super.equals(o);
}
@Override
public int hashCode() {
- return Objects.hash(nodeTypes, jobIdForBYON, super.hashCode());
+ return Objects.hash(nodeTypes, jobIdForBYON, jobIdForEDGE, super.hashCode());
}
@Override
@@ -51,6 +55,7 @@ public class NodeTypeRequirement extends Requirement {
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" nodeType: ").append(toIndentedString(nodeTypes)).append("\n");
sb.append(" jobIdForBYON: ").append(toIndentedString(jobIdForBYON)).append("\n");
+ sb.append(" jobIdForEDGE: ").append(toIndentedString(jobIdForEDGE)).append("\n");
sb.append("}");
return sb.toString();
}
diff --git a/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/model/PACloud.java b/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/model/PACloud.java
index eb5f3d4ba285fe75ce4cccde84a7cc915fb67fb0..43e748f96ac00af4cfdab914275038a5c8a6e01a 100644
--- a/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/model/PACloud.java
+++ b/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/model/PACloud.java
@@ -44,6 +44,10 @@ public class PACloud implements Serializable {
@Column(name = "SECURITY_GROUP")
private String securityGroup;
+ @Embedded
+ @Column(name = "SSH_CREDENTIALS")
+ private SSHCredentials sshCredentials;
+
@Column(name = "ENDPOINT")
private String endpoint;
@@ -134,6 +138,7 @@ public class PACloud implements Serializable {
", cloudType='" + cloudType.toString() + '\'' +
", subnet='" + subnet + '\'' +
", securityGroup='" + securityGroup + '\'' +
+ ", sshCredentials='" + sshCredentials.toString() + '\'' +
", endpoint='" + endpoint + '\'' +
", scopePrefix='" + scopePrefix + '\'' +
", scopeValue='" + scopeValue + '\'' +
diff --git a/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/model/SSHCredentials.java b/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/model/SSHCredentials.java
new file mode 100644
index 0000000000000000000000000000000000000000..a81d2ef9be50234f5b41b849dba7a5c91a1c3db3
--- /dev/null
+++ b/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/model/SSHCredentials.java
@@ -0,0 +1,44 @@
+package org.activeeon.morphemic.model;
+
+import lombok.*;
+
+import javax.persistence.Column;
+import javax.persistence.Embeddable;
+import java.util.Objects;
+
+@AllArgsConstructor
+@NoArgsConstructor
+@Getter
+@Setter
+@ToString
+@Embeddable
+public class SSHCredentials {
+
+ @Column(name = "USERNAME")
+ private String username = null;
+
+ @Column(name = "KEY_PAIR_NAME")
+ private String keyPairName = null;
+
+ @Column(name = "PRIVATE_KEY", columnDefinition = "TEXT")
+ private String privateKey = null;
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ SSHCredentials sshCredentials = (SSHCredentials) o;
+ return Objects.equals(this.username, sshCredentials.username) &&
+ Objects.equals(this.keyPairName, sshCredentials.keyPairName) &&
+ Objects.equals(this.privateKey, sshCredentials.privateKey);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(username, keyPairName, privateKey);
+ }
+}
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 0ac1b2480797eace646e4e1df746196e43da4b9c..080c2d096cf6c7a8fe44d59ef2982a04007583f9 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
@@ -50,18 +50,23 @@ public class NodeCandidateUtils {
public static boolean verifyAllFilters(List requirements, NodeCandidate nodeCandidate) {
if (requirements == null || requirements.isEmpty()) {
+ LOGGER.info(" Satisfy all requirements!!!");
return true;
}
if (requirements.get(0) instanceof NodeTypeRequirement) {
if (satisfyNodeTypeRequirement((NodeTypeRequirement) requirements.get(0), nodeCandidate)) {
+ LOGGER.info(" satisfyNodeTypeRequirement: YES");
return verifyAllFilters(requirements.subList(1, requirements.size()), nodeCandidate);
}
+ LOGGER.info(" satisfyNodeTypeRequirement: NO");
return false;
}
if (requirements.get(0) instanceof AttributeRequirement) {
if (satisfyAttributeRequirement((AttributeRequirement) requirements.get(0), nodeCandidate)) {
+ LOGGER.info(" satisfyAttributeRequirement: YES");
return verifyAllFilters(requirements.subList(1, requirements.size()), nodeCandidate);
}
+ LOGGER.info(" satisfyAttributeRequirement: NO");
return false;
}
LOGGER.warn("Unknown requirement type. It could not be applied: " + requirements.get(0).toString());
@@ -69,6 +74,10 @@ public class NodeCandidateUtils {
}
private static boolean satisfyAttributeRequirement(AttributeRequirement attributeRequirement, NodeCandidate nodeCandidate) {
+ // THIS LOG IS ADDED FOR TESTING,TO BE IMPROVED LATER
+ LOGGER.info("Checking the attribute requirement: \n {} \n for node candidate \"{}\" ",
+ attributeRequirement.toString(), nodeCandidate.getId());
+ // THIS LOG IS ADDED FOR TESTING,TO BE IMPROVED LATER
if (attributeRequirement.getRequirementClass().equals("hardware")) {
switch (attributeRequirement.getRequirementAttribute()) {
case "ram":
@@ -121,15 +130,40 @@ public class NodeCandidateUtils {
private static boolean satisfyNodeTypeRequirement(NodeTypeRequirement requirement, NodeCandidate nodeCandidate) {
return (requirement.getNodeTypes().stream().anyMatch(nodeType -> {
- if (nodeType.getLiteral().equals(nodeCandidate.getNodeCandidateType().name()) &&
+ if (nodeType.getLiteral().equals(nodeCandidate.getNodeCandidateType().name()) && ((
nodeType.equals(NodeType.BYON) &&
- requirement.getJobIdForBYON().equals(nodeCandidate.getJobIdForBYON())) {
+ requirement.getJobIdForBYON().equals(nodeCandidate.getJobIdForBYON())) ||
+ ( nodeType.equals(NodeType.EDGE) &&
+ requirement.getJobIdForEDGE().equals(nodeCandidate.getJobIdForEDGE())))) {
return true;
- } else return nodeType.getLiteral().equals(nodeCandidate.getNodeCandidateType().name()) &&
- !nodeType.equals(NodeType.BYON);
+ }
+ // THIS LOG IS ADDED FOR TESTING,TO BE IMPROVED LATER
+ else {
+ if( !nodeType.equals(NodeType.BYON) && !nodeType.equals(NodeType.EDGE))
+ {
+ if (nodeType.getLiteral().equals(nodeCandidate.getNodeCandidateType().name())) {
+ return true;
+ }
+ else {
+ LOGGER.info("the nodeType in the requirement \"{}\" is mismatched with the node candidate \"{}\" nodeType \"{}\"",
+ nodeType.getLiteral(), nodeCandidate.getId(),nodeCandidate.getNodeCandidateType().name());
+ return false;
+ }
+ }
+ else {
+ LOGGER.info("nodeType or jobId mismatch, \n " +
+ "Required: nodeType \"{}\", jobID for BYON and EDGE: \"{}\", \"{}\" \n" +
+ "Node candidate: nodeType \"{}\", jobID for BYON and EDGE: \"{}\", \"{}\" \n",
+ nodeType.getLiteral(),requirement.getJobIdForBYON(),requirement.getJobIdForEDGE(),
+ nodeCandidate.getNodeCandidateType().name(),nodeCandidate.getJobIdForBYON(),nodeCandidate.getJobIdForEDGE());
+ return false;
+ }
+
+ } // THIS LOG IS ADDED FOR TESTING,TO BE IMPROVED LATER
}));
}
+
private Hardware createHardware(JSONObject nodeCandidateJSON, PACloud paCloud) {
JSONObject hardwareJSON = nodeCandidateJSON.optJSONObject("hw");
String hardwareId = paCloud.getCloudID() + "/" +
diff --git a/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/nc/WhiteListedInstanceTypesUtils.java b/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/nc/WhiteListedInstanceTypesUtils.java
index d0e95c716c8e521f1e4b74310c372a430ab743f0..60188a797351bd34234d40456d02b9871b92cf2e 100644
--- a/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/nc/WhiteListedInstanceTypesUtils.java
+++ b/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/nc/WhiteListedInstanceTypesUtils.java
@@ -1,5 +1,8 @@
package org.activeeon.morphemic.nc;
+import lombok.extern.slf4j.Slf4j;
+
+@Slf4j
public class WhiteListedInstanceTypesUtils {
/**
@@ -8,6 +11,12 @@ public class WhiteListedInstanceTypesUtils {
* @return True if the instance type family is while listed, false otherwise
*/
public static boolean isHandledHardwareInstanceType(String instanceType) {
- return AwsWhiteListedInstanceTypes.isAwsWhiteListedHardwareInstanceType(instanceType);
+ if (AwsWhiteListedInstanceTypes.isAwsWhiteListedHardwareInstanceType(instanceType)) {
+ LOGGER.info(" Is aws white list family: YES");
+ return true;
+ } else {
+ LOGGER.info(" Is aws white list family: NO");
+ return false;
+ }
}
}
diff --git a/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/service/ByonUtils.java b/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/service/ByonUtils.java
index fc79d30027d6b3be7bca24a050349a15c3ffffd6..59b54130bd8e36cbfcf4dd1f0eca64f32e6cf230 100644
--- a/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/service/ByonUtils.java
+++ b/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/service/ByonUtils.java
@@ -28,75 +28,102 @@ public class ByonUtils {
}
/**
- * @param byonDef an Object of class ByonDefinition that contains all the nodes Definition
+ * @param np an Object of class NodeProperties that contains all the nodes properties needed for the candidate declaration
+ * @param jobId a String identifier of the node candidate job
+ * @param nodeType a String of the node type (byon or edge)
* @return an object of class NodeCandidate
*/
- public static NodeCandidate createByonNodeCandidate(ByonDefinition byonDef, String jobId) {
- LOGGER.debug("Creating the BYON node candidate ...");
- //create a dummy cloud
- Cloud byonCloud = ByonUtils.getOrCreateDummyByonCloud();
+ public static NodeCandidate createNodeCandidate(NodeProperties np, String jobId, String nodeType) {
EntityManagerHelper.begin();
- //set the image
- Image image = new Image();
- image.setId("byon-image-" + RandomStringUtils.randomAlphanumeric(16));
- image.setOperatingSystem(byonDef.getNodeProperties().getOperatingSystem());
+ LOGGER.debug("Creating the {} node candidate ...", nodeType.toUpperCase());
+ //Start by setting the universal nodes properties
+ NodeCandidate nc = new NodeCandidate();
+ nc.setPrice(0.0);
+ nc.setMemoryPrice(0.0);
+ nc.setPricePerInvocation(0.0);
- //set the hardware
+ //create a dummy cloud definition for BYON nodes
+ Cloud dummyCloud = new Cloud();
+ dummyCloud = ByonUtils.getOrCreateDummyCloud(nodeType);
+ //Create a dummy image
+ Image image = new Image();
+ image.setOperatingSystem(np.getOperatingSystem());
+ //Define the hardware
Hardware hardware = new Hardware();
- hardware.setId("byon-hardware-" + RandomStringUtils.randomAlphanumeric(16));
- hardware.setCores(byonDef.getNodeProperties().getNumberOfCores());
- hardware.setDisk((double) byonDef.getNodeProperties().getDisk());
- hardware.setRam(byonDef.getNodeProperties().getMemory());
-
- //set the location
+ hardware.setCores(np.getNumberOfCores());
+ hardware.setDisk((double) np.getDisk());
+ hardware.setRam(np.getMemory());
+ //Define the location
Location location = new Location();
- location.setId("byon-location-" + RandomStringUtils.randomAlphanumeric(16));
- location.setGeoLocation(byonDef.getNodeProperties().getGeoLocation());
-
- //define a dummy NC
- NodeCandidate byonNC = new NodeCandidate();
- byonNC.setNodeCandidateType(NodeCandidate.NodeCandidateTypeEnum.BYON);
- byonNC.setJobIdForBYON(jobId);
- byonNC.setPrice(0.0);
- byonNC.setMemoryPrice(0.0);
- byonNC.setPricePerInvocation(0.0);
- byonNC.setCloud(byonCloud);
- byonNC.setImage(image);
- byonNC.setHardware(hardware);
- byonNC.setLocation(location);
-
- EntityManagerHelper.persist(byonNC);
- EntityManagerHelper.commit();
- LOGGER.info("BYON node candidate created.");
- return byonNC;
+ location.setGeoLocation(np.getGeoLocation());
+
+ //Define the properties that depend on the node type
+
+ if (nodeType.equals("byon")) {
+
+ //set the image name
+ image.setId("byon-image-" + RandomStringUtils.randomAlphanumeric(16));
+ //set the hardware
+ hardware.setId("byon-hardware-" + RandomStringUtils.randomAlphanumeric(16));
+ //set the location
+ location.setId("byon-location-" + RandomStringUtils.randomAlphanumeric(16));
+ //set the nc parameters
+ nc.setNodeCandidateType(NodeCandidate.NodeCandidateTypeEnum.BYON);
+ // set the nc jobIdForBYON
+ nc.setJobIdForBYON(jobId);
+ // set the nc jobIdForEDGE
+ nc.setJobIdForEDGE(null);
+ }
+ else { //the node type is EDGE
+
+ //set the image name
+ image.setId("edge-image-" + RandomStringUtils.randomAlphanumeric(16));
+ //set the hardware
+ hardware.setId("edge-hardware-" + RandomStringUtils.randomAlphanumeric(16));
+ //set the location
+ location.setId("edge-location-" + RandomStringUtils.randomAlphanumeric(16));
+ //set the nc parameters
+ nc.setNodeCandidateType(NodeCandidate.NodeCandidateTypeEnum.EDGE);
+ // set the nc jobIdForBYON
+ nc.setJobIdForBYON(null);
+ // set the nc jobIdForEDGE
+ nc.setJobIdForEDGE(jobId);
+ }
+
+ nc.setCloud(dummyCloud);
+ nc.setImage(image);
+ nc.setHardware(hardware);
+ nc.setLocation(location);
+ EntityManagerHelper.persist(nc);
+ LOGGER.info("{} node candidate created.", nodeType.toUpperCase());
+ return nc;
}
/**
* Create a dummy object of class Cloud to be used for the node candidates
* @return the created byonCloud object
*/
- public static Cloud getOrCreateDummyByonCloud() {
- LOGGER.debug("Searching for the dummy BYON cloud ...");
+ public static Cloud getOrCreateDummyCloud(String nodeType) {
+ LOGGER.debug("Searching for the dummy cloud ...");
EntityManagerHelper.begin();
//Check if the Byon cloud already exists
- Optional optCloud = Optional.ofNullable(EntityManagerHelper.find(Cloud.class, "byon"));
+ Optional optCloud = Optional.ofNullable(EntityManagerHelper.find(Cloud.class, nodeType));
if (optCloud.isPresent()) {
- LOGGER.info("Dummy BYON cloud found!");
+ LOGGER.info("Dummy cloud for {} was found!", nodeType);
return optCloud.get();
}
- LOGGER.debug("Creating the dummy BYON cloud ...");
+ LOGGER.debug("Creating the dummy cloud for {} Nodes ...", nodeType);
//else, Byon cloud will be created
- Cloud byonCloud = new Cloud();
- byonCloud.setCloudType(CloudType.BYON);
- byonCloud.setOwner("BYON");
- byonCloud.setId("byon");
+ Cloud newCloud = new Cloud();
+ newCloud.setCloudType((nodeType.equals("byon")) ? CloudType.BYON : CloudType.EDGE);
+ newCloud.setOwner((nodeType.equals("byon")) ? "BYON" : "EDGE");
+ newCloud.setId(nodeType);
//Add the Byon cloud to the database
- EntityManagerHelper.persist(byonCloud);
- EntityManagerHelper.commit();
- LOGGER.info("Dummy BYON cloud created.");
- return byonCloud;
+ EntityManagerHelper.persist(newCloud);
+ LOGGER.info("Dummy {} cloud created.", nodeType.toUpperCase());
+ return newCloud;
/* TODO :
* Check if we have to add other variables to the new cloud
diff --git a/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/service/JCloudsInstancesUtils.java b/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/service/JCloudsInstancesUtils.java
index 7aa53126c2f0a856bd595d235ca6523b501e8629..4bbe6196a9013901dc5d903eae82e40b7ea21bc5 100644
--- a/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/service/JCloudsInstancesUtils.java
+++ b/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/service/JCloudsInstancesUtils.java
@@ -35,8 +35,15 @@ public class JCloudsInstancesUtils {
*/
public static boolean isHandledHardwareInstanceType(String providerName, String instanceType) {
if ("aws-ec2".equals(providerName))
- return handledAWSInstanceTypes.contains(instanceType);
+ if (handledAWSInstanceTypes.contains(instanceType)) {
+ LOGGER.info(" Is aws handled by JClouds: YES");
+ return true;
+ } else {
+ LOGGER.info(" Is aws handled by JClouds: NO");
+ return false;
+ }
// TODO: To check if for other cloud providers all instance types are handled by JClouds
+ LOGGER.info(" Is handled by JClouds: YES");
return true;
}
}
diff --git a/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/service/TaskBuilder.java b/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/service/TaskBuilder.java
index bc66c211bdf634f5a90fc2c1ec5b584a362603c2..73b65f2a6334242ebd01a78c2432755eef0e8ab0 100644
--- a/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/service/TaskBuilder.java
+++ b/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/service/TaskBuilder.java
@@ -148,7 +148,8 @@ public class TaskBuilder {
case IAAS:
return createInfraIAASTask(task, deployment, taskNameSuffix, nodeToken);
case BYON:
- return createInfraBYONTask(task, deployment, taskNameSuffix, nodeToken);
+ case EDGE:
+ return createInfraBYONandEDGETask(task, deployment, taskNameSuffix, nodeToken);
}
return new ScriptTask();
@@ -157,7 +158,7 @@ public class TaskBuilder {
private void addLocalDefaultNSRegexSelectionScript(ScriptTask scriptTask) {
try {
String selectionScriptFileName = "check_node_source_regexp.groovy";
- String[] nodeSourceNameRegex = {"^local$|^Default$"};
+ String[] nodeSourceNameRegex = {"^local$|^Default$|^LocalNodes$"};
SelectionScript selectionScript = new SelectionScript(Utils.getContentWithFileName(selectionScriptFileName),
"groovy",
nodeSourceNameRegex,
@@ -268,10 +269,12 @@ public class TaskBuilder {
return new ScriptTask();
}
- private ScriptTask createInfraBYONTask(Task task, Deployment deployment, String taskNameSuffix, String nodeToken) {
- LOGGER.debug("Acquiring node BYON script file: " + getClass().getResource(File.separator + "acquire_node_BYON_script.groovy").toString());
- ScriptTask deployNodeTask = PAFactory.createGroovyScriptTaskFromFile("acquireBYONNode_" + task.getName() + taskNameSuffix,
- "acquire_node_BYON_script.groovy");
+ private ScriptTask createInfraBYONandEDGETask(Task task, Deployment deployment, String taskNameSuffix, String nodeToken) {
+ String nodeType = deployment.getDeploymentType().getName();
+ System.out.println("the nodeType name is: "+ nodeType);
+ LOGGER.debug("Acquiring node " + nodeType + " script file: " + getClass().getResource(File.separator + "acquire_node_BYON_script.groovy").toString());
+ ScriptTask deployNodeTask = PAFactory.createGroovyScriptTaskFromFile("acquire"+nodeType+"Node_" + task.getName() + taskNameSuffix,
+ "acquire_node_BYON_script.groovy");
deployNodeTask.setPreScript(PAFactory.createSimpleScriptFromFIle("pre_acquire_node_script.groovy", "groovy"));
diff --git a/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/workflow/analyser/WfAnalyser.java b/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/workflow/analyser/WfAnalyser.java
new file mode 100644
index 0000000000000000000000000000000000000000..322ff401eec036c42d8ec5b2034a6f6592cf86c5
--- /dev/null
+++ b/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/workflow/analyser/WfAnalyser.java
@@ -0,0 +1,116 @@
+package org.activeeon.morphemic.workflow.analyser;
+
+import org.jdom2.Document;
+import org.jdom2.Element;
+import org.jdom2.JDOMException;
+import org.jdom2.input.SAXBuilder;
+import org.json.JSONArray;
+import org.json.JSONObject;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+
+/*
+ * This class contains the java endpoints that build from a Camel model the component grouping JSON
+ * and the dot graph syntax of the application.
+ *
+ * Developed by Activeeon in the context of H2020 MORPHEMIC project.
+ * @author Activeeon R&D Department
+ */
+
+public class WfAnalyser {
+
+ // Environment Variable Name for the camel xmi model path = CAMEL_XMI_DIR, e.g. CAMEL_XMI_DIR = "/users/user1/Documents/camel.xmi"
+ private static final String PROPERTIES_FILE_ENVIRONMENT_VARIABLE_NAME = "CAMEL_XMI_DIR";
+
+ Element camelModelRoot;
+
+ WfAnalyserCamelUtils wfAnalyserCamelUtils;
+
+ public WfAnalyser() throws IOException, JDOMException {
+ SAXBuilder builder = new SAXBuilder();
+ String path = System.getenv(PROPERTIES_FILE_ENVIRONMENT_VARIABLE_NAME);
+ File xmiFile = new File(path);
+ Document document = builder.build(xmiFile);
+ this.camelModelRoot = document.getRootElement();
+ wfAnalyserCamelUtils = new WfAnalyserCamelUtils(this.camelModelRoot);
+ }
+
+ public WfAnalyser(String path) throws IOException, JDOMException {
+ SAXBuilder builder = new SAXBuilder();
+ File xmiFile = new File(path);
+ Document document = builder.build(xmiFile);
+ this.camelModelRoot = document.getRootElement();
+ wfAnalyserCamelUtils = new WfAnalyserCamelUtils(this.camelModelRoot);
+ }
+
+ public JSONObject getJsonGrouping() {
+ JSONObject result = new JSONObject();
+ JSONArray applicationComponents = new JSONArray();
+
+ // Get application name
+ Element applicationElement = camelModelRoot.getChild("application");
+ result.put("Application_name", applicationElement.getAttributeValue("name"));
+
+ // Get number of components
+ List components = camelModelRoot.getChild("deploymentModels").getChildren("softwareComponents");
+ result.put("Number_of_components", components.size());
+
+ // App Requirements
+ result.put("General_requirements", wfAnalyserCamelUtils.getAppRequirements(components.size()));
+
+ // Get components metadata: name, requirements, long_lived, ...
+ for(Element component: components){
+ JSONObject componentMetaData = new JSONObject();
+
+ // Get component name
+ componentMetaData.put("name", component.getAttributeValue("name"));
+
+ // Get component long_lived value if it exists
+ componentMetaData.put("Long_lived", component.getAttributeValue("longLived"));
+
+ // Get resource requirements
+ String resourceReqValue = component.getAttributeValue("requirementSet");
+ int reqIndex = Integer.parseInt(resourceReqValue.split("@requirementSets.")[1]);
+ JSONArray resourceRequirements = wfAnalyserCamelUtils.getResourceRequirements(reqIndex);
+ componentMetaData.put("Resources", resourceRequirements);
+
+ // Get component variants
+ componentMetaData.put("Variants", WfAnalyserXmiElementUtils.getVariants(component));
+
+ applicationComponents.put(componentMetaData);
+ }
+ result.put("Application_components", applicationComponents);
+ result.put("Application_graph", wfAnalyserCamelUtils.getWorkflowArchitecture());
+ return result;
+ }
+
+ public String generateDotGraph() {
+ StringBuilder dotGraphSyntax = new StringBuilder();
+
+ // Write the dot file header
+ dotGraphSyntax.append("digraph g {\n");
+
+ // Add components to the do graph
+ List components = camelModelRoot.getChild("deploymentModels").getChildren("softwareComponents");
+ for(Element component: components) {
+ dotGraphSyntax.append(component.getAttributeValue("name")).append("[fontcolor=black, color=orange];\n");
+ }
+ // Add required communication
+ for(Element component: components) {
+ List requiredCommunications = component.getChildren("requiredCommunications");
+ for(Element requiredCommunication: requiredCommunications) {
+ dotGraphSyntax.append(WfAnalyserXmiElementUtils.findRequiredComponent(components, requiredCommunication.getAttributeValue("portNumber")))
+ .append("->")
+ .append(component.getAttributeValue("name"))
+ .append(" [fillcolor=grey, fontcolor=blue, color=grey, fontsize=6]").append(";");
+ dotGraphSyntax.append("\n");
+ }
+ }
+ // Write the dot file end character
+ dotGraphSyntax.append("}\n");
+ return dotGraphSyntax.toString();
+ }
+
+}
\ No newline at end of file
diff --git a/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/workflow/analyser/WfAnalyserCamelUtils.java b/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/workflow/analyser/WfAnalyserCamelUtils.java
new file mode 100644
index 0000000000000000000000000000000000000000..cd81ca847bfe1ad1d3dc3529d29ceef4e9c62589
--- /dev/null
+++ b/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/workflow/analyser/WfAnalyserCamelUtils.java
@@ -0,0 +1,137 @@
+package org.activeeon.morphemic.workflow.analyser;
+
+import lombok.AllArgsConstructor;
+import org.jdom2.Element;
+import org.json.JSONArray;
+import org.json.JSONObject;
+
+import java.util.List;
+
+/*
+ * This class contains the methods that handle an XMI model to generate the corresponding JSON objects.
+ *
+ * Developed by Activeeon in the context of H2020 MORPHEMIC project.
+ * @author Activeeon R&D Department
+ */
+
+@AllArgsConstructor
+public class WfAnalyserCamelUtils {
+
+ Element camelModelRoot;
+
+ public JSONArray getResourceRequirements(int reqIndex) {
+ JSONArray resourceRequirement = new JSONArray();
+ Element requirementModels = camelModelRoot.getChild("requirementModels");
+ // Get component Req by index
+ Element compRequirement = requirementModels.getChildren("requirements").get(reqIndex);
+ // Get component req features
+ List subFeatures = compRequirement.getChildren("subFeatures");
+ // Get list of attributes per component feature
+ for(Element feature: subFeatures) {
+ JSONObject requirement = new JSONObject();
+ String reqName = feature.getAttributeValue("annotations");
+ // Get list of attributes per requirement element
+ List attributes = feature.getChildren("attributes");
+ JSONArray listOfRequirements = new JSONArray();
+ for(Element attribute: attributes) {
+ // Get attribute name
+ String attributeName = attribute.getAttributeValue("name");
+ // Get attribute value
+ String value = attribute.getChild("value").getAttributeValue("value");
+ JSONObject attributeValue = new JSONObject();
+ // Create json object with attribute name and value
+ attributeValue.put(attributeName, value);
+ // Add the attribute object to the list
+ listOfRequirements.put(attributeValue);
+ }
+ requirement.put(reqName, listOfRequirements);
+ resourceRequirement.put(requirement);
+ }
+ return resourceRequirement;
+ }
+
+
+ public JSONArray getAppRequirements(int startIndex) {
+ JSONArray appRequirements = new JSONArray();
+ Element requirementModels = camelModelRoot.getChild("requirementModels");
+ // Get component Req
+ List compRequirements = requirementModels.getChildren("requirements");
+ for(int i=startIndex; i images = requirement.getChildren("images");
+ JSONArray imagesValue = new JSONArray();
+ for(Element image: images) {
+ imagesValue.put(image.getValue());
+ }
+
+ if(imagesValue.length()>0) {
+ instancesRequirementObject.put("Images for: " + reqName, imagesValue);
+ }
+
+ if(!instancesReq.isEmpty()) {
+ instancesRequirementObject.put(reqName, instancesReq);
+ }
+
+ //instancesRequirementObject.get()
+
+ if(!instancesRequirementObject.isEmpty()) {
+ appRequirements.put(instancesRequirementObject);
+ }
+ }
+ return appRequirements;
+ }
+
+
+ public JSONArray getWorkflowArchitecture() {
+ JSONArray results = new JSONArray();
+ List components = camelModelRoot.getChild("deploymentModels").getChildren("softwareComponents");
+ for(Element component: components) {
+ JSONArray cnx = new JSONArray();
+ List requiredCommunications = component.getChildren("requiredCommunications");
+ List providedCommunications = component.getChildren("providedCommunications");
+ for(Element requiredCommunication: requiredCommunications) {
+ String connectionName = WfAnalyserXmiElementUtils.findProvidedComponent(components, requiredCommunication.getAttributeValue("portNumber"));
+ if(!connectionName.isEmpty()) {
+ cnx.put(connectionName);
+ }
+ }
+ for(Element providedCommunication: providedCommunications) {
+ String connectionName = WfAnalyserXmiElementUtils.findProvidedComponent(components, providedCommunication.getAttributeValue("portNumber"));
+ if(!connectionName.isEmpty()) {
+ cnx.put(connectionName);
+ }
+ }
+ JSONObject compConnections = new JSONObject();
+ compConnections.put(component.getAttributeValue("name"), cnx);
+ results.put(compConnections);
+ }
+ return results;
+ }
+
+
+}
diff --git a/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/workflow/analyser/WfAnalyserXmiElementUtils.java b/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/workflow/analyser/WfAnalyserXmiElementUtils.java
new file mode 100644
index 0000000000000000000000000000000000000000..6ca625ebefb10b0470f4425ab38aa6629b4696c6
--- /dev/null
+++ b/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/workflow/analyser/WfAnalyserXmiElementUtils.java
@@ -0,0 +1,50 @@
+package org.activeeon.morphemic.workflow.analyser;
+
+import org.jdom2.Element;
+import org.json.JSONArray;
+
+import java.util.List;
+
+/*
+ * This class contains the methods that handle XMI elements to generate the corresponding JSON objects.
+ *
+ * Developed by Activeeon in the context of H2020 MORPHEMIC project.
+ * @author Activeeon R&D Department
+ */
+
+public class WfAnalyserXmiElementUtils {
+
+
+ public static String findRequiredComponent(List components, String portNumber) {
+ for(Element component: components) {
+ if(component.getChildren("providedCommunications").stream().anyMatch(provComm -> provComm.getAttributeValue("portNumber").equals(portNumber))) {
+ return component.getAttributeValue("name");
+ }
+ }
+ return "";
+ }
+
+ public static String findProvidedComponent(List components, String portNumber) {
+ for(Element component: components) {
+ if(component.getChildren("requiredCommunications").stream().anyMatch(provComm -> provComm.getAttributeValue("portNumber").equals(portNumber))) {
+ return component.getAttributeValue("name");
+ }
+ }
+ return "";
+ }
+
+ public static JSONArray getVariants(Element component) {
+ JSONArray variants = new JSONArray();
+ List attributes = component.getChildren("attributes");
+ for(Element element: attributes) {
+ String value = element.getChild("value").getAttributeValue("value");
+ if(value.contains("VM") || value.contains("DOCKER") || value.contains("SERVERLESS") || value.contains("HPC")) {
+ variants.put(value);
+ }
+ }
+ return variants;
+ }
+
+ private WfAnalyserXmiElementUtils() {}
+
+}
diff --git a/scheduling-abstraction-layer/src/main/resources/Define_NS_AWS.xml b/scheduling-abstraction-layer/src/main/resources/Define_NS_AWS.xml
index 597fc3de178563911d993ecd59d3f55ab7e8b364..a0fbf7fc3570f5eced9d40b069ed4980b16fc416 100644
--- a/scheduling-abstraction-layer/src/main/resources/Define_NS_AWS.xml
+++ b/scheduling-abstraction-layer/src/main/resources/Define_NS_AWS.xml
@@ -8,6 +8,9 @@
+
+
+
@@ -46,8 +49,8 @@ def infrastructureParameters = [variables.get("aws_username"), //username
variables.get("NS_nVMs"), //N of VMs
"1", //N VMs per node
variables.get("image"), //image
- "", //OS
- "", //awsKeyPair
+ variables.get("sshUsername"), //sshUsername
+ variables.get("sshKeyPairName"), //sshKeyPair
"", //ram
"", //Ncore
variables.get("security_group"), //sg
@@ -59,7 +62,7 @@ def infrastructureParameters = [variables.get("aws_username"), //username
"300000", //timeout
"",
""]
-def infrastructureFileParameters = [""]
+def infrastructureFileParameters = [variables.get("sshPrivateKey")]
def policyType = "org.ow2.proactive.resourcemanager.nodesource.policy.EmptyPolicy"
def poliyParameters = ["ALL","ME"]
def policyFileParameters = []
diff --git a/scheduling-abstraction-layer/src/main/resources/Define_NS_AWS_AutoScale.xml b/scheduling-abstraction-layer/src/main/resources/Define_NS_AWS_AutoScale.xml
index 4c24f0b9c21fbdcec0342792e7e437130bb2d73b..1bc0f752ad5cc2a8377bee8e588db1d969002ed6 100644
--- a/scheduling-abstraction-layer/src/main/resources/Define_NS_AWS_AutoScale.xml
+++ b/scheduling-abstraction-layer/src/main/resources/Define_NS_AWS_AutoScale.xml
@@ -10,6 +10,7 @@
+
@@ -48,12 +49,12 @@ def infrastructureParameters = ["proactive-nodesource-", //vmGroupTagPrefix
"100", //maxVms
variables.get("instance_type"), //defaultInstanceType
variables.get("image"), //image
- "", //awsKeyPair
+ variables.get("sshKeyPairName"), //awsKeyPair
"", //vpc
variables.get("subnet"), //subnet
variables.get("security_group"), //sg
variables.get("region"), //region
- "pamr://0/", //rmUrl
+ "pamr://0/", //rmUrl //use pamr://4096/ for trydevs testing
variables.get("rm_host_name"), //host
protocol + "://" + variables.get("rm_host_name") + ":"+ variables.get("pa_port") + "/rest/node.jar", //node jar url
"-Dproactive.useIPaddress=true", //additionalProperties"
diff --git a/scheduling-abstraction-layer/src/main/resources/Define_NS_BYON.xml b/scheduling-abstraction-layer/src/main/resources/Define_NS_BYON.xml
index 5dec694ce165675aae187716c078175a938575d2..463f71ffd3ad29f1ce092268e54b5acce89016f1 100644
--- a/scheduling-abstraction-layer/src/main/resources/Define_NS_BYON.xml
+++ b/scheduling-abstraction-layer/src/main/resources/Define_NS_BYON.xml
@@ -1,7 +1,7 @@
+ xmlns="urn:proactive:jobdescriptor:3.12" xsi:schemaLocation="urn:proactive:jobdescriptor:3.12 http://www.activeeon.com/public_content/schemas/proactive/jobdescriptor/3.12/schedulerjob.xsd" name="Define_NS_BYON" priority="normal" onTaskError="continueJobExecution" maxNumberOfExecution="2" >
@@ -75,7 +75,11 @@ def infrastructureParameters = ["300000", //Node Time out
"/opt/ProActive_node_agent/jre/bin/java", //JavaPath on the remote host
"/opt/ProActive_node_agent", //ScheduligPath on the remote hosts
"Linux", //targetOs
- javaOptions]//Java options
+ javaOptions, //Java options
+ "autoGenerated", //deploymentMode
+ "", //nodeJarUrl
+ "", //startupScriptStandard
+ ""] //startupScriptWithNodeJarDownload
def infrastructureFileParameters = [hosts, //hostsList file content
"", //SSH Private Key
diff --git a/scheduling-abstraction-layer/src/main/resources/Define_NS_EDGE.xml b/scheduling-abstraction-layer/src/main/resources/Define_NS_EDGE.xml
new file mode 100644
index 0000000000000000000000000000000000000000..fd6d7f57fa367dadd679106fa4c69dd3cd13e7d4
--- /dev/null
+++ b/scheduling-abstraction-layer/src/main/resources/Define_NS_EDGE.xml
@@ -0,0 +1,152 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 508.96875
+
+
+ 515.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+