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 59b54130bd8e36cbfcf4dd1f0eca64f32e6cf230..3cfa18947765e585368c4dbac73e9d733d124a23 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 @@ -60,13 +60,16 @@ public class ByonUtils { //Define the properties that depend on the node type if (nodeType.equals("byon")) { - - //set the image name - image.setId("byon-image-" + RandomStringUtils.randomAlphanumeric(16)); + String bid = RandomStringUtils.randomAlphanumeric(16); + //set the image id + image.setId("byon-image-" + bid); + //set the image Name + image.setName("byon-image-name-" + np.getOperatingSystem().getOperatingSystemFamily()+ + "-" + np.getOperatingSystem().getOperatingSystemArchitecture()); //set the hardware - hardware.setId("byon-hardware-" + RandomStringUtils.randomAlphanumeric(16)); + hardware.setId("byon-hardware-" + bid); //set the location - location.setId("byon-location-" + RandomStringUtils.randomAlphanumeric(16)); + location.setId("byon-location-" + bid); //set the nc parameters nc.setNodeCandidateType(NodeCandidate.NodeCandidateTypeEnum.BYON); // set the nc jobIdForBYON @@ -75,13 +78,16 @@ public class ByonUtils { nc.setJobIdForEDGE(null); } else { //the node type is EDGE - - //set the image name - image.setId("edge-image-" + RandomStringUtils.randomAlphanumeric(16)); + String eid = RandomStringUtils.randomAlphanumeric(16); + //set the image id + image.setId("edge-image-" + eid); + //set the image Name + image.setName("edge-image-name-" + np.getOperatingSystem().getOperatingSystemFamily()+ + "-" + np.getOperatingSystem().getOperatingSystemArchitecture()); //set the hardware - hardware.setId("edge-hardware-" + RandomStringUtils.randomAlphanumeric(16)); + hardware.setId("edge-hardware-" + eid); //set the location - location.setId("edge-location-" + RandomStringUtils.randomAlphanumeric(16)); + location.setId("edge-location-" + eid); //set the nc parameters nc.setNodeCandidateType(NodeCandidate.NodeCandidateTypeEnum.EDGE); // set the nc jobIdForBYON