summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/openecomp-common-configuration-management/openecomp-configuration-management-core/pom.xml54
-rw-r--r--common/openecomp-common-configuration-management/openecomp-configuration-management-core/src/main/java/org/openecomp/config/ConfigurationUtils.java11
-rw-r--r--common/openecomp-logging-lib/openecomp-logging-api/src/main/java/org/openecomp/core/logging/api/LoggerFactory.java4
-rw-r--r--common/openecomp-logging-lib/openecomp-logging-api/src/main/java/org/openecomp/core/logging/api/context/TaskFactory.java4
-rw-r--r--common/openecomp-sdc-artifact-generator-lib/openecomp-sdc-artifact-generator-core/src/main/java/org/openecomp/sdc/generator/aai/AaiArtifactGenerator.java2
-rw-r--r--common/openecomp-sdc-artifact-generator-lib/openecomp-sdc-artifact-generator-test/dependency-reduced-pom.xml1
-rw-r--r--common/openecomp-sdc-artifact-generator-lib/openecomp-sdc-artifact-generator-test/src/main/java/org/openecomp/sdc/generator/ArtifactGenerationServiceTest.java8
-rw-r--r--common/openecomp-sdc-artifact-generator-lib/openecomp-sdc-artifact-generator-test/src/main/java/org/openecomp/sdc/generator/SampleJUnitTest.java424
-rw-r--r--common/openecomp-tosca-datatype/src/main/resources/globalTypes/openecomp/capabilities.yml50
-rw-r--r--common/openecomp-tosca-datatype/src/main/resources/globalTypes/openecomp/data.yml223
-rw-r--r--common/openecomp-tosca-datatype/src/main/resources/globalTypes/openecomp/nodes.yml536
-rw-r--r--common/openecomp-tosca-datatype/src/main/resources/globalTypes/openecomp/relationships.yml12
12 files changed, 985 insertions, 344 deletions
diff --git a/common/openecomp-common-configuration-management/openecomp-configuration-management-core/pom.xml b/common/openecomp-common-configuration-management/openecomp-configuration-management-core/pom.xml
index 609e8abdf7..186a50849a 100644
--- a/common/openecomp-common-configuration-management/openecomp-configuration-management-core/pom.xml
+++ b/common/openecomp-common-configuration-management/openecomp-configuration-management-core/pom.xml
@@ -24,62 +24,62 @@
<artifactId>jackson-dataformat-yaml</artifactId>
<version>${jackson.version}</version>
</dependency>
- <dependency>
+ <dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-configuration2</artifactId>
<version>2.1</version>
</dependency>
- <dependency>
+ <dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.2</version>
</dependency>
- <dependency>
+ <dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>${commons.beanutils.version}</version>
</dependency>
- <dependency>
+ <dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.3.2</version>
</dependency>
- <dependency>
+ <dependency>
<groupId>com.github.adejanovski</groupId>
<artifactId>cassandra-jdbc-wrapper</artifactId>
<version>${cassandra.version}</version>
</dependency>
- <dependency>
+ <dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-dbcp2</artifactId>
<version>2.0</version>
</dependency>
- <dependency>
+ <dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
<version>2.4.2</version>
</dependency>
- <dependency>
+ <dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons.io.version}</version>
</dependency>
- <dependency>
+ <dependency>
<groupId>net.sf.corn</groupId>
<artifactId>corn-cps</artifactId>
<version>1.1.7</version>
<exclusions>
- <exclusion>
- <groupId>com.sun</groupId>
- <artifactId>tools</artifactId>
- </exclusion>
- </exclusions>
+ <exclusion>
+ <groupId>com.sun</groupId>
+ <artifactId>tools</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
- <groupId>com.virtlink.commons</groupId>
- <artifactId>commons-configuration2-jackson</artifactId>
- <version>0.6.1</version>
- </dependency>
+ <groupId>com.virtlink.commons</groupId>
+ <artifactId>commons-configuration2-jackson</artifactId>
+ <version>0.6.1</version>
+ </dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
@@ -95,16 +95,16 @@
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
</dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-ext</artifactId>
- <version>${slf4j.version}</version>
- </dependency>
<dependency>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-configuration-management-api</artifactId>
- <version>1.1.0-SNAPSHOT</version>
- </dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-ext</artifactId>
+ <version>${slf4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc.common</groupId>
+ <artifactId>openecomp-configuration-management-api</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ </dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
diff --git a/common/openecomp-common-configuration-management/openecomp-configuration-management-core/src/main/java/org/openecomp/config/ConfigurationUtils.java b/common/openecomp-common-configuration-management/openecomp-configuration-management-core/src/main/java/org/openecomp/config/ConfigurationUtils.java
index c0a1e0ceb0..889efea3da 100644
--- a/common/openecomp-common-configuration-management/openecomp-configuration-management-core/src/main/java/org/openecomp/config/ConfigurationUtils.java
+++ b/common/openecomp-common-configuration-management/openecomp-configuration-management-core/src/main/java/org/openecomp/config/ConfigurationUtils.java
@@ -584,14 +584,19 @@ public class ConfigurationUtils {
stmt.setString(i + 1, params[i]);
}
}
- ResultSet rs = stmt.executeQuery();
- while (rs.next()) {
- coll.add(rs.getString(1));
+
+ try (ResultSet rs = stmt.executeQuery()) {
+
+ while (rs.next()) {
+ coll.add(rs.getString(1));
+ }
}
+
} catch (Exception exception) {
//exception.printStackTrace();
return null;
}
+
return coll;
}
diff --git a/common/openecomp-logging-lib/openecomp-logging-api/src/main/java/org/openecomp/core/logging/api/LoggerFactory.java b/common/openecomp-logging-lib/openecomp-logging-api/src/main/java/org/openecomp/core/logging/api/LoggerFactory.java
index e6f4aa3707..fdc874ee54 100644
--- a/common/openecomp-logging-lib/openecomp-logging-api/src/main/java/org/openecomp/core/logging/api/LoggerFactory.java
+++ b/common/openecomp-logging-lib/openecomp-logging-api/src/main/java/org/openecomp/core/logging/api/LoggerFactory.java
@@ -41,8 +41,8 @@ public class LoggerFactory extends BaseFactory {
try {
service = locateService(LoggerCreationService.class);
- } catch (Throwable throwable) {
- new RuntimeException("Failed to instantiate logger factory", throwable).printStackTrace();
+ } catch (Exception e) {
+ new RuntimeException("Failed to instantiate logger factory", e).printStackTrace();
// use the no-op service to prevent recursion in case of an attempt to log an exception as a
// result of a logger initialization error
service = new NoOpLoggerCreationService();
diff --git a/common/openecomp-logging-lib/openecomp-logging-api/src/main/java/org/openecomp/core/logging/api/context/TaskFactory.java b/common/openecomp-logging-lib/openecomp-logging-api/src/main/java/org/openecomp/core/logging/api/context/TaskFactory.java
index b358a77573..30bc7372c6 100644
--- a/common/openecomp-logging-lib/openecomp-logging-api/src/main/java/org/openecomp/core/logging/api/context/TaskFactory.java
+++ b/common/openecomp-logging-lib/openecomp-logging-api/src/main/java/org/openecomp/core/logging/api/context/TaskFactory.java
@@ -46,8 +46,8 @@ public class TaskFactory extends BaseFactory {
try {
service = locateService(ContextPropagationService.class);
- } catch (Throwable throwable) {
- error = new RuntimeException("Failed to instantiate task factory", throwable);
+ } catch (Exception e) {
+ error = new RuntimeException("Failed to instantiate task factory", e);
}
SERVICE = service;
diff --git a/common/openecomp-sdc-artifact-generator-lib/openecomp-sdc-artifact-generator-core/src/main/java/org/openecomp/sdc/generator/aai/AaiArtifactGenerator.java b/common/openecomp-sdc-artifact-generator-lib/openecomp-sdc-artifact-generator-core/src/main/java/org/openecomp/sdc/generator/aai/AaiArtifactGenerator.java
index c8e7be53d6..f4dd4d476c 100644
--- a/common/openecomp-sdc-artifact-generator-lib/openecomp-sdc-artifact-generator-core/src/main/java/org/openecomp/sdc/generator/aai/AaiArtifactGenerator.java
+++ b/common/openecomp-sdc-artifact-generator-lib/openecomp-sdc-artifact-generator-core/src/main/java/org/openecomp/sdc/generator/aai/AaiArtifactGenerator.java
@@ -163,7 +163,7 @@ public class AaiArtifactGenerator implements ArtifactGenerator {
log.warn(
"Additional tosca file found with resource version id : "
+ resourceUuId);
- break;
+ continue;
}
//update resource version with version from service tosca
String resourceVersion = resourcesVersion.get(resourceUuId);
diff --git a/common/openecomp-sdc-artifact-generator-lib/openecomp-sdc-artifact-generator-test/dependency-reduced-pom.xml b/common/openecomp-sdc-artifact-generator-lib/openecomp-sdc-artifact-generator-test/dependency-reduced-pom.xml
index a71fe7feaa..5a51961846 100644
--- a/common/openecomp-sdc-artifact-generator-lib/openecomp-sdc-artifact-generator-test/dependency-reduced-pom.xml
+++ b/common/openecomp-sdc-artifact-generator-lib/openecomp-sdc-artifact-generator-test/dependency-reduced-pom.xml
@@ -7,7 +7,6 @@
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
- <groupId>org.openecomp.sdc.common</groupId>
<artifactId>openecomp-sdc-artifact-generator-test</artifactId>
<build>
<plugins>
diff --git a/common/openecomp-sdc-artifact-generator-lib/openecomp-sdc-artifact-generator-test/src/main/java/org/openecomp/sdc/generator/ArtifactGenerationServiceTest.java b/common/openecomp-sdc-artifact-generator-lib/openecomp-sdc-artifact-generator-test/src/main/java/org/openecomp/sdc/generator/ArtifactGenerationServiceTest.java
index 85479e31da..ced8acbb80 100644
--- a/common/openecomp-sdc-artifact-generator-lib/openecomp-sdc-artifact-generator-test/src/main/java/org/openecomp/sdc/generator/ArtifactGenerationServiceTest.java
+++ b/common/openecomp-sdc-artifact-generator-lib/openecomp-sdc-artifact-generator-test/src/main/java/org/openecomp/sdc/generator/ArtifactGenerationServiceTest.java
@@ -34,6 +34,7 @@ import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
import java.io.ByteArrayInputStream;
+import java.io.IOException;
import java.io.InputStream;
import java.util.*;
import java.util.Properties;
@@ -604,8 +605,11 @@ public class ArtifactGenerationServiceTest {
try {
jaxbContext = JAXBContext.newInstance(Model.class);
Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
- InputStream aaiModelStream = new ByteArrayInputStream(aaiModel.getBytes());
- return (Model) unmarshaller.unmarshal(aaiModelStream);
+
+ try (InputStream aaiModelStream = new ByteArrayInputStream(aaiModel.getBytes())) {
+ return (Model) unmarshaller.unmarshal(aaiModelStream);
+ } catch (IOException ignored) { /* ignore */ }
+
} catch (JAXBException e) {
e.printStackTrace();
}
diff --git a/common/openecomp-sdc-artifact-generator-lib/openecomp-sdc-artifact-generator-test/src/main/java/org/openecomp/sdc/generator/SampleJUnitTest.java b/common/openecomp-sdc-artifact-generator-lib/openecomp-sdc-artifact-generator-test/src/main/java/org/openecomp/sdc/generator/SampleJUnitTest.java
index bbbb74dc05..6d44a37a92 100644
--- a/common/openecomp-sdc-artifact-generator-lib/openecomp-sdc-artifact-generator-test/src/main/java/org/openecomp/sdc/generator/SampleJUnitTest.java
+++ b/common/openecomp-sdc-artifact-generator-lib/openecomp-sdc-artifact-generator-test/src/main/java/org/openecomp/sdc/generator/SampleJUnitTest.java
@@ -67,7 +67,10 @@ public class SampleJUnitTest extends TestCase {
if (configLocation != null) {
File file = new File(configLocation);
if (file.exists()) {
- properties.load(new FileInputStream(file));
+
+ try (InputStream fis = new FileInputStream(file)) {
+ properties.load(fis);
+ }
}
}
}
@@ -86,12 +89,9 @@ public class SampleJUnitTest extends TestCase {
public void testArtifactGenerationSingleVFSingleVFModule() {
try {
List<Artifact> inputArtifacts = new ArrayList();
- InputStream fis1 = SampleJUnitTest.class.getResourceAsStream("/vf_vmme_template_SingleVFVFMod.yml");
- readPayload(inputArtifacts, fis1, "vf_vmme_template_SingleVFVFMod.yml");
+ readPayloadFromResource(inputArtifacts, "vf_vmme_template_SingleVFVFMod.yml");
- fis1.close();
- InputStream fis2 = SampleJUnitTest.class.getResourceAsStream("/service_vmme_template_SingleVFVFMod.yml");
- readPayload(inputArtifacts, fis2, "service_vmme_template_SingleVFVFMod.yml");
+ readPayloadFromResource(inputArtifacts, "service_vmme_template_SingleVFVFMod.yml");
ArtifactGenerationServiceImpl obj = new ArtifactGenerationServiceImpl();
List<ToscaTemplate> toscas = new LinkedList();
@@ -124,8 +124,7 @@ public class SampleJUnitTest extends TestCase {
public void testArtifactGenerationMissingVFInServiceTOSCA() {
try {
List<Artifact> inputArtifacts = new ArrayList();
- InputStream fis2 = SampleJUnitTest.class.getResourceAsStream("/service_vmme_template_MissingVFInServiceTOSCA.yml");
- readPayload(inputArtifacts, fis2, "service_vmme_template_MissingVFInServiceTOSCA.yml");
+ readPayloadFromResource(inputArtifacts, "service_vmme_template_MissingVFInServiceTOSCA.yml");
ArtifactGenerationServiceImpl obj = new ArtifactGenerationServiceImpl();
List<ToscaTemplate> toscas = new LinkedList();
@@ -156,12 +155,9 @@ public class SampleJUnitTest extends TestCase {
public void testArtifactGenerationVerifySameStaticWidgetsForAllServices() {
try {
List<Artifact> inputArtifacts = new ArrayList();
- InputStream fis1 = SampleJUnitTest.class.getResourceAsStream("/vf_vmme_template_SameWidgets1.yml");
- readPayload(inputArtifacts, fis1, "vf_vmme_template_SameWidgets1.yml");
+ readPayloadFromResource(inputArtifacts, "vf_vmme_template_SameWidgets1.yml");
- fis1.close();
- InputStream fis2 = SampleJUnitTest.class.getResourceAsStream("/service_vmme_template_SameWidget1.yml");
- readPayload(inputArtifacts, fis2, "service_vmme_template_SameWidget1.yml");
+ readPayloadFromResource(inputArtifacts, "service_vmme_template_SameWidget1.yml");
ArtifactGenerationServiceImpl obj = new ArtifactGenerationServiceImpl();
List<ToscaTemplate> toscas = new LinkedList();
@@ -179,11 +175,9 @@ public class SampleJUnitTest extends TestCase {
List<Artifact> inputArtifacts2 = new ArrayList();
- InputStream fis3 = SampleJUnitTest.class.getResourceAsStream("/vf_vmme_template_SameWidgets2.yml");
- readPayload(inputArtifacts2, fis3, "vf_vmme_template_SameWidgets2.yml");
+ readPayloadFromResource(inputArtifacts2, "vf_vmme_template_SameWidgets2.yml");
- InputStream fis4 = SampleJUnitTest.class.getResourceAsStream("/service_vmme_template_SameWidget2.yml");
- readPayload(inputArtifacts2, fis4, "service_vmme_template_SameWidget2.yml");
+ readPayloadFromResource(inputArtifacts2, "service_vmme_template_SameWidget2.yml");
ArtifactGenerationServiceImpl obj2 = new ArtifactGenerationServiceImpl();
GenerationData data2 = obj2.generateArtifact(inputArtifacts2, generatorConfig,additionalParams);
@@ -230,12 +224,9 @@ public class SampleJUnitTest extends TestCase {
try {
List<Artifact> inputArtifacts = new ArrayList();
String[] resourceFileList = {};
- InputStream fis1 = SampleJUnitTest.class.getResourceAsStream("/vf_vmme_template_MulVFVFMod.yml");
- readPayload(inputArtifacts,fis1, "vf_vmme_template_MulVFVFMod.yml");
+ readPayloadFromResource(inputArtifacts, "vf_vmme_template_MulVFVFMod.yml");
- fis1.close();
- InputStream fis2 = SampleJUnitTest.class.getResourceAsStream("/service_vmme_template_MulVFVFMod.yml");
- readPayload(inputArtifacts,fis2, "service_vmme_template_MulVFVFMod.yml");
+ readPayloadFromResource(inputArtifacts, "service_vmme_template_MulVFVFMod.yml");
ArtifactGenerationServiceImpl obj = new ArtifactGenerationServiceImpl();
List<ToscaTemplate> toscas = new LinkedList();
@@ -268,17 +259,13 @@ public class SampleJUnitTest extends TestCase {
try {
List<Artifact> inputArtifacts = new ArrayList();
- InputStream fis3 = SampleJUnitTest.class.getResourceAsStream("/CMAUI_VF.yaml");
- readPayload(inputArtifacts,fis3, "CMAUI_VF.yaml");
+ readPayloadFromResource(inputArtifacts, "CMAUI_VF.yaml");
- InputStream fis4 = SampleJUnitTest.class.getResourceAsStream("/ECA_OAM_VF.yaml");
- readPayload(inputArtifacts,fis4, "ECA_OAM_VF.yaml");
+ readPayloadFromResource(inputArtifacts, "ECA_OAM_VF.yaml");
- InputStream fis5 = SampleJUnitTest.class.getResourceAsStream("/MMSC_Sevice_07_25_16.yaml");
- readPayload(inputArtifacts,fis5, "MMSC_Sevice_07_25_16.yaml");
+ readPayloadFromResource(inputArtifacts, "MMSC_Sevice_07_25_16.yaml");
- InputStream fis6 = SampleJUnitTest.class.getResourceAsStream("/MMSC_VF.yaml");
- readPayload(inputArtifacts,fis6, "MMSC_VF.yaml");
+ readPayloadFromResource(inputArtifacts, "MMSC_VF.yaml");
ArtifactGenerationServiceImpl obj = new ArtifactGenerationServiceImpl();
List<ToscaTemplate> toscas = new LinkedList();
@@ -310,12 +297,9 @@ public class SampleJUnitTest extends TestCase {
public void testArtifactGenerationDupVFUUID() {
try {
List<Artifact> inputArtifacts = new ArrayList();
- InputStream fis1 = SampleJUnitTest.class.getResourceAsStream("/vf_vmme_template_DupVFUUID.yml");
- readPayload(inputArtifacts,fis1, "vf_vmme_template_DupVFUUID.yml");
+ readPayloadFromResource(inputArtifacts, "vf_vmme_template_DupVFUUID.yml");
- fis1.close();
- InputStream fis2 = SampleJUnitTest.class.getResourceAsStream("/service_vmme_template_DupVFUUID.yml");
- readPayload(inputArtifacts,fis2, "service_vmme_template_DupVFUUID.yml");
+ readPayloadFromResource(inputArtifacts, "service_vmme_template_DupVFUUID.yml");
ArtifactGenerationServiceImpl obj = new ArtifactGenerationServiceImpl();
List<ToscaTemplate> toscas = new LinkedList();
@@ -346,12 +330,9 @@ public class SampleJUnitTest extends TestCase {
public void testArtifactGenerationDupVFModUUID() {
try {
List<Artifact> inputArtifacts = new ArrayList();
- InputStream fis1 = SampleJUnitTest.class.getResourceAsStream("/vf_vmme_template_DupVFModUUID.yml");
- readPayload(inputArtifacts,fis1, "vf_vmme_template_DupVFModUUID.yml");
+ readPayloadFromResource(inputArtifacts, "vf_vmme_template_DupVFModUUID.yml");
- fis1.close();
- InputStream fis2 = SampleJUnitTest.class.getResourceAsStream("/service_vmme_template_DupVFModUUID.yml");
- readPayload(inputArtifacts,fis2, "service_vmme_template_DupVFModUUID.yml");
+ readPayloadFromResource(inputArtifacts, "service_vmme_template_DupVFModUUID.yml");
ArtifactGenerationServiceImpl obj = new ArtifactGenerationServiceImpl();
List<ToscaTemplate> toscas = new LinkedList();
@@ -381,12 +362,9 @@ public class SampleJUnitTest extends TestCase {
public void testArtifactGenerationVerifyVFModWithoutVNFC() {
try {
List<Artifact> inputArtifacts = new ArrayList();
- InputStream fis1 = SampleJUnitTest.class.getResourceAsStream("/vf_vmme_template_VerifyVFModWithoutVNFC.yml");
- readPayload(inputArtifacts,fis1, "vf_vmme_template_VerifyVFModWithoutVNFC.yml");
+ readPayloadFromResource(inputArtifacts, "vf_vmme_template_VerifyVFModWithoutVNFC.yml");
- fis1.close();
- InputStream fis2 = SampleJUnitTest.class.getResourceAsStream("/service_vmme_template_VerifyVFModWithoutVNFC.yml");
- readPayload(inputArtifacts,fis2, "service_vmme_template_VerifyVFModWithoutVNFC.yml");
+ readPayloadFromResource(inputArtifacts, "service_vmme_template_VerifyVFModWithoutVNFC.yml");
ArtifactGenerationServiceImpl obj = new ArtifactGenerationServiceImpl();
List<ToscaTemplate> toscas = new LinkedList();
@@ -416,12 +394,9 @@ public class SampleJUnitTest extends TestCase {
public void testArtifactGenerationVerifyVFModWithInvalidMember() {
try {
List<Artifact> inputArtifacts = new ArrayList();
- InputStream fis1 = SampleJUnitTest.class.getResourceAsStream("/vf_vmme_template_VerifyVFModWithInvalidNo.yml");
- readPayload(inputArtifacts,fis1, "vf_vmme_template_VerifyVFModWithInvalidNo.yml");
+ readPayloadFromResource(inputArtifacts, "vf_vmme_template_VerifyVFModWithInvalidNo.yml");
- fis1.close();
- InputStream fis2 = SampleJUnitTest.class.getResourceAsStream("/service_vmme_template_VerifyVFModWithInvalidNo.yml");
- readPayload(inputArtifacts,fis2, "service_vmme_template_VerifyVFModWithInvalidNo.yml");
+ readPayloadFromResource(inputArtifacts, "service_vmme_template_VerifyVFModWithInvalidNo.yml");
ArtifactGenerationServiceImpl obj = new ArtifactGenerationServiceImpl();
List<ToscaTemplate> toscas = new LinkedList();
@@ -451,12 +426,9 @@ public class SampleJUnitTest extends TestCase {
public void testArtifactGenerationNullFields() {
try {
List<Artifact> inputArtifacts = new ArrayList();
- InputStream fis1 = SampleJUnitTest.class.getResourceAsStream("/vf_vmme_template_NullFields.yml");
- readPayload(inputArtifacts,fis1, "vf_vmme_template_NullFields.yml");
+ readPayloadFromResource(inputArtifacts, "vf_vmme_template_NullFields.yml");
- fis1.close();
- InputStream fis2 = SampleJUnitTest.class.getResourceAsStream("/service_vmme_template_NullFields.yml");
- readPayload(inputArtifacts,fis2, "service_vmme_template_NullFields.yml");
+ readPayloadFromResource(inputArtifacts, "service_vmme_template_NullFields.yml");
ArtifactGenerationServiceImpl obj = new ArtifactGenerationServiceImpl();
GenerationData data = obj.generateArtifact(inputArtifacts, generatorConfig, additionalParams);
@@ -477,17 +449,13 @@ public class SampleJUnitTest extends TestCase {
try {
List<Artifact> inputArtifacts = new ArrayList();
- InputStream fis3 = SampleJUnitTest.class.getResourceAsStream("/CMAUI_VFInvalidFormat.yaml");
- readPayload(inputArtifacts,fis3, "CMAUI_VFInvalidFormat.yaml");
+ readPayloadFromResource(inputArtifacts, "CMAUI_VFInvalidFormat.yaml");
- InputStream fis4 = SampleJUnitTest.class.getResourceAsStream("/ECA_OAM_VFInvalidFormat.yaml");
- readPayload(inputArtifacts,fis4, "ECA_OAM_VFInvalidFormat.yaml");
+ readPayloadFromResource(inputArtifacts, "ECA_OAM_VFInvalidFormat.yaml");
- InputStream fis5 = SampleJUnitTest.class.getResourceAsStream("/MMSC_Sevice_07_25_16InvalidFormat.yaml");
- readPayload(inputArtifacts,fis5, "MMSC_Sevice_07_25_16InvalidFormat.yaml");
+ readPayloadFromResource(inputArtifacts, "MMSC_Sevice_07_25_16InvalidFormat.yaml");
- InputStream fis6 = SampleJUnitTest.class.getResourceAsStream("/MMSC_VFInvalidFormat.yaml");
- readPayload(inputArtifacts,fis6, "MMSC_VFInvalidFormat.yaml");
+ readPayloadFromResource(inputArtifacts, "MMSC_VFInvalidFormat.yaml");
ArtifactGenerationServiceImpl obj = new ArtifactGenerationServiceImpl();
@@ -507,12 +475,9 @@ public class SampleJUnitTest extends TestCase {
public void testArtifactGenerationMulComp() {
try {
List<Artifact> inputArtifacts = new ArrayList();
- InputStream fis1 = SampleJUnitTest.class.getResourceAsStream("/vf_vmme_template_MulComp.yml");
- readPayload(inputArtifacts,fis1, "vf_vmme_template_MulComp.yml");
+ readPayloadFromResource(inputArtifacts, "vf_vmme_template_MulComp.yml");
- fis1.close();
- InputStream fis2 = SampleJUnitTest.class.getResourceAsStream("/service_vmme_template_MulComp.yml");
- readPayload(inputArtifacts,fis2, "service_vmme_template_MulComp.yml");
+ readPayloadFromResource(inputArtifacts, "service_vmme_template_MulComp.yml");
ArtifactGenerationServiceImpl obj = new ArtifactGenerationServiceImpl();
List<ToscaTemplate> toscas = new LinkedList();
@@ -543,15 +508,11 @@ public class SampleJUnitTest extends TestCase {
try {
List<Artifact> inputArtifacts = new ArrayList();
- InputStream fis1 = SampleJUnitTest.class.getResourceAsStream("/vf_vmme_template_Orphan.yml");
- readPayload(inputArtifacts,fis1, "vf_vmme_template_Orphan.yml");
+ readPayloadFromResource(inputArtifacts, "vf_vmme_template_Orphan.yml");
- fis1.close();
- InputStream fis2 = SampleJUnitTest.class.getResourceAsStream("/service_vmme_template_Orphan.yml");
- readPayload(inputArtifacts,fis2, "service_vmme_template_Orphan.yml");
+ readPayloadFromResource(inputArtifacts, "service_vmme_template_Orphan.yml");
- InputStream fis4 = SampleJUnitTest.class.getResourceAsStream("/ECA_OAM_VFOrphan.yaml");
- readPayload(inputArtifacts,fis4, "ECA_OAM_VFOrphan.yaml");
+ readPayloadFromResource(inputArtifacts, "ECA_OAM_VFOrphan.yaml");
ArtifactGenerationServiceImpl obj = new ArtifactGenerationServiceImpl();
List<ToscaTemplate> toscas = new LinkedList();
@@ -583,10 +544,7 @@ public class SampleJUnitTest extends TestCase {
try {
List<Artifact> inputArtifacts = new ArrayList();
- InputStream fis1 = SampleJUnitTest.class.getResourceAsStream("/service_vmme_template_MissingVFTemplate.yml");
- readPayload(inputArtifacts,fis1, "service_vmme_template_MissingVFTemplate.yml");
-
- fis1.close();
+ readPayloadFromResource(inputArtifacts, "service_vmme_template_MissingVFTemplate.yml");
ArtifactGenerationServiceImpl obj = new ArtifactGenerationServiceImpl();
List<ToscaTemplate> toscas = new LinkedList();
@@ -618,17 +576,13 @@ public class SampleJUnitTest extends TestCase {
try {
List<Artifact> inputArtifacts = new ArrayList();
- InputStream fis3 = SampleJUnitTest.class.getResourceAsStream("/CMAUI_VFMissingVFModule.yaml");
- readPayload(inputArtifacts,fis3, "CMAUI_VFMissingVFModule.yaml");
+ readPayloadFromResource(inputArtifacts, "CMAUI_VFMissingVFModule.yaml");
- InputStream fis4 = SampleJUnitTest.class.getResourceAsStream("/ECA_OAM_VFMissingVFModule.yaml");
- readPayload(inputArtifacts,fis4, "ECA_OAM_VFMissingVFModule.yaml");
+ readPayloadFromResource(inputArtifacts, "ECA_OAM_VFMissingVFModule.yaml");
- InputStream fis5 = SampleJUnitTest.class.getResourceAsStream("/MMSC_Sevice_07_25_16MissingVFModule.yaml");
- readPayload(inputArtifacts,fis5, "MMSC_Sevice_07_25_16MissingVFModule.yaml");
+ readPayloadFromResource(inputArtifacts, "MMSC_Sevice_07_25_16MissingVFModule.yaml");
- InputStream fis6 = SampleJUnitTest.class.getResourceAsStream("/MMSC_VFMissingVFModule.yaml");
- readPayload(inputArtifacts,fis6, "MMSC_VFMissingVFModule.yaml");
+ readPayloadFromResource(inputArtifacts, "MMSC_VFMissingVFModule.yaml");
ArtifactGenerationServiceImpl obj = new ArtifactGenerationServiceImpl();
List<ToscaTemplate> toscas = new LinkedList();
@@ -680,12 +634,9 @@ public class SampleJUnitTest extends TestCase {
try {
List<Artifact> inputArtifacts = new ArrayList();
- InputStream fis1 = SampleJUnitTest.class.getResourceAsStream("/vf_vmme_template_SingleVFVFMod.yml");
- readPayload(inputArtifacts,fis1, "vf_vmme_template_SingleVFVFMod.yml");
+ readPayloadFromResource(inputArtifacts, "vf_vmme_template_SingleVFVFMod.yml");
- fis1.close();
- InputStream fis2 = SampleJUnitTest.class.getResourceAsStream("/service_vmme_template_SingleVFVFMod.yml");
- readPayload(inputArtifacts,fis2, "service_vmme_template_SingleVFVFMod.yml");
+ readPayloadFromResource(inputArtifacts, "service_vmme_template_SingleVFVFMod.yml");
ArtifactGenerationServiceImpl obj = new ArtifactGenerationServiceImpl();
GenerationData data = obj.generateArtifact(inputArtifacts, "",additionalParams);
@@ -705,15 +656,11 @@ public class SampleJUnitTest extends TestCase {
try {
List<Artifact> inputArtifacts = new ArrayList();
- InputStream fis1 = SampleJUnitTest.class.getResourceAsStream("/ServiceWithNodetemplate.yml");
- readPayload(inputArtifacts,fis1, "ServiceWithNodetemplate.yml");
+ readPayloadFromResource(inputArtifacts, "ServiceWithNodetemplate.yml");
- fis1.close();
- InputStream fis2 = SampleJUnitTest.class.getResourceAsStream("/Resource0-template.yml");
- readPayload(inputArtifacts,fis2, "Resource0-template.yml");
+ readPayloadFromResource(inputArtifacts, "Resource0-template.yml");
- InputStream fis3 = SampleJUnitTest.class.getResourceAsStream("/Resource1-template.yml");
- readPayload(inputArtifacts,fis3, "Resource1-template.yml");
+ readPayloadFromResource(inputArtifacts, "Resource1-template.yml");
ArtifactGenerationServiceImpl obj = new ArtifactGenerationServiceImpl();
List<ToscaTemplate> toscas = new LinkedList();
@@ -747,10 +694,7 @@ public class SampleJUnitTest extends TestCase {
try {
List<Artifact> inputArtifacts = new ArrayList();
- InputStream fis1 = SampleJUnitTest.class.getResourceAsStream("/Service0-template.yml");
- readPayload(inputArtifacts,fis1, "Service0-template.yml");
-
- fis1.close();
+ readPayloadFromResource(inputArtifacts, "Service0-template.yml");
ArtifactGenerationServiceImpl obj = new ArtifactGenerationServiceImpl();
List<ToscaTemplate> toscas = new LinkedList();
@@ -784,10 +728,7 @@ public class SampleJUnitTest extends TestCase {
try {
List<Artifact> inputArtifacts = new ArrayList();
- InputStream fis1 = SampleJUnitTest.class.getResourceAsStream("/Service0-templateMoreThan256.yml");
- readPayload(inputArtifacts,fis1, "Service0-templateMoreThan256.yml");
-
- fis1.close();
+ readPayloadFromResource(inputArtifacts, "Service0-templateMoreThan256.yml");
ArtifactGenerationServiceImpl obj = new ArtifactGenerationServiceImpl();
List<ToscaTemplate> toscas = new LinkedList();
@@ -825,17 +766,11 @@ public class SampleJUnitTest extends TestCase {
try {
List<Artifact> inputArtifacts = new ArrayList();
- InputStream fis1 = SampleJUnitTest.class.getResourceAsStream("/service_vmme_template_DiffVerOfSameVF.yml");
- readPayload(inputArtifacts,fis1, "service_vmme_template_DiffVerOfSameVF.yml");
- fis1.close();
+ readPayloadFromResource(inputArtifacts, "service_vmme_template_DiffVerOfSameVF.yml");
- InputStream fis2 = SampleJUnitTest.class.getResourceAsStream("/vf_vmme_template_DiffVerOfSameVF_1.yml");
- readPayload(inputArtifacts,fis2, "vf_vmme_template_DiffVerOfSameVF_1.yml");
- fis2.close();
+ readPayloadFromResource(inputArtifacts, "vf_vmme_template_DiffVerOfSameVF_1.yml");
- InputStream fis3 = SampleJUnitTest.class.getResourceAsStream("/vf_vmme_template_DiffVerOfSameVF_2.yml");
- readPayload(inputArtifacts,fis3, "vf_vmme_template_DiffVerOfSameVF_2.yml");
- fis3.close();
+ readPayloadFromResource(inputArtifacts, "vf_vmme_template_DiffVerOfSameVF_2.yml");
ArtifactGenerationServiceImpl obj = new ArtifactGenerationServiceImpl();
List<ToscaTemplate> toscas = new LinkedList();
@@ -869,13 +804,9 @@ public class SampleJUnitTest extends TestCase {
try {
List<Artifact> inputArtifacts = new ArrayList();
- InputStream fis1 = SampleJUnitTest.class.getResourceAsStream("/service_vmme_template_DiffVerOfSameVFModWithSameInvId.yml");
- readPayload(inputArtifacts,fis1, "service_vmme_template_DiffVerOfSameVFModWithSameInvId.yml");
- fis1.close();
+ readPayloadFromResource(inputArtifacts, "service_vmme_template_DiffVerOfSameVFModWithSameInvId.yml");
- InputStream fis2 = SampleJUnitTest.class.getResourceAsStream("/vf_vmme_template_DiffVerOfSameVFModWithSameInvId.yml");
- readPayload(inputArtifacts,fis2, "vf_vmme_template_DiffVerOfSameVFModWithSameInvId.yml");
- fis2.close();
+ readPayloadFromResource(inputArtifacts, "vf_vmme_template_DiffVerOfSameVFModWithSameInvId.yml");
ArtifactGenerationServiceImpl obj = new ArtifactGenerationServiceImpl();
List<ToscaTemplate> toscas = new LinkedList();
@@ -909,22 +840,13 @@ public class SampleJUnitTest extends TestCase {
try {
List<Artifact> inputArtifacts = new ArrayList();
- InputStream fis1 = SampleJUnitTest.class.getResourceAsStream("/service_vmme_template_WithL3Network.yml");
- readPayload(inputArtifacts,fis1, "service_vmme_template_WithL3Network.yml");
- fis1.close();
+ readPayloadFromResource(inputArtifacts, "service_vmme_template_WithL3Network.yml");
- InputStream fis2 = SampleJUnitTest.class.getResourceAsStream("/vf_vmme_template_WithL3Network.yml");
- readPayload(inputArtifacts,fis2, "vf_vmme_template_WithL3Network.yml");
- fis2.close();
+ readPayloadFromResource(inputArtifacts, "vf_vmme_template_WithL3Network.yml");
- InputStream fis3 = SampleJUnitTest.class.getResourceAsStream("/resource-AllottedResource-template_WithL3Network.yml");
- readPayload(inputArtifacts,fis3, "resource-AllottedResource-template_WithL3Network.yml");
- fis3.close();
+ readPayloadFromResource(inputArtifacts, "resource-AllottedResource-template_WithL3Network.yml");
- InputStream fis4 = SampleJUnitTest.class.getResourceAsStream
- ("/resource-Extvl-template_WithL3Network.yml");
- readPayload(inputArtifacts,fis4, "resource-Extvl-template_WithL3Network.yml");
- fis4.close();
+ readPayloadFromResource(inputArtifacts, "resource-Extvl-template_WithL3Network.yml");
ArtifactGenerationServiceImpl obj = new ArtifactGenerationServiceImpl();
List<ToscaTemplate> toscas = new LinkedList();
@@ -958,22 +880,13 @@ public class SampleJUnitTest extends TestCase {
try {
List<Artifact> inputArtifacts = new ArrayList();
- InputStream fis1 = SampleJUnitTest.class.getResourceAsStream("/service_vmme_template_WithDupL3Network.yml");
- readPayload(inputArtifacts,fis1, "service_vmme_template_WithDupL3Network.yml");
- fis1.close();
+ readPayloadFromResource(inputArtifacts, "service_vmme_template_WithDupL3Network.yml");
- InputStream fis2 = SampleJUnitTest.class.getResourceAsStream("/vf_vmme_template_WithDupL3Network.yml");
- readPayload(inputArtifacts,fis2, "vf_vmme_template_WithDupL3Network.yml");
- fis2.close();
+ readPayloadFromResource(inputArtifacts, "vf_vmme_template_WithDupL3Network.yml");
- InputStream fis3 = SampleJUnitTest.class.getResourceAsStream("/resource-AllottedResource-template_WithDupL3Network.yml");
- readPayload(inputArtifacts,fis3, "resource-AllottedResource-template_WithDupL3Network.yml");
- fis3.close();
+ readPayloadFromResource(inputArtifacts, "resource-AllottedResource-template_WithDupL3Network.yml");
- InputStream fis4 = SampleJUnitTest.class.getResourceAsStream
- ("/resource-Extvl-template_WithDupL3Network.yml");
- readPayload(inputArtifacts,fis4, "resource-Extvl-template_WithDupL3Network.yml");
- fis4.close();
+ readPayloadFromResource(inputArtifacts, "resource-Extvl-template_WithDupL3Network.yml");
ArtifactGenerationServiceImpl obj = new ArtifactGenerationServiceImpl();
List<ToscaTemplate> toscas = new LinkedList();
@@ -1007,17 +920,11 @@ public class SampleJUnitTest extends TestCase {
try {
List<Artifact> inputArtifacts = new ArrayList();
- InputStream fis1 = SampleJUnitTest.class.getResourceAsStream("/service_vmme_template_WithL3NetworkInVFMod.yml");
- readPayload(inputArtifacts,fis1, "service_vmme_template_WithL3NetworkInVFMod.yml");
- fis1.close();
+ readPayloadFromResource(inputArtifacts, "service_vmme_template_WithL3NetworkInVFMod.yml");
- InputStream fis2 = SampleJUnitTest.class.getResourceAsStream("/vf_vmme_template_WithL3NetworkInVFMod.yml");
- readPayload(inputArtifacts,fis2, "vf_vmme_template_WithL3NetworkInVFMod.yml");
- fis2.close();
+ readPayloadFromResource(inputArtifacts, "vf_vmme_template_WithL3NetworkInVFMod.yml");
- InputStream fis3 = SampleJUnitTest.class.getResourceAsStream("/resource-AllottedResource-template_WithL3NetworkInVFMod.yml");
- readPayload(inputArtifacts,fis3, "resource-AllottedResource-template_WithL3NetworkInVFMod.yml");
- fis3.close();
+ readPayloadFromResource(inputArtifacts, "resource-AllottedResource-template_WithL3NetworkInVFMod.yml");
ArtifactGenerationServiceImpl obj = new ArtifactGenerationServiceImpl();
List<ToscaTemplate> toscas = new LinkedList();
@@ -1051,28 +958,15 @@ public class SampleJUnitTest extends TestCase {
try {
List<Artifact> inputArtifacts = new ArrayList();
- InputStream fis1 = SampleJUnitTest.class.getResourceAsStream("/service_vmme_template_WithDiffVersionOfSameL3Network.yml");
- readPayload(inputArtifacts,fis1, "service_vmme_template_WithDiffVersionOfSameL3Network.yml");
- fis1.close();
+ readPayloadFromResource(inputArtifacts, "service_vmme_template_WithDiffVersionOfSameL3Network.yml");
- InputStream fis2 = SampleJUnitTest.class.getResourceAsStream("/vf_vmme_template_WithDiffVersionOfSameL3Network.yml");
- readPayload(inputArtifacts,fis2, "vf_vmme_template_WithDiffVersionOfSameL3Network.yml");
- fis2.close();
+ readPayloadFromResource(inputArtifacts, "vf_vmme_template_WithDiffVersionOfSameL3Network.yml");
- InputStream fis3 = SampleJUnitTest.class.getResourceAsStream("/resource-AllottedResource-template_WithDiffVersionOfSameL3Network.yml");
- readPayload(inputArtifacts,fis3, "resource-AllottedResource-template_WithDiffVersionOfSameL3Network.yml");
- fis3.close();
+ readPayloadFromResource(inputArtifacts, "resource-AllottedResource-template_WithDiffVersionOfSameL3Network.yml");
- InputStream fis4 = SampleJUnitTest.class.getResourceAsStream
- ("/resource-Extvl-template_WithDiffVersionOfSameL3Network.yml");
- readPayload(inputArtifacts,fis4, "resource-Extvl-template_WithDiffVersionOfSameL3Network.yml");
- fis4.close();
+ readPayloadFromResource(inputArtifacts, "resource-Extvl-template_WithDiffVersionOfSameL3Network.yml");
- InputStream fis5 = SampleJUnitTest.class.getResourceAsStream
- ("/resource-Extvl-template_1_WithDiffVersionOfSameL3Network.yml");
- readPayload(inputArtifacts,fis5,
- "resource-Extvl-template_1_WithDiffVersionOfSameL3Network.yml");
- fis5.close();
+ readPayloadFromResource(inputArtifacts, "resource-Extvl-template_1_WithDiffVersionOfSameL3Network.yml");
ArtifactGenerationServiceImpl obj = new ArtifactGenerationServiceImpl();
List<ToscaTemplate> toscas = new LinkedList();
@@ -1105,15 +999,10 @@ public class SampleJUnitTest extends TestCase {
public void testArtifactGenerationWithInvIdGreaterThanSpecifiedLimit() {
try {
List<Artifact> inputArtifacts = new ArrayList();
- InputStream fis1 = SampleJUnitTest.class.getResourceAsStream("/vf_vmme_template_WithInvIdGreaterThanSpecifiedLimit.yml");
- readPayload(inputArtifacts,fis1, "vf_vmme_template_WithInvIdGreaterThanSpecifiedLimit" +
- ".yml");
- fis1.close();
+ readPayloadFromResource(inputArtifacts, "vf_vmme_template_WithInvIdGreaterThanSpecifiedLimit.yml");
- InputStream fis2 = SampleJUnitTest.class.getResourceAsStream("/service_vmme_template_WithInvIdGreaterThanSpecifiedLimit.yml");
- readPayload(inputArtifacts,fis2, "service_vmme_template_WithInvIdGreaterThanSpecifiedLimit.yml");
+ readPayloadFromResource(inputArtifacts, "service_vmme_template_WithInvIdGreaterThanSpecifiedLimit.yml");
ArtifactGenerationServiceImpl obj = new ArtifactGenerationServiceImpl();
- fis2.close();
GenerationData data = obj.generateArtifact(inputArtifacts, generatorConfig, additionalParams);
Assert.assertEquals(false,data.getErrorData().isEmpty());
@@ -1132,15 +1021,10 @@ public class SampleJUnitTest extends TestCase {
public void testArtifactGenerationWithInvIdLesserThanSpecifiedLimit() {
try {
List<Artifact> inputArtifacts = new ArrayList();
- InputStream fis1 = SampleJUnitTest.class.getResourceAsStream("/vf_vmme_template_WithInvIdLesserThanSpecifiedLimit.yml");
- readPayload(inputArtifacts,fis1, "vf_vmme_template_WithInvIdLesserThanSpecifiedLimit" +
- ".yml");
- fis1.close();
+ readPayloadFromResource(inputArtifacts, "vf_vmme_template_WithInvIdLesserThanSpecifiedLimit.yml");
- InputStream fis2 = SampleJUnitTest.class.getResourceAsStream("/service_vmme_template_WithInvIdLesserThanSpecifiedLimit.yml");
- readPayload(inputArtifacts,fis2, "service_vmme_template_WithInvIdLesserThanSpecifiedLimit.yml");
+ readPayloadFromResource(inputArtifacts, "service_vmme_template_WithInvIdLesserThanSpecifiedLimit.yml");
ArtifactGenerationServiceImpl obj = new ArtifactGenerationServiceImpl();
- fis2.close();
GenerationData data = obj.generateArtifact(inputArtifacts, generatorConfig, additionalParams);
Assert.assertEquals(false,data.getErrorData().isEmpty());
@@ -1162,14 +1046,9 @@ public class SampleJUnitTest extends TestCase {
String configLoc = System.getProperty(ARTIFACTGENERATOR_CONFIG);
try {
List<Artifact> inputArtifacts = new ArrayList();
- InputStream fis1 = SampleJUnitTest.class.getResourceAsStream("/vf_vmme_template_NoSystemPropConfigured.yml");
- readPayload(inputArtifacts,fis1, "vf_vmme_template_NoSystemPropConfigured" +
- ".yml");
- fis1.close();
+ readPayloadFromResource(inputArtifacts, "vf_vmme_template_NoSystemPropConfigured.yml");
- InputStream fis2 = SampleJUnitTest.class.getResourceAsStream("/service_vmme_template_NoSystemPropConfigured.yml");
- readPayload(inputArtifacts,fis2, "service_vmme_template_NoSystemPropConfigured.yml");
- fis2.close();
+ readPayloadFromResource(inputArtifacts, "service_vmme_template_NoSystemPropConfigured.yml");
System.clearProperty(ARTIFACTGENERATOR_CONFIG);
@@ -1192,14 +1071,9 @@ public class SampleJUnitTest extends TestCase {
String configLoc = System.getProperty(ARTIFACTGENERATOR_CONFIG);
try {
List<Artifact> inputArtifacts = new ArrayList();
- InputStream fis1 = SampleJUnitTest.class.getResourceAsStream("/vf_vmme_template_NoSystemPropConfigured.yml");
- readPayload(inputArtifacts,fis1, "vf_vmme_template_NoSystemPropConfigured" +
- ".yml");
- fis1.close();
+ readPayloadFromResource(inputArtifacts, "vf_vmme_template_NoSystemPropConfigured.yml");
- InputStream fis2 = SampleJUnitTest.class.getResourceAsStream("/service_vmme_template_NoSystemPropConfigured.yml");
- readPayload(inputArtifacts,fis2, "service_vmme_template_NoSystemPropConfigured.yml");
- fis2.close();
+ readPayloadFromResource(inputArtifacts, "service_vmme_template_NoSystemPropConfigured.yml");
System.setProperty(ARTIFACTGENERATOR_CONFIG,configLoc + File.separator + "testErrorWhenNoFileAtConfigLocation");
Map<String, Model> outputArtifactMap = new HashMap<>();
@@ -1223,14 +1097,9 @@ public class SampleJUnitTest extends TestCase {
loadConfig(ArtifactGenerationServiceTest.properties);
try {
List<Artifact> inputArtifacts = new ArrayList();
- InputStream fis1 = SampleJUnitTest.class.getResourceAsStream("/vf_vmme_template_NoSystemPropConfigured.yml");
- readPayload(inputArtifacts,fis1, "vf_vmme_template_NoSystemPropConfigured" +
- ".yml");
- fis1.close();
+ readPayloadFromResource(inputArtifacts, "vf_vmme_template_NoSystemPropConfigured.yml");
- InputStream fis2 = SampleJUnitTest.class.getResourceAsStream("/service_vmme_template_NoSystemPropConfigured.yml");
- readPayload(inputArtifacts,fis2, "service_vmme_template_NoSystemPropConfigured.yml");
- fis2.close();
+ readPayloadFromResource(inputArtifacts, "service_vmme_template_NoSystemPropConfigured.yml");
Map<String, Model> outputArtifactMap = new HashMap<>();
ArtifactGenerationServiceImpl obj = new ArtifactGenerationServiceImpl();
@@ -1254,14 +1123,9 @@ public class SampleJUnitTest extends TestCase {
public void testArtifactGenerationWithUpdatedUUIDInConfig() throws Exception {
try {
List<Artifact> inputArtifacts = new ArrayList();
- InputStream fis1 = SampleJUnitTest.class.getResourceAsStream("/vf_vmme_template_WithUpdatedUUIDInConfig.yml");
- readPayload(inputArtifacts,fis1, "vf_vmme_template_WithUpdatedUUIDInConfig" +
- ".yml");
- fis1.close();
+ readPayloadFromResource(inputArtifacts, "vf_vmme_template_WithUpdatedUUIDInConfig.yml");
- InputStream fis2 = SampleJUnitTest.class.getResourceAsStream("/service_vmme_template_WithUpdatedUUIDInConfig.yml");
- readPayload(inputArtifacts,fis2, "service_vmme_template_WithUpdatedUUIDInConfig.yml");
- fis2.close();
+ readPayloadFromResource(inputArtifacts, "service_vmme_template_WithUpdatedUUIDInConfig.yml");
ArtifactGenerationServiceImpl obj = new ArtifactGenerationServiceImpl();
GenerationData data = obj.generateArtifact(inputArtifacts, generatorConfig, additionalParams);
@@ -1301,12 +1165,9 @@ public class SampleJUnitTest extends TestCase {
public void testArtifactGenerationVerifyMandatoryParameterServiceVersion() {
try {
List<Artifact> inputArtifacts = new ArrayList();
- InputStream fis1 = SampleJUnitTest.class.getResourceAsStream("/vf_vmme_template_VerifyMandatoryParameterServiceVersion.yml");
- readPayload(inputArtifacts, fis1, "vf_vmme_template_VerifyMandatoryParameterServiceVersion.yml");
+ readPayloadFromResource(inputArtifacts, "vf_vmme_template_VerifyMandatoryParameterServiceVersion.yml");
- fis1.close();
- InputStream fis2 = SampleJUnitTest.class.getResourceAsStream("/service_vmme_template_VerifyMandatoryParameterServiceVersion.yml");
- readPayload(inputArtifacts, fis2, "service_vmme_template_VerifyMandatoryParameterServiceVersion.yml");
+ readPayloadFromResource(inputArtifacts, "service_vmme_template_VerifyMandatoryParameterServiceVersion.yml");
ArtifactGenerationServiceImpl obj = new ArtifactGenerationServiceImpl();
GenerationData data = obj.generateArtifact(inputArtifacts, generatorConfig, new HashMap<String, String>());
@@ -1323,12 +1184,9 @@ public class SampleJUnitTest extends TestCase {
public void testArtifactGenerationVerifyServiceVersionFormat() {
try {
List<Artifact> inputArtifacts = new ArrayList();
- InputStream fis1 = SampleJUnitTest.class.getResourceAsStream("/vf_vmme_template_VerifyServiceVersionFormat.yml");
- readPayload(inputArtifacts, fis1, "vf_vmme_template_VerifyServiceVersionFormat.yml");
+ readPayloadFromResource(inputArtifacts, "vf_vmme_template_VerifyServiceVersionFormat.yml");
- fis1.close();
- InputStream fis2 = SampleJUnitTest.class.getResourceAsStream("/service_vmme_template_VerifyServiceVersionFormat.yml");
- readPayload(inputArtifacts, fis2, "service_vmme_template_VerifyServiceVersionFormat.yml");
+ readPayloadFromResource(inputArtifacts, "service_vmme_template_VerifyServiceVersionFormat.yml");
ArtifactGenerationServiceImpl obj = new ArtifactGenerationServiceImpl();
additionalParams.put(AdditionalParams.ServiceVersion.getName(),"1");
@@ -1363,12 +1221,9 @@ public class SampleJUnitTest extends TestCase {
public void testArtifactGenerationVerifyServiceVersion() {
try {
List<Artifact> inputArtifacts = new ArrayList();
- InputStream fis1 = SampleJUnitTest.class.getResourceAsStream("/vf_vmme_template_VerifyServiceVersion.yml");
- readPayload(inputArtifacts, fis1, "vf_vmme_template_VerifyServiceVersion.yml");
+ readPayloadFromResource(inputArtifacts, "vf_vmme_template_VerifyServiceVersion.yml");
- fis1.close();
- InputStream fis2 = SampleJUnitTest.class.getResourceAsStream("/service_vmme_template_VerifyServiceVersion.yml");
- readPayload(inputArtifacts, fis2, "service_vmme_template_VerifyServiceVersion.yml");
+ readPayloadFromResource(inputArtifacts, "service_vmme_template_VerifyServiceVersion.yml");
ArtifactGenerationServiceImpl obj = new ArtifactGenerationServiceImpl();
List<ToscaTemplate> toscas = new LinkedList();
@@ -1405,14 +1260,10 @@ public class SampleJUnitTest extends TestCase {
public void testArtifactGenerationVerifyResourceVersionFormat() {
try {
List<Artifact> inputArtifacts = new ArrayList();
- InputStream fis1 = SampleJUnitTest.class.getResourceAsStream("/vf_vmme_template_VerifyResourceVersionFormat.yml");
- readPayload(inputArtifacts, fis1, "vf_vmme_template_VerifyResourceVersionFormat.yml");
- fis1.close();
+ readPayloadFromResource(inputArtifacts, "vf_vmme_template_VerifyResourceVersionFormat.yml");
- InputStream fis2 = SampleJUnitTest.class.getResourceAsStream("/service_vmme_template_VerifyResourceVersionFormat1.yml");
- readPayload(inputArtifacts, fis2, "service_vmme_template_VerifyResourceVersionFormat1.yml");
+ readPayloadFromResource(inputArtifacts, "service_vmme_template_VerifyResourceVersionFormat1.yml");
ArtifactGenerationServiceImpl obj = new ArtifactGenerationServiceImpl();
- fis2.close();
List<ToscaTemplate> toscas = new LinkedList();
for (Artifact inputArtifact : inputArtifacts) {
@@ -1428,9 +1279,7 @@ public class SampleJUnitTest extends TestCase {
inputArtifacts.remove(1);
- InputStream fis3 = SampleJUnitTest.class.getResourceAsStream("/service_vmme_template_VerifyResourceVersionFormat2.yml");
- readPayload(inputArtifacts, fis3, "service_vmme_template_VerifyResourceVersionFormat2.yml");
- fis3.close();
+ readPayloadFromResource(inputArtifacts, "service_vmme_template_VerifyResourceVersionFormat2.yml");
GenerationData data2 = obj.generateArtifact(inputArtifacts, generatorConfig,
additionalParams);
List<Artifact> resultData2 = data2.getResultData();
@@ -1448,12 +1297,9 @@ public class SampleJUnitTest extends TestCase {
public void testArtifactGenerationVerifyMandatoryParameterResourceVersion() {
try {
List<Artifact> inputArtifacts = new ArrayList();
- InputStream fis1 = SampleJUnitTest.class.getResourceAsStream("/vf_vmme_template_VerifyMandatoryParameterResourceVersion.yml");
- readPayload(inputArtifacts, fis1, "vf_vmme_template_VerifyMandatoryParameterResourceVersion.yml");
+ readPayloadFromResource(inputArtifacts, "vf_vmme_template_VerifyMandatoryParameterResourceVersion.yml");
- fis1.close();
- InputStream fis2 = SampleJUnitTest.class.getResourceAsStream("/service_vmme_template_VerifyMandatoryParameterResourceVersion.yml");
- readPayload(inputArtifacts, fis2, "service_vmme_template_VerifyMandatoryParameterResourceVersion.yml");
+ readPayloadFromResource(inputArtifacts, "service_vmme_template_VerifyMandatoryParameterResourceVersion.yml");
ArtifactGenerationServiceImpl obj = new ArtifactGenerationServiceImpl();
List<ToscaTemplate> toscas = new LinkedList();
for (Artifact inputArtifact : inputArtifacts) {
@@ -1474,13 +1320,9 @@ public class SampleJUnitTest extends TestCase {
try {
List<Artifact> inputArtifacts = new ArrayList();
- InputStream fis1 = SampleJUnitTest.class.getResourceAsStream("/service-ServiceWithAllottedResourceIpmux-template.yml");
- readPayload(inputArtifacts, fis1, "service-ServiceWithAllottedResourceIpmux-template.yml");
- fis1.close();
+ readPayloadFromResource(inputArtifacts, "service-ServiceWithAllottedResourceIpmux-template.yml");
- InputStream fis2 = SampleJUnitTest.class.getResourceAsStream("/resource-AllottedResource-template_IpMux.yml");
- readPayload(inputArtifacts, fis2, "resource-AllottedResource-template_IpMux.yml");
- fis2.close();
+ readPayloadFromResource(inputArtifacts, "resource-AllottedResource-template_IpMux.yml");
ArtifactGenerationServiceImpl obj = new ArtifactGenerationServiceImpl();
List<ToscaTemplate> toscas = new LinkedList();
@@ -1505,14 +1347,9 @@ public class SampleJUnitTest extends TestCase {
try {
List<Artifact> inputArtifacts = new ArrayList();
- InputStream fis1 = SampleJUnitTest.class.getResourceAsStream
- ("/service-ServiceWithAllottedResourceIpmux-template_WithGroups.yml");
- readPayload(inputArtifacts, fis1, "service-ServiceWithAllottedResourceIpmux-template_WithGroups.yml");
- fis1.close();
+ readPayloadFromResource(inputArtifacts, "service-ServiceWithAllottedResourceIpmux-template_WithGroups.yml");
- InputStream fis2 = SampleJUnitTest.class.getResourceAsStream("/resource-AllottedResource-template_IpMux_WithGroups.yml");
- readPayload(inputArtifacts, fis2, "resource-AllottedResource-template_IpMux_WithGroups.yml");
- fis2.close();
+ readPayloadFromResource(inputArtifacts, "resource-AllottedResource-template_IpMux_WithGroups.yml");
ArtifactGenerationServiceImpl obj = new ArtifactGenerationServiceImpl();
List<ToscaTemplate> toscas = new LinkedList();
@@ -1545,17 +1382,11 @@ public class SampleJUnitTest extends TestCase {
try {
List<Artifact> inputArtifacts = new ArrayList();
- InputStream fis1 = SampleJUnitTest.class.getResourceAsStream("/service-ServiceWithAllottedResourcesIpMuxSameInvariant-template.yml");
- readPayload(inputArtifacts, fis1, "service-ServiceWithAllottedResourcesIpMuxSameInvariant-template.yml");
- fis1.close();
+ readPayloadFromResource(inputArtifacts, "service-ServiceWithAllottedResourcesIpMuxSameInvariant-template.yml");
- InputStream fis2 = SampleJUnitTest.class.getResourceAsStream("/resource-AllottedResource1SameInvariant-IpMux-template.yml");
- readPayload(inputArtifacts, fis2, "resource-AllottedResource1SameInvariant-IpMux-template.yml");
- fis2.close();
+ readPayloadFromResource(inputArtifacts, "resource-AllottedResource1SameInvariant-IpMux-template.yml");
- InputStream fis3 = SampleJUnitTest.class.getResourceAsStream("/resource-AllottedResource2SameInvariant-IpMux-template.yml");
- readPayload(inputArtifacts, fis3, "resource-AllottedResource2SameInvariant-IpMux-template.yml");
- fis3.close();
+ readPayloadFromResource(inputArtifacts, "resource-AllottedResource2SameInvariant-IpMux-template.yml");
ArtifactGenerationServiceImpl obj = new ArtifactGenerationServiceImpl();
List<ToscaTemplate> toscas = new LinkedList();
@@ -1589,13 +1420,9 @@ public class SampleJUnitTest extends TestCase {
try {
List<Artifact> inputArtifacts = new ArrayList();
- InputStream fis1 = SampleJUnitTest.class.getResourceAsStream("/service-ServiceWithAllottedResourcesIpMuxSameInvariantSameVers-template.yml");
- readPayload(inputArtifacts, fis1, "service-ServiceWithAllottedResourcesIpMuxSameInvariantSameVers-template.yml");
- fis1.close();
+ readPayloadFromResource(inputArtifacts, "service-ServiceWithAllottedResourcesIpMuxSameInvariantSameVers-template.yml");
- InputStream fis2 = SampleJUnitTest.class.getResourceAsStream("/resource-AllottedResourceSameInvariantSameVers-IpMux-template.yml");
- readPayload(inputArtifacts, fis2, "resource-AllottedResourceSameInvariantSameVers-IpMux-template.yml");
- fis2.close();
+ readPayloadFromResource(inputArtifacts, "resource-AllottedResourceSameInvariantSameVers-IpMux-template.yml");
ArtifactGenerationServiceImpl obj = new ArtifactGenerationServiceImpl();
List<ToscaTemplate> toscas = new LinkedList();
@@ -1629,14 +1456,11 @@ public class SampleJUnitTest extends TestCase {
try {
List<Artifact> inputArtifacts = new ArrayList();
- InputStream fis2 = SampleJUnitTest.class.getResourceAsStream("/service-Allottedipmux-template.yml");
- readPayload(inputArtifacts, fis2, "service-Allottedipmux-template.yml");
+ readPayloadFromResource(inputArtifacts, "service-Allottedipmux-template.yml");
- InputStream fis1 = SampleJUnitTest.class.getResourceAsStream("/resource-IpMuxDemux-template.yml");
- readPayload(inputArtifacts, fis1, "resource-IpMuxDemux-template.yml");
+ readPayloadFromResource(inputArtifacts, "resource-IpMuxDemux-template.yml");
- InputStream fis3 = SampleJUnitTest.class.getResourceAsStream("/resource-TunnelXconn-template.yml");
- readPayload(inputArtifacts, fis3, "resource-TunnelXconn-template.yml");
+ readPayloadFromResource(inputArtifacts, "resource-TunnelXconn-template.yml");
ArtifactGenerationServiceImpl obj = new ArtifactGenerationServiceImpl();
List<ToscaTemplate> toscas = new LinkedList();
@@ -1669,22 +1493,15 @@ public class SampleJUnitTest extends TestCase {
try {
List<Artifact> inputArtifacts = new ArrayList();
- InputStream fis2 = SampleJUnitTest.class.getResourceAsStream("/service-SdWan-template_WithOutDepSerId.yml");
- readPayload(inputArtifacts, fis2, "service-SdWan-template_WithOutDepSerId.yml");
+ readPayloadFromResource(inputArtifacts, "service-SdWan-template_WithOutDepSerId.yml");
- InputStream fis1 = SampleJUnitTest.class.getResourceAsStream("/resource-VhnfNonHeat-template_WithOutDepSerId.yml");
- readPayload(inputArtifacts, fis1, "resource-VhnfNonHeat-template_WithOutDepSerId.yml");
+ readPayloadFromResource(inputArtifacts, "resource-VhnfNonHeat-template_WithOutDepSerId.yml");
- InputStream fis3 = SampleJUnitTest.class.getResourceAsStream("/resource-TunnelXconn-template_WithOutDepSerId.yml");
- readPayload(inputArtifacts, fis3, "resource-TunnelXconn-template_WithOutDepSerId.yml");
+ readPayloadFromResource(inputArtifacts, "resource-TunnelXconn-template_WithOutDepSerId.yml");
- InputStream fis4 = SampleJUnitTest.class.getResourceAsStream
- ("/resource-ServiceAdmin-template_WithOutDepSerId.yml");
- readPayload(inputArtifacts, fis4, "resource-ServiceAdmin-template_WithOutDepSerId.yml");
+ readPayloadFromResource(inputArtifacts, "resource-ServiceAdmin-template_WithOutDepSerId.yml");
- InputStream fis5 = SampleJUnitTest.class.getResourceAsStream
- ("/resource-IpMuxDemux-template_WithOutDepSerId.yml");
- readPayload(inputArtifacts, fis5, "resource-IpMuxDemux-template_WithOutDepSerId.yml");
+ readPayloadFromResource(inputArtifacts, "resource-IpMuxDemux-template_WithOutDepSerId.yml");
ArtifactGenerationServiceImpl obj = new ArtifactGenerationServiceImpl();
List<ToscaTemplate> toscas = new LinkedList();
@@ -1707,22 +1524,15 @@ public class SampleJUnitTest extends TestCase {
try {
List<Artifact> inputArtifacts = new ArrayList();
- InputStream fis2 = SampleJUnitTest.class.getResourceAsStream("/service-SdWan-template_AllRes_VF.yml");
- readPayload(inputArtifacts, fis2, "service-SdWan-template_AllRes_VF.yml");
+ readPayloadFromResource(inputArtifacts, "service-SdWan-template_AllRes_VF.yml");
- InputStream fis1 = SampleJUnitTest.class.getResourceAsStream("/resource-VhnfNonHeat-template_AllRes_VF.yml");
- readPayload(inputArtifacts, fis1, "resource-VhnfNonHeat-template_AllRes_VF.yml");
+ readPayloadFromResource(inputArtifacts, "resource-VhnfNonHeat-template_AllRes_VF.yml");
- InputStream fis3 = SampleJUnitTest.class.getResourceAsStream("/resource-TunnelXconn-template_AllRes_VF.yml");
- readPayload(inputArtifacts, fis3, "resource-TunnelXconn-template_AllRes_VF.yml");
+ readPayloadFromResource(inputArtifacts, "resource-TunnelXconn-template_AllRes_VF.yml");
- InputStream fis4 = SampleJUnitTest.class.getResourceAsStream
- ("/resource-ServiceAdmin-template_AllRes_VF.yml");
- readPayload(inputArtifacts, fis4, "resource-ServiceAdmin-template_AllRes_VF.yml");
+ readPayloadFromResource(inputArtifacts, "resource-ServiceAdmin-template_AllRes_VF.yml");
- InputStream fis5 = SampleJUnitTest.class.getResourceAsStream
- ("/resource-IpMuxDemux-template_AllRes_VF.yml");
- readPayload(inputArtifacts, fis5, "resource-IpMuxDemux-template_AllRes_VF.yml");
+ readPayloadFromResource(inputArtifacts, "resource-IpMuxDemux-template_AllRes_VF.yml");
ArtifactGenerationServiceImpl obj = new ArtifactGenerationServiceImpl();
List<ToscaTemplate> toscas = new LinkedList();
@@ -1802,4 +1612,10 @@ public class SampleJUnitTest extends TestCase {
}
}*/
+ private void readPayloadFromResource(List<Artifact> inputArtifacts, String fileName) throws IOException {
+
+ try (InputStream fis = SampleJUnitTest.class.getResourceAsStream("/" + fileName)) {
+ readPayload(inputArtifacts, fis, fileName);
+ }
+ }
}
diff --git a/common/openecomp-tosca-datatype/src/main/resources/globalTypes/openecomp/capabilities.yml b/common/openecomp-tosca-datatype/src/main/resources/globalTypes/openecomp/capabilities.yml
index 77d8eb9857..e395e3fc27 100644
--- a/common/openecomp-tosca-datatype/src/main/resources/globalTypes/openecomp/capabilities.yml
+++ b/common/openecomp-tosca-datatype/src/main/resources/globalTypes/openecomp/capabilities.yml
@@ -98,3 +98,53 @@ capability_types:
description: Runtime monitored value
type: string
status: SUPPORTED
+
+ tosca.capabilities.nfv.VirtualLinkable:
+ derived_from: tosca.capabilities.Root
+
+ tosca.capabilities.nfv.Metric:
+ derived_from: tosca.capabilities.Root
+
+ tosca.capabilities.nfv.VirtualBindable:
+ derived_from: tosca.capabilities.Root
+
+ tosca.capabilities.nfv.VirtualCompute:
+ derived_from: tosca.capabilities.Root
+ properties:
+ virtual_memory:
+ type: tosca.datatypes.nfv.VirtualMemory
+ requested_additional_capabilities:
+ entry_schema:
+ type: tosca.datatypes.nfv.RequestedAdditionalCapability
+ required: false
+ type: map
+ virtual_cpu:
+ type: tosca.datatypes.nfv.VirtualCpu
+
+
+ tosca.capabilities.nfv.VirtualStorage:
+ derived_from: tosca.capabilities.Root
+
+ tosca.capabilities.nfv.Forwarder:
+ derived_from: tosca.capabilities.Root
+
+ tosca.capabilities.nfv.ext.Compute.Container.Architecture:
+ derived_from: tosca.capabilities.Root
+ properties:
+ num_cpus:
+ required: false
+ type: string
+ flavor_extra_specs:
+ entry_schema:
+ type: string
+ required: false
+ type: map
+ mem_size:
+ required: false
+ type: string
+
+ tosca.capabilities.nfv.ext.ImageFile:
+ derived_from: tosca.capabilities.Root
+
+ tosca.capabilities.nfv.ext.LocalAttachment:
+ derived_from: tosca.capabilities.Root \ No newline at end of file
diff --git a/common/openecomp-tosca-datatype/src/main/resources/globalTypes/openecomp/data.yml b/common/openecomp-tosca-datatype/src/main/resources/globalTypes/openecomp/data.yml
index c7ce3c13e0..85ff50c112 100644
--- a/common/openecomp-tosca-datatype/src/main/resources/globalTypes/openecomp/data.yml
+++ b/common/openecomp-tosca-datatype/src/main/resources/globalTypes/openecomp/data.yml
@@ -554,4 +554,225 @@ data_types:
description: Hash type
required: false
default: md5
-
+
+ tosca.datatypes.nfv.RequestedAdditionalCapability:
+ derived_from: tosca.datatypes.Root
+ properties:
+ support_mandatory:
+ type: boolean
+ required: true
+ min_requested_additional_capability_version:
+ type: string
+ required: false
+ preferred_requested_additional_capability_version:
+ type: string
+ required: false
+ requested_additional_capability_name:
+ type: string
+ required: true
+ target_performance_parameters:
+ type: map
+ entry_schema:
+ type: string
+ required: true
+ tosca.datatypes.nfv.VirtualMemory:
+ derived_from: tosca.datatypes.Root
+ properties:
+ virtual_mem_size:
+ type: string
+ required: true
+ virtual_mem_oversubscription_policy:
+ type: string
+ required: false
+ numa_enabled:
+ type: boolean
+ required: false
+ tosca.datatypes.nfv.VirtualCpu:
+ derived_from: tosca.datatypes.Root
+ properties:
+ cpu_architecture:
+ type: string
+ required: false
+ num_virtual_cpu:
+ type: integer
+ required: true
+ virtual_cpu_clock:
+ type: scalar-unit.frequency
+ required: false
+ virtual_cpu_oversubscription_policy:
+ type: string
+ required: false
+ virtual_cpu_pinning:
+ type: tosca.datatypes.nfv.VirtualCpuPinning
+ required: false
+ tosca.datatypes.nfv.VirtualCpuPinning:
+ derived_from: tosca.datatypes.Root
+ properties:
+ cpu_pinning_policy:
+ type: string
+ constraints:
+ - valid_values: [ static, dynamic ]
+ required: false
+ cpu_pinning_map:
+ type: map
+ entry_schema:
+ type: string
+ required: false
+ tosca.datatypes.nfv.VnfcConfigurableProperties:
+ properties:
+ additional_vnfc_configurable_properties:
+ entry_schema:
+ type: string
+ required: false
+ type: map
+ tosca.datatypes.network.NetworkInfo:
+ properties:
+ network_id:
+ required: false
+ type: string
+ addresses:
+ entry_schema:
+ type: string
+ required: false
+ type: list
+ network_name:
+ required: false
+ type: string
+ tosca.datatypes.network.PortInfo:
+ properties:
+ port_name:
+ required: false
+ type: string
+ network_id:
+ required: false
+ type: string
+ addresses:
+ entry_schema:
+ type: string
+ required: false
+ type: list
+ mac_address:
+ required: false
+ type: string
+ port_id:
+ required: false
+ type: string
+ tosca.datatypes.nfv.L3AddressData:
+ properties:
+ number_of_ip_address:
+ required: false
+ type: integer
+ ip_address_assignment:
+ type: boolean
+ ip_address_type:
+ constraints:
+ - valid_values:
+ - ipv4
+ - ipv6
+ required: false
+ type: string
+ floating_ip_activated:
+ type: string
+ tosca.datatypes.nfv.VirtualNetworkInterfaceRequirements:
+ properties:
+ name:
+ required: false
+ type: string
+ support_mandatory:
+ type: boolean
+ description:
+ required: false
+ type: string
+ requirement:
+ entry_schema:
+ type: string
+ type: map
+ tosca.datatype.nfv.AddressData:
+ properties:
+ address_type:
+ constraints:
+ - valid_values:
+ - mac_address
+ - ip_address
+ type: string
+ l2_address_data:
+ required: false
+ type: tosca.datatypes.nfv.L2AddressData
+ l3_address_data:
+ required: false
+ type: tosca.datatypes.nfv.L3AddressData
+ tosca.datatypes.nfv.L2AddressData: {}
+ tosca.datatypes.nfv.ConnectivityType:
+ properties:
+ layer_protocol:
+ constraints:
+ - valid_values:
+ - ethernet
+ - mpls
+ - odu2
+ - ipv4
+ - ipv6
+ - pseudo_wire
+ type: string
+ flow_pattern:
+ required: false
+ type: string
+ tosca.datatypes.nfv.ext.FloatingIP:
+ properties:
+ external_network:
+ required: false
+ type: string
+ ip_address:
+ required: false
+ type: string
+ tosca.datatypes.nfv.ext.AddressPairs:
+ properties:
+ ip:
+ required: false
+ type: string
+ mac:
+ required: false
+ type: string
+ tosca.datatypes.nfv.ext.InjectData:
+ properties:
+ file_name:
+ required: false
+ type: string
+ file_data:
+ required: false
+ type: string
+ tosca.datatypes.nfv.ext.zte.WatchDog:
+ properties:
+ enable_delay:
+ required: false
+ type: integer
+ action:
+ required: false
+ type: string
+ tosca.datatypes.nfv.ext.LocalAffinityOrAntiAffinityRule:
+ properties:
+ scope:
+ required: false
+ type: string
+ affinity_antiaffinity:
+ required: false
+ type: string
+ tosca.datatypes.nfv.ext.LocationInfo:
+ properties:
+ availability_zone:
+ required: false
+ type: string
+ vimid:
+ required: false
+ type: integer
+ tenant:
+ required: false
+ type: string
+ tosca.datatypes.nfv.ext.HostRouteInfo:
+ properties:
+ destination:
+ required: false
+ type: string
+ nexthop:
+ required: false
+ type: string \ No newline at end of file
diff --git a/common/openecomp-tosca-datatype/src/main/resources/globalTypes/openecomp/nodes.yml b/common/openecomp-tosca-datatype/src/main/resources/globalTypes/openecomp/nodes.yml
index fb2e030a06..aaff11b0ed 100644
--- a/common/openecomp-tosca-datatype/src/main/resources/globalTypes/openecomp/nodes.yml
+++ b/common/openecomp-tosca-datatype/src/main/resources/globalTypes/openecomp/nodes.yml
@@ -569,4 +569,538 @@ node_types:
type: map
entry_schema:
type: org.openecomp.datatypes.ImageInfo
- required: false \ No newline at end of file
+ required: false
+ tosca.nodes.nfv.NS.vEPC_NS:
+ derived_from: tosca.nodes.nfv.NS
+ properties:
+ vendor:
+ default: ChinaMobile
+ required: false
+ type: string
+ csarVersion:
+ default: v1.0
+ required: false
+ type: string
+ name:
+ default: vEPC_NS
+ required: false
+ type: string
+ csarProvider:
+ default: ChinaMobile
+ required: false
+ type: string
+ id:
+ default: vEPC_NS
+ required: false
+ type: string
+ version:
+ default: v1.0
+ required: false
+ type: string
+ csarType:
+ default: NSAR
+ required: false
+ type: string
+ requirements:
+ - virtualLink:
+ capability: tosca.capabilities.nfv.VirtualLinkable
+ occurrences:
+ - 0
+ - UNBOUNDED
+
+ tosca.nodes.nfv.NS.vIMS_NS:
+ derived_from: tosca.nodes.nfv.NS
+ properties:
+ vendor:
+ default: ChinaMobile
+ required: false
+ type: string
+ csarVersion:
+ default: v1.0
+ required: false
+ type: string
+ name:
+ default: vIMS_NS
+ required: false
+ type: string
+ csarProvider:
+ default: ChinaMobile
+ required: false
+ type: string
+ id:
+ default: vIMS_NS
+ required: false
+ type: string
+ version:
+ default: v1.0
+ required: false
+ type: string
+ csarType:
+ default: NSAR
+ required: false
+ type: string
+ requirements:
+ - virtualLink:
+ capability: tosca.capabilities.nfv.VirtualLinkable
+ occurrences:
+ - 0
+ - UNBOUNDED
+
+ tosca.nodes.nfv.NS:
+ derived_from: tosca.nodes.Root
+ properties:
+ vendor:
+ required: false
+ type: string
+ name:
+ required: false
+ type: string
+ id:
+ required: false
+ type: string
+ version:
+ required: false
+ type: string
+ requirements:
+ - virtualLink:
+ capability: tosca.capabilities.nfv.VirtualLinkable
+ occurrences:
+ - 0
+ - UNBOUNDED
+
+ tosca.nodes.nfv.VDU.Compute:
+ attributes:
+ private_address:
+ type: string
+ public_address:
+ type: string
+ networks:
+ type: string
+ ports:
+ type: string
+ capabilities:
+ scalable:
+ type: tosca.capabilities.Scalable
+ virtual_compute:
+ type: tosca.capabilities.nfv.VirtualCompute
+ endpoint:
+ type: tosca.capabilities.Endpoint.Admin
+ os:
+ type: tosca.capabilities.OperatingSystem
+ virtual_binding:
+ type: tosca.capabilities.nfv.VirtualBindable
+ host:
+ type: tosca.capabilities.Container
+ binding:
+ type: tosca.capabilities.network.Bindable
+ monitoring_parameter:
+ type: tosca.capabilities.nfv.Metric
+ derived_from: tosca.nodes.Root
+ properties:
+ configurable_properties:
+ entry_schema:
+ type: tosca.datatypes.nfv.VnfcConfigurableProperties
+ type: map
+ name:
+ type: string
+ nfvi_constraints:
+ entry_schema:
+ type: string
+ required: false
+ type: list
+ descrption:
+ type: string
+ boot_order:
+ entry_schema:
+ type: string
+ required: false
+ type: list
+ requirements:
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - virtual_storage:
+ capability: tosca.capabilities.nfv.VirtualStorage
+ occurrences:
+ - 0
+ - UNBOUNDED
+
+ tosca.nodes.nfv.VDU.VirtualStorage:
+ capabilities:
+ virtual_storage:
+ type: tosca.capabilities.nfv.VirtualStorage
+ derived_from: tosca.nodes.Root
+ properties:
+ id:
+ type: string
+ size_of_storage:
+ type: string
+ rdma_enabled:
+ required: false
+ type: boolean
+ type_of_storage:
+ type: string
+
+ tosca.nodes.nfv.VduCpd:
+ derived_from: tosca.nodes.Root
+ properties:
+ virtual_network_interface_requirements:
+ entry_schema:
+ type: tosca.datatypes.nfv.VirtualNetworkInterfaceRequirements
+ required: false
+ type: list
+ role:
+ constraints:
+ - valid_values:
+ - root
+ - leaf
+ required: false
+ type: string
+ bitrate_requirement:
+ required: false
+ type: integer
+ description:
+ required: false
+ type: string
+ layer_protocol:
+ constraints:
+ - valid_values:
+ - ethernet
+ - mpls
+ - odu2
+ - ipv4
+ - ipv6
+ - pseudo_wire
+ type: string
+ address_data:
+ entry_schema:
+ type: tosca.datatype.nfv.AddressData
+ required: false
+ type: list
+ requirements:
+ - virtual_binding:
+ capability: tosca.capabilities.nfv.VirtualBindable
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - virtual_link:
+ capability: tosca.capabilities.nfv.VirtualBindable
+ occurrences:
+ - 0
+ - UNBOUNDED
+ tosca.nodes.nfv.ext.ImageFile:
+ capabilities:
+ guest_os:
+ type: tosca.capabilities.nfv.ext.GuestOs
+ image_fle:
+ type: tosca.capabilities.nfv.ext.ImageFile
+ derived_from: tosca.nodes.Root
+ properties:
+ file_url:
+ required: false
+ type: string
+ container_type:
+ required: false
+ type: string
+ name:
+ required: false
+ type: string
+ disk_format:
+ required: false
+ type: string
+ version:
+ required: false
+ type: string
+ tosca.nodes.nfv.ext.LocalStorage:
+ capabilities:
+ local_attachment:
+ type: tosca.capabilities.nfv.ext.LocalAttachment
+ derived_from: tosca.nodes.Root
+ properties:
+ size:
+ required: false
+ type: string
+ disk_type:
+ required: false
+ type: string
+ tosca.nodes.nfv.ext.zte.CP:
+ capabilities:
+ forwarder:
+ type: tosca.capabilities.nfv.Forwarder
+ derived_from: tosca.nodes.Root
+ properties:
+ guest_os_mtu:
+ required: false
+ type: integer
+ bandwidth:
+ required: false
+ type: integer
+ interface_name:
+ required: false
+ type: string
+ allowed_address_pairs:
+ entry_schema:
+ type: tosca.datatypes.nfv.ext.AddressPairs
+ required: false
+ type: list
+ ip_address:
+ required: false
+ type: string
+ bond:
+ required: false
+ type: string
+ proxiedVNFs:
+ entry_schema:
+ type: string
+ required: false
+ type: list
+ sfc_encapsulation:
+ required: false
+ type: string
+ floating_ip_address:
+ required: false
+ type: tosca.datatypes.nfv.ext.FloatingIP
+ service_ip_address:
+ required: false
+ type: string
+ mac_address:
+ required: false
+ type: string
+ proxiedVNFtype:
+ required: false
+ type: string
+ macbond:
+ required: false
+ type: string
+ vnic_type:
+ required: false
+ type: string
+ direction:
+ required: false
+ type: string
+ order:
+ required: false
+ type: integer
+ requirements:
+ - forwarder:
+ capability: tosca.capabilities.nfv.Forwarder
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - virtualbinding:
+ capability: tosca.capabilities.nfv.VirtualBindable
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - virtualLink:
+ capability: tosca.capabilities.nfv.VirtualBindable
+ occurrences:
+ - 0
+ - UNBOUNDED
+ tosca.nodes.nfv.ext.zte.VDU:
+ capabilities:
+ scalable:
+ type: tosca.capabilities.Scalable
+ monitoring_parameter:
+ type: tosca.capabilities.nfv.Metric
+ nfv_compute:
+ type: tosca.capabilities.nfv.ext.Compute.Container.Architecture
+ virtualbinding:
+ type: tosca.capabilities.nfv.VirtualBindable
+ derived_from: tosca.nodes.Root
+ properties:
+ manual_scale_select_vim:
+ required: false
+ type: boolean
+ vdu_type:
+ required: false
+ type: string
+ watchdog:
+ required: false
+ type: tosca.datatypes.nfv.ext.zte.WatchDog
+ name:
+ required: false
+ type: string
+ local_affinity_antiaffinity_rule:
+ required: false
+ type: tosca.datatypes.nfv.ext.LocalAffinityOrAntiAffinityRule
+ support_scaling:
+ required: false
+ type: boolean
+ storage_policy:
+ required: false
+ type: string
+ key_vdu:
+ required: false
+ type: boolean
+ location_info:
+ required: false
+ type: tosca.datatypes.nfv.ext.LocationInfo
+ inject_data_list:
+ entry_schema:
+ type: tosca.datatypes.nfv.ext.InjectData
+ required: false
+ type: list
+ requirements:
+ - guest_os:
+ capability: tosca.capabilities.nfv.ext.GuestOs
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - local_storage:
+ capability: tosca.capabilities.nfv.ext.LocalAttachment
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - volume_storage:
+ capability: tosca.capabilities.Attachment
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - dependency:
+ capability: tosca.capabilities.Node
+ occurrences:
+ - 0
+ - UNBOUNDED
+ tosca.nodes.nfv.ext.zte.VL:
+ capabilities:
+ virtual_linkable:
+ type: tosca.capabilities.nfv.VirtualLinkable
+ derived_from: tosca.nodes.Root
+ properties:
+ segmentation_id:
+ required: false
+ type: string
+ network_name:
+ required: false
+ type: string
+ is_predefined:
+ required: false
+ type: boolean
+ mtu:
+ required: false
+ type: integer
+ dns_nameservers:
+ entry_schema:
+ type: string
+ required: false
+ type: list
+ physical_network:
+ required: false
+ type: string
+ dhcp_enabled:
+ required: false
+ type: boolean
+ network_id:
+ required: false
+ type: string
+ host_routes:
+ entry_schema:
+ type: tosca.datatypes.nfv.ext.HostRouteInfo
+ required: false
+ type: list
+ ip_version:
+ required: false
+ type: integer
+ vendor:
+ required: false
+ type: string
+ name:
+ required: false
+ type: string
+ start_ip:
+ required: false
+ type: string
+ vlan_transparent:
+ required: false
+ type: boolean
+ cidr:
+ required: false
+ type: string
+ gateway_ip:
+ required: false
+ type: string
+ network_type:
+ required: false
+ type: string
+ end_ip:
+ required: false
+ type: string
+ location_info:
+ required: false
+ type: tosca.datatypes.nfv.ext.LocationInfo
+ tosca.nodes.nfv.ext.zte.VNF:
+ capabilities:
+ forwarder:
+ type: tosca.capabilities.nfv.Forwarder
+ derived_from: tosca.nodes.Root
+ properties:
+ request_reclassification:
+ required: false
+ type: boolean
+ domain_type:
+ required: false
+ type: string
+ nsh_aware:
+ required: false
+ type: boolean
+ plugin_info:
+ required: false
+ type: string
+ adjust_vnf_capacity:
+ required: false
+ type: boolean
+ vnfd_version:
+ required: false
+ type: string
+ vmnumber_overquota_alarm:
+ required: false
+ type: boolean
+ custom_properties:
+ entry_schema:
+ type: string
+ required: false
+ type: map
+ version:
+ required: false
+ type: string
+ cross_dc:
+ required: false
+ type: boolean
+ script_info:
+ required: false
+ type: string
+ vendor:
+ required: false
+ type: string
+ is_shared:
+ required: false
+ type: boolean
+ name:
+ required: false
+ type: string
+ vnf_extend_type:
+ required: false
+ type: string
+ id:
+ required: false
+ type: string
+ vnf_type:
+ required: false
+ type: string
+ is_sfc_proxy:
+ required: false
+ type: boolean
+ requirements:
+ - forwarder:
+ capability: tosca.capabilities.nfv.Forwarder
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - virtualLink:
+ capability: tosca.capabilities.nfv.VirtualLinkable
+ occurrences:
+ - 0
+ - UNBOUNDED \ No newline at end of file
diff --git a/common/openecomp-tosca-datatype/src/main/resources/globalTypes/openecomp/relationships.yml b/common/openecomp-tosca-datatype/src/main/resources/globalTypes/openecomp/relationships.yml
index 6243cfa5d1..220658a8bf 100644
--- a/common/openecomp-tosca-datatype/src/main/resources/globalTypes/openecomp/relationships.yml
+++ b/common/openecomp-tosca-datatype/src/main/resources/globalTypes/openecomp/relationships.yml
@@ -54,3 +54,15 @@ relationship_types:
status: SUPPORTED
required: false
+ tosca.relationships.nfv.VDU.AttachedTo:
+ derived_from: tosca.relationships.Root
+ properties:
+ location:
+ required: false
+ type: string
+
+ tosca.relationships.nfv.VirtualBindsTo:
+ derived_from: tosca.relationships.Root
+
+ tosca.relationships.nfv.VirtualLinksTo:
+ derived_from: tosca.relationships.Root \ No newline at end of file