aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-tasks/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/so-bpmn-tasks/src/test')
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterCreateTasksTest.java44
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java23
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/aai/mapper/AAIObjectMapperTest.java8
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapperTest.java2
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapperPayloadTest.java (renamed from bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapperIntegrationTest.java)403
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/VnfAdapterVfModuleResourcesTest.java27
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVfModuleTopology.json178
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVfModuleTopologyWithCloudResources.json179
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopology.json48
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologySubnetDhcpDisabled.json48
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologySubnetMultipleDhcp.json68
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologyWithCloudResources.json47
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologyWithSingletonArray.json44
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleAddonRequest.json69
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequest.json (renamed from bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/vnfAdapterCreateVfModuleRequest.json)3
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestDhcpDisabled.json (renamed from bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/vnfAdapterCreateVfModuleRequestDhcpDisabled.json)1
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestMultipleDhcp.json (renamed from bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/vnfAdapterCreateVfModuleRequestMultipleDhcp.json)1
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestNoUserParams.json67
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestWithCloudResources.json (renamed from bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/vnfAdapterCreateVfModuleRequestWithCloudResources.json)1
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestWithSingleAvailabilityZone.json65
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleWithVolumeGroupRequest.json69
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterDeleteVfModuleRequest.json (renamed from bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/vnfAdapterDeleteVfModuleRequest.json)0
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVfModuleTopology.json241
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVfModuleTopologyWithCloudResources.json243
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVnfTopology.json68
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVnfTopologySubnetDhcpDisabled.json68
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVnfTopologySubnetMultipleDhcp.json88
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVnfTopologyWithCloudResources.json69
28 files changed, 1308 insertions, 864 deletions
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterCreateTasksTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterCreateTasksTest.java
index f54e3faf1d..698ebb33f2 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterCreateTasksTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterCreateTasksTest.java
@@ -138,12 +138,52 @@ public class VnfAdapterCreateTasksTest extends BaseTaskTest{
execution.setVariable("SDNCQueryResponse_" + genericVnf.getVnfId(), sdncVnfQueryResponse);
doReturn(createVfModuleRequest).when(vnfAdapterVfModuleResources).createVfModuleRequest(requestContext, cloudRegion, orchestrationContext, serviceInstance,
- genericVnf, vfModule, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
+ genericVnf, vfModule, null, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
vnfAdapterCreateTasks.createVfModule(execution);
verify(vnfAdapterVfModuleResources, times(1)).createVfModuleRequest(requestContext, cloudRegion, orchestrationContext, serviceInstance,
- genericVnf, vfModule, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
+ genericVnf, vfModule, null, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
+
+ assertEquals(execution.getVariable("VNFREST_Request"), createVfModuleRequest.toXmlString());
+ }
+
+ @Test
+ public void test_createVfModuleWithVolumeGroup() throws Exception {
+ RequestContext requestContext = setRequestContext();
+
+ ServiceInstance serviceInstance = setServiceInstance();
+
+ GenericVnf genericVnf = setGenericVnf();
+
+ VfModule vfModule = setVfModule();
+
+ VolumeGroup volumeGroup = setVolumeGroup();
+
+ CloudRegion cloudRegion = setCloudRegion();
+
+ OrchestrationContext orchestrationContext = setOrchestrationContext();
+ orchestrationContext.setIsRollbackEnabled(true);
+
+ CreateVfModuleRequest modRequest = new CreateVfModuleRequest();
+ modRequest.setVfModuleId(vfModule.getVfModuleId());
+ modRequest.setBaseVfModuleStackId("baseVfModuleStackId");
+ modRequest.setVfModuleName(vfModule.getVfModuleName());
+ CreateVfModuleRequest createVfModuleRequest = modRequest;
+
+ String sdncVfModuleQueryResponse = "{someJson}";
+ execution.setVariable("SDNCQueryResponse_" + vfModule.getVfModuleId(), sdncVfModuleQueryResponse);
+
+ String sdncVnfQueryResponse = "{someJson}";
+ execution.setVariable("SDNCQueryResponse_" + genericVnf.getVnfId(), sdncVnfQueryResponse);
+
+ doReturn(createVfModuleRequest).when(vnfAdapterVfModuleResources).createVfModuleRequest(requestContext, cloudRegion, orchestrationContext, serviceInstance,
+ genericVnf, vfModule, volumeGroup, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
+
+ vnfAdapterCreateTasks.createVfModule(execution);
+
+ verify(vnfAdapterVfModuleResources, times(1)).createVfModuleRequest(requestContext, cloudRegion, orchestrationContext, serviceInstance,
+ genericVnf, vfModule, volumeGroup, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
assertEquals(execution.getVariable("VNFREST_Request"), createVfModuleRequest.toXmlString());
}
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java
index c910ad19fa..283f8881c7 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java
@@ -600,12 +600,15 @@ public class WorkflowActionTest extends BaseTaskTest {
instanceGroup.setCollectionNetworkResourceCustomizations(new ArrayList<>());
CollectionNetworkResourceCustomization collectionNetworkResourceCust = new CollectionNetworkResourceCustomization();
collectionNetworkResourceCust.setModelCustomizationUUID("123");
+ collectionNetworkResourceCust.setNetworkResourceCustomization(collectionResourceCustomization);
instanceGroup.getCollectionNetworkResourceCustomizations().add(collectionNetworkResourceCust );
List<CollectionResourceInstanceGroupCustomization> collectionInstanceGroupCustomizations = new ArrayList<>();
CollectionResourceInstanceGroupCustomization collectionInstanceGroupCustomization = new CollectionResourceInstanceGroupCustomization();
+ collectionInstanceGroupCustomization.setModelCustomizationUUID("123");
collectionInstanceGroupCustomization.setSubInterfaceNetworkQuantity(3);
collectionInstanceGroupCustomizations.add(collectionInstanceGroupCustomization);
collectionInstanceGroupCustomization.setInstanceGroup(instanceGroup);
+ collectionInstanceGroupCustomization.setCollectionResourceCust(collectionResourceCustomization);
instanceGroup.setCollectionInstanceGroupCustomizations(collectionInstanceGroupCustomizations);
collectionResource.setInstanceGroup(instanceGroup);
collectionResourceCustomization.setCollectionResource(collectionResource);;
@@ -618,14 +621,32 @@ public class WorkflowActionTest extends BaseTaskTest {
assertEquals(ebbs.get(0).getBuildingBlock().getBpmnFlowName(),"AssignServiceInstanceBB");
assertEquals(ebbs.get(1).getBuildingBlock().getBpmnFlowName(),"CreateNetworkCollectionBB");
assertEquals(ebbs.get(2).getBuildingBlock().getBpmnFlowName(),"AssignNetworkBB");
+ assertEquals("Network id not empty", !ebbs.get(2).getWorkflowResourceIds().getNetworkId().isEmpty(), true);
assertEquals(ebbs.get(3).getBuildingBlock().getBpmnFlowName(),"CreateNetworkBB");
+ assertEquals("Network id not empty", !ebbs.get(3).getWorkflowResourceIds().getNetworkId().isEmpty(), true);
assertEquals(ebbs.get(4).getBuildingBlock().getBpmnFlowName(),"ActivateNetworkBB");
+ assertEquals("Network id not empty", !ebbs.get(4).getWorkflowResourceIds().getNetworkId().isEmpty(), true);
+ assertEquals("Network id same for AssignNetworkBB CreateNetworkBB ActivateNetworkBB",
+ ebbs.get(2).getWorkflowResourceIds().getNetworkId() == ebbs.get(3).getWorkflowResourceIds().getNetworkId()
+ && ebbs.get(3).getWorkflowResourceIds().getNetworkId() == ebbs.get(4).getWorkflowResourceIds().getNetworkId(), true);
assertEquals(ebbs.get(5).getBuildingBlock().getBpmnFlowName(),"AssignNetworkBB");
+ assertEquals("Network id not empty", !ebbs.get(5).getWorkflowResourceIds().getNetworkId().isEmpty(), true);
assertEquals(ebbs.get(6).getBuildingBlock().getBpmnFlowName(),"CreateNetworkBB");
+ assertEquals("Network id not empty", !ebbs.get(6).getWorkflowResourceIds().getNetworkId().isEmpty(), true);
assertEquals(ebbs.get(7).getBuildingBlock().getBpmnFlowName(),"ActivateNetworkBB");
+ assertEquals("Network id not empty", !ebbs.get(7).getWorkflowResourceIds().getNetworkId().isEmpty(), true);
+ assertEquals("Network id same for AssignNetworkBB CreateNetworkBB ActivateNetworkBB",
+ ebbs.get(5).getWorkflowResourceIds().getNetworkId() == ebbs.get(6).getWorkflowResourceIds().getNetworkId()
+ && ebbs.get(6).getWorkflowResourceIds().getNetworkId() == ebbs.get(7).getWorkflowResourceIds().getNetworkId(), true);
assertEquals(ebbs.get(8).getBuildingBlock().getBpmnFlowName(),"AssignNetworkBB");
+ assertEquals("Network id not empty", !ebbs.get(8).getWorkflowResourceIds().getNetworkId().isEmpty(), true);
assertEquals(ebbs.get(9).getBuildingBlock().getBpmnFlowName(),"CreateNetworkBB");
+ assertEquals("Network id not empty", !ebbs.get(9).getWorkflowResourceIds().getNetworkId().isEmpty(), true);
assertEquals(ebbs.get(10).getBuildingBlock().getBpmnFlowName(),"ActivateNetworkBB");
+ assertEquals("Network id not empty", !ebbs.get(10).getWorkflowResourceIds().getNetworkId().isEmpty(), true);
+ assertEquals("Network id same for AssignNetworkBB CreateNetworkBB ActivateNetworkBB",
+ ebbs.get(8).getWorkflowResourceIds().getNetworkId() == ebbs.get(9).getWorkflowResourceIds().getNetworkId()
+ && ebbs.get(9).getWorkflowResourceIds().getNetworkId() == ebbs.get(10).getWorkflowResourceIds().getNetworkId(), true);
assertEquals(ebbs.get(11).getBuildingBlock().getBpmnFlowName(),"ActivateNetworkCollectionBB");
assertEquals(ebbs.get(12).getBuildingBlock().getBpmnFlowName(),"ActivateServiceInstanceBB");
}
@@ -1423,7 +1444,7 @@ public class WorkflowActionTest extends BaseTaskTest {
workflowResourceIds.setVnfId("id444");
when(bbSetupUtils.getAAIGenericVnf("id444")).thenReturn(vnf);
- when(bbSetupUtils.getRelatedVolumeGroupByNameFromVfModule("id123","111111")).thenReturn(opVolumeGroup);
+ when(bbSetupUtils.getRelatedVolumeGroupByNameFromVfModule("id123", "id123","111111")).thenReturn(opVolumeGroup);
when(bbSetupUtils.getRelatedVolumeGroupByNameFromVnf("id444","111111")).thenReturn(Optional.empty());
id2 = workflowAction.validateResourceIdInAAI("generatedId123", WorkflowType.VOLUMEGROUP, "111111", reqDetails, workflowResourceIds);
assertEquals("id123",id2);
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/aai/mapper/AAIObjectMapperTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/aai/mapper/AAIObjectMapperTest.java
index 88f8526f31..6edda44c0a 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/aai/mapper/AAIObjectMapperTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/aai/mapper/AAIObjectMapperTest.java
@@ -350,11 +350,19 @@ public class AAIObjectMapperTest{
ModelInfoCollection modelInfoCollection = new ModelInfoCollection();
modelInfoCollection.setCollectionFunction("networkCollectionFunction");
modelInfoCollection.setCollectionRole("networkCollectionRole");
+ modelInfoCollection.setCollectionType("networkCollectionType");
+ modelInfoCollection.setModelCustomizationUUID("modelCustomizationUUID");
+ modelInfoCollection.setModelVersionId("modelVersionId");
+ modelInfoCollection.setModelInvariantUUID("modelInvariantUUID");
networkCollection.setModelInfoCollection(modelInfoCollection);
networkCollection.setName("networkCollectionName");
org.onap.aai.domain.yang.Collection expectedCollection = new org.onap.aai.domain.yang.Collection();
expectedCollection.setCollectionId("networkCollectionId");
+ expectedCollection.setCollectionType("networkCollectionType");
+ expectedCollection.setCollectionCustomizationId("modelCustomizationUUID");
+ expectedCollection.setModelVersionId("modelVersionId");
+ expectedCollection.setModelInvariantId("modelInvariantUUID");
expectedCollection.setCollectionFunction("networkCollectionFunction");
expectedCollection.setCollectionRole("networkCollectionRole");
expectedCollection.setCollectionName("networkCollectionName");
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapperTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapperTest.java
index 13bdfc87a1..b2f01f007f 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapperTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapperTest.java
@@ -55,7 +55,7 @@ import org.onap.so.db.catalog.beans.OrchestrationStatus;
import org.onap.so.entity.MsoRequest;
public class VnfAdapterObjectMapperTest {
- private final static String JSON_FILE_LOCATION = "src/test/resources/__files/BuildingBlocks/";
+ private final static String JSON_FILE_LOCATION = "src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/";
@Spy
private VnfAdapterObjectMapper vnfAdapterObjectMapper = new VnfAdapterObjectMapper();
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapperIntegrationTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapperPayloadTest.java
index b4c73ceb3b..9c51ee8006 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapperIntegrationTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapperPayloadTest.java
@@ -26,7 +26,8 @@ import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.HashMap;
-import org.junit.Ignore;
+
+import org.junit.Before;
import org.junit.Test;
import org.onap.so.adapters.vnfrest.CreateVfModuleRequest;
import org.onap.so.adapters.vnfrest.DeleteVfModuleRequest;
@@ -34,8 +35,8 @@ import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer;
import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
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.VolumeGroup;
import org.onap.so.bpmn.servicedecomposition.generalobjects.OrchestrationContext;
import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext;
import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoGenericVnf;
@@ -44,12 +45,19 @@ import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoVfModule;
import com.fasterxml.jackson.databind.ObjectMapper;
-public class VnfAdapterVfModuleObjectMapperIntegrationTest {
+public class VnfAdapterVfModuleObjectMapperPayloadTest {
- private final static String JSON_FILE_LOCATION = "src/test/resources/__files/BuildingBlocks/";
+ private final static String JSON_FILE_LOCATION = "src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/";
+ private VnfAdapterVfModuleObjectMapper vfModuleObjectMapper = new VnfAdapterVfModuleObjectMapper();
+ private ObjectMapper omapper = new ObjectMapper();
+ @Before
+ public void setUp() {
+ vfModuleObjectMapper.vnfAdapterObjectMapperUtils = new VnfAdapterObjectMapperUtils();
+ vfModuleObjectMapper.init();
+
+ }
@Test
- @Ignore
public void createVfModuleRequestMapperTest() throws Exception {
// prepare and set service instance
@@ -63,16 +71,82 @@ public class VnfAdapterVfModuleObjectMapperIntegrationTest {
modelInfoServiceInstance.setEnvironmentContext("environmentContext");
modelInfoServiceInstance.setWorkloadContext("workloadContext");
serviceInstance.setModelInfoServiceInstance(modelInfoServiceInstance);
- // prepare Customer object
- Customer customer = new Customer();
- customer.setGlobalCustomerId("globalCustomerId");
- customer.setServiceSubscription(new ServiceSubscription());
- // set Customer on service instance
- customer.getServiceSubscription().getServiceInstances().add(serviceInstance);
+
+ RequestContext requestContext = new RequestContext();
+ HashMap<String, String> userParams = new HashMap<String, String>();
+ userParams.put("key1", "value2");
+ requestContext.setMsoRequestId("requestId");
+ requestContext.setUserParams(userParams);
+ requestContext.setProductFamilyId("productFamilyId");
+
+ GenericVnf vnf = new GenericVnf();
+ vnf.setVnfId("vnfId");
+ vnf.setVnfType("vnfType");
+ vnf.setVnfName("vnfName");
+ ModelInfoGenericVnf modelInfoGenericVnf = new ModelInfoGenericVnf();
+ modelInfoGenericVnf.setModelInvariantUuid("vnfModelInvariantUuid");
+ modelInfoGenericVnf.setModelName("vnfModelName");
+ modelInfoGenericVnf.setModelVersion("vnfModelVersion");
+ modelInfoGenericVnf.setModelUuid("vnfModelUuid");
+ modelInfoGenericVnf.setModelCustomizationUuid("vnfModelCustomizationUuid");
+ vnf.setModelInfoGenericVnf(modelInfoGenericVnf);
+
+ Integer vfModuleIndex = 1;
+ VfModule vfModule = new VfModule();
+ vfModule.setVfModuleId("vfModuleId");
+ vfModule.setVfModuleName("vfModuleName");
+ vfModule.setModuleIndex(vfModuleIndex);
+ ModelInfoVfModule modelInfoVfModule = new ModelInfoVfModule();
+ modelInfoVfModule.setModelInvariantUUID("vfModuleModelInvariantUuid");
+ modelInfoVfModule.setModelName("vfModuleModelName");
+ modelInfoVfModule.setModelVersion("vfModuleModelVersion");
+ modelInfoVfModule.setModelUUID("vfModuleModelUuid");
+ modelInfoVfModule.setModelCustomizationUUID("vfModuleModelCustomizationUuid");
+ vfModule.setModelInfoVfModule(modelInfoVfModule);
+
+ CloudRegion cloudRegion = new CloudRegion();
+ cloudRegion.setLcpCloudRegionId("cloudRegionId");
+ cloudRegion.setTenantId("tenantId");
+
+ OrchestrationContext orchestrationContext = new OrchestrationContext();
+ orchestrationContext.setIsRollbackEnabled(false);
+
+ String sdncVnfQueryResponse = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "genericResourceApiVfModuleSdncVnfTopology.json")));
+ String sdncVfModuleQueryResponse = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "genericResourceApiVfModuleSdncVfModuleTopology.json")));
+
+ CreateVfModuleRequest vfModuleVNFAdapterRequest = vfModuleObjectMapper.createVfModuleRequestMapper(
+ requestContext, cloudRegion, orchestrationContext, serviceInstance,
+ vnf, vfModule, null, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
+
+
+ String jsonToCompare = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "vnfAdapterCreateVfModuleRequest.json")));
+
+ CreateVfModuleRequest reqMapper1 = omapper.readValue(
+ jsonToCompare,
+ CreateVfModuleRequest.class);
+
+ assertThat(vfModuleVNFAdapterRequest, sameBeanAs(reqMapper1).ignoring("messageId").ignoring("notificationUrl"));
+ }
+
+ @Test
+ public void createVfModuleAddonRequestMapperTest() throws Exception {
+
+ // prepare and set service instance
+ ServiceInstance serviceInstance = new ServiceInstance();
+ serviceInstance.setServiceInstanceId("serviceInstanceId");
+ ModelInfoServiceInstance modelInfoServiceInstance = new ModelInfoServiceInstance();
+ modelInfoServiceInstance.setModelInvariantUuid("serviceModelInvariantUuid");
+ modelInfoServiceInstance.setModelName("serviceModelName");
+ modelInfoServiceInstance.setModelUuid("serviceModelUuid");
+ modelInfoServiceInstance.setModelVersion("serviceModelVersion");
+ modelInfoServiceInstance.setEnvironmentContext("environmentContext");
+ modelInfoServiceInstance.setWorkloadContext("workloadContext");
+ serviceInstance.setModelInfoServiceInstance(modelInfoServiceInstance);
+
//
RequestContext requestContext = new RequestContext();
HashMap<String, String> userParams = new HashMap<String, String>();
- userParams.put("key1", "value1");
+ userParams.put("key1", "value2");
requestContext.setMsoRequestId("requestId");
requestContext.setUserParams(userParams);
requestContext.setProductFamilyId("productFamilyId");
@@ -101,6 +175,14 @@ public class VnfAdapterVfModuleObjectMapperIntegrationTest {
modelInfoVfModule.setModelUUID("vfModuleModelUuid");
modelInfoVfModule.setModelCustomizationUUID("vfModuleModelCustomizationUuid");
vfModule.setModelInfoVfModule(modelInfoVfModule);
+
+ VfModule baseVfModule = new VfModule();
+ baseVfModule.setVfModuleId("baseVfModuleId");
+ baseVfModule.setHeatStackId("baseVfModuleStackId");
+ ModelInfoVfModule baseModelInfoVfModule = new ModelInfoVfModule();
+ baseModelInfoVfModule.setIsBaseBoolean(true);
+ baseVfModule.setModelInfoVfModule(baseModelInfoVfModule);
+ vnf.getVfModules().add(baseVfModule);
CloudRegion cloudRegion = new CloudRegion();
cloudRegion.setLcpCloudRegionId("cloudRegionId");
@@ -112,18 +194,161 @@ public class VnfAdapterVfModuleObjectMapperIntegrationTest {
String sdncVnfQueryResponse = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "genericResourceApiVfModuleSdncVnfTopology.json")));
String sdncVfModuleQueryResponse = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "genericResourceApiVfModuleSdncVfModuleTopology.json")));
- VnfAdapterVfModuleObjectMapper mapper = new VnfAdapterVfModuleObjectMapper();
- mapper.vnfAdapterObjectMapperUtils = new VnfAdapterObjectMapperUtils();
+ CreateVfModuleRequest vfModuleVNFAdapterRequest = vfModuleObjectMapper.createVfModuleRequestMapper(
+ requestContext, cloudRegion, orchestrationContext, serviceInstance,
+ vnf, vfModule, null, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
+
+
+ String jsonToCompare = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "vnfAdapterCreateVfModuleAddonRequest.json")));
+
+ CreateVfModuleRequest reqMapper1 = omapper.readValue(
+ jsonToCompare,
+ CreateVfModuleRequest.class);
+
+ assertThat(vfModuleVNFAdapterRequest, sameBeanAs(reqMapper1).ignoring("messageId").ignoring("notificationUrl"));
+ }
+
+ @Test
+ public void createVfModuleWithVolumeGroupRequestMapperTest() throws Exception {
+
+ // prepare and set service instance
+ ServiceInstance serviceInstance = new ServiceInstance();
+ serviceInstance.setServiceInstanceId("serviceInstanceId");
+ ModelInfoServiceInstance modelInfoServiceInstance = new ModelInfoServiceInstance();
+ modelInfoServiceInstance.setModelInvariantUuid("serviceModelInvariantUuid");
+ modelInfoServiceInstance.setModelName("serviceModelName");
+ modelInfoServiceInstance.setModelUuid("serviceModelUuid");
+ modelInfoServiceInstance.setModelVersion("serviceModelVersion");
+ modelInfoServiceInstance.setEnvironmentContext("environmentContext");
+ modelInfoServiceInstance.setWorkloadContext("workloadContext");
+ serviceInstance.setModelInfoServiceInstance(modelInfoServiceInstance);
+
+ //
+ RequestContext requestContext = new RequestContext();
+ HashMap<String, String> userParams = new HashMap<String, String>();
+ userParams.put("key1", "value2");
+ requestContext.setMsoRequestId("requestId");
+ requestContext.setUserParams(userParams);
+ requestContext.setProductFamilyId("productFamilyId");
+
+ GenericVnf vnf = new GenericVnf();
+ vnf.setVnfId("vnfId");
+ vnf.setVnfType("vnfType");
+ vnf.setVnfName("vnfName");
+ ModelInfoGenericVnf modelInfoGenericVnf = new ModelInfoGenericVnf();
+ modelInfoGenericVnf.setModelInvariantUuid("vnfModelInvariantUuid");
+ modelInfoGenericVnf.setModelName("vnfModelName");
+ modelInfoGenericVnf.setModelVersion("vnfModelVersion");
+ modelInfoGenericVnf.setModelUuid("vnfModelUuid");
+ modelInfoGenericVnf.setModelCustomizationUuid("vnfModelCustomizationUuid");
+ vnf.setModelInfoGenericVnf(modelInfoGenericVnf);
+
+ Integer vfModuleIndex = 1;
+ VfModule vfModule = new VfModule();
+ vfModule.setVfModuleId("vfModuleId");
+ vfModule.setVfModuleName("vfModuleName");
+ vfModule.setModuleIndex(vfModuleIndex);
+ ModelInfoVfModule modelInfoVfModule = new ModelInfoVfModule();
+ modelInfoVfModule.setModelInvariantUUID("vfModuleModelInvariantUuid");
+ modelInfoVfModule.setModelName("vfModuleModelName");
+ modelInfoVfModule.setModelVersion("vfModuleModelVersion");
+ modelInfoVfModule.setModelUUID("vfModuleModelUuid");
+ modelInfoVfModule.setModelCustomizationUUID("vfModuleModelCustomizationUuid");
+ vfModule.setModelInfoVfModule(modelInfoVfModule);
+
+ VolumeGroup volumeGroup = new VolumeGroup();
+ volumeGroup.setVolumeGroupId("volumeGroupId");
+ volumeGroup.setHeatStackId("volumeGroupStackId");
+
+ CloudRegion cloudRegion = new CloudRegion();
+ cloudRegion.setLcpCloudRegionId("cloudRegionId");
+ cloudRegion.setTenantId("tenantId");
+
+ OrchestrationContext orchestrationContext = new OrchestrationContext();
+ orchestrationContext.setIsRollbackEnabled(false);
+
+ String sdncVnfQueryResponse = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "genericResourceApiVfModuleSdncVnfTopology.json")));
+ String sdncVfModuleQueryResponse = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "genericResourceApiVfModuleSdncVfModuleTopology.json")));
- CreateVfModuleRequest vfModuleVNFAdapterRequest = mapper.createVfModuleRequestMapper(
+ CreateVfModuleRequest vfModuleVNFAdapterRequest = vfModuleObjectMapper.createVfModuleRequestMapper(
requestContext, cloudRegion, orchestrationContext, serviceInstance,
- vnf, vfModule, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
+ vnf, vfModule, volumeGroup, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
- String jsonToCompare = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "vnfAdapterCreateVfModuleRequest.json")));
+ String jsonToCompare = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "vnfAdapterCreateVfModuleWithVolumeGroupRequest.json")));
+
+ CreateVfModuleRequest reqMapper1 = omapper.readValue(
+ jsonToCompare,
+ CreateVfModuleRequest.class);
+
+ assertThat(vfModuleVNFAdapterRequest, sameBeanAs(reqMapper1).ignoring("messageId").ignoring("notificationUrl"));
+ }
+
+ @Test
+ public void createVfModuleWithSingleAvailabilityZoneRequestMapperTest() throws Exception {
+
+ // prepare and set service instance
+ ServiceInstance serviceInstance = new ServiceInstance();
+ serviceInstance.setServiceInstanceId("serviceInstanceId");
+ ModelInfoServiceInstance modelInfoServiceInstance = new ModelInfoServiceInstance();
+ modelInfoServiceInstance.setModelInvariantUuid("serviceModelInvariantUuid");
+ modelInfoServiceInstance.setModelName("serviceModelName");
+ modelInfoServiceInstance.setModelUuid("serviceModelUuid");
+ modelInfoServiceInstance.setModelVersion("serviceModelVersion");
+ modelInfoServiceInstance.setEnvironmentContext("environmentContext");
+ modelInfoServiceInstance.setWorkloadContext("workloadContext");
+ serviceInstance.setModelInfoServiceInstance(modelInfoServiceInstance);
+
+ RequestContext requestContext = new RequestContext();
+ HashMap<String, String> userParams = new HashMap<String, String>();
+ userParams.put("key1", "value2");
+ requestContext.setMsoRequestId("requestId");
+ requestContext.setUserParams(userParams);
+ requestContext.setProductFamilyId("productFamilyId");
+
+ GenericVnf vnf = new GenericVnf();
+ vnf.setVnfId("vnfId");
+ vnf.setVnfType("vnfType");
+ vnf.setVnfName("vnfName");
+ ModelInfoGenericVnf modelInfoGenericVnf = new ModelInfoGenericVnf();
+ modelInfoGenericVnf.setModelInvariantUuid("vnfModelInvariantUuid");
+ modelInfoGenericVnf.setModelName("vnfModelName");
+ modelInfoGenericVnf.setModelVersion("vnfModelVersion");
+ modelInfoGenericVnf.setModelUuid("vnfModelUuid");
+ modelInfoGenericVnf.setModelCustomizationUuid("vnfModelCustomizationUuid");
+ vnf.setModelInfoGenericVnf(modelInfoGenericVnf);
+
+ Integer vfModuleIndex = 1;
+ VfModule vfModule = new VfModule();
+ vfModule.setVfModuleId("vfModuleId");
+ vfModule.setVfModuleName("vfModuleName");
+ vfModule.setModuleIndex(vfModuleIndex);
+ ModelInfoVfModule modelInfoVfModule = new ModelInfoVfModule();
+ modelInfoVfModule.setModelInvariantUUID("vfModuleModelInvariantUuid");
+ modelInfoVfModule.setModelName("vfModuleModelName");
+ modelInfoVfModule.setModelVersion("vfModuleModelVersion");
+ modelInfoVfModule.setModelUUID("vfModuleModelUuid");
+ modelInfoVfModule.setModelCustomizationUUID("vfModuleModelCustomizationUuid");
+ vfModule.setModelInfoVfModule(modelInfoVfModule);
- ObjectMapper omapper = new ObjectMapper();
- CreateVfModuleRequest reqMapper1 = omapper.readValue(
+ CloudRegion cloudRegion = new CloudRegion();
+ cloudRegion.setLcpCloudRegionId("cloudRegionId");
+ cloudRegion.setTenantId("tenantId");
+
+ OrchestrationContext orchestrationContext = new OrchestrationContext();
+ orchestrationContext.setIsRollbackEnabled(false);
+
+ String sdncVnfQueryResponse = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "genericResourceApiVfModuleSdncVnfTopologyWithSingletonArray.json")));
+ String sdncVfModuleQueryResponse = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "genericResourceApiVfModuleSdncVfModuleTopology.json")));
+
+ CreateVfModuleRequest vfModuleVNFAdapterRequest = vfModuleObjectMapper.createVfModuleRequestMapper(
+ requestContext, cloudRegion, orchestrationContext, serviceInstance,
+ vnf, vfModule, null, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
+
+
+ String jsonToCompare = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "vnfAdapterCreateVfModuleRequestWithSingleAvailabilityZone.json")));
+
+ CreateVfModuleRequest reqMapper1 = omapper.readValue(
jsonToCompare,
CreateVfModuleRequest.class);
@@ -131,7 +356,6 @@ public class VnfAdapterVfModuleObjectMapperIntegrationTest {
}
@Test
- @Ignore
public void createVfModuleRequestMapperWithCloudResourcesTest() throws Exception {
// prepare and set service instance
@@ -145,13 +369,7 @@ public class VnfAdapterVfModuleObjectMapperIntegrationTest {
modelInfoServiceInstance.setEnvironmentContext("environmentContext");
modelInfoServiceInstance.setWorkloadContext("workloadContext");
serviceInstance.setModelInfoServiceInstance(modelInfoServiceInstance);
- // prepare Customer object
- Customer customer = new Customer();
- customer.setGlobalCustomerId("globalCustomerId");
- customer.setServiceSubscription(new ServiceSubscription());
- // set Customer on service instance
- customer.getServiceSubscription().getServiceInstances().add(serviceInstance);
- //
+
RequestContext requestContext = new RequestContext();
HashMap<String, String> userParams = new HashMap<String, String>();
userParams.put("key1", "value1");
@@ -194,18 +412,14 @@ public class VnfAdapterVfModuleObjectMapperIntegrationTest {
String sdncVnfQueryResponse = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "genericResourceApiVfModuleSdncVnfTopologyWithCloudResources.json")));
String sdncVfModuleQueryResponse = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "genericResourceApiVfModuleSdncVfModuleTopologyWithCloudResources.json")));
- VnfAdapterVfModuleObjectMapper mapper = new VnfAdapterVfModuleObjectMapper();
- mapper.vnfAdapterObjectMapperUtils = new VnfAdapterObjectMapperUtils();
-
- CreateVfModuleRequest vfModuleVNFAdapterRequest = mapper.createVfModuleRequestMapper(
+ CreateVfModuleRequest vfModuleVNFAdapterRequest = vfModuleObjectMapper.createVfModuleRequestMapper(
requestContext, cloudRegion, orchestrationContext, serviceInstance,
- vnf, vfModule, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
+ vnf, vfModule, null, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
String jsonToCompare = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "vnfAdapterCreateVfModuleRequestWithCloudResources.json")));
- ObjectMapper omapper = new ObjectMapper();
- CreateVfModuleRequest reqMapper1 = omapper.readValue(
+ CreateVfModuleRequest reqMapper1 = omapper.readValue(
jsonToCompare,
CreateVfModuleRequest.class);
@@ -213,7 +427,6 @@ public class VnfAdapterVfModuleObjectMapperIntegrationTest {
}
@Test
- @Ignore
public void createVfModuleRequestMapperDhcpDisabledTest() throws Exception {
// prepare and set service instance
ServiceInstance serviceInstance = new ServiceInstance();
@@ -226,14 +439,6 @@ public class VnfAdapterVfModuleObjectMapperIntegrationTest {
modelInfoServiceInstance.setEnvironmentContext("environmentContext");
modelInfoServiceInstance.setWorkloadContext("workloadContext");
serviceInstance.setModelInfoServiceInstance(modelInfoServiceInstance);
- // prepare Customer object
- Customer customer = new Customer();
- customer.setGlobalCustomerId("globalCustomerId");
- customer.setServiceSubscription(new ServiceSubscription());
- // set Customer on service instance
-
- customer.getServiceSubscription().getServiceInstances().add(serviceInstance);
-
RequestContext requestContext = new RequestContext();
HashMap<String, String> userParams = new HashMap<String, String>();
@@ -277,18 +482,14 @@ public class VnfAdapterVfModuleObjectMapperIntegrationTest {
String sdncVnfQueryResponse = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "genericResourceApiVfModuleSdncVnfTopologySubnetDhcpDisabled.json")));
String sdncVfModuleQueryResponse = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "genericResourceApiVfModuleSdncVfModuleTopology.json")));
- VnfAdapterVfModuleObjectMapper mapper = new VnfAdapterVfModuleObjectMapper();
- mapper.vnfAdapterObjectMapperUtils = new VnfAdapterObjectMapperUtils();
-
- CreateVfModuleRequest vfModuleVNFAdapterRequest = mapper.createVfModuleRequestMapper(
+ CreateVfModuleRequest vfModuleVNFAdapterRequest = vfModuleObjectMapper.createVfModuleRequestMapper(
requestContext, cloudRegion, orchestrationContext, serviceInstance,
- vnf, vfModule, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
+ vnf, vfModule, null, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
String jsonToCompare = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "vnfAdapterCreateVfModuleRequestDhcpDisabled.json")));
- ObjectMapper omapper = new ObjectMapper();
- CreateVfModuleRequest reqMapper1 = omapper.readValue(
+ CreateVfModuleRequest reqMapper1 = omapper.readValue(
jsonToCompare,
CreateVfModuleRequest.class);
@@ -296,7 +497,6 @@ public class VnfAdapterVfModuleObjectMapperIntegrationTest {
}
@Test
- @Ignore
public void createVfModuleRequestMapperMultipleDhcpTest() throws Exception {
// prepare and set service instance
ServiceInstance serviceInstance = new ServiceInstance();
@@ -309,13 +509,6 @@ public class VnfAdapterVfModuleObjectMapperIntegrationTest {
modelInfoServiceInstance.setEnvironmentContext("environmentContext");
modelInfoServiceInstance.setWorkloadContext("workloadContext");
serviceInstance.setModelInfoServiceInstance(modelInfoServiceInstance);
- // prepare Customer object
- Customer customer = new Customer();
- customer.setGlobalCustomerId("globalCustomerId");
- customer.setServiceSubscription(new ServiceSubscription());
- // set Customer on service instance
-
- customer.getServiceSubscription().getServiceInstances().add(serviceInstance);
RequestContext requestContext = new RequestContext();
HashMap<String, String> userParams = new HashMap<String, String>();
@@ -359,18 +552,82 @@ public class VnfAdapterVfModuleObjectMapperIntegrationTest {
String sdncVnfQueryResponse = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "genericResourceApiVfModuleSdncVnfTopologySubnetMultipleDhcp.json")));
String sdncVfModuleQueryResponse = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "genericResourceApiVfModuleSdncVfModuleTopology.json")));
- VnfAdapterVfModuleObjectMapper mapper = new VnfAdapterVfModuleObjectMapper();
- mapper.vnfAdapterObjectMapperUtils = new VnfAdapterObjectMapperUtils();
-
- CreateVfModuleRequest vfModuleVNFAdapterRequest = mapper.createVfModuleRequestMapper(
+ CreateVfModuleRequest vfModuleVNFAdapterRequest = vfModuleObjectMapper.createVfModuleRequestMapper(
requestContext, cloudRegion, orchestrationContext, serviceInstance,
- vnf, vfModule, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
+ vnf, vfModule, null, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
String jsonToCompare = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "vnfAdapterCreateVfModuleRequestMultipleDhcp.json")));
- ObjectMapper omapper = new ObjectMapper();
- CreateVfModuleRequest reqMapper1 = omapper.readValue(
+ CreateVfModuleRequest reqMapper1 = omapper.readValue(
+ jsonToCompare,
+ CreateVfModuleRequest.class);
+
+ assertThat(vfModuleVNFAdapterRequest, sameBeanAs(reqMapper1).ignoring("messageId").ignoring("notificationUrl"));
+ }
+
+ @Test
+ public void createVfModuleRequestMapperWithNullUserParamsTest() throws Exception {
+
+ // prepare and set service instance
+ ServiceInstance serviceInstance = new ServiceInstance();
+ serviceInstance.setServiceInstanceId("serviceInstanceId");
+ ModelInfoServiceInstance modelInfoServiceInstance = new ModelInfoServiceInstance();
+ modelInfoServiceInstance.setModelInvariantUuid("serviceModelInvariantUuid");
+ modelInfoServiceInstance.setModelName("serviceModelName");
+ modelInfoServiceInstance.setModelUuid("serviceModelUuid");
+ modelInfoServiceInstance.setModelVersion("serviceModelVersion");
+ modelInfoServiceInstance.setEnvironmentContext("environmentContext");
+ modelInfoServiceInstance.setWorkloadContext("workloadContext");
+ serviceInstance.setModelInfoServiceInstance(modelInfoServiceInstance);
+
+ RequestContext requestContext = new RequestContext();
+ requestContext.setMsoRequestId("requestId");
+ requestContext.setProductFamilyId("productFamilyId");
+
+ GenericVnf vnf = new GenericVnf();
+ vnf.setVnfId("vnfId");
+ vnf.setVnfType("vnfType");
+ vnf.setVnfName("vnfName");
+ ModelInfoGenericVnf modelInfoGenericVnf = new ModelInfoGenericVnf();
+ modelInfoGenericVnf.setModelInvariantUuid("vnfModelInvariantUuid");
+ modelInfoGenericVnf.setModelName("vnfModelName");
+ modelInfoGenericVnf.setModelVersion("vnfModelVersion");
+ modelInfoGenericVnf.setModelUuid("vnfModelUuid");
+ modelInfoGenericVnf.setModelCustomizationUuid("vnfModelCustomizationUuid");
+ vnf.setModelInfoGenericVnf(modelInfoGenericVnf);
+
+ Integer vfModuleIndex = 1;
+ VfModule vfModule = new VfModule();
+ vfModule.setVfModuleId("vfModuleId");
+ vfModule.setVfModuleName("vfModuleName");
+ vfModule.setModuleIndex(vfModuleIndex);
+ ModelInfoVfModule modelInfoVfModule = new ModelInfoVfModule();
+ modelInfoVfModule.setModelInvariantUUID("vfModuleModelInvariantUuid");
+ modelInfoVfModule.setModelName("vfModuleModelName");
+ modelInfoVfModule.setModelVersion("vfModuleModelVersion");
+ modelInfoVfModule.setModelUUID("vfModuleModelUuid");
+ modelInfoVfModule.setModelCustomizationUUID("vfModuleModelCustomizationUuid");
+ vfModule.setModelInfoVfModule(modelInfoVfModule);
+
+ CloudRegion cloudRegion = new CloudRegion();
+ cloudRegion.setLcpCloudRegionId("cloudRegionId");
+ cloudRegion.setTenantId("tenantId");
+
+ OrchestrationContext orchestrationContext = new OrchestrationContext();
+ orchestrationContext.setIsRollbackEnabled(false);
+
+ String sdncVnfQueryResponse = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "genericResourceApiVfModuleSdncVnfTopology.json")));
+ String sdncVfModuleQueryResponse = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "genericResourceApiVfModuleSdncVfModuleTopology.json")));
+
+ CreateVfModuleRequest vfModuleVNFAdapterRequest = vfModuleObjectMapper.createVfModuleRequestMapper(
+ requestContext, cloudRegion, orchestrationContext, serviceInstance,
+ vnf, vfModule, null, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
+
+
+ String jsonToCompare = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "vnfAdapterCreateVfModuleRequestNoUserParams.json")));
+
+ CreateVfModuleRequest reqMapper1 = omapper.readValue(
jsonToCompare,
CreateVfModuleRequest.class);
@@ -389,13 +646,7 @@ public class VnfAdapterVfModuleObjectMapperIntegrationTest {
modelInfoServiceInstance.setEnvironmentContext("environmentContext");
modelInfoServiceInstance.setWorkloadContext("workloadContext");
serviceInstance.setModelInfoServiceInstance(modelInfoServiceInstance);
- // prepare Customer object
- Customer customer = new Customer();
- customer.setGlobalCustomerId("globalCustomerId");
- customer.setServiceSubscription(new ServiceSubscription());
- // set Customer on service instance
- customer.getServiceSubscription().getServiceInstances().add(serviceInstance);
- //
+
RequestContext requestContext = new RequestContext();
HashMap<String, String> userParams = new HashMap<String, String>();
userParams.put("key1", "value1");
@@ -433,18 +684,14 @@ public class VnfAdapterVfModuleObjectMapperIntegrationTest {
OrchestrationContext orchestrationContext = new OrchestrationContext();
orchestrationContext.setIsRollbackEnabled(false);
- VnfAdapterVfModuleObjectMapper mapper = new VnfAdapterVfModuleObjectMapper();
- mapper.vnfAdapterObjectMapperUtils = new VnfAdapterObjectMapperUtils();
-
- DeleteVfModuleRequest vfModuleVNFAdapterRequest = mapper.deleteVfModuleRequestMapper(
+ DeleteVfModuleRequest vfModuleVNFAdapterRequest = vfModuleObjectMapper.deleteVfModuleRequestMapper(
requestContext, cloudRegion, serviceInstance,
vnf, vfModule);
String jsonToCompare = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "vnfAdapterDeleteVfModuleRequest.json")));
- ObjectMapper omapper = new ObjectMapper();
- DeleteVfModuleRequest reqMapper1 = omapper.readValue(
+ DeleteVfModuleRequest reqMapper1 = omapper.readValue(
jsonToCompare,
DeleteVfModuleRequest.class);
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/VnfAdapterVfModuleResourcesTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/VnfAdapterVfModuleResourcesTest.java
index dfed3c8929..f7c12104cc 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/VnfAdapterVfModuleResourcesTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/VnfAdapterVfModuleResourcesTest.java
@@ -33,13 +33,14 @@ import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
-import org.onap.so.bpmn.common.data.TestDataSetup;
import org.onap.so.adapters.vnfrest.CreateVfModuleRequest;
import org.onap.so.adapters.vnfrest.DeleteVfModuleRequest;
+import org.onap.so.bpmn.common.data.TestDataSetup;
import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.VolumeGroup;
import org.onap.so.bpmn.servicedecomposition.generalobjects.OrchestrationContext;
import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext;
import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoServiceInstance;
@@ -59,6 +60,7 @@ public class VnfAdapterVfModuleResourcesTest extends TestDataSetup{
private ModelInfoServiceInstance modelInfoServiceInstance;
private GenericVnf genericVnf;
private VfModule vfModule;
+ private VolumeGroup volumeGroup;
private ModelInfoVfModule modelInfoVfModule;
private CloudRegion cloudRegion;
private OrchestrationContext orchestrationContext;
@@ -95,13 +97,30 @@ public class VnfAdapterVfModuleResourcesTest extends TestDataSetup{
@Test
public void test_createVfModule() throws Exception {
doReturn(createVfModuleRequest).when(MOCK_vnfAdapterVfModuleObjectMapper).createVfModuleRequestMapper(requestContext, cloudRegion, orchestrationContext, serviceInstance,
- genericVnf, vfModule, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
+ genericVnf, vfModule, null, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
+
+ CreateVfModuleRequest actualCreateVfModuleRequest = vnfAdapterVfModuleResources.createVfModuleRequest(requestContext, cloudRegion, orchestrationContext, serviceInstance,
+ genericVnf, vfModule, null, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
+
+ verify(MOCK_vnfAdapterVfModuleObjectMapper, times(1)).createVfModuleRequestMapper(requestContext, cloudRegion, orchestrationContext, serviceInstance,
+ genericVnf, vfModule, null, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
+
+ assertNotNull(createVfModuleRequest);
+ assertNotNull(actualCreateVfModuleRequest);
+ assertEquals(createVfModuleRequest, actualCreateVfModuleRequest);
+ }
+
+ @Test
+ public void test_createVfModuleWithVolumeGroup() throws Exception {
+ volumeGroup = buildVolumeGroup();
+ doReturn(createVfModuleRequest).when(MOCK_vnfAdapterVfModuleObjectMapper).createVfModuleRequestMapper(requestContext, cloudRegion, orchestrationContext, serviceInstance,
+ genericVnf, vfModule, volumeGroup, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
CreateVfModuleRequest actualCreateVfModuleRequest = vnfAdapterVfModuleResources.createVfModuleRequest(requestContext, cloudRegion, orchestrationContext, serviceInstance,
- genericVnf, vfModule, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
+ genericVnf, vfModule, volumeGroup, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
verify(MOCK_vnfAdapterVfModuleObjectMapper, times(1)).createVfModuleRequestMapper(requestContext, cloudRegion, orchestrationContext, serviceInstance,
- genericVnf, vfModule, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
+ genericVnf, vfModule, volumeGroup, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
assertNotNull(createVfModuleRequest);
assertNotNull(actualCreateVfModuleRequest);
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVfModuleTopology.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVfModuleTopology.json
new file mode 100644
index 0000000000..a24f8bf125
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVfModuleTopology.json
@@ -0,0 +1,178 @@
+{
+ "vf-module-assignments": {
+ "vms": {
+ "vm": [
+ {
+ "vm-type": "vmType0",
+ "vm-names": {
+ "vm-name": [
+ "vmName0",
+ "vmName1"
+ ],
+ "vnfc-names": [
+ {
+ "vnfc-name": "vnfcName0",
+ "vnfc-networks": {
+ "vnfc-network-data": [
+ {
+ "vnfc-network-role": "vnfcNetworkRole0",
+ "vnfc-type": "fw",
+ "vnfc-ports": {
+ "vnfc-port": [
+ {
+ "vnfc-port-id": "01",
+ "common-sub-interface-role": "ctrl",
+ "vnic-sub-interfaces": {
+ "sub-interface-network-data": [
+ {
+ "network-id": "networkId0",
+ "network-name": 1,
+ "vlan-tag-id": 1,
+ "network-information-items": {
+ "network-information-item": [
+ {
+ "ip-version": "ipv4",
+ "network-ips": {
+ "network-ip": [
+ "ip0",
+ "ip1"
+ ]
+ }
+ },
+ {
+ "ip-version": "ipv6",
+ "network-ips": {
+ "network-ip": [
+ "ip0",
+ "ip1"
+ ]
+ }
+ }
+ ]
+ },
+ "floating-ips": {
+ "floating-ip-v4": [
+ "floatingIpV40",
+ "floatingIpV41"
+ ],
+ "floating-ip-v6": [
+ "floatingIpV60",
+ "floatingIpV61"
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "vm-networks": {
+ "vm-network": [
+ {
+ "network-role": "vmNetworkRole0",
+ "floating-ips": {
+ "floating-ip-v4": [
+ "floatingIpV40",
+ "floatingIpV41"
+ ],
+ "floating-ip-v6": [
+ "floatingIpV60",
+ "floatingIpV61"
+ ]
+ },
+ "interface-route-prefixes": {
+ "interface-route-prefix": [
+ "interfaceRoutePrefix0",
+ "interfaceRoutePrefix1"
+ ]
+ },
+ "sriov-parameters": {
+ "heat-vlan-filters": {
+ "heat-vlan-filter": [
+ "heatVlanFilter0",
+ "heatVlanFilter1"
+ ]
+ }
+ },
+ "network-information-items": {
+ "network-information-item": [
+ {
+ "network-ips": {
+ "network-ip": [
+ "ip0",
+ "ip1"
+ ]
+ },
+ "ip-version": "ipv4"
+ },
+ {
+ "network-ips": {
+ "network-ip": [
+ "ip2",
+ "ip3"
+ ]
+ },
+ "ip-version": "ipv6"
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ "vf-module-parameters": {
+ "param": [
+ {
+ "name": "paramOne",
+ "value": "paramOneValue",
+ "resource-resolution-data": {
+ "resource-key": [
+ {
+ "name": "resourceKeyName",
+ "value": "resourceKeyValue"
+ }
+ ],
+ "status": "status",
+ "capability-name": "capabilityName"
+ }
+ },
+ {
+ "name": "paramTwo",
+ "value": "paramTwoValue",
+ "resource-resolution-data": {
+ "resource-key": [
+ {
+ "name": "resourceKeyName",
+ "value": "resourceKeyValue"
+ }
+ ],
+ "status": "status",
+ "capability-name": "capabilityName"
+ }
+ },
+ {
+ "name": "paramThree",
+ "value": "paramThreeValue",
+ "resource-resolution-data": {
+ "resource-key": [
+ {
+ "name": "resourceKeyName",
+ "value": "resourceKeyValue"
+ }
+ ],
+ "status": "status",
+ "capability-name": "capabilityName"
+ }
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVfModuleTopologyWithCloudResources.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVfModuleTopologyWithCloudResources.json
new file mode 100644
index 0000000000..eaedb92281
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVfModuleTopologyWithCloudResources.json
@@ -0,0 +1,179 @@
+{
+ "vf-module-assignments": {
+ "vms": {
+ "vm": [
+ {
+ "vm-type": "vmType0",
+ "vm-names": {
+ "vm-name": [
+ "vmName0",
+ "vmName1"
+ ],
+ "vnfc-names": [
+ {
+ "vnfc-name": "vnfcName0",
+ "vnfc-networks": {
+ "vnfc-network-data": [
+ {
+ "vnfc-network-role": "vnfcNetworkRole0",
+ "vnfc-type": "fw",
+ "vnfc-ports": {
+ "vnfc-port": [
+ {
+ "vnfc-port-id": "01",
+ "common-sub-interface-role": "ctrl",
+ "vnic-sub-interfaces": {
+ "sub-interface-network-data": [
+ {
+ "network-id": "networkId0",
+ "network-name": 1,
+ "vlan-tag-id": 1,
+ "network-information-items": {
+ "network-information-item": [
+ {
+ "ip-version": "ipv4",
+ "network-ips": {
+ "network-ip": [
+ "ip0",
+ "ip1"
+ ]
+ }
+ },
+ {
+ "ip-version": "ipv6",
+ "network-ips": {
+ "network-ip": [
+ "ip0",
+ "ip1"
+ ]
+ }
+ }
+ ]
+ },
+ "floating-ips": {
+ "floating-ip-v4": [
+ "floatingIpV40",
+ "floatingIpV41"
+ ],
+ "floating-ip-v6": [
+ "floatingIpV60",
+ "floatingIpV61"
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "vm-networks": {
+ "vm-network": [
+ {
+ "network-role": "vmNetworkRole0",
+ "floating-ips": {
+ "floating-ip-v4": [
+ "floatingIpV40",
+ "floatingIpV41"
+ ],
+ "floating-ip-v6": [
+ "floatingIpV60",
+ "floatingIpV61"
+ ]
+ },
+ "interface-route-prefixes": {
+ "interface-route-prefix": [
+ "interfaceRoutePrefix0",
+ "interfaceRoutePrefix1"
+ ]
+ },
+ "sriov-parameters": {
+ "heat-vlan-filters": {
+ "heat-vlan-filter": [
+ "heatVlanFilter0",
+ "heatVlanFilter1"
+ ]
+ }
+ },
+ "network-information-items": {
+ "network-information-item": [
+ {
+ "network-ips": {
+ "network-ip": [
+ "ip0",
+ "ip1"
+ ]
+ },
+ "ip-version": "ipv4"
+ },
+ {
+ "network-ips": {
+ "network-ip": [
+ "ip2",
+ "ip3"
+ ]
+ },
+ "ip-version": "ipv6"
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ "vf-module-parameters": {
+ "param": [
+ {
+ "name": "paramOne",
+ "value": "paramOneValue",
+ "resource-resolution-data": {
+ "resource-key": [
+ {
+ "name": "resourceKeyName",
+ "value": "resourceKeyValue"
+ }
+ ],
+ "status": "status",
+ "capability-name": "capabilityName"
+ }
+ },
+ {
+ "name": "paramTwo",
+ "value": "paramTwoValue",
+ "resource-resolution-data": {
+ "resource-key": [
+ {
+ "name": "resourceKeyName",
+ "value": "resourceKeyValue"
+ }
+ ],
+ "status": "status",
+ "capability-name": "capabilityName"
+ }
+ },
+ {
+ "name": "paramThree",
+ "value": "paramThreeValue",
+ "resource-resolution-data": {
+ "resource-key": [
+ {
+ "name": "resourceKeyName",
+ "value": "resourceKeyValue"
+ }
+ ],
+ "status": "status",
+ "capability-name": "capabilityName"
+ }
+ }
+ ]
+ },
+ "sdnc-generated-cloud-resources": "true"
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopology.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopology.json
new file mode 100644
index 0000000000..39c6708631
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopology.json
@@ -0,0 +1,48 @@
+{
+ "vnf-resource-assignments": {
+ "availability-zones": {
+ "availability-zone": [
+ "zone0",
+ "zone1",
+ "zone2"
+ ]
+ },
+ "vnf-networks": {
+ "vnf-network": [
+ {
+ "network-role": "vnfNetworkRole0",
+ "neutron-id": "neutronId0",
+ "network-name": "netName0",
+ "contrail-network-fqdn": "netFqdnValue0",
+ "subnets-data": {
+ "subnet-data": [
+ {
+ "ip-version": "ipv4",
+ "subnet-id": "subnetId0",
+ "dhcp-enabled": "Y"
+ },
+ {
+ "ip-version": "ipv6",
+ "subnet-id": "subnetId1",
+ "dhcp-enabled": "Y"
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ "vnf-parameters-data": {
+ "param": [
+ {
+ "name": "key1",
+ "value": "value1"
+ }
+ ]
+ },
+ "aic-clli": "",
+ "tenant": "",
+ "vnf-topology-identifier-structure": {},
+ "onap-model-information": {},
+ "aic-cloud-region": ""
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologySubnetDhcpDisabled.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologySubnetDhcpDisabled.json
new file mode 100644
index 0000000000..21ba0876f5
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologySubnetDhcpDisabled.json
@@ -0,0 +1,48 @@
+{
+ "vnf-resource-assignments": {
+ "availability-zones": {
+ "availability-zone": [
+ "zone0",
+ "zone1",
+ "zone2"
+ ]
+ },
+ "vnf-networks": {
+ "vnf-network": [
+ {
+ "network-role": "vnfNetworkRole0",
+ "neutron-id": "neutronId0",
+ "network-name": "netName0",
+ "contrail-network-fqdn": "netFqdnValue0",
+ "subnets-data": {
+ "subnet-data": [
+ {
+ "ip-version": "ipv4",
+ "subnet-id": "subnetId0",
+ "dhcp-enabled": "N"
+ },
+ {
+ "ip-version": "ipv6",
+ "subnet-id": "subnetId1",
+ "dhcp-enabled": "N"
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ "vnf-parameters-data": {
+ "param": [
+ {
+ "name": "key1",
+ "value": "value1"
+ }
+ ]
+ },
+ "aic-clli": "",
+ "tenant": "",
+ "vnf-topology-identifier-structure": {},
+ "onap-model-information": {},
+ "aic-cloud-region": ""
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologySubnetMultipleDhcp.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologySubnetMultipleDhcp.json
new file mode 100644
index 0000000000..5062a06117
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologySubnetMultipleDhcp.json
@@ -0,0 +1,68 @@
+{
+ "vnf-resource-assignments": {
+ "availability-zones": {
+ "availability-zone": [
+ "zone0",
+ "zone1",
+ "zone2"
+ ]
+ },
+ "vnf-networks": {
+ "vnf-network": [
+ {
+ "network-role": "vnfNetworkRole0",
+ "neutron-id": "neutronId0",
+ "network-name": "netName0",
+ "contrail-network-fqdn": "netFqdnValue0",
+ "subnets-data": {
+ "subnet-data": [
+ {
+ "ip-version": "ipv4",
+ "subnet-id": "subnetId0",
+ "dhcp-enabled": "Y"
+ },
+ {
+ "ip-version": "ipv4",
+ "subnet-id": "subnetId1",
+ "dhcp-enabled": "Y"
+ },
+ {
+ "ip-version": "ipv4",
+ "subnet-id": "subnetId2",
+ "dhcp-enabled": "Y"
+ },
+ {
+ "ip-version": "ipv6",
+ "subnet-id": "subnetId3",
+ "dhcp-enabled": "N"
+ },
+ {
+ "ip-version": "ipv6",
+ "subnet-id": "subnetId4",
+ "dhcp-enabled": "Y"
+ },
+ {
+ "ip-version": "ipv6",
+ "subnet-id": "subnetId5",
+ "dhcp-enabled": "Y"
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ "vnf-parameters-data": {
+ "param": [
+ {
+ "name": "key1",
+ "value": "value1"
+ }
+ ]
+ },
+ "aic-clli": "",
+ "tenant": "",
+ "vnf-topology-identifier-structure": {},
+ "onap-model-information": {},
+ "aic-cloud-region": ""
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologyWithCloudResources.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologyWithCloudResources.json
new file mode 100644
index 0000000000..fedee49609
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologyWithCloudResources.json
@@ -0,0 +1,47 @@
+{
+ "vnf-resource-assignments": {
+ "availability-zones": {
+ "availability-zone": [
+ "zone0",
+ "zone1",
+ "zone2"
+ ]
+ },
+ "vnf-networks": {
+ "vnf-network": [
+ {
+ "network-role": "vnfNetworkRole0",
+ "neutron-id": "neutronId0",
+ "network-name": "netName0",
+ "contrail-network-fqdn": "netFqdnValue0",
+ "subnets-data": {
+ "subnet-data": [
+ {
+ "ip-version": "ipv4",
+ "subnet-id": "subnetId0"
+ },
+ {
+ "ip-version": "ipv6",
+ "subnet-id": "subnetId1"
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ "vnf-parameters-data": {
+ "param": [
+ {
+ "name": "key1",
+ "value": "value1"
+ }
+ ]
+ },
+ "aic-clli": "",
+ "tenant": "",
+ "vnf-topology-identifier-structure": {},
+ "onap-model-information": {},
+ "aic-cloud-region": "",
+ "sdnc-generated-cloud-resources": "true"
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologyWithSingletonArray.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologyWithSingletonArray.json
new file mode 100644
index 0000000000..a6964a323f
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologyWithSingletonArray.json
@@ -0,0 +1,44 @@
+{
+ "vnf-resource-assignments": {
+ "availability-zones": {
+ "availability-zone": "zone0"
+ },
+ "vnf-networks": {
+ "vnf-network": [
+ {
+ "network-role": "vnfNetworkRole0",
+ "neutron-id": "neutronId0",
+ "network-name": "netName0",
+ "contrail-network-fqdn": "netFqdnValue0",
+ "subnets-data": {
+ "subnet-data": [
+ {
+ "ip-version": "ipv4",
+ "subnet-id": "subnetId0",
+ "dhcp-enabled": "Y"
+ },
+ {
+ "ip-version": "ipv6",
+ "subnet-id": "subnetId1",
+ "dhcp-enabled": "Y"
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ "vnf-parameters-data": {
+ "param": [
+ {
+ "name": "key1",
+ "value": "value1"
+ }
+ ]
+ },
+ "aic-clli": "",
+ "tenant": "",
+ "vnf-topology-identifier-structure": {},
+ "onap-model-information": {},
+ "aic-cloud-region": ""
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleAddonRequest.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleAddonRequest.json
new file mode 100644
index 0000000000..c4e7237511
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleAddonRequest.json
@@ -0,0 +1,69 @@
+{
+ "cloudSiteId": "cloudRegionId",
+ "tenantId": "tenantId",
+ "vnfId": "vnfId",
+ "vnfType": "vnfType",
+ "vfModuleId": "vfModuleId",
+ "vfModuleName": "vfModuleName",
+ "vfModuleType": "vfModuleModelName",
+ "vnfVersion": "serviceModelVersion",
+ "modelCustomizationUuid": "vfModuleModelCustomizationUuid",
+ "baseVfModuleId": "baseVfModuleId",
+ "baseVfModuleStackId": "baseVfModuleStackId",
+ "skipAAI": true,
+ "backout": false,
+ "failIfExists": true,
+ "msoRequest":
+ {
+ "requestId": "requestId",
+ "serviceInstanceId": "serviceInstanceId"
+ },
+
+ "vfModuleParams":
+ {
+ "vnf_id": "vnfId",
+ "vnf_name": "vnfName",
+ "vf_module_id": "vfModuleId",
+ "vf_module_index": "1",
+ "vf_module_name": "vfModuleName",
+ "environment_context": "environmentContext",
+ "fw_0_subint_ctrl_port_0_ip": "ip0,ip1",
+ "fw_0_subint_ctrl_port_0_ip_0": "ip0",
+ "fw_0_subint_ctrl_port_0_ip_1": "ip1",
+ "fw_0_subint_ctrl_port_0_net_ids": "networkId0",
+ "fw_0_subint_ctrl_port_0_net_names": "1",
+ "fw_subint_ctrl_port_0_subintcount": "1",
+ "fw_0_subint_ctrl_port_0_v6_ip": "ip0,ip1",
+ "fw_0_subint_ctrl_port_0_v6_ip_0": "ip0",
+ "fw_0_subint_ctrl_port_0_v6_ip_1": "ip1",
+ "fw_0_subint_ctrl_port_0_vlan_ids": "1",
+ "fw_subint_ctrl_port_0_floating_ip": "floatingIpV40",
+ "fw_subint_ctrl_port_0_floating_v6_ip": "floatingIpV60",
+ "workload_context": "workloadContext",
+ "key1": "value2",
+ "availability_zone_0": "zone0",
+ "availability_zone_1": "zone1",
+ "availability_zone_2": "zone2",
+ "vnfNetworkRole0_net_fqdn": "netFqdnValue0",
+ "vnfNetworkRole0_net_id": "neutronId0",
+ "vnfNetworkRole0_net_name": "netName0",
+ "vnfNetworkRole0_subnet_id": "subnetId0",
+ "vnfNetworkRole0_v6_subnet_id": "subnetId1",
+ "vmType0_name_0": "vmName0",
+ "vmType0_name_1": "vmName1",
+ "vmType0_names": "vmName0,vmName1",
+ "vmType0_vmNetworkRole0_floating_ip": "floatingIpV40",
+ "vmType0_vmNetworkRole0_floating_v6_ip": "floatingIpV60",
+ "vmType0_vmNetworkRole0_route_prefixes": "[{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix0\"},{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix1\"}]",
+ "vmNetworkRole0_ATT_VF_VLAN_FILTER": "heatVlanFilter0,heatVlanFilter1",
+ "vmType0_vmNetworkRole0_ip_0": "ip0",
+ "vmType0_vmNetworkRole0_ip_1": "ip1",
+ "vmType0_vmNetworkRole0_ips": "ip0,ip1",
+ "vmType0_vmNetworkRole0_v6_ip_0": "ip2",
+ "vmType0_vmNetworkRole0_v6_ip_1": "ip3",
+ "vmType0_vmNetworkRole0_v6_ips": "ip2,ip3",
+ "paramOne": "paramOneValue",
+ "paramTwo": "paramTwoValue",
+ "paramThree": "paramThreeValue"
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/vnfAdapterCreateVfModuleRequest.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequest.json
index a30ee59d5c..0db327eae4 100644
--- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/vnfAdapterCreateVfModuleRequest.json
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequest.json
@@ -1,6 +1,7 @@
{
"cloudSiteId": "cloudRegionId",
"tenantId": "tenantId",
+ "vnfId": "vnfId",
"vnfType": "vnfType",
"vfModuleId": "vfModuleId",
"vfModuleName": "vfModuleName",
@@ -37,7 +38,7 @@
"fw_subint_ctrl_port_0_floating_ip": "floatingIpV40",
"fw_subint_ctrl_port_0_floating_v6_ip": "floatingIpV60",
"workload_context": "workloadContext",
- "key1": "value1",
+ "key1": "value2",
"availability_zone_0": "zone0",
"availability_zone_1": "zone1",
"availability_zone_2": "zone2",
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/vnfAdapterCreateVfModuleRequestDhcpDisabled.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestDhcpDisabled.json
index 49a68b909a..90326e33eb 100644
--- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/vnfAdapterCreateVfModuleRequestDhcpDisabled.json
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestDhcpDisabled.json
@@ -1,6 +1,7 @@
{
"cloudSiteId": "cloudRegionId",
"tenantId": "tenantId",
+ "vnfId": "vnfId",
"vnfType": "vnfType",
"vfModuleId": "vfModuleId",
"vfModuleName": "vfModuleName",
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/vnfAdapterCreateVfModuleRequestMultipleDhcp.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestMultipleDhcp.json
index a862051582..2f943a67bc 100644
--- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/vnfAdapterCreateVfModuleRequestMultipleDhcp.json
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestMultipleDhcp.json
@@ -1,6 +1,7 @@
{
"cloudSiteId": "cloudRegionId",
"tenantId": "tenantId",
+ "vnfId": "vnfId",
"vnfType": "vnfType",
"vfModuleId": "vfModuleId",
"vfModuleName": "vfModuleName",
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestNoUserParams.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestNoUserParams.json
new file mode 100644
index 0000000000..4c50ad1187
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestNoUserParams.json
@@ -0,0 +1,67 @@
+{
+ "cloudSiteId": "cloudRegionId",
+ "tenantId": "tenantId",
+ "vnfId": "vnfId",
+ "vnfType": "vnfType",
+ "vfModuleId": "vfModuleId",
+ "vfModuleName": "vfModuleName",
+ "vfModuleType": "vfModuleModelName",
+ "vnfVersion": "serviceModelVersion",
+ "modelCustomizationUuid": "vfModuleModelCustomizationUuid",
+ "skipAAI": true,
+ "backout": false,
+ "failIfExists": true,
+ "msoRequest":
+ {
+ "requestId": "requestId",
+ "serviceInstanceId": "serviceInstanceId"
+ },
+
+ "vfModuleParams":
+ {
+ "vnf_id": "vnfId",
+ "vnf_name": "vnfName",
+ "vf_module_id": "vfModuleId",
+ "vf_module_index": "1",
+ "vf_module_name": "vfModuleName",
+ "environment_context": "environmentContext",
+ "fw_0_subint_ctrl_port_0_ip": "ip0,ip1",
+ "fw_0_subint_ctrl_port_0_ip_0": "ip0",
+ "fw_0_subint_ctrl_port_0_ip_1": "ip1",
+ "fw_0_subint_ctrl_port_0_net_ids": "networkId0",
+ "fw_0_subint_ctrl_port_0_net_names": "1",
+ "fw_subint_ctrl_port_0_subintcount": "1",
+ "fw_0_subint_ctrl_port_0_v6_ip": "ip0,ip1",
+ "fw_0_subint_ctrl_port_0_v6_ip_0": "ip0",
+ "fw_0_subint_ctrl_port_0_v6_ip_1": "ip1",
+ "fw_0_subint_ctrl_port_0_vlan_ids": "1",
+ "fw_subint_ctrl_port_0_floating_ip": "floatingIpV40",
+ "fw_subint_ctrl_port_0_floating_v6_ip": "floatingIpV60",
+ "workload_context": "workloadContext",
+ "key1": "value1",
+ "availability_zone_0": "zone0",
+ "availability_zone_1": "zone1",
+ "availability_zone_2": "zone2",
+ "vnfNetworkRole0_net_fqdn": "netFqdnValue0",
+ "vnfNetworkRole0_net_id": "neutronId0",
+ "vnfNetworkRole0_net_name": "netName0",
+ "vnfNetworkRole0_subnet_id": "subnetId0",
+ "vnfNetworkRole0_v6_subnet_id": "subnetId1",
+ "vmType0_name_0": "vmName0",
+ "vmType0_name_1": "vmName1",
+ "vmType0_names": "vmName0,vmName1",
+ "vmType0_vmNetworkRole0_floating_ip": "floatingIpV40",
+ "vmType0_vmNetworkRole0_floating_v6_ip": "floatingIpV60",
+ "vmType0_vmNetworkRole0_route_prefixes": "[{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix0\"},{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix1\"}]",
+ "vmNetworkRole0_ATT_VF_VLAN_FILTER": "heatVlanFilter0,heatVlanFilter1",
+ "vmType0_vmNetworkRole0_ip_0": "ip0",
+ "vmType0_vmNetworkRole0_ip_1": "ip1",
+ "vmType0_vmNetworkRole0_ips": "ip0,ip1",
+ "vmType0_vmNetworkRole0_v6_ip_0": "ip2",
+ "vmType0_vmNetworkRole0_v6_ip_1": "ip3",
+ "vmType0_vmNetworkRole0_v6_ips": "ip2,ip3",
+ "paramOne": "paramOneValue",
+ "paramTwo": "paramTwoValue",
+ "paramThree": "paramThreeValue"
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/vnfAdapterCreateVfModuleRequestWithCloudResources.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestWithCloudResources.json
index 9c77f14f4b..d80c739916 100644
--- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/vnfAdapterCreateVfModuleRequestWithCloudResources.json
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestWithCloudResources.json
@@ -1,6 +1,7 @@
{
"cloudSiteId": "cloudRegionId",
"tenantId": "tenantId",
+ "vnfId": "vnfId",
"vnfType": "vnfType",
"vfModuleId": "vfModuleId",
"vfModuleName": "vfModuleName",
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestWithSingleAvailabilityZone.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestWithSingleAvailabilityZone.json
new file mode 100644
index 0000000000..293c6c21ed
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestWithSingleAvailabilityZone.json
@@ -0,0 +1,65 @@
+{
+ "cloudSiteId": "cloudRegionId",
+ "tenantId": "tenantId",
+ "vnfId": "vnfId",
+ "vnfType": "vnfType",
+ "vfModuleId": "vfModuleId",
+ "vfModuleName": "vfModuleName",
+ "vfModuleType": "vfModuleModelName",
+ "vnfVersion": "serviceModelVersion",
+ "modelCustomizationUuid": "vfModuleModelCustomizationUuid",
+ "skipAAI": true,
+ "backout": false,
+ "failIfExists": true,
+ "msoRequest":
+ {
+ "requestId": "requestId",
+ "serviceInstanceId": "serviceInstanceId"
+ },
+
+ "vfModuleParams":
+ {
+ "vnf_id": "vnfId",
+ "vnf_name": "vnfName",
+ "vf_module_id": "vfModuleId",
+ "vf_module_index": "1",
+ "vf_module_name": "vfModuleName",
+ "environment_context": "environmentContext",
+ "fw_0_subint_ctrl_port_0_ip": "ip0,ip1",
+ "fw_0_subint_ctrl_port_0_ip_0": "ip0",
+ "fw_0_subint_ctrl_port_0_ip_1": "ip1",
+ "fw_0_subint_ctrl_port_0_net_ids": "networkId0",
+ "fw_0_subint_ctrl_port_0_net_names": "1",
+ "fw_subint_ctrl_port_0_subintcount": "1",
+ "fw_0_subint_ctrl_port_0_v6_ip": "ip0,ip1",
+ "fw_0_subint_ctrl_port_0_v6_ip_0": "ip0",
+ "fw_0_subint_ctrl_port_0_v6_ip_1": "ip1",
+ "fw_0_subint_ctrl_port_0_vlan_ids": "1",
+ "fw_subint_ctrl_port_0_floating_ip": "floatingIpV40",
+ "fw_subint_ctrl_port_0_floating_v6_ip": "floatingIpV60",
+ "workload_context": "workloadContext",
+ "key1": "value2",
+ "availability_zone_0": "zone0",
+ "vnfNetworkRole0_net_fqdn": "netFqdnValue0",
+ "vnfNetworkRole0_net_id": "neutronId0",
+ "vnfNetworkRole0_net_name": "netName0",
+ "vnfNetworkRole0_subnet_id": "subnetId0",
+ "vnfNetworkRole0_v6_subnet_id": "subnetId1",
+ "vmType0_name_0": "vmName0",
+ "vmType0_name_1": "vmName1",
+ "vmType0_names": "vmName0,vmName1",
+ "vmType0_vmNetworkRole0_floating_ip": "floatingIpV40",
+ "vmType0_vmNetworkRole0_floating_v6_ip": "floatingIpV60",
+ "vmType0_vmNetworkRole0_route_prefixes": "[{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix0\"},{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix1\"}]",
+ "vmNetworkRole0_ATT_VF_VLAN_FILTER": "heatVlanFilter0,heatVlanFilter1",
+ "vmType0_vmNetworkRole0_ip_0": "ip0",
+ "vmType0_vmNetworkRole0_ip_1": "ip1",
+ "vmType0_vmNetworkRole0_ips": "ip0,ip1",
+ "vmType0_vmNetworkRole0_v6_ip_0": "ip2",
+ "vmType0_vmNetworkRole0_v6_ip_1": "ip3",
+ "vmType0_vmNetworkRole0_v6_ips": "ip2,ip3",
+ "paramOne": "paramOneValue",
+ "paramTwo": "paramTwoValue",
+ "paramThree": "paramThreeValue"
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleWithVolumeGroupRequest.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleWithVolumeGroupRequest.json
new file mode 100644
index 0000000000..dff1ccf7b0
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleWithVolumeGroupRequest.json
@@ -0,0 +1,69 @@
+{
+ "cloudSiteId": "cloudRegionId",
+ "tenantId": "tenantId",
+ "vnfId": "vnfId",
+ "vnfType": "vnfType",
+ "vfModuleId": "vfModuleId",
+ "vfModuleName": "vfModuleName",
+ "vfModuleType": "vfModuleModelName",
+ "vnfVersion": "serviceModelVersion",
+ "modelCustomizationUuid": "vfModuleModelCustomizationUuid",
+ "volumeGroupId": "volumeGroupId",
+ "volumeGroupStackId": "volumeGroupStackId",
+ "skipAAI": true,
+ "backout": false,
+ "failIfExists": true,
+ "msoRequest":
+ {
+ "requestId": "requestId",
+ "serviceInstanceId": "serviceInstanceId"
+ },
+
+ "vfModuleParams":
+ {
+ "vnf_id": "vnfId",
+ "vnf_name": "vnfName",
+ "vf_module_id": "vfModuleId",
+ "vf_module_index": "1",
+ "vf_module_name": "vfModuleName",
+ "environment_context": "environmentContext",
+ "fw_0_subint_ctrl_port_0_ip": "ip0,ip1",
+ "fw_0_subint_ctrl_port_0_ip_0": "ip0",
+ "fw_0_subint_ctrl_port_0_ip_1": "ip1",
+ "fw_0_subint_ctrl_port_0_net_ids": "networkId0",
+ "fw_0_subint_ctrl_port_0_net_names": "1",
+ "fw_subint_ctrl_port_0_subintcount": "1",
+ "fw_0_subint_ctrl_port_0_v6_ip": "ip0,ip1",
+ "fw_0_subint_ctrl_port_0_v6_ip_0": "ip0",
+ "fw_0_subint_ctrl_port_0_v6_ip_1": "ip1",
+ "fw_0_subint_ctrl_port_0_vlan_ids": "1",
+ "fw_subint_ctrl_port_0_floating_ip": "floatingIpV40",
+ "fw_subint_ctrl_port_0_floating_v6_ip": "floatingIpV60",
+ "workload_context": "workloadContext",
+ "key1": "value2",
+ "availability_zone_0": "zone0",
+ "availability_zone_1": "zone1",
+ "availability_zone_2": "zone2",
+ "vnfNetworkRole0_net_fqdn": "netFqdnValue0",
+ "vnfNetworkRole0_net_id": "neutronId0",
+ "vnfNetworkRole0_net_name": "netName0",
+ "vnfNetworkRole0_subnet_id": "subnetId0",
+ "vnfNetworkRole0_v6_subnet_id": "subnetId1",
+ "vmType0_name_0": "vmName0",
+ "vmType0_name_1": "vmName1",
+ "vmType0_names": "vmName0,vmName1",
+ "vmType0_vmNetworkRole0_floating_ip": "floatingIpV40",
+ "vmType0_vmNetworkRole0_floating_v6_ip": "floatingIpV60",
+ "vmType0_vmNetworkRole0_route_prefixes": "[{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix0\"},{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix1\"}]",
+ "vmNetworkRole0_ATT_VF_VLAN_FILTER": "heatVlanFilter0,heatVlanFilter1",
+ "vmType0_vmNetworkRole0_ip_0": "ip0",
+ "vmType0_vmNetworkRole0_ip_1": "ip1",
+ "vmType0_vmNetworkRole0_ips": "ip0,ip1",
+ "vmType0_vmNetworkRole0_v6_ip_0": "ip2",
+ "vmType0_vmNetworkRole0_v6_ip_1": "ip3",
+ "vmType0_vmNetworkRole0_v6_ips": "ip2,ip3",
+ "paramOne": "paramOneValue",
+ "paramTwo": "paramTwoValue",
+ "paramThree": "paramThreeValue"
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/vnfAdapterDeleteVfModuleRequest.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterDeleteVfModuleRequest.json
index 21e5bde3ec..21e5bde3ec 100644
--- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/vnfAdapterDeleteVfModuleRequest.json
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterDeleteVfModuleRequest.json
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVfModuleTopology.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVfModuleTopology.json
deleted file mode 100644
index 1497286a1b..0000000000
--- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVfModuleTopology.json
+++ /dev/null
@@ -1,241 +0,0 @@
-{
- "vf-module-assignments":
- {
- "vms":
- {
- "vm":
- [
- {
- "vm-type": "vmType0",
- "vm-names":
- {
- "vm-name":
- [
- "vmName0",
- "vmName1"
- ],
-
- "vnfc-names":
- [
- {
- "vnfc-name": "vnfcName0",
- "vnfc-networks":
- {
- "vnfc-network-data":
- [
- {
- "vnfc-network-role": "vnfcNetworkRole0",
- "vnfc-type": "fw",
- "vnfc-ports":
- {
- "vnfc-port":
- [
- {
- "vnfc-port-id": "01",
- "common-sub-interface-role": "ctrl",
- "vnic-sub-interfaces":
- {
- "sub-interface-network-data":
- [
- {
- "network-id": "networkId0",
- "network-name": 1,
- "vlan-tag-id": 1,
- "network-information-items":
- {
- "network-information-item":
- [
- {
- "ip-version": "ipv4",
- "network-ips":
- {
- "network-ip":
- [
- "ip0",
- "ip1"
- ]
- }
- },
-
- {
- "ip-version": "ipv6",
- "network-ips":
- {
- "network-ip":
- [
- "ip0",
- "ip1"
- ]
- }
- }
- ]
- },
-
- "floating-ips":
- {
- "floating-ip-v4":
- [
- "floatingIpV40",
- "floatingIpV41"
- ],
-
- "floating-ip-v6":
- [
- "floatingIpV60",
- "floatingIpV61"
- ]
- }
- }
- ]
- }
- }
- ]
- }
- }
- ]
- }
- }
- ]
- },
-
- "vm-networks":
- {
- "vm-network":
- [
- {
- "network-role": "vmNetworkRole0",
- "floating-ips":
- {
- "floating-ip-v4":
- [
- "floatingIpV40",
- "floatingIpV41"
- ],
-
- "floating-ip-v6":
- [
- "floatingIpV60",
- "floatingIpV61"
- ]
- },
-
- "interface-route-prefixes":
- {
- "interface-route-prefix":
- [
- "interfaceRoutePrefix0",
- "interfaceRoutePrefix1"
- ]
- },
-
- "sriov-parameters":
- {
- "heat-vlan-filters":
- {
- "heat-vlan-filter":
- [
- "heatVlanFilter0",
- "heatVlanFilter1"
- ]
- }
- },
-
- "network-information-items":
- {
- "network-information-item":
- [
- {
- "network-ips":
- {
- "network-ip":
- [
- "ip0",
- "ip1"
- ]
- },
-
- "ip-version": "ipv4"
- },
-
- {
- "network-ips":
- {
- "network-ip":
- [
- "ip2",
- "ip3"
- ]
- },
-
- "ip-version": "ipv6"
- }
- ]
- }
- }
- ]
- }
- }
- ]
- }
- },
-
- "vf-module-parameters":
- {
- "param":
- [
- {
- "name": "paramOne",
- "value": "paramOneValue",
- "resource-resolution-data":
- {
- "resource-key":
- [
- {
- "name": "resourceKeyName",
- "value": "resourceKeyValue"
- }
- ],
-
- "status": "status",
- "capability-name": "capabilityName"
- }
- },
-
- {
- "name": "paramTwo",
- "value": "paramTwoValue",
- "resource-resolution-data":
- {
- "resource-key":
- [
- {
- "name": "resourceKeyName",
- "value": "resourceKeyValue"
- }
- ],
-
- "status": "status",
- "capability-name": "capabilityName"
- }
- },
-
- {
- "name": "paramThree",
- "value": "paramThreeValue",
- "resource-resolution-data":
- {
- "resource-key":
- [
- {
- "name": "resourceKeyName",
- "value": "resourceKeyValue"
- }
- ],
-
- "status": "status",
- "capability-name": "capabilityName"
- }
- }
- ]
- }
-} \ No newline at end of file
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVfModuleTopologyWithCloudResources.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVfModuleTopologyWithCloudResources.json
deleted file mode 100644
index 2a8acb927e..0000000000
--- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVfModuleTopologyWithCloudResources.json
+++ /dev/null
@@ -1,243 +0,0 @@
-{
- "vf-module-assignments":
- {
- "vms":
- {
- "vm":
- [
- {
- "vm-type": "vmType0",
- "vm-names":
- {
- "vm-name":
- [
- "vmName0",
- "vmName1"
- ],
-
- "vnfc-names":
- [
- {
- "vnfc-name": "vnfcName0",
- "vnfc-networks":
- {
- "vnfc-network-data":
- [
- {
- "vnfc-network-role": "vnfcNetworkRole0",
- "vnfc-type": "fw",
- "vnfc-ports":
- {
- "vnfc-port":
- [
- {
- "vnfc-port-id": "01",
- "common-sub-interface-role": "ctrl",
- "vnic-sub-interfaces":
- {
- "sub-interface-network-data":
- [
- {
- "network-id": "networkId0",
- "network-name": 1,
- "vlan-tag-id": 1,
- "network-information-items":
- {
- "network-information-item":
- [
- {
- "ip-version": "ipv4",
- "network-ips":
- {
- "network-ip":
- [
- "ip0",
- "ip1"
- ]
- }
- },
-
- {
- "ip-version": "ipv6",
- "network-ips":
- {
- "network-ip":
- [
- "ip0",
- "ip1"
- ]
- }
- }
- ]
- },
-
- "floating-ips":
- {
- "floating-ip-v4":
- [
- "floatingIpV40",
- "floatingIpV41"
- ],
-
- "floating-ip-v6":
- [
- "floatingIpV60",
- "floatingIpV61"
- ]
- }
- }
- ]
- }
- }
- ]
- }
- }
- ]
- }
- }
- ]
- },
-
- "vm-networks":
- {
- "vm-network":
- [
- {
- "network-role": "vmNetworkRole0",
- "floating-ips":
- {
- "floating-ip-v4":
- [
- "floatingIpV40",
- "floatingIpV41"
- ],
-
- "floating-ip-v6":
- [
- "floatingIpV60",
- "floatingIpV61"
- ]
- },
-
- "interface-route-prefixes":
- {
- "interface-route-prefix":
- [
- "interfaceRoutePrefix0",
- "interfaceRoutePrefix1"
- ]
- },
-
- "sriov-parameters":
- {
- "heat-vlan-filters":
- {
- "heat-vlan-filter":
- [
- "heatVlanFilter0",
- "heatVlanFilter1"
- ]
- }
- },
-
- "network-information-items":
- {
- "network-information-item":
- [
- {
- "network-ips":
- {
- "network-ip":
- [
- "ip0",
- "ip1"
- ]
- },
-
- "ip-version": "ipv4"
- },
-
- {
- "network-ips":
- {
- "network-ip":
- [
- "ip2",
- "ip3"
- ]
- },
-
- "ip-version": "ipv6"
- }
- ]
- }
- }
- ]
- }
- }
- ]
- }
- },
-
- "vf-module-parameters":
- {
- "param":
- [
- {
- "name": "paramOne",
- "value": "paramOneValue",
- "resource-resolution-data":
- {
- "resource-key":
- [
- {
- "name": "resourceKeyName",
- "value": "resourceKeyValue"
- }
- ],
-
- "status": "status",
- "capability-name": "capabilityName"
- }
- },
-
- {
- "name": "paramTwo",
- "value": "paramTwoValue",
- "resource-resolution-data":
- {
- "resource-key":
- [
- {
- "name": "resourceKeyName",
- "value": "resourceKeyValue"
- }
- ],
-
- "status": "status",
- "capability-name": "capabilityName"
- }
- },
-
- {
- "name": "paramThree",
- "value": "paramThreeValue",
- "resource-resolution-data":
- {
- "resource-key":
- [
- {
- "name": "resourceKeyName",
- "value": "resourceKeyValue"
- }
- ],
-
- "status": "status",
- "capability-name": "capabilityName"
- }
- }
- ]
- },
-
- "sdnc-generated-cloud-resources": "true"
-} \ No newline at end of file
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVnfTopology.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVnfTopology.json
deleted file mode 100644
index 2c7728397f..0000000000
--- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVnfTopology.json
+++ /dev/null
@@ -1,68 +0,0 @@
-{
- "vnf-resource-assignments":
- {
- "availability-zones":
- {
- "availability-zone":
- [
- "zone0",
- "zone1",
- "zone2"
- ]
- },
-
- "vnf-networks":
- {
- "vnf-network":
- [
- {
- "network-role": "vnfNetworkRole0",
- "neutron-id": "neutronId0",
- "network-name": "netName0",
- "contrail-network-fqdn": "netFqdnValue0",
- "subnets-data":
- {
- "subnet-data":
- [
- {
- "ip-version": "ipv4",
- "subnet-id": "subnetId0",
- "dhcp-enabled" : "Y"
- },
- {
- "ip-version": "ipv6",
- "subnet-id": "subnetId1",
- "dhcp-enabled" : "Y"
- }
- ]
- }
- }
- ]
- }
- },
-
- "vnf-parameters-data":
- {
- "param":
- [
- {
- "name": "key1",
- "value": "value1"
- }
- ]
- },
-
- "aic-clli": "",
- "tenant": "",
- "vnf-topology-identifier-structure":
- {
-
- },
-
- "onap-model-information":
- {
-
- },
-
- "aic-cloud-region": ""
-} \ No newline at end of file
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVnfTopologySubnetDhcpDisabled.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVnfTopologySubnetDhcpDisabled.json
deleted file mode 100644
index a302777810..0000000000
--- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVnfTopologySubnetDhcpDisabled.json
+++ /dev/null
@@ -1,68 +0,0 @@
-{
- "vnf-resource-assignments":
- {
- "availability-zones":
- {
- "availability-zone":
- [
- "zone0",
- "zone1",
- "zone2"
- ]
- },
-
- "vnf-networks":
- {
- "vnf-network":
- [
- {
- "network-role": "vnfNetworkRole0",
- "neutron-id": "neutronId0",
- "network-name": "netName0",
- "contrail-network-fqdn": "netFqdnValue0",
- "subnets-data":
- {
- "subnet-data":
- [
- {
- "ip-version": "ipv4",
- "subnet-id": "subnetId0",
- "dhcp-enabled" : "N"
- },
- {
- "ip-version": "ipv6",
- "subnet-id": "subnetId1",
- "dhcp-enabled" : "N"
- }
- ]
- }
- }
- ]
- }
- },
-
- "vnf-parameters-data":
- {
- "param":
- [
- {
- "name": "key1",
- "value": "value1"
- }
- ]
- },
-
- "aic-clli": "",
- "tenant": "",
- "vnf-topology-identifier-structure":
- {
-
- },
-
- "onap-model-information":
- {
-
- },
-
- "aic-cloud-region": ""
-} \ No newline at end of file
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVnfTopologySubnetMultipleDhcp.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVnfTopologySubnetMultipleDhcp.json
deleted file mode 100644
index 67c095a217..0000000000
--- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVnfTopologySubnetMultipleDhcp.json
+++ /dev/null
@@ -1,88 +0,0 @@
-{
- "vnf-resource-assignments":
- {
- "availability-zones":
- {
- "availability-zone":
- [
- "zone0",
- "zone1",
- "zone2"
- ]
- },
-
- "vnf-networks":
- {
- "vnf-network":
- [
- {
- "network-role": "vnfNetworkRole0",
- "neutron-id": "neutronId0",
- "network-name": "netName0",
- "contrail-network-fqdn": "netFqdnValue0",
- "subnets-data":
- {
- "subnet-data":
- [
- {
- "ip-version": "ipv4",
- "subnet-id": "subnetId0",
- "dhcp-enabled" : "Y"
- },
- {
- "ip-version": "ipv4",
- "subnet-id": "subnetId1",
- "dhcp-enabled" : "Y"
- },
- {
- "ip-version": "ipv4",
- "subnet-id": "subnetId2",
- "dhcp-enabled" : "Y"
- },
- {
- "ip-version": "ipv6",
- "subnet-id": "subnetId3",
- "dhcp-enabled" : "N"
- },
- {
- "ip-version": "ipv6",
- "subnet-id": "subnetId4",
- "dhcp-enabled" : "Y"
- },
- {
- "ip-version": "ipv6",
- "subnet-id": "subnetId5",
- "dhcp-enabled" : "Y"
- }
- ]
- }
- }
- ]
- }
- },
-
- "vnf-parameters-data":
- {
- "param":
- [
- {
- "name": "key1",
- "value": "value1"
- }
- ]
- },
-
- "aic-clli": "",
- "tenant": "",
- "vnf-topology-identifier-structure":
- {
-
- },
-
- "onap-model-information":
- {
-
- },
-
- "aic-cloud-region": ""
-} \ No newline at end of file
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVnfTopologyWithCloudResources.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVnfTopologyWithCloudResources.json
deleted file mode 100644
index 0047764713..0000000000
--- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVnfTopologyWithCloudResources.json
+++ /dev/null
@@ -1,69 +0,0 @@
-{
- "vnf-resource-assignments":
- {
- "availability-zones":
- {
- "availability-zone":
- [
- "zone0",
- "zone1",
- "zone2"
- ]
- },
-
- "vnf-networks":
- {
- "vnf-network":
- [
- {
- "network-role": "vnfNetworkRole0",
- "neutron-id": "neutronId0",
- "network-name": "netName0",
- "contrail-network-fqdn": "netFqdnValue0",
- "subnets-data":
- {
- "subnet-data":
- [
- {
- "ip-version": "ipv4",
- "subnet-id": "subnetId0"
- },
-
- {
- "ip-version": "ipv6",
- "subnet-id": "subnetId1"
- }
- ]
- }
- }
- ]
- }
- },
-
- "vnf-parameters-data":
- {
- "param":
- [
- {
- "name": "key1",
- "value": "value1"
- }
- ]
- },
-
- "aic-clli": "",
- "tenant": "",
- "vnf-topology-identifier-structure":
- {
-
- },
-
- "onap-model-information":
- {
-
- },
-
- "aic-cloud-region": "",
-
- "sdnc-generated-cloud-resources": "true"
-} \ No newline at end of file