diff --git a/.classpath b/.classpath
new file mode 100644
index 0000000..70eaec6
--- /dev/null
+++ b/.classpath
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.project b/.project
new file mode 100644
index 0000000..367d621
--- /dev/null
+++ b/.project
@@ -0,0 +1,42 @@
+
+
+ dataminer-pool-manager
+
+
+
+
+
+ org.eclipse.wst.jsdt.core.javascriptValidator
+
+
+
+
+ org.eclipse.wst.common.project.facet.core.builder
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.eclipse.wst.validation.validationbuilder
+
+
+
+
+ org.eclipse.m2e.core.maven2Builder
+
+
+
+
+
+ org.eclipse.jem.workbench.JavaEMFNature
+ org.eclipse.wst.common.modulecore.ModuleCoreNature
+ org.eclipse.jdt.core.javanature
+ org.eclipse.m2e.core.maven2Nature
+ org.eclipse.wst.common.project.facet.core.nature
+ org.eclipse.wst.jsdt.core.jsNature
+
+
diff --git a/.settings/.jsdtscope b/.settings/.jsdtscope
new file mode 100644
index 0000000..fcdc9dc
--- /dev/null
+++ b/.settings/.jsdtscope
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..1c075a8
--- /dev/null
+++ b/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,5 @@
+eclipse.preferences.version=1
+encoding***REMOVED***src/main/java=UTF-8
+encoding***REMOVED***src/main/resources=UTF-8
+encoding***REMOVED***src/test/java=UTF-8
+encoding/=UTF-8
diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..443e085
--- /dev/null
+++ b/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.7
diff --git a/.settings/org.eclipse.m2e.core.prefs b/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..f897a7f
--- /dev/null
+++ b/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component
new file mode 100644
index 0000000..c53dd14
--- /dev/null
+++ b/.settings/org.eclipse.wst.common.component
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml b/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml
new file mode 100644
index 0000000..cc81385
--- /dev/null
+++ b/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/.settings/org.eclipse.wst.common.project.facet.core.xml b/.settings/org.eclipse.wst.common.project.facet.core.xml
new file mode 100644
index 0000000..2afeca5
--- /dev/null
+++ b/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/.settings/org.eclipse.wst.jsdt.ui.superType.container b/.settings/org.eclipse.wst.jsdt.ui.superType.container
new file mode 100644
index 0000000..3bd5d0a
--- /dev/null
+++ b/.settings/org.eclipse.wst.jsdt.ui.superType.container
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
diff --git a/.settings/org.eclipse.wst.jsdt.ui.superType.name b/.settings/org.eclipse.wst.jsdt.ui.superType.name
new file mode 100644
index 0000000..05bd71b
--- /dev/null
+++ b/.settings/org.eclipse.wst.jsdt.ui.superType.name
@@ -0,0 +1 @@
+Window
\ No newline at end of file
diff --git a/.settings/org.eclipse.wst.validation.prefs b/.settings/org.eclipse.wst.validation.prefs
new file mode 100644
index 0000000..04cad8c
--- /dev/null
+++ b/.settings/org.eclipse.wst.validation.prefs
@@ -0,0 +1,2 @@
+disabled=06target
+eclipse.preferences.version=1
diff --git a/0e558010-c4af-458a-b6ba-532f200d9db8 b/0e558010-c4af-458a-b6ba-532f200d9db8
new file mode 100644
index 0000000..1100bf3
--- /dev/null
+++ b/0e558010-c4af-458a-b6ba-532f200d9db8
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/WebContent/META-INF/MANIFEST.MF b/WebContent/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..5e94951
--- /dev/null
+++ b/WebContent/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
diff --git a/distro/descriptor.xml b/distro/descriptor.xml
index b9b959f..1bf2d11 100644
--- a/distro/descriptor.xml
+++ b/distro/descriptor.xml
@@ -28,7 +28,7 @@
-
+
/${artifactId***REMOVED***
diff --git a/f7ba9c3a-6e2c-4d90-8136-959d71b5b4d1 b/f7ba9c3a-6e2c-4d90-8136-959d71b5b4d1
new file mode 100644
index 0000000..1100bf3
--- /dev/null
+++ b/f7ba9c3a-6e2c-4d90-8136-959d71b5b4d1
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/log b/log
new file mode 100644
index 0000000..e69de29
diff --git a/pom.xml b/pom.xml
index b12e24c..47b739d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -12,7 +12,7 @@
org.gcube.dataanalysis
dataminer-pool-manager
1.0.0-SNAPSHOT
- jar
+ war
dataminer-pool-manager
@@ -44,6 +44,36 @@
ic-client
provided
+
+ org.yaml
+ snakeyaml
+ 1.16
+
+
+ org.glassfish.jersey.media
+ jersey-media-json-jackson
+ 2.23.1
+
+
+ org.glassfish.jersey.core
+ jersey-client
+ 2.22.1
+
+
+
+ org.glassfish.jersey.containers
+ jersey-container-servlet
+ 2.22.1
+
+
+
+ org.slf4j
+ slf4j-api
+ provided
+
+
+
+
diff --git a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansible/AnsibleWorker.java b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansible/AnsibleWorker.java
similarity index 80%
rename from src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansible/AnsibleWorker.java
rename to src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansible/AnsibleWorker.java
index b3fae70..0d561d1 100644
--- a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansible/AnsibleWorker.java
+++ b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansible/AnsibleWorker.java
@@ -1,14 +1,12 @@
-package org.gcube.dataanalysys.dataminerpoolmanager.ansible;
+package org.gcube.dataanalysis.dataminer.poolmanager.ansible;
import java.io.File;
***REMOVED***
-import java.util.UUID;
-import org.gcube.dataanalysys.dataminerpoolmanager.ansible.model.Inventory;
-import org.gcube.dataanalysys.dataminerpoolmanager.ansible.model.Playbook;
-import org.gcube.dataanalysys.dataminerpoolmanager.ansible.model.Role;
-import org.gcube.dataanalysys.dataminerpoolmanager.ansible.model.RoleFile;
-import org.gcube.dataanalysys.dataminerpoolmanager.ansiblebridge.AnsibleSerializeHelper;
+import org.gcube.dataanalysis.dataminer.poolmanager.ansible.model.Inventory;
+import org.gcube.dataanalysis.dataminer.poolmanager.ansible.model.Playbook;
+import org.gcube.dataanalysis.dataminer.poolmanager.ansible.model.Role;
+import org.gcube.dataanalysis.dataminer.poolmanager.ansiblebridge.AnsibleSerializeHelper;
/**
* This class is responsible for the interface with ansible, retrieving log,
@@ -45,11 +43,11 @@ public class AnsibleWorker {
this.ensureWorkStructure();
***REMOVED***
- private File getWorkdir() {
+ public File getWorkdir() {
return this.workerRoot;
***REMOVED***
- private File getRolesDir() {
+ public File getRolesDir() {
return new File(this.getWorkdir(), ROLES_DIR);
***REMOVED***
@@ -57,12 +55,12 @@ public class AnsibleWorker {
return this.workerRoot.getName();
***REMOVED***
- private void ensureWorkStructure() {
+ public void ensureWorkStructure() {
***REMOVED*** generate root
this.getWorkdir().mkdirs();
***REMOVED***
- private void removeWorkStructure() {
+ public void removeWorkStructure() {
***REMOVED*** remove the working dir
***REMOVED*** this.getWorkdir().delete();
***REMOVED***
@@ -91,6 +89,8 @@ public class AnsibleWorker {
AnsibleSerializeHelper.serializeRole(r, this.getRolesDir());
***REMOVED***
+
+
public void apply() {
***REMOVED*** TODO execute the playbook and return output
System.out.println("TODO: execute: ansible-playbook -v -i " + this.getInventoryFile().getName() + " " + this.getPlaybookFile().getName());
diff --git a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansible/model/AnsibleHost.java b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansible/model/AnsibleHost.java
similarity index 80%
rename from src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansible/model/AnsibleHost.java
rename to src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansible/model/AnsibleHost.java
index b06a004..5b318f3 100644
--- a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansible/model/AnsibleHost.java
+++ b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansible/model/AnsibleHost.java
@@ -1,4 +1,4 @@
-package org.gcube.dataanalysys.dataminerpoolmanager.ansible.model;
+package org.gcube.dataanalysis.dataminer.poolmanager.ansible.model;
public class AnsibleHost {
diff --git a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansible/model/HostGroup.java b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansible/model/HostGroup.java
similarity index 88%
rename from src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansible/model/HostGroup.java
rename to src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansible/model/HostGroup.java
index 40465d7..c1b5852 100644
--- a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansible/model/HostGroup.java
+++ b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansible/model/HostGroup.java
@@ -1,4 +1,4 @@
-package org.gcube.dataanalysys.dataminerpoolmanager.ansible.model;
+package org.gcube.dataanalysis.dataminer.poolmanager.ansible.model;
import java.util.Collection;
import java.util.Vector;
diff --git a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansible/model/Inventory.java b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansible/model/Inventory.java
similarity index 92%
rename from src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansible/model/Inventory.java
rename to src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansible/model/Inventory.java
index b286df1..351bc22 100644
--- a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansible/model/Inventory.java
+++ b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansible/model/Inventory.java
@@ -1,4 +1,4 @@
-package org.gcube.dataanalysys.dataminerpoolmanager.ansible.model;
+package org.gcube.dataanalysis.dataminer.poolmanager.ansible.model;
import java.util.Collection;
import java.util.Vector;
diff --git a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansible/model/Playbook.java b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansible/model/Playbook.java
similarity index 89%
rename from src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansible/model/Playbook.java
rename to src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansible/model/Playbook.java
index 2241e09..eeec135 100644
--- a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansible/model/Playbook.java
+++ b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansible/model/Playbook.java
@@ -1,4 +1,4 @@
-package org.gcube.dataanalysys.dataminerpoolmanager.ansible.model;
+package org.gcube.dataanalysis.dataminer.poolmanager.ansible.model;
***REMOVED***
import java.util.Vector;
diff --git a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansible/model/Role.java b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansible/model/Role.java
similarity index 93%
rename from src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansible/model/Role.java
rename to src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansible/model/Role.java
index efe4dad..1a4c899 100644
--- a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansible/model/Role.java
+++ b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansible/model/Role.java
@@ -1,4 +1,4 @@
-package org.gcube.dataanalysys.dataminerpoolmanager.ansible.model;
+package org.gcube.dataanalysis.dataminer.poolmanager.ansible.model;
import java.util.Collection;
import java.util.Vector;
diff --git a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansible/model/RoleFile.java b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansible/model/RoleFile.java
similarity index 92%
rename from src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansible/model/RoleFile.java
rename to src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansible/model/RoleFile.java
index 257c806..963a46d 100644
--- a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansible/model/RoleFile.java
+++ b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansible/model/RoleFile.java
@@ -1,4 +1,4 @@
-package org.gcube.dataanalysys.dataminerpoolmanager.ansible.model;
+package org.gcube.dataanalysis.dataminer.poolmanager.ansible.model;
public class RoleFile {
diff --git a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansiblebridge/AnsibleBridge.java b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/AnsibleBridge.java
similarity index 71%
rename from src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansiblebridge/AnsibleBridge.java
rename to src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/AnsibleBridge.java
index f9ef789..da1fcac 100644
--- a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansiblebridge/AnsibleBridge.java
+++ b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/AnsibleBridge.java
@@ -1,7 +1,9 @@
-package org.gcube.dataanalysys.dataminerpoolmanager.ansiblebridge;
+package org.gcube.dataanalysis.dataminer.poolmanager.ansiblebridge;
import java.io.File;
+import java.io.FileOutputStream;
***REMOVED***
+import java.io.PrintStream;
import java.util.Collection;
***REMOVED***
import java.util.Map;
@@ -11,38 +13,37 @@ import java.util.TreeSet;
import java.util.UUID;
import java.util.Vector;
-import org.gcube.dataanalysys.dataminerpoolmanager.ansible.AnsibleWorker;
-import org.gcube.dataanalysys.dataminerpoolmanager.ansible.model.AnsibleHost;
-import org.gcube.dataanalysys.dataminerpoolmanager.ansible.model.Inventory;
-import org.gcube.dataanalysys.dataminerpoolmanager.ansible.model.Playbook;
-import org.gcube.dataanalysys.dataminerpoolmanager.ansible.model.Role;
-import org.gcube.dataanalysys.dataminerpoolmanager.ansible.model.RoleFile;
-import org.gcube.dataanalysys.dataminerpoolmanager.ansiblebridge.template.AlgorithmPackage;
-import org.gcube.dataanalysys.dataminerpoolmanager.ansiblebridge.template.CranDependencyPackage;
-import org.gcube.dataanalysys.dataminerpoolmanager.ansiblebridge.template.CustomDependencyPackage;
-import org.gcube.dataanalysys.dataminerpoolmanager.ansiblebridge.template.CustomRoleManager;
-import org.gcube.dataanalysys.dataminerpoolmanager.ansiblebridge.template.DependencyPackage;
-import org.gcube.dataanalysys.dataminerpoolmanager.ansiblebridge.template.OSDependencyPackage;
-import org.gcube.dataanalysys.dataminerpoolmanager.ansiblebridge.template.StaticRoleManager;
-import org.gcube.dataanalysys.dataminerpoolmanager.ansiblebridge.template.TemplateManager;
-import org.gcube.dataanalysys.dataminerpoolmanager.datamodel.Algorithm;
-import org.gcube.dataanalysys.dataminerpoolmanager.datamodel.AlgorithmSet;
-import org.gcube.dataanalysys.dataminerpoolmanager.datamodel.Cluster;
-import org.gcube.dataanalysys.dataminerpoolmanager.datamodel.Dependency;
-import org.gcube.dataanalysys.dataminerpoolmanager.datamodel.Host;
-import org.gcube.dataanalysys.dataminerpoolmanager.datamodel.comparator.AlgorithmComparator;
-import org.gcube.dataanalysys.dataminerpoolmanager.datamodel.comparator.DependencyComparator;
-import org.gcube.dataanalysys.dataminerpoolmanager.datamodel.comparator.HostComparator;
+import org.gcube.dataanalysis.dataminer.poolmanager.ansible.AnsibleWorker;
+import org.gcube.dataanalysis.dataminer.poolmanager.ansible.model.AnsibleHost;
+import org.gcube.dataanalysis.dataminer.poolmanager.ansible.model.Inventory;
+import org.gcube.dataanalysis.dataminer.poolmanager.ansible.model.Playbook;
+import org.gcube.dataanalysis.dataminer.poolmanager.ansible.model.Role;
+import org.gcube.dataanalysis.dataminer.poolmanager.ansiblebridge.template.AlgorithmPackage;
+import org.gcube.dataanalysis.dataminer.poolmanager.ansiblebridge.template.CranDependencyPackage;
+import org.gcube.dataanalysis.dataminer.poolmanager.ansiblebridge.template.CustomDependencyPackage;
+import org.gcube.dataanalysis.dataminer.poolmanager.ansiblebridge.template.CustomRoleManager;
+import org.gcube.dataanalysis.dataminer.poolmanager.ansiblebridge.template.OSDependencyPackage;
+import org.gcube.dataanalysis.dataminer.poolmanager.ansiblebridge.template.StaticRoleManager;
+import org.gcube.dataanalysis.dataminer.poolmanager.ansiblebridge.template.TemplateManager;
+import org.gcube.dataanalysis.dataminer.poolmanager.datamodel.Algorithm;
+import org.gcube.dataanalysis.dataminer.poolmanager.datamodel.AlgorithmSet;
+***REMOVED***
+import org.gcube.dataanalysis.dataminer.poolmanager.datamodel.Dependency;
+***REMOVED***
+import org.gcube.dataanalysis.dataminer.poolmanager.datamodel.comparator.HostComparator;
+***REMOVED***
public class AnsibleBridge {
+ private static final org.slf4j.Logger LOGGER = LoggerFactory.getLogger(AnsibleBridge.class);
+
/**
* The workdir for this service
*/
private String dpmRoot;
public AnsibleBridge() {
- this("/home/paolo/tmp/dataminer-pool-manager");
+ this("/tmp/dataminer-pool-manager");
***REMOVED***
public AnsibleBridge(String root) {
@@ -142,9 +143,16 @@ public class AnsibleBridge {
***REMOVED***
***REMOVED***
- public void applyAlgorithmSetToCluster(AlgorithmSet as, Cluster cluster) throws IOException {
- AnsibleWorker worker = new AnsibleWorker(new File(this.getWorkDir(), UUID.randomUUID().toString()));
+ public AnsibleWorker applyAlgorithmSetToCluster(AlgorithmSet as, Cluster cluster) throws IOException {
+
+
+ return applyAlgorithmSetToCluster (as,cluster,UUID.randomUUID().toString());
+ ***REMOVED***
+
+ public AnsibleWorker applyAlgorithmSetToCluster(AlgorithmSet as, Cluster cluster,String uuid) throws IOException {
+ AnsibleWorker worker = new AnsibleWorker(new File(this.getWorkDir(), uuid));
+
List algoRoles = new Vector<>();
***REMOVED*** add algorithms and dependencies to the worker
@@ -186,14 +194,26 @@ public class AnsibleBridge {
worker.setPlaybook(playbook);
- ***REMOVED*** execute
- worker.apply();
-
+ ***REMOVED*** execute and save log locally
+ PrintStream console = System.out;
+ File path = new File(worker.getWorkdir() + File.separator + "logs");
+ path.mkdirs();
+ File n = new File(path + File.separator + worker.getWorkerId());
+ FileOutputStream fos = new FileOutputStream(n);
+ PrintStream ps = new PrintStream(fos);
+ System.setOut(ps);
+ worker.apply();
+ System.setOut(console);
+ worker.apply();
+ System.out.println("Log stored to to " + n.getAbsolutePath());
+
***REMOVED*** destroy the worker
worker.destroy();
-
+ return worker;
***REMOVED***
+
+
private TemplateManager getTemplateManager() {
return new TemplateManager(this.dpmRoot+"/templates");
***REMOVED***
diff --git a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansiblebridge/AnsibleSerializeHelper.java b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/AnsibleSerializeHelper.java
similarity index 86%
rename from src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansiblebridge/AnsibleSerializeHelper.java
rename to src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/AnsibleSerializeHelper.java
index 3c6736f..0cda968 100644
--- a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansiblebridge/AnsibleSerializeHelper.java
+++ b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/AnsibleSerializeHelper.java
@@ -1,4 +1,4 @@
-package org.gcube.dataanalysys.dataminerpoolmanager.ansiblebridge;
+package org.gcube.dataanalysis.dataminer.poolmanager.ansiblebridge;
import java.io.File;
import java.io.FileInputStream;
@@ -7,12 +7,12 @@ import java.io.FileNotFoundException;
import java.io.PrintWriter;
import org.apache.commons.io.IOUtils;
-import org.gcube.dataanalysys.dataminerpoolmanager.ansible.model.AnsibleHost;
-import org.gcube.dataanalysys.dataminerpoolmanager.ansible.model.HostGroup;
-import org.gcube.dataanalysys.dataminerpoolmanager.ansible.model.Inventory;
-import org.gcube.dataanalysys.dataminerpoolmanager.ansible.model.Playbook;
-import org.gcube.dataanalysys.dataminerpoolmanager.ansible.model.Role;
-import org.gcube.dataanalysys.dataminerpoolmanager.ansible.model.RoleFile;
+import org.gcube.dataanalysis.dataminer.poolmanager.ansible.model.AnsibleHost;
+import org.gcube.dataanalysis.dataminer.poolmanager.ansible.model.HostGroup;
+import org.gcube.dataanalysis.dataminer.poolmanager.ansible.model.Inventory;
+import org.gcube.dataanalysis.dataminer.poolmanager.ansible.model.Playbook;
+import org.gcube.dataanalysis.dataminer.poolmanager.ansible.model.Role;
+import org.gcube.dataanalysis.dataminer.poolmanager.ansible.model.RoleFile;
public class AnsibleSerializeHelper {
diff --git a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansiblebridge/template/AlgorithmPackage.java b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/template/AlgorithmPackage.java
similarity index 85%
rename from src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansiblebridge/template/AlgorithmPackage.java
rename to src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/template/AlgorithmPackage.java
index 3f83c95..78bdae9 100644
--- a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansiblebridge/template/AlgorithmPackage.java
+++ b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/template/AlgorithmPackage.java
@@ -1,4 +1,4 @@
-package org.gcube.dataanalysys.dataminerpoolmanager.ansiblebridge.template;
+package org.gcube.dataanalysis.dataminer.poolmanager.ansiblebridge.template;
import java.util.Collection;
import java.util.HashMap;
@@ -6,10 +6,9 @@ import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Vector;
-import org.gcube.dataanalysys.dataminerpoolmanager.ansible.model.Role;
-import org.gcube.dataanalysys.dataminerpoolmanager.ansible.model.RoleFile;
-import org.gcube.dataanalysys.dataminerpoolmanager.datamodel.Algorithm;
-import org.gcube.dataanalysys.dataminerpoolmanager.datamodel.Dependency;
+import org.gcube.dataanalysis.dataminer.poolmanager.ansible.model.Role;
+import org.gcube.dataanalysis.dataminer.poolmanager.datamodel.Algorithm;
+import org.gcube.dataanalysis.dataminer.poolmanager.datamodel.Dependency;
public class AlgorithmPackage {
diff --git a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansiblebridge/template/CranDependencyPackage.java b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/template/CranDependencyPackage.java
similarity index 51%
rename from src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansiblebridge/template/CranDependencyPackage.java
rename to src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/template/CranDependencyPackage.java
index eec3647..48e4c64 100644
--- a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansiblebridge/template/CranDependencyPackage.java
+++ b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/template/CranDependencyPackage.java
@@ -1,6 +1,6 @@
-package org.gcube.dataanalysys.dataminerpoolmanager.ansiblebridge.template;
+package org.gcube.dataanalysis.dataminer.poolmanager.ansiblebridge.template;
-import org.gcube.dataanalysys.dataminerpoolmanager.datamodel.Dependency;
+import org.gcube.dataanalysis.dataminer.poolmanager.datamodel.Dependency;
public class CranDependencyPackage extends DependencyPackage {
diff --git a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansiblebridge/template/CustomDependencyPackage.java b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/template/CustomDependencyPackage.java
similarity index 90%
rename from src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansiblebridge/template/CustomDependencyPackage.java
rename to src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/template/CustomDependencyPackage.java
index 4818389..466c688 100644
--- a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansiblebridge/template/CustomDependencyPackage.java
+++ b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/template/CustomDependencyPackage.java
@@ -1,11 +1,11 @@
-package org.gcube.dataanalysys.dataminerpoolmanager.ansiblebridge.template;
+package org.gcube.dataanalysis.dataminer.poolmanager.ansiblebridge.template;
import java.util.Collection;
import java.util.NoSuchElementException;
import java.util.Vector;
-import org.gcube.dataanalysys.dataminerpoolmanager.ansible.model.Role;
-import org.gcube.dataanalysys.dataminerpoolmanager.datamodel.Dependency;
+import org.gcube.dataanalysis.dataminer.poolmanager.ansible.model.Role;
+import org.gcube.dataanalysis.dataminer.poolmanager.datamodel.Dependency;
public class CustomDependencyPackage extends DependencyPackage {
diff --git a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansiblebridge/template/CustomRoleManager.java b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/template/CustomRoleManager.java
similarity index 61%
rename from src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansiblebridge/template/CustomRoleManager.java
rename to src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/template/CustomRoleManager.java
index 3b6c966..8f583c0 100644
--- a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansiblebridge/template/CustomRoleManager.java
+++ b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/template/CustomRoleManager.java
@@ -1,16 +1,11 @@
-package org.gcube.dataanalysys.dataminerpoolmanager.ansiblebridge.template;
+package org.gcube.dataanalysis.dataminer.poolmanager.ansiblebridge.template;
import java.io.File;
-import java.io.FileInputStream;
***REMOVED***
-import java.util.Collection;
import java.util.NoSuchElementException;
-import java.util.Vector;
-import org.apache.commons.io.IOUtils;
-import org.gcube.dataanalysys.dataminerpoolmanager.ansible.model.Role;
-import org.gcube.dataanalysys.dataminerpoolmanager.ansible.model.RoleFile;
-import org.gcube.dataanalysys.dataminerpoolmanager.ansiblebridge.AnsibleSerializeHelper;
+import org.gcube.dataanalysis.dataminer.poolmanager.ansible.model.Role;
+import org.gcube.dataanalysis.dataminer.poolmanager.ansiblebridge.AnsibleSerializeHelper;
public class CustomRoleManager {
diff --git a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansiblebridge/template/DependencyPackage.java b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/template/DependencyPackage.java
similarity index 85%
rename from src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansiblebridge/template/DependencyPackage.java
rename to src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/template/DependencyPackage.java
index abd59dd..fd28947 100644
--- a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansiblebridge/template/DependencyPackage.java
+++ b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/template/DependencyPackage.java
@@ -1,4 +1,4 @@
-package org.gcube.dataanalysys.dataminerpoolmanager.ansiblebridge.template;
+package org.gcube.dataanalysis.dataminer.poolmanager.ansiblebridge.template;
import java.util.Collection;
import java.util.HashMap;
@@ -6,9 +6,8 @@ import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Vector;
-import org.gcube.dataanalysys.dataminerpoolmanager.ansible.model.Role;
-import org.gcube.dataanalysys.dataminerpoolmanager.ansible.model.RoleFile;
-import org.gcube.dataanalysys.dataminerpoolmanager.datamodel.Dependency;
+import org.gcube.dataanalysis.dataminer.poolmanager.ansible.model.Role;
+import org.gcube.dataanalysis.dataminer.poolmanager.datamodel.Dependency;
public class DependencyPackage {
diff --git a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansiblebridge/template/OSDependencyPackage.java b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/template/OSDependencyPackage.java
similarity index 50%
rename from src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansiblebridge/template/OSDependencyPackage.java
rename to src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/template/OSDependencyPackage.java
index a352495..6c93efd 100644
--- a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansiblebridge/template/OSDependencyPackage.java
+++ b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/template/OSDependencyPackage.java
@@ -1,6 +1,6 @@
-package org.gcube.dataanalysys.dataminerpoolmanager.ansiblebridge.template;
+package org.gcube.dataanalysis.dataminer.poolmanager.ansiblebridge.template;
-import org.gcube.dataanalysys.dataminerpoolmanager.datamodel.Dependency;
+import org.gcube.dataanalysis.dataminer.poolmanager.datamodel.Dependency;
public class OSDependencyPackage extends DependencyPackage {
diff --git a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansiblebridge/template/StaticRoleManager.java b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/template/StaticRoleManager.java
similarity index 75%
rename from src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansiblebridge/template/StaticRoleManager.java
rename to src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/template/StaticRoleManager.java
index 45e029b..2dc24c1 100644
--- a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansiblebridge/template/StaticRoleManager.java
+++ b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/template/StaticRoleManager.java
@@ -1,12 +1,12 @@
-package org.gcube.dataanalysys.dataminerpoolmanager.ansiblebridge.template;
+package org.gcube.dataanalysis.dataminer.poolmanager.ansiblebridge.template;
import java.io.File;
***REMOVED***
import java.util.Collection;
import java.util.Vector;
-import org.gcube.dataanalysys.dataminerpoolmanager.ansible.model.Role;
-import org.gcube.dataanalysys.dataminerpoolmanager.ansiblebridge.AnsibleSerializeHelper;
+import org.gcube.dataanalysis.dataminer.poolmanager.ansible.model.Role;
+import org.gcube.dataanalysis.dataminer.poolmanager.ansiblebridge.AnsibleSerializeHelper;
public class StaticRoleManager {
diff --git a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansiblebridge/template/TemplateManager.java b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/template/TemplateManager.java
similarity index 85%
rename from src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansiblebridge/template/TemplateManager.java
rename to src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/template/TemplateManager.java
index 8325eed..997b42a 100644
--- a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansiblebridge/template/TemplateManager.java
+++ b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/template/TemplateManager.java
@@ -1,17 +1,13 @@
-package org.gcube.dataanalysys.dataminerpoolmanager.ansiblebridge.template;
+package org.gcube.dataanalysis.dataminer.poolmanager.ansiblebridge.template;
import java.io.File;
-import java.io.FileInputStream;
***REMOVED***
-import java.util.HashMap;
import java.util.Map;
import java.util.NoSuchElementException;
-import org.apache.commons.io.IOUtils;
-import org.gcube.dataanalysys.dataminerpoolmanager.ansible.model.Role;
-import org.gcube.dataanalysys.dataminerpoolmanager.ansible.model.RoleFile;
-import org.gcube.dataanalysys.dataminerpoolmanager.ansiblebridge.AnsibleSerializeHelper;
-import org.gcube.dataanalysys.dataminerpoolmanager.datamodel.Dependency;
+import org.gcube.dataanalysis.dataminer.poolmanager.ansible.model.Role;
+import org.gcube.dataanalysis.dataminer.poolmanager.ansible.model.RoleFile;
+import org.gcube.dataanalysis.dataminer.poolmanager.ansiblebridge.AnsibleSerializeHelper;
import org.stringtemplate.v4.ST;
public class TemplateManager {
diff --git a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/clients/ISClient.java b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/clients/ISClient.java
similarity index 88%
rename from src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/clients/ISClient.java
rename to src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/clients/ISClient.java
index 5221abe..0268eed 100644
--- a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/clients/ISClient.java
+++ b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/clients/ISClient.java
@@ -1,4 +1,4 @@
-package org.gcube.dataanalysys.dataminerpoolmanager.clients;
+***REMOVED***
import static org.gcube.resources.discovery.icclient.ICFactory.clientFor;
import static org.gcube.resources.discovery.icclient.ICFactory.queryFor;
@@ -9,8 +9,6 @@ import java.util.Vector;
import org.gcube.common.resources.gcore.ServiceEndpoint;
***REMOVED***
-import org.gcube.dataanalysys.dataminerpoolmanager.datamodel.Cluster;
-import org.gcube.dataanalysys.dataminerpoolmanager.datamodel.Host;
import org.gcube.resources.discovery.client.api.DiscoveryClient;
import org.gcube.resources.discovery.client.queries.api.SimpleQuery;
diff --git a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/datamodel/Action.java b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/Action.java
similarity index 90%
rename from src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/datamodel/Action.java
rename to src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/Action.java
index 8960c49..5c69bdf 100644
--- a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/datamodel/Action.java
+++ b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/Action.java
@@ -1,4 +1,4 @@
-package org.gcube.dataanalysys.dataminerpoolmanager.datamodel;
+package org.gcube.dataanalysis.dataminer.poolmanager.datamodel;
public class Action {
diff --git a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/datamodel/Algorithm.java b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/Algorithm.java
similarity index 97%
rename from src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/datamodel/Algorithm.java
rename to src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/Algorithm.java
index 5348998..334873f 100644
--- a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/datamodel/Algorithm.java
+++ b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/Algorithm.java
@@ -1,4 +1,4 @@
-package org.gcube.dataanalysys.dataminerpoolmanager.datamodel;
+package org.gcube.dataanalysis.dataminer.poolmanager.datamodel;
import java.util.Collection;
import java.util.Vector;
diff --git a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/datamodel/AlgorithmSet.java b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/AlgorithmSet.java
similarity index 94%
rename from src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/datamodel/AlgorithmSet.java
rename to src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/AlgorithmSet.java
index e505f7a..4a5bf3f 100644
--- a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/datamodel/AlgorithmSet.java
+++ b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/AlgorithmSet.java
@@ -1,4 +1,4 @@
-package org.gcube.dataanalysys.dataminerpoolmanager.datamodel;
+package org.gcube.dataanalysis.dataminer.poolmanager.datamodel;
import java.util.Collection;
import java.util.Vector;
diff --git a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/datamodel/Cluster.java b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/Cluster.java
similarity index 95%
rename from src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/datamodel/Cluster.java
rename to src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/Cluster.java
index 0fd2bf7..9a704d9 100644
--- a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/datamodel/Cluster.java
+++ b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/Cluster.java
@@ -1,4 +1,4 @@
-package org.gcube.dataanalysys.dataminerpoolmanager.datamodel;
+package org.gcube.dataanalysis.dataminer.poolmanager.datamodel;
import java.util.Collection;
import java.util.Vector;
diff --git a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/datamodel/Dependency.java b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/Dependency.java
similarity index 87%
rename from src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/datamodel/Dependency.java
rename to src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/Dependency.java
index 14ebc5a..7c083ab 100644
--- a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/datamodel/Dependency.java
+++ b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/Dependency.java
@@ -1,4 +1,4 @@
-package org.gcube.dataanalysys.dataminerpoolmanager.datamodel;
+package org.gcube.dataanalysis.dataminer.poolmanager.datamodel;
public class Dependency {
diff --git a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/datamodel/Domain.java b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/Domain.java
similarity index 75%
rename from src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/datamodel/Domain.java
rename to src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/Domain.java
index 2652044..b8e55ae 100644
--- a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/datamodel/Domain.java
+++ b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/Domain.java
@@ -1,4 +1,4 @@
-package org.gcube.dataanalysys.dataminerpoolmanager.datamodel;
+package org.gcube.dataanalysis.dataminer.poolmanager.datamodel;
public class Domain {
diff --git a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/datamodel/Host.java b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/Host.java
similarity index 91%
rename from src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/datamodel/Host.java
rename to src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/Host.java
index a8a817a..50f22fe 100644
--- a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/datamodel/Host.java
+++ b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/Host.java
@@ -1,4 +1,4 @@
-package org.gcube.dataanalysys.dataminerpoolmanager.datamodel;
+package org.gcube.dataanalysis.dataminer.poolmanager.datamodel;
public class Host {
diff --git a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/datamodel/comparator/AlgorithmComparator.java b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/comparator/AlgorithmComparator.java
similarity index 62%
rename from src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/datamodel/comparator/AlgorithmComparator.java
rename to src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/comparator/AlgorithmComparator.java
index e56dcef..41eb913 100644
--- a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/datamodel/comparator/AlgorithmComparator.java
+++ b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/comparator/AlgorithmComparator.java
@@ -1,8 +1,8 @@
-package org.gcube.dataanalysys.dataminerpoolmanager.datamodel.comparator;
+package org.gcube.dataanalysis.dataminer.poolmanager.datamodel.comparator;
import java.util.Comparator;
-import org.gcube.dataanalysys.dataminerpoolmanager.datamodel.Algorithm;
+import org.gcube.dataanalysis.dataminer.poolmanager.datamodel.Algorithm;
public class AlgorithmComparator implements Comparator {
diff --git a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/datamodel/comparator/DependencyComparator.java b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/comparator/DependencyComparator.java
similarity index 60%
rename from src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/datamodel/comparator/DependencyComparator.java
rename to src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/comparator/DependencyComparator.java
index 116794e..a5ff1e1 100644
--- a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/datamodel/comparator/DependencyComparator.java
+++ b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/comparator/DependencyComparator.java
@@ -1,9 +1,8 @@
-package org.gcube.dataanalysys.dataminerpoolmanager.datamodel.comparator;
+package org.gcube.dataanalysis.dataminer.poolmanager.datamodel.comparator;
import java.util.Comparator;
-import org.gcube.dataanalysys.dataminerpoolmanager.datamodel.Algorithm;
-import org.gcube.dataanalysys.dataminerpoolmanager.datamodel.Dependency;
+import org.gcube.dataanalysis.dataminer.poolmanager.datamodel.Dependency;
public class DependencyComparator implements Comparator {
diff --git a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/datamodel/comparator/HostComparator.java b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/comparator/HostComparator.java
similarity index 70%
rename from src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/datamodel/comparator/HostComparator.java
rename to src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/comparator/HostComparator.java
index b1e8d22..0d27a62 100644
--- a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/datamodel/comparator/HostComparator.java
+++ b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/comparator/HostComparator.java
@@ -1,8 +1,8 @@
-package org.gcube.dataanalysys.dataminerpoolmanager.datamodel.comparator;
+package org.gcube.dataanalysis.dataminer.poolmanager.datamodel.comparator;
import java.util.Comparator;
-import org.gcube.dataanalysys.dataminerpoolmanager.datamodel.Host;
+***REMOVED***
public class HostComparator implements Comparator {
diff --git a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/process/AddAlgorithmCommand.java b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/process/AddAlgorithmCommand.java
similarity index 97%
rename from src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/process/AddAlgorithmCommand.java
rename to src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/process/AddAlgorithmCommand.java
index dc8df9d..39a4f88 100644
--- a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/process/AddAlgorithmCommand.java
+++ b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/process/AddAlgorithmCommand.java
@@ -1,4 +1,4 @@
-package org.gcube.dataanalysys.dataminerpoolmanager.process;
+package org.gcube.dataanalysis.dataminer.poolmanager.process;
import java.util.StringTokenizer;
diff --git a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/process/AlgorithmPackageParser.java b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/process/AlgorithmPackageParser.java
similarity index 96%
rename from src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/process/AlgorithmPackageParser.java
rename to src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/process/AlgorithmPackageParser.java
index 71ebd29..41f4b47 100644
--- a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/process/AlgorithmPackageParser.java
+++ b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/process/AlgorithmPackageParser.java
@@ -1,4 +1,4 @@
-package org.gcube.dataanalysys.dataminerpoolmanager.process;
+package org.gcube.dataanalysis.dataminer.poolmanager.process;
***REMOVED***
import java.io.InputStream;
@@ -10,8 +10,8 @@ import java.util.Vector;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
-import org.gcube.dataanalysys.dataminerpoolmanager.datamodel.Algorithm;
-import org.gcube.dataanalysys.dataminerpoolmanager.datamodel.Dependency;
+import org.gcube.dataanalysis.dataminer.poolmanager.datamodel.Algorithm;
+import org.gcube.dataanalysis.dataminer.poolmanager.datamodel.Dependency;
public class AlgorithmPackageParser {
diff --git a/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/rest/PoolManager.java b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/rest/PoolManager.java
new file mode 100644
index 0000000..cafe8f5
--- /dev/null
+++ b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/rest/PoolManager.java
@@ -0,0 +1,24 @@
+package org.gcube.dataanalysis.dataminer.poolmanager.rest;
+
+***REMOVED***
+import java.net.MalformedURLException;
+***REMOVED***
+import java.net.UnknownHostException;
+
+import org.gcube.dataanalysis.dataminer.poolmanager.datamodel.Algorithm;
+
+public interface PoolManager {
+
+ String addAlgorithmToVRE(Algorithm algo, String vre) throws IOException, InterruptedException;
+
+ Algorithm extractAlgorithm(String url) throws IOException;
+
+ String getLogById(String logId) throws IOException;
+
+ void getLogId(Algorithm algo, String vre);
+
+ String getScriptFromURL(URL logId) throws IOException;
+
+ URL getURLfromWorkerLog(String logUrl) throws MalformedURLException, UnknownHostException;
+
+***REMOVED***
diff --git a/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/rest/RestPoolManager.java b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/rest/RestPoolManager.java
new file mode 100644
index 0000000..56916f7
--- /dev/null
+++ b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/rest/RestPoolManager.java
@@ -0,0 +1,101 @@
+package org.gcube.dataanalysis.dataminer.poolmanager.rest;
+
+***REMOVED***
+import java.net.MalformedURLException;
+***REMOVED***
+import java.net.UnknownHostException;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+
+import org.gcube.dataanalysis.dataminer.poolmanager.datamodel.Algorithm;
+import org.gcube.dataanalysis.dataminer.poolmanager.service.DataminerPoolManager;
+***REMOVED***
+***REMOVED***
+
+
+@Path("/")
+public class RestPoolManager implements PoolManager {
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(RestPoolManager.class);
+
+ private PoolManager service = new DataminerPoolManager();
+
+
+ @GET
+ @Path("/add")
+ @Produces("text/plain")
+ public String addAlgorithmToVRE(@QueryParam("algorithm") String algorithm, @QueryParam("vre") String vre) throws IOException, InterruptedException {
+ ***REMOVED*** TODO Auto-generated method stub
+ LOGGER.debug("Adding algorithm =" + algorithm + " to VRE =" + vre);
+ Algorithm algo = service.extractAlgorithm(algorithm);
+ return service.addAlgorithmToVRE(algo, vre);
+***REMOVED***
+
+
+ @GET
+ @Path("/log")
+ @Produces("text/plain")
+ public String getLogById(@QueryParam("logUrl") String logUrl) throws IOException {
+ ***REMOVED*** TODO Auto-generated method stub
+ LOGGER.debug("Returning Log =" + logUrl);
+ return service.getScriptFromURL(service.getURLfromWorkerLog(logUrl));
+***REMOVED***
+
+
+
+
+
+ @Override
+ public Algorithm extractAlgorithm(String url) throws IOException {
+ ***REMOVED*** TODO Auto-generated method stub
+ return null;
+***REMOVED***
+
+
+ public static void main(String[] args) throws IOException, InterruptedException {
+ RestPoolManager a = new RestPoolManager();
+ a.addAlgorithmToVRE("http:***REMOVED***data.d4science.org/R0FqV2lNOW1jMkxuUEIrWXY4aUhvSENHSmVMQks4NjdHbWJQNStIS0N6Yz0", "/gcube/devNext/NextNext");
+ ***REMOVED***System.out.println(a.getLogById("dadcb059-69e5-48c3-aa58-3b290ae0419d"));
+***REMOVED***
+
+
+ @Override
+ public void getLogId(Algorithm algo, String vre) {
+ ***REMOVED*** TODO Auto-generated method stub
+
+***REMOVED***
+
+
+ @Override
+ public String getScriptFromURL(URL logId) throws IOException {
+ ***REMOVED*** TODO Auto-generated method stub
+ return null;
+***REMOVED***
+
+
+ @Override
+ public String addAlgorithmToVRE(Algorithm algo, String vre) throws IOException, InterruptedException {
+ ***REMOVED*** TODO Auto-generated method stub
+ return null;
+***REMOVED***
+
+
+ @Override
+ public URL getURLfromWorkerLog(String logUrl) throws MalformedURLException, UnknownHostException {
+ ***REMOVED*** TODO Auto-generated method stub
+ return null;
+***REMOVED***
+
+
+
+
+
+
+
+
+
+
+***REMOVED***
\ No newline at end of file
diff --git a/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/service/DataminerPoolManager.java b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/service/DataminerPoolManager.java
new file mode 100644
index 0000000..43e833d
--- /dev/null
+++ b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/service/DataminerPoolManager.java
@@ -0,0 +1,265 @@
+package org.gcube.dataanalysis.dataminer.poolmanager.service;
+
+***REMOVED***
+import java.io.File;
+***REMOVED***
+***REMOVED***
+import java.net.MalformedURLException;
+***REMOVED***
+import java.net.URLConnection;
+import java.net.UnknownHostException;
+import java.util.UUID;
+
+import org.gcube.dataanalysis.dataminer.poolmanager.ansiblebridge.AnsibleBridge;
+import org.gcube.dataanalysis.dataminer.poolmanager.clients.ISClient;
+import org.gcube.dataanalysis.dataminer.poolmanager.datamodel.Algorithm;
+import org.gcube.dataanalysis.dataminer.poolmanager.datamodel.AlgorithmSet;
+***REMOVED***
+***REMOVED***
+import org.gcube.dataanalysis.dataminer.poolmanager.process.AlgorithmPackageParser;
+import org.gcube.dataanalysis.dataminer.poolmanager.rest.PoolManager;
+***REMOVED***
+***REMOVED***
+
+public class DataminerPoolManager implements PoolManager {
+
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(DataminerPoolManager.class);
+
+
+***REMOVED*** static Collection algorithms;
+***REMOVED***
+***REMOVED*** static Collection sets;
+***REMOVED***
+***REMOVED*** static {
+***REMOVED*** algorithms = new Vector<>();
+***REMOVED*** ***REMOVED***
+***REMOVED***
+***REMOVED*** public DataminerPoolManager() {
+***REMOVED*** ***REMOVED***
+***REMOVED***
+***REMOVED*** /**
+***REMOVED*** * Add a new algorithm to the set of known ones. No further action is expected
+***REMOVED*** * on the pool.
+***REMOVED*** */
+***REMOVED*** public void publishAlgorithm(Algorithm algorithm) {
+***REMOVED*** algorithms.add(algorithm);
+***REMOVED*** ***REMOVED***
+***REMOVED***
+***REMOVED*** /**
+***REMOVED*** * Re-deploy the given algorithm wherever it's installed
+***REMOVED*** *
+***REMOVED*** * @param algorithm
+***REMOVED*** */
+***REMOVED*** /*
+***REMOVED*** * public void updateAlgorithm(Algorithm algorithm) { ***REMOVED*** TODO implement this ***REMOVED***
+***REMOVED*** */
+***REMOVED***
+***REMOVED*** /**
+***REMOVED*** * Add the give algorithm to the given set
+***REMOVED*** *
+***REMOVED*** * @param algorithmId
+***REMOVED*** * @param setId
+***REMOVED*** */
+***REMOVED*** public void addAlgorithmToSet(String algorithmName, String setName) {
+***REMOVED*** AlgorithmSet set = this.getAlgorithmSet(setName);
+***REMOVED*** Algorithm algorithm = this.getAlgorithm(algorithmName);
+***REMOVED*** if (set != null && algorithm != null) {
+***REMOVED*** set.addAlgorithm(algorithm);
+***REMOVED*** this.updateClusters();
+***REMOVED*** ***REMOVED***
+***REMOVED*** ***REMOVED***
+***REMOVED***
+***REMOVED*** /**
+***REMOVED*** * Apply the given set of algorithms to the given cluster
+***REMOVED*** *
+***REMOVED*** * @param setId
+***REMOVED*** * @param clusterId
+***REMOVED*** */
+***REMOVED*** public void applyAlgorithmSetToCluster(String setName, String clusterName) {
+***REMOVED*** AlgorithmSet set = this.getAlgorithmSet(setName);
+***REMOVED*** Cluster cluster = new ISClient().getCluster(clusterName);
+***REMOVED*** if (set != null && cluster != null) {
+***REMOVED*** cluster.addAlgorithmSet(set);
+***REMOVED*** this.updateClusters();
+***REMOVED*** ***REMOVED***
+***REMOVED*** ***REMOVED***
+***REMOVED***
+***REMOVED*** private AlgorithmSet getAlgorithmSet(String name) {
+***REMOVED*** for (AlgorithmSet set : sets) {
+***REMOVED*** if (name.equals(set.getName())) {
+***REMOVED*** return set;
+***REMOVED*** ***REMOVED***
+***REMOVED*** ***REMOVED***
+***REMOVED*** return null;
+***REMOVED*** ***REMOVED***
+***REMOVED***
+***REMOVED*** private Algorithm getAlgorithm(String name) {
+***REMOVED*** for (Algorithm a : algorithms) {
+***REMOVED*** if (name.equals(a.getName())) {
+***REMOVED*** return a;
+***REMOVED*** ***REMOVED***
+***REMOVED*** ***REMOVED***
+***REMOVED*** return null;
+***REMOVED*** ***REMOVED***
+
+
+
+
+***REMOVED***
+***REMOVED*** public void getLogId(final Algorithm algorithm, final String vre) {
+***REMOVED*** new Thread() {
+***REMOVED*** public void run() {
+***REMOVED*** while (true) {
+***REMOVED*** try {
+***REMOVED*** addAlgorithmToVRE(algorithm, vre);
+***REMOVED*** ***REMOVED*** catch (Exception e) {
+***REMOVED*** ***REMOVED***log here
+***REMOVED*** ***REMOVED***
+***REMOVED*** ***REMOVED***
+***REMOVED*** ***REMOVED***
+***REMOVED*** ***REMOVED***.start();
+***REMOVED******REMOVED***
+***REMOVED***
+***REMOVED***
+
+***REMOVED*** public String getLogId(){
+***REMOVED*** PrintStream console = System.out;
+***REMOVED*** File path = new File(worker.getWorkdir() + File.separator + "logs");
+***REMOVED*** path.mkdirs();
+***REMOVED*** File n = new File(path + File.separator + worker.getWorkerId());
+***REMOVED*** FileOutputStream fos = new FileOutputStream(n);
+***REMOVED*** PrintStream ps = new PrintStream(fos);
+***REMOVED*** System.setOut(ps);
+***REMOVED*** worker.apply();
+***REMOVED*** System.setOut(console);
+***REMOVED*** worker.apply();
+***REMOVED*** System.out.println("Log stored to to " + n.getAbsolutePath());
+***REMOVED******REMOVED***
+
+
+
+
+***REMOVED*** public String getLogById(String id) throws IOException {
+***REMOVED*** String strLine = null;
+***REMOVED*** try{
+***REMOVED*** FileInputStream fstream = new FileInputStream("/tmp/dataminer-pool-manager/work/"+id+"/logs/"+id);
+***REMOVED*** BufferedReader br = new BufferedReader(new InputStreamReader(fstream));
+***REMOVED*** /* read log line by line */
+***REMOVED*** while ((strLine = br.readLine()) != null) {
+***REMOVED*** /* parse strLine to obtain what you want */
+***REMOVED*** System.out.println (strLine);
+***REMOVED*** ***REMOVED***
+***REMOVED*** br.close();
+***REMOVED*** ***REMOVED*** catch (Exception e) {
+***REMOVED*** System.err.println("Error: " + e.getMessage());
+***REMOVED*** ***REMOVED***
+***REMOVED*** return strLine;
+***REMOVED******REMOVED***
+
+
+ public String getScriptFromURL(URL url) throws IOException {
+ if (url == null) {
+ return null;
+ ***REMOVED***
+ URLConnection yc = url.openConnection();
+ BufferedReader input = new BufferedReader(new InputStreamReader(
+ yc.getInputStream()));
+ String line;
+ StringBuffer buffer = new StringBuffer();
+ while ((line = input.readLine()) != null) {
+ buffer.append(line + "\n");
+ ***REMOVED***
+ String bufferScript = buffer.substring(0, buffer.length());
+ input.close();
+ return bufferScript;
+ ***REMOVED***
+
+
+
+
+
+ /**
+ * Publish the given algorithm in the given VRE
+ *
+ * @param algorithmName
+ * @param vre
+ *
+ */
+ public String addAlgorithmToVRE(Algorithm algorithm, final String vre) throws IOException {
+ ***REMOVED*** create a fake algorithm set
+ final AlgorithmSet algoSet = new AlgorithmSet();
+ algoSet.setName("fake");
+ algoSet.addAlgorithm(algorithm);
+ final String uuid = UUID.randomUUID().toString();
+
+ Runnable r = new Runnable() {
+ @Override
+ public void run() {
+ ***REMOVED*** TODO Auto-generated method stub
+ try {
+ addAlgorithmsToVRE(algoSet, vre, uuid);
+ ***REMOVED*** catch (IOException e) {
+ ***REMOVED*** TODO Auto-generated catch block
+ e.printStackTrace();
+ ***REMOVED***
+ ***REMOVED***
+***REMOVED***;
+ new Thread(r).start();
+ ***REMOVED***this line will execute immediately, not waiting for your task to complete
+ System.out.println(uuid);
+ return uuid;
+ ***REMOVED***
+
+
+
+ public URL getURLfromWorkerLog(String a) throws MalformedURLException, UnknownHostException{
+
+ File path = new File("/tmp/dataminer-pool-manager/work/" + File.separator + a+File.separator +"logs");
+ path.mkdirs();
+ File n = new File(path + File.separator +a);
+
+ ***REMOVED***String addr = InetAddress.getLocalHost().getHostAddress();
+
+ return new File(n.getPath()).toURI().toURL();
+ ***REMOVED***
+
+
+ public String addAlgorithmsToVRE(AlgorithmSet algorithms, String vre, String uuid) throws IOException {
+
+ ***REMOVED*** create the cluster (dataminers in the vre)
+ Cluster cluster = new Cluster();
+ for(Host h:new ISClient().listDataminersInVRE()) {
+ cluster.addHost(h);
+ ***REMOVED***
+
+ ***REMOVED*** apply the changes
+ AnsibleBridge a = new AnsibleBridge();
+
+ return a.applyAlgorithmSetToCluster(algorithms, cluster,uuid).getWorkerId();
+
+ ***REMOVED***
+
+ public Algorithm extractAlgorithm(String url) throws IOException {
+ return new AlgorithmPackageParser().parsePackage(url);
+ ***REMOVED***
+
+
+@Override
+public void getLogId(Algorithm algo, String vre) {
+ ***REMOVED*** TODO Auto-generated method stub
+
+***REMOVED***
+
+
+@Override
+public String getLogById(String logId) throws IOException {
+ ***REMOVED*** TODO Auto-generated method stub
+ return null;
+***REMOVED***
+
+
+
+
+
+***REMOVED***
diff --git a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/util/PropertiesBasedProxySelector.java b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/util/PropertiesBasedProxySelector.java
similarity index 98%
rename from src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/util/PropertiesBasedProxySelector.java
rename to src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/util/PropertiesBasedProxySelector.java
index b558ed1..98118a3 100644
--- a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/util/PropertiesBasedProxySelector.java
+++ b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/util/PropertiesBasedProxySelector.java
@@ -1,4 +1,4 @@
-package org.gcube.dataanalysys.dataminerpoolmanager.util;
+package org.gcube.dataanalysis.dataminer.poolmanager.util;
***REMOVED***
import java.net.Authenticator;
diff --git a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/service/DataminerPoolManager.java b/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/service/DataminerPoolManager.java
deleted file mode 100644
index 8dd72ee..0000000
--- a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/service/DataminerPoolManager.java
+++ /dev/null
@@ -1,122 +0,0 @@
-package org.gcube.dataanalysys.dataminerpoolmanager.service;
-
-***REMOVED***
-import java.util.Collection;
-import java.util.Vector;
-
-import org.gcube.dataanalysys.dataminerpoolmanager.ansiblebridge.AnsibleBridge;
-import org.gcube.dataanalysys.dataminerpoolmanager.clients.ISClient;
-import org.gcube.dataanalysys.dataminerpoolmanager.datamodel.Algorithm;
-import org.gcube.dataanalysys.dataminerpoolmanager.datamodel.AlgorithmSet;
-import org.gcube.dataanalysys.dataminerpoolmanager.datamodel.Cluster;
-import org.gcube.dataanalysys.dataminerpoolmanager.datamodel.Dependency;
-import org.gcube.dataanalysys.dataminerpoolmanager.datamodel.Host;
-
-public class DataminerPoolManager {
-
-***REMOVED*** static Collection algorithms;
-***REMOVED***
-***REMOVED*** static Collection sets;
-***REMOVED***
-***REMOVED*** static {
-***REMOVED*** algorithms = new Vector<>();
-***REMOVED*** ***REMOVED***
-***REMOVED***
-***REMOVED*** public DataminerPoolManager() {
-***REMOVED*** ***REMOVED***
-***REMOVED***
-***REMOVED*** /**
-***REMOVED*** * Add a new algorithm to the set of known ones. No further action is expected
-***REMOVED*** * on the pool.
-***REMOVED*** */
-***REMOVED*** public void publishAlgorithm(Algorithm algorithm) {
-***REMOVED*** algorithms.add(algorithm);
-***REMOVED*** ***REMOVED***
-***REMOVED***
-***REMOVED*** /**
-***REMOVED*** * Re-deploy the given algorithm wherever it's installed
-***REMOVED*** *
-***REMOVED*** * @param algorithm
-***REMOVED*** */
-***REMOVED*** /*
-***REMOVED*** * public void updateAlgorithm(Algorithm algorithm) { ***REMOVED*** TODO implement this ***REMOVED***
-***REMOVED*** */
-***REMOVED***
-***REMOVED*** /**
-***REMOVED*** * Add the give algorithm to the given set
-***REMOVED*** *
-***REMOVED*** * @param algorithmId
-***REMOVED*** * @param setId
-***REMOVED*** */
-***REMOVED*** public void addAlgorithmToSet(String algorithmName, String setName) {
-***REMOVED*** AlgorithmSet set = this.getAlgorithmSet(setName);
-***REMOVED*** Algorithm algorithm = this.getAlgorithm(algorithmName);
-***REMOVED*** if (set != null && algorithm != null) {
-***REMOVED*** set.addAlgorithm(algorithm);
-***REMOVED*** this.updateClusters();
-***REMOVED*** ***REMOVED***
-***REMOVED*** ***REMOVED***
-***REMOVED***
-***REMOVED*** /**
-***REMOVED*** * Apply the given set of algorithms to the given cluster
-***REMOVED*** *
-***REMOVED*** * @param setId
-***REMOVED*** * @param clusterId
-***REMOVED*** */
-***REMOVED*** public void applyAlgorithmSetToCluster(String setName, String clusterName) {
-***REMOVED*** AlgorithmSet set = this.getAlgorithmSet(setName);
-***REMOVED*** Cluster cluster = new ISClient().getCluster(clusterName);
-***REMOVED*** if (set != null && cluster != null) {
-***REMOVED*** cluster.addAlgorithmSet(set);
-***REMOVED*** this.updateClusters();
-***REMOVED*** ***REMOVED***
-***REMOVED*** ***REMOVED***
-***REMOVED***
-***REMOVED*** private AlgorithmSet getAlgorithmSet(String name) {
-***REMOVED*** for (AlgorithmSet set : sets) {
-***REMOVED*** if (name.equals(set.getName())) {
-***REMOVED*** return set;
-***REMOVED*** ***REMOVED***
-***REMOVED*** ***REMOVED***
-***REMOVED*** return null;
-***REMOVED*** ***REMOVED***
-***REMOVED***
-***REMOVED*** private Algorithm getAlgorithm(String name) {
-***REMOVED*** for (Algorithm a : algorithms) {
-***REMOVED*** if (name.equals(a.getName())) {
-***REMOVED*** return a;
-***REMOVED*** ***REMOVED***
-***REMOVED*** ***REMOVED***
-***REMOVED*** return null;
-***REMOVED*** ***REMOVED***
-
- /**
- * Publish the given algorithm in the given VRE
- *
- * @param algorithmName
- * @param vre
- */
- public void addAlgorithmToVRE(Algorithm algorithm, String vre) throws IOException {
-
- ***REMOVED*** create a fake algorithm set
- AlgorithmSet algoSet = new AlgorithmSet();
- algoSet.setName("fake");
- algoSet.addAlgorithm(algorithm);
-
- this.addAlgorithmsToVRE(algoSet, vre);
- ***REMOVED***
-
- public void addAlgorithmsToVRE(AlgorithmSet algorithms, String vre) throws IOException {
-
- ***REMOVED*** create the cluster (dataminers in the vre)
- Cluster cluster = new Cluster();
- for(Host h:new ISClient().listDataminersInVRE()) {
- cluster.addHost(h);
- ***REMOVED***
-
- ***REMOVED*** apply the changes
- new AnsibleBridge().applyAlgorithmSetToCluster(algorithms, cluster);
-
- ***REMOVED***
-
-***REMOVED***
diff --git a/src/main/webapp/WEB-INF/gcube-app.xml b/src/main/webapp/WEB-INF/gcube-app.xml
new file mode 100644
index 0000000..15f231c
--- /dev/null
+++ b/src/main/webapp/WEB-INF/gcube-app.xml
@@ -0,0 +1,13 @@
+
+
+ dataminer-pool-manager
+ dataanalysis
+ 0.0.1
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/webapp/WEB-INF/gcube-handlers.xml b/src/main/webapp/WEB-INF/gcube-handlers.xml
new file mode 100644
index 0000000..c294252
--- /dev/null
+++ b/src/main/webapp/WEB-INF/gcube-handlers.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..2a231cb
--- /dev/null
+++ b/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,24 @@
+
+
+
+ Archetype Created Web Application
+
+
+
+ REST-API
+ org.glassfish.jersey.servlet.ServletContainer
+
+ jersey.config.server.provider.packages
+ org.gcube.dataanalysis.dataminer.poolmanager.rest
+
+ 1
+
+
+
+ REST-API
+ /rest/*
+
+
+
diff --git a/src/test/java/org/gcube/dataanalysis/dataminerpoolmanager/AlgorithmPackageParserTest.java b/src/test/java/org/gcube/dataanalysis/dataminerpoolmanager/AlgorithmPackageParserTest.java
index 2b21cbc..5730684 100644
--- a/src/test/java/org/gcube/dataanalysis/dataminerpoolmanager/AlgorithmPackageParserTest.java
+++ b/src/test/java/org/gcube/dataanalysis/dataminerpoolmanager/AlgorithmPackageParserTest.java
@@ -7,12 +7,11 @@ import java.net.ProxySelector;
***REMOVED***
import java.util.Vector;
-import org.gcube.dataanalysys.dataminerpoolmanager.datamodel.Algorithm;
-import org.gcube.dataanalysys.dataminerpoolmanager.datamodel.AlgorithmSet;
-import org.gcube.dataanalysys.dataminerpoolmanager.process.AddAlgorithmCommand;
-import org.gcube.dataanalysys.dataminerpoolmanager.process.AlgorithmPackageParser;
-import org.gcube.dataanalysys.dataminerpoolmanager.service.DataminerPoolManager;
-import org.gcube.dataanalysys.dataminerpoolmanager.util.PropertiesBasedProxySelector;
+import org.gcube.dataanalysis.dataminer.poolmanager.datamodel.Algorithm;
+import org.gcube.dataanalysis.dataminer.poolmanager.datamodel.AlgorithmSet;
+import org.gcube.dataanalysis.dataminer.poolmanager.process.AddAlgorithmCommand;
+import org.gcube.dataanalysis.dataminer.poolmanager.process.AlgorithmPackageParser;
+import org.gcube.dataanalysis.dataminer.poolmanager.util.PropertiesBasedProxySelector;
public class AlgorithmPackageParserTest {
@@ -48,8 +47,9 @@ public class AlgorithmPackageParserTest {
algorithms.addAlgorithm(algo);
break;
***REMOVED***
- new DataminerPoolManager().addAlgorithmsToVRE(algorithms,
- "/gcube/devNext/NextNext");
+ ***REMOVED***to uncomment
+ ***REMOVED*** new DataminerPoolManager().addAlgorithmsToVRE(algorithms,
+ ***REMOVED*** "/gcube/devNext/NextNext");
***REMOVED***
/**
@@ -111,7 +111,7 @@ public class AlgorithmPackageParserTest {
public static void main(String[] args) throws Exception {
ProxySelector.setDefault(new PropertiesBasedProxySelector(
- "/home/paolo/.proxy-settings"));
+ "/home/ngalante/.proxy-settings"));
new AlgorithmPackageParserTest().extractAllAlgorithms();
***REMOVED***
diff --git a/src/test/java/org/gcube/dataanalysis/dataminerpoolmanager/AnsibleWorkerTest.java b/src/test/java/org/gcube/dataanalysis/dataminerpoolmanager/AnsibleWorkerTest.java
index a980acf..cb95c40 100644
--- a/src/test/java/org/gcube/dataanalysis/dataminerpoolmanager/AnsibleWorkerTest.java
+++ b/src/test/java/org/gcube/dataanalysis/dataminerpoolmanager/AnsibleWorkerTest.java
@@ -4,11 +4,11 @@ import java.io.File;
***REMOVED***
import java.util.UUID;
-import org.gcube.dataanalysys.dataminerpoolmanager.ansible.AnsibleWorker;
-import org.gcube.dataanalysys.dataminerpoolmanager.ansible.model.Inventory;
-import org.gcube.dataanalysys.dataminerpoolmanager.ansible.model.Playbook;
-import org.gcube.dataanalysys.dataminerpoolmanager.ansible.model.Role;
-import org.gcube.dataanalysys.dataminerpoolmanager.ansible.model.RoleFile;
+import org.gcube.dataanalysis.dataminer.poolmanager.ansible.AnsibleWorker;
+import org.gcube.dataanalysis.dataminer.poolmanager.ansible.model.Inventory;
+import org.gcube.dataanalysis.dataminer.poolmanager.ansible.model.Playbook;
+import org.gcube.dataanalysis.dataminer.poolmanager.ansible.model.Role;
+import org.gcube.dataanalysis.dataminer.poolmanager.ansible.model.RoleFile;
public class AnsibleWorkerTest {
diff --git a/src/test/java/org/gcube/dataanalysis/dataminerpoolmanager/DataminerPoolManagerTest.java b/src/test/java/org/gcube/dataanalysis/dataminerpoolmanager/DataminerPoolManagerTest.java
index e8b2424..37a2be5 100644
--- a/src/test/java/org/gcube/dataanalysis/dataminerpoolmanager/DataminerPoolManagerTest.java
+++ b/src/test/java/org/gcube/dataanalysis/dataminerpoolmanager/DataminerPoolManagerTest.java
@@ -1,26 +1,12 @@
package org.gcube.dataanalysis.dataminerpoolmanager;
import java.net.ProxySelector;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.TreeSet;
-import java.util.Vector;
***REMOVED***
-import org.gcube.dataanalysys.dataminerpoolmanager.ansible.AnsibleWorker;
-import org.gcube.dataanalysys.dataminerpoolmanager.ansible.model.Role;
-import org.gcube.dataanalysys.dataminerpoolmanager.ansiblebridge.AnsibleBridge;
-import org.gcube.dataanalysys.dataminerpoolmanager.datamodel.Algorithm;
-import org.gcube.dataanalysys.dataminerpoolmanager.datamodel.AlgorithmSet;
-import org.gcube.dataanalysys.dataminerpoolmanager.datamodel.Cluster;
-import org.gcube.dataanalysys.dataminerpoolmanager.datamodel.Dependency;
-import org.gcube.dataanalysys.dataminerpoolmanager.datamodel.Domain;
-import org.gcube.dataanalysys.dataminerpoolmanager.datamodel.Host;
-import org.gcube.dataanalysys.dataminerpoolmanager.datamodel.comparator.AlgorithmComparator;
-import org.gcube.dataanalysys.dataminerpoolmanager.datamodel.comparator.DependencyComparator;
-import org.gcube.dataanalysys.dataminerpoolmanager.service.DataminerPoolManager;
-import org.gcube.dataanalysys.dataminerpoolmanager.util.PropertiesBasedProxySelector;
+import org.gcube.dataanalysis.dataminer.poolmanager.datamodel.Algorithm;
+import org.gcube.dataanalysis.dataminer.poolmanager.datamodel.AlgorithmSet;
+import org.gcube.dataanalysis.dataminer.poolmanager.datamodel.Dependency;
+import org.gcube.dataanalysis.dataminer.poolmanager.util.PropertiesBasedProxySelector;
public class DataminerPoolManagerTest {
@@ -173,7 +159,7 @@ public class DataminerPoolManagerTest {
ScopeProvider.instance.set("/gcube/devNext/NextNext");
- ProxySelector.setDefault(new PropertiesBasedProxySelector("/home/paolo/.proxy-settings"));
+ ProxySelector.setDefault(new PropertiesBasedProxySelector("/home/ngalante/.proxy-settings"));
***REMOVED*** create the algorithm (download it, etc etc)
Algorithm algorithm = new Algorithm();
@@ -225,7 +211,7 @@ public class DataminerPoolManagerTest {
ensemble.addDependency(d);
algorithms.addAlgorithm(ensemble);
- new DataminerPoolManager().addAlgorithmsToVRE(algorithms, "/gcube/devNext/NextNext");
+ ***REMOVED***new DataminerPoolManager().addAlgorithmsToVRE(algorithms, "/gcube/devNext/NextNext");
***REMOVED***
diff --git a/src/test/java/org/gcube/dataanalysis/dataminerpoolmanager/ISClientTest.java b/src/test/java/org/gcube/dataanalysis/dataminerpoolmanager/ISClientTest.java
index 198ebb8..426cc6c 100644
--- a/src/test/java/org/gcube/dataanalysis/dataminerpoolmanager/ISClientTest.java
+++ b/src/test/java/org/gcube/dataanalysis/dataminerpoolmanager/ISClientTest.java
@@ -3,13 +3,13 @@ package org.gcube.dataanalysis.dataminerpoolmanager;
import java.net.ProxySelector;
***REMOVED***
-import org.gcube.dataanalysys.dataminerpoolmanager.clients.ISClient;
-import org.gcube.dataanalysys.dataminerpoolmanager.util.PropertiesBasedProxySelector;
+import org.gcube.dataanalysis.dataminer.poolmanager.clients.ISClient;
+import org.gcube.dataanalysis.dataminer.poolmanager.util.PropertiesBasedProxySelector;
public class ISClientTest {
public static void main(String[] args) {
- ProxySelector.setDefault(new PropertiesBasedProxySelector("/home/paolo/.proxy-settings"));
+ ProxySelector.setDefault(new PropertiesBasedProxySelector("/home/ngalante/.proxy-settings"));
ScopeProvider.instance.set("/gcube/devNext/NextNext");
System.out.println(new ISClient().listDataminersInVRE());
***REMOVED***