diff options
author | Benjamin, Max (mb388a) <mb388a@us.att.com> | 2019-03-14 16:02:18 -0400 |
---|---|---|
committer | Benjamin, Max (mb388a) <mb388a@us.att.com> | 2019-03-14 16:03:06 -0400 |
commit | 0b906b0de95725879fd1cc7ad585d71c502eebd9 (patch) | |
tree | 40a19fd268fe177e806afa69771b61a308046266 /bpmn/MSOCommonBPMN/src/test | |
parent | ff8c5e9f78b46f29c08576393438e902ea6d8cd6 (diff) |
Added vnfc support to BB layer
added vnfc to gbb for execute bb and bb layer
enhance workflow action layer to handle vnfcs
Change-Id: I0d39c3aefe66180ed6f2b75a0c946e07ca603261
Issue-ID: SO-1658
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/BBInputSetupTest.java | 18 |
1 files changed, 12 insertions, 6 deletions
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 4b10d513d6..df9f2259a1 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 @@ -47,7 +47,6 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.ArgumentMatchers; -import org.mockito.ArgumentMatchers; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.Spy; @@ -67,6 +66,7 @@ import org.onap.so.bpmn.servicedecomposition.bbobjects.RouteTableReference; import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance; import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceSubscription; import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule; +import org.onap.so.bpmn.servicedecomposition.bbobjects.Vnfc; import org.onap.so.bpmn.servicedecomposition.bbobjects.VolumeGroup; import org.onap.so.bpmn.servicedecomposition.entities.BuildingBlock; import org.onap.so.bpmn.servicedecomposition.entities.ConfigurationResourceKeys; @@ -85,10 +85,8 @@ import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoVfModule; import org.onap.so.client.aai.AAICommonObjectMapperProvider; import org.onap.so.client.aai.AAIObjectType; import org.onap.so.client.aai.entities.AAIResultWrapper; -import org.onap.so.client.aai.entities.Relationships; import org.onap.so.client.aai.entities.uri.AAIResourceUri; import org.onap.so.client.aai.entities.uri.AAIUriFactory; -import org.onap.so.constants.Defaults; import org.onap.so.db.catalog.beans.CollectionNetworkResourceCustomization; import org.onap.so.db.catalog.beans.CollectionResource; import org.onap.so.db.catalog.beans.CollectionResourceCustomization; @@ -1194,6 +1192,7 @@ public class BBInputSetupTest { configuration.setConfigurationName("configurationName"); serviceInstance.getConfigurations().add(configuration); String resourceId = "configurationId"; + String vnfcName = "vnfcName"; // Mock service Service service = mapper.readValue( new File(RESOURCE_PATH + "CatalogDBService_getServiceInstanceNOAAIInput.json"), Service.class); @@ -1207,9 +1206,12 @@ public class BBInputSetupTest { configResourceKeys.setCvnfcCustomizationUUID("cvnfcCustomizationUUID"); configResourceKeys.setVfModuleCustomizationUUID("vfModuleCustomizationUUID"); configResourceKeys.setVnfResourceCustomizationUUID("vnfResourceCustomizationUUID"); + configResourceKeys.setVnfcName(vnfcName); + Vnfc vnfc = new Vnfc(); + vnfc.setVnfcName(vnfcName); doNothing().when(SPY_bbInputSetup).mapCatalogConfiguration(configuration, modelInfo, service, configResourceKeys); - + doReturn(vnfc).when(SPY_bbInputSetup).getVnfcToConfiguration(vnfcName); SPY_bbInputSetup.populateConfiguration(modelInfo, service, bbName, serviceInstance, lookupKeyMap, resourceId, instanceName, configResourceKeys); verify(SPY_bbInputSetup, times(1)).mapCatalogConfiguration(configuration, modelInfo, service, configResourceKeys); @@ -1264,6 +1266,7 @@ public class BBInputSetupTest { configuration.setConfigurationName("configurationName"); serviceInstance.getConfigurations().add(configuration); String resourceId = "configurationId"; + String vnfcName = "vnfcName"; // Mock service Service service = mapper.readValue( new File(RESOURCE_PATH + "CatalogDBService_getServiceInstanceNOAAIInput.json"), Service.class); @@ -1274,6 +1277,9 @@ public class BBInputSetupTest { configResourceKeys.setCvnfcCustomizationUUID("cvnfcCustomizationUUID"); configResourceKeys.setVfModuleCustomizationUUID("vfModuleCustomizationUUID"); configResourceKeys.setVnfResourceCustomizationUUID("vnfResourceCustomizationUUID"); + configResourceKeys.setVnfcName(vnfcName); + Vnfc vnfc = new Vnfc(); + vnfc.setVnfcName(vnfcName); VnfVfmoduleCvnfcConfigurationCustomization vnfVfmoduleCvnfcConfigurationCustomization = new VnfVfmoduleCvnfcConfigurationCustomization(); ConfigurationResource configurationResource = new ConfigurationResource(); @@ -1282,7 +1288,7 @@ public class BBInputSetupTest { vnfVfmoduleCvnfcConfigurationCustomization.setConfigurationResource(configurationResource); doReturn(null).when(SPY_bbInputSetup).findConfigurationResourceCustomization(modelInfo, service); - doReturn(vnfVfmoduleCvnfcConfigurationCustomization).when(SPY_bbInputSetup).findVnfVfmoduleCvnfcConfigurationCustomization("vfModuleCustomizationUUID","vnfResourceCustomizationUUID","cvnfcCustomizationUUID"); + doReturn(vnfc).when(SPY_bbInputSetup).getVnfcToConfiguration(vnfcName); SPY_bbInputSetup.populateConfiguration(modelInfo, service, bbName, serviceInstance, lookupKeyMap, resourceId, instanceName, configResourceKeys); @@ -2707,4 +2713,4 @@ public class BBInputSetupTest { assertEquals("Lookup Key Map populated with VolumeGroup Id", volumeGroupId, lookupKeyMap.get(ResourceKey.VOLUME_GROUP_ID)); } -}
\ No newline at end of file +} |