Compare commits

...

7 Commits

10 changed files with 53 additions and 93 deletions

View File

@ -3,13 +3,15 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
# Changelog for Information System Exporter Smart Executor Plugin # Changelog for Information System Exporter Smart Executor Plugin
## [v2.0.0-SNAPSHOT] [r5.0.0] - ## [v2.0.0-SNAPSHOT]
- Ported plugin to smart-executor APIs 3.0.0 [#21617]
- Switched JSON management to gcube-jackson [#19116] - Switched JSON management to gcube-jackson [#19116]
- Switched smart-executor JSON management to gcube-jackson [#19647] - Switched smart-executor JSON management to gcube-jackson [#19647]
- Refactored code to support IS Model reorganization (e.g naming, packages) - Refactored code to support IS Model reorganization (e.g naming, packages)
- Refactored code to support renaming of Embedded class to Property [#13274] - Refactored code to support renaming of Embedded class to Property [#13274]
- Starting to use the new Encrypted property type [#12812] - Starting to use the new Encrypted property type [#12812]
- Updated smart-executor-bom
## [v1.3.0] [r4.13.0] - 2018-11-20 ## [v1.3.0] [r4.13.0] - 2018-11-20

26
FUNDING.md Normal file
View File

@ -0,0 +1,26 @@
# 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);

View File

@ -37,37 +37,16 @@ Tell people how to cite this software.
url = {http://www.gcube-system.org/} 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. This project is licensed under the EUPL V.1.1 License - see the [LICENSE.md](LICENSE.md) file for details.
## About the gCube Framework ## About the gCube Framework
This software is part of the [gCubeFramework](https://www.gcube-system.org/ "gCubeFramework"): an 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 open-source software toolkit used for building and operating Hybrid Data
Infrastructures enabling the dynamic deployment of Virtual Research Environments Infrastructures enabling the dynamic deployment of Virtual Research Environments
by favouring the realisation of reuse oriented policies. by favouring the realisation of reuse oriented policies.
The projects leading to this software have received funding from a series of European Union programmes including: The projects leading to this software have received funding from a series of European Union programmes see [FUNDING.md](FUNDING.md)
- 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);

29
pom.xml
View File

@ -33,24 +33,10 @@
<dependencyManagement> <dependencyManagement>
<dependencies> <dependencies>
<dependency>
<groupId>org.gcube.distribution</groupId>
<artifactId>gcube-bom</artifactId>
<version>2.0.0-SNAPSHOT</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.gcube.information-system</groupId>
<artifactId>information-system-bom</artifactId>
<version>2.0.0-SNAPSHOT</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency> <dependency>
<groupId>org.gcube.vremanagement</groupId> <groupId>org.gcube.vremanagement</groupId>
<artifactId>smart-executor-bom</artifactId> <artifactId>smart-executor-bom</artifactId>
<version>2.0.0-SNAPSHOT</version> <version>3.1.0-SNAPSHOT</version>
<type>pom</type> <type>pom</type>
<scope>import</scope> <scope>import</scope>
</dependency> </dependency>
@ -158,19 +144,6 @@
<goal>single</goal> <goal>single</goal>
</goals> </goals>
</execution> </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>
</executions> </executions>
</plugin> </plugin>
</plugins> </plugins>

View File

@ -154,13 +154,13 @@ public abstract class GCoreResourceMapper<GR extends org.gcube.common.resources.
boolean update = false; boolean update = false;
try { try {
update = resourceRegistryClient.exists(rClass, uuid); update = resourceRegistryClient.existInstance(rClass, uuid);
} catch (NotFoundException e) { } catch (NotFoundException e) {
update = false; update = false;
} catch (AvailableInAnotherContextException e) { } catch (AvailableInAnotherContextException e) {
// This code should never be reached because this should be fixed in // This code should never be reached because this should be fixed in
// map function // map function
resourceRegistryPublisher.addResourceToCurrentContext(r); resourceRegistryPublisher.addResourceToCurrentContext(r, false);
try { try {
Thread.sleep(100); Thread.sleep(100);
} catch (Exception ee) { } catch (Exception ee) {

View File

@ -27,7 +27,7 @@ import org.json.XML;
/** /**
* @author Luca Frosini (ISTI - CNR) * @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 FIXED_VERSION = "1.0.0";
public static final String FULL_BODY = "FULL_BODY"; public static final String FULL_BODY = "FULL_BODY";
@ -47,11 +47,11 @@ public class GenericResourceExporter extends GCoreResourceMapper<GenericResource
SimpleFacet simpleFacet = null; SimpleFacet simpleFacet = null;
try { try {
readFromIS = resourceRegistryClient.exists(rClass, uuid); readFromIS = resourceRegistryClient.existInstance(rClass, uuid);
} catch(NotFoundException e) { } catch(NotFoundException e) {
readFromIS = false; readFromIS = false;
} catch(AvailableInAnotherContextException e) { } catch(AvailableInAnotherContextException e) {
resourceRegistryPublisher.addResourceToCurrentContext(Configuration.NAME, uuid); resourceRegistryPublisher.addResourceToCurrentContext(Configuration.NAME, uuid, false);
Thread.sleep(100); Thread.sleep(100);
readFromIS = true; readFromIS = true;
} }

View File

@ -23,14 +23,14 @@ import org.gcube.informationsystem.resourceregistry.api.exceptions.AvailableInAn
import org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException; 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.AccessPointFacetImpl;
import org.gcube.resourcemanagement.model.impl.entities.facets.NetworkingFacetImpl; 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.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.entities.resources.EServiceImpl;
import org.gcube.resourcemanagement.model.impl.relations.consistsof.IsIdentifiedByImpl; 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.AccessPointFacet;
import org.gcube.resourcemanagement.model.reference.entities.facets.NetworkingFacet; 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.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.entities.resources.EService;
import org.gcube.resourcemanagement.model.reference.relations.consistsof.IsIdentifiedBy; import org.gcube.resourcemanagement.model.reference.relations.consistsof.IsIdentifiedBy;
import org.slf4j.Logger; import org.slf4j.Logger;
@ -75,15 +75,15 @@ public class ServiceEndpointExporter extends GCoreResourceMapper<ServiceEndpoint
AccessPointFacet[] accessPointFacets = null; AccessPointFacet[] accessPointFacets = null;
SoftwareFacet softwareFacet = null; SoftwareFacet softwareFacet = null;
SoftwareFacet platformSoftwareFacet = null; SoftwareFacet platformSoftwareFacet = null;
ServiceStateFacet serviceStateFacet = null; StateFacet stateFacet = null;
NetworkingFacet networkingFacet = null; NetworkingFacet networkingFacet = null;
try { try {
readFromIS = resourceRegistryClient.exists(rClass, uuid); readFromIS = resourceRegistryClient.existInstance(rClass, uuid);
} catch(NotFoundException e) { } catch(NotFoundException e) {
readFromIS = false; readFromIS = false;
} catch(AvailableInAnotherContextException e) { } catch(AvailableInAnotherContextException e) {
resourceRegistryPublisher.addResourceToCurrentContext(EService.NAME, uuid); resourceRegistryPublisher.addResourceToCurrentContext(EService.NAME, uuid, false);
Thread.sleep(100); Thread.sleep(100);
readFromIS = true; readFromIS = true;
} }
@ -127,8 +127,8 @@ public class ServiceEndpointExporter extends GCoreResourceMapper<ServiceEndpoint
continue; continue;
} }
if(target instanceof ServiceStateFacet) { if(target instanceof StateFacet) {
serviceStateFacet = (ServiceStateFacet) target; stateFacet = (StateFacet) target;
continue; continue;
} }
@ -181,11 +181,11 @@ public class ServiceEndpointExporter extends GCoreResourceMapper<ServiceEndpoint
/* ----------------------------------------- */ /* ----------------------------------------- */
Runtime runTime = profile.runtime(); Runtime runTime = profile.runtime();
if(serviceStateFacet == null) { if(stateFacet == null) {
serviceStateFacet = new ServiceStateFacetImpl(); stateFacet = new StateFacetImpl();
eService.addFacet(serviceStateFacet); eService.addFacet(stateFacet);
} }
serviceStateFacet.setValue(runTime.status()); stateFacet.setValue(runTime.status());
if(networkingFacet == null) { if(networkingFacet == null) {
networkingFacet = new NetworkingFacetImpl(); networkingFacet = new NetworkingFacetImpl();

View File

@ -0,0 +1,4 @@
groupId=org.gcube.information-system
artifactId=is-exporter-se-plugin
version=2.0.0-SNAPSHOT
description=Information System Exporter Smart Executor Plugin

View File

@ -1,24 +0,0 @@
<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>