blob: eeaf7586349130020a23cb12f7ccb5433859b42c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
package org.openecomp.sdc.translator.services.heattotosca.impl.fulltest;
import org.junit.Test;
import org.openecomp.sdc.translator.services.heattotosca.impl.resourcetranslation.BaseFullTranslationTest;
import java.io.IOException;
public class UnifiedCompositionNestedPatternsFullTest extends BaseFullTranslationTest {
private static final String BASE_DIRECTORY = "/mock/services/heattotosca/fulltest/nestedOtherScenarios/";
@Test
public void testNestedWithOneLevelMultipleComputesSingleSubstitution() throws IOException {
testTranslationWithInit(BASE_DIRECTORY + "oneLevel/nestedSingleSubstitution1B");
}
@Test
public void testNestedWithOneLevelMultipleComputesScalingInstance() throws IOException {
testTranslationWithInit(BASE_DIRECTORY + "oneLevel/nestedScalingInstance");
}
@Test
public void testNestedWithOneLevelMultipleComputesCatalogInstance() throws IOException {
testTranslationWithInit(BASE_DIRECTORY + "oneLevel/nestedCatalogInstance");
}
@Test
public void testNestedWithOneLevelAllNonNestedPatterns() throws IOException {
testTranslationWithInit(BASE_DIRECTORY + "oneLevel/nestedAllNonNestedPatterns");
}
@Test
public void testNestedWithOneLevelNoCompute() throws IOException {
testTranslationWithInit(BASE_DIRECTORY + "oneLevel/nestedNoCompute");
}
@Test
public void testNestedWithOneLevelOtherPatternsNoComputeWithConnectivity() throws IOException {
//One nested resource with no Compute, one nested resource having all non nested patterns
// with connectivity between themo
testTranslationWithInit(BASE_DIRECTORY + "oneLevel/nestedAllPatternsConnectivity");
}
@Test
public void testNestedWithOneLevelTwoSameFileOneOtherAllPattern1B() throws IOException {
// Heat file with 3 nested resources, while 2 point to the same nested heat file, and all
// nested heat file including pattern 1B.
testTranslationWithInit(BASE_DIRECTORY + "oneLevel/nestedTwoSameFileOneDiff");
}
@Test
public void testNestedWithOneLevelTwoSameFileOneOtherAllPattern1BWithConnectivity() throws
IOException {
// Heat file with 3 nested resources, while 2 point to the same nested heat file, and all
// nested heat file including pattern 1B. + conectivity between all nested resources
testTranslationWithInit(BASE_DIRECTORY + "oneLevel/nestedTwoSameOneDiffWithConnectivity");
}
//**************** NESTED MULTI-LEVEL TESTS ******************************
@Test
public void testNestedMultiLevelPortSecurityGroupNetworkPattern1B() throws
IOException {
// heat file - 1 nested resource + security group which will be connected to port in ALL
// nested levels, network which will be connected from port in ALL nested level.
//nested heat level 1 - 1 nested resource + pattern 1B
//nested heat level 2 - 1 nested resource + pattern 1B
testTranslationWithInit(BASE_DIRECTORY + "multiLevel/portSecurityGroupNetPattern1B");
}
@Test
public void testNestedMultiLevelAllPatternsDependsOnConnectivity() throws
IOException {
/*
HEAT FILE - 1 : nested resource to heat without nova in the nested heat + 1 nested
resource + pattern 1B + pattern C1 + pattern 4 + connectivity between them all (using
depends on from/to the first nested resource, without nova)
NESTED HEAT LEVEL 1 - 1 nested resource + pattern 1B + pattern C1 + pattern 4 +
connectivity between them all (VM Types same as Main)
NESTED HEAT LEVEL 2 - 1 nested resource + pattern 1B + pattern C1 + pattern 4 +
connectivity between them all
*/
testTranslationWithInit(BASE_DIRECTORY + "multiLevel/allPatternsDependsOnConnectivity");
}
@Test
public void testThreeNestedLevelsDiffVmTypePattern1B() throws IOException {
testTranslationWithInit(BASE_DIRECTORY + "multiLevel/threeNestedLevelsDiffVmTypePattern1B");
}
@Test
public void testThreeNestedLevelsSameVmTypePattern1B() throws IOException {
testTranslationWithInit(BASE_DIRECTORY + "multiLevel/threeNestedLevelsSameVmTypePattern1B");
}
@Test
public void testTwoNestedLevelsWithAllPatternsAndConnectionsBetweenThem() throws IOException {
testTranslationWithInit(BASE_DIRECTORY + "multiLevel/twoNestedLevelsWithAllPatternsAndConnectivities");
}
}
|