Compare commits
No commits in common. "master" and "model-reorganization" have entirely different histories.
master
...
model-reor
36
CHANGELOG.md
36
CHANGELOG.md
|
@ -1,36 +0,0 @@
|
|||
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
# Changelog for Information System Exporter Smart Executor Plugin
|
||||
|
||||
|
||||
## [v2.0.0-SNAPSHOT]
|
||||
|
||||
- Ported plugin to smart-executor APIs 3.0.0 [#21617]
|
||||
- Switched JSON management to gcube-jackson [#19116]
|
||||
- Switched smart-executor JSON management to gcube-jackson [#19647]
|
||||
- Refactored code to support IS Model reorganization (e.g naming, packages)
|
||||
- Refactored code to support renaming of Embedded class to Property [#13274]
|
||||
- Starting to use the new Encrypted property type [#12812]
|
||||
- Updated smart-executor-bom
|
||||
|
||||
|
||||
## [v1.3.0] [r4.13.0] - 2018-11-20
|
||||
|
||||
- Using resource-registry 2.0.0 APIs [#11949]
|
||||
|
||||
|
||||
## [v1.2.0] [r4.9.0] - 2017-12-20
|
||||
|
||||
- Creating uber-jar instead of jar-with-dependencies and using new make-servicearchive directive [#10159]
|
||||
- Using new APIs signature [#10318]
|
||||
|
||||
|
||||
## [v1.1.0] [r4.6.0] - 2017-07-25
|
||||
|
||||
- Removed List and Set usage as workaround for OrientDB bug [#9021]
|
||||
|
||||
|
||||
## [v1.0.0] [r4.5.0] - 2017-06-07
|
||||
|
||||
- First Release [#7666]
|
||||
|
26
FUNDING.md
26
FUNDING.md
|
@ -1,26 +0,0 @@
|
|||
# Acknowledgments
|
||||
|
||||
The projects leading to this software have received funding from a series of European Union programmes including:
|
||||
|
||||
- the Sixth Framework Programme for Research and Technological Development
|
||||
- [DILIGENT](https://cordis.europa.eu/project/id/004260) (grant no. 004260).
|
||||
- the Seventh Framework Programme for research, technological development and demonstration
|
||||
- [D4Science](https://cordis.europa.eu/project/id/212488) (grant no. 212488);
|
||||
- [D4Science-II](https://cordis.europa.eu/project/id/239019) (grant no.239019);
|
||||
- [ENVRI](https://cordis.europa.eu/project/id/283465) (grant no. 283465);
|
||||
- [iMarine](https://cordis.europa.eu/project/id/283644) (grant no. 283644);
|
||||
- [EUBrazilOpenBio](https://cordis.europa.eu/project/id/288754) (grant no. 288754).
|
||||
- the H2020 research and innovation programme
|
||||
- [SoBigData](https://cordis.europa.eu/project/id/654024) (grant no. 654024);
|
||||
- [PARTHENOS](https://cordis.europa.eu/project/id/654119) (grant no. 654119);
|
||||
- [EGI-Engage](https://cordis.europa.eu/project/id/654142) (grant no. 654142);
|
||||
- [ENVRI PLUS](https://cordis.europa.eu/project/id/654182) (grant no. 654182);
|
||||
- [BlueBRIDGE](https://cordis.europa.eu/project/id/675680) (grant no. 675680);
|
||||
- [PerformFISH](https://cordis.europa.eu/project/id/727610) (grant no. 727610);
|
||||
- [AGINFRA PLUS](https://cordis.europa.eu/project/id/731001) (grant no. 731001);
|
||||
- [DESIRA](https://cordis.europa.eu/project/id/818194) (grant no. 818194);
|
||||
- [ARIADNEplus](https://cordis.europa.eu/project/id/823914) (grant no. 823914);
|
||||
- [RISIS 2](https://cordis.europa.eu/project/id/824091) (grant no. 824091);
|
||||
- [EOSC-Pillar](https://cordis.europa.eu/project/id/857650) (grant no. 857650);
|
||||
- [Blue Cloud](https://cordis.europa.eu/project/id/862409) (grant no. 862409);
|
||||
- [SoBigData-PlusPlus](https://cordis.europa.eu/project/id/871042) (grant no. 871042);
|
27
README.md
27
README.md
|
@ -37,16 +37,37 @@ Tell people how to cite this software.
|
|||
url = {http://www.gcube-system.org/}
|
||||
}
|
||||
|
||||
### License
|
||||
## License
|
||||
|
||||
This project is licensed under the EUPL V.1.1 License - see the [LICENSE.md](LICENSE.md) file for details.
|
||||
|
||||
|
||||
## About the gCube Framework
|
||||
|
||||
This software is part of the [gCubeFramework](https://www.gcube-system.org/ "gCubeFramework"): an
|
||||
open-source software toolkit used for building and operating Hybrid Data
|
||||
Infrastructures enabling the dynamic deployment of Virtual Research Environments
|
||||
by favouring the realisation of reuse oriented policies.
|
||||
|
||||
The projects leading to this software have received funding from a series of European Union programmes see [FUNDING.md](FUNDING.md)
|
||||
The projects leading to this software have received funding from a series of European Union programmes including:
|
||||
|
||||
- the Sixth Framework Programme for Research and Technological Development
|
||||
- DILIGENT (grant no. 004260).
|
||||
- the Seventh Framework Programme for research, technological development and demonstration
|
||||
- D4Science (grant no. 212488);
|
||||
- D4Science-II (grant no.239019);
|
||||
- ENVRI (grant no. 283465);
|
||||
- iMarine(grant no. 283644);
|
||||
- EUBrazilOpenBio (grant no. 288754).
|
||||
- the H2020 research and innovation programme
|
||||
- SoBigData (grant no. 654024);
|
||||
- PARTHENOS (grant no. 654119);
|
||||
- EGIEngage (grant no. 654142);
|
||||
- ENVRIplus (grant no. 654182);
|
||||
- BlueBRIDGE (grant no. 675680);
|
||||
- PerformFish (grant no. 727610);
|
||||
- AGINFRAplus (grant no. 731001);
|
||||
- DESIRA (grant no. 818194);
|
||||
- ARIADNEplus (grant no. 823914);
|
||||
- RISIS2 (grant no. 824091);
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE xml>
|
||||
<ReleaseNotes>
|
||||
<Changeset component="org.gcube.information-system.is-exporter-se-plugin.1-4-0" date="${buildDate}">
|
||||
<Change>Refactored code to support IS Model reorganization (e.g naming, packages)</Change>
|
||||
<Change>Refactored code to support renaming of Embedded class to Property #13274</Change>
|
||||
<Change>Starting to use the new Encrypted property type #12812</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.information-system.is-exporter-se-plugin.1-3-0" date="2018-11-20">
|
||||
<Change>Using resource-regsitry v2 apis #11949</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.information-system.is-exporter-se-plugin.1-2-0" date="2017-12-20">
|
||||
<Change>Creating uber-jar instead of jar-with-dependencies and using new make-servicearchive directive #10159</Change>
|
||||
<Change>Using new APIs signature #10318</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.information-system.is-exporter-se-plugin.1-1-0" date="2017-07-25">
|
||||
<Change>Removed List and Set usage as workaround fo OrientDB bug #9021</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.information-system.is-exporter-se-plugin.1-0-0" date="2017-06-07">
|
||||
<Change>First Release</Change>
|
||||
</Changeset>
|
||||
</ReleaseNotes>
|
|
@ -1,4 +0,0 @@
|
|||
groupId=${groupId}
|
||||
artifactId=${artifactId}
|
||||
version=${version}
|
||||
description=${description}
|
28
pom.xml
28
pom.xml
|
@ -10,7 +10,7 @@
|
|||
|
||||
<groupId>org.gcube.information-system</groupId>
|
||||
<artifactId>is-exporter-se-plugin</artifactId>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
<version>1.4.0-SNAPSHOT</version>
|
||||
<name>Information System Exporter Smart Executor Plugin</name>
|
||||
<description>
|
||||
Information System Exporter Smart Executor Plugin exports
|
||||
|
@ -36,7 +36,14 @@
|
|||
<dependency>
|
||||
<groupId>org.gcube.vremanagement</groupId>
|
||||
<artifactId>smart-executor-bom</artifactId>
|
||||
<version>3.1.0-SNAPSHOT</version>
|
||||
<version>1.0.0</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.gcube.information-system</groupId>
|
||||
<artifactId>information-system-bom</artifactId>
|
||||
<version>1.5.0</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
@ -144,6 +151,23 @@
|
|||
<goal>single</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>tar.gz</id>
|
||||
<configuration>
|
||||
<appendAssemblyId>false</appendAssemblyId>
|
||||
<descriptors>
|
||||
<descriptor>tar-gz.xml</descriptor>
|
||||
</descriptors>
|
||||
</configuration>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>make-servicearchive</id>
|
||||
<phase>package</phase>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
|
|
@ -14,7 +14,7 @@ import org.slf4j.LoggerFactory;
|
|||
/**
|
||||
* @author Luca Frosini (ISTI - CNR)
|
||||
*/
|
||||
public class ISExporterPlugin extends Plugin {
|
||||
public class ISExporterPlugin extends Plugin<ISExporterPluginDeclaration> {
|
||||
|
||||
/**
|
||||
* Logger
|
||||
|
@ -24,9 +24,9 @@ public class ISExporterPlugin extends Plugin {
|
|||
public static final String FILTERED_REPORT = "FILTERED_REPORT";
|
||||
public static final String STATISTICS = "STATISTICS";
|
||||
|
||||
public ISExporterPlugin() {
|
||||
super();
|
||||
logger.debug("{} contructor", this.getClass().getSimpleName());
|
||||
public ISExporterPlugin(ISExporterPluginDeclaration pluginDeclaration) {
|
||||
super(pluginDeclaration);
|
||||
logger.debug("contructor");
|
||||
}
|
||||
|
||||
/**{@inheritDoc}*/
|
||||
|
@ -36,7 +36,7 @@ public class ISExporterPlugin extends Plugin {
|
|||
AuthorizationEntry authorizationEntry = Constants.authorizationService().get(token);
|
||||
String scope = authorizationEntry.getContext();
|
||||
logger.info("Launching {} execution on scope {}",
|
||||
this.getName(), scope);
|
||||
ISExporterPluginDeclaration.NAME, scope);
|
||||
|
||||
boolean filteredReport = false;
|
||||
|
||||
|
@ -61,7 +61,7 @@ public class ISExporterPlugin extends Plugin {
|
|||
ServiceEndpointExporter serviceEndpointExporter = new ServiceEndpointExporter(filteredReport, statistics);
|
||||
serviceEndpointExporter.export();
|
||||
|
||||
logger.info("{} execution finished", this.getName());
|
||||
logger.info("{} execution finished", ISExporterPluginDeclaration.NAME);
|
||||
}
|
||||
|
||||
/**{@inheritDoc}*/
|
||||
|
|
|
@ -0,0 +1,69 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package org.gcube.informationsystem.exporter;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.gcube.vremanagement.executor.plugin.Plugin;
|
||||
import org.gcube.vremanagement.executor.plugin.PluginDeclaration;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* @author Luca Frosini (ISTI - CNR)
|
||||
*/
|
||||
public class ISExporterPluginDeclaration implements PluginDeclaration {
|
||||
|
||||
/**
|
||||
* Logger
|
||||
*/
|
||||
private static Logger logger = LoggerFactory.getLogger(ISExporterPlugin.class);
|
||||
|
||||
/**
|
||||
* Plugin name used by the Executor to retrieve this class
|
||||
*/
|
||||
public static final String NAME = "ISExporter";
|
||||
public static final String DESCRIPTION = "IS Exporter";
|
||||
public static final String VERSION = "1.0.0";
|
||||
|
||||
/**{@inheritDoc}*/
|
||||
@Override
|
||||
public void init() {
|
||||
logger.debug(String.format("%s initialized", ISExporterPlugin.class.getSimpleName()));
|
||||
}
|
||||
|
||||
/**{@inheritDoc}*/
|
||||
@Override
|
||||
public String getName() {
|
||||
return NAME;
|
||||
}
|
||||
|
||||
/**{@inheritDoc}*/
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return DESCRIPTION;
|
||||
}
|
||||
|
||||
/**{@inheritDoc}*/
|
||||
@Override
|
||||
public String getVersion() {
|
||||
return VERSION;
|
||||
}
|
||||
|
||||
/**{@inheritDoc}*/
|
||||
@Override
|
||||
public Map<String, String> getSupportedCapabilities() {
|
||||
Map<String, String> discoveredCapabilities = new HashMap<String, String>();
|
||||
// No capabilities to discover
|
||||
return discoveredCapabilities;
|
||||
}
|
||||
|
||||
/**{@inheritDoc}*/
|
||||
@Override
|
||||
public Class<? extends Plugin<? extends PluginDeclaration>> getPluginImplementation() {
|
||||
return ISExporterPlugin.class;
|
||||
}
|
||||
|
||||
}
|
|
@ -14,10 +14,6 @@ import java.util.Date;
|
|||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.gcube.com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import org.gcube.com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import org.gcube.com.fasterxml.jackson.databind.node.ArrayNode;
|
||||
import org.gcube.com.fasterxml.jackson.databind.node.ObjectNode;
|
||||
import org.gcube.common.authorization.client.Constants;
|
||||
import org.gcube.common.authorization.library.AuthorizationEntry;
|
||||
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
|
||||
|
@ -43,6 +39,11 @@ import org.gcube.resources.discovery.icclient.ICFactory;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.node.ArrayNode;
|
||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||
|
||||
/**
|
||||
* @author Luca Frosini (ISTI - CNR)
|
||||
* @param <GR> the gCore Resource class to map on gCure Model Resource
|
||||
|
@ -154,13 +155,13 @@ public abstract class GCoreResourceMapper<GR extends org.gcube.common.resources.
|
|||
boolean update = false;
|
||||
|
||||
try {
|
||||
update = resourceRegistryClient.existInstance(rClass, uuid);
|
||||
update = resourceRegistryClient.exists(rClass, uuid);
|
||||
} catch (NotFoundException e) {
|
||||
update = false;
|
||||
} catch (AvailableInAnotherContextException e) {
|
||||
// This code should never be reached because this should be fixed in
|
||||
// map function
|
||||
resourceRegistryPublisher.addResourceToCurrentContext(r, false);
|
||||
resourceRegistryPublisher.addResourceToCurrentContext(r);
|
||||
try {
|
||||
Thread.sleep(100);
|
||||
} catch (Exception ee) {
|
||||
|
|
|
@ -27,7 +27,7 @@ import org.json.XML;
|
|||
/**
|
||||
* @author Luca Frosini (ISTI - CNR)
|
||||
*/
|
||||
public class GenericResourceExporter extends GCoreResourceMapper<GenericResource, Configuration> {
|
||||
public class GenericResourceExporter extends GCoreResourceMapper<GenericResource,Configuration> {
|
||||
|
||||
public static final String FIXED_VERSION = "1.0.0";
|
||||
public static final String FULL_BODY = "FULL_BODY";
|
||||
|
@ -47,11 +47,11 @@ public class GenericResourceExporter extends GCoreResourceMapper<GenericResource
|
|||
SimpleFacet simpleFacet = null;
|
||||
|
||||
try {
|
||||
readFromIS = resourceRegistryClient.existInstance(rClass, uuid);
|
||||
readFromIS = resourceRegistryClient.exists(rClass, uuid);
|
||||
} catch(NotFoundException e) {
|
||||
readFromIS = false;
|
||||
} catch(AvailableInAnotherContextException e) {
|
||||
resourceRegistryPublisher.addResourceToCurrentContext(Configuration.NAME, uuid, false);
|
||||
resourceRegistryPublisher.addResourceToCurrentContext(Configuration.NAME, uuid);
|
||||
Thread.sleep(100);
|
||||
readFromIS = true;
|
||||
}
|
||||
|
|
|
@ -23,14 +23,14 @@ import org.gcube.informationsystem.resourceregistry.api.exceptions.AvailableInAn
|
|||
import org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException;
|
||||
import org.gcube.resourcemanagement.model.impl.entities.facets.AccessPointFacetImpl;
|
||||
import org.gcube.resourcemanagement.model.impl.entities.facets.NetworkingFacetImpl;
|
||||
import org.gcube.resourcemanagement.model.impl.entities.facets.ServiceStateFacetImpl;
|
||||
import org.gcube.resourcemanagement.model.impl.entities.facets.SoftwareFacetImpl;
|
||||
import org.gcube.resourcemanagement.model.impl.entities.facets.StateFacetImpl;
|
||||
import org.gcube.resourcemanagement.model.impl.entities.resources.EServiceImpl;
|
||||
import org.gcube.resourcemanagement.model.impl.relations.consistsof.IsIdentifiedByImpl;
|
||||
import org.gcube.resourcemanagement.model.reference.entities.facets.AccessPointFacet;
|
||||
import org.gcube.resourcemanagement.model.reference.entities.facets.NetworkingFacet;
|
||||
import org.gcube.resourcemanagement.model.reference.entities.facets.ServiceStateFacet;
|
||||
import org.gcube.resourcemanagement.model.reference.entities.facets.SoftwareFacet;
|
||||
import org.gcube.resourcemanagement.model.reference.entities.facets.StateFacet;
|
||||
import org.gcube.resourcemanagement.model.reference.entities.resources.EService;
|
||||
import org.gcube.resourcemanagement.model.reference.relations.consistsof.IsIdentifiedBy;
|
||||
import org.slf4j.Logger;
|
||||
|
@ -75,15 +75,15 @@ public class ServiceEndpointExporter extends GCoreResourceMapper<ServiceEndpoint
|
|||
AccessPointFacet[] accessPointFacets = null;
|
||||
SoftwareFacet softwareFacet = null;
|
||||
SoftwareFacet platformSoftwareFacet = null;
|
||||
StateFacet stateFacet = null;
|
||||
ServiceStateFacet serviceStateFacet = null;
|
||||
NetworkingFacet networkingFacet = null;
|
||||
|
||||
try {
|
||||
readFromIS = resourceRegistryClient.existInstance(rClass, uuid);
|
||||
readFromIS = resourceRegistryClient.exists(rClass, uuid);
|
||||
} catch(NotFoundException e) {
|
||||
readFromIS = false;
|
||||
} catch(AvailableInAnotherContextException e) {
|
||||
resourceRegistryPublisher.addResourceToCurrentContext(EService.NAME, uuid, false);
|
||||
resourceRegistryPublisher.addResourceToCurrentContext(EService.NAME, uuid);
|
||||
Thread.sleep(100);
|
||||
readFromIS = true;
|
||||
}
|
||||
|
@ -127,8 +127,8 @@ public class ServiceEndpointExporter extends GCoreResourceMapper<ServiceEndpoint
|
|||
continue;
|
||||
}
|
||||
|
||||
if(target instanceof StateFacet) {
|
||||
stateFacet = (StateFacet) target;
|
||||
if(target instanceof ServiceStateFacet) {
|
||||
serviceStateFacet = (ServiceStateFacet) target;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -181,11 +181,11 @@ public class ServiceEndpointExporter extends GCoreResourceMapper<ServiceEndpoint
|
|||
/* ----------------------------------------- */
|
||||
Runtime runTime = profile.runtime();
|
||||
|
||||
if(stateFacet == null) {
|
||||
stateFacet = new StateFacetImpl();
|
||||
eService.addFacet(stateFacet);
|
||||
if(serviceStateFacet == null) {
|
||||
serviceStateFacet = new ServiceStateFacetImpl();
|
||||
eService.addFacet(serviceStateFacet);
|
||||
}
|
||||
stateFacet.setValue(runTime.status());
|
||||
serviceStateFacet.setValue(runTime.status());
|
||||
|
||||
if(networkingFacet == null) {
|
||||
networkingFacet = new NetworkingFacetImpl();
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
org.gcube.informationsystem.exporter.ISExporterPlugin
|
|
@ -0,0 +1 @@
|
|||
org.gcube.informationsystem.exporter.ISExporterPluginDeclaration
|
|
@ -24,7 +24,7 @@ public class ISExporterPluginTest {
|
|||
logger.info("\n\n\n-------------------------------------------------------------------------");
|
||||
ContextTest.setContextByName(context);
|
||||
|
||||
ISExporterPlugin isExporterPlugin = new ISExporterPlugin();
|
||||
ISExporterPlugin isExporterPlugin = new ISExporterPlugin(new ISExporterPluginDeclaration());
|
||||
Map<String,Object> inputs = new HashMap<String,Object>();
|
||||
inputs.put(ISExporterPlugin.FILTERED_REPORT, true);
|
||||
inputs.put(ISExporterPlugin.STATISTICS, false);
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
groupId=org.gcube.information-system
|
||||
artifactId=is-exporter-se-plugin
|
||||
version=2.0.0-SNAPSHOT
|
||||
description=Information System Exporter Smart Executor Plugin
|
|
@ -0,0 +1,24 @@
|
|||
<assembly
|
||||
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
|
||||
<id>tar.gz</id>
|
||||
<formats>
|
||||
<format>tar.gz</format>
|
||||
</formats>
|
||||
<baseDirectory>${file.separator}</baseDirectory>
|
||||
<fileSets>
|
||||
<fileSet>
|
||||
<directory>target${file.separator}libs</directory>
|
||||
<outputDirectory>${file.separator}</outputDirectory>
|
||||
<useDefaultExcludes>true</useDefaultExcludes>
|
||||
<fileMode>755</fileMode>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
<files>
|
||||
<file>
|
||||
<source>target${file.separator}${project.artifactId}-${project.version}.jar</source>
|
||||
<filtered>true</filtered>
|
||||
</file>
|
||||
</files>
|
||||
</assembly>
|
Loading…
Reference in New Issue