From 89b82dd1d0d53b6be26b1714d1be244419910a5a Mon Sep 17 00:00:00 2001 From: Ali_fahs Date: Wed, 9 Jun 2021 10:00:52 +0200 Subject: [PATCH] adding the skeleton for BYON endpoints and classes --- .../org/activeeon/morphemic/PAGateway.java | 43 +++++++++++++++++++ .../morphemic/model/ByonDefinition.java | 4 ++ .../activeeon/morphemic/model/ByonNode.java | 4 ++ 3 files changed, 51 insertions(+) create mode 100644 scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/model/ByonDefinition.java create mode 100644 scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/model/ByonNode.java diff --git a/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/PAGateway.java b/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/PAGateway.java index 2041c644..89ab4124 100644 --- a/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/PAGateway.java +++ b/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/PAGateway.java @@ -340,6 +340,7 @@ public class PAGateway { } }); return filteredNodeCandidates; + //TODO: add BYON nodes to the NodeCandidates List } /** @@ -541,6 +542,38 @@ public class PAGateway { return 0; } + /** + * Register new BYON nodes passed as ByonDefinition object + * @param newByonNode an object of class ByonDefinition that contains the detials of the nodes to be registered. + * @param jobId A constructed job identifier + * @return ByonNode an object that contains information about the registered Node + */ + public ByonNode registerNewByonNode(ByonDefinition newByonNode, String jobId) { + return null; + //TODO + } + + /** + * Return the List of registered BYON nodes + * @param jobId A constructed job identifier + * @return List of ByonNode objects that contains information about the registered Nodes + */ + public List getByonNodeList(String jobId) { + return null; + //TODO + } + + /** + * Adding BYON nodes to a job component + * @param byonIdPerComponent a mapping between byon nodes and job components + * @param jobId A constructed job identifier + * @return 0 if nodes has been added properly. A greater than 0 value otherwise. + */ + public int addByonNodes(Map byonIdPerComponent, String jobId) { + return 0; + //TODO + } + /** * Undeploy clouds * @param cloudIDs List of cloud IDs to remove @@ -625,6 +658,16 @@ public class PAGateway { }); } + /** + * Remove Byon nodes + * @param byonId the id of the node to be removed + * @return true if the deletion was done with no errors, false otherwise + */ + public Boolean deleteByonNode(String byonId) { + return null; + //TODO + } + /** * Stop jobs * @param jobIDs List of job IDs to stop diff --git a/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/model/ByonDefinition.java b/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/model/ByonDefinition.java new file mode 100644 index 00000000..32fb2310 --- /dev/null +++ b/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/model/ByonDefinition.java @@ -0,0 +1,4 @@ +package org.activeeon.morphemic.model; + +public class ByonDefinition { +} diff --git a/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/model/ByonNode.java b/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/model/ByonNode.java new file mode 100644 index 00000000..fe179fdd --- /dev/null +++ b/scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/model/ByonNode.java @@ -0,0 +1,4 @@ +package org.activeeon.morphemic.model; + +public class ByonNode { +} -- GitLab