This commit is contained in:
Nunzio Andrea Galante 2017-04-06 09:58:51 +00:00
parent 442b71c645
commit b36c9d6238
2 changed files with 18 additions and 10 deletions

View File

@ -186,14 +186,16 @@ public class RestPoolManager implements PoolManager {
@GET @GET
@Path("/scopes/add") @Path("/scopes/add")
@Produces("text/plain") @Produces("text/plain")
public String addAlgorithmToVRE(@QueryParam("algorithm") String algorithm, @QueryParam("vre") String vre, public String addAlgorithmToVRE(
@QueryParam("name") String name, @QueryParam("description") String description, @QueryParam("algorithm") String algorithm,
@QueryParam("name") String name,
@QueryParam("description") String description,
@QueryParam("category") String category, @QueryParam("category") String category,
@DefaultValue("transducerers") @QueryParam("algorithmType") String algorithmType, @DefaultValue("transducerers") @QueryParam("algorithmType") String algorithmType,
@DefaultValue("N") @QueryParam("skipJava") String skipJava, @DefaultValue("N") @QueryParam("skipJava") String skipJava,
@DefaultValue("false") @QueryParam("publish") boolean publish) @DefaultValue("false") @QueryParam("publish") boolean publish)
throws IOException, InterruptedException, SVNException { 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 ***REMOVED*** publish algo
if (publish) { if (publish) {
@ -225,14 +227,17 @@ public class RestPoolManager implements PoolManager {
***REMOVED*** ***REMOVED***
***REMOVED*** ***REMOVED***
return service.addAlgorithmToVRE(algo, vre); return service.addAlgorithmToVRE(algo, ScopeProvider.instance.get());
***REMOVED*** ***REMOVED***
@GET @GET
@Path("/hosts/add") @Path("/hosts/add")
@Produces("text/plain") @Produces("text/plain")
public String addAlgorithmToHost(@QueryParam("algorithm") String algorithm, @QueryParam("hostname") String hostname, public String addAlgorithmToHost(
@QueryParam("name") String name, @QueryParam("description") String description, @QueryParam("algorithm") String algorithm,
@QueryParam("hostname") String hostname,
@QueryParam("name") String name,
@QueryParam("description") String description,
@QueryParam("category") String category, @QueryParam("category") String category,
@DefaultValue("transducerers") @QueryParam("algorithmType") String algorithmType, @DefaultValue("transducerers") @QueryParam("algorithmType") String algorithmType,
@DefaultValue("N") @QueryParam("skipJava") String skipJava, @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, private Algorithm getAlgorithm(String algorithm, String vre, String hostname, String name, String description,
String category, String algorithmType, String skipJava) throws IOException, InterruptedException { 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); Algorithm algo = service.extractAlgorithm(algorithm);
if (algo.getCategory() == null) { if (algo.getCategory() == null) {

View File

@ -565,14 +565,17 @@ public class DataminerPoolManager implements PoolManager {
return a.applyAlgorithmSetToCluster(algorithms, cluster, uuid).getWorkerId(); return a.applyAlgorithmSetToCluster(algorithms, cluster, uuid).getWorkerId();
***REMOVED*** ***REMOVED***
private SVNRepository getSvnRepository(String url) throws SVNException { private SVNRepository getSvnRepository(String url) throws SVNException {
String usr = "nunzioandrea.galante";
String pwd = "Newuser1";
SVNRepository repository = SVNRepositoryFactory.create(SVNURL.parseURIEncoded(url)); SVNRepository repository = SVNRepositoryFactory.create(SVNURL.parseURIEncoded(url));
ISVNAuthenticationManager authManager = SVNWCUtil.createDefaultAuthenticationManager(usr, pwd); ISVNAuthenticationManager authManager = SVNWCUtil.createDefaultAuthenticationManager();
repository.setAuthenticationManager(authManager); repository.setAuthenticationManager(authManager);
System.out.println(repository.getLocation()); System.out.println(repository.getLocation());
return repository; return repository;
***REMOVED*** ***REMOVED***