1 package org.openecomp.sdc.translator.services.heattotosca.impl.fulltest;
4 import org.openecomp.sdc.translator.services.heattotosca.impl.resourcetranslation.BaseFullTranslationTest;
6 import java.io.IOException;
8 public class UnifiedCompositionNestedPatternsFullTest extends BaseFullTranslationTest {
10 private static final String BASE_DIRECTORY = "/mock/services/heattotosca/fulltest/nestedOtherScenarios/";
13 public void testNestedWithOneLevelMultipleComputesSingleSubstitution() throws IOException {
14 testTranslationWithInit(BASE_DIRECTORY + "oneLevel/nestedSingleSubstitution1B");
18 public void testNestedWithOneLevelMultipleComputesScalingInstance() throws IOException {
19 testTranslationWithInit(BASE_DIRECTORY + "oneLevel/nestedScalingInstance");
23 public void testNestedWithOneLevelMultipleComputesCatalogInstance() throws IOException {
24 testTranslationWithInit(BASE_DIRECTORY + "oneLevel/nestedCatalogInstance");
28 public void testNestedWithOneLevelAllNonNestedPatterns() throws IOException {
29 testTranslationWithInit(BASE_DIRECTORY + "oneLevel/nestedAllNonNestedPatterns");
33 public void testNestedWithOneLevelNoCompute() throws IOException {
34 testTranslationWithInit(BASE_DIRECTORY + "oneLevel/nestedNoCompute");
38 public void testNestedWithOneLevelOtherPatternsNoComputeWithConnectivity() throws IOException {
39 //One nested resource with no Compute, one nested resource having all non nested patterns
40 // with connectivity between themo
41 testTranslationWithInit(BASE_DIRECTORY + "oneLevel/nestedAllPatternsConnectivity");
45 public void testNestedWithOneLevelTwoSameFileOneOtherAllPattern1B() throws IOException {
46 // Heat file with 3 nested resources, while 2 point to the same nested heat file, and all
47 // nested heat file including pattern 1B.
48 testTranslationWithInit(BASE_DIRECTORY + "oneLevel/nestedTwoSameFileOneDiff");
52 public void testNestedWithOneLevelTwoSameFileOneOtherAllPattern1BWithConnectivity() throws
54 // Heat file with 3 nested resources, while 2 point to the same nested heat file, and all
55 // nested heat file including pattern 1B. + conectivity between all nested resources
56 testTranslationWithInit(BASE_DIRECTORY + "oneLevel/nestedTwoSameOneDiffWithConnectivity");
59 //**************** NESTED MULTI-LEVEL TESTS ******************************
62 public void testNestedMultiLevelPortSecurityGroupNetworkPattern1B() throws
64 // heat file - 1 nested resource + security group which will be connected to port in ALL
65 // nested levels, network which will be connected from port in ALL nested level.
66 //nested heat level 1 - 1 nested resource + pattern 1B
67 //nested heat level 2 - 1 nested resource + pattern 1B
68 testTranslationWithInit(BASE_DIRECTORY + "multiLevel/portSecurityGroupNetPattern1B");
72 public void testNestedMultiLevelAllPatternsDependsOnConnectivity() throws
75 HEAT FILE - 1 : nested resource to heat without nova in the nested heat + 1 nested
76 resource + pattern 1B + pattern C1 + pattern 4 + connectivity between them all (using
77 depends on from/to the first nested resource, without nova)
79 NESTED HEAT LEVEL 1 - 1 nested resource + pattern 1B + pattern C1 + pattern 4 +
80 connectivity between them all (VM Types same as Main)
82 NESTED HEAT LEVEL 2 - 1 nested resource + pattern 1B + pattern C1 + pattern 4 +
83 connectivity between them all
86 testTranslationWithInit(BASE_DIRECTORY + "multiLevel/allPatternsDependsOnConnectivity");
90 public void testThreeNestedLevelsDiffVmTypePattern1B() throws IOException {
91 testTranslationWithInit(BASE_DIRECTORY + "multiLevel/threeNestedLevelsDiffVmTypePattern1B");
95 public void testThreeNestedLevelsSameVmTypePattern1B() throws IOException {
96 testTranslationWithInit(BASE_DIRECTORY + "multiLevel/threeNestedLevelsSameVmTypePattern1B");
100 public void testTwoNestedLevelsWithAllPatternsAndConnectionsBetweenThem() throws IOException {
101 testTranslationWithInit(BASE_DIRECTORY + "multiLevel/twoNestedLevelsWithAllPatternsAndConnectivities");