From c5851b3366377110231e1740cb5d5b22b3e6502b Mon Sep 17 00:00:00 2001 From: Nunzio Andrea Galante Date: Wed, 22 Feb 2017 16:26:11 +0000 Subject: [PATCH] git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/dataminer-pool-manager@144143 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../ansiblebridge/template/AlgorithmPackage.java | 4 +++- .../dataminer/poolmanager/clients/ISClient.java | 2 +- .../dataminer/poolmanager/rest/RestPoolManager.java | 2 +- .../DataminerPoolManagerTest.java | 12 ++++++++++-- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/template/AlgorithmPackage.java b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/template/AlgorithmPackage.java index f4ac0bd..d9a831d 100644 --- a/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/template/AlgorithmPackage.java +++ b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/template/AlgorithmPackage.java @@ -6,6 +6,7 @@ import java.util.Map; import java.util.NoSuchElementException; import java.util.Vector; +import org.gcube.common.scope.api.ScopeProvider; 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; @@ -25,7 +26,8 @@ public class AlgorithmPackage { out.put("class", a.getClazz()); out.put("atype", a.getAlgorithmType()); out.put("skipjava", a.getSkipJava()); - out.put("vre", "FAKE_VRE"); + out.put("vre", ScopeProvider.instance.get()); + //out.put("vre", "FAKE_VRE"); out.put("packageurl", a.getPackageURL()); out.put("description", a.getDescription()); String deps = ""; diff --git a/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/clients/ISClient.java b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/clients/ISClient.java index 892f1a0..656ec16 100644 --- a/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/clients/ISClient.java +++ b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/clients/ISClient.java @@ -30,7 +30,7 @@ public class ISClient { Collection out = new Vector<>(); Host h = new Host(); //h.setName("bb-dataminer.res.eng.it"); - h.setName("vm123.ui.savba.sk"); + h.setName("vm101.ui.savba.sk"); out.add(h); return out; } else { 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 index a612f89..afe9f51 100644 --- a/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/rest/RestPoolManager.java +++ b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/rest/RestPoolManager.java @@ -59,7 +59,7 @@ public class RestPoolManager implements PoolManager { public static void main(String[] args) throws IOException, InterruptedException { RestPoolManager a = new RestPoolManager(); ScopeProvider.instance.set("/gcube/devNext/NextNext"); - a.addAlgorithmToVRE("http://data.d4science.org/eDF4dWtTc000dEpSLzcybU4zRmJoTmFwUnhZeGZBN1dHbWJQNStIS0N6Yz0", "/gcube/devNext/NextNext"); + a.addAlgorithmToVRE("http://data.d4science.org/am84enRYYkZ3dGRjZk9qTytQTndqaFpTOFJtT3RQeGhHbWJQNStIS0N6Yz0", "/gcube/devNext/NextNext"); //System.out.println(a.getLogById("dadcb059-69e5-48c3-aa58-3b290ae0419d")); } diff --git a/src/test/java/org/gcube/dataanalysis/dataminerpoolmanager/DataminerPoolManagerTest.java b/src/test/java/org/gcube/dataanalysis/dataminerpoolmanager/DataminerPoolManagerTest.java index 603a9fd..3fcee78 100644 --- a/src/test/java/org/gcube/dataanalysis/dataminerpoolmanager/DataminerPoolManagerTest.java +++ b/src/test/java/org/gcube/dataanalysis/dataminerpoolmanager/DataminerPoolManagerTest.java @@ -1,6 +1,7 @@ package org.gcube.dataanalysis.dataminerpoolmanager; import java.net.ProxySelector; +import java.util.UUID; import org.gcube.common.scope.api.ScopeProvider; import org.gcube.dataanalysis.dataminer.poolmanager.datamodel.Algorithm; @@ -199,20 +200,27 @@ public class DataminerPoolManagerTest { AlgorithmSet algorithms = new AlgorithmSet(); algorithms.setName("dummy-set"); + // algorithms.addAlgorithm(algorithm); // algorithms.addAlgorithm(ewe); Algorithm ensemble = new Algorithm(); ensemble.setName("ensemble"); - + ensemble.setCategory("ICHTHYOP_MODEL"); + ensemble.setAlgorithmType("transducerers"); + ensemble.setPackageURL("http://data.d4science.org/R0FqV2lNOW1jMkxuUEIrWXY4aUhvSENHSmVMQks4NjdHbWJQNStIS0N6Yz0"); + ensemble.setClazz("org.gcube.dataanalysis.executor.rscripts.Ichthyopmodelonebyone"); + ensemble.setSkipJava("test"); + ensemble.setDescription("test"); + Dependency d = new Dependency(); d.setName("libpng3"); d.setType("os"); ensemble.addDependency(d); algorithms.addAlgorithm(ensemble); - new DataminerPoolManager().addAlgorithmsToVRE(algorithms, "/gcube/devNext/NextNext", "test"); + new DataminerPoolManager().addAlgorithmsToVRE(algorithms, "/gcube/devNext/NextNext", "test"+UUID.randomUUID()); }