Merge remote-tracking branch 'origin/feature/19647'
Conflicts: CHANGELOG.md pom.xml
This commit is contained in:
commit
aeccfe1570
36
CHANGELOG.md
36
CHANGELOG.md
|
@ -3,55 +3,59 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
||||||
# Changelog for Smart Executor Client
|
# Changelog for Smart Executor Client
|
||||||
|
|
||||||
|
|
||||||
## [v2.0.0-SNAPSHOT]
|
## [v3.0.0-SNAPSHOT] [r5.0.0] -
|
||||||
|
|
||||||
|
- Switched smart-executor JSON management to gcube-jackson [#19647]
|
||||||
|
- Redesigned HTTP APIs to comply with RESTful architectural style [#12997]
|
||||||
|
- Added API to retrieve scheduled tasks [#10780]
|
||||||
|
|
||||||
|
|
||||||
|
## [v.2.0.0]
|
||||||
|
|
||||||
- New version of the client to comply with new REST APIs provided by Smart Executor 2.0.0 [#12997]
|
- New version of the client to comply with new REST APIs provided by Smart Executor 2.0.0 [#12997]
|
||||||
|
|
||||||
|
|
||||||
## [v1.7.0] - 2019-02-26
|
## [v1.7.0] [r4.13.1] - 2019-02-26
|
||||||
|
|
||||||
- Fixed gCoreEndpoint filter using got ServiceEndpoints [#12984]
|
- Fixed gCoreEndpoint filter using got ServiceEndpoints [#12984]
|
||||||
|
|
||||||
|
|
||||||
## [v1.6.0] - 2017-02-15
|
## [v1.6.0] [r4.10.0] - 2018-02-15
|
||||||
|
|
||||||
- Added client for REST interface of Smart Executor [#5109]
|
- Added client for REST interface of Smart Executor [#5109]
|
||||||
- Created fallback client presenting as REST client but using SOAP API to support old SmartExecutor instances with new code [#5109]
|
|
||||||
- Deprecated old SOAP client [#5109]
|
- Deprecated old SOAP client [#5109]
|
||||||
|
- Created fallback client presenting as REST client but using SOAP API to support old SmartExecutor instances with new code [#5109]
|
||||||
|
- Changed pom.xml to use new make-servicearchive directive [#10170]
|
||||||
|
|
||||||
|
|
||||||
## [v1.5.0] - 2017-25-07
|
## [v1.5.0] [r4.6.0] - 2017-07-25
|
||||||
|
|
||||||
- Exposed unSchedule(executionIdentifier) API
|
- Exposed unSchedule(executionIdentifier) API
|
||||||
|
|
||||||
|
|
||||||
## [v1.4.0] - 2017-03-16
|
## [v1.4.0] [r4.3.0] - 2017-03-16
|
||||||
|
|
||||||
- Fixed classes javadoc
|
- Improved code
|
||||||
|
|
||||||
|
|
||||||
## [v1.3.0] - 2016-11-07
|
## [v1.3.0] [r4.1.0] - 2016-11-07
|
||||||
|
|
||||||
- SmartExecutor has been passed to Authorization 2.0 [#4944 #2112]
|
- SmartExecutor has been migrated to Authorization 2.0 [#4944] [#2112]
|
||||||
- Provided to plugins the possibility to define a custom notifier [#5089]
|
- Provided to plugins the possibility to define a custom notifier [#5089]
|
||||||
|
- Using newly created gcube-bom [#2363]
|
||||||
|
|
||||||
|
|
||||||
## [v1.2.0] - 2016-02-08
|
## [v1.2.0] [r3.10.0] - 2016-02-08
|
||||||
|
|
||||||
- Using Persistence (CouchDB) to save Scheduled Task configuration [#579]
|
|
||||||
- Added Unscheduling feature for repetitive task [#521]
|
- Added Unscheduling feature for repetitive task [#521]
|
||||||
|
|
||||||
|
|
||||||
## [v1.1.0] - 2015-12-09
|
## [v1.1.0] [r3.9.0] - 2015-12-09
|
||||||
|
|
||||||
- Added Recurrent and Scheduled Task support [#111]
|
- Added Recurrent and Scheduled Task support [#111]
|
||||||
- Saving Task Evolution on Persistence (CouchDB) [#89]
|
|
||||||
|
|
||||||
|
|
||||||
## [v1.0.0] - 2015-02-05
|
## [v1.0.0] - 2015-02-05
|
||||||
|
|
||||||
- First Release
|
- First Release
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
21
pom.xml
21
pom.xml
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
<groupId>org.gcube.vremanagement</groupId>
|
<groupId>org.gcube.vremanagement</groupId>
|
||||||
<artifactId>smart-executor-client</artifactId>
|
<artifactId>smart-executor-client</artifactId>
|
||||||
<version>2.0.0-SNAPSHOT</version>
|
<version>3.0.0-SNAPSHOT</version>
|
||||||
<name>Smart Executor Client</name>
|
<name>Smart Executor Client</name>
|
||||||
<description>Smart Executor Client is a library designed to interact with Smart Executor exposed REST API</description>
|
<description>Smart Executor Client is a library designed to interact with Smart Executor exposed REST API</description>
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.vremanagement</groupId>
|
<groupId>org.gcube.vremanagement</groupId>
|
||||||
<artifactId>smart-executor-api</artifactId>
|
<artifactId>smart-executor-api</artifactId>
|
||||||
<version>[2.0.0-SNAPSHOT, 3.0.0-SNAPSHOT)</version>
|
<version>[3.0.0-SNAPSHOT, 4.0.0-SNAPSHOT)</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.common</groupId>
|
<groupId>org.gcube.common</groupId>
|
||||||
|
@ -86,24 +86,9 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.vremanagement</groupId>
|
<groupId>org.gcube.vremanagement</groupId>
|
||||||
<artifactId>hello-world-se-plugin</artifactId>
|
<artifactId>hello-world-se-plugin</artifactId>
|
||||||
<version>[1.0.0, 2.0.0-SNAPSHOT)</version>
|
<version>[2.0.0-SNAPSHOT, 3.0.0-SNAPSHOT)</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-assembly-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>make-servicearchive</id>
|
|
||||||
<phase>package</phase>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</project>
|
</project>
|
|
@ -6,8 +6,8 @@ package org.gcube.vremanagement.executor.client;
|
||||||
public class Constants {
|
public class Constants {
|
||||||
|
|
||||||
/* Used for REST*/
|
/* Used for REST*/
|
||||||
public static final String SERVICE_CLASS = "VREManagement";
|
public static final String SERVICE_CLASS = "org.gcube.vremanagement";
|
||||||
public static final String SERVICE_NAME = "SmartExecutor";
|
public static final String SERVICE_NAME = "smart-executor";
|
||||||
public static final String SERVICE_ENTRY_NAME = "org.gcube.vremanagement.executor.ResourceInitializer";
|
public static final String SERVICE_ENTRY_NAME = "org.gcube.vremanagement.executor.ResourceInitializer";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import org.gcube.vremanagement.executor.api.types.LaunchParameter;
|
import org.gcube.vremanagement.executor.api.types.LaunchParameter;
|
||||||
import org.gcube.vremanagement.executor.plugin.PluginDeclaration;
|
import org.gcube.vremanagement.executor.plugin.PluginDefinition;
|
||||||
import org.gcube.vremanagement.executor.plugin.PluginStateEvolution;
|
import org.gcube.vremanagement.executor.plugin.PluginStateEvolution;
|
||||||
import org.gcube.vremanagement.executor.plugin.ScheduledTask;
|
import org.gcube.vremanagement.executor.plugin.ScheduledTask;
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ public interface SmartExecutorClient {
|
||||||
|
|
||||||
public String getAvailablePlugins();
|
public String getAvailablePlugins();
|
||||||
|
|
||||||
public List<PluginDeclaration> getPlugins() throws IOException;
|
public List<PluginDefinition> getPlugins() throws IOException;
|
||||||
|
|
||||||
public String getLaunches();
|
public String getLaunches();
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ import org.gcube.vremanagement.executor.api.rest.RestConstants;
|
||||||
import org.gcube.vremanagement.executor.api.types.LaunchParameter;
|
import org.gcube.vremanagement.executor.api.types.LaunchParameter;
|
||||||
import org.gcube.vremanagement.executor.exception.ExecutorException;
|
import org.gcube.vremanagement.executor.exception.ExecutorException;
|
||||||
import org.gcube.vremanagement.executor.json.SEMapper;
|
import org.gcube.vremanagement.executor.json.SEMapper;
|
||||||
import org.gcube.vremanagement.executor.plugin.PluginDeclaration;
|
import org.gcube.vremanagement.executor.plugin.PluginDefinition;
|
||||||
import org.gcube.vremanagement.executor.plugin.PluginStateEvolution;
|
import org.gcube.vremanagement.executor.plugin.PluginStateEvolution;
|
||||||
import org.gcube.vremanagement.executor.plugin.ScheduledTask;
|
import org.gcube.vremanagement.executor.plugin.ScheduledTask;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
@ -147,9 +147,9 @@ public class SmartExecutorClientImpl implements SmartExecutorClient {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<PluginDeclaration> getPlugins() throws IOException {
|
public List<PluginDefinition> getPlugins() throws IOException {
|
||||||
String pluginList = getAvailablePlugins();
|
String pluginList = getAvailablePlugins();
|
||||||
return SEMapper.getInstance().unmarshalList(PluginDeclaration.class,pluginList);
|
return SEMapper.getInstance().unmarshalList(PluginDefinition.class,pluginList);
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getScheduledTask(String name) {
|
private String getScheduledTask(String name) {
|
||||||
|
|
|
@ -10,11 +10,11 @@ import java.util.concurrent.TimeUnit;
|
||||||
import org.gcube.vremanagement.executor.api.types.LaunchParameter;
|
import org.gcube.vremanagement.executor.api.types.LaunchParameter;
|
||||||
import org.gcube.vremanagement.executor.api.types.Scheduling;
|
import org.gcube.vremanagement.executor.api.types.Scheduling;
|
||||||
import org.gcube.vremanagement.executor.client.query.Discover;
|
import org.gcube.vremanagement.executor.client.query.Discover;
|
||||||
import org.gcube.vremanagement.executor.plugin.PluginDeclaration;
|
import org.gcube.vremanagement.executor.plugin.Plugin;
|
||||||
|
import org.gcube.vremanagement.executor.plugin.PluginDefinition;
|
||||||
import org.gcube.vremanagement.executor.plugin.PluginStateEvolution;
|
import org.gcube.vremanagement.executor.plugin.PluginStateEvolution;
|
||||||
import org.gcube.vremanagement.executor.plugin.ScheduledTask;
|
import org.gcube.vremanagement.executor.plugin.ScheduledTask;
|
||||||
import org.gcube.vremanagement.helloworld.HelloWorldPlugin;
|
import org.gcube.vremanagement.helloworld.HelloWorldPlugin;
|
||||||
import org.gcube.vremanagement.helloworld.HelloWorldPluginDeclaration;
|
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
@ -51,7 +51,7 @@ public class SmartExecutorClientTest extends ContextTest {
|
||||||
inputs.put(HelloWorldPlugin.SLEEP_TIME, TimeUnit.SECONDS.toMillis(10));
|
inputs.put(HelloWorldPlugin.SLEEP_TIME, TimeUnit.SECONDS.toMillis(10));
|
||||||
inputs.put("TestUUID", UUID.randomUUID());
|
inputs.put("TestUUID", UUID.randomUUID());
|
||||||
|
|
||||||
LaunchParameter launchParameter = new LaunchParameter(HelloWorldPluginDeclaration.NAME, inputs);
|
LaunchParameter launchParameter = new LaunchParameter(new HelloWorldPlugin().getName(), inputs);
|
||||||
launchParameter.setScheduling(scheduling);
|
launchParameter.setScheduling(scheduling);
|
||||||
|
|
||||||
return launchParameter;
|
return launchParameter;
|
||||||
|
@ -61,23 +61,22 @@ public class SmartExecutorClientTest extends ContextTest {
|
||||||
public void testServiceInteraction() throws Exception {
|
public void testServiceInteraction() throws Exception {
|
||||||
SmartExecutorClientFactory.forceURL("http://pc-frosini.isti.cnr.it:8080/smart-executor");
|
SmartExecutorClientFactory.forceURL("http://pc-frosini.isti.cnr.it:8080/smart-executor");
|
||||||
|
|
||||||
HelloWorldPluginDeclaration helloWorldPluginDeclaration = new HelloWorldPluginDeclaration();
|
Plugin plugin = new HelloWorldPlugin();
|
||||||
logger.debug("Going to test smart executor using {} plugin", helloWorldPluginDeclaration.getName());
|
String pluginName = plugin.getName();
|
||||||
SmartExecutorClient smartExecutorClient = SmartExecutorClientFactory
|
|
||||||
.getClient(helloWorldPluginDeclaration.getName());
|
logger.debug("Going to test smart executor using {} plugin", pluginName);
|
||||||
|
SmartExecutorClient smartExecutorClient = SmartExecutorClientFactory.getClient(pluginName);
|
||||||
String host = smartExecutorClient.getHost();
|
String host = smartExecutorClient.getHost();
|
||||||
Assert.assertTrue(host.contains("pc-frosini.isti.cnr.it"));
|
Assert.assertTrue(host.contains("pc-frosini.isti.cnr.it"));
|
||||||
|
|
||||||
List<PluginDeclaration> plugins = smartExecutorClient.getPlugins();
|
List<PluginDefinition> plugins = smartExecutorClient.getPlugins();
|
||||||
Assert.assertTrue(plugins.size() == 1);
|
Assert.assertTrue(plugins.size() == 1);
|
||||||
PluginDeclaration pluginDeclaration = plugins.get(0);
|
PluginDefinition pluginDefinition = plugins.get(0);
|
||||||
|
|
||||||
Assert.assertTrue(pluginDeclaration.getName().compareTo(helloWorldPluginDeclaration.getName()) == 0);
|
Assert.assertTrue(pluginDefinition.getName().compareTo(pluginName) == 0);
|
||||||
Assert.assertTrue(
|
Assert.assertTrue(pluginDefinition.getDescription().compareTo(plugin.getDescription()) == 0);
|
||||||
pluginDeclaration.getDescription().compareTo(helloWorldPluginDeclaration.getDescription()) == 0);
|
Assert.assertTrue(pluginDefinition.getVersion().compareTo(plugin.getVersion()) == 0);
|
||||||
Assert.assertTrue(pluginDeclaration.getVersion().compareTo(helloWorldPluginDeclaration.getVersion()) == 0);
|
Assert.assertTrue(pluginDefinition.getSupportedCapabilities().equals(plugin.getSupportedCapabilities()));
|
||||||
Assert.assertTrue(pluginDeclaration.getSupportedCapabilities()
|
|
||||||
.equals(helloWorldPluginDeclaration.getSupportedCapabilities()));
|
|
||||||
|
|
||||||
List<ScheduledTask> orphans = smartExecutorClient.getOrphanScheduledLaunches();
|
List<ScheduledTask> orphans = smartExecutorClient.getOrphanScheduledLaunches();
|
||||||
for(ScheduledTask orphan : orphans) {
|
for(ScheduledTask orphan : orphans) {
|
||||||
|
@ -118,8 +117,8 @@ public class SmartExecutorClientTest extends ContextTest {
|
||||||
logger.debug("Host {}", SmartExecutorClientImpl.getHostFromCompleteURL(host));
|
logger.debug("Host {}", SmartExecutorClientImpl.getHostFromCompleteURL(host));
|
||||||
SmartExecutorClientImpl client = new SmartExecutorClientImpl();
|
SmartExecutorClientImpl client = new SmartExecutorClientImpl();
|
||||||
client.setAddress(host);
|
client.setAddress(host);
|
||||||
List<PluginDeclaration> plugins = client.getPlugins();
|
List<PluginDefinition> plugins = client.getPlugins();
|
||||||
for(PluginDeclaration p : plugins) {
|
for(PluginDefinition p : plugins) {
|
||||||
logger.debug("\tPlugin {}", p);
|
logger.debug("\tPlugin {}", p);
|
||||||
client.setPluginName(p.getName());
|
client.setPluginName(p.getName());
|
||||||
List<ScheduledTask> tasks = client.getScheduledLaunches();
|
List<ScheduledTask> tasks = client.getScheduledLaunches();
|
||||||
|
|
Loading…
Reference in New Issue