aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be
diff options
context:
space:
mode:
authoravigaffa <avi.gaffa@amdocs.com>2018-03-11 12:23:20 +0200
committerMichael Lando <ml636r@att.com>2018-03-11 16:05:10 +0000
commit3107efd8aa9721a195580fc283205bed26104875 (patch)
tree1a5b6992dd71f12b9521514de41acd340fe68abb /openecomp-be
parenta6d224838995e21205152bbea8ed2c719ea4ee59 (diff)
Validation of VSP fails with error null
Change-Id: I98bbff6b567932d06d4764ac24bc25984741834c Issue-ID: SDC-1093 Signed-off-by: avigaffa <avi.gaffa@amdocs.com>
Diffstat (limited to 'openecomp-be')
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/HeatToToscaUtil.java87
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/UnifiedCompositionManager.java6
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ContrailV2VlanToInterfaceResourceConnectionTest.java16
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/subInterfaceToInterfaceConnection/inoutattr/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml10
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/subInterfaceToInterfaceConnection/inoutattr/expectedoutputfiles/MainServiceTemplate.yaml6
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/subInterfaceToInterfaceConnection/inoutattr/expectedoutputfiles/nestedServiceTemplate.yaml24
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/subInterfaceToInterfaceConnection/inoutattr/inputfiles/nested.yml4
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/subInterfaceToInterfaceConnection/portNetworkRole/inputfiles/main.yml24
8 files changed, 118 insertions, 59 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/HeatToToscaUtil.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/HeatToToscaUtil.java
index 370f48915a..487dd19458 100644
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/HeatToToscaUtil.java
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/HeatToToscaUtil.java
@@ -86,7 +86,6 @@ import org.openecomp.sdc.translator.services.heattotosca.mapping.TranslatorHeatT
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
@@ -95,6 +94,8 @@ import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
import java.util.stream.Collectors;
/**
@@ -130,9 +131,9 @@ public class HeatToToscaUtil {
fileNameContentMap.getFileList().stream()
.filter(fileName -> !(fileName.equals(SdcCommon.MANIFEST_NAME))).forEach(
- fileName -> heatToToscaTranslator
- .addFile(fileName, FileUtils.toByteArray
- (fileNameContentMap.getFileContent(fileName))));
+ fileName -> heatToToscaTranslator
+ .addFile(fileName, FileUtils.toByteArray
+ (fileNameContentMap.getFileContent(fileName))));
Map<String, List<ErrorMessage>> errors = heatToToscaTranslator.validate();
if (MapUtils.isNotEmpty(MessageContainerUtil.getMessageByLevel(ErrorLevel.ERROR, errors))) {
@@ -564,7 +565,7 @@ public class HeatToToscaUtil {
}
private static boolean isNestedVlanResource(String nestedHeatFileName,
- TranslationContext translationContext) {
+ TranslationContext translationContext) {
HeatOrchestrationTemplate nestedHeatOrchestrationTemplate = new YamlUtil()
.yamlToObject(translationContext.getFileContent(nestedHeatFileName),
HeatOrchestrationTemplate.class);
@@ -606,7 +607,7 @@ public class HeatToToscaUtil {
public static String getSubInterfaceResourceType(Resource resource) {
if (!HeatToToscaUtil.isYamlFile(resource.getType())) {
- return ((Map) resource.getProperties()
+ return ((Map) resource.getProperties()
.get(HeatConstants.RESOURCE_DEF_PROPERTY_NAME))
.get(HeatConstants.RESOURCE_DEF_TYPE_PROPERTY_NAME)
.toString();
@@ -635,10 +636,10 @@ public class HeatToToscaUtil {
Map<String, String> parentPortPropertyValue = (Map) parentPortObj;
if (parentPortPropertyValue.keySet().contains(ResourceReferenceFunctions
.GET_RESOURCE.getFunction())) {
- return ResourceTranslationBase.getResourceTranslatedId(subInterfaceTo.getHeatFileName(),
- subInterfaceTo.getHeatOrchestrationTemplate(),
- parentPortPropertyValue.get(ResourceReferenceFunctions.GET_RESOURCE.getFunction()),
- subInterfaceTo.getContext());
+ return ResourceTranslationBase.getResourceTranslatedId(subInterfaceTo.getHeatFileName(),
+ subInterfaceTo.getHeatOrchestrationTemplate(),
+ parentPortPropertyValue.get(ResourceReferenceFunctions.GET_RESOURCE.getFunction()),
+ subInterfaceTo.getContext());
}
}
}
@@ -1267,10 +1268,10 @@ public class HeatToToscaUtil {
//set substitution node type requirements
exposedRequirementsDefinition =
toscaAnalyzerService.calculateExposedRequirements(nodeTypeRequirementsDefinition,
- nodeTemplateRequirementsAssignment);
+ nodeTemplateRequirementsAssignment);
DataModelUtil
.addSubstitutionNodeTypeRequirements(substitutionNodeType, exposedRequirementsDefinition,
- nodeTemplateId);
+ nodeTemplateId);
//get capabilities
addNodeTypeCapabilitiesToSubMapping(nodeTypeCapabilitiesDefinition,
@@ -1280,7 +1281,7 @@ public class HeatToToscaUtil {
exposedCapabilitiesDefinition =
toscaAnalyzerService.calculateExposedCapabilities(nodeTypeCapabilitiesDefinition,
- fullFilledRequirementsDefinition);
+ fullFilledRequirementsDefinition);
DataModelUtil.addNodeTypeCapabilitiesDef(substitutionNodeType, exposedCapabilitiesDefinition);
return substitutionMapping;
}
@@ -1298,7 +1299,7 @@ public class HeatToToscaUtil {
.stream()
.forEach(capabilityNodeEntry ->
addCapabilityToSubMapping(
- templateName, capabilityNodeEntry, nodeTypeCapabilitiesDefinition, capabilitySubstitutionMapping));
+ templateName, capabilityNodeEntry, nodeTypeCapabilitiesDefinition, capabilitySubstitutionMapping));
}
}
@@ -1478,7 +1479,7 @@ public class HeatToToscaUtil {
//Method evaluate the network role from sub interface node template id, designed considering
// only single sub interface present in nested file else it will return null
public static Optional<String> getNetworkRoleFromResource(Resource resource,
- TranslationContext translationContext) {
+ TranslationContext translationContext) {
Optional<String> networkRole = Optional.empty();
Optional<String> nestedHeatFileName = HeatToToscaUtil.getNestedHeatFileName(resource);
@@ -1493,35 +1494,63 @@ public class HeatToToscaUtil {
if (MapUtils.isNotEmpty(nestedHeatOrchestrationTemplate.getResources())) {
ContrailV2VirtualMachineInterfaceHelper contrailV2VirtualMachineInterfaceHelper =
new ContrailV2VirtualMachineInterfaceHelper();
- Optional<Map.Entry<String, Resource>> vlanSubinterfaceResource = nestedHeatOrchestrationTemplate
+ Optional<Map.Entry<String, Resource>> vlanSubInterfaceResource = nestedHeatOrchestrationTemplate
.getResources().entrySet().stream()
.filter(resourceEntry -> contrailV2VirtualMachineInterfaceHelper
.isVlanSubInterfaceResource(resourceEntry.getValue()))
.findFirst();
- if (vlanSubinterfaceResource.isPresent()) {
- Map.Entry<String, Resource> vlanSubinterfaceResourceEntry = vlanSubinterfaceResource.get();
- networkRole = evaluateNetworkRoleFromResourceId(vlanSubinterfaceResourceEntry.getKey(),
- vlanSubinterfaceResourceEntry.getValue().getType());
+ if (vlanSubInterfaceResource.isPresent()) {
+ Map.Entry<String, Resource> vlanSubInterfaceResourceEntry = vlanSubInterfaceResource.get();
+ networkRole = evaluateNetworkRoleFromResourceId(vlanSubInterfaceResourceEntry.getKey(),
+ vlanSubInterfaceResourceEntry.getValue().getType());
}
}
return networkRole;
}
public static Optional<String> evaluateNetworkRoleFromResourceId(String resourceId, String resourceType) {
- String[] splitStr = resourceId.toLowerCase().split(UNDERSCORE);
- List<String> splitList = Arrays.asList(splitStr);
-
if (resourceType.equals(HeatResourcesTypes.CONTRAIL_V2_VIRTUAL_MACHINE_INTERFACE_RESOURCE_TYPE.getHeatResource())) {
- if (splitList.contains(VMI)) {
- return Optional.of(splitList.get(splitList.indexOf(VMI) - 1));
- }
+ return Optional.ofNullable(extractNetworkRoleFromContrailPortId(resourceId));
}
if (resourceType.equals(HeatResourcesTypes.NEUTRON_PORT_RESOURCE_TYPE.getHeatResource())) {
- if (splitList.contains(NEUTRON_PORT_IDENTIFIER)) {
- return Optional.of(splitList.get(splitList.indexOf(NEUTRON_PORT_IDENTIFIER) - 1));
- }
+ return Optional.ofNullable(extractNetworkRoleFromNeutronPortId(resourceId));
}
return Optional.empty();
}
+
+ private static String extractNetworkRoleFromContrailPortId(String portResourceId) {
+ String vmiResourceIdRegex = "(\\w+)(_\\d+){0,1}_(\\w+)_vmi(_\\d+){0,1}";
+ String vmiIntResourceIdRegex = "(\\w+)(_\\d+){0,1}_int_(\\w+)_vmi(_\\d+){0,1}";
+
+ String portNetworkRole = getPortNetworkRole(portResourceId, vmiResourceIdRegex);
+ String portIntNetworkRole = getPortNetworkRole(portResourceId, vmiIntResourceIdRegex);
+
+ return Objects.nonNull(portNetworkRole) ? portNetworkRole : portIntNetworkRole;
+ }
+
+
+ private static String extractNetworkRoleFromNeutronPortId(String portResourceId) {
+ String portResourceIdRegex = "(\\w+)(_\\d+){0,1}_(\\w+)_port(_\\d+){0,1}";
+ String portIntResourceIdRegex = "(\\w+)(_\\d+){0,1}_int_(\\w+)_port(_\\d+){0,1}";
+
+ String portNetworkRole = getPortNetworkRole(portResourceId, portResourceIdRegex);
+ String portIntNetworkRole = getPortNetworkRole(portResourceId, portIntResourceIdRegex);
+
+ return Objects.nonNull(portNetworkRole) ? portNetworkRole : portIntNetworkRole;
+ }
+
+ private static String getPortNetworkRole(String portResourceId, String portIdRegex) {
+ Pattern pattern = Pattern.compile(portIdRegex);
+ Matcher matcher = pattern.matcher(portResourceId);
+ if (matcher.matches()) {
+ String networkRole = matcher.group(3);
+ //Assuming network role will not contain ONLY digits
+ if (!networkRole.matches("\\d+")) {
+ return matcher.group(3);
+ }
+ }
+ return null;
+ }
+
}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/UnifiedCompositionManager.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/UnifiedCompositionManager.java
index 86761b7339..b335e0005c 100644
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/UnifiedCompositionManager.java
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/UnifiedCompositionManager.java
@@ -67,12 +67,12 @@ public class UnifiedCompositionManager {
ToscaAnalyzerService toscaAnalyzerService = new ToscaAnalyzerServiceImpl();
for (String substitutedNodeTemplateId : fileNestedConsolidationData
.getAllNestedNodeTemplateIds()) {
- if (translationContext
+ NodeTemplate nestedNodeTemplate =
+ DataModelUtil.getNodeTemplate(serviceTemplate, substitutedNodeTemplateId);
+ if (Objects.isNull(nestedNodeTemplate) || translationContext
.isNestedNodeWasHandled(serviceTemplateFileName, substitutedNodeTemplateId)) {
continue;
}
- NodeTemplate nestedNodeTemplate =
- DataModelUtil.getNodeTemplate(serviceTemplate, substitutedNodeTemplateId);
Optional<String> substituteServiceTemplateName =
toscaAnalyzerService.getSubstituteServiceTemplateName(substitutedNodeTemplateId,
nestedNodeTemplate);
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ContrailV2VlanToInterfaceResourceConnectionTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ContrailV2VlanToInterfaceResourceConnectionTest.java
index f0c4517ea7..21aa15e98e 100644
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ContrailV2VlanToInterfaceResourceConnectionTest.java
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ContrailV2VlanToInterfaceResourceConnectionTest.java
@@ -16,6 +16,8 @@
package org.openecomp.sdc.translator.services.heattotosca.impl.resourcetranslation;
+import com.google.common.collect.ArrayListMultimap;
+import com.google.common.collect.ListMultimap;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
@@ -77,11 +79,14 @@ public class ContrailV2VlanToInterfaceResourceConnectionTest extends BaseResourc
.getFilePortConsolidationData(MAIN_SERVICE_TEMPLATE_YAML)
.getPortTemplateConsolidationData(PORT_NODE_TEMPLATE_ID_FOR_ATTR_TEST));
+ PortTemplateConsolidationData portTemplateConsolidationData =
+ this.translationContext.getConsolidationData().getPortConsolidationData()
+ .getFilePortConsolidationData(MAIN_SERVICE_TEMPLATE_YAML)
+ .getPortTemplateConsolidationData(PORT_NODE_TEMPLATE_ID_FOR_ATTR_TEST);
+ ListMultimap<String, SubInterfaceTemplateConsolidationData> subInfMap = ArrayListMultimap.create();
+ portTemplateConsolidationData.copyMappedInto(subInfMap);
List<SubInterfaceTemplateConsolidationData> subInfList =
- this.translationContext.getConsolidationData().getPortConsolidationData()
- .getFilePortConsolidationData(MAIN_SERVICE_TEMPLATE_YAML)
- .getPortTemplateConsolidationData(PORT_NODE_TEMPLATE_ID_FOR_ATTR_TEST)
- .getSubInterfaceConsolidationData("org.openecomp.resource.abstract.nodes.heat.subinterface.nested");
+ subInfMap.get("org.openecomp.resource.abstract.nodes.heat.subinterface.nested");
Assert.assertEquals(ONE, subInfList.size());
SubInterfaceTemplateConsolidationData data = subInfList.get(0);
@@ -113,7 +118,8 @@ public class ContrailV2VlanToInterfaceResourceConnectionTest extends BaseResourc
public void testGetNetworkRoleFromResourceUtil_Port() throws Exception {
inputFilesPath = INPUT_FILE_PATH_FOR_PORT_NETWORK_ROLE;
initTranslatorAndTranslate();
- List<String> validNeutronPortTemplateIds = Arrays.asList("vdbe_0_oam_port_1", "vdbe_oam_port", "vdbe_oam_port_2");
+ List<String> validNeutronPortTemplateIds = Arrays.asList("vdbe_0_oam_port_1", "vdbe_oam_port", "vdbe_oam_port_2",
+ "vdbe_0_int_oam_port_1", "vdbe_int_oam_port", "vdbe_int_oam_port_2");
validatePortNetworkRole(validNeutronPortTemplateIds, "oam");
List<String> validVmiPortTemplateIds = Arrays.asList("vdbe_0_untr_vmi_0", "vdbe_untr_vmi");
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/subInterfaceToInterfaceConnection/inoutattr/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/subInterfaceToInterfaceConnection/inoutattr/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
index 4176447d09..96f6560305 100644
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/subInterfaceToInterfaceConnection/inoutattr/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/subInterfaceToInterfaceConnection/inoutattr/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
@@ -91,20 +91,20 @@ node_types:
required: true
status: SUPPORTED
requirements:
- - dependency_vdbe_untr_vmi_subport:
+ - dependency_vdbe_0_subint_untr_vmi_0:
capability: tosca.capabilities.Node
node: tosca.nodes.Root
relationship: tosca.relationships.DependsOn
occurrences:
- 0
- UNBOUNDED
- - link_vdbe_untr_vmi_subport:
+ - link_vdbe_0_subint_untr_vmi_0:
capability: tosca.capabilities.network.Linkable
relationship: tosca.relationships.network.LinksTo
occurrences:
- 1
- 1
- - binding_vdbe_untr_vmi_subport:
+ - binding_vdbe_0_subint_untr_vmi_0:
capability: tosca.capabilities.network.Bindable
node: org.openecomp.resource.cp.nodes.network.Port
relationship: tosca.relationships.network.BindsTo
@@ -112,8 +112,8 @@ node_types:
- 1
- 1
capabilities:
- feature_vdbe_untr_vmi_subport:
+ feature_vdbe_0_subint_untr_vmi_0:
type: tosca.capabilities.Node
occurrences:
- 1
- - UNBOUNDED \ No newline at end of file
+ - UNBOUNDED
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/subInterfaceToInterfaceConnection/inoutattr/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/subInterfaceToInterfaceConnection/inoutattr/expectedoutputfiles/MainServiceTemplate.yaml
index d6f832f595..8f9138efec 100644
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/subInterfaceToInterfaceConnection/inoutattr/expectedoutputfiles/MainServiceTemplate.yaml
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/subInterfaceToInterfaceConnection/inoutattr/expectedoutputfiles/MainServiceTemplate.yaml
@@ -502,11 +502,11 @@ topology_template:
aap_untrusted_ip_prefix_len:
get_input: vdbe_aap_untrusted_ip_prefix_len
requirements:
- - link_vdbe_untr_vmi_subport:
+ - link_vdbe_0_subint_untr_vmi_0:
capability: tosca.capabilities.network.Linkable
node: control_int_net
relationship: tosca.relationships.network.LinksTo
- - binding_vdbe_untr_vmi_subport:
+ - binding_vdbe_0_subint_untr_vmi_0:
capability: tosca.capabilities.network.Bindable
node: vdbe_untr_1_port
relationship: tosca.relationships.network.BindsTo
@@ -550,4 +550,4 @@ topology_template:
value:
get_attribute:
- vdbe_untr_1_subports
- - name \ No newline at end of file
+ - name
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/subInterfaceToInterfaceConnection/inoutattr/expectedoutputfiles/nestedServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/subInterfaceToInterfaceConnection/inoutattr/expectedoutputfiles/nestedServiceTemplate.yaml
index 2eb726c199..cb088cf958 100644
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/subInterfaceToInterfaceConnection/inoutattr/expectedoutputfiles/nestedServiceTemplate.yaml
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/subInterfaceToInterfaceConnection/inoutattr/expectedoutputfiles/nestedServiceTemplate.yaml
@@ -91,7 +91,7 @@ topology_template:
type: string
description: ip prefix length for the primary vDBE VM on the VAN untrusted network
node_templates:
- vdbe_untr_vmi_subport:
+ vdbe_0_subint_untr_vmi_0:
type: org.openecomp.resource.cp.nodes.heat.network.contrailV2.VLANSubInterface
properties:
virtual_machine_interface_refs:
@@ -152,20 +152,20 @@ topology_template:
heat_file: ../Artifacts/nested.yml
description: cmaui server template for vMMSC
members:
- - vdbe_untr_vmi_subport
+ - vdbe_0_subint_untr_vmi_0
substitution_mappings:
node_type: org.openecomp.resource.abstract.nodes.heat.subinterface.nested
capabilities:
- feature_vdbe_untr_vmi_subport:
- - vdbe_untr_vmi_subport
+ feature_vdbe_0_subint_untr_vmi_0:
+ - vdbe_0_subint_untr_vmi_0
- feature
requirements:
- dependency_vdbe_untr_vmi_subport:
- - vdbe_untr_vmi_subport
+ dependency_vdbe_0_subint_untr_vmi_0:
+ - vdbe_0_subint_untr_vmi_0
- dependency
- link_vdbe_untr_vmi_subport:
- - vdbe_untr_vmi_subport
- - link
- binding_vdbe_untr_vmi_subport:
- - vdbe_untr_vmi_subport
- - binding \ No newline at end of file
+ binding_vdbe_0_subint_untr_vmi_0:
+ - vdbe_0_subint_untr_vmi_0
+ - binding
+ link_vdbe_0_subint_untr_vmi_0:
+ - vdbe_0_subint_untr_vmi_0
+ - 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/services/heattotosca/subInterfaceToInterfaceConnection/inoutattr/inputfiles/nested.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/subInterfaceToInterfaceConnection/inoutattr/inputfiles/nested.yml
index eeaf3b68c3..f175f9a475 100644
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/subInterfaceToInterfaceConnection/inoutattr/inputfiles/nested.yml
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/subInterfaceToInterfaceConnection/inoutattr/inputfiles/nested.yml
@@ -52,7 +52,7 @@ parameters:
description: "IPv6 address associated with subinterfaces"
type: string
resources:
- vdbe_untr_vmi_subport:
+ vdbe_0_subint_untr_vmi_0:
type: OS::ContrailV2::VirtualMachineInterface
properties:
name:
@@ -111,4 +111,4 @@ resources:
virtual_machine_interface_refs:
[{get_param: parent_interface}]
virtual_network_refs:
- [{get_param: vdbe_subport_network}] \ No newline at end of file
+ [{get_param: vdbe_subport_network}]
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/subInterfaceToInterfaceConnection/portNetworkRole/inputfiles/main.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/subInterfaceToInterfaceConnection/portNetworkRole/inputfiles/main.yml
index 994b081559..36f15d42ec 100644
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/subInterfaceToInterfaceConnection/portNetworkRole/inputfiles/main.yml
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/subInterfaceToInterfaceConnection/portNetworkRole/inputfiles/main.yml
@@ -118,6 +118,9 @@ resources:
- port: {get_resource: vdbe_0_oam_port_1}
- port: {get_resource: vdbe_oam_port}
- port: {get_resource: vdbe_oam_port_2}
+ - port: {get_resource: vdbe_0_int_oam_port_1}
+ - port: {get_resource: vdbe_int_oam_port}
+ - port: {get_resource: vdbe_int_oam_port_2}
- port: {get_resource: vdbe_0_oam_neutronNotFollowingHeatGuidelines_2}
- port: {get_resource: vdbe_0_untr_vmiNotFollowingHeatGuidelines_1}
vdbe_untr_1_subports:
@@ -298,6 +301,27 @@ resources:
fixed_ips: [{"ip_address": 1.2.3.4}]
replacement_policy: AUTO
+ vdbe_0_int_oam_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: Test
+ fixed_ips: [{"ip_address": 1.2.3.4}]
+ replacement_policy: AUTO
+
+ vdbe_int_oam_port:
+ type: OS::Neutron::Port
+ properties:
+ network: Test
+ fixed_ips: [{"ip_address": 1.2.3.4}]
+ replacement_policy: AUTO
+
+ vdbe_int_oam_port_2:
+ type: OS::Neutron::Port
+ properties:
+ network: Test
+ fixed_ips: [{"ip_address": 1.2.3.4}]
+ replacement_policy: AUTO
+
vdbe_0_untr_vmiNotFollowingHeatGuidelines_1:
properties:
name: