summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/fulltest/UnifiedCompositionSubInterfaceFullTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/fulltest/UnifiedCompositionSubInterfaceFullTest.java')
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/fulltest/UnifiedCompositionSubInterfaceFullTest.java100
1 files changed, 100 insertions, 0 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 860df69927..d27eb20242 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,6 +29,8 @@ 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/";
@@ -246,6 +248,104 @@ public class UnifiedCompositionSubInterfaceFullTest extends BaseFullTranslationT
testTranslationWithInit(PATTERN_1C1_BASE_DIRECTORY + "allConnectivities");
}
+ //Pattern5 Test Cases
+ @Test
+ public void testBaseScenarioPattern5() throws IOException {
+ /**
+ * Base heat has only nested component and nested heat has reference to subinterface and
+ * two VFCs of different type
+ * 1. Each server connected with two port
+ * 2. One Port of each server connected to network
+ * 3. Only one port out of four is having sub interface connectivity
+ * 4. Sub-interface connected to different network then port
+ */
+ testTranslationWithInit(PATTERN_5_BASE_DIRECTORY + "baseScenario");
+ }
+
+ @Test
+ public void testComplexVFCScalingScenarioPattern5() throws IOException {
+ /**
+ * 1. Base heat has only nested component and nested has reference to subinterface and
+ * two VFCs of same type
+ * 1. Each server connected with two port
+ * 2. One Port of each server connected to network
+ * 3. Only one port out of four is having sub interface
+ * 4. Sub-interface connected to different network then port
+ */
+ testTranslationWithInit(PATTERN_5_BASE_DIRECTORY + "complexVFCScalingScenario");
+ }
+
+ @Test
+ public void testComplexVFCMultiLevelNestedScenarioPattern5() throws IOException {
+ /**
+ * 1. First level nested is having one VFC and one Port with Sub interface
+ * 2. Second level nested is having one VFC and one Port with Sub interface which are of same
+ * type as parent heat file
+ */
+ testTranslationWithInit(PATTERN_5_BASE_DIRECTORY + "complexVFCMultiLevelNestedScenario");
+ }
+
+ @Test
+ public void testComplexVFCMultiLevelNestedDiffComputeScenarioPattern5() throws
+ IOException {
+ /**
+ * 1. First level nested is having one VFC and one Port with Sub interface
+ * 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");
+ }
+
+ @Test
+ public void testComplexVFCMultiComputeInAllHeatPattern5() throws
+ IOException {
+ /**
+ * 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");
+ }
+
+ @Test
+ public void testComplexVFCMultiLevelNestedMultiComputeScenarioPattern5() throws
+ IOException {
+ /**
+ * 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");
+ }
+
+ @Test
+ public void testComplexVFCWithDiffSubInfConnectivityScenarioPattern5()
+ throws
+ IOException {
+ /*
+ * 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 one Port with only one port
+ * connected to Sub interface
+ */
+ testTranslationWithInit(PATTERN_5_BASE_DIRECTORY +
+ "complexVFCWithDiffSubInfConnectivityScenario");
+ }
+
+ //Catalog instance will start working with 1C2 changes in place
+ @Test
+ public void testComplexVFCWithDiffSubInfCountScenarioPattern5()
+ throws
+ IOException {
+ /*
+ * 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 connected to Sub interface but
+ * having different count
+ */
+ testTranslationWithInit(PATTERN_5_BASE_DIRECTORY +
+ "complexVFCWithDiffSubInfCountScenario");
+ }
+
//Pattern 4 Test Cases
@Test
public void testSubInterfaceComputePortNetworkPattern4() throws IOException {