Compare commits

..

No commits in common. "master" and "feature/19116" have entirely different histories.

10 changed files with 93 additions and 53 deletions

View File

@ -3,15 +3,13 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
# Changelog for Information System Exporter Smart Executor Plugin
## [v2.0.0-SNAPSHOT]
## [v2.0.0-SNAPSHOT] [r5.0.0] -
- 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

View File

@ -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);

View File

@ -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);

29
pom.xml
View File

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

View File

@ -154,13 +154,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) {

View File

@ -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;
}

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.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();

View File

@ -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

24
tar-gz.xml Normal file
View File

@ -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>