1 package org.openecomp.sdc.translator.services.heattotosca.impl.fulltest;
3 import org.junit.Before;
5 import org.openecomp.sdc.translator.services.heattotosca.impl.resourcetranslation.BaseFullTranslationTest;
8 import java.io.IOException;
10 public class UnifiedCompositionScalingInstancesFullTest extends BaseFullTranslationTest {
14 public void setUp() throws IOException {
15 // do not delete this function. it prevents the superclass setup from running
19 public void testComputesSameTypeWithOnePortEach() throws IOException {
20 //1. Scenario #1 - Compute type 1 – 2 nova, each one with 1 port
22 "/mock/services/heattotosca/fulltest/scalingInstances/oneComputeTypeOnePort/in";
24 "/mock/services/heattotosca/fulltest/scalingInstances/oneComputeTypeOnePort/out";
26 testTranslationWithInit();
30 public void testComputesTypesTwoComputesEachWithOnePort() throws IOException {
31 //2. Scenario #2 - 2 compute types, each type has 2 computes with one port per compute
33 "/mock/services/heattotosca/fulltest/scalingInstances/twoComputeTypesOnePort/in";
35 "/mock/services/heattotosca/fulltest/scalingInstances/twoComputeTypesOnePort/out";
37 testTranslationWithInit();
41 public void testComputesTypesTwoComputesEachWithOnePortWithGetAttr() throws IOException {
42 //3. Scenario #2 + between the 2 nova which has diff types there is getAttr
44 "/mock/services/heattotosca/fulltest/scalingInstances/twoComputeTypesOnePortWithGetAttr/in";
46 "/mock/services/heattotosca/fulltest/scalingInstances/twoComputeTypesOnePortWithGetAttr/out";
48 testTranslationWithInit();
52 public void testComputesSameTypeWithOnePortOneGroupEach() throws IOException {
53 //4. Scenario #1 + group – NovaServerGroup, connected to both nova
55 "/mock/services/heattotosca/fulltest/scalingInstances/oneComputeTypeOnePortOneGroup/in";
57 "/mock/services/heattotosca/fulltest/scalingInstances/oneComputeTypeOnePortOneGroup/out";
59 testTranslationWithInit();
63 public void testComputesSameTypeWithOnePortEachAndNodesConnectedIn() throws IOException {
64 //5. Scenario #1 + node connected In – security Rule point to both port + “resource” with
65 // dependency (depends_on) to both computes
67 "/mock/services/heattotosca/fulltest/scalingInstances" +
68 "/oneComputeTypeOnePortNodeConnectedIn/in";
70 "/mock/services/heattotosca/fulltest/scalingInstances" +
71 "/oneComputeTypeOnePortNodeConnectedIn/out";
73 testTranslationWithInit();
77 public void testComputesSameTypeWithOnePortEachAndNodesConnectedOut() throws IOException {
78 //6. Scenario#1 + node connected Out – both port connected to same network + each compute
79 // connected to same volume
81 "/mock/services/heattotosca/fulltest/scalingInstances" +
82 "/oneComputeTypeOnePortNodeConnectedOut/in";
84 "/mock/services/heattotosca/fulltest/scalingInstances" +
85 "/oneComputeTypeOnePortNodeConnectedOut/out";
87 testTranslationWithInit();
91 public void testComputesSameTypeWithOnePortEachAndGetAttrIn() throws IOException {
93 7. Scenario#1 + node get attr in – network which include
94 a. Property with getAttr from Compute1
95 b. Property with getAttr from Compute2
96 c. Property with getAttr from port
100 "/mock/services/heattotosca/fulltest/scalingInstances" +
101 "/oneComputeTypeOnePortGetAttrIn/in";
103 "/mock/services/heattotosca/fulltest/scalingInstances" +
104 "/oneComputeTypeOnePortGetAttrIn/out";
106 testTranslationWithInit();
110 public void testComputesSameTypeWithOnePortEachAndGetAttrOut() throws IOException {
112 8. Scenario#1 + node get attr out + network
113 a. Compute1 with property1, that include getAttr from network
114 b. Compute2 with property2, that include getAttr from network
115 c. Port with property, that include getAttr from network
119 "/mock/services/heattotosca/fulltest/scalingInstances" +
120 "/oneComputeTypeOnePortGetAttrOut/in";
122 "/mock/services/heattotosca/fulltest/scalingInstances" +
123 "/oneComputeTypeOnePortGetAttrOut/out";
125 testTranslationWithInit();
130 public void testComputesSameTypeWithOnePortEachAndOutputParamGetAttrIn() throws IOException {
132 9. Scenario#1 + output parameter get attr in – 3 output parameters
133 a. Output param with getAttr from Compute1
134 b. Output param with getAttr from Compute2
135 c. Output param with getAttr from Port
139 "/mock/services/heattotosca/fulltest/scalingInstances" +
140 "/oneComputeTypeOnePortOutputParamGetAttrIn/in";
142 "/mock/services/heattotosca/fulltest/scalingInstances" +
143 "/oneComputeTypeOnePortOutputParamGetAttrIn/out";
145 testTranslationWithInit();
149 public void testComputesSameTypeWithOnePortEachAndGetAttrOutBetweenConsolidationEntities() throws
152 10. Scenario#1 + node get attr out
153 a. Compute1 with property1, that include getAttr from port1
154 b. Compute2 with property2, that include getAttr from port2
155 c. Port1 with property, that include getAttr from compute1
156 d. Port2 with property, that include getAttr from compute2
160 "/mock/services/heattotosca/fulltest/scalingInstances" +
161 "/oneComputeTypeOnePortGetAttrOutComputePort/in";
163 "/mock/services/heattotosca/fulltest/scalingInstances" +
164 "/oneComputeTypeOnePortGetAttrOutComputePort/out";
166 testTranslationWithInit();