aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/test
diff options
context:
space:
mode:
authorBenjamin, Max (mb388a) <mb388a@us.att.com>2019-04-02 22:54:57 -0400
committerBenjamin, Max (mb388a) <mb388a@us.att.com>2019-04-02 22:54:57 -0400
commit86f04e1d55b54a1a23bb274d211c6fca85980fef (patch)
treee8fb0a8c1d5e64761068df56faa8a8e509fa2f48 /bpmn/MSOCommonBPMN/src/test
parentd59fc0ad5db7b7cacf5996f86db34f41090061fa (diff)
fix catalogdb cvfnc customization
Hibernate entities were all wrong and needed a complete rewrite. The scope kept growing and ended up touching a lot more of the code than originally planned. These changes make the db interactions much easier and more straightforward from java. The flyway script order had to change to make this migration possible. Change-Id: I6ce363a385661300eddb11923ac6a80538edaddc Issue-ID: SO-1710 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/test')
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java7
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java11
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/VnfcInstanceGroupCustomization.json3
3 files changed, 11 insertions, 10 deletions
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java
index ff592f5603..9ac148f5bd 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java
@@ -69,6 +69,7 @@ import org.onap.so.db.catalog.beans.CollectionResourceCustomization;
import org.onap.so.db.catalog.beans.CollectionResourceInstanceGroupCustomization;
import org.onap.so.db.catalog.beans.ConfigurationResource;
import org.onap.so.db.catalog.beans.ConfigurationResourceCustomization;
+import org.onap.so.db.catalog.beans.CvnfcConfigurationCustomization;
import org.onap.so.db.catalog.beans.CvnfcCustomization;
import org.onap.so.db.catalog.beans.InstanceGroup;
import org.onap.so.db.catalog.beans.NetworkResourceCustomization;
@@ -76,7 +77,7 @@ import org.onap.so.db.catalog.beans.OrchestrationStatus;
import org.onap.so.db.catalog.beans.Service;
import org.onap.so.db.catalog.beans.VfModuleCustomization;
import org.onap.so.db.catalog.beans.VnfResourceCustomization;
-import org.onap.so.db.catalog.beans.VnfVfmoduleCvnfcConfigurationCustomization;
+import org.onap.so.db.catalog.beans.CvnfcConfigurationCustomization;
import org.onap.so.db.catalog.beans.VnfcCustomization;
import org.onap.so.serviceinstancebeans.CloudConfiguration;
import org.onap.so.serviceinstancebeans.RequestDetails;
@@ -648,7 +649,7 @@ public class BBInputSetupMapperLayerTest {
configurationResourceCustomization.setConfigurationResource(new ConfigurationResource());
configurationResourceCustomization.getConfigurationResource().setModelInvariantUUID(modelInvariantUUID);
configurationResourceCustomization.getConfigurationResource().setModelUUID(modelVersionUUID);
- VnfVfmoduleCvnfcConfigurationCustomization policyNameTable = new VnfVfmoduleCvnfcConfigurationCustomization();
+ CvnfcConfigurationCustomization policyNameTable = new CvnfcConfigurationCustomization();
policyNameTable.setCvnfcCustomization(new CvnfcCustomization());
policyNameTable.getCvnfcCustomization().setVnfcCustomization(new VnfcCustomization());
policyNameTable.setPolicyName(policyName);
@@ -670,7 +671,7 @@ public class BBInputSetupMapperLayerTest {
expected.setModelVersionId(modelVersionUUID);
expected.setPolicyName(policyName);
- VnfVfmoduleCvnfcConfigurationCustomization fabricCustomization = new VnfVfmoduleCvnfcConfigurationCustomization();
+ CvnfcConfigurationCustomization fabricCustomization = new CvnfcConfigurationCustomization();
fabricCustomization.setCvnfcCustomization(new CvnfcCustomization());
fabricCustomization.getCvnfcCustomization().setVnfcCustomization(new VnfcCustomization());
fabricCustomization.setPolicyName(policyName);
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java
index eb26bf34ee..8d0b2f60e1 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java
@@ -103,7 +103,7 @@ import org.onap.so.db.catalog.beans.OrchestrationStatus;
import org.onap.so.db.catalog.beans.Service;
import org.onap.so.db.catalog.beans.VfModuleCustomization;
import org.onap.so.db.catalog.beans.VnfResourceCustomization;
-import org.onap.so.db.catalog.beans.VnfVfmoduleCvnfcConfigurationCustomization;
+import org.onap.so.db.catalog.beans.CvnfcConfigurationCustomization;
import org.onap.so.db.catalog.beans.VnfcInstanceGroupCustomization;
import org.onap.so.db.request.beans.InfraActiveRequests;
import org.onap.so.serviceinstancebeans.CloudConfiguration;
@@ -1284,7 +1284,7 @@ public class BBInputSetupTest {
Vnfc vnfc = new Vnfc();
vnfc.setVnfcName(vnfcName);
- VnfVfmoduleCvnfcConfigurationCustomization vnfVfmoduleCvnfcConfigurationCustomization = new VnfVfmoduleCvnfcConfigurationCustomization();
+ CvnfcConfigurationCustomization vnfVfmoduleCvnfcConfigurationCustomization = new CvnfcConfigurationCustomization();
ConfigurationResource configurationResource = new ConfigurationResource();
configurationResource.setModelUUID("modelUUID");
configurationResource.setModelInvariantUUID("modelInvariantUUID");
@@ -1370,14 +1370,15 @@ public class BBInputSetupTest {
GenericVnf genericVnf = new GenericVnf();
ModelInfo modelInfo = Mockito.mock(ModelInfo.class);
Service service = Mockito.mock(Service.class);
+ org.onap.so.db.catalog.beans.InstanceGroup instanceGroup = new org.onap.so.db.catalog.beans.InstanceGroup();
+ instanceGroup.setModelUUID("modelUUID");
List<VnfcInstanceGroupCustomization> vnfcInstanceGroups = new ArrayList<>();
VnfcInstanceGroupCustomization vnfcInstanceGroupCust = new VnfcInstanceGroupCustomization();
- vnfcInstanceGroupCust.setModelUUID("modelUUID");
+ vnfcInstanceGroupCust.setInstanceGroup(instanceGroup);
vnfcInstanceGroupCust.setFunction("function");
vnfcInstanceGroupCust.setDescription("description");
vnfcInstanceGroups.add(vnfcInstanceGroupCust);
- org.onap.so.db.catalog.beans.InstanceGroup instanceGroup = new org.onap.so.db.catalog.beans.InstanceGroup();
- instanceGroup.setModelUUID("modelUUID");
+
ModelInfoInstanceGroup modelInfoInstanceGroup = new ModelInfoInstanceGroup();
modelInfoInstanceGroup.setModelUUID("modelUUID");
doReturn(vnfResourceCust).when(SPY_bbInputSetup).getVnfResourceCustomizationFromService(modelInfo, service);
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/VnfcInstanceGroupCustomization.json b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/VnfcInstanceGroupCustomization.json
index 457b23f841..206403d83a 100644
--- a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/VnfcInstanceGroupCustomization.json
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/VnfcInstanceGroupCustomization.json
@@ -1,6 +1,5 @@
{
- "modelCustomizationUUID" : "modelCustomizationUUID",
- "modelUUID" : "modelUUID",
+ "id":1,
"vnfResourceCust" : {},
"instanceGroup" : {},
"function" : "function",