summaryrefslogtreecommitdiffstats
path: root/openecomp-be
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be')
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedwithoutNodeTemplates/expectedoutputfiles/module_1_perimeta_swmu_a_childServiceTemplate.yaml32
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedwithoutNodeTemplates/expectedoutputfiles/module_1_perimeta_swmu_b_childServiceTemplate.yaml32
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedwithoutNodeTemplates/expectedoutputfiles/module_2_perimeta_sw_a_childServiceTemplate.yaml22
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedwithoutNodeTemplates/expectedoutputfiles/module_2_perimeta_sw_b_childServiceTemplate.yaml22
-rw-r--r--openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/main/java/org/openecomp/core/impl/ToscaConverterImpl.java17
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/DataModelUtil.java29
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/datatypes/ToscaModelTest.java28
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/model/serviceTemplateWithInterfaceAndOperation.yaml1
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/model/serviceTemplateWithNodeTemplateInterface.yaml11
9 files changed, 140 insertions, 54 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedwithoutNodeTemplates/expectedoutputfiles/module_1_perimeta_swmu_a_childServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedwithoutNodeTemplates/expectedoutputfiles/module_1_perimeta_swmu_a_childServiceTemplate.yaml
index f41a92c989..aa69d20865 100644
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedwithoutNodeTemplates/expectedoutputfiles/module_1_perimeta_swmu_a_childServiceTemplate.yaml
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedwithoutNodeTemplates/expectedoutputfiles/module_1_perimeta_swmu_a_childServiceTemplate.yaml
@@ -210,6 +210,11 @@ topology_template:
is_required: true
floating_ip_count_required:
is_required: false
+ - ip_version: 6
+ ip_count_required:
+ is_required: false
+ floating_ip_count_required:
+ is_required: false
security_groups:
get_input: perimeta_sec_groups
fixed_ips:
@@ -243,6 +248,11 @@ topology_template:
is_required: true
floating_ip_count_required:
is_required: true
+ - ip_version: 6
+ ip_count_required:
+ is_required: false
+ floating_ip_count_required:
+ is_required: false
security_groups:
get_input: perimeta_sec_groups
fixed_ips:
@@ -279,6 +289,11 @@ topology_template:
is_required: true
floating_ip_count_required:
is_required: true
+ - ip_version: 6
+ ip_count_required:
+ is_required: false
+ floating_ip_count_required:
+ is_required: false
security_groups:
get_input: perimeta_sec_groups
fixed_ips:
@@ -360,6 +375,11 @@ topology_template:
is_required: true
floating_ip_count_required:
is_required: true
+ - ip_version: 6
+ ip_count_required:
+ is_required: false
+ floating_ip_count_required:
+ is_required: false
security_groups:
get_input: perimeta_sec_groups
fixed_ips:
@@ -396,6 +416,11 @@ topology_template:
is_required: false
floating_ip_count_required:
is_required: false
+ - ip_version: 6
+ ip_count_required:
+ is_required: false
+ floating_ip_count_required:
+ is_required: false
mac_requirements:
mac_count_required:
is_required: false
@@ -424,6 +449,11 @@ topology_template:
is_required: true
floating_ip_count_required:
is_required: true
+ - ip_version: 6
+ ip_count_required:
+ is_required: false
+ floating_ip_count_required:
+ is_required: false
security_groups:
get_input: perimeta_sec_groups
fixed_ips:
@@ -907,4 +937,4 @@ topology_template:
- dependency
dependency_perimeta_ssc_a_server_0:
- perimeta_ssc_a_server_0
- - dependency \ No newline at end of file
+ - dependency \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedwithoutNodeTemplates/expectedoutputfiles/module_1_perimeta_swmu_b_childServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedwithoutNodeTemplates/expectedoutputfiles/module_1_perimeta_swmu_b_childServiceTemplate.yaml
index e03377b30d..20b80029a6 100644
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedwithoutNodeTemplates/expectedoutputfiles/module_1_perimeta_swmu_b_childServiceTemplate.yaml
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedwithoutNodeTemplates/expectedoutputfiles/module_1_perimeta_swmu_b_childServiceTemplate.yaml
@@ -205,6 +205,11 @@ topology_template:
is_required: true
floating_ip_count_required:
is_required: true
+ - ip_version: 6
+ ip_count_required:
+ is_required: false
+ floating_ip_count_required:
+ is_required: false
security_groups:
get_input: perimeta_sec_groups
fixed_ips:
@@ -241,6 +246,11 @@ topology_template:
is_required: true
floating_ip_count_required:
is_required: true
+ - ip_version: 6
+ ip_count_required:
+ is_required: false
+ floating_ip_count_required:
+ is_required: false
security_groups:
get_input: perimeta_sec_groups
fixed_ips:
@@ -322,6 +332,11 @@ topology_template:
is_required: true
floating_ip_count_required:
is_required: true
+ - ip_version: 6
+ ip_count_required:
+ is_required: false
+ floating_ip_count_required:
+ is_required: false
security_groups:
get_input: perimeta_sec_groups
fixed_ips:
@@ -358,6 +373,11 @@ topology_template:
is_required: false
floating_ip_count_required:
is_required: false
+ - ip_version: 6
+ ip_count_required:
+ is_required: false
+ floating_ip_count_required:
+ is_required: false
mac_requirements:
mac_count_required:
is_required: false
@@ -418,6 +438,11 @@ topology_template:
is_required: true
floating_ip_count_required:
is_required: true
+ - ip_version: 6
+ ip_count_required:
+ is_required: false
+ floating_ip_count_required:
+ is_required: false
security_groups:
get_input: perimeta_sec_groups
fixed_ips:
@@ -454,6 +479,11 @@ topology_template:
is_required: true
floating_ip_count_required:
is_required: false
+ - ip_version: 6
+ ip_count_required:
+ is_required: false
+ floating_ip_count_required:
+ is_required: false
security_groups:
get_input: perimeta_sec_groups
fixed_ips:
@@ -893,4 +923,4 @@ topology_template:
- dependency
link_perimeta_ssc_b_ha_0_port:
- perimeta_ssc_b_ha_0_port
- - link \ No newline at end of file
+ - link \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedwithoutNodeTemplates/expectedoutputfiles/module_2_perimeta_sw_a_childServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedwithoutNodeTemplates/expectedoutputfiles/module_2_perimeta_sw_a_childServiceTemplate.yaml
index 50294fa2a2..00014913fb 100644
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedwithoutNodeTemplates/expectedoutputfiles/module_2_perimeta_sw_a_childServiceTemplate.yaml
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedwithoutNodeTemplates/expectedoutputfiles/module_2_perimeta_sw_a_childServiceTemplate.yaml
@@ -286,6 +286,11 @@ topology_template:
ip_count_required:
is_required: true
floating_ip_count_required:
+ is_required: true
+ - ip_version: 6
+ ip_count_required:
+ is_required: false
+ floating_ip_count_required:
is_required: false
security_groups:
get_input: perimeta_sec_groups
@@ -329,6 +334,11 @@ topology_template:
is_required: true
floating_ip_count_required:
is_required: false
+ - ip_version: 6
+ ip_count_required:
+ is_required: false
+ floating_ip_count_required:
+ is_required: false
security_groups:
get_input: perimeta_sec_groups
fixed_ips:
@@ -365,6 +375,11 @@ topology_template:
ip_count_required:
is_required: true
floating_ip_count_required:
+ is_required: true
+ - ip_version: 6
+ ip_count_required:
+ is_required: false
+ floating_ip_count_required:
is_required: false
security_groups:
get_input: perimeta_sec_groups
@@ -452,6 +467,11 @@ topology_template:
ip_count_required:
is_required: true
floating_ip_count_required:
+ is_required: true
+ - ip_version: 6
+ ip_count_required:
+ is_required: false
+ floating_ip_count_required:
is_required: false
security_groups:
get_input: perimeta_sec_groups
@@ -815,4 +835,4 @@ topology_template:
- link
link_perimeta_rtp_msc_a_ha_0_port:
- perimeta_rtp_msc_a_ha_0_port
- - link \ No newline at end of file
+ - link \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedwithoutNodeTemplates/expectedoutputfiles/module_2_perimeta_sw_b_childServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedwithoutNodeTemplates/expectedoutputfiles/module_2_perimeta_sw_b_childServiceTemplate.yaml
index 7fc96269cf..171b3ef1c4 100644
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedwithoutNodeTemplates/expectedoutputfiles/module_2_perimeta_sw_b_childServiceTemplate.yaml
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedwithoutNodeTemplates/expectedoutputfiles/module_2_perimeta_sw_b_childServiceTemplate.yaml
@@ -226,6 +226,11 @@ topology_template:
ip_count_required:
is_required: true
floating_ip_count_required:
+ is_required: true
+ - ip_version: 6
+ ip_count_required:
+ is_required: false
+ floating_ip_count_required:
is_required: false
security_groups:
get_input: perimeta_sec_groups
@@ -268,6 +273,11 @@ topology_template:
ip_count_required:
is_required: true
floating_ip_count_required:
+ is_required: true
+ - ip_version: 6
+ ip_count_required:
+ is_required: false
+ floating_ip_count_required:
is_required: false
security_groups:
get_input: perimeta_sec_groups
@@ -402,6 +412,11 @@ topology_template:
is_required: true
floating_ip_count_required:
is_required: false
+ - ip_version: 6
+ ip_count_required:
+ is_required: false
+ floating_ip_count_required:
+ is_required: false
security_groups:
get_input: perimeta_sec_groups
fixed_ips:
@@ -438,6 +453,11 @@ topology_template:
ip_count_required:
is_required: true
floating_ip_count_required:
+ is_required: true
+ - ip_version: 6
+ ip_count_required:
+ is_required: false
+ floating_ip_count_required:
is_required: false
security_groups:
get_input: perimeta_sec_groups
@@ -801,4 +821,4 @@ topology_template:
- link
link_perimeta_rtp_msc_b_untrusted_parent_0_port:
- perimeta_rtp_msc_b_untrusted_parent_0_port
- - link \ No newline at end of file
+ - link \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/main/java/org/openecomp/core/impl/ToscaConverterImpl.java b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/main/java/org/openecomp/core/impl/ToscaConverterImpl.java
index e9a8f58426..a625bb6fc2 100644
--- a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/main/java/org/openecomp/core/impl/ToscaConverterImpl.java
+++ b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/main/java/org/openecomp/core/impl/ToscaConverterImpl.java
@@ -49,7 +49,6 @@ import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
import org.openecomp.sdc.tosca.datatypes.model.ArtifactDefinition;
import org.openecomp.sdc.tosca.datatypes.model.CapabilityAssignment;
import org.openecomp.sdc.tosca.datatypes.model.Import;
-import org.openecomp.sdc.tosca.datatypes.model.InterfaceDefinition;
import org.openecomp.sdc.tosca.datatypes.model.NodeFilter;
import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
import org.openecomp.sdc.tosca.datatypes.model.NodeType;
@@ -62,18 +61,15 @@ import org.openecomp.sdc.tosca.services.ToscaUtil;
import org.openecomp.sdc.translator.services.heattotosca.globaltypes.GlobalTypesGenerator;
import org.yaml.snakeyaml.error.YAMLException;
-import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
-import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
-import java.util.jar.Manifest;
import java.util.regex.Pattern;
public class ToscaConverterImpl implements ToscaConverter {
@@ -84,8 +80,7 @@ public class ToscaConverterImpl implements ToscaConverter {
}
@Override
- public ToscaServiceModel convert(FileContentHandler fileContentHandler)
- throws IOException {
+ public ToscaServiceModel convert(FileContentHandler fileContentHandler) {
Map<String, byte[]> csarFiles = new HashMap<>(fileContentHandler.getFiles());
ToscaServiceModel toscaServiceModel = new ToscaServiceModel();
Map<String, ServiceTemplate> serviceTemplates = new HashMap<>();
@@ -197,16 +192,6 @@ public class ToscaConverterImpl implements ToscaConverter {
serviceTemplates.put(serviceTemplateName, serviceTemplate);
}
- private Optional<byte[]> getManifestContent(Map<String, byte[]> csarFiles) {
- for (Map.Entry<String, byte[]> csarFileEntry : csarFiles.entrySet()) {
- if (csarFileEntry.getKey().contains(manifestFileName)) {
- return Optional.of(csarFileEntry.getValue());
- }
- }
-
- return Optional.empty();
- }
-
private Optional<ServiceTemplate> getServiceTemplateFromCsar(String fileName,
Map<String, byte[]> csarFiles) {
byte[] fileContent = csarFiles.get(fileName);
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/DataModelUtil.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/DataModelUtil.java
index aef23be03f..6b1046bb45 100644
--- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/DataModelUtil.java
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/DataModelUtil.java
@@ -40,6 +40,7 @@ import org.openecomp.sdc.tosca.datatypes.model.EntrySchema;
import org.openecomp.sdc.tosca.datatypes.model.GroupDefinition;
import org.openecomp.sdc.tosca.datatypes.model.Import;
import org.openecomp.sdc.tosca.datatypes.model.InterfaceDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.InterfaceDefinitionType;
import org.openecomp.sdc.tosca.datatypes.model.InterfaceType;
import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
import org.openecomp.sdc.tosca.datatypes.model.NodeType;
@@ -1212,33 +1213,32 @@ public class DataModelUtil {
return convertedInterfaceTypes;
}
- public static Optional<InterfaceDefinition> convertObjToInterfaceDefinition(
- String interfaceId, Object interfaceObj)
- throws CoreException {
+ public static <T extends InterfaceDefinition> Optional<T>
+ convertObjToInterfaceDefinition(
+ String interfaceId, Object interfaceObj, Class<T> interfaceClass) {
try {
- Optional<InterfaceDefinition> interfaceDefinition =
- CommonUtil.createObjectUsingSetters(interfaceObj, InterfaceDefinition.class);
- interfaceDefinition.ifPresent(interfaceDefinition1 -> updateInterfaceDefinitionOperations(
+ Optional<T> interfaceDefinition =
+ CommonUtil.createObjectUsingSetters(interfaceObj, interfaceClass);
+ interfaceDefinition.ifPresent(interfaceDefinitionType1 -> updateInterfaceDefinitionOperations(
CommonUtil.getObjectAsMap(interfaceObj),
- interfaceDefinition1));
+ interfaceDefinitionType1));
return interfaceDefinition;
} catch (Exception ex) {
throw new CoreException(
- new CreateInterfaceObjectErrorBuilder(InterfaceDefinition.class.getName(), interfaceId,
+ new CreateInterfaceObjectErrorBuilder(InterfaceDefinitionType.class.getName(), interfaceId,
ex.getMessage()).build());
}
}
public static Optional<Object> convertInterfaceDefinitionToObj(
- InterfaceDefinition interfaceDefinition) {
- return converInetrfaceToToscaInterfaceObj(interfaceDefinition);
+ InterfaceDefinitionType interfaceDefinitionType) {
+ return converInetrfaceToToscaInterfaceObj(interfaceDefinitionType);
}
public static Optional<InterfaceType> convertObjToInterfaceType(String interfaceId,
- Object interfaceObj)
- throws CoreException {
+ Object interfaceObj) {
try {
Optional<InterfaceType> interfaceType =
CommonUtil.createObjectUsingSetters(interfaceObj, InterfaceType.class);
@@ -1289,8 +1289,7 @@ public class DataModelUtil {
private static Optional<OperationDefinition> createOperation(String propertyName,
Object operationCandidate,
- Set<String> fieldNames)
- throws CoreException {
+ Set<String> fieldNames) {
if (!fieldNames.contains(propertyName)) {
try {
return CommonUtil.createObjectUsingSetters(operationCandidate, OperationDefinition.class);
@@ -1306,7 +1305,7 @@ public class DataModelUtil {
private static void updateInterfaceDefinitionOperations(Map<String, Object> interfaceAsMap,
InterfaceDefinition interfaceDefinition) {
- Set<String> fieldNames = CommonUtil.getClassFieldNames(InterfaceDefinition.class);
+ Set<String> fieldNames = CommonUtil.getClassFieldNames(InterfaceDefinitionType.class);
for (Map.Entry<String, Object> entry : interfaceAsMap.entrySet()) {
Optional<OperationDefinition> operationDefinition =
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/datatypes/ToscaModelTest.java b/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/datatypes/ToscaModelTest.java
index 31dc3ab035..ced108380e 100644
--- a/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/datatypes/ToscaModelTest.java
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/datatypes/ToscaModelTest.java
@@ -30,11 +30,13 @@ import org.openecomp.sdc.tosca.datatypes.model.Constraint;
import org.openecomp.sdc.tosca.datatypes.model.Directive;
import org.openecomp.sdc.tosca.datatypes.model.Import;
import org.openecomp.sdc.tosca.datatypes.model.InterfaceDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.InterfaceDefinitionType;
import org.openecomp.sdc.tosca.datatypes.model.InterfaceType;
import org.openecomp.sdc.tosca.datatypes.model.NodeFilter;
import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
import org.openecomp.sdc.tosca.datatypes.model.NodeType;
import org.openecomp.sdc.tosca.datatypes.model.OperationDefinition;
+import org.openecomp.sdc.tosca.datatypes.model.OperationDefinitionType;
import org.openecomp.sdc.tosca.datatypes.model.ParameterDefinition;
import org.openecomp.sdc.tosca.datatypes.model.PropertyDefinition;
import org.openecomp.sdc.tosca.datatypes.model.PropertyType;
@@ -374,8 +376,9 @@ public class ToscaModelTest {
NodeTemplate nodeTemplate =
DataModelUtil.getNodeTemplate(serviceTemplate, NODE_TEMPLATE_ID);
- InterfaceDefinition interfaceDefinition = getInterfaceDefinition();
- Optional<Object> interfaceObj = DataModelUtil.convertInterfaceDefinitionToObj(interfaceDefinition);
+ InterfaceDefinitionType interfaceDefinitionType = getInterfaceDefinition();
+ Optional<Object> interfaceObj = DataModelUtil.convertInterfaceDefinitionToObj(
+ interfaceDefinitionType);
Assert.assertTrue(interfaceObj.isPresent());
Map<String, Object> interfaces = new HashMap<>();
@@ -396,13 +399,15 @@ public class ToscaModelTest {
DataModelUtil.getNodeTemplate(serviceTemplateWithInterfaceDef, NODE_TEMPLATE_ID);
Map<String, Object> interfaces = nodeTemplateWithInterface.getInterfaces();
Object interfaceObj = interfaces.get(INTERFACE_ID);
- Optional<InterfaceDefinition> actualInterfaceDefinition =
- DataModelUtil.convertObjToInterfaceDefinition(INTERFACE_ID, interfaceObj);
+
+ Optional<? extends InterfaceDefinition> actualInterfaceDefinition =
+ DataModelUtil.convertObjToInterfaceDefinition(INTERFACE_ID, interfaceObj,
+ InterfaceDefinitionType.class);
Assert.assertTrue(actualInterfaceDefinition.isPresent());
- InterfaceDefinition expectedInterfaceDefinition = getInterfaceDefinition();
- Assert.assertEquals(expectedInterfaceDefinition, actualInterfaceDefinition.get());
+ InterfaceDefinitionType expectedInterfaceDefinitionType = getInterfaceDefinition();
+ Assert.assertEquals(expectedInterfaceDefinitionType, actualInterfaceDefinition.get());
}
@Test
@@ -438,16 +443,15 @@ public class ToscaModelTest {
private OperationDefinition getOperationDefinition() {
OperationDefinition operationDefinition = new OperationDefinition();
operationDefinition.setDescription("start operation");
- operationDefinition.setImplementation("start.sh");
return operationDefinition;
}
- private InterfaceDefinition getInterfaceDefinition() {
+ private InterfaceDefinitionType getInterfaceDefinition() {
OperationDefinition operationDefinition = getOperationDefinition();
- InterfaceDefinition interfaceDefinition = new InterfaceDefinition();
- interfaceDefinition.setType("test interface");
- interfaceDefinition.addOperation("start", operationDefinition);
- return interfaceDefinition;
+ InterfaceDefinitionType interfaceDefinitionType = new InterfaceDefinitionType();
+ interfaceDefinitionType.setType("test interface");
+ interfaceDefinitionType.addOperation("start", operationDefinition);
+ return interfaceDefinitionType;
}
}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/model/serviceTemplateWithInterfaceAndOperation.yaml b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/model/serviceTemplateWithInterfaceAndOperation.yaml
index 90376b7205..9da35df8a2 100644
--- a/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/model/serviceTemplateWithInterfaceAndOperation.yaml
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/model/serviceTemplateWithInterfaceAndOperation.yaml
@@ -20,7 +20,6 @@ interface_types:
description: test interface
start:
description: start operation
- implementation: start.sh
node_types:
compute_node_type:
derived_from: tosca.nodes.Root
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/model/serviceTemplateWithNodeTemplateInterface.yaml b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/model/serviceTemplateWithNodeTemplateInterface.yaml
index 6df071c570..3f63ee9825 100644
--- a/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/model/serviceTemplateWithNodeTemplateInterface.yaml
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/model/serviceTemplateWithNodeTemplateInterface.yaml
@@ -73,12 +73,6 @@ topology_template:
directives:
- selectable
- substitutable
- interfaces:
- inter_1:
- type: test interface
- start:
- description: start operation
- implementation: start.sh
properties:
prop2: '{ get_input: my_mysql_rootpw }'
prop1: abcd
@@ -104,6 +98,11 @@ topology_template:
capability: capA
node: nodeA
relationship: relationB
+ interfaces:
+ inter_1:
+ type: test interface
+ start:
+ description: start operation
substitution_mappings:
node_type: myNodeType.node
capabilities: