This commit is contained in:
Nunzio Andrea Galante 2017-02-22 16:26:11 +00:00
parent e6092b7216
commit 31a64d5d4d
4 changed files with 15 additions and 5 deletions

View File

@ -6,6 +6,7 @@ import java.util.Map;
import java.util.NoSuchElementException; import java.util.NoSuchElementException;
import java.util.Vector; import java.util.Vector;
***REMOVED***
import org.gcube.dataanalysis.dataminer.poolmanager.ansible.model.Role; import org.gcube.dataanalysis.dataminer.poolmanager.ansible.model.Role;
import org.gcube.dataanalysis.dataminer.poolmanager.datamodel.Algorithm; import org.gcube.dataanalysis.dataminer.poolmanager.datamodel.Algorithm;
import org.gcube.dataanalysis.dataminer.poolmanager.datamodel.Dependency; import org.gcube.dataanalysis.dataminer.poolmanager.datamodel.Dependency;
@ -25,7 +26,8 @@ public class AlgorithmPackage {
out.put("class", a.getClazz()); out.put("class", a.getClazz());
out.put("atype", a.getAlgorithmType()); out.put("atype", a.getAlgorithmType());
out.put("skipjava", a.getSkipJava()); out.put("skipjava", a.getSkipJava());
out.put("vre", "FAKE_VRE"); out.put("vre", ScopeProvider.instance.get());
***REMOVED***out.put("vre", "FAKE_VRE");
out.put("packageurl", a.getPackageURL()); out.put("packageurl", a.getPackageURL());
out.put("description", a.getDescription()); out.put("description", a.getDescription());
String deps = ""; String deps = "";

View File

@ -30,7 +30,7 @@ public class ISClient {
Collection<Host> out = new Vector<>(); Collection<Host> out = new Vector<>();
Host h = new Host(); Host h = new Host();
***REMOVED***h.setName("bb-dataminer.res.eng.it"); ***REMOVED***h.setName("bb-dataminer.res.eng.it");
h.setName("vm123.ui.savba.sk"); h.setName("vm101.ui.savba.sk");
out.add(h); out.add(h);
return out; return out;
***REMOVED*** else { ***REMOVED*** else {

View File

@ -59,7 +59,7 @@ public class RestPoolManager implements PoolManager {
public static void main(String[] args) throws IOException, InterruptedException { public static void main(String[] args) throws IOException, InterruptedException {
RestPoolManager a = new RestPoolManager(); RestPoolManager a = new RestPoolManager();
ScopeProvider.instance.set("/gcube/devNext/NextNext"); ScopeProvider.instance.set("/gcube/devNext/NextNext");
a.addAlgorithmToVRE("http:***REMOVED***data.d4science.org/eDF4dWtTc000dEpSLzcybU4zRmJoTmFwUnhZeGZBN1dHbWJQNStIS0N6Yz0", "/gcube/devNext/NextNext"); a.addAlgorithmToVRE("http:***REMOVED***data.d4science.org/am84enRYYkZ3dGRjZk9qTytQTndqaFpTOFJtT3RQeGhHbWJQNStIS0N6Yz0", "/gcube/devNext/NextNext");
***REMOVED***System.out.println(a.getLogById("dadcb059-69e5-48c3-aa58-3b290ae0419d")); ***REMOVED***System.out.println(a.getLogById("dadcb059-69e5-48c3-aa58-3b290ae0419d"));
***REMOVED*** ***REMOVED***

View File

@ -1,6 +1,7 @@
package org.gcube.dataanalysis.dataminerpoolmanager; package org.gcube.dataanalysis.dataminerpoolmanager;
import java.net.ProxySelector; import java.net.ProxySelector;
import java.util.UUID;
***REMOVED*** ***REMOVED***
import org.gcube.dataanalysis.dataminer.poolmanager.datamodel.Algorithm; import org.gcube.dataanalysis.dataminer.poolmanager.datamodel.Algorithm;
@ -199,20 +200,27 @@ public class DataminerPoolManagerTest {
AlgorithmSet algorithms = new AlgorithmSet(); AlgorithmSet algorithms = new AlgorithmSet();
algorithms.setName("dummy-set"); algorithms.setName("dummy-set");
***REMOVED*** algorithms.addAlgorithm(algorithm); ***REMOVED*** algorithms.addAlgorithm(algorithm);
***REMOVED*** algorithms.addAlgorithm(ewe); ***REMOVED*** algorithms.addAlgorithm(ewe);
Algorithm ensemble = new Algorithm(); Algorithm ensemble = new Algorithm();
ensemble.setName("ensemble"); ensemble.setName("ensemble");
ensemble.setCategory("ICHTHYOP_MODEL");
ensemble.setAlgorithmType("transducerers");
ensemble.setPackageURL("http:***REMOVED***data.d4science.org/R0FqV2lNOW1jMkxuUEIrWXY4aUhvSENHSmVMQks4NjdHbWJQNStIS0N6Yz0");
ensemble.setClazz("org.gcube.dataanalysis.executor.rscripts.Ichthyopmodelonebyone");
ensemble.setSkipJava("test");
ensemble.setDescription("test");
Dependency d = new Dependency(); Dependency d = new Dependency();
d.setName("libpng3"); d.setName("libpng3");
d.setType("os"); d.setType("os");
ensemble.addDependency(d); ensemble.addDependency(d);
algorithms.addAlgorithm(ensemble); algorithms.addAlgorithm(ensemble);
new DataminerPoolManager().addAlgorithmsToVRE(algorithms, "/gcube/devNext/NextNext", "test"); new DataminerPoolManager().addAlgorithmsToVRE(algorithms, "/gcube/devNext/NextNext", "test"+UUID.randomUUID());
***REMOVED*** ***REMOVED***