diff options
author | 2018-03-11 12:23:20 +0200 | |
---|---|---|
committer | 2018-03-11 16:05:10 +0000 | |
commit | 3107efd8aa9721a195580fc283205bed26104875 (patch) | |
tree | 1a5b6992dd71f12b9521514de41acd340fe68abb /openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp | |
parent | a6d224838995e21205152bbea8ed2c719ea4ee59 (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/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp')
1 files changed, 11 insertions, 5 deletions
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"); |