summaryrefslogtreecommitdiffstats
path: root/aria
diff options
context:
space:
mode:
Diffstat (limited to 'aria')
-rwxr-xr-xaria/aria-rest-java-client/pom.xml83
-rw-r--r--aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/AriaClient.java201
-rw-r--r--aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/AriaClientFactory.java31
-rw-r--r--aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/AriaRestClient.java377
-rw-r--r--aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/Execution.java29
-rw-r--r--aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/ExecutionDetails.java73
-rw-r--r--aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/ExecutionImpl.java54
-rw-r--r--aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/Input.java27
-rw-r--r--aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/InputImpl.java49
-rw-r--r--aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/NodeTemplate.java29
-rw-r--r--aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/NodeTemplateImpl.java68
-rw-r--r--aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/Output.java27
-rw-r--r--aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/OutputImpl.java37
-rw-r--r--aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/Service.java32
-rw-r--r--aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/ServiceImpl.java58
-rw-r--r--aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/ServiceTemplate.java32
-rw-r--r--aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/ServiceTemplateImpl.java93
-rw-r--r--aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/ValidationResult.java26
-rw-r--r--aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/ValidationResultImpl.java32
-rw-r--r--aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/Workflow.java25
-rw-r--r--aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/WorkflowImpl.java29
-rwxr-xr-xaria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/exceptions/StorageException.java27
-rwxr-xr-xaria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/exceptions/ValidationException.java27
-rw-r--r--aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/AriaClientFactoryTest.java33
-rw-r--r--aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/ExecutionDetailsTest.java49
-rw-r--r--aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/ExecutionImplTest.java37
-rw-r--r--aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/InputImpTest.java35
-rw-r--r--aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/NodeTemplateImplTest.java39
-rw-r--r--aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/OutputImplTest.java34
-rw-r--r--aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/ServiceImplTest.java40
-rw-r--r--aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/ServiceTemplateImplTest.java51
-rw-r--r--aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/ValidationResultImplTest.java38
-rw-r--r--aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/WorkflowimplTest.java34
-rw-r--r--aria/aria-rest-server/build.py95
-rw-r--r--aria/aria-rest-server/pom.xml114
-rw-r--r--aria/aria-rest-server/setup.py35
-rw-r--r--aria/aria-rest-server/tox.ini13
-rw-r--r--aria/pom.xml22
38 files changed, 0 insertions, 2135 deletions
diff --git a/aria/aria-rest-java-client/pom.xml b/aria/aria-rest-java-client/pom.xml
deleted file mode 100755
index 93ac009601..0000000000
--- a/aria/aria-rest-java-client/pom.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
- * ============LICENSE_START===================================================
- * Copyright (c) 2017 Cloudify.co. All rights reserved.
- * ===================================================================
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- * ============LICENSE_END====================================================
-*/
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <groupId>org.onap.so</groupId>
- <artifactId>aria-client</artifactId>
- <parent>
- <groupId>org.onap.so</groupId>
- <artifactId>aria</artifactId>
- <version>1.2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <dependencies>
- <dependency>
- <groupId>org.glassfish.jersey.core</groupId>
- <artifactId>jersey-client</artifactId>
- <version>2.26-b03</version>
- </dependency>
- <dependency>
- <groupId>org.glassfish.jersey.media</groupId>
- <artifactId>jersey-media-json-jackson1</artifactId>
- <version>2.26-b03</version>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-core</artifactId>
- <version>2.8.7</version>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-annotations</artifactId>
- <version>2.8.7</version>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-databind</artifactId>
- <version>2.8.7</version>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.jaxrs</groupId>
- <artifactId>jackson-jaxrs-base</artifactId>
- <version>2.9.2</version>
- </dependency>
-<dependency>
- <groupId>com.fasterxml.jackson.jaxrs</groupId>
- <artifactId>jackson-jaxrs-json-provider</artifactId>
- <version>2.9.2</version>
-</dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.jaxrs</groupId>
- <artifactId>jackson-jaxrs-providers</artifactId>
- <version>2.9.2</version>
- <type>pom</type>
- </dependency>
- <dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpclient</artifactId>
- </dependency>
- </dependencies>
-
-</project>
diff --git a/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/AriaClient.java b/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/AriaClient.java
deleted file mode 100644
index d6e9f2434d..0000000000
--- a/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/AriaClient.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * ============LICENSE_START===================================================
- * Copyright (c) 2017 Cloudify.co. All rights reserved.
- * ===================================================================
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- * ============LICENSE_END====================================================
-*/
-package com.gigaspaces.aria.rest.client;
-
-import com.gigaspaces.aria.rest.client.exceptions.StorageException;
-import com.gigaspaces.aria.rest.client.exceptions.ValidationException;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * Created by DeWayne on 7/12/2017.
- */
-public interface AriaClient {
-
- /**
- * Installs a service template
- *
- * @param template
- * @throws ValidationException
- * @throws StorageException
- */
- public void install_service_template(ServiceTemplate template)throws ValidationException, StorageException, Exception;
-
- /**
- * Validate a service template
- * @param template
- * @return
- */
- public ValidationResult validate_service_template(ServiceTemplate template)throws Exception;
-
- /**
- * Fetch a list of stored service templates
- *
- * @return
- */
- public List<? extends ServiceTemplate> list_service_templates();
-
- /**
- * Delete an existing template
- *
- * @param template_id
- * @throws IllegalArgumentException
- */
- public void delete_service_template(int template_id) throws IllegalArgumentException, Exception;
-
- /**
- * Returns a list of node templates for a given service template
- * @param template_id
- * @return
- */
- List<? extends NodeTemplate> list_nodes(int template_id);
-
- /**
- * Fetch a given node template
- *
- * @param node_id
- * @return
- * @throws IllegalArgumentException
- */
- public NodeTemplate get_node( int node_id) throws IllegalArgumentException;
-
- /**
- * List all services
- *
- * @return
- */
- public List<? extends Service> list_services();
-
- /**
- * Fetch the specified service
- *
- * @param service_id
- * @return
- * @throws IllegalArgumentException
- */
- public Service get_service(int service_id) throws IllegalArgumentException;
-
- /**
- * Fetch the outputs of the specified service
- *
- * @param service_id
- * @return
- * @throws IllegalArgumentException
- */
- public List<? extends Output> list_service_outputs(int service_id) throws IllegalArgumentException;
-
- /**
- * Fetch the inputs of the specified service
- *
- * @param service_id
- * @return
- * @throws IllegalArgumentException
- */
- public List<? extends Input> list_service_inputs(int service_id) throws IllegalArgumentException;
-
- /**
- * Create a service
- *
- * @param template_id
- * @param service_name
- * @param inputs
- * @throws Exception
- */
- public void create_service(int template_id, String service_name, List<Input> inputs)throws Exception;
-
- /**
- * Delete the specified service
- *
- * @param service_id
- * @throws IllegalArgumentException
- */
- public void delete_service(int service_id)throws Exception;
-
- /**
- * List workflows for the provided service
- *
- * @param service_id
- * @return
- * @throws IllegalArgumentException
- */
- public List<? extends Workflow> list_workflows(int service_id)throws IllegalArgumentException;
-
- /**
- * Fetch the specified workflow
- *
- * @param workflow_id
- * @return the requested Workflow
- * @throws IllegalArgumentException when the workflow_id doesn't exist
- */
- public Workflow get_workflow(int workflow_id)throws IllegalArgumentException;
-
- /**
- * List all executions
- *
- * @return
- * @throws Exception
- */
- public List<? extends Execution> list_executions()throws Exception;
-
- /**
- * List executions for provided service
- *
- * @param service_id
- * @return
- * @throws Exception
- */
- public List<? extends Execution> list_executions(int service_id)throws Exception;
-
- /**
- * Fetch the specified execution
- *
- * @param execution_id
- * @return
- * @throws IllegalArgumentException
- */
- public Execution get_execution(int execution_id)throws IllegalArgumentException;
-
- /**
- * Starts an execution
- *
- * @param service_id
- * @param workflow_name
- * @param details
- * @return the execution id
- * @throws Exception
- */
- public int start_execution(int service_id, String workflow_name, ExecutionDetails details)throws Exception;
-
- /**
- * Resumes an interrupted execution
- *
- * @param execution_id
- * @param details
- * @throws IllegalArgumentException
- */
- public void resume_execution(int execution_id, ExecutionDetails details)throws IllegalArgumentException;
-
- /**
- * Cancels the specified execution
- *
- * @param execution_id
- * @throws IllegalArgumentException
- */
- public void cancel_execution(int execution_id)throws Exception;
-}
diff --git a/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/AriaClientFactory.java b/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/AriaClientFactory.java
deleted file mode 100644
index 7241b2ac65..0000000000
--- a/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/AriaClientFactory.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * ============LICENSE_START===================================================
- * Copyright (c) 2017 Cloudify.co. All rights reserved.
- * ===================================================================
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- * ============LICENSE_END====================================================
-*/
-
-package com.gigaspaces.aria.rest.client;
-
-import java.net.URL;
-
-/**
- * Created by DeWayne on 7/12/2017.
- */
-public class AriaClientFactory {
-
- public AriaClient createRestClient(String protocol, String address, int port, String version){
- return new AriaRestClient(protocol, address, port, version);
- }
-}
diff --git a/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/AriaRestClient.java b/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/AriaRestClient.java
deleted file mode 100644
index 5de2203b2f..0000000000
--- a/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/AriaRestClient.java
+++ /dev/null
@@ -1,377 +0,0 @@
-/*
- * ============LICENSE_START===================================================
- * Copyright (c) 2017 Cloudify.co. All rights reserved.
- * ===================================================================
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- * ============LICENSE_END====================================================
-*/
-package com.gigaspaces.aria.rest.client;
-
-import java.util.List;
-
-import javax.ws.rs.client.Client;
-import javax.ws.rs.client.ClientBuilder;
-import javax.ws.rs.client.Entity;
-import javax.ws.rs.client.WebTarget;
-import javax.ws.rs.core.GenericType;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-
-import org.codehaus.jackson.JsonFactory;
-import org.codehaus.jackson.JsonNode;
-import org.codehaus.jackson.jaxrs.JacksonJsonProvider;
-import org.codehaus.jackson.map.ObjectMapper;
-import com.gigaspaces.aria.rest.client.exceptions.StorageException;
-import com.gigaspaces.aria.rest.client.exceptions.ValidationException;
-
-import sun.reflect.generics.reflectiveObjects.NotImplementedException;
-
-/**
- * Created by DeWayne on 7/12/2017.
- */
-public class AriaRestClient implements AriaClient {
- private Client client = null;
- private WebTarget base_target = null;
-
- /**
- * Construct an Aria REST client
- *
- * @param protocol
- * either http or https
- * @param address
- * the IP address or host name
- * @param port
- * the port of the service
- * @param version
- * the api version
- */
- public AriaRestClient(String protocol, String address, int port, String version) {
- this.client = ClientBuilder.newBuilder().register(JacksonJsonProvider.class).build();
- base_target = client.target(protocol + "://" + address + ":" + port + "/api/" + version);
- }
-
- /**
- * Installs a service template
- *
- * @param template
- * the template object
- * @throws ValidationException
- * @throws StorageException
- */
- public void install_service_template(ServiceTemplate template)
- throws ValidationException, StorageException, Exception {
-
- byte[] csarBytes = template.getCSARBytes();
- Response response = null;
- if (csarBytes == null) {
- response = base_target.path("templates/" + template.getName()).request(MediaType.APPLICATION_JSON)
- .put(Entity.entity(
- "{\"service-template-path\":\"" + template.getURI().toString() + "\""
- + ",\"service-template-filename\":\"" + template.getFilename() + "\"",
- MediaType.APPLICATION_JSON));
- }
- else {
-
- response = base_target.path("templates/" + template.getName()).request("application/zip")
- .put(Entity.entity(csarBytes, "application/zip"));
- }
-
- if (response.getStatus() == 500) {
- throw new StorageException(response.readEntity(String.class));
- } else if (response.getStatus() == 400) {
- throw new ValidationException(response.readEntity(String.class));
- } else if (response.getStatus() > 199 && response.getStatus() < 300) {
- return;
- } else {
- throw new Exception(
- "Error installing template: " + response.getStatus() + " " + response.readEntity(String.class));
- }
- }
-
- public ValidationResult validate_service_template(ServiceTemplate template) throws Exception {
- Response response = base_target.path("templates").request(MediaType.APPLICATION_JSON)
- .post(Entity.entity(
- "{\"service-template-path\":\"" + template.getURI().toString() + "\""
- + ",\"service-template-filename\":\"" + template.getFilename() + "\"}",
- MediaType.APPLICATION_JSON));
-
- ValidationResultImpl result = new ValidationResultImpl();
- if (response.getStatus() >= 200 && response.getStatus() < 300) {
- result.setFailed(false);
- } else if (response.getStatus() == 400) {
- result.setFailed(true);
- } else {
- throw new Exception(
- "received error response '" + response.getStatus() + "':" + response.readEntity(String.class));
- }
- return result;
-
- }
-
- /**
- *
- * @return a list of service templates
- */
- public List<? extends ServiceTemplate> list_service_templates() {
- List<? extends ServiceTemplate> templates = base_target.path("templates").request(MediaType.APPLICATION_JSON)
- .get(new GenericType<List<ServiceTemplateImpl>>() {
- });
-
- return templates;
- }
-
- /**
- * Deletes the specified template.
- *
- * TODO: Error handling is a little blunt. Need to describe failures better
- *
- * @param template_id
- * the template id to delete
- * @throws IllegalArgumentException
- * thrown when the template can't be deleted
- * @throws Exception
- * other server side errors
- */
- public void delete_service_template(int template_id) throws IllegalArgumentException, Exception {
- Response response = base_target.path("templates/" + template_id).request(MediaType.APPLICATION_JSON).delete();
-
- if (response.getStatus() >= 200 && response.getStatus() < 300) {
- return;
- } else if (response.getStatus() == 400) {
- throw new IllegalArgumentException("Error deleting template '" + template_id + "'");
- } else {
- throw new Exception("Error processing request. Return code = " + response.getStatus());
- }
- }
-
- /**
- * List the node templates for a given template id
- *
- * @param template_id
- * @return
- */
- public List<? extends NodeTemplate> list_nodes(int template_id) {
- List<? extends NodeTemplate> nodes = base_target.path("templates/" + template_id + "/nodes")
- .request(MediaType.APPLICATION_JSON).get(new GenericType<List<NodeTemplateImpl>>() {
- });
- return nodes;
- }
-
- /**
- * Get a specific node by id
- *
- * @param node_id
- * the node id
- * @return
- * @throws IllegalArgumentException
- */
- public NodeTemplate get_node(int node_id) throws IllegalArgumentException {
- NodeTemplate node = base_target.path("nodes/" + node_id).request(MediaType.APPLICATION_JSON)
- .get(NodeTemplateImpl.class);
- return node;
- }
-
- public List<? extends Service> list_services() {
- List<? extends Service> services = base_target.path("services").request(MediaType.APPLICATION_JSON)
- .get(new GenericType<List<ServiceImpl>>() {
- });
- return services;
- }
-
- public Service get_service(int service_id) throws IllegalArgumentException {
- throw new NotImplementedException();
- }
-
- public List<? extends Output> list_service_outputs(int service_id) throws IllegalArgumentException {
- List<? extends Output> outputs = base_target.path("services").request(MediaType.APPLICATION_JSON)
- .get(new GenericType<List<OutputImpl>>() {
- });
- return outputs;
- }
-
- public List<? extends Input> list_service_inputs(int service_id) throws IllegalArgumentException {
- List<? extends Input> inputs = base_target.path("services").request(MediaType.APPLICATION_JSON)
- .get(new GenericType<List<InputImpl>>() {
- });
- return inputs;
- }
-
- /**
- * Create a service based on the supplied template
- *
- * @param template_id
- * the template to create the service for
- * @param service_name
- * a name for the service
- * @param inputs
- * an optional list of inputs for the service (can be null)
- * @throws Exception
- */
- public void create_service(int template_id, String service_name, List<Input> inputs) throws Exception {
-
- String json = "{" + inputsToJson(inputs) + "}";
-
- Response response = base_target.path("templates/" + template_id + "/services/" + service_name)
- .request(MediaType.APPLICATION_JSON).post(Entity.entity(json, MediaType.APPLICATION_JSON));
-
- if (response.getStatus() < 200 || response.getStatus() > 299) {
- throw new Exception(
- "create service failed:" + response.getStatus() + " " + response.readEntity(String.class));
- }
- }
-
- public void delete_service(int service_id) throws Exception {
- Response response = base_target.path("services/" + service_id).request(MediaType.APPLICATION_JSON).delete();
- if (!responseOK(response)) {
- throw new Exception(
- "delete service failed: " + response.getStatus() + " " + response.readEntity(String.class));
- }
- }
-
- /**
- * List user workflows for supplied service
- *
- * @param service_id
- * @return
- * @throws IllegalArgumentException
- */
- public List<? extends Workflow> list_workflows(int service_id) throws IllegalArgumentException {
- List<? extends Workflow> workflows = base_target.path("services/" + service_id + "/workflows")
- .request(MediaType.APPLICATION_JSON).get(new GenericType<List<WorkflowImpl>>() {
- });
- return workflows;
- }
-
- public Workflow get_workflow(int workflow_id) throws IllegalArgumentException {
- throw new NotImplementedException();
- }
-
- /**
- * List all executions
- *
- * @return
- * @throws Exception
- */
- public List<? extends Execution> list_executions() throws Exception {
- List<? extends Execution> executions = base_target.path("executions").request(MediaType.APPLICATION_JSON)
- .get(new GenericType<List<ExecutionImpl>>() {
- });
- return executions;
- }
-
- /**
- * List executions for specified service
- *
- * @param service_id
- * @return
- * @throws Exception
- */
- public List<? extends Execution> list_executions(int service_id) throws Exception {
- List<? extends Execution> executions = base_target.path("services/" + service_id + "/executions")
- .request(MediaType.APPLICATION_JSON).get(new GenericType<List<ExecutionImpl>>() {
- });
- return executions;
- }
-
- /**
- * Get details about a specified execution
- *
- * @param execution_id
- * @return
- * @throws IllegalArgumentException
- */
- public Execution get_execution(int execution_id) throws IllegalArgumentException {
- Execution execution = base_target.path("executions/" + execution_id).request(MediaType.APPLICATION_JSON)
- .get(ExecutionImpl.class);
- return execution;
- }
-
- /**
- * Start an execution for the specified service
- *
- * @param service_id
- * the service to run the execution for
- * @param workflow_name
- * the name of the workflow to execute
- * @param details
- * details controlling execution operation
- * @return the execution id
- * @throws Exception
- */
- public int start_execution(int service_id, String workflow_name, ExecutionDetails details) throws Exception {
- StringBuilder json = new StringBuilder("{");
- if (details.getExecutor().length() > 0) {
- json.append("\"executor\":\"").append(details.getExecutor()).append("\",");
- }
- if (details.getInputs() != null) {
- json.append(inputsToJson(details.getInputs()));
- }
- json.append("\"task_max_attempts\":").append(details.getTaskMaxAttempts()).append(",");
- json.append("\"task_retry_interval\":").append(details.getTaskRetryInterval()).append("}");
-
- System.out.println("JSON=" + json.toString());
-
- Response response = base_target.path("services/" + service_id + "/executions/" + workflow_name)
- .request(MediaType.APPLICATION_JSON).post(Entity.entity(json.toString(), MediaType.APPLICATION_JSON));
-
- if (!responseOK(response)) {
- throw new Exception(
- "start execution failed: " + response.getStatus() + " " + response.readEntity(String.class));
- }
-
- ObjectMapper mapper = new ObjectMapper(new JsonFactory());
- JsonNode rootNode = mapper.readTree(response.readEntity(String.class));
- int id = rootNode.get("id").asInt(-1);
- return id;
- }
-
- public void resume_execution(int execution_id, ExecutionDetails details) throws IllegalArgumentException {
- StringBuilder json = new StringBuilder("{");
- if (details.getExecutor().length() > 0) {
- json.append("\"executor\":\"").append(details.getExecutor()).append("\",");
- }
- json.append("\"retry_failed_tasks\":").append(details.isRetry_failed_tasks()).append("}");
- Response response = base_target.path("executions/" + execution_id).request(MediaType.APPLICATION_JSON)
- .post(Entity.entity(json.toString(), MediaType.APPLICATION_JSON));
- }
-
- public void cancel_execution(int execution_id) throws Exception {
- Response response = base_target.path("executions/" + execution_id).request(MediaType.APPLICATION_JSON).delete();
- if (!responseOK(response)) {
- throw new Exception(
- "delete service failed: " + response.getStatus() + " " + response.readEntity(String.class));
- }
- }
-
- /**
- * ----- ----- PRIVATE METHODS -----
- */
-
- private boolean responseOK(Response response) {
- return response.getStatus() > 199 && response.getStatus() < 300;
- }
-
- private String inputsToJson(List<Input> inputs) {
- if (inputs == null)
- return null;
-
- StringBuilder sb = new StringBuilder("\"inputs\":{");
- for (Input input : inputs) {
- sb.append("\"").append(input.getName()).append("\":\"").append(input.getValue()).append("\",");
- }
- if (inputs.size() > 0)
- sb.deleteCharAt(sb.length() - 1); // trim comma
-
- return sb.toString();
- }
-}
diff --git a/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/Execution.java b/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/Execution.java
deleted file mode 100644
index ab742833e6..0000000000
--- a/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/Execution.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * ============LICENSE_START===================================================
- * Copyright (c) 2017 Cloudify.co. All rights reserved.
- * ===================================================================
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- * ============LICENSE_END====================================================
-*/
-package com.gigaspaces.aria.rest.client;
-
-/**
- * Created by DeWayne on 7/12/2017.
- */
-public interface Execution {
- int getExecutionId();
- String getWorkflowName();
- String getServiceTemplateName();
- String getServiceName();
- String getStatus();
-}
diff --git a/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/ExecutionDetails.java b/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/ExecutionDetails.java
deleted file mode 100644
index e7685a259c..0000000000
--- a/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/ExecutionDetails.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * ============LICENSE_START===================================================
- * Copyright (c) 2017 Cloudify.co. All rights reserved.
- * ===================================================================
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- * ============LICENSE_END====================================================
-*/
-package com.gigaspaces.aria.rest.client;
-
-import java.util.List;
-
-/**
- * Created by DeWayne on 7/12/2017.
- */
-public class ExecutionDetails {
- private String executor=""; //default
- private int task_max_attempts=30;
- private int task_retry_interval=30;
- private List<Input> inputs=null;
- private boolean retry_failed_tasks=false;
-
- public ExecutionDetails(){}
-
- public ExecutionDetails(String executor){
- this.executor=executor;
- }
-
- public ExecutionDetails(String executor, int task_max_attempts, int task_retry_interval, boolean retry_failed_tasks,
- List<Input> inputs){
- this.executor=executor;
- this.task_max_attempts=task_max_attempts;
- this.task_retry_interval=task_retry_interval;
- this.retry_failed_tasks = retry_failed_tasks;
- this.inputs=inputs;
- }
- public String getExecutor(){
- return executor;
- }
- public void setExecutor(String executor){
- this.executor=executor;
- }
- public int getTaskMaxAttempts(){
- return task_max_attempts;
- }
- public void setTaskMaxAttempts(int max){
- this.task_max_attempts=max;
- }
- public int getTaskRetryInterval(){
- return task_retry_interval;
- }
- public void setTaskRetryInterval(int interval){
- this.task_retry_interval=interval;
- }
- public List<Input> getInputs(){
- return inputs;
- }
- public void setInputs(List<Input> inputs){
- this.inputs=inputs;
- }
- public boolean isRetry_failed_tasks() {return retry_failed_tasks;}
- public void setRetry_failed_tasks(boolean retry_failed_tasks) {this.retry_failed_tasks = retry_failed_tasks;}
-
-}
diff --git a/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/ExecutionImpl.java b/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/ExecutionImpl.java
deleted file mode 100644
index 3aac2a2ca9..0000000000
--- a/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/ExecutionImpl.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * ============LICENSE_START===================================================
- * Copyright (c) 2017 Cloudify.co. All rights reserved.
- * ===================================================================
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- * ============LICENSE_END====================================================
-*/
-package com.gigaspaces.aria.rest.client;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/**
- * Created by DeWayne on 7/17/2017.
- */
-public class ExecutionImpl implements Execution {
- @JsonProperty("execution_id")
- int execution_id;
- @JsonProperty("workflow_name")
- String workflow_name;
- @JsonProperty("service_template_name")
- String service_template_name;
- @JsonProperty("service_name")
- String service_name;
- String status;
-
- public int getExecutionId() {
- return execution_id;
- }
- public String getWorkflowName() {
- return workflow_name;
- }
-
- public String getServiceTemplateName() {
- return service_template_name;
- }
-
- public String getServiceName() {
- return service_name;
- }
-
- public String getStatus() {
- return status;
- }
-}
diff --git a/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/Input.java b/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/Input.java
deleted file mode 100644
index 595dfb1245..0000000000
--- a/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/Input.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * ============LICENSE_START===================================================
- * Copyright (c) 2017 Cloudify.co. All rights reserved.
- * ===================================================================
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- * ============LICENSE_END====================================================
-*/
-package com.gigaspaces.aria.rest.client;
-
-/**
- * Created by DeWayne on 7/12/2017.
- */
-public interface Input {
- String getName();
- String getDescription();
- String getValue();
-}
diff --git a/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/InputImpl.java b/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/InputImpl.java
deleted file mode 100644
index 3002b7b54e..0000000000
--- a/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/InputImpl.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * ============LICENSE_START===================================================
- * Copyright (c) 2017 Cloudify.co. All rights reserved.
- * ===================================================================
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- * ============LICENSE_END====================================================
-*/
-package com.gigaspaces.aria.rest.client;
-
-/**
- * Created by DeWayne on 7/17/2017.
- */
-public class InputImpl implements Input {
- private String name, description, value;
-
- public InputImpl(){}
-
- public InputImpl(String name,String value,String description){
- if(name==null || value==null){
- throw new IllegalArgumentException("null argument supplied");
- }
- this.name=name;
- this.value=value;
- if(description!=null)this.description=description;
- }
-
- public String getName() {
- return name;
- }
-
- public String getDescription() {
- return description;
- }
-
- public String getValue() {
- return value;
- }
-
-}
diff --git a/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/NodeTemplate.java b/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/NodeTemplate.java
deleted file mode 100644
index bc46d7f5b2..0000000000
--- a/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/NodeTemplate.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * ============LICENSE_START===================================================
- * Copyright (c) 2017 Cloudify.co. All rights reserved.
- * ===================================================================
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- * ============LICENSE_END====================================================
-*/
-package com.gigaspaces.aria.rest.client;
-
-/**
- * Created by DeWayne on 7/12/2017.
- */
-public interface NodeTemplate {
- int getId();
- String getName();
- String getDescription();
- int getServiceTemplateId();
- String getTypeName();
-}
diff --git a/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/NodeTemplateImpl.java b/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/NodeTemplateImpl.java
deleted file mode 100644
index 9190671c7a..0000000000
--- a/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/NodeTemplateImpl.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * ============LICENSE_START===================================================
- * Copyright (c) 2017 Cloudify.co. All rights reserved.
- * ===================================================================
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- * ============LICENSE_END====================================================
-*/
-package com.gigaspaces.aria.rest.client;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/**
- * Created by DeWayne on 7/18/2017.
- */
-public class NodeTemplateImpl implements NodeTemplate {
- private int id;
- private String name;
- private String description="";
- @JsonProperty("service_template_id")
- private int service_template_id;
- @JsonProperty("type_name")
- private String type_name="";
-
- public NodeTemplateImpl(){}
-
- public NodeTemplateImpl(int id, String name, String description, int service_template_id, String type_name){
- this.id=id;
- this.description=description;
- this.service_template_id=service_template_id;
- this.type_name=type_name;
- }
-
- public int getId() {
- return id;
- }
-
- public String getDescription() {
- return description;
- }
-
- public int getServiceTemplateId() {
- return service_template_id;
- }
-
- public String getTypeName() {
- return type_name;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
-
-}
diff --git a/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/Output.java b/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/Output.java
deleted file mode 100644
index 83363bad6c..0000000000
--- a/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/Output.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * ============LICENSE_START===================================================
- * Copyright (c) 2017 Cloudify.co. All rights reserved.
- * ===================================================================
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- * ============LICENSE_END====================================================
-*/
-package com.gigaspaces.aria.rest.client;
-
-/**
- * Created by DeWayne on 7/12/2017.
- */
-public interface Output {
- String getName();
- String getDescription();
- String getValue();
-}
diff --git a/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/OutputImpl.java b/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/OutputImpl.java
deleted file mode 100644
index 0a6cecc9c1..0000000000
--- a/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/OutputImpl.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * ============LICENSE_START===================================================
- * Copyright (c) 2017 Cloudify.co. All rights reserved.
- * ===================================================================
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- * ============LICENSE_END====================================================
-*/
-package com.gigaspaces.aria.rest.client;
-
-/**
- * Created by DeWayne on 7/17/2017.
- */
-public class OutputImpl implements Output {
- private String name, description, value;
-
- public String getName() {
- return name;
- }
-
- public String getDescription() {
- return description;
- }
-
- public String getValue() {
- return value;
- }
-}
diff --git a/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/Service.java b/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/Service.java
deleted file mode 100644
index 9cf86ec73f..0000000000
--- a/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/Service.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * ============LICENSE_START===================================================
- * Copyright (c) 2017 Cloudify.co. All rights reserved.
- * ===================================================================
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- * ============LICENSE_END====================================================
-*/
-package com.gigaspaces.aria.rest.client;
-
-import java.util.Date;
-
-/**
- * Created by DeWayne on 7/12/2017.
- */
-public interface Service {
- int getId();
- String getDescription();
- String getName();
- String getServiceTemplate();
- Date getCreated();
- Date getUpdated();
-}
diff --git a/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/ServiceImpl.java b/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/ServiceImpl.java
deleted file mode 100644
index 456335cedc..0000000000
--- a/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/ServiceImpl.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * ============LICENSE_START===================================================
- * Copyright (c) 2017 Cloudify.co. All rights reserved.
- * ===================================================================
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- * ============LICENSE_END====================================================
-*/
-package com.gigaspaces.aria.rest.client;
-
-import java.net.URI;
-import java.util.Date;
-
-/**
- *
- *
- * Created by DeWayne on 7/17/2017.
- */
-public class ServiceImpl implements Service {
- private int id;
- private String description, name, template;
- private Date created, updated;
-
- public int getId(){
- return id;
- }
-
- public String getDescription(){
- return description;
- }
-
- public String getName(){
- return name;
- }
-
- public String getServiceTemplate(){
- return template;
- }
-
- public Date getCreated(){
- return created;
- }
-
- public Date getUpdated(){
- return updated;
- }
-
-
-}
diff --git a/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/ServiceTemplate.java b/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/ServiceTemplate.java
deleted file mode 100644
index a2ca8cf662..0000000000
--- a/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/ServiceTemplate.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * ============LICENSE_START===================================================
- * Copyright (c) 2017 Cloudify.co. All rights reserved.
- * ===================================================================
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- * ============LICENSE_END====================================================
-*/
-package com.gigaspaces.aria.rest.client;
-
-import java.net.URI;
-
-/**
- * Created by DeWayne on 7/12/2017.
- */
-public interface ServiceTemplate {
- String getName();
- URI getURI();
- int getId();
- String getFilename();
- String getDescription();
- byte[] getCSARBytes();
-}
diff --git a/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/ServiceTemplateImpl.java b/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/ServiceTemplateImpl.java
deleted file mode 100644
index 562fcb232e..0000000000
--- a/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/ServiceTemplateImpl.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * ============LICENSE_START===================================================
- * Copyright (c) 2017 Cloudify.co. All rights reserved.
- * ===================================================================
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- * ============LICENSE_END====================================================
-*/
-package com.gigaspaces.aria.rest.client;
-
-import java.net.URI;
-
-/**
- * CSAR based implementation
- *
- * Created by DeWayne on 7/17/2017.
- */
-public class ServiceTemplateImpl implements ServiceTemplate {
- public static final String DEFAULT_TEMPLATE_NAME = "service-template.yaml";
- private String name;
- private int id;
- private URI uri;
- private String filename = DEFAULT_TEMPLATE_NAME;
- private String description;
- private byte[] csar_blob; // for opaque binary
-
- public ServiceTemplateImpl(){}
-
- public ServiceTemplateImpl(String name, URI uri){
- this.name=name;
- this.uri=uri;
- }
-
- /**
- * Construct service template from CSAR byte array
- */
- public ServiceTemplateImpl(String name, byte[] csar){
- this.csar_blob = csar;
- this.name = name;
- }
-
- /**
- * Construct an instance based on CSAR
- * @param name a textual name for the template
- * @param uri a URI to a CSAR
- * @param filename the filename in the CSAR representing main yaml template
- */
- public ServiceTemplateImpl(String name, URI uri, String filename, String description){
- this.name=name;
- this.uri=uri;
- this.filename=filename;
- this.description=description;
- }
-
- public int getId(){
- return id;
- }
- public void setId(int id){
- this.id=id;
- }
- public String getName() {
- return name;
- }
- public void setName(String name){
- this.name=name;
- }
- public URI getURI() {
- return uri;
- }
- public void setPath(String path){
- this.uri=uri;
- }
- public String getFilename() {
- return filename;
- }
- public void setFilename(String filename){
- this.filename=filename;
- }
- public byte[] getCSARBytes() {
- return csar_blob;
- }
-
- public String getDescription(){ return description;}
-}
diff --git a/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/ValidationResult.java b/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/ValidationResult.java
deleted file mode 100644
index 3d40dfa1ec..0000000000
--- a/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/ValidationResult.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * ============LICENSE_START===================================================
- * Copyright (c) 2017 Cloudify.co. All rights reserved.
- * ===================================================================
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- * ============LICENSE_END====================================================
-*/
-package com.gigaspaces.aria.rest.client;
-
-/**
- * Created by DeWayne on 7/12/2017.
- */
-public interface ValidationResult {
-
- boolean getFailed();
-}
diff --git a/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/ValidationResultImpl.java b/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/ValidationResultImpl.java
deleted file mode 100644
index 22e34eb7b3..0000000000
--- a/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/ValidationResultImpl.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * ============LICENSE_START===================================================
- * Copyright (c) 2017 Cloudify.co. All rights reserved.
- * ===================================================================
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- * ============LICENSE_END====================================================
-*/
-package com.gigaspaces.aria.rest.client;
-
-/**
- * Created by DeWayne on 7/17/2017.
- */
-public class ValidationResultImpl implements ValidationResult {
- private boolean failed=false;
-
- public void setFailed(boolean failed){
- this.failed=failed;
- }
- public boolean getFailed() {
- return failed;
- }
-}
diff --git a/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/Workflow.java b/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/Workflow.java
deleted file mode 100644
index 7dbab18943..0000000000
--- a/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/Workflow.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * ============LICENSE_START===================================================
- * Copyright (c) 2017 Cloudify.co. All rights reserved.
- * ===================================================================
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- * ============LICENSE_END====================================================
-*/
-package com.gigaspaces.aria.rest.client;
-
-/**
- * Created by DeWayne on 7/12/2017.
- */
-public interface Workflow {
- String getName();
-}
diff --git a/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/WorkflowImpl.java b/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/WorkflowImpl.java
deleted file mode 100644
index 41105df26a..0000000000
--- a/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/WorkflowImpl.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * ============LICENSE_START===================================================
- * Copyright (c) 2017 Cloudify.co. All rights reserved.
- * ===================================================================
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- * ============LICENSE_END====================================================
-*/
-package com.gigaspaces.aria.rest.client;
-
-/**
- * Created by DeWayne on 7/17/2017.
- */
-public class WorkflowImpl implements Workflow{
- String name;
-
- public String getName() {
- return name;
- }
-}
diff --git a/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/exceptions/StorageException.java b/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/exceptions/StorageException.java
deleted file mode 100755
index 50ff38da10..0000000000
--- a/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/exceptions/StorageException.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * ============LICENSE_START===================================================
- * Copyright (c) 2017 Cloudify.co. All rights reserved.
- * ===================================================================
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- * ============LICENSE_END====================================================
-*/
-package com.gigaspaces.aria.rest.client.exceptions;
-
-/**
- * Created by DeWayne on 7/12/2017.
- */
-public class StorageException extends Exception {
- public StorageException(String message){
- super(message);
- }
-}
diff --git a/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/exceptions/ValidationException.java b/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/exceptions/ValidationException.java
deleted file mode 100755
index cbcee31cb4..0000000000
--- a/aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/exceptions/ValidationException.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * ============LICENSE_START===================================================
- * Copyright (c) 2017 Cloudify.co. All rights reserved.
- * ===================================================================
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- * ============LICENSE_END====================================================
-*/
-package com.gigaspaces.aria.rest.client.exceptions;
-
-/**
- * Created by DeWayne on 7/12/2017.
- */
-public class ValidationException extends Exception {
- public ValidationException(String message){
- super(message);
- }
-}
diff --git a/aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/AriaClientFactoryTest.java b/aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/AriaClientFactoryTest.java
deleted file mode 100644
index 7082c0add0..0000000000
--- a/aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/AriaClientFactoryTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
-* ============LICENSE_START=======================================================
-* ONAP : SO
-* ================================================================================
-* Copyright 2018 TechMahindra
-*=================================================================================
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-* ============LICENSE_END=========================================================
-*/
-
-package com.gigaspaces.aria.rest.client;
-
-import org.junit.Test;
-
-public class AriaClientFactoryTest {
-
- @Test
- public void test() {
- AriaClientFactory acf=new AriaClientFactory();
- assert(acf!=null);
- acf.createRestClient("https", "address", 9060, "V1");
- }
-}
diff --git a/aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/ExecutionDetailsTest.java b/aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/ExecutionDetailsTest.java
deleted file mode 100644
index 71933497bf..0000000000
--- a/aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/ExecutionDetailsTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
-* ============LICENSE_START=======================================================
-* ONAP : SO
-* ================================================================================
-* Copyright 2018 TechMahindra
-*=================================================================================
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-* ============LICENSE_END=========================================================
-*/
-
-package com.gigaspaces.aria.rest.client;
-
-import static org.junit.Assert.*;
-import java.util.Arrays;
-import java.util.List;
-import org.junit.Test;
-
-public class ExecutionDetailsTest {
-
-private Input inputs;
-private ExecutionDetails ed;
-
-@Test
- public void test() {
- List<Input> actual = Arrays.asList(inputs);
- ed= new ExecutionDetails("",30,30,false,actual);
- ed=new ExecutionDetails("");
- ed.setExecutor("");
- ed.setInputs(actual);
- ed.setTaskMaxAttempts(30);
- ed.setTaskRetryInterval(30);
- ed.setRetry_failed_tasks(false);
- assert(ed.getExecutor()).equals("");
- assertFalse(ed.isRetry_failed_tasks());
- assert(ed.getInputs().equals(actual));
- assertEquals(30,ed.getTaskMaxAttempts());
- assertEquals(30,ed.getTaskRetryInterval());
- }
-}
diff --git a/aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/ExecutionImplTest.java b/aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/ExecutionImplTest.java
deleted file mode 100644
index 75781f8933..0000000000
--- a/aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/ExecutionImplTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
-* ============LICENSE_START=======================================================
-* ONAP : SO
-* ================================================================================
-* Copyright 2018 TechMahindra
-*=================================================================================
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-* ============LICENSE_END=========================================================
-*/
-
-package com.gigaspaces.aria.rest.client;
-
-import org.junit.Test;
-
-public class ExecutionImplTest {
-
- @Test
- public void testExecutionImpl() {
- ExecutionImpl eil = new ExecutionImpl();
-
- eil.getExecutionId();
- eil.getServiceName();
- eil.getServiceTemplateName();
- eil.getStatus();
- eil.getWorkflowName();
- }
-}
diff --git a/aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/InputImpTest.java b/aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/InputImpTest.java
deleted file mode 100644
index 533067a7e1..0000000000
--- a/aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/InputImpTest.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
-* ============LICENSE_START=======================================================
-* ONAP : SO
-* ================================================================================
-* Copyright 2018 TechMahindra
-*=================================================================================
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-* ============LICENSE_END=========================================================
-*/
-
-package com.gigaspaces.aria.rest.client;
-
-import org.junit.Test;
-
-public class InputImpTest {
- private InputImpl ip;
-
- @Test
- public void test() {
- ip=new InputImpl("name","value","desc");
- assert(ip.getName().equals("name"));
- assert(ip.getValue().equals("value"));
- assert(ip.getDescription().equals("desc"));
- }
-}
diff --git a/aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/NodeTemplateImplTest.java b/aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/NodeTemplateImplTest.java
deleted file mode 100644
index b23e825ffb..0000000000
--- a/aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/NodeTemplateImplTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
-* ============LICENSE_START=======================================================
-* ONAP : SO
-* ================================================================================
-* Copyright 2018 TechMahindra
-*=================================================================================
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-* ============LICENSE_END=========================================================
-*/
-
-package com.gigaspaces.aria.rest.client;
-
-import static org.junit.Assert.*;
-import org.junit.Test;
-
-public class NodeTemplateImplTest {
-
- private NodeTemplateImpl nti;
-
- @Test
- public void test() {
- nti=new NodeTemplateImpl(12, null, "desc", 12, "tname");
- assertEquals(12,nti.getId());
- assertEquals(12,nti.getServiceTemplateId());
- assertEquals(null,nti.getName());
- assertEquals("desc",nti.getDescription());
- assertEquals("tname",nti.getTypeName());
- }
-}
diff --git a/aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/OutputImplTest.java b/aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/OutputImplTest.java
deleted file mode 100644
index f088572365..0000000000
--- a/aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/OutputImplTest.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
-* ============LICENSE_START=======================================================
-* ONAP : SO
-* ================================================================================
-* Copyright 2018 TechMahindra
-*=================================================================================
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-* ============LICENSE_END=========================================================
-*/
-
-package com.gigaspaces.aria.rest.client;
-
-import org.junit.Test;
-
-public class OutputImplTest {
-
- @Test
- public void test() {
- OutputImpl oil= new OutputImpl();
- oil.getDescription();
- oil.getName();
- oil.getValue();
- }
-}
diff --git a/aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/ServiceImplTest.java b/aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/ServiceImplTest.java
deleted file mode 100644
index c289968187..0000000000
--- a/aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/ServiceImplTest.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
-* ============LICENSE_START=======================================================
-* ONAP : SO
-* ================================================================================
-* Copyright 2018 TechMahindra
-*=================================================================================
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-* ============LICENSE_END=========================================================
-*/
-
-package com.gigaspaces.aria.rest.client;
-
-import org.junit.Test;
-
-public class ServiceImplTest {
-
- private ServiceImpl sil;
-
- @Test
- public void test() {
- sil=new ServiceImpl();
- sil.getId();
- sil.getDescription();
- sil.getName();
- sil.getServiceTemplate();
- sil.getUpdated();
- sil.getCreated();
- }
-
-}
diff --git a/aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/ServiceTemplateImplTest.java b/aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/ServiceTemplateImplTest.java
deleted file mode 100644
index 92a71c4a67..0000000000
--- a/aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/ServiceTemplateImplTest.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
-* ============LICENSE_START=======================================================
-* ONAP : SO
-* ================================================================================
-* Copyright 2018 TechMahindra
-*=================================================================================
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-* ============LICENSE_END=========================================================
-*/
-
-package com.gigaspaces.aria.rest.client;
-
-import static org.junit.Assert.*;
-
-import java.net.URI;
-
-import org.junit.Test;
-
-public class ServiceTemplateImplTest {
-
- private URI uri;
- private byte[] csar_blob;
- private ServiceTemplateImpl sti;
-
- @Test
- public void test() {
- sti=new ServiceTemplateImpl("name", uri, "filename", "description");
- ServiceTemplateImpl stid=new ServiceTemplateImpl("name", csar_blob);
- ServiceTemplateImpl std=new ServiceTemplateImpl("name", uri);
- sti.setFilename("filename");
- sti.setId(10);
- sti.setName("name");
- sti.setPath("path");
- assertEquals(10,sti.getId());
- assertEquals("name",sti.getName());
- assertEquals(uri,sti.getURI());
- assertEquals("filename",sti.getFilename());
- assertEquals("description",sti.getDescription());
- assertEquals(csar_blob,stid.getCSARBytes());
- }
-}
diff --git a/aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/ValidationResultImplTest.java b/aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/ValidationResultImplTest.java
deleted file mode 100644
index 1181fe67c0..0000000000
--- a/aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/ValidationResultImplTest.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-* ============LICENSE_START=======================================================
-* ONAP : SO
-* ================================================================================
-* Copyright 2018 TechMahindra
-*=================================================================================
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-* ============LICENSE_END=========================================================
-*/
-
-package com.gigaspaces.aria.rest.client;
-
-import static org.junit.Assert.*;
-import org.junit.Test;
-
-public class ValidationResultImplTest {
-
- private boolean failed=false;
-
- private ValidationResultImpl vri;
-
- @Test
- public void test() {
- vri=new ValidationResultImpl();
- vri.setFailed(failed);
- assertFalse(vri.getFailed());
- }
-}
diff --git a/aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/WorkflowimplTest.java b/aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/WorkflowimplTest.java
deleted file mode 100644
index fe5def8ff1..0000000000
--- a/aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/WorkflowimplTest.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
-* ============LICENSE_START=======================================================
-* ONAP : SO
-* ================================================================================
-* Copyright 2018 TechMahindra
-*=================================================================================
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-* ============LICENSE_END=========================================================
-*/
-
-package com.gigaspaces.aria.rest.client;
-
-import org.junit.Test;
-
-public class WorkflowimplTest {
-
- private WorkflowImpl wfi;
-
- @Test
- public void test() {
- wfi=new WorkflowImpl();
- wfi.getName();
- }
-}
diff --git a/aria/aria-rest-server/build.py b/aria/aria-rest-server/build.py
deleted file mode 100644
index cc36d2f855..0000000000
--- a/aria/aria-rest-server/build.py
+++ /dev/null
@@ -1,95 +0,0 @@
-#
-# ============LICENSE_START===================================================
-# Copyright (c) 2017 Cloudify.co. All rights reserved.
-# ===================================================================
-# Licensed under the Apache License, Version 2.0 (the "License"); you may not
-# use this file except in compliance with the License. You may obtain a copy
-# of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations under
-# the License.
-# ============LICENSE_END====================================================
-#
-
-import subprocess
-import os
-import sys
-import glob
-import xml.etree.ElementTree as etree
-
-# create and enter venv
-def create_venv( name):
- if subprocess.call("virtualenv {}".format(name), shell = True):
- raise Exception("virtualenv create failed")
- ret = subprocess.call(". {}/bin/activate && python {} run". \
- format(name,__file__), shell = True)
- sys.exit(ret)
-
-def init_venv():
- subprocess.call("pip install -U pip", shell = True)
- subprocess.call("pip install -U setuptools", shell = True)
- subprocess.call("pip install wheel", shell = True)
- subprocess.call("pip install twine", shell = True)
-
-
-if len(sys.argv) == 1:
- create_venv ("mavenvenv")
-else:
- init_venv()
-
- if os.environ['MVN_PHASE'] == 'package':
- wheelname = os.environ['WHEEL_NAME']
- inputdir = os.environ['INPUT_DIR']
- outputdir = os.environ['OUTPUT_DIR']
- savedir = os.getcwd()
- os.chdir(inputdir)
-
- if subprocess.call( [ "python",
- "setup.py",
- "bdist_wheel",
- "-d",
- outputdir
- ]):
- sys.stderr("wheel create failed")
- sys.exit(1)
- f = glob.glob(outputdir+"/*.whl")[0]
- os.rename(f , outputdir+"/"+ wheelname)
-
- elif os.environ['MVN_PHASE'] == 'deploy':
-
- it = etree.iterparse(os.environ['SETTINGS_FILE'])
- for _, el in it:
- el.tag = el.tag.split('}', 1)[1] # strip namespace
- settings = it.root
-
- username = settings.find('.//server[id="{}"]/username'.format(
- os.environ['PYPI_SERVERID'])).text
- password = settings.find('.//server[id="{}"]/password'.format(
- os.environ['PYPI_SERVERID'])).text
-
- try:
- if subprocess.call( [ "twine",
- "upload",
- "--username",
- username,
- "--password",
- password,
- "--repository-url",
- os.environ["PYPI_SERVER_BASEURL"],
- os.environ["WHEEL_PATH"]
- ] ):
- sys.stderr.write("pypi upload failed")
- sys.exit(1)
- finally:
- subprocess.call("rm -rf mavenvenv", shell = True)
-
- sys.exit(0)
- else:
- sys.stderr.write("Unrecognized phase '{}'\n".format(
- os.environ('MVN_PHASE')))
- sys.exit(1)
diff --git a/aria/aria-rest-server/pom.xml b/aria/aria-rest-server/pom.xml
deleted file mode 100644
index fc6af5abf7..0000000000
--- a/aria/aria-rest-server/pom.xml
+++ /dev/null
@@ -1,114 +0,0 @@
-<?xml version="1.0"?>
-<!--
- /*
- * ============LICENSE_START===================================================
- * Copyright (c) 2017 Cloudify.co. All rights reserved.
- * ===================================================================
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- * ============LICENSE_END====================================================
- */
- -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <packaging>pom</packaging>
- <groupId>org.onap.aria</groupId>
- <artifactId>ariarest</artifactId>
- <name>ariarest</name>
- <version>0.1.0-SNAPSHOT</version>
- <description>ARIA REST API wheel build</description>
- <parent>
- <groupId>org.onap.oparent</groupId>
- <artifactId>oparent</artifactId>
- <version>1.1.0</version>
- </parent>
-
- <properties>
- <python_version>2</python_version>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <wheel.name>${project.artifactId}-${project.version}-py${python_version}-none-any.whl</wheel.name>
- <python.sourceDirectory>${project.basedir}/src/main/python/aria-rest</python.sourceDirectory>
- <!-- <onap.nexus.pypiserver.baseurl>http://192.168.33.1:8081/repository/pypi-internal/</onap.nexus.pypiserver.baseurl> -->
- <!--<onap.nexus.pypiserver.serverid>ecomp-snapshots</onap.nexus.pypiserver.serverid> -->
- </properties>
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <version>3.0.0</version>
- <executions>
- <execution>
- <id>write-python-version</id>
- <goals>
- <goal>regex-property</goal>
- </goals>
- <phase>initialize</phase>
- <configuration>
- <name>python_version</name>
- <regex>-SNAPSHOT</regex>
- <value>${project.version}</value>
- <replacement>\.dev0</replacement>
- <failIfNoMatch>false</failIfNoMatch>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <version>1.6.0</version>
- <executions>
- <execution>
- <id>package</id>
- <phase>package</phase>
- <goals><goal>exec</goal></goals>
- <configuration>
- <executable>python</executable>
- <arguments>
- <argument>${project.basedir}/build.py</argument>
- </arguments>
- <environmentVariables>
- <MVN_PHASE>package</MVN_PHASE>
- <WHEEL_NAME>${wheel.name}</WHEEL_NAME>
- <INPUT_DIR>${project.basedir}/src/main/python/aria-rest</INPUT_DIR>
- <OUTPUT_DIR>${project.build.directory}</OUTPUT_DIR>
- </environmentVariables>
- </configuration>
- </execution>
- <!--execution>
- <id>deploy</id>
- <phase>deploy</phase>
- <goals><goal>exec</goal></goals>
- <configuration>
- <executable>python</executable>
- <arguments>
- <argument>${project.basedir}/build.py</argument>
- </arguments>
- <environmentVariables>
- <MVN_PHASE>deploy</MVN_PHASE>
- <PROJECT_VERSION>${project.version}</PROJECT_VERSION>
- <DOCKERREGISTRY_SNAPSHOT>${onap.nexus.dockerregistry.snapshot}</DOCKERREGISTRY_SNAPSHOT>
- <DOCKERREGISTRY_RELEASE>${onap.nexus.dockerregistry.release}</DOCKERREGISTRY_RELEASE>
- <PYPI_SERVER_BASEURL>${onap.nexus.pypiserver.baseurl}</PYPI_SERVER_BASEURL>
- <PYPI_SERVERID>${onap.nexus.pypiserver.serverid}</PYPI_SERVERID>
- <WHEEL_PATH>${project.build.directory}/${wheel.name}</WHEEL_PATH>
- </environmentVariables>
- </configuration>
- </execution-->
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
-
diff --git a/aria/aria-rest-server/setup.py b/aria/aria-rest-server/setup.py
deleted file mode 100644
index eca497c1d4..0000000000
--- a/aria/aria-rest-server/setup.py
+++ /dev/null
@@ -1,35 +0,0 @@
-# org.onap.dcae
-# ============LICENSE_START====================================================
-# Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
-# =============================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# ============LICENSE_END======================================================
-#
-# ECOMP is a trademark and service mark of AT&T Intellectual Property.
-
-from setuptools import setup, find_packages
-
-setup(
- name='aria-rest-server',
- version='0.1.0',
- packages=find_packages(),
- author = '',
- author_email = '',
- description = ('Library for ...'),
- license = 'Apache 2.0',
- keywords = '',
- url = '',
- zip_safe = True,
- install_requires=[],
- entry_points = {}
-)
diff --git a/aria/aria-rest-server/tox.ini b/aria/aria-rest-server/tox.ini
deleted file mode 100644
index 435de03638..0000000000
--- a/aria/aria-rest-server/tox.ini
+++ /dev/null
@@ -1,13 +0,0 @@
-[tox]
-envlist = py27
-[testenv]
-deps=
- pytest
- coverage
- pytest-cov
-setenv =
- PYTHONPATH={toxinidir}
-commands=
- echo "There are no tests yet"
- #pytest --junitxml xunit-results.xml --cov dcaeapplib --cov-report xml
- #coverage xml
diff --git a/aria/pom.xml b/aria/pom.xml
deleted file mode 100644
index e84e4fcaa5..0000000000
--- a/aria/pom.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.onap.so</groupId>
- <artifactId>so</artifactId>
- <version>1.2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>aria</artifactId>
-
- <name>ARIA related artifacts</name>
- <description>ARIA related artifacts</description>
- <packaging>pom</packaging>
-
- <modules>
- <module>aria-rest-java-client</module>
- <!-- <module>aria-rest-server</module> -->
- <module>multivim-plugin</module>
- </modules>
-</project>