aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pom.xml4
-rw-r--r--src/main/java/org/onap/sdc/tosca/parser/impl/SdcCsarHelperImpl.java4
-rw-r--r--src/test/java/org/onap/sdc/impl/SdcToscaParserBasicTest.java2
-rw-r--r--src/test/java/org/onap/sdc/impl/ToscaParserNodeTemplateTest.java22
-rw-r--r--src/test/resources/csars/service-NetworkCloudVnfServiceMock-csar.csarbin0 -> 61275 bytes
-rw-r--r--version.properties2
6 files changed, 30 insertions, 4 deletions
diff --git a/pom.xml b/pom.xml
index b04e237..651aec7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -7,7 +7,7 @@
<artifactId>sdc-tosca</artifactId>
<name>sdc-sdc-tosca</name>
<description>SDC Tosca Parser JAR file for use by consumers</description>
- <version>1.4.3-SNAPSHOT</version>
+ <version>1.4.4-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
@@ -118,7 +118,7 @@
<dependency>
<groupId>org.onap.sdc.jtosca</groupId>
<artifactId>jtosca</artifactId>
- <version>1.4.3-SNAPSHOT</version>
+ <version>1.4.4-SNAPSHOT</version>
</dependency>
diff --git a/src/main/java/org/onap/sdc/tosca/parser/impl/SdcCsarHelperImpl.java b/src/main/java/org/onap/sdc/tosca/parser/impl/SdcCsarHelperImpl.java
index ed6345c..f82272b 100644
--- a/src/main/java/org/onap/sdc/tosca/parser/impl/SdcCsarHelperImpl.java
+++ b/src/main/java/org/onap/sdc/tosca/parser/impl/SdcCsarHelperImpl.java
@@ -820,7 +820,9 @@ public class SdcCsarHelperImpl implements ISdcCsarHelper {
if (ntProperties != null && ntProperties.size() > 0) {
for (Property current : ntProperties.values()) {
- filterProperties(current.getValue(), current.getName(), filterType, pattern, filterMap);
+ if (current.getValue() != null) {
+ filterProperties(current.getValue(), current.getName(), filterType, pattern, filterMap);
+ }
}
}
diff --git a/src/test/java/org/onap/sdc/impl/SdcToscaParserBasicTest.java b/src/test/java/org/onap/sdc/impl/SdcToscaParserBasicTest.java
index edcf3ca..d1eed3e 100644
--- a/src/test/java/org/onap/sdc/impl/SdcToscaParserBasicTest.java
+++ b/src/test/java/org/onap/sdc/impl/SdcToscaParserBasicTest.java
@@ -45,6 +45,7 @@ public abstract class SdcToscaParserBasicTest {
static ISdcCsarHelper csarHelperVfInterfaces;
static ISdcCsarHelper csarHelperServiceAnnotations;
static ISdcCsarHelper csarHelperServiceAdiodAnnotations;
+ static ISdcCsarHelper csarHelperServiceNetworkCloud;
static Map<String, HashMap<String, List<String>>> fdntCsarHelper_Data;
@@ -77,6 +78,7 @@ public abstract class SdcToscaParserBasicTest {
csarHelperServiceAnnotations = getCsarHelper("csars/resource-Sirovinputannotation-csar.csar");
csarHelperVfInterfaces = getCsarHelper("csars/service-CxSvc-csar.csar");
csarHelperServiceAdiodAnnotations = getCsarHelper("csars/service-AdiodVmxVpeBvService-csar.csar");
+ csarHelperServiceNetworkCloud = getCsarHelper("csars/service-NetworkCloudVnfServiceMock-csar.csar");
fdntCsarHelper_Data = new HashMap<String, HashMap<String, List<String>>>(){
{
diff --git a/src/test/java/org/onap/sdc/impl/ToscaParserNodeTemplateTest.java b/src/test/java/org/onap/sdc/impl/ToscaParserNodeTemplateTest.java
index db7e5ae..7b268c6 100644
--- a/src/test/java/org/onap/sdc/impl/ToscaParserNodeTemplateTest.java
+++ b/src/test/java/org/onap/sdc/impl/ToscaParserNodeTemplateTest.java
@@ -1,6 +1,7 @@
package org.onap.sdc.impl;
import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertNotNull;
import static org.testng.Assert.assertNull;
import static org.testng.Assert.assertTrue;
@@ -785,6 +786,27 @@ public class ToscaParserNodeTemplateTest extends SdcToscaParserBasicTest {
}
@Test
+ public void testResolveGetInputForListOnNetworkCloud() {
+ final String related_network_role = "related_network_role";
+ List<NodeTemplate> serviceVfList = csarHelperServiceNetworkCloud.getServiceVfList();
+ assertNotNull(serviceVfList);
+ assertFalse(serviceVfList.isEmpty());
+ List<NodeTemplate> vfcListByVf = csarHelperServiceNetworkCloud.getVfcListByVf(csarHelperServiceNetworkCloud.getNodeTemplateCustomizationUuid(serviceVfList.get(0)));
+ assertNotNull(vfcListByVf);
+ assertFalse(vfcListByVf.isEmpty());
+ List<NodeTemplate> cpList = csarHelperServiceNetworkCloud.getNodeTemplateChildren(vfcListByVf.get(0));
+ assertNotNull(cpList);
+ assertFalse(cpList.isEmpty());
+ final Object propertyValue = cpList.get(0).getPropertyValue("related_networks");
+ assertNotNull(propertyValue);
+ ArrayList<Map<String, String>> relatedNetworkList = (ArrayList)propertyValue;
+ assertEquals(3, relatedNetworkList.size());
+ assertEquals("cor_direct_2", relatedNetworkList.get(0).get(related_network_role));
+ assertEquals("sgi_direct_2", relatedNetworkList.get(1).get(related_network_role));
+ assertEquals("int_imbl_2", relatedNetworkList.get(2).get(related_network_role));
+ }
+
+ @Test
public void testResolveGetInputForPrimitiveTypeString() {
//This test covers "default" resolving of primitive - as Object
List<NodeTemplate> vfcs = resolveGetInputCsar.getVfcListByVf("b5190df2-7880-4d6f-836f-56ab17e1b85b");
diff --git a/src/test/resources/csars/service-NetworkCloudVnfServiceMock-csar.csar b/src/test/resources/csars/service-NetworkCloudVnfServiceMock-csar.csar
new file mode 100644
index 0000000..84d90d8
--- /dev/null
+++ b/src/test/resources/csars/service-NetworkCloudVnfServiceMock-csar.csar
Binary files differ
diff --git a/version.properties b/version.properties
index a54766f..49feeb5 100644
--- a/version.properties
+++ b/version.properties
@@ -5,7 +5,7 @@
major=1
minor=4
-patch=3
+patch=4
base_version=${major}.${minor}.${patch}