diff --git a/CHANGELOG.md b/CHANGELOG.md index ae9662a..5944841 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,9 @@ # Changelog -## [v2.8.0-SNAPSHOT] - 2022-11-02 +## [v2.8.0-SNAPSHOT] -- Updated to gcube-smartgears-bom.2.2.0-SNAPSHOT [#24026] +- Updated to gcube-smartgears-bom.2.5.0 ## [v2.7.1] - 2022-04-06 diff --git a/changelog.xml b/changelog.xml index 10af376..05236a1 100755 --- a/changelog.xml +++ b/changelog.xml @@ -1,9 +1,9 @@ - - Updated to gcube-smartgears-bom.2.2.0-SNAPSHOT [#24026] + + Updated to gcube-smartgears-bom.2.5.0 - Updated to gcube-smartgears-bom.2.1.1 [#23133] + Updated to gcube-smartgears-bom.2.2.0 [#23133] Updated to new Social Networking API [#19081] diff --git a/pom.xml b/pom.xml index 60427d3..581edb9 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ maven-parent org.gcube.tools - 1.1.0 + 1.2.0 @@ -151,7 +151,7 @@ org.gcube.distribution gcube-smartgears-bom - 2.2.0-SNAPSHOT + 2.5.0 pom import 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 014d22a..12b360a 100755 --- a/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/rest/RestPoolManager.java +++ b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/rest/RestPoolManager.java @@ -1,6 +1,5 @@ package org.gcube.dataanalysis.dataminer.poolmanager.rest; - import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; @@ -24,52 +23,44 @@ import org.slf4j.LoggerFactory; import org.tmatesoft.svn.core.SVNException; @Path("/") -public class RestPoolManager implements PoolManager -{ - //@Context ServletContext context; +public class RestPoolManager implements PoolManager { + // @Context ServletContext context; private final Logger logger; private DataminerPoolManager service; - - //@Context - //private ApplicationContext context = ContextProvider.get(); - - public RestPoolManager() - { + + // @Context + // private ApplicationContext context = ContextProvider.get(); + + public RestPoolManager() { this.logger = LoggerFactory.getLogger(RestPoolManager.class); this.service = new DataminerPoolManager(); - + } - @GET @Path("/algorithm/stage") @Produces("text/plain") - public String stageAlgorithm( - @QueryParam("algorithmPackageURL") String algorithmPackageURL, - @QueryParam("targetVRE") String targetVRE, - @QueryParam("category") String category, + public String stageAlgorithm(@QueryParam("algorithmPackageURL") String algorithmPackageURL, + @QueryParam("targetVRE") String targetVRE, @QueryParam("category") String category, @QueryParam("algorithm_type") String algorithm_type) throws IOException, InterruptedException { this.logger.debug("Stage algorithm method called"); - Algorithm algo = AlgorithmBuilder.create(algorithmPackageURL); - //String env = context.application().getInitParameter("Environment"); - return this.service.stageAlgorithm(algo,targetVRE,category,algorithm_type/*,env*/); + Algorithm algo = AlgorithmBuilder.create(algorithmPackageURL); + // String env = context.application().getInitParameter("Environment"); + return this.service.stageAlgorithm(algo, targetVRE, category, algorithm_type/* ,env */); } - @GET @Path("/algorithm/add") @Produces("text/plain") - public String publishAlgorithm( - @QueryParam("algorithmPackageURL") String algorithmPackageURL, - //@QueryParam("targetVREToken") String targetVREToken, - @QueryParam("targetVRE") String targetVRE, - @QueryParam("category") String category, + public String publishAlgorithm(@QueryParam("algorithmPackageURL") String algorithmPackageURL, + // @QueryParam("targetVREToken") String targetVREToken, + @QueryParam("targetVRE") String targetVRE, @QueryParam("category") String category, @QueryParam("algorithm_type") String algorithm_type) throws IOException, InterruptedException { this.logger.debug("Publish algorithm method called"); Algorithm algo = AlgorithmBuilder.create(algorithmPackageURL); - //String env = context.application().getInitParameter("Environment"); - return this.service.publishAlgorithm(algo, /*targetVREToken,*/ targetVRE,category,algorithm_type/*,env*/); + // String env = context.application().getInitParameter("Environment"); + return this.service.publishAlgorithm(algo, /* targetVREToken, */ targetVRE, category, algorithm_type/* ,env */); } /* @@ -87,7 +78,6 @@ public class RestPoolManager implements PoolManager return service.getLogById(logUrl); } - @GET @Path("/monitor") @Produces("text/plain") @@ -97,70 +87,77 @@ public class RestPoolManager implements PoolManager this.logger.debug("Returning Log =" + logUrl); return service.getMonitorById(logUrl); } - - - - - - - @Override + + @Override public Algorithm extractAlgorithm(String url) throws IOException { // TODO Auto-generated method stub return null; } public static void main(String[] args) throws ObjectNotFound, Exception { - - + // System.out.println(System.getProperty("user.home")+File.separator+"/gcube/dataminer-pool-manager"); // // ProxySelector.setDefault(new // // PropertiesBasedProxySelector("/home/ngalante/.proxy-settings")); // - + ScopeProvider.instance.set("/gcube/devNext"); SecurityTokenProvider.instance.set(""); - - - + // AuthorizationEntry entry = authorizationService().get("xxxx-xxx-xxxxx-xxxx"); // System.out.println(entry.getContext()); - RestPoolManager a = new RestPoolManager(); - + a.stageAlgorithm("http://data-d.d4science.org/TSt3cUpDTG1teUJMemxpcXplVXYzV1lBelVHTTdsYjlHbWJQNStIS0N6Yz0"); // //a.publishAlgorithm("http://data.d4science.org/MnovRjZIdGV5WlB0WXE5NVNaZnRoRVg0SU8xZWpWQlFHbWJQNStIS0N6Yz0", "xxxx-xxx-xxxx-xxxx","/gcube/devNext/NextNext"); // // PoolManager aa = new DataminerPoolManager(); // } - - - - //Production Testing + + // Production Testing /* - stageAlgorithm(Rproto caller token,pacchetto, category) - http://node2-d-d4s.d4science.org:8080/dataminer-pool-manager-1.0.0-SNAPSHOT/rest/algorithm/stage?gcube-token=xxx-xxx-xxx-xxx&algorithmPackageURL=http://data.d4science.org/dENQTTMxdjNZcGRpK0NHd2pvU0owMFFzN0VWemw3Zy9HbWJQNStIS0N6Yz0&category=ICHTHYOP_MODEL - - publishAlgorithm(Rproto caller token, pacchetto, category, target token, target prod vre) - node2-d-d4s.d4science.org:8080/dataminer-pool-manager-1.0.0-SNAPSHOT/rest/algorithm/add?gcube-token=xxxx-xxxx-xxx-xxx&algorithmPackageURL=http://data.d4science.org/dENQTTMxdjNZcGRpK0NHd2pvU0owMFFzN0VWemw3Zy9HbWJQNStIS0N6Yz0&category=ICHTHYOP_MODEL&targetVREToken=xxxx-xxxx-xxxx&targetVRE=/d4science.research-infrastructures.eu/gCubeApps/RPrototypingLab - - getLogById(Rproto caller token, logid) - http://node2-d-d4s.d4science.org:8080/dataminer-pool-manager-1.0.0-SNAPSHOT/rest/log?gcube-token=xxxx-xxx-xxx-xxx&logUrl= - */ - - - //dev Testing + * stageAlgorithm(Rproto caller token,pacchetto, category) + * http://node2-d-d4s.d4science.org:8080/dataminer-pool-manager-1.0.0-SNAPSHOT/ + * rest/algorithm/stage?gcube-token=xxx-xxx-xxx-xxx&algorithmPackageURL=http:// + * data.d4science.org/ + * dENQTTMxdjNZcGRpK0NHd2pvU0owMFFzN0VWemw3Zy9HbWJQNStIS0N6Yz0&category= + * ICHTHYOP_MODEL + * + * publishAlgorithm(Rproto caller token, pacchetto, category, target token, + * target prod vre) + * node2-d-d4s.d4science.org:8080/dataminer-pool-manager-1.0.0-SNAPSHOT/rest/ + * algorithm/add?gcube-token=xxxx-xxxx-xxx-xxx&algorithmPackageURL=http://data. + * d4science.org/dENQTTMxdjNZcGRpK0NHd2pvU0owMFFzN0VWemw3Zy9HbWJQNStIS0N6Yz0& + * category=ICHTHYOP_MODEL&targetVREToken=xxxx-xxxx-xxxx&targetVRE=/d4science. + * research-infrastructures.eu/gCubeApps/RPrototypingLab + * + * getLogById(Rproto caller token, logid) + * http://node2-d-d4s.d4science.org:8080/dataminer-pool-manager-1.0.0-SNAPSHOT/ + * rest/log?gcube-token=xxxx-xxx-xxx-xxx&logUrl= + */ + + // dev Testing /* - stageAlgorithm(dev_caller_vre_token,pacchetto, category) - http://node2-d-d4s.d4science.org:8080/dataminer-pool-manager-1.0.0-SNAPSHOT/rest/algorithm/stage?gcube-token=xxxx-xxxx-xxxx&algorithmPackageURL=http://data.d4science.org/dENQTTMxdjNZcGRpK0NHd2pvU0owMFFzN0VWemw3Zy9HbWJQNStIS0N6Yz0&category=ICHTHYOP_MODEL - - publishAlgorithm(dev_caller_vre_token, pacchetto, category, target token, target prod vre) - http://node2-d-d4s.d4science.org:8080/dataminer-pool-manager-1.0.0-SNAPSHOT/rest/log?gcube-token=xxxx-xxxx-xxx-xxxx&logUrl=450bb7f9-9e38-4bde-8f4d-f3296f95deba - - getLogById(dev_caller_vre_token, logid) - http://node2-d-d4s.d4science.org:8080/dataminer-pool-manager-1.0.0-SNAPSHOT/rest/log?gcube-token=xxx-xxx-xxx-xxx&logUrl=426c8e35-a624-4710-b612-c90929c32c27 */ - + * stageAlgorithm(dev_caller_vre_token,pacchetto, category) + * http://node2-d-d4s.d4science.org:8080/dataminer-pool-manager-1.0.0-SNAPSHOT/ + * rest/algorithm/stage?gcube-token=xxxx-xxxx-xxxx&algorithmPackageURL=http:// + * data.d4science.org/ + * dENQTTMxdjNZcGRpK0NHd2pvU0owMFFzN0VWemw3Zy9HbWJQNStIS0N6Yz0&category= + * ICHTHYOP_MODEL + * + * publishAlgorithm(dev_caller_vre_token, pacchetto, category, target token, + * target prod vre) + * http://node2-d-d4s.d4science.org:8080/dataminer-pool-manager-1.0.0-SNAPSHOT/ + * rest/log?gcube-token=xxxx-xxxx-xxx-xxxx&logUrl=450bb7f9-9e38-4bde-8f4d- + * f3296f95deba + * + * getLogById(dev_caller_vre_token, logid) + * http://node2-d-d4s.d4science.org:8080/dataminer-pool-manager-1.0.0-SNAPSHOT/ + * rest/log?gcube-token=xxx-xxx-xxx-xxx&logUrl=426c8e35-a624-4710-b612- + * c90929c32c27 + */ @Override public void getLogId(Algorithm algo, String vre) { @@ -174,8 +171,6 @@ public class RestPoolManager implements PoolManager return null; } - - @Override public URL getURLfromWorkerLog(String logUrl) throws MalformedURLException, UnknownHostException { // TODO Auto-generated method stub @@ -194,37 +189,31 @@ public class RestPoolManager implements PoolManager return null; } - @Override public List updateSVN(String file, List ldep) throws SVNException { // TODO Auto-generated method stub return null; } - @Override - public String addAlgorithmToHost(Algorithm algo, String host, boolean test) + public String addAlgorithmToHost(Algorithm algo, String host, boolean test) throws IOException, InterruptedException { // TODO Auto-generated method stub return null; } - @Override - public String addAlgorithmToVRE(Algorithm algo, String vre, boolean test) - throws IOException, InterruptedException { + public String addAlgorithmToVRE(Algorithm algo, String vre, boolean test) throws IOException, InterruptedException { // TODO Auto-generated method stub return null; } - @Override public String stageAlgorithm(String algorithmPackageURL) throws IOException, InterruptedException { // TODO Auto-generated method stub return null; } - @Override public String publishAlgorithm(String algorithmPackageURL, String targetVREToken, String targetVRE) throws IOException, InterruptedException { @@ -232,12 +221,4 @@ public class RestPoolManager implements PoolManager return null; } - - - - - - - - } diff --git a/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/util/impl/CheckMethodProduction.java b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/util/impl/CheckMethodProduction.java index 10a1014..a20a920 100755 --- a/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/util/impl/CheckMethodProduction.java +++ b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/util/impl/CheckMethodProduction.java @@ -63,12 +63,13 @@ public class CheckMethodProduction extends CheckMethod{ //System.out.println(a.checkMethod("dataminer-ghost-t.pre.d4science.org", + // "xxx-xxxx-xxx-xx")); try { - a.checkMethod("dataminer-ghost-d.dev.d4science.org", + a.checkMethod("dataminer-ghost.cloud-dev.d4science.org", "xxx-xxx-xxx-xxx"); } catch (Exception e) { diff --git a/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/util/impl/CheckMethodStaging.java b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/util/impl/CheckMethodStaging.java index e36001e..94c040e 100755 --- a/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/util/impl/CheckMethodStaging.java +++ b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/util/impl/CheckMethodStaging.java @@ -78,6 +78,7 @@ public class CheckMethodStaging extends CheckMethod{ //ServiceConfiguration bp = new ServiceConfiguration(); //// //SecurityTokenProvider.instance.set("xxx-xxx-xxx-xxx"); + //// //if (a.checkMethod(bp.getStagingHost(), SecurityTokenProvider.instance.get())&&a.algoExists(aa)); { //System.out.println("ciao");