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 8c08fc8..8cf9730 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 @@ -186,14 +186,16 @@ public class RestPoolManager implements PoolManager { @GET @Path("/scopes/add") @Produces("text/plain") - public String addAlgorithmToVRE(@QueryParam("algorithm") String algorithm, @QueryParam("vre") String vre, - @QueryParam("name") String name, @QueryParam("description") String description, + public String addAlgorithmToVRE( + @QueryParam("algorithm") String algorithm, + @QueryParam("name") String name, + @QueryParam("description") String description, @QueryParam("category") String category, @DefaultValue("transducerers") @QueryParam("algorithmType") String algorithmType, @DefaultValue("N") @QueryParam("skipJava") String skipJava, @DefaultValue("false") @QueryParam("publish") boolean publish) throws IOException, InterruptedException, SVNException { - Algorithm algo = this.getAlgorithm(algorithm, vre, null, name, description, category, algorithmType, skipJava); + Algorithm algo = this.getAlgorithm(algorithm, /*vre*/null, null, name, description, category, algorithmType, skipJava); ***REMOVED*** publish algo if (publish) { @@ -225,14 +227,17 @@ public class RestPoolManager implements PoolManager { ***REMOVED*** ***REMOVED*** - return service.addAlgorithmToVRE(algo, vre); + return service.addAlgorithmToVRE(algo, ScopeProvider.instance.get()); ***REMOVED*** @GET @Path("/hosts/add") @Produces("text/plain") - public String addAlgorithmToHost(@QueryParam("algorithm") String algorithm, @QueryParam("hostname") String hostname, - @QueryParam("name") String name, @QueryParam("description") String description, + public String addAlgorithmToHost( + @QueryParam("algorithm") String algorithm, + @QueryParam("hostname") String hostname, + @QueryParam("name") String name, + @QueryParam("description") String description, @QueryParam("category") String category, @DefaultValue("transducerers") @QueryParam("algorithmType") String algorithmType, @DefaultValue("N") @QueryParam("skipJava") String skipJava, @@ -274,7 +279,7 @@ public class RestPoolManager implements PoolManager { private Algorithm getAlgorithm(String algorithm, String vre, String hostname, String name, String description, String category, String algorithmType, String skipJava) throws IOException, InterruptedException { - LOGGER.debug("Adding algorithm =" + algorithm + " to VRE =" + vre); + ***REMOVED***LOGGER.debug("Adding algorithm =" + algorithm + " to VRE =" + vre); Algorithm algo = service.extractAlgorithm(algorithm); if (algo.getCategory() == null) { 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 index 19bf393..8f372f1 100644 --- a/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/service/DataminerPoolManager.java +++ b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/service/DataminerPoolManager.java @@ -565,14 +565,17 @@ public class DataminerPoolManager implements PoolManager { return a.applyAlgorithmSetToCluster(algorithms, cluster, uuid).getWorkerId(); ***REMOVED*** + + + + private SVNRepository getSvnRepository(String url) throws SVNException { - String usr = "nunzioandrea.galante"; - String pwd = "Newuser1"; SVNRepository repository = SVNRepositoryFactory.create(SVNURL.parseURIEncoded(url)); - ISVNAuthenticationManager authManager = SVNWCUtil.createDefaultAuthenticationManager(usr, pwd); + ISVNAuthenticationManager authManager = SVNWCUtil.createDefaultAuthenticationManager(); repository.setAuthenticationManager(authManager); System.out.println(repository.getLocation()); + return repository; ***REMOVED***