diff options
author | 2018-03-06 12:01:54 +0530 | |
---|---|---|
committer | 2018-03-27 12:30:06 +0530 | |
commit | 56e56b8860cf6e7ad70dc65134e8fd87eaf01123 (patch) | |
tree | 5a45b1199db9a1ce840c2c454e470674daf4e63c /openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp | |
parent | 6cc3acdc6d3140a8f702939568ab4c7cda06beaa (diff) |
VLAN tagging - VFC Instance Group
1. Create VFC instance group per sub-interface
network role
2. Refactored PortTemplateConsolidationData and
its references based on review comments
3. Updated test data after rebase
4. Updated to flatMap based on review
comments
Change-Id: I423593c5156ecae5eff3a4f2ce8591c85db727cc
Issue-ID: SDC-1073
Signed-off-by: ojasdubey <ojas.dubey@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp')
1 files changed, 28 insertions, 14 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/fulltest/UnifiedCompositionSubInterfaceFullTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/fulltest/UnifiedCompositionSubInterfaceFullTest.java index d27eb20242..ca31c85307 100644 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/fulltest/UnifiedCompositionSubInterfaceFullTest.java +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/fulltest/UnifiedCompositionSubInterfaceFullTest.java @@ -29,13 +29,15 @@ public class UnifiedCompositionSubInterfaceFullTest extends BaseFullTranslationT "/mock/services/heattotosca/fulltest/subinterface/vlantagging/pattern1b/"; private static final String PATTERN_1C1_BASE_DIRECTORY = "/mock/services/heattotosca/fulltest/subinterface/vlantagging/pattern1c1/"; - private static final String PATTERN_5_BASE_DIRECTORY = - "/mock/services/heattotosca/fulltest/subinterface/vlantagging/pattern5/"; private static final String PATTERN_4_BASE_DIRECTORY = "/mock/services/heattotosca/fulltest/subinterface/vlantagging/pattern4/"; + private static final String PATTERN_5_BASE_DIRECTORY = + "/mock/services/heattotosca/fulltest/subinterface/vlantagging/pattern5/"; + private static final String VFC_INSTANCE_GROUP_BASE_DIRECTORY = + "/mock/services/heattotosca/fulltest/subinterface/vlantagging/vfcInstanceGroup/"; @Test - public void testSubInterfaceComputePortNetwork() throws IOException { + public void testSubInterfaceComputePortNetworkWithGroup() throws IOException { /** * Heat file with one compute, one port and one subinterface resource group with only port * connected to network @@ -199,7 +201,7 @@ public class UnifiedCompositionSubInterfaceFullTest extends BaseFullTranslationT } @Test - public void testSubInterfaceScalingMultiplePortsMultipleVlans() throws IOException { + public void testSubInterfaceScalingMultiplePortsMultipleVlansWithGroup() throws IOException { /** * Heat file with two computes of different type, four ports of two types each and four subinterface resource groups * of two types each @@ -293,8 +295,7 @@ public class UnifiedCompositionSubInterfaceFullTest extends BaseFullTranslationT * 2. Second level nested is having one VFC and one Port with Sub interface which are of * different type as parent heat file */ - testTranslationWithInit(PATTERN_5_BASE_DIRECTORY + - "complexVFCMultiLevelNestedDiffComputeScenario"); + testTranslationWithInit(PATTERN_5_BASE_DIRECTORY + "complexVFCMultiLevelNestedDiffComputeScenario"); } @Test @@ -304,8 +305,7 @@ public class UnifiedCompositionSubInterfaceFullTest extends BaseFullTranslationT * 1. Main is having 4 VFC of 2 type and 2 port and all having sub interface * 2. Second level nested is having 4 VFC of 2 type and 2 port and all having sub interface */ - testTranslationWithInit(PATTERN_5_BASE_DIRECTORY + - "complexVFCMultiVFCInAllHeatScalingScenario"); + testTranslationWithInit(PATTERN_5_BASE_DIRECTORY + "complexVFCMultiVFCInAllHeatScalingScenario"); } @Test @@ -315,8 +315,7 @@ public class UnifiedCompositionSubInterfaceFullTest extends BaseFullTranslationT * 1. First level nested is having one VFC and one Port with Sub interface * 2. Second level nested is having two VFC of same type and two Port with Sub interface */ - testTranslationWithInit(PATTERN_5_BASE_DIRECTORY + - "complexVFCMultiLevelNestedMultiComputeScenario"); + testTranslationWithInit(PATTERN_5_BASE_DIRECTORY + "complexVFCMultiLevelNestedMultiComputeScenario"); } @Test @@ -328,8 +327,7 @@ public class UnifiedCompositionSubInterfaceFullTest extends BaseFullTranslationT * 2. Second level nested is having two VFC of same type and one Port with only one port * connected to Sub interface */ - testTranslationWithInit(PATTERN_5_BASE_DIRECTORY + - "complexVFCWithDiffSubInfConnectivityScenario"); + testTranslationWithInit(PATTERN_5_BASE_DIRECTORY + "complexVFCWithDiffSubInfConnectivityScenario"); } //Catalog instance will start working with 1C2 changes in place @@ -342,8 +340,7 @@ public class UnifiedCompositionSubInterfaceFullTest extends BaseFullTranslationT * 2. Second level nested is having two VFC of same type and connected to Sub interface but * having different count */ - testTranslationWithInit(PATTERN_5_BASE_DIRECTORY + - "complexVFCWithDiffSubInfCountScenario"); + testTranslationWithInit(PATTERN_5_BASE_DIRECTORY + "complexVFCWithDiffSubInfCountScenario"); } //Pattern 4 Test Cases @@ -430,4 +427,21 @@ public class UnifiedCompositionSubInterfaceFullTest extends BaseFullTranslationT */ testTranslationWithInit(PATTERN_4_BASE_DIRECTORY + "subInterfaceNodesConnectedOut"); } + + //****************** VFC Instance Group Tests *************************** + + @Test + public void testGroupingOneSubInterfaceTypeOneAbstractNode() throws IOException { + testTranslationWithInit(VFC_INSTANCE_GROUP_BASE_DIRECTORY + "oneSubInterfaceNetworkRole"); + } + + @Test + public void testGroupingOneSubInterfaceTypeAndTwoAbstractNodes() throws IOException { + testTranslationWithInit(VFC_INSTANCE_GROUP_BASE_DIRECTORY + "oneSubInterfaceNetworkRoleAndTwoAbstractNodes"); + } + + @Test + public void testGroupingTwoSubInterfaceTypeAndTwoAbstractNodes() throws IOException { + testTranslationWithInit(VFC_INSTANCE_GROUP_BASE_DIRECTORY + "twoSubInterfaceNetworkRoleAndTwoAbstractNodes"); + } } |