74eacd948108ade8a0ffdcddb7d5f56d10e4c1be
[sdc.git] /
1 package org.openecomp.sdc.translator.services.heattotosca.impl.fulltest;
2
3 import org.junit.Test;
4 import org.openecomp.sdc.translator.services.heattotosca.impl.resourcetranslation.BaseFullTranslationTest;
5
6 import java.io.IOException;
7
8 public class UnifiedCompositionScalingInstancesFullTest extends BaseFullTranslationTest {
9
10   private static final String BASE_DIRECTORY = "/mock/services/heattotosca/fulltest/scalingInstances/";
11
12   @Test
13   public void testComputesSameTypeWithOnePortEach() throws IOException {
14     //1. Scenario #1 - Compute type 1 – 2 nova, each one with 1 port
15     testTranslationWithInit(BASE_DIRECTORY + "oneComputeTypeOnePort");
16   }
17
18   @Test
19   public void testComputesTypesTwoComputesEachWithOnePort() throws IOException {
20     //2. Scenario #2 - 2 compute types, each type has 2 computes with one port per compute
21     testTranslationWithInit(BASE_DIRECTORY + "twoComputeTypesOnePort");
22   }
23
24   @Test
25   public void testComputesTypesTwoComputesEachWithOnePortWithGetAttr() throws IOException {
26     //3.        Scenario #2 + between the 2 nova which has diff types there is getAttr
27     testTranslationWithInit(BASE_DIRECTORY + "twoComputeTypesOnePortWithGetAttr");
28   }
29
30   @Test
31   public void testComputesSameTypeWithOnePortOneGroupEach() throws IOException {
32     //4.        Scenario #1 + group – NovaServerGroup, connected to both nova
33     testTranslationWithInit(BASE_DIRECTORY + "oneComputeTypeOnePortOneGroup");
34   }
35
36   @Test
37   public void testComputesSameTypeWithOnePortEachAndNodesConnectedIn() throws IOException {
38     //5.        Scenario #1 + node connected In – security Rule point to both port + “resource” with
39     // dependency (depends_on) to both computes
40     testTranslationWithInit(BASE_DIRECTORY + "oneComputeTypeOnePortNodeConnectedIn");
41   }
42
43   @Test
44   public void testComputesSameTypeWithOnePortEachAndNodesConnectedOut() throws IOException {
45     //6.        Scenario#1  + node connected Out – both port connected to same network + each compute
46     // connected to same volume
47     testTranslationWithInit(BASE_DIRECTORY + "oneComputeTypeOnePortNodeConnectedOut");
48   }
49
50   @Test
51   public void testComputesSameTypeWithOnePortEachAndGetAttrIn() throws IOException {
52     /*
53       7.        Scenario#1 + node get attr in – network which include
54         a.      Property with getAttr from Compute1
55         b.      Property with getAttr from Compute2
56         c.      Property with getAttr from port
57     */
58     testTranslationWithInit(BASE_DIRECTORY + "oneComputeTypeOnePortGetAttrIn");
59   }
60
61   @Test
62   public void testComputesSameTypeWithOnePortEachAndGetAttrOut() throws IOException {
63     /*
64       8. Scenario#1 + node get attr out + network
65         a.      Compute1 with property1, that include getAttr from network
66         b.      Compute2 with property2, that include getAttr from network
67         c.      Port with property, that include getAttr from network
68     */
69     testTranslationWithInit(BASE_DIRECTORY + "oneComputeTypeOnePortGetAttrOut");
70   }
71
72
73   @Test
74   public void testComputesSameTypeWithOnePortEachAndOutputParamGetAttrIn() throws IOException {
75     /*
76       9.        Scenario#1 + output parameter get attr in –  3 output parameters
77         a.      Output param with getAttr from Compute1
78         b.      Output param with getAttr from Compute2
79         c.      Output param with getAttr from Port
80     */
81     testTranslationWithInit(BASE_DIRECTORY + "oneComputeTypeOnePortOutputParamGetAttrIn");
82   }
83
84   @Test
85   public void testComputesSameTypeWithOnePortEachAndGetAttrOutBetweenConsolidationEntities() throws
86       IOException {
87     /*
88       10. Scenario#1 + node get attr out
89         a.      Compute1 with property1, that include getAttr from port1
90         b.      Compute2 with property2, that include getAttr from port2
91         c.      Port1 with property, that include getAttr from compute1
92         d.      Port2 with property, that include getAttr from compute2
93     */
94     testTranslationWithInit(BASE_DIRECTORY + "oneComputeTypeOnePortGetAttrOutComputePort");
95   }
96
97 }