aboutsummaryrefslogtreecommitdiffstats
path: root/aria
diff options
context:
space:
mode:
Diffstat (limited to 'aria')
-rwxr-xr-xaria/aria-rest-java-client/pom.xml33
-rw-r--r--aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/ExecutionImpl.java2
-rw-r--r--aria/aria-rest-java-client/src/main/java/com/gigaspaces/aria/rest/client/NodeTemplateImpl.java2
-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/pom.xml2
14 files changed, 425 insertions, 4 deletions
diff --git a/aria/aria-rest-java-client/pom.xml b/aria/aria-rest-java-client/pom.xml
index 0af9923401..a9e5567350 100755
--- a/aria/aria-rest-java-client/pom.xml
+++ b/aria/aria-rest-java-client/pom.xml
@@ -23,7 +23,7 @@
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>aria-client</groupId>
+ <groupId>org.onap.so</groupId>
<artifactId>aria-client</artifactId>
<version>1.2.0-SNAPSHOT</version>
@@ -45,6 +45,37 @@
<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>
</dependencies>
</project>
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
index 8e420cc16c..3aac2a2ca9 100644
--- 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
@@ -17,7 +17,7 @@
*/
package com.gigaspaces.aria.rest.client;
-import org.codehaus.jackson.annotate.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Created by DeWayne on 7/17/2017.
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
index 43338c952d..9190671c7a 100644
--- 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
@@ -17,7 +17,7 @@
*/
package com.gigaspaces.aria.rest.client;
-import org.codehaus.jackson.annotate.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Created by DeWayne on 7/18/2017.
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
new file mode 100644
index 0000000000..7082c0add0
--- /dev/null
+++ b/aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/AriaClientFactoryTest.java
@@ -0,0 +1,33 @@
+/*
+* ============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
new file mode 100644
index 0000000000..71933497bf
--- /dev/null
+++ b/aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/ExecutionDetailsTest.java
@@ -0,0 +1,49 @@
+/*
+* ============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
new file mode 100644
index 0000000000..75781f8933
--- /dev/null
+++ b/aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/ExecutionImplTest.java
@@ -0,0 +1,37 @@
+/*
+* ============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
new file mode 100644
index 0000000000..533067a7e1
--- /dev/null
+++ b/aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/InputImpTest.java
@@ -0,0 +1,35 @@
+/*
+* ============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
new file mode 100644
index 0000000000..b23e825ffb
--- /dev/null
+++ b/aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/NodeTemplateImplTest.java
@@ -0,0 +1,39 @@
+/*
+* ============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
new file mode 100644
index 0000000000..f088572365
--- /dev/null
+++ b/aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/OutputImplTest.java
@@ -0,0 +1,34 @@
+/*
+* ============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
new file mode 100644
index 0000000000..c289968187
--- /dev/null
+++ b/aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/ServiceImplTest.java
@@ -0,0 +1,40 @@
+/*
+* ============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
new file mode 100644
index 0000000000..92a71c4a67
--- /dev/null
+++ b/aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/ServiceTemplateImplTest.java
@@ -0,0 +1,51 @@
+/*
+* ============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
new file mode 100644
index 0000000000..1181fe67c0
--- /dev/null
+++ b/aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/ValidationResultImplTest.java
@@ -0,0 +1,38 @@
+/*
+* ============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
new file mode 100644
index 0000000000..fe5def8ff1
--- /dev/null
+++ b/aria/aria-rest-java-client/src/test/java/com/gigaspaces/aria/rest/client/WorkflowimplTest.java
@@ -0,0 +1,34 @@
+/*
+* ============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/pom.xml b/aria/pom.xml
index 95ef93b6c8..c2617dafcc 100644
--- a/aria/pom.xml
+++ b/aria/pom.xml
@@ -17,7 +17,7 @@
<modules>
<module>aria-rest-java-client</module>
- <module>aria-rest-server</module>
+ <!-- <module>aria-rest-server</module> -->
<!-- <module>multivim-plugin</module> -->
</modules>
</project>