git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/dataminer-pool-manager@158031 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
56c111f010
commit
eaa49e6242
|
@ -0,0 +1,462 @@
|
|||
package org.gcube.dataanalysis.dataminer.poolmanager.clients;
|
||||
|
||||
import static org.gcube.resources.discovery.icclient.ICFactory.client;
|
||||
import static org.gcube.resources.discovery.icclient.ICFactory.clientFor;
|
||||
import static org.gcube.resources.discovery.icclient.ICFactory.queryFor;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
***REMOVED***
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.PrintStream;
|
||||
import java.io.StringWriter;
|
||||
***REMOVED***
|
||||
***REMOVED***
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedList;
|
||||
***REMOVED***
|
||||
import java.util.Map;
|
||||
import java.util.Scanner;
|
||||
***REMOVED***
|
||||
import java.util.TreeMap;
|
||||
import java.util.TreeSet;
|
||||
import java.util.Vector;
|
||||
|
||||
***REMOVED***
|
||||
import org.gcube.common.resources.gcore.GenericResource;
|
||||
import org.gcube.common.resources.gcore.Resources;
|
||||
import org.gcube.common.resources.gcore.ServiceEndpoint;
|
||||
***REMOVED***
|
||||
***REMOVED***
|
||||
import org.gcube.dataanalysis.dataminer.poolmanager.datamodel.Cluster;
|
||||
import org.gcube.dataanalysis.dataminer.poolmanager.datamodel.Dependency;
|
||||
import org.gcube.dataanalysis.dataminer.poolmanager.datamodel.Domain;
|
||||
import org.gcube.dataanalysis.dataminer.poolmanager.datamodel.Host;
|
||||
import org.gcube.dataanalysis.dataminer.poolmanager.datamodel.comparator.HostComparator;
|
||||
***REMOVED***
|
||||
import org.gcube.informationsystem.publisher.AdvancedScopedPublisher;
|
||||
import org.gcube.informationsystem.publisher.RegistryPublisherFactory;
|
||||
import org.gcube.informationsystem.publisher.ScopedPublisher;
|
||||
import org.gcube.informationsystem.publisher.exception.RegistryNotFoundException;
|
||||
import org.gcube.resources.discovery.client.api.DiscoveryClient;
|
||||
import org.gcube.resources.discovery.client.queries.api.SimpleQuery;
|
||||
***REMOVED***
|
||||
***REMOVED***
|
||||
import org.tmatesoft.svn.core.SVNDepth;
|
||||
***REMOVED***
|
||||
import org.tmatesoft.svn.core.SVNURL;
|
||||
import org.tmatesoft.svn.core.auth.ISVNAuthenticationManager;
|
||||
import org.tmatesoft.svn.core.internal.io.dav.DAVRepositoryFactory;
|
||||
import org.tmatesoft.svn.core.io.SVNRepository;
|
||||
import org.tmatesoft.svn.core.io.SVNRepositoryFactory;
|
||||
import org.tmatesoft.svn.core.wc.ISVNOptions;
|
||||
import org.tmatesoft.svn.core.wc.SVNClientManager;
|
||||
import org.tmatesoft.svn.core.wc.SVNRevision;
|
||||
import org.tmatesoft.svn.core.wc.SVNUpdateClient;
|
||||
import org.tmatesoft.svn.core.wc.SVNWCUtil;
|
||||
|
||||
import au.com.bytecode.opencsv.CSVReader;
|
||||
|
||||
public class DMPMClientConfigurator ***REMOVED***
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(DMPMClientConfigurator.class);
|
||||
|
||||
public String getStagingHost() ***REMOVED***
|
||||
***REMOVED***
|
||||
String ghost = "";
|
||||
SimpleQuery query = queryFor(GenericResource.class);
|
||||
query.addCondition("$resource/Profile/SecondaryType/text() eq 'DMPMConfigurator'").setResult("$resource/Profile/Body/stage/ghost/text()");
|
||||
DiscoveryClient<String> client = client();
|
||||
List<String> ds = client.submit(query);
|
||||
for (String a : ds) ***REMOVED***
|
||||
ghost = a;
|
||||
***REMOVED***
|
||||
return ghost.trim();
|
||||
***REMOVED***
|
||||
|
||||
public String getProdHost() ***REMOVED***
|
||||
***REMOVED***
|
||||
String ghost = "";
|
||||
SimpleQuery query = queryFor(GenericResource.class);
|
||||
query.addCondition("$resource/Profile/SecondaryType/text() eq 'DMPMConfigurator'").setResult("$resource/Profile/Body/prod/ghost/text()");
|
||||
DiscoveryClient<String> client = client();
|
||||
List<String> ds = client.submit(query);
|
||||
for (String a : ds) ***REMOVED***
|
||||
ghost = a;
|
||||
***REMOVED***
|
||||
return ghost.trim();
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNStagingAlgorithmsList() ***REMOVED***
|
||||
***REMOVED***
|
||||
String ghost = "";
|
||||
SimpleQuery query = queryFor(GenericResource.class);
|
||||
query.addCondition("$resource/Profile/SecondaryType/text() eq 'DMPMConfigurator'").setResult("$resource/Profile/Body/stage/svn.stage.algorithms-list/text()");
|
||||
DiscoveryClient<String> client = client();
|
||||
List<String> ds = client.submit(query);
|
||||
for (String a : ds) ***REMOVED***
|
||||
ghost = a;
|
||||
***REMOVED***
|
||||
return ghost.trim();
|
||||
***REMOVED***
|
||||
|
||||
public String getStageRepository() ***REMOVED***
|
||||
***REMOVED***
|
||||
String ghost = "";
|
||||
SimpleQuery query = queryFor(GenericResource.class);
|
||||
query.addCondition("$resource/Profile/SecondaryType/text() eq 'DMPMConfigurator'").setResult("$resource/Profile/Body/stage/svn.stage.software.repo/text()");
|
||||
DiscoveryClient<String> client = client();
|
||||
List<String> ds = client.submit(query);
|
||||
for (String a : ds) ***REMOVED***
|
||||
ghost = a;
|
||||
***REMOVED***
|
||||
return ghost.trim();
|
||||
***REMOVED***
|
||||
|
||||
public String getGhostAlgoDirectory() ***REMOVED***
|
||||
***REMOVED***
|
||||
String ghost = "";
|
||||
SimpleQuery query = queryFor(GenericResource.class);
|
||||
query.addCondition("$resource/Profile/SecondaryType/text() eq 'DMPMConfigurator'").setResult("$resource/Profile/Body/stage/svn.stage.algo.ghost.repo/text()");
|
||||
DiscoveryClient<String> client = client();
|
||||
List<String> ds = client.submit(query);
|
||||
for (String a : ds) ***REMOVED***
|
||||
ghost = a;
|
||||
***REMOVED***
|
||||
return ghost.trim();
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNStagingLinuxCompiledDepsList() ***REMOVED***
|
||||
***REMOVED***
|
||||
String ghost = "";
|
||||
SimpleQuery query = queryFor(GenericResource.class);
|
||||
query.addCondition("$resource/Profile/SecondaryType/text() eq 'DMPMConfigurator'").setResult("$resource/Profile/Body/stage/svn.stage.deps-linux-compiled/text()");
|
||||
DiscoveryClient<String> client = client();
|
||||
List<String> ds = client.submit(query);
|
||||
for (String a : ds) ***REMOVED***
|
||||
ghost = a;
|
||||
***REMOVED***
|
||||
return ghost.trim();
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNStagingPreInstalledDepsList() ***REMOVED***
|
||||
***REMOVED***
|
||||
String ghost = "";
|
||||
SimpleQuery query = queryFor(GenericResource.class);
|
||||
query.addCondition("$resource/Profile/SecondaryType/text() eq 'DMPMConfigurator'").setResult("$resource/Profile/Body/stage/svn.stage.deps-pre-installed/text()");
|
||||
DiscoveryClient<String> client = client();
|
||||
List<String> ds = client.submit(query);
|
||||
for (String a : ds) ***REMOVED***
|
||||
ghost = a;
|
||||
***REMOVED***
|
||||
return ghost.trim();
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNStagingRBDepsList() ***REMOVED***
|
||||
***REMOVED***
|
||||
String ghost = "";
|
||||
SimpleQuery query = queryFor(GenericResource.class);
|
||||
query.addCondition("$resource/Profile/SecondaryType/text() eq 'DMPMConfigurator'").setResult("$resource/Profile/Body/stage/svn.stage.deps-r-blackbox/text()");
|
||||
DiscoveryClient<String> client = client();
|
||||
List<String> ds = client.submit(query);
|
||||
for (String a : ds) ***REMOVED***
|
||||
ghost = a;
|
||||
***REMOVED***
|
||||
return ghost.trim();
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNStagingCRANDepsList() ***REMOVED***
|
||||
***REMOVED***
|
||||
String ghost = "";
|
||||
SimpleQuery query = queryFor(GenericResource.class);
|
||||
query.addCondition("$resource/Profile/SecondaryType/text() eq 'DMPMConfigurator'").setResult("$resource/Profile/Body/stage/svn.stage.deps-r/text()");
|
||||
DiscoveryClient<String> client = client();
|
||||
List<String> ds = client.submit(query);
|
||||
for (String a : ds) ***REMOVED***
|
||||
ghost = a;
|
||||
***REMOVED***
|
||||
return ghost.trim();
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNStagingJavaDepsList() ***REMOVED***
|
||||
***REMOVED***
|
||||
String ghost = "";
|
||||
SimpleQuery query = queryFor(GenericResource.class);
|
||||
query.addCondition("$resource/Profile/SecondaryType/text() eq 'DMPMConfigurator'").setResult("$resource/Profile/Body/stage/svn.stage.deps-java/text()");
|
||||
DiscoveryClient<String> client = client();
|
||||
List<String> ds = client.submit(query);
|
||||
for (String a : ds) ***REMOVED***
|
||||
ghost = a;
|
||||
***REMOVED***
|
||||
return ghost.trim();
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNStagingKWDepsList() ***REMOVED***
|
||||
***REMOVED***
|
||||
String ghost = "";
|
||||
SimpleQuery query = queryFor(GenericResource.class);
|
||||
query.addCondition("$resource/Profile/SecondaryType/text() eq 'DMPMConfigurator'").setResult("$resource/Profile/Body/stage/svn.stage.deps-knime-workflow/text()");
|
||||
DiscoveryClient<String> client = client();
|
||||
List<String> ds = client.submit(query);
|
||||
for (String a : ds) ***REMOVED***
|
||||
ghost = a;
|
||||
***REMOVED***
|
||||
return ghost.trim();
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNStagingOctaveDepsList() ***REMOVED***
|
||||
***REMOVED***
|
||||
String ghost = "";
|
||||
SimpleQuery query = queryFor(GenericResource.class);
|
||||
query.addCondition("$resource/Profile/SecondaryType/text() eq 'DMPMConfigurator'").setResult("$resource/Profile/Body/stage/svn.stage.deps-octave/text()");
|
||||
DiscoveryClient<String> client = client();
|
||||
List<String> ds = client.submit(query);
|
||||
for (String a : ds) ***REMOVED***
|
||||
ghost = a;
|
||||
***REMOVED***
|
||||
return ghost.trim();
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNStagingPythonDepsList() ***REMOVED***
|
||||
***REMOVED***
|
||||
String ghost = "";
|
||||
SimpleQuery query = queryFor(GenericResource.class);
|
||||
query.addCondition("$resource/Profile/SecondaryType/text() eq 'DMPMConfigurator'").setResult("$resource/Profile/Body/stage/svn.stage.deps-python/text()");
|
||||
DiscoveryClient<String> client = client();
|
||||
List<String> ds = client.submit(query);
|
||||
for (String a : ds) ***REMOVED***
|
||||
ghost = a;
|
||||
***REMOVED***
|
||||
return ghost.trim();
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNStagingWCDepsList() ***REMOVED***
|
||||
***REMOVED***
|
||||
String ghost = "";
|
||||
SimpleQuery query = queryFor(GenericResource.class);
|
||||
query.addCondition("$resource/Profile/SecondaryType/text() eq 'DMPMConfigurator'").setResult("$resource/Profile/Body/stage/svn.stage.deps-windows-compiled/text()");
|
||||
DiscoveryClient<String> client = client();
|
||||
List<String> ds = client.submit(query);
|
||||
for (String a : ds) ***REMOVED***
|
||||
ghost = a;
|
||||
***REMOVED***
|
||||
return ghost.trim();
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNProdAlgorithmsList() ***REMOVED***
|
||||
***REMOVED***
|
||||
String ghost = "";
|
||||
SimpleQuery query = queryFor(GenericResource.class);
|
||||
query.addCondition("$resource/Profile/SecondaryType/text() eq 'DMPMConfigurator'").setResult("$resource/Profile/Body/prod/svn.prod.algorithms-list/text()");
|
||||
DiscoveryClient<String> client = client();
|
||||
List<String> ds = client.submit(query);
|
||||
for (String a : ds) ***REMOVED***
|
||||
ghost = a;
|
||||
***REMOVED***
|
||||
return ghost.trim();
|
||||
***REMOVED***
|
||||
|
||||
public String getProdRepository() ***REMOVED***
|
||||
***REMOVED***
|
||||
String ghost = "";
|
||||
SimpleQuery query = queryFor(GenericResource.class);
|
||||
query.addCondition("$resource/Profile/SecondaryType/text() eq 'DMPMConfigurator'").setResult("$resource/Profile/Body/prod/svn.prod.software.repo/text()");
|
||||
DiscoveryClient<String> client = client();
|
||||
List<String> ds = client.submit(query);
|
||||
for (String a : ds) ***REMOVED***
|
||||
ghost = a;
|
||||
***REMOVED***
|
||||
return ghost.trim();
|
||||
***REMOVED***
|
||||
|
||||
public String getProdGhostAlgoDirectory() ***REMOVED***
|
||||
***REMOVED***
|
||||
String ghost = "";
|
||||
SimpleQuery query = queryFor(GenericResource.class);
|
||||
query.addCondition("$resource/Profile/SecondaryType/text() eq 'DMPMConfigurator'").setResult("$resource/Profile/Body/prod/svn.prod.algo.ghost.repo/text()");
|
||||
DiscoveryClient<String> client = client();
|
||||
List<String> ds = client.submit(query);
|
||||
for (String a : ds) ***REMOVED***
|
||||
ghost = a;
|
||||
***REMOVED***
|
||||
return ghost.trim();
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNProdLinuxCompiledDepsList() ***REMOVED***
|
||||
***REMOVED***
|
||||
String ghost = "";
|
||||
SimpleQuery query = queryFor(GenericResource.class);
|
||||
query.addCondition("$resource/Profile/SecondaryType/text() eq 'DMPMConfigurator'").setResult("$resource/Profile/Body/prod/svn.prod.deps-linux-compiled/text()");
|
||||
DiscoveryClient<String> client = client();
|
||||
List<String> ds = client.submit(query);
|
||||
for (String a : ds) ***REMOVED***
|
||||
ghost = a;
|
||||
***REMOVED***
|
||||
return ghost.trim();
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNProdPreInstalledDepsList() ***REMOVED***
|
||||
***REMOVED***
|
||||
String ghost = "";
|
||||
SimpleQuery query = queryFor(GenericResource.class);
|
||||
query.addCondition("$resource/Profile/SecondaryType/text() eq 'DMPMConfigurator'").setResult("$resource/Profile/Body/prod/svn.prod.deps-pre-installed/text()");
|
||||
DiscoveryClient<String> client = client();
|
||||
List<String> ds = client.submit(query);
|
||||
for (String a : ds) ***REMOVED***
|
||||
ghost = a;
|
||||
***REMOVED***
|
||||
return ghost.trim();
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNProdRBDepsList() ***REMOVED***
|
||||
***REMOVED***
|
||||
String ghost = "";
|
||||
SimpleQuery query = queryFor(GenericResource.class);
|
||||
query.addCondition("$resource/Profile/SecondaryType/text() eq 'DMPMConfigurator'").setResult("$resource/Profile/Body/prod/svn.prod.deps-r-blackbox/text()");
|
||||
DiscoveryClient<String> client = client();
|
||||
List<String> ds = client.submit(query);
|
||||
for (String a : ds) ***REMOVED***
|
||||
ghost = a;
|
||||
***REMOVED***
|
||||
return ghost.trim();
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNProdCRANDepsList() ***REMOVED***
|
||||
***REMOVED***
|
||||
String ghost = "";
|
||||
SimpleQuery query = queryFor(GenericResource.class);
|
||||
query.addCondition("$resource/Profile/SecondaryType/text() eq 'DMPMConfigurator'").setResult("$resource/Profile/Body/prod/svn.prod.deps-r/text()");
|
||||
DiscoveryClient<String> client = client();
|
||||
List<String> ds = client.submit(query);
|
||||
for (String a : ds) ***REMOVED***
|
||||
ghost = a;
|
||||
***REMOVED***
|
||||
return ghost.trim();
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNProdJavaDepsList() ***REMOVED***
|
||||
***REMOVED***
|
||||
String ghost = "";
|
||||
SimpleQuery query = queryFor(GenericResource.class);
|
||||
query.addCondition("$resource/Profile/SecondaryType/text() eq 'DMPMConfigurator'").setResult("$resource/Profile/Body/prod/svn.prod.deps-java/text()");
|
||||
DiscoveryClient<String> client = client();
|
||||
List<String> ds = client.submit(query);
|
||||
for (String a : ds) ***REMOVED***
|
||||
ghost = a;
|
||||
***REMOVED***
|
||||
return ghost.trim();
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNProdKWDepsList() ***REMOVED***
|
||||
***REMOVED***
|
||||
String ghost = "";
|
||||
SimpleQuery query = queryFor(GenericResource.class);
|
||||
query.addCondition("$resource/Profile/SecondaryType/text() eq 'DMPMConfigurator'").setResult("$resource/Profile/Body/prod/svn.prod.deps-knime-workflow/text()");
|
||||
DiscoveryClient<String> client = client();
|
||||
List<String> ds = client.submit(query);
|
||||
for (String a : ds) ***REMOVED***
|
||||
ghost = a;
|
||||
***REMOVED***
|
||||
return ghost.trim();
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNProdOctaveDepsList() ***REMOVED***
|
||||
***REMOVED***
|
||||
String ghost = "";
|
||||
SimpleQuery query = queryFor(GenericResource.class);
|
||||
query.addCondition("$resource/Profile/SecondaryType/text() eq 'DMPMConfigurator'").setResult("$resource/Profile/Body/prod/svn.prod.deps-octave/text()");
|
||||
DiscoveryClient<String> client = client();
|
||||
List<String> ds = client.submit(query);
|
||||
for (String a : ds) ***REMOVED***
|
||||
ghost = a;
|
||||
***REMOVED***
|
||||
return ghost.trim();
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNProdPythonDepsList() ***REMOVED***
|
||||
***REMOVED***
|
||||
String ghost = "";
|
||||
SimpleQuery query = queryFor(GenericResource.class);
|
||||
query.addCondition("$resource/Profile/SecondaryType/text() eq 'DMPMConfigurator'").setResult("$resource/Profile/Body/prod/svn.prod.deps-python/text()");
|
||||
DiscoveryClient<String> client = client();
|
||||
List<String> ds = client.submit(query);
|
||||
for (String a : ds) ***REMOVED***
|
||||
ghost = a;
|
||||
***REMOVED***
|
||||
return ghost.trim();
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNProdWCDepsList() ***REMOVED***
|
||||
***REMOVED***
|
||||
String ghost = "";
|
||||
SimpleQuery query = queryFor(GenericResource.class);
|
||||
query.addCondition("$resource/Profile/SecondaryType/text() eq 'DMPMConfigurator'").setResult("$resource/Profile/Body/prod/svn.prod.deps-windows-compiled/text()");
|
||||
DiscoveryClient<String> client = client();
|
||||
List<String> ds = client.submit(query);
|
||||
for (String a : ds) ***REMOVED***
|
||||
ghost = a;
|
||||
***REMOVED***
|
||||
return ghost.trim();
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNRepository() ***REMOVED***
|
||||
***REMOVED***
|
||||
|
||||
String ghost = "";
|
||||
SimpleQuery query = queryFor(GenericResource.class);
|
||||
query.addCondition("$resource/Profile/SecondaryType/text() eq 'DMPMConfigurator'").setResult("$resource");
|
||||
DiscoveryClient<GenericResource> client = clientFor(GenericResource.class);
|
||||
List<GenericResource> ds = client.submit(query);
|
||||
for (GenericResource a : ds) ***REMOVED***
|
||||
ghost = a.profile().body().getElementsByTagName("svn.repository").item(0).getTextContent();
|
||||
***REMOVED***
|
||||
return ghost.trim();
|
||||
***REMOVED***
|
||||
|
||||
***REMOVED*** public String getSVNRepo() ***REMOVED***
|
||||
***REMOVED******REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** String ghost = "";
|
||||
***REMOVED*** SimpleQuery query = queryFor(GenericResource.class);
|
||||
***REMOVED*** query.addCondition("$resource/Profile/SecondaryType/text() eq 'DMPMConfigurator'").setResult("$resource");
|
||||
***REMOVED*** DiscoveryClient<GenericResource> client = clientFor(GenericResource.class);
|
||||
***REMOVED*** List<GenericResource> ds = client.submit(query);
|
||||
***REMOVED*** for (GenericResource a : ds) ***REMOVED***
|
||||
***REMOVED*** ghost = a.profile().body().getElementsByTagName("svn_repo").item(0).getTextContent();
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED*** return ghost;
|
||||
***REMOVED******REMOVED***
|
||||
|
||||
public String getSVNMainAlgoRepo() ***REMOVED***
|
||||
***REMOVED***
|
||||
|
||||
String ghost = "";
|
||||
SimpleQuery query = queryFor(GenericResource.class);
|
||||
query.addCondition("$resource/Profile/SecondaryType/text() eq 'DMPMConfigurator'").setResult("$resource");
|
||||
DiscoveryClient<GenericResource> client = clientFor(GenericResource.class);
|
||||
List<GenericResource> ds = client.submit(query);
|
||||
for (GenericResource a : ds) ***REMOVED***
|
||||
ghost = a.profile().body().getElementsByTagName("svn.algo.main.repo").item(0).getTextContent();
|
||||
***REMOVED***
|
||||
return ghost.trim();
|
||||
***REMOVED***
|
||||
|
||||
|
||||
public static void main(String[] args) throws IOException, SVNException ***REMOVED***
|
||||
DMPMClientConfigurator a = new DMPMClientConfigurator();
|
||||
ScopeProvider.instance.set("/gcube/devNext/NextNext");
|
||||
***REMOVED***SecurityTokenProvider.instance.set("***REMOVED***");
|
||||
|
||||
System.out.println(a.getSVNProdCRANDepsList());
|
||||
***REMOVED***System.out.println(a.getRepo());
|
||||
***REMOVED***System.out.println(a.getAlgoRepo());
|
||||
***REMOVED***System.out.println(a.getSVNRepo());
|
||||
|
||||
***REMOVED***
|
||||
***REMOVED***
|
|
@ -98,38 +98,6 @@ public class ISClient ***REMOVED***
|
|||
return h.getName();
|
||||
***REMOVED***
|
||||
|
||||
***REMOVED*** return the Cluster hostname from the IS
|
||||
***REMOVED*** to develop
|
||||
***REMOVED*** public Cluster getCluster()***REMOVED***
|
||||
***REMOVED*** Cluster cl = new Cluster();
|
||||
***REMOVED*** String HProxy = this.getHProxy();
|
||||
***REMOVED*** SimpleQuery query = queryFor(ServiceEndpoint.class);
|
||||
***REMOVED*** query.addCondition("$resource/Profile/Platform/Name/text() eq
|
||||
***REMOVED*** 'DataMiner'");
|
||||
***REMOVED*** DiscoveryClient<ServiceEndpoint> client =
|
||||
***REMOVED*** clientFor(ServiceEndpoint.class);
|
||||
***REMOVED*** List<ServiceEndpoint> resources = client.submit(query);
|
||||
***REMOVED*** cl.setName(resources.get(0).profile().runtime().hostedOn());
|
||||
***REMOVED*** return null;
|
||||
***REMOVED***
|
||||
***REMOVED*** ***REMOVED***
|
||||
|
||||
***REMOVED*** return the dataminer hostnames from the IS
|
||||
***REMOVED*** to develop
|
||||
***REMOVED*** public List<Host> getDM()***REMOVED***
|
||||
***REMOVED*** Cluster cl = new Cluster();
|
||||
***REMOVED*** String HProxy = this.getHProxy();
|
||||
***REMOVED*** SimpleQuery query = queryFor(ServiceEndpoint.class);
|
||||
***REMOVED*** query.addCondition("$resource/Profile/Platform/Name/text() eq
|
||||
***REMOVED*** 'DataMiner'");
|
||||
***REMOVED*** DiscoveryClient<ServiceEndpoint> client =
|
||||
***REMOVED*** clientFor(ServiceEndpoint.class);
|
||||
***REMOVED*** List<ServiceEndpoint> resources = client.submit(query);
|
||||
***REMOVED*** cl.setName(resources.get(0).profile().runtime().hostedOn());
|
||||
***REMOVED*** return null;
|
||||
***REMOVED***
|
||||
***REMOVED*** ***REMOVED***
|
||||
|
||||
|
||||
public Collection<Host> listDataminersInVRE() ***REMOVED***
|
||||
|
||||
|
@ -251,7 +219,7 @@ public class ISClient ***REMOVED***
|
|||
***REMOVED***
|
||||
***REMOVED***
|
||||
|
||||
|
||||
|
||||
***REMOVED*** public Set<Algorithm> getAlgoFromIs() ***REMOVED***
|
||||
***REMOVED******REMOVED***
|
||||
***REMOVED***
|
||||
|
@ -290,7 +258,7 @@ public class ISClient ***REMOVED***
|
|||
***REMOVED*** return out;
|
||||
***REMOVED******REMOVED***
|
||||
|
||||
|
||||
|
||||
|
||||
public static void main(String[] args) throws IOException, SVNException ***REMOVED***
|
||||
ISClient a = new ISClient();
|
||||
|
@ -307,7 +275,7 @@ public class ISClient ***REMOVED***
|
|||
***REMOVED*** list.add(aa);
|
||||
|
||||
***REMOVED*** a.checkSVNdep();
|
||||
System.out.println(a.getDataminer("dataminer1-d-d4s.d4science.org").getDomain());
|
||||
***REMOVED***System.out.println(a.getDataminer("dataminer1-d-d4s.d4science.org").getDomain());
|
||||
***REMOVED*** System.out.println(a.listDataminersInVRE());
|
||||
***REMOVED***
|
||||
***REMOVED***
|
||||
|
|
|
@ -156,7 +156,7 @@ public class StagingJob extends DMPMJob ***REMOVED***
|
|||
***REMOVED***
|
||||
|
||||
|
||||
public String buildInfo()***REMOVED***
|
||||
public String buildInfo() throws UnsupportedEncodingException***REMOVED***
|
||||
ServiceConfiguration a = new ServiceConfiguration();
|
||||
return
|
||||
"\n"+
|
||||
|
|
|
@ -485,9 +485,9 @@ public class CheckMethod ***REMOVED***
|
|||
***REMOVED*** "2eceaf27-0e22-4dbe-8075-e09eff199bf9-98187548"));
|
||||
|
||||
***REMOVED***System.out.println(a.checkMethod("dataminer-proto-ghost.d4science.org",
|
||||
***REMOVED*** "***REMOVED***"));
|
||||
***REMOVED*** "***REMOVED***"));
|
||||
|
||||
System.out.println(a.checkMethod("dataminer-ghost-d.dev.d4science.org",
|
||||
System.out.println(a.checkMethod("dataminer-ghost-d.dev.d4science.org",
|
||||
"***REMOVED***"));
|
||||
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ import org.apache.commons.io.FileUtils;
|
|||
import org.gcube.dataanalysis.dataminer.poolmanager.datamodel.Dependency;
|
||||
***REMOVED***
|
||||
import org.tmatesoft.svn.core.SVNNodeKind;
|
||||
import org.tmatesoft.svn.core.SVNProperty;
|
||||
import org.tmatesoft.svn.core.SVNURL;
|
||||
import org.tmatesoft.svn.core.auth.ISVNAuthenticationManager;
|
||||
import org.tmatesoft.svn.core.internal.wc.SVNFileUtil;
|
||||
|
@ -159,7 +160,6 @@ public String getDependencyFileProd(String language/*, String env*/)***REMOVED**
|
|||
***REMOVED***
|
||||
|
||||
|
||||
|
||||
public void updateAlgorithmFiles(File a) throws SVNException***REMOVED***
|
||||
***REMOVED***this.updateAlgorithmList(this.configuration.getSVNMainAlgoRepo(), a);
|
||||
this.updateAlgorithmList(this.configuration.getStageRepository(), a);
|
||||
|
@ -276,7 +276,6 @@ public String getDependencyFileProd(String language/*, String env*/)***REMOVED**
|
|||
final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
||||
svnRepository.getFile(file, SVNRepository.INVALID_REVISION, null, byteArrayOutputStream);
|
||||
String lines[] = byteArrayOutputStream.toString().split("\\r?\\n");
|
||||
|
||||
|
||||
List<String> newContent = new LinkedList<>(Arrays.asList(lines));
|
||||
|
||||
|
@ -303,7 +302,7 @@ public String getDependencyFileProd(String language/*, String env*/)***REMOVED**
|
|||
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
|
||||
for (String line : newContent) ***REMOVED***
|
||||
for (String line : newContent) ***REMOVED***
|
||||
baos.write(line.getBytes());
|
||||
baos.write("\n".getBytes());
|
||||
***REMOVED***
|
||||
|
@ -506,6 +505,7 @@ public String getDependencyFileProd(String language/*, String env*/)***REMOVED**
|
|||
for (String line : aa) ***REMOVED***
|
||||
baos.write(line.getBytes());
|
||||
baos.write("\n".getBytes());
|
||||
|
||||
***REMOVED***
|
||||
byte[] bytes = baos.toByteArray();
|
||||
|
||||
|
@ -513,6 +513,8 @@ public String getDependencyFileProd(String language/*, String env*/)***REMOVED**
|
|||
|
||||
final String checksum = deltaGenerator.sendDelta(file, new ByteArrayInputStream(originalContents), 0,
|
||||
new ByteArrayInputStream(bytes), commitEditor, true);
|
||||
|
||||
|
||||
commitEditor.closeFile(file, checksum);
|
||||
commitEditor.closeEdit();
|
||||
|
||||
|
@ -562,7 +564,7 @@ public String getDependencyFileProd(String language/*, String env*/)***REMOVED**
|
|||
|
||||
public static void main(String[] args) throws SVNException, ParseException ***REMOVED***
|
||||
|
||||
ServiceConfiguration sc = new ServiceConfiguration("/home/ngalante/workspace/dataminer-pool-manager/src/main/resources/service.properties");
|
||||
ServiceConfiguration sc = new ServiceConfiguration();
|
||||
|
||||
SVNUpdater c = new SVNUpdater(sc);
|
||||
|
||||
|
|
|
@ -5,336 +5,342 @@ import java.io.FileNotFoundException;
|
|||
***REMOVED***
|
||||
import java.util.Properties;
|
||||
|
||||
public class ServiceConfiguration ***REMOVED***
|
||||
public static String home = System.getProperty("user.home");
|
||||
***REMOVED***
|
||||
import org.gcube.dataanalysis.dataminer.poolmanager.clients.DMPMClientConfigurator;
|
||||
import org.gcube.dataanalysis.dataminer.poolmanager.clients.ISClient;
|
||||
|
||||
private Properties props;
|
||||
public class ServiceConfiguration ***REMOVED***
|
||||
***REMOVED*** public static String home = System.getProperty("user.home");
|
||||
DMPMClientConfigurator dmpc = new DMPMClientConfigurator();
|
||||
***REMOVED*** private Properties props;
|
||||
|
||||
public ServiceConfiguration() ***REMOVED***
|
||||
this(home+"/dataminer-pool-manager/dpmConfig/service.properties");
|
||||
***REMOVED*** this(home+"/dataminer-pool-manager/dpmConfig/service.properties");
|
||||
***REMOVED***
|
||||
|
||||
public ServiceConfiguration(String configFile) ***REMOVED***
|
||||
this.props = new Properties();
|
||||
|
||||
FileInputStream input;
|
||||
|
||||
try ***REMOVED***
|
||||
input = new FileInputStream(configFile);
|
||||
***REMOVED*** loading properites from properties file
|
||||
try ***REMOVED***
|
||||
props.load(input);
|
||||
***REMOVED*** catch (IOException e) ***REMOVED***
|
||||
***REMOVED*** TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
***REMOVED***
|
||||
***REMOVED*** catch (FileNotFoundException e1) ***REMOVED***
|
||||
***REMOVED*** TODO Auto-generated catch block
|
||||
e1.printStackTrace();
|
||||
***REMOVED*** public ServiceConfiguration(String configFile) ***REMOVED***
|
||||
***REMOVED*** this.props = new Properties();
|
||||
***REMOVED***
|
||||
***REMOVED*** FileInputStream input;
|
||||
***REMOVED***
|
||||
***REMOVED*** try ***REMOVED***
|
||||
***REMOVED*** input = new FileInputStream(configFile);
|
||||
***REMOVED*** ***REMOVED*** loading properites from properties file
|
||||
***REMOVED*** try ***REMOVED***
|
||||
***REMOVED*** props.load(input);
|
||||
***REMOVED*** ***REMOVED*** catch (IOException e) ***REMOVED***
|
||||
***REMOVED*** ***REMOVED*** TODO Auto-generated catch block
|
||||
***REMOVED*** e.printStackTrace();
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED*** ***REMOVED*** catch (FileNotFoundException e1) ***REMOVED***
|
||||
***REMOVED*** ***REMOVED*** TODO Auto-generated catch block
|
||||
***REMOVED*** e1.printStackTrace();
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED*** ***REMOVED***
|
||||
|
||||
public String getSVNRepository() ***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.repository");
|
||||
return dmpc.getSVNRepository();
|
||||
***REMOVED***
|
||||
|
||||
|
||||
|
||||
public String getSVNRepository()***REMOVED***
|
||||
return props.getProperty("svn.repository");
|
||||
***REMOVED***
|
||||
|
||||
|
||||
public String getSVNMainAlgoRepo()***REMOVED***
|
||||
return props.getProperty("svn.algo.main.repo");
|
||||
***REMOVED***
|
||||
|
||||
|
||||
public String getStageRepository()***REMOVED***
|
||||
return props.getProperty("svn.stage.software.repo");
|
||||
***REMOVED***
|
||||
|
||||
public String getProdRepository()***REMOVED***
|
||||
return props.getProperty("svn.prod.software.repo");
|
||||
***REMOVED***
|
||||
|
||||
|
||||
public String getGhostAlgoDirectory()***REMOVED***
|
||||
return props.getProperty("svn.stage.algo.ghost.repo");
|
||||
***REMOVED***
|
||||
|
||||
|
||||
public String getProdGhostAlgoDirectory()***REMOVED***
|
||||
return props.getProperty("svn.prod.algo.ghost.repo");
|
||||
***REMOVED***
|
||||
|
||||
|
||||
***REMOVED***RProto
|
||||
***REMOVED*** public String getSVNRProtoAlgorithmsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.rproto.algorithms-list");
|
||||
***REMOVED******REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNRProtoLinuxCompiledDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.rproto.deps-linux-compiled");
|
||||
***REMOVED******REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNRProtoCRANDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.rproto.deps-r");
|
||||
***REMOVED******REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNRProtoPreInstalledDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.rproto.deps-pre-installed");
|
||||
***REMOVED******REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNRProtoRBDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.rproto.deps-r-blackbox");
|
||||
***REMOVED******REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNRProtoJavaDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.rproto.deps-java");
|
||||
***REMOVED******REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNRProtoKWDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.rproto.deps-knime-workflow");
|
||||
***REMOVED******REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNRProtoOctaveDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.rproto.deps-octave");
|
||||
***REMOVED******REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNRProtoPythonDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.rproto.deps-python");
|
||||
***REMOVED******REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNRProtoWCDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.rproto.deps-windows-compiled");
|
||||
***REMOVED******REMOVED***
|
||||
|
||||
|
||||
***REMOVED***Prod
|
||||
public String getSVNProdAlgorithmsList()***REMOVED***
|
||||
return props.getProperty("svn.prod.algorithms-list");
|
||||
public String getSVNMainAlgoRepo() ***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.algo.main.repo");
|
||||
return dmpc.getSVNMainAlgoRepo();
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNProdLinuxCompiledDepsList()***REMOVED***
|
||||
return props.getProperty("svn.prod.deps-linux-compiled");
|
||||
public String getStageRepository() ***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.stage.software.repo");
|
||||
return dmpc.getStageRepository();
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNProdCRANDepsList()***REMOVED***
|
||||
return props.getProperty("svn.prod.deps-r");
|
||||
public String getProdRepository() ***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.prod.software.repo");
|
||||
return dmpc.getProdRepository();
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNProdPreInstalledDepsList()***REMOVED***
|
||||
return props.getProperty("svn.prod.deps-pre-installed");
|
||||
public String getGhostAlgoDirectory() ***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.stage.algo.ghost.repo");
|
||||
return dmpc.getGhostAlgoDirectory();
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNProdRBDepsList()***REMOVED***
|
||||
return props.getProperty("svn.prod.deps-r-blackbox");
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNProdJavaDepsList()***REMOVED***
|
||||
return props.getProperty("svn.prod.deps-java");
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNProdKWDepsList()***REMOVED***
|
||||
return props.getProperty("svn.prod.deps-knime-workflow");
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNProdOctaveDepsList()***REMOVED***
|
||||
return props.getProperty("svn.prod.deps-octave");
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNProdPythonDepsList()***REMOVED***
|
||||
return props.getProperty("svn.prod.deps-python");
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNProdWCDepsList()***REMOVED***
|
||||
return props.getProperty("svn.prod.deps-windows-compiled");
|
||||
***REMOVED***
|
||||
|
||||
|
||||
|
||||
***REMOVED***PreProd
|
||||
***REMOVED*** public String getSVNPreProdAlgorithmsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.preprod.algorithms-list");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNPreProdLinuxCompiledDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.preprod.deps-linux-compiled");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNPreProdCRANDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.preprod.deps-r");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNPreProdPreInstalledDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.preprod.deps-pre-installed");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNPreProdRBDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.preprod.deps-r-blackbox");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNPreProdJavaDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.preprod.deps-java");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNPreProdKWDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.preprod.deps-knime-workflow");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNPreProdOctaveDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.preprod.deps-octave");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNPreProdPythonDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.preprod.deps-python");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNPreProdWCDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.preprod.deps-windows-compiled");
|
||||
***REMOVED*** ***REMOVED***
|
||||
|
||||
|
||||
|
||||
***REMOVED***dev
|
||||
***REMOVED*** public String getSVNDevAlgorithmsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.dev.algorithms-list");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNDevLinuxCompiledDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.dev.deps-linux-compiled");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNDevCRANDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.dev.deps-r");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNDevPreInstalledDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.dev.deps-pre-installed");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNDevRBDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.dev.deps-r-blackbox");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNDevJavaDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.dev.deps-java");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNDevKWDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.dev.deps-knime-workflow");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNDevOctaveDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.dev.deps-octave");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNDevPythonDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.dev.deps-python");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNDevWCDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.dev.deps-windows-compiled");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED***
|
||||
|
||||
|
||||
|
||||
***REMOVED*** public String getCSVUrl() ***REMOVED***
|
||||
***REMOVED*** return props.getProperty("HAPROXY_CSV");
|
||||
***REMOVED******REMOVED***
|
||||
public String getProdGhostAlgoDirectory() ***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.prod.algo.ghost.repo");
|
||||
return dmpc.getProdGhostAlgoDirectory();
|
||||
***REMOVED***
|
||||
|
||||
***REMOVED*** RProto
|
||||
***REMOVED*** public String getSVNRProtoAlgorithmsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.rproto.algorithms-list");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNRProtoLinuxCompiledDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.rproto.deps-linux-compiled");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNRProtoCRANDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.rproto.deps-r");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNRProtoPreInstalledDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.rproto.deps-pre-installed");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNRProtoRBDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.rproto.deps-r-blackbox");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNRProtoJavaDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.rproto.deps-java");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNRProtoKWDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.rproto.deps-knime-workflow");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNRProtoOctaveDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.rproto.deps-octave");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNRProtoPythonDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.rproto.deps-python");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNRProtoWCDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.rproto.deps-windows-compiled");
|
||||
***REMOVED*** ***REMOVED***
|
||||
|
||||
***REMOVED*** Prod
|
||||
public String getSVNProdAlgorithmsList() ***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.prod.algorithms-list");
|
||||
return dmpc.getSVNProdAlgorithmsList();
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNProdLinuxCompiledDepsList() ***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.prod.deps-linux-compiled");
|
||||
return dmpc.getSVNProdLinuxCompiledDepsList();
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNProdCRANDepsList() ***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.prod.deps-r");
|
||||
return dmpc.getSVNProdCRANDepsList();
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNProdPreInstalledDepsList() ***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.prod.deps-pre-installed");
|
||||
return dmpc.getSVNProdPreInstalledDepsList();
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNProdRBDepsList() ***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.prod.deps-r-blackbox");
|
||||
return dmpc.getSVNProdRBDepsList();
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNProdJavaDepsList() ***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.prod.deps-java");
|
||||
return dmpc.getSVNProdJavaDepsList();
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNProdKWDepsList() ***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.prod.deps-knime-workflow");
|
||||
return dmpc.getSVNProdKWDepsList();
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNProdOctaveDepsList() ***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.prod.deps-octave");
|
||||
return dmpc.getSVNProdOctaveDepsList();
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNProdPythonDepsList() ***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.prod.deps-python");
|
||||
return dmpc.getSVNProdPythonDepsList();
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNProdWCDepsList() ***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.prod.deps-windows-compiled");
|
||||
return dmpc.getSVNProdWCDepsList();
|
||||
***REMOVED***
|
||||
|
||||
***REMOVED*** PreProd
|
||||
***REMOVED*** public String getSVNPreProdAlgorithmsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.preprod.algorithms-list");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNPreProdLinuxCompiledDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.preprod.deps-linux-compiled");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNPreProdCRANDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.preprod.deps-r");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNPreProdPreInstalledDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.preprod.deps-pre-installed");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNPreProdRBDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.preprod.deps-r-blackbox");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNPreProdJavaDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.preprod.deps-java");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNPreProdKWDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.preprod.deps-knime-workflow");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNPreProdOctaveDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.preprod.deps-octave");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNPreProdPythonDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.preprod.deps-python");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNPreProdWCDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.preprod.deps-windows-compiled");
|
||||
***REMOVED*** ***REMOVED***
|
||||
|
||||
***REMOVED*** dev
|
||||
***REMOVED*** public String getSVNDevAlgorithmsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.dev.algorithms-list");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNDevLinuxCompiledDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.dev.deps-linux-compiled");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNDevCRANDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.dev.deps-r");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNDevPreInstalledDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.dev.deps-pre-installed");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNDevRBDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.dev.deps-r-blackbox");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNDevJavaDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.dev.deps-java");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNDevKWDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.dev.deps-knime-workflow");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNDevOctaveDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.dev.deps-octave");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNDevPythonDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.dev.deps-python");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getSVNDevWCDepsList()***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.dev.deps-windows-compiled");
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED***
|
||||
|
||||
***REMOVED*** public String getCSVUrl() ***REMOVED***
|
||||
***REMOVED*** return props.getProperty("HAPROXY_CSV");
|
||||
***REMOVED*** ***REMOVED***
|
||||
|
||||
***REMOVED*** public String getHost(String env)***REMOVED***
|
||||
***REMOVED*** String a = "";
|
||||
***REMOVED***
|
||||
***REMOVED*** if (env.equals("Dev")||(env.equals("Preprod")))***REMOVED***
|
||||
***REMOVED*** a = this.getDevStagingHost().trim();
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** if (env.equals("Prod")||(env.equals("Proto")))***REMOVED***
|
||||
***REMOVED*** a = this.getProtoProdStagingHost().trim();
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED*** return a;
|
||||
***REMOVED*** ***REMOVED***
|
||||
|
||||
***REMOVED*** public String getDevStagingHost() ***REMOVED***
|
||||
***REMOVED*** return props.getProperty("DEV_STAGING_HOST");
|
||||
***REMOVED*** ***REMOVED***
|
||||
|
||||
|
||||
***REMOVED*** public String getHost(String env)***REMOVED***
|
||||
***REMOVED*** String a = "";
|
||||
***REMOVED***
|
||||
***REMOVED*** if (env.equals("Dev")||(env.equals("Preprod")))***REMOVED***
|
||||
***REMOVED*** a = this.getDevStagingHost().trim();
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED***
|
||||
***REMOVED*** if (env.equals("Prod")||(env.equals("Proto")))***REMOVED***
|
||||
***REMOVED*** a = this.getProtoProdStagingHost().trim();
|
||||
***REMOVED*** ***REMOVED***
|
||||
***REMOVED*** return a;
|
||||
***REMOVED******REMOVED***
|
||||
|
||||
|
||||
|
||||
***REMOVED*** public String getDevStagingHost() ***REMOVED***
|
||||
***REMOVED*** return props.getProperty("DEV_STAGING_HOST");
|
||||
***REMOVED******REMOVED***
|
||||
|
||||
public String getStagingHost() ***REMOVED***
|
||||
return props.getProperty("STAGE_GHOST");
|
||||
***REMOVED*** return props.getProperty("STAGE_GHOST");
|
||||
return dmpc.getStagingHost();
|
||||
***REMOVED***
|
||||
|
||||
|
||||
|
||||
public String getProdHost() ***REMOVED***
|
||||
return props.getProperty("PROD_GHOST");
|
||||
***REMOVED*** return props.getProperty("PROD_GHOST");
|
||||
return dmpc.getProdHost();
|
||||
***REMOVED***
|
||||
|
||||
***REMOVED*** public String getProtoProdStagingHost() ***REMOVED***
|
||||
***REMOVED*** return props.getProperty("PROTO_PROD_STAGING_HOST");
|
||||
***REMOVED******REMOVED***
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
***REMOVED***Staging
|
||||
public String getSVNStagingAlgorithmsList()***REMOVED***
|
||||
return props.getProperty("svn.stage.algorithms-list");
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNStagingLinuxCompiledDepsList()***REMOVED***
|
||||
return props.getProperty("svn.stage.deps-linux-compiled");
|
||||
***REMOVED***
|
||||
***REMOVED*** public String getProtoProdStagingHost() ***REMOVED***
|
||||
***REMOVED*** return props.getProperty("PROTO_PROD_STAGING_HOST");
|
||||
***REMOVED*** ***REMOVED***
|
||||
|
||||
public String getSVNStagingCRANDepsList()***REMOVED***
|
||||
return props.getProperty("svn.stage.deps-r");
|
||||
***REMOVED***
|
||||
***REMOVED*** Staging
|
||||
public String getSVNStagingAlgorithmsList() ***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.stage.algorithms-list");
|
||||
return dmpc.getSVNStagingAlgorithmsList();
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNStagingPreInstalledDepsList()***REMOVED***
|
||||
return props.getProperty("svn.stage.deps-pre-installed");
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNStagingRBDepsList()***REMOVED***
|
||||
return props.getProperty("svn.stage.deps-r-blackbox");
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNStagingJavaDepsList()***REMOVED***
|
||||
return props.getProperty("svn.stage.deps-java");
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNStagingKWDepsList()***REMOVED***
|
||||
return props.getProperty("svn.stage.deps-knime-workflow");
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNStagingOctaveDepsList()***REMOVED***
|
||||
return props.getProperty("svn.stage.deps-octave");
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNStagingPythonDepsList()***REMOVED***
|
||||
return props.getProperty("svn.stage.deps-python");
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNStagingWCDepsList()***REMOVED***
|
||||
return props.getProperty("svn.stage.deps-windows-compiled");
|
||||
***REMOVED***
|
||||
|
||||
|
||||
|
||||
|
||||
public String getSVNStagingLinuxCompiledDepsList() ***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.stage.deps-linux-compiled");
|
||||
return dmpc.getSVNStagingLinuxCompiledDepsList();
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNStagingCRANDepsList() ***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.stage.deps-r");
|
||||
return dmpc.getSVNStagingCRANDepsList();
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNStagingPreInstalledDepsList() ***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.stage.deps-pre-installed");
|
||||
return dmpc.getSVNStagingPreInstalledDepsList();
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNStagingRBDepsList() ***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.stage.deps-r-blackbox");
|
||||
return dmpc.getSVNStagingRBDepsList();
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNStagingJavaDepsList() ***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.stage.deps-java");
|
||||
return dmpc.getSVNStagingJavaDepsList();
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNStagingKWDepsList() ***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.stage.deps-knime-workflow");
|
||||
return dmpc.getSVNStagingKWDepsList();
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNStagingOctaveDepsList() ***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.stage.deps-octave");
|
||||
return dmpc.getSVNStagingOctaveDepsList();
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNStagingPythonDepsList() ***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.stage.deps-python");
|
||||
return dmpc.getSVNStagingPythonDepsList();
|
||||
***REMOVED***
|
||||
|
||||
public String getSVNStagingWCDepsList() ***REMOVED***
|
||||
***REMOVED*** return props.getProperty("svn.stage.deps-windows-compiled");
|
||||
return dmpc.getSVNStagingWCDepsList();
|
||||
***REMOVED***
|
||||
|
||||
public static void main(String[] args) throws FileNotFoundException ***REMOVED***
|
||||
ServiceConfiguration a = new ServiceConfiguration();
|
||||
***REMOVED***System.out.println(a.getStagingHost());
|
||||
***REMOVED***System.out.println(a.getDevStagingHost());
|
||||
***REMOVED***System.out.println(a.getProtoProdStagingHost());
|
||||
***REMOVED***System.out.println(a.getCSVUrl());
|
||||
***REMOVED***System.out.println(a.getSVNMainAlgoRepo());
|
||||
***REMOVED***System.out.println(a.getSVNRProtoCRANDepsList());
|
||||
***REMOVED***System.out.println(a.getProdHost());
|
||||
System.out.println(a.getSVNProdRBDepsList());
|
||||
***REMOVED***ServiceConfiguration a = new ServiceConfiguration();
|
||||
ScopeProvider.instance.set("/gcube/devNext/NextNext");
|
||||
***REMOVED*** System.out.println(a.getStagingHost());
|
||||
***REMOVED*** System.out.println(a.getDevStagingHost());
|
||||
***REMOVED*** System.out.println(a.getProtoProdStagingHost());
|
||||
***REMOVED*** System.out.println(a.getCSVUrl());
|
||||
***REMOVED*** System.out.println(a.getSVNMainAlgoRepo());
|
||||
***REMOVED*** System.out.println(a.getSVNRProtoCRANDepsList());
|
||||
***REMOVED*** System.out.println(a.getProdHost());
|
||||
***REMOVED***System.out.println(a.getSVNProdRBDepsList());
|
||||
***REMOVED***
|
||||
|
||||
|
||||
***REMOVED***
|
||||
|
|
|
@ -1,30 +1,56 @@
|
|||
package org.gcube.dataanalysis.dataminerpoolmanager;
|
||||
|
||||
import org.gcube.dataanalysis.dataminer.poolmanager.clients.DMPMClientConfigurator;
|
||||
***REMOVED***
|
||||
***REMOVED***
|
||||
import org.gcube.dataanalysis.dataminer.poolmanager.util.SVNUpdater;
|
||||
import org.gcube.dataanalysis.dataminer.poolmanager.util.ServiceConfiguration;
|
||||
***REMOVED***
|
||||
import org.tmatesoft.svn.core.SVNURL;
|
||||
import org.tmatesoft.svn.core.auth.ISVNAuthenticationManager;
|
||||
import org.tmatesoft.svn.core.internal.wc.SVNFileUtil;
|
||||
import org.tmatesoft.svn.core.internal.wc.admin.SVNChecksumInputStream;
|
||||
import org.tmatesoft.svn.core.io.ISVNEditor;
|
||||
import org.tmatesoft.svn.core.io.SVNRepository;
|
||||
import org.tmatesoft.svn.core.io.SVNRepositoryFactory;
|
||||
import org.tmatesoft.svn.core.io.diff.SVNDeltaGenerator;
|
||||
import org.tmatesoft.svn.core.wc.SVNWCUtil;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
***REMOVED***
|
||||
import java.text.DateFormat;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.LinkedList;
|
||||
***REMOVED***
|
||||
import java.util.TimeZone;
|
||||
|
||||
/**
|
||||
* Created by ggiammat on 5/17/17.
|
||||
*/
|
||||
public class SVNTests ***REMOVED***
|
||||
|
||||
|
||||
|
||||
|
||||
public static void main(String[] args) throws SVNException, IOException, InterruptedException ***REMOVED***
|
||||
|
||||
|
||||
SVNUpdater svnUpdater = new SVNUpdater(new ServiceConfiguration("/home/ngalante/workspace/dataminer-pool-manager/src/main/resources/service.properties"));
|
||||
SVNUpdater svnUpdater = new SVNUpdater(new ServiceConfiguration());
|
||||
|
||||
Algorithm algo = AlgorithmBuilder.create("http:***REMOVED***data.d4science.org/cnFLNHYxR1ZDa1VNdEhrTUQyQlZjaWRBVVZlUHloUitHbWJQNStIS0N6Yz0");
|
||||
Algorithm algo = AlgorithmBuilder.create("http:***REMOVED***data.d4science.org/YjJ3TmJab1dqYzVoTmppdjlsK0l0b1ZXWGtzWlQ1NHNHbWJQNStIS0N6Yz0");
|
||||
***REMOVED***algo.setClazz(algo.getClazz() + "TEST");
|
||||
System.out.println(algo.getAlgorithmType());
|
||||
System.out.println(algo.getCategory());
|
||||
System.out.println(algo.getSkipJava());
|
||||
algo.setAlgorithmType("transducerers");
|
||||
algo.setCategory("NLP");
|
||||
algo.setFullname("Ondřej Košarko");
|
||||
***REMOVED***System.out.println(algo.getCategory());
|
||||
***REMOVED***System.out.println(algo.getSkipJava());
|
||||
|
||||
svnUpdater.updateSVNAlgorithmList("/trunk/data-analysis/DataMinerConfiguration/algorithms/dev/algorithms", algo, "/gcube/devNext/NextNext", algo.getCategory(), algo.getAlgorithmType(), "");
|
||||
|
||||
***REMOVED***svnUpdater.updateSVNRProtoAlgorithmList(algo, "/d4science.research-infrastructures.eu/gCubeApps/RPrototypingLab", "Dataminer Pool Manager", "Proto");
|
||||
***REMOVED***svnUpdater.readRPRotoDeps(algo);
|
||||
***REMOVED***
|
||||
|
|
Loading…
Reference in New Issue