aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-infrastructure-flows/src/test
diff options
context:
space:
mode:
authorBenjamin, Max (mb388a) <mb388a@us.att.com>2018-07-30 15:56:09 -0400
committerBenjamin, Max (mb388a) <mb388a@us.att.com>2018-07-31 11:09:25 -0400
commit5a6a6de6f1a26a1897e4917a0df613e25a24eb70 (patch)
tree59a968f27b4b603aacc9d5e7b51fb598aeec5321 /bpmn/so-bpmn-infrastructure-flows/src/test
parentb6dc38501f3b746426b42d9de4cc883d894149e8 (diff)
Containerization feature of SO
Change-Id: I95381232eeefcd247a66a5cec370a8ce1c288e18 Issue-ID: SO-670 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'bpmn/so-bpmn-infrastructure-flows/src/test')
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstanceTest.groovy84
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateGenericAlaCarteServiceInstanceTest.groovy235
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateNetworkInstanceTest.groovy379
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleInfraTest.groovy96
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1Test.groovy208
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstanceTest.groovy148
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteGenericAlaCarteServiceInstanceTest.groovy125
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteNetworkInstanceTest.groovy418
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1Test.groovy167
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstanceTest.groovy103
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceRollbackTest.groovy369
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceTest.groovy4324
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstanceTest.groovy135
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstanceTest.groovy106
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollbackTest.groovy202
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleTest.groovy229
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2Test.groovy135
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfTest.groovy106
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceTest.groovy169
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceRollbackTest.groovy343
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceTest.groovy1948
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstanceTest.groovy127
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnfTest.groovy172
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleTest.groovy163
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleVolumeV2Test.groovy152
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnfAndModulesTest.groovy162
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoScaleE2EServiceInstanceTest.groovy110
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceRollbackTest.groovy332
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceTest.groovy2762
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModuleTest.groovy309
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModulesTest.groovy126
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/ScaleCustomE2EServiceInstanceTest.groovy195
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateNetworkInstanceTest.groovy358
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1Test.groovy134
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/CreateVcpeResCustServiceTest.groovy1269
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DeleteVcpeResCustServiceTest.groovy773
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGRollbackTest.groovy654
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGTest.groovy999
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCRollbackTest.groovy654
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCTest.groovy957
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceBRGTest.groovy606
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceTXCTest.groovy607
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/GroovyTestBase.groovy124
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/MapGetter.groovy49
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/MapSetter.groovy50
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/CreateSiSample.json72
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateAllottedResourceBRG.bpmn54
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateAllottedResourceBRGRollback.bpmn55
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateAllottedResourceTXC.bpmn38
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateServiceInstanceRollback.bpmn53
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateVnfAndModules.bpmn53
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateVnfAndModulesRollback.bpmn53
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoDeleteVnfAndModules.bpmn37
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/Homing.bpmn35
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/AAI_defaultCloudRegionByCloudRegionId.json12
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/AAI_genericVnfGet.json9
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/AAI_genericVnfsByVnfId.json434
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/AAI_pserverByVnfId.json72
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/AAI_vfModuleByVfModuleId.json27
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/mockObject.json10
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/APPC/appc_error.json21
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/createNetworkRequest.xml75
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/createNetworkResponse.xml31
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/defaultNetwork.json10
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/l3NetworkBbObject.json226
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/payloadUpdateCreated.json216
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAICloudRegion.json596
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAICloudRegion25.json596
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAICloudRegionError.json596
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAINetworkTestResponse.json141
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAIResponse.json166
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAIResponseEmptyUri.json53
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAIVpnBindingTestResponse.json891
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryIdAAIResponse.xml145
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/unassignNetworkBB_queryAAIResponse_.json162
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/updateContrailAAIPayloadRequest.xml149
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/sniroCallback2AR1Vnf107
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/sniroCallback2AR1Vnf2Net165
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/sniroCallbackNoSolutionFound15
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/sniroCallbackPolicyException9
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/sniroCallbackServiceException12
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/cloudRegion25_AAIResponse_Success.xml20
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/cloudRegion30_AAIResponse_Success.xml20
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetworkResponse_400.xml6
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetworkResponse_500.xml80
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetworkResponse_Success.xml24
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryInstance_Success.xml4
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryName2_AAIResponse_Success.xml62
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNameActive_AAIResponse_Success.xml74
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryName_AAIResponse_404.xml19
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryName_AAIResponse_Success.xml62
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_404.xml19
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_NoPayload_Success.xml73
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_Success.xml110
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkPolicy_AAIResponse_Success.xml21
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkTableRef1_AAIResponse_Success.xml20
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkTableRef2_AAIResponse_Success.xml20
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryVpnBindingList_AAIResponse_Success.xml57
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryVpnBinding_AAIResponse_Success.xml46
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_updateContrail_AAIResponse_Success.xml11
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2mock/sdncCreateNetworkTopologyRsrcAssignResponse.xml15
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2mock/sdncCreateNetworkTopologySimResponse.xml17
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateServiceInstance/DoCreateServiceInstanceInput.json42
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateServiceInstance/SetupServiceDecompJson.json36
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateServiceInstance/createServiceInstance_createServiceInstance_AAIResponse_Success.xml11
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateServiceInstance/createServiceInstance_queryGlobalCustomerId_AAIResponse_Success.xml62
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/CreateVfModuleCallbackException.xml7
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/CreateVfModuleVolumeCallbackResponse.xml53
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/CreateVfModuleVolumeRequest.xml24
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/GenericVnf.xml38
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/RollbackVfModuleVolumeCallbackResponse.xml5
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_VID_request.json71
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_VID_request_noreqparm.json45
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_createVolumeName_AAIResponse_Success.xml49
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_deleteVolumeName_AAIResponse_Success.xml24
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_queryVolumeName_AAIResponse_404.xml31
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_queryVolumeName_AAIResponse_Success.xml50
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_updateVolumeName_AAIResponse_Success.xml24
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/getSIUrlById.xml6
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_HasVfModRelationship.xml62
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModule_VID_request.json77
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModule_VID_request_noPreloads.json79
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModule_VID_request_userParam.json77
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DBUpdateResponse.xml4
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Database/DBAdapter.xml1
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Database/DBUpdateResponse.xml4
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteGenericVNFV1/sdncAdapterResponse.xml7
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2/cloudRegion25_AAIResponse_Success.xml20
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2/cloudRegion30_AAIResponse_Success.xml20
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2/deleteAAIResponse_Failure500_RESTFault.xml19
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2/deleteNetworkAAIResponse_Success.xml61
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2/deleteNetworkAAIResponse_withRelationship_Success.xml73
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2mock/sdncDeleteNetworkTopologySimResponse.xml17
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2mock/sdncDeleteNetworkTopologySimResponse_noExtraTag.xml17
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteVfModuleCallbackResponse.xml21
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteVfModuleVolumeInfraV1/DeleteVfModuleVolumeCallbackResponse.xml5
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteVfModuleVolumeInfraV1/deleteVfModuleVolume_VID_request_st.json17
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_Success.xml42
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteVfModule_VID_request.json50
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule/DoCreateVfModuleRequest.xml31
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule/cloudRegion_AAIResponse_Success.xml20
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule/createVnfARequest.xml169
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule/getGenericVnfResponse.xml28
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule/sdncGetResponse.xml195
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleRollback/GenericVnf.xml26
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleRollback/GenericVnfVfModule.xml26
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleRollback/deactivateSDNCRequest.xml36
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleRollback/sdncAdapterWorkflowRequest.xml37
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleRollback/vnfAdapterRestV1Request.xml14
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeCallbackResponse.xml53
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeNoRollbackRequest.xml24
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeRequest.xml24
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/GenericVnf.xml38
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/RollbackVfModuleVolumeCallbackResponse.xml5
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_VID_request.json104
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_createVolumeName_AAIResponse_Success.xml49
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_deleteVolumeName_AAIResponse_Success.xml24
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_queryVolumeName_AAIResponse_Success.xml49
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_updateVolumeName_AAIResponse_Success.xml24
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV2/cloudRegion_AAIResponse_Success.xml20
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV2/vnfAdapterDeleteRequest.xml13
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule_getVnfResponse.xml26
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoDeleteVfModule/getGenericVnfResponse.xml28
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoDeleteVfModule/sdncAdapterWorkflowRequest.xml36
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/cloudRegion_AAIResponse_Success.xml20
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/getGenericVnfResponse.xml28
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/sdncActivateRequest.xml36
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/sdncChangeAssignRequest.xml36
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/sdncGetResponse.xml195
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/sdncTopologyRequest.xml11
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/vnfAdapterRestRequest.xml170
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/MsoCompletionRequest.xml11
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/SDNCDeleteResponse.xml212
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/aaiGetResponse.xml33
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getARUrlById.xml6
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getGenericVnfByNameResponse.xml23
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getGenericVnfResponse.xml90
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getGenericVnfResponse_hasRelationships.xml90
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getNotFound.xml2
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getParentSIUrlById.xml6
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getParentServiceInstance.xml30
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getSINoRelations.xml6
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getSIUrlById.xml6
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getSIUrlByIdVipr.xml7
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getServiceInstance.xml30
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/ConfigVnf_VID_request.json39
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/CreateVnfInfraRequest.json46
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/DeleteCustomE2EService.json21
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/DeleteVnfInfraRequestCascadeDelete.json39
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/DoCreateServiceInstance_request.json186
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/DoScaleE2EServiceInstance.json38
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/ReplaceVnf_VID_request.json49
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/UpdateVfModule_VID_request.json62
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/UpdateVnf_VID_request.json56
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/VnfInPlaceUpdate_VID_request.json16
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Macro/CreateNetworkCollection.json70
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Macro/ServiceMacroAssign.json125
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Policy/policyAbortResponse.json1
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Policy/policySkipResponse.json1
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Schemas/ActivateServiceInstance.json7
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Schemas/ActivateVnfSchema.json13
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Schemas/AssignServiceInstanceSchema.json16
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Schemas/AssignVnfSchema.json13
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/sdncUpdateNetworkTopologySimResponse.xml17
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_400.xml6
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_500.xml80
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_Success.xml24
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryInstance_Success.xml4
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_NoPayload_Success.xml73
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_Success.xml95
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkPolicy_AAIResponse_Success.xml21
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkTableRef1_AAIResponse_Success.xml20
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkTableRef2_AAIResponse_Success.xml20
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryVpnBindingList_AAIResponse_Success.xml57
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml46
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_updateContrail_AAIResponse_Success.xml11
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_Success.xml44
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/updateVfModuleVolume_VID_request.json64
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/updateVfModuleVolume_VID_request_2.json64
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/updateVolumeGroupRequest.xml38
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/vf_module_aai_response.xml29
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/SDNCTopologyQueryBRGCallback.xml37
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/SDNCTopologyQueryTXCCallback.xml24
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/arGetById.xml31
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/getCatalogServiceResourcesData.json127
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/getCatalogServiceResourcesNoData.json11
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/getCustomer.xml7
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/request.json40
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/requestNoSIName.json39
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/requestNoSINameNoRollback.json39
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/arGetBRGById.xml31
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/arGetTXCById.xml31
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/getBRGArUrlById.xml6
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/getSI.xml35
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/getSIAfterDelArs.xml8
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/getTXCArUrlById.xml6
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/request.json40
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/serviceToDelete.xml36
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRG/SDNCTopologyQueryCallback.xml37
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRG/getAR.xml8
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRG/getArBrg.xml31
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRG/getArBrg2.xml31
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRG/getSIandAR.xml38
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml31
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRGRollback/sdncActivateRollbackReq.xml51
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRGRollback/sdncAssignRollbackReq.xml51
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRGRollback/sdncCreateRollbackReq.xml51
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXC/SDNCTopologyQueryCallback.xml24
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXC/getAR.xml8
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXC/getArTxc.xml31
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXC/getArTxc2.xml31
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXC/getSIandAR.xml38
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXCRollback/arGetById.xml31
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXCRollback/sdncActivateRollbackReq.xml51
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXCRollback/sdncAssignRollbackReq.xml51
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXCRollback/sdncCreateRollbackReq.xml51
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoDeleteAllottedResourceBRG/arGetById.xml31
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoDeleteAllottedResourceTXC/arGetById.xml31
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogServiceResourcesData.json94
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogServiceResourcesDataForReplaceVnfInfra.json98
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogServiceResourcesDataForUpdateVnfInfra.json110
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogVnfData.json44
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogVnfNoTwoPhasedForVfModule.json44
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogVnfYesTwoPhasedForVfModule.json44
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/serviceDecompositionATMFW.json110
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/AddNetworkPolicy_AAIResponse_Success.xml21
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/CreateVfModuleVolumeCallbackResponse.xml53
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/DBUpdateResponse.xml4
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/DoUpdateVfModuleRequest.xml29
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/GenerateVfModuleName_AAIResponse_Success.xml51
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/GenericVnf.xml38
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/QueryNetworkPolicy_AAIResponse_Success.xml21
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCSITopologyAssignCallback.xml11
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyActivateCallback.xml13
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyAssignCallback.xml16
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyChangeAssignCallback.xml13
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyCreateCallback.xml16
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyDeactivateCallback.xml13
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyDeactivateCallbackNotFound.xml8
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyDeleteCallback.xml16
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyQueryCallback.xml315
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyQueryCallbackVfModule.xml141
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyQueryCallbackVfModuleNoVnf.xml81
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyQueryCallbackVnf.xml82
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyUnassignCallback.xml16
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/StandardSDNCSynchResponse.xml5
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VNFAdapterRestCreateCallback.xml55
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VNFAdapterRestDeleteRequest.xml15
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VNFAdapterRestDeleteResponse.xml56
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VNFAdapterRestUpdateCallback.xml16
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VNFAdapterRestVolumeGroupCallback.xml15
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VfModule-lukewarm.xml10
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VfModule-new-PendingActivation.xml9
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VfModule-new.xml9
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VfModule-supercool.xml27
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VolumeGroup.xml25
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/deleteNetworkResponse_Success.xml3
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/requestDetails.json37
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/schema.json16
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/application-test.yml340
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/applicationContext_forPnfTesting.xml65
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/catalogDBClientProps.properties1
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/logback-test.xml44
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/requestsDBClientProps.properties1
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/stubprocess/GenericStub.bpmn35
305 files changed, 36499 insertions, 0 deletions
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstanceTest.groovy
new file mode 100644
index 0000000000..ae40e9d7c6
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstanceTest.groovy
@@ -0,0 +1,84 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.scripts
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+import org.camunda.bpm.engine.ProcessEngineServices
+import org.camunda.bpm.engine.RepositoryService
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.camunda.bpm.engine.repository.ProcessDefinition
+import org.junit.Before
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.ArgumentCaptor
+import org.mockito.Captor
+import org.mockito.Mockito
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+
+import static org.junit.Assert.assertNotNull
+import static org.mockito.Mockito.*
+
+@RunWith(MockitoJUnitRunner.class)
+class CreateCustomE2EServiceInstanceTest {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(28090);
+
+ @Before
+ public void init() throws IOException {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @Captor
+ static ArgumentCaptor<ExecutionEntity> captor = ArgumentCaptor.forClass(ExecutionEntity.class)
+
+ @Test
+ public void testPrepareInitServiceOperationStatus (){
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("12345")
+ when(mockExecution.getVariable("mso.adapters.openecomp.db.endpoint")).thenReturn("http://localhost:28090/dbadapters/RequestsDbAdapter")
+ CreateCustomE2EServiceInstance obj = new CreateCustomE2EServiceInstance();
+ obj.prepareInitServiceOperationStatus(mockExecution)
+ Mockito.verify(mockExecution, times(5)).setVariable(captor.capture(), captor.capture())
+ def updateVolumeGroupRequest = captor.getValue()
+ assertNotNull(updateVolumeGroupRequest);
+ }
+
+ private ExecutionEntity setupMock() {
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("CreateCustomE2EServiceInstance")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("CreateCustomE2EServiceInstance")
+ when(mockRepositoryService.getProcessDefinition().getId()).thenReturn("100")
+ ProcessEngineServices mockProcessEngineServices = mock(ProcessEngineServices.class)
+ when(mockProcessEngineServices.getRepositoryService()).thenReturn(mockRepositoryService)
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ when(mockExecution.getId()).thenReturn("100")
+ when(mockExecution.getProcessDefinitionId()).thenReturn("CreateCustomE2EServiceInstance")
+ when(mockExecution.getProcessInstanceId()).thenReturn("CreateCustomE2EServiceInstance")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+ return mockExecution
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateGenericAlaCarteServiceInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateGenericAlaCarteServiceInstanceTest.groovy
new file mode 100644
index 0000000000..da0990910a
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateGenericAlaCarteServiceInstanceTest.groovy
@@ -0,0 +1,235 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.scripts
+
+import org.camunda.bpm.engine.ProcessEngineServices
+import org.camunda.bpm.engine.RepositoryService
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.camunda.bpm.engine.repository.ProcessDefinition
+import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.junit.Before
+import org.junit.Rule
+import org.junit.Test
+import org.mockito.MockitoAnnotations
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.bpmn.common.scripts.VidUtils
+
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+
+class CreateGenericAlaCarteServiceInstanceTest {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(8090);
+
+ String Prefix="CRESI_"
+ def utils = new MsoUtils()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils()
+
+ String createDBRequestError =
+"""<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateInfraRequest xmlns:ns="http://org.onap.so/requestsdb">
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>Received error from SDN-C: No availability zone available</statusMessage>
+ <responseBody></responseBody>
+ <requestStatus>FAILED</requestStatus>
+ <vnfOutputs>&lt;network-id&gt;&lt;/network-id&gt;&lt;network-name&gt;&lt;/network-names&gt;</vnfOutputs>
+ </ns:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ String falloutHandlerRequest =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1"
+ xmlns:wfsch="http://org.onap/so/workflow/schema/v1">
+ <request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>b69c9054-da09-4a2c-adf5-51042b62bfac</request-id>
+ <action>CREATE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>Received error from SDN-C: No availability zone available.</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>5300</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ String completeMsoProcessRequest =
+ """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1"
+ xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-info>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <action>CREATE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:status-message>Network has been created successfully.</aetgt:status-message>
+ <aetgt:mso-bpel-name>BPMN Network action: CREATE</aetgt:mso-bpel-name>
+</aetgt:MsoCompletionRequest>"""
+
+ String jsonIncomingRequest =
+ """{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "1de901ed-17af-4b03-bc1f-41659cfa27cb",
+ "modelVersionId": "ace39141-09ec-4068-b06d-ac6b23bdc6e0",
+ "modelName": "demoVLB",
+ "modelVersion": "1.0"
+ },
+ "cloudConfiguration" : {
+ "lcpCloudRegionId": "RegionOne",
+ "tenantId": "onap"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "Demonstration",
+ "subscriberName": "Demonstration"
+ },
+ "requestInfo": {
+ "instanceName": "sample-instance-2",
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "source": "VID",
+ "requestorId":"1234",
+ "suppressRollback": "false"
+ },
+ "requestParameters": {
+ "subscriptionServiceType": "vLB"
+ }
+ }
+ }"""
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+
+ }
+
+ public void initializeVariables(DelegateExecution mockExecution) {
+
+ //verify(mockExecution).setVariable(Prefix + "Success", false)
+
+ //verify(mockExecution).setVariable(Prefix + "CompleteMsoProcessRequest", "")
+ //verify(mockExecution).setVariable(Prefix + "FalloutHandlerRequest", "")
+ //verify(mockExecution).setVariable(Prefix + "isSilentSuccess", false)
+
+ }
+
+ @Test
+ //@Ignore
+ public void preProcessRequest() {
+
+ println "************ preProcessRequest() ************* "
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("bpmnRequest")).thenReturn(jsonIncomingRequest)
+ try{
+
+ // preProcessRequest(DelegateExecution execution)
+ CreateGenericALaCarteServiceInstance createGenericALaCarteServiceInstance = new CreateGenericALaCarteServiceInstance()
+ createGenericALaCarteServiceInstance.preProcessRequest(mockExecution)
+
+ //verify(mockExecution).getVariable("isDebugLogEnabled")
+ //verify(mockExecution).setVariable("prefix", Prefix)
+
+ initializeVariables(mockExecution)
+ //verify(mockExecution).setVariable(Prefix + "Success", false)
+ }catch(Exception e){
+ //ignore
+ }
+ }
+
+ @Test
+ //@Ignore
+ public void sendSyncResponse() {
+
+ println "************ sendSyncResponse ************* "
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("isAsyncProcess")).thenReturn(true)
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ try{
+ // preProcessRequest(DelegateExecution execution)
+ CreateGenericALaCarteServiceInstance createGenericALaCarteServiceInstance = new CreateGenericALaCarteServiceInstance()
+ createGenericALaCarteServiceInstance.sendSyncResponse(mockExecution)
+
+ //verify(mockExecution).setVariable("prefix", Prefix)
+ //verify(mockExecution).setVariable("createServiceRestRequest", "202")
+ }catch(Exception e){
+ //ignore
+ }
+ }
+
+ @Test
+ //@Ignore
+ public void sendSyncError() {
+
+ println "************ sendSyncError ************* "
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("isAsyncProcess")).thenReturn(true)
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ try{
+ CreateGenericALaCarteServiceInstance createGenericALaCarteServiceInstance = new CreateGenericALaCarteServiceInstance()
+ createGenericALaCarteServiceInstance.sendSyncError(mockExecution)
+
+ //verify(mockExecution).setVariable("prefix", Prefix)
+ //verify(mockExecution).setVariable("createServiceRestRequest", "500")
+ }catch(Exception e){
+ //ignore
+ }
+ }
+
+ private ExecutionEntity setupMock() {
+
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("CreateGenericALaCarteSeviceInstance")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("CreateGenericALaCarteSeviceInstance")
+ when(mockRepositoryService.getProcessDefinition().getId()).thenReturn("100")
+ ProcessEngineServices mockProcessEngineServices = mock(ProcessEngineServices.class)
+ when(mockProcessEngineServices.getRepositoryService()).thenReturn(mockRepositoryService)
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+
+ when(mockExecution.getId()).thenReturn("100")
+ when(mockExecution.getProcessDefinitionId()).thenReturn("CreateGenericALaCarteSeviceInstance")
+ when(mockExecution.getProcessInstanceId()).thenReturn("CreateGenericALaCarteSeviceInstance")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+
+ return mockExecution
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateNetworkInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateNetworkInstanceTest.groovy
new file mode 100644
index 0000000000..4d5f506599
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateNetworkInstanceTest.groovy
@@ -0,0 +1,379 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.scripts
+
+import org.camunda.bpm.engine.ProcessEngineServices
+import org.camunda.bpm.engine.RepositoryService
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.camunda.bpm.engine.repository.ProcessDefinition
+import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.junit.Before
+import org.junit.Rule
+import org.junit.Test
+import org.mockito.MockitoAnnotations
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.core.WorkflowException
+
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+
+class CreateNetworkInstanceTest {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(8090);
+
+ String Prefix="CRENI_"
+ def utils = new MsoUtils()
+
+ String createDBRequestError =
+"""<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateInfraRequest xmlns:ns="http://org.onap.so/requestsdb">
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>Received error from SDN-C: No availability zone available</statusMessage>
+ <responseBody></responseBody>
+ <requestStatus>FAILED</requestStatus>
+ <vnfOutputs>&lt;network-id&gt;&lt;/network-id&gt;&lt;network-name&gt;&lt;/network-names&gt;</vnfOutputs>
+ </ns:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ String falloutHandlerRequest =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1"
+ xmlns:wfsch="http://org.onap/so/workflow/schema/v1">
+ <request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>b69c9054-da09-4a2c-adf5-51042b62bfac</request-id>
+ <action>CREATE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>Received error from SDN-C: No availability zone available.</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>5300</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ String completeMsoProcessRequest =
+ """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1"
+ xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-info>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <action>CREATE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:status-message>Network has been created successfully.</aetgt:status-message>
+ <aetgt:mso-bpel-name>BPMN Network action: CREATE</aetgt:mso-bpel-name>
+</aetgt:MsoCompletionRequest>"""
+
+
+String jsonIncomingRequest =
+"""{ "requestDetails": {
+ "modelInfo": {
+ "modelType": "networkTyp",
+ "modelId": "modelId",
+ "modelNameVersionId": "modelNameVersionId",
+ "modelName": "CONTRAIL_EXTERNAL",
+ "modelVersion": "1"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "RDM2WAGPLCP",
+ "tenantId": "7dd5365547234ee8937416c65507d266"
+ },
+ "requestInfo": {
+ "instanceName": "MNS-25180-L-01-dmz_direct_net_1",
+ "source": "VID",
+ "callbackUrl": "",
+ "suppressRollback": true,
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "f70e927b-6087-4974-9ef8-c5e4d5847ca4",
+ "modelInfo": {
+ "modelType": "serviceT",
+ "modelId": "modelI",
+ "modelNameVersionId": "modelNameVersionI",
+ "modelName": "modleNam",
+ "modelVersion": "1"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": [
+ {
+ "name": "someUserParam1",
+ "value": "someValue1"
+ }
+ ]
+ }
+ }}"""
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ public void initializeVariables(DelegateExecution mockExecution) {
+
+ verify(mockExecution).setVariable(Prefix + "Success", false)
+
+ verify(mockExecution).setVariable(Prefix + "CompleteMsoProcessRequest", "")
+ verify(mockExecution).setVariable(Prefix + "FalloutHandlerRequest", "")
+ verify(mockExecution).setVariable(Prefix + "isSilentSuccess", false)
+
+ }
+
+ @Test
+ //@Ignore
+ public void preProcessRequest() {
+
+ println "************ preProcessRequest() ************* "
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("bpmnRequest")).thenReturn(jsonIncomingRequest)
+
+
+ // preProcessRequest(DelegateExecution execution)
+ CreateNetworkInstance CreateNetworkInstance = new CreateNetworkInstance()
+ CreateNetworkInstance.preProcessRequest(mockExecution)
+
+ //verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ initializeVariables(mockExecution)
+ //verify(mockExecution).setVariable(Prefix + "Success", false)
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void getNetworkModelInfo() {
+
+ println "************ getNetworkModelInfo() ************* "
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+
+ // preProcessRequest(DelegateExecution execution)
+ CreateNetworkInstance CreateNetworkInstance = new CreateNetworkInstance()
+ CreateNetworkInstance.getNetworkModelInfo(mockExecution)
+
+ //verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ }
+
+ @Test
+ //@Ignore
+ public void sendSyncResponse() {
+
+ println "************ sendSyncResponse ************* "
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("isAsyncProcess")).thenReturn(true)
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+
+ // preProcessRequest(DelegateExecution execution)
+ CreateNetworkInstance CreateNetworkInstance = new CreateNetworkInstance()
+ CreateNetworkInstance.sendSyncResponse(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable("CreateNetworkInstanceResponseCode", "202")
+
+ }
+
+ @Test
+ //@Ignore
+ public void sendSyncError() {
+
+ println "************ sendSyncError ************* "
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("isAsyncProcess")).thenReturn(true)
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+
+ CreateNetworkInstance CreateNetworkInstance = new CreateNetworkInstance()
+ CreateNetworkInstance.sendSyncError(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable("CreateNetworkInstanceResponseCode", "500")
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareDBRequestError() {
+
+ println "************ prepareDBRequestError ************* "
+
+ WorkflowException sndcWorkflowException = new WorkflowException("CreateNetworkInstance", 500, "Received error from SDN-C: No availability zone available")
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(sndcWorkflowException)
+ //when(mockExecution.getVariable("msoRequestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable(Prefix + "requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("networkId")).thenReturn("")
+ when(mockExecution.getVariable("networkName")).thenReturn("")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.adapters.db.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ // preProcessRequest(DelegateExecution execution)
+ CreateNetworkInstance CreateNetworkInstance = new CreateNetworkInstance()
+ CreateNetworkInstance.prepareDBRequestError(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "createDBRequest", createDBRequestError)
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void prepareCompletion() {
+
+ println "************ postProcessResponse ************* "
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable(Prefix + "dbReturnCode")).thenReturn("200")
+
+ // postProcessResponse(DelegateExecution execution)
+ CreateNetworkInstance CreateNetworkInstance = new CreateNetworkInstance()
+ CreateNetworkInstance.prepareCompletion(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "Success", true)
+ verify(mockExecution).setVariable(Prefix + "CompleteMsoProcessRequest", completeMsoProcessRequest)
+
+ }
+
+ @Test
+ //@Ignore
+ public void buildErrorResponse() {
+
+ println "************ buildErrorResponse ************* "
+
+
+ WorkflowException sndcWorkflowException = new WorkflowException("CreateNetworkInstance", 5300, "Received error from SDN-C: No availability zone available.")
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("b69c9054-da09-4a2c-adf5-51042b62bfac")
+ //when(mockExecution.getVariable("WorkflowException")).thenReturn(sndcWorkflowException)
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(sndcWorkflowException)
+
+ // buildErrorResponse(DelegateExecution execution)
+ CreateNetworkInstance CreateNetworkInstance = new CreateNetworkInstance()
+ CreateNetworkInstance.buildErrorResponse(mockExecution)
+
+ verify(mockExecution, atLeast(1)).setVariable("prefix", "CRENI_")
+ verify(mockExecution).setVariable(Prefix + "FalloutHandlerRequest", falloutHandlerRequest)
+
+ //MockitoDebuggerImpl debugger = new MockitoDebuggerImpl()
+ //debugger.printInvocations(mockExecution)
+
+ }
+
+ @Test
+ //@Ignore
+ public void postProcessResponse() {
+
+ println "************ postProcessResponse() ************* "
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("CMSO_ResponseCode")).thenReturn("200")
+
+ // postProcessResponse(DelegateExecution execution)
+ CreateNetworkInstance CreateNetworkInstance = new CreateNetworkInstance()
+ CreateNetworkInstance.postProcessResponse(mockExecution)
+
+ //verify(mockExecution).getVariable("isDebugLogEnabled")
+ //verify(mockExecution).setVariable("prefix", Prefix)
+
+ verify(mockExecution).setVariable(Prefix + "Success", true)
+
+ }
+
+ @Test
+ //@Ignore
+ public void processRollbackData() {
+
+ println "************ callDBCatalog() ************* "
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+
+ // preProcessRequest(DelegateExecution execution)
+ CreateNetworkInstance CreateNetworkInstance = new CreateNetworkInstance()
+ CreateNetworkInstance.processRollbackData(mockExecution)
+
+// verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ }
+
+ private ExecutionEntity setupMock() {
+
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("CreateNetworkInstance")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("CreateNetworkInstance")
+ when(mockRepositoryService.getProcessDefinition().getId()).thenReturn("100")
+ ProcessEngineServices mockProcessEngineServices = mock(ProcessEngineServices.class)
+ when(mockProcessEngineServices.getRepositoryService()).thenReturn(mockRepositoryService)
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+
+ when(mockExecution.getId()).thenReturn("100")
+ when(mockExecution.getProcessDefinitionId()).thenReturn("CreateNetworkInstance")
+ when(mockExecution.getProcessInstanceId()).thenReturn("CreateNetworkInstance")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+
+ return mockExecution
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleInfraTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleInfraTest.groovy
new file mode 100644
index 0000000000..77220da94f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleInfraTest.groovy
@@ -0,0 +1,96 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.scripts
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+import org.camunda.bpm.engine.ProcessEngineServices
+import org.camunda.bpm.engine.RepositoryService
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.camunda.bpm.engine.repository.ProcessDefinition
+import org.junit.Before
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.ArgumentCaptor
+import org.mockito.Captor
+import org.mockito.Mockito
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+
+import static org.mockito.Mockito.mock
+import static org.mockito.Mockito.when
+
+@RunWith(MockitoJUnitRunner.class)
+class CreateVfModuleInfraTest {
+
+ def prefix = "CVFMI_"
+ def requestInfo = "<requestInfo><request-id>12345</request-id></requestInfo>"
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(28090)
+
+ @Captor
+ static ArgumentCaptor<ExecutionEntity> captor = ArgumentCaptor.forClass(ExecutionEntity.class)
+
+ @Before
+ void init() throws IOException {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @Test
+ void testPrepareUpdateInfraRequest() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(prefix)
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(prefix + "vnfId")).thenReturn("12345")
+ when(mockExecution.getVariable(prefix + "requestInfo")).thenReturn(requestInfo)
+ when(mockExecution.getVariable(prefix + "vfModuleId")).thenReturn("12345")
+ when(mockExecution.getVariable(prefix + "vfModuleName")).thenReturn("12345")
+ when(mockExecution.getVariable("mso.adapters.openecomp.db.endpoint")).thenReturn("http://mso.mso.testlab.openecomp.org:8080/dbadapters/RequestsDbAdapter")
+
+ CreateVfModuleInfra obj = new CreateVfModuleInfra()
+ obj.prepareUpdateInfraRequest(mockExecution)
+ Mockito.verify(mockExecution).setVariable(prefix + "dbAdapterEndpoint", "http://mso.mso.testlab.openecomp.org:8080/dbadapters/RequestsDbAdapter")
+ }
+
+
+
+ private static ExecutionEntity setupMock() {
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("CreateVfModuleInfra")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("CreateVfModuleInfra")
+ when(mockRepositoryService.getProcessDefinition().getId()).thenReturn("100")
+ ProcessEngineServices mockProcessEngineServices = mock(ProcessEngineServices.class)
+ when(mockProcessEngineServices.getRepositoryService()).thenReturn(mockRepositoryService)
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getId()).thenReturn("100")
+ when(mockExecution.getProcessDefinitionId()).thenReturn("CreateVfModuleInfra")
+ when(mockExecution.getProcessInstanceId()).thenReturn("CreateVfModuleInfra")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+
+ return mockExecution
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1Test.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1Test.groovy
new file mode 100644
index 0000000000..2b437d875e
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1Test.groovy
@@ -0,0 +1,208 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.scripts
+
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.junit.Before
+import org.junit.Ignore
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.ArgumentCaptor
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+import org.onap.so.bpmn.common.scripts.MsoGroovyTest
+
+import static org.junit.Assert.assertEquals
+import static org.mockito.Mockito.*
+
+@RunWith(MockitoJUnitRunner.class)
+class CreateVfModuleVolumeInfraV1Test extends MsoGroovyTest {
+
+ def jsonRequest = """
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "volumeGroup",
+ "modelId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelNameVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12::base::module-0",
+ "modelVersion": "1"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "MSOTESTVOL101a-vSAMP12_base_vol_module-0",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "{service-instance-id}",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantUuid": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "Test",
+ "modelVersion": "2.0"
+ }
+ }
+ }, {
+ "relatedInstance": {
+ "instanceId": "{vnf-instance-id}",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelNameVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1",
+ "modelInstanceName": "vSAMP12"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "serviceId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "userParams": [
+ {"name": "vnfName", "value": "STMTN5MMSC20" },
+ {"name": "vnfName2", "value": "US1117MTSNJVBR0246" },
+ {"name": "vnfNmInformation", "value": "" },
+ {"name": "vnfType", "value": "pcrf-capacity" },
+ {"name": "vnfId", "value": "skask" },
+ {"name": "vnfStackId", "value": "slowburn" },
+ {"name": "vnfStatus", "value": "created" },
+ {"name": "aicCloudRegion", "value": "MDTWNJ21" },
+ {"name": "availabilityZone", "value": "slcp3-esx-az01" },
+ {"name": "oamNetworkName", "value": "VLAN-OAM-1323" },
+ {"name": "vmName", "value": "slcp34246vbc246ceb" },
+ {"name": "ipagNetworkId", "value": "970cd2b9-7f09-4a12-af47-182ea38ba1f0" },
+ {"name": "vpeNetworkId", "value": "545cc2c3-1930-4100-b534-5d82d0e12bb6" }
+ ]
+ }
+ }
+}
+"""
+
+ def volumeRequestXml = """<volume-request xmlns="http://www.w3.org/2001/XMLSchema">
+ <request-info>
+ <action>CREATE_VF_MODULE_VOL</action>
+ <source>VID</source>
+ <service-instance-id/>
+ </request-info>
+ <volume-inputs>
+ <volume-group-id/>
+ <volume-group-name>MSOTESTVOL101a-vSAMP12_base_vol_module-0</volume-group-name>
+ <vnf-type>Test/vSAMP12</vnf-type>
+ <vf-module-model-name>vSAMP12::base::module-0</vf-module-model-name>
+ <asdc-service-model-version>2.0</asdc-service-model-version>
+ <aic-cloud-region>mdt1</aic-cloud-region>
+ <tenant-id>88a6ca3ee0394ade9403f075db23167e</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>true</backout-on-failure>
+ <model-customization-id/>
+ </volume-inputs>
+ <volume-params>
+ <param name="vnf_name">STMTN5MMSC20</param>
+ <param name="vnf_name2">US1117MTSNJVBR0246</param>
+ <param name="vnf_nm_information"/>
+ <param name="vnf_type">pcrf-capacity</param>
+ <param name="vnf_id">skask</param>
+ <param name="vnf_stack_id">slowburn</param>
+ <param name="vnf_status">created</param>
+ <param name="aic_cloud_region">MDTWNJ21</param>
+ <param name="availability_zone">slcp3-esx-az01</param>
+ <param name="oam_network_name">VLAN-OAM-1323</param>
+ <param name="vm_name">slcp34246vbc246ceb</param>
+ <param name="ipag_network_id">970cd2b9-7f09-4a12-af47-182ea38ba1f0</param>
+ <param name="vpe_network_id">545cc2c3-1930-4100-b534-5d82d0e12bb6</param>
+ </volume-params>
+</volume-request>"""
+
+ def completeMsoRequestXml = """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1"
+ xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-info>
+ <request-id>1234</request-id>
+ <action>CREATE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:status-message>Volume Group has been created successfully.</aetgt:status-message>
+ <aetgt:mso-bpel-name>BPMN VF Module Volume action: CREATE</aetgt:mso-bpel-name>
+</aetgt:MsoCompletionRequest>"""
+
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+
+ @Test
+ @Ignore
+ public void testPreProcessRequest() {
+
+ ExecutionEntity mockExecution = setupMock('CreateVfModuleVolumeInfraV1')
+
+ when(mockExecution.getVariable("prefix")).thenReturn('CVMVINFRAV1_')
+ when(mockExecution.getVariable("bpmnRequest")).thenReturn(jsonRequest)
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn('')
+ when(mockExecution.getVariable("vnfId")).thenReturn('test-vnf-id')
+ when(mockExecution.getVariable("mso-request-id")).thenReturn('1234')
+ when(mockExecution.getVariable("mso.rollback")).thenReturn('true')
+
+ CreateVfModuleVolumeInfraV1 createVfModuleVolumeInfraV1 = new CreateVfModuleVolumeInfraV1()
+ createVfModuleVolumeInfraV1.preProcessRequest(mockExecution, 'true')
+
+ // Capture the arguments to setVariable
+ ArgumentCaptor<String> captor1 = ArgumentCaptor.forClass(String.class);
+ ArgumentCaptor<String> captor2 = ArgumentCaptor.forClass(String.class);
+
+ verify(mockExecution, times(15)).setVariable(captor1.capture(), captor2.capture())
+
+ List<String> arg2List = captor2.getAllValues()
+ String volumeRequestActual = arg2List.get(6)
+ String isVidRequestActual = arg2List.get(8)
+
+ assertEquals(volumeRequestXml, volumeRequestActual.trim())
+ assertEquals('true', isVidRequestActual)
+ }
+
+ @Test
+ public void testPostProcessResponse() {
+
+ ExecutionEntity mockExecution = setupMock('CreateVfModuleVolumeInfraV1')
+ when(mockExecution.getVariable("dbReturnCode")).thenReturn('000')
+ when(mockExecution.getVariable("CVMVINFRAV1_createDBResponse")).thenReturn('')
+ when(mockExecution.getVariable("mso-request-id")).thenReturn('1234')
+ when(mockExecution.getVariable("CVMVINFRAV1_source")).thenReturn('VID')
+
+ CreateVfModuleVolumeInfraV1 createVfModuleVolumeInfraV1 = new CreateVfModuleVolumeInfraV1()
+ createVfModuleVolumeInfraV1.postProcessResponse(mockExecution, 'true')
+
+ verify(mockExecution).setVariable('CVMVINFRAV1_Success', true)
+ verify(mockExecution).setVariable('CVMVINFRAV1_CompleteMsoProcessRequest', completeMsoRequestXml)
+ }
+
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstanceTest.groovy
new file mode 100644
index 0000000000..95259e9ec0
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstanceTest.groovy
@@ -0,0 +1,148 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.scripts
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.junit.Before
+import org.junit.BeforeClass
+import org.junit.Rule
+import org.junit.Test
+import org.mockito.MockitoAnnotations
+import org.onap.so.bpmn.mock.FileUtil
+import org.onap.so.bpmn.vcpe.scripts.GroovyTestBase
+
+import static org.mockito.Mockito.verify
+import static org.mockito.Mockito.when
+
+class DeleteCustomE2EServiceInstanceTest extends GroovyTestBase {
+
+ private static String request
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(GroovyTestBase.PORT)
+
+ String Prefix = "CVRCS_"
+ String RbType = "DCRENI_"
+
+ @BeforeClass
+ public static void setUpBeforeClass() {
+ request = FileUtil.readResourceFile("__files/InfrastructureFlows/DeleteCustomE2EService.json")
+ }
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ public DeleteCustomE2EServiceInstanceTest(){
+ super("DeleteCustomE2EServiceInstance")
+ }
+ @Test
+ public void preProcessRequestTest () {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+ DeleteCustomE2EServiceInstance instance = new DeleteCustomE2EServiceInstance()
+ mex.setVariable("isDebugLogEnabled","true")
+ instance.preProcessRequest(mex);
+
+ verify(mex).getVariable(GroovyTestBase.DBGFLAG)
+
+ Map<String,String> userParams = new HashMap<>()
+ userParams.put("someUserParam","someValue")
+
+ verify(mex).setVariable("prefix", "DELSI_")
+ verify(mex).setVariable("msoRequestId", "mri")
+ verify(mex).setVariable("source", "CCD")
+ verify(mex).setVariable("operationType", "DELETE")
+ verify(mex).setVariable("globalSubscriberId", "38829939920000")
+ verify(mex).setVariable("serviceInputParams",userParams)
+ }
+
+ @Test
+ public void sendSyncResponseTest() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+ DeleteCustomE2EServiceInstance instance = new DeleteCustomE2EServiceInstance()
+ instance.sendSyncResponse(mex)
+ verify(mex).setVariable("DeleteCustomE2EServiceInstanceWorkflowResponseSent", "true")
+ }
+
+ @Test
+ public void prepareCompletionRequestTest(){
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+ DeleteCustomE2EServiceInstance instance = new DeleteCustomE2EServiceInstance()
+ instance.prepareCompletionRequest(mex)
+ String msoComplitionRequest = FileUtil.readResourceFile("__files/GenericFlows/MsoCompletionRequest.xml")
+ //verify(mex).setVariable("completionRequest", msoComplitionRequest)
+ }
+
+ @Test
+ public void sendSyncErrorTest(){
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+ DeleteCustomE2EServiceInstance instance = new DeleteCustomE2EServiceInstance()
+ instance.sendSyncError(mex)
+
+ }
+
+ @Test
+ public void prepareFalloutRequest(){
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+ DeleteCustomE2EServiceInstance instance = new DeleteCustomE2EServiceInstance()
+ instance.prepareFalloutRequest(mex)
+ String requestInfo =
+ """<request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>null</request-id>
+ <action>DELETE</action>
+ <source>null</source>
+ </request-info>"""
+ //verify(mex).setVariable("falloutRequest", requestInfo)
+ }
+
+ @Test
+ public void processJavaExceptionTest(){
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+ DeleteCustomE2EServiceInstance instance = new DeleteCustomE2EServiceInstance()
+ instance.processJavaException()
+ }
+
+
+ private void initPreProcess(ExecutionEntity mex) {
+ when(mex.getVariable(GroovyTestBase.DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("bpmnRequest")).thenReturn(request)
+ when(mex.getVariable("mso-request-id")).thenReturn("mri")
+ when(mex.getVariable("serviceType")).thenReturn("VoLTE")
+ when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
+ when(mex.getVariable("requestAction")).thenReturn("ra")
+ when(mex.getVariable("operationId")).thenReturn("59960003992")
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteGenericAlaCarteServiceInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteGenericAlaCarteServiceInstanceTest.groovy
new file mode 100644
index 0000000000..b459710479
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteGenericAlaCarteServiceInstanceTest.groovy
@@ -0,0 +1,125 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.scripts
+
+import org.camunda.bpm.engine.ProcessEngineServices
+import org.camunda.bpm.engine.RepositoryService
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.camunda.bpm.engine.repository.ProcessDefinition
+import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.junit.Before
+import org.junit.Rule
+import org.junit.Test
+import org.mockito.MockitoAnnotations
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.bpmn.common.scripts.VidUtils
+
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+
+class DeleteGenericAlaCarteServiceInstanceTest {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(8090);
+
+ String Prefix="DELSI_"
+ def utils = new MsoUtils()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils()
+
+ String jsonIncomingRequest =
+ """{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "1de901ed-17af-4b03-bc1f-41659cfa27cb",
+ "modelVersionId": "ace39141-09ec-4068-b06d-ac6b23bdc6e0",
+ "modelName": "demoVLB",
+ "modelVersion": "1.0"
+ },
+ "cloudConfiguration" : {
+ "lcpCloudRegionId": "RegionOne",
+ "tenantId": "onap"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "Demonstration",
+ "subscriberName": "Demonstration"
+ },
+ "requestInfo": {
+ "instanceName": "sample-instance-2",
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "source": "VID",
+ "requestorId":"1234",
+ "suppressRollback": "false"
+ },
+ "requestParameters": {
+ "subscriptionServiceType": "vLB"
+ }
+ }
+ }"""
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+
+ }
+
+ public void initializeVariables(DelegateExecution mockExecution) {
+
+ verify(mockExecution).setVariable(Prefix + "Success", false)
+
+ verify(mockExecution).setVariable(Prefix + "CompleteMsoProcessRequest", "")
+ verify(mockExecution).setVariable(Prefix + "FalloutHandlerRequest", "")
+ verify(mockExecution).setVariable(Prefix + "isSilentSuccess", false)
+
+ }
+
+ @Test
+ //@Ignore
+ public void preProcessRequest() {
+
+ println "************ preProcessRequest() ************* "
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("bpmnRequest")).thenReturn(jsonIncomingRequest)
+
+ try {
+ // preProcessRequest(DelegateExecution execution)
+ DeleteGenericALaCarteServiceInstance deleteGenericALaCarteServiceInstance = new DeleteGenericALaCarteServiceInstance()
+ deleteGenericALaCarteServiceInstance.preProcessRequest(mockExecution)
+
+ verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ initializeVariables(mockExecution)
+ //verify(mockExecution).setVariable(Prefix + "Success", false)
+ }catch(Exception e){
+ //ignore
+ }
+
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteNetworkInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteNetworkInstanceTest.groovy
new file mode 100644
index 0000000000..9b7d7ee21f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteNetworkInstanceTest.groovy
@@ -0,0 +1,418 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.scripts
+
+
+import static org.mockito.Mockito.*
+
+import org.apache.commons.lang3.*
+import org.camunda.bpm.engine.ProcessEngineServices
+import org.camunda.bpm.engine.RepositoryService
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.camunda.bpm.engine.repository.ProcessDefinition
+import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.junit.Before
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.core.WorkflowException
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+
+
+@RunWith(MockitoJUnitRunner.class)
+class DeleteNetworkInstanceTest {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(8090);
+
+ String Prefix="DELNI_"
+ def utils = new MsoUtils()
+
+ String falloutHandlerRequest =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1"
+ xmlns:wfsch="http://org.onap/so/workflow/schema/v1">
+ <request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>b69c9054-da09-4a2c-adf5-51042b62bfac</request-id>
+ <action>DELETE</action>
+ <source>PORTAL</source>
+ </request-info>
+ <aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>Received error from SDN-C: No availability zone available</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>5300</aetgt:ErrorCode>
+ <aetgt:SourceSystemErrorCode>200</aetgt:SourceSystemErrorCode>
+</aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ String falloutHandlerRequestObj =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1"
+ xmlns:wfsch="http://org.onap/so/workflow/schema/v1">
+ <request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>b69c9054-da09-4a2c-adf5-51042b62bfac</request-id>
+ <action>DELETE</action>
+ <source>PORTAL</source>
+ </request-info>
+ <aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>Received error from SDN-C: No availability zone available</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ String completeMsoProcessRequest =
+ """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1"
+ xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-info>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <action>DELETE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:status-message>Network has been deleted successfully.</aetgt:status-message>
+ <aetgt:mso-bpel-name>BPMN Network action: DELETE</aetgt:mso-bpel-name>
+</aetgt:MsoCompletionRequest>"""
+
+String deleteDBRequest =
+"""<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:ns="http://org.onap.so/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateInfraRequest>
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>Network successfully deleted.</statusMessage>
+ <responseBody/>
+ <requestStatus>COMPLETED</requestStatus>
+ <progress>100</progress>
+ <vnfOutputs>&lt;network-outputs xmlns="http://org.onap/so/infra/vnf-request/v1" xmlns:aetgt="http://org.onap/so/infra/vnf-request/v1" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"/&gt;</vnfOutputs>
+ </ns:updateInfraRequest>
+ </soapenv:Body>
+</soapenv:Envelope>"""
+
+String deleteDBRequestErrorObj =
+"""<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateInfraRequest xmlns:ns="http://org.onap.so/requestsdb">
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>Received error from SDN-C: No availability zone available</statusMessage>
+ <responseBody></responseBody>
+ <requestStatus>FAILED</requestStatus>
+ <progress></progress>
+ <vnfOutputs>&lt;network-outputs xmlns="http://org.onap/so/infra/vnf-request/v1" xmlns:aetgt="http://org.onap/so/infra/vnf-request/v1" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"/&gt;</vnfOutputs>
+ </ns:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+String deleteDBRequestErrorString =
+"""<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateInfraRequest xmlns:ns="http://org.onap.so/requestsdb">
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>Received error from SDN-C: No availability zone available</statusMessage>
+ <responseBody></responseBody>
+ <requestStatus>FAILED</requestStatus>
+ <progress></progress>
+ <vnfOutputs>&lt;network-outputs xmlns="http://org.onap/so/infra/vnf-request/v1" xmlns:aetgt="http://org.onap/so/infra/vnf-request/v1" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"/&gt;</vnfOutputs>
+ </ns:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ String jsonIncomingRequest =
+ """{ "requestDetails": {
+ "modelInfo": {
+ "modelType": "networkTyp",
+ "modelId": "modelId",
+ "modelNameVersionId": "modelNameVersionId",
+ "modelName": "CONTRAIL_EXTERNAL",
+ "modelVersion": "1"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "RDM2WAGPLCP",
+ "tenantId": "7dd5365547234ee8937416c65507d266"
+ },
+ "requestInfo": {
+ "instanceName": "MNS-25180-L-01-dmz_direct_net_1",
+ "source": "VID",
+ "callbackUrl": "",
+ "suppressRollback": true,
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "f70e927b-6087-4974-9ef8-c5e4d5847ca4",
+ "modelInfo": {
+ "modelType": "serviceT",
+ "modelId": "modelI",
+ "modelNameVersionId": "modelNameVersionI",
+ "modelName": "modleNam",
+ "modelVersion": "1"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": [
+ {
+ "name": "someUserParam1",
+ "value": "someValue1"
+ }
+ ]
+ }
+ }}"""
+
+// - - - - - - - -
+
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ @Test
+ //@Ignore
+ public void preProcessRequest() {
+
+ println "************ preProcessRequest_Payload ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("bpmnRequest")).thenReturn(jsonIncomingRequest)
+
+ DeleteNetworkInstance DeleteNetworkInstance = new DeleteNetworkInstance()
+ DeleteNetworkInstance.preProcessRequest(mockExecution)
+
+ verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ //verify variable initialization
+ initializeVariables(mockExecution)
+
+
+ }
+
+ public void initializeVariables (DelegateExecution mockExecution) {
+
+
+ verify(mockExecution).setVariable(Prefix + "Success", false)
+
+ verify(mockExecution).setVariable(Prefix + "CompleteMsoProcessRequest", "")
+ verify(mockExecution).setVariable(Prefix + "FalloutHandlerRequest", "")
+ verify(mockExecution).setVariable(Prefix + "isSilentSuccess", false)
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void getNetworkModelInfo() {
+
+ println "************ getNetworkModelInfo() ************* "
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+
+ // preProcessRequest(DelegateExecution execution)
+ DeleteNetworkInstance DeleteNetworkInstance = new DeleteNetworkInstance()
+ DeleteNetworkInstance.getNetworkModelInfo(mockExecution)
+
+ verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ }
+
+ @Test
+ //@Ignore
+ public void sendSyncResponse() {
+
+ println "************ sendSyncResponse ************* "
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("isAsyncProcess")).thenReturn(true)
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+
+ // preProcessRequest(DelegateExecution execution)
+ DeleteNetworkInstance DeleteNetworkInstance = new DeleteNetworkInstance()
+ DeleteNetworkInstance.sendSyncResponse(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable("DeleteNetworkInstanceResponseCode", "202")
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void sendSyncError() {
+
+ println "************ sendSyncError ************* "
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("isAsyncProcess")).thenReturn(true)
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+
+ DeleteNetworkInstance DeleteNetworkInstance = new DeleteNetworkInstance()
+ DeleteNetworkInstance.sendSyncError(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable("DeleteNetworkInstanceResponseCode", "500")
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void prepareCompletion() {
+
+ println "************ postProcessResponse ************* "
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "source")).thenReturn("PORTAL")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+
+ // postProcessResponse(DelegateExecution execution)
+ DeleteNetworkInstance DeleteNetworkInstance = new DeleteNetworkInstance()
+ DeleteNetworkInstance.prepareCompletion(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "CompleteMsoProcessRequest", completeMsoProcessRequest)
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void prepareDBRequestError() {
+
+ println "************ prepareDBRequestError ************* "
+
+ WorkflowException sndcWorkflowExceptionObj = new WorkflowException("CreateNetworkV2", 500, "Received error from SDN-C: No availability zone available")
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable(Prefix + "requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(sndcWorkflowExceptionObj)
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.adapters.db.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ // preProcessRequest(DelegateExecution execution)
+ DeleteNetworkInstance DeleteNetworkInstance = new DeleteNetworkInstance()
+ DeleteNetworkInstance.prepareDBRequestError(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "deleteDBRequest", deleteDBRequestErrorObj)
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void postProcessResponse() {
+
+ println "************ postProcessResponse ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("CMSO_ResponseCode")).thenReturn("200")
+
+ // postProcessResponse(DelegateExecution execution)
+ DeleteNetworkInstance DeleteNetworkInstance = new DeleteNetworkInstance()
+ DeleteNetworkInstance.postProcessResponse(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "Success", true)
+
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void buildErrorResponse_FalloutHandlerRequest() {
+
+ println "************ buildErrorResponse ************* "
+
+ WorkflowException sndcWorkflowExceptionObj = new WorkflowException("DeleteNetworkInstance", 7000, "Received error from SDN-C: No availability zone available")
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("b69c9054-da09-4a2c-adf5-51042b62bfac")
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(sndcWorkflowExceptionObj)
+ when(mockExecution.getVariable(Prefix + "source")).thenReturn("PORTAL")
+
+ // buildErrorResponse(DelegateExecution execution)
+ DeleteNetworkInstance DeleteNetworkInstance = new DeleteNetworkInstance()
+ DeleteNetworkInstance.buildErrorResponse(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "Success", false)
+ verify(mockExecution).setVariable(Prefix + "FalloutHandlerRequest", falloutHandlerRequestObj)
+
+ }
+
+
+ private ExecutionEntity setupMock() {
+
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("DeleteNetworkInstance")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("DeleteNetworkInstance")
+ when(mockRepositoryService.getProcessDefinition().getId()).thenReturn("100")
+ ProcessEngineServices mockProcessEngineServices = mock(ProcessEngineServices.class)
+ when(mockProcessEngineServices.getRepositoryService()).thenReturn(mockRepositoryService)
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+
+ when(mockExecution.getId()).thenReturn("100")
+ when(mockExecution.getProcessDefinitionId()).thenReturn("DeleteNetworkInstance")
+ when(mockExecution.getProcessInstanceId()).thenReturn("DeleteNetworkInstance")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+
+ return mockExecution
+
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1Test.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1Test.groovy
new file mode 100644
index 0000000000..0bce32716f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1Test.groovy
@@ -0,0 +1,167 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.scripts
+
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+import org.onap.so.bpmn.common.scripts.MsoGroovyTest
+import org.onap.so.bpmn.core.WorkflowException
+
+import static org.mockito.Mockito.verify
+import static org.mockito.Mockito.when
+
+@RunWith(MockitoJUnitRunner.class)
+class DeleteVfModuleVolumeInfraV1Test extends MsoGroovyTest {
+
+ def deleteVnfAdapterRequestXml = """<deleteVolumeGroupRequest>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <tenantId>fba1bd1e195a404cacb9ce17a9b2b421</tenantId>
+ <volumeGroupId>78987</volumeGroupId>
+ <volumeGroupStackId/>
+ <skipAAI>true</skipAAI>
+ <msoRequest>
+ <requestId>TEST-REQUEST-ID-0123</requestId>
+ <serviceInstanceId>1234</serviceInstanceId>
+ </msoRequest>
+ <messageId>ebb9ef7b-a6a5-40e6-953e-f868f1767677</messageId>
+ <notificationUrl>http://localhost:28080/mso/WorkflowMessage/VNFAResponse/ebb9ef7b-a6a5-40e6-953e-f868f1767677</notificationUrl>
+</deleteVolumeGroupRequest>"""
+
+ def dbRequestXml = """<soapenv:Envelope xmlns:req="http://org.onap.so/requestsdb"
+ xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <req:updateInfraRequest>
+ <requestId>TEST-REQUEST-ID-0123</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>VolumeGroup successfully deleted</statusMessage>
+ <requestStatus>COMPLETE</requestStatus>
+ <progress>100</progress>
+ <vnfOutputs/>
+ </req:updateInfraRequest>
+ </soapenv:Body>
+</soapenv:Envelope>"""
+
+ def completionRequestXml = """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1"
+ xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-info>
+ <request-id>TEST-REQUEST-ID-0123</request-id>
+ <action>DELETE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:status-message>Volume Group has been deleted successfully.</aetgt:status-message>
+ <aetgt:mso-bpel-name>BPMN VF Module Volume action: DELETE</aetgt:mso-bpel-name>
+</aetgt:MsoCompletionRequest>"""
+
+ def falloutHandlerRequestXml = """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1"
+ xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-info>
+ <request-id>TEST-REQUEST-ID-0123</request-id>
+ <action>DELETE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:WorkflowException>
+ <aetgt:ErrorMessage>Unexpected Error</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>5000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+</aetgt:FalloutHandlerRequest>"""
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+
+ @Test
+ public void testPrepareVnfAdapterDeleteRequest() {
+
+ ExecutionEntity mockExecution = setupMock('DeleteVfModuleVolumeInfraV1')
+ when(mockExecution.getVariable("DELVfModVol_cloudRegion")).thenReturn('RDM2WAGPLCP')
+ when(mockExecution.getVariable("DELVfModVol_tenantId")).thenReturn('fba1bd1e195a404cacb9ce17a9b2b421')
+ when(mockExecution.getVariable("DELVfModVol_volumeGroupId")).thenReturn('78987')
+ when(mockExecution.getVariable("DELVfModVol_volumeGroupHeatStackId")).thenReturn('')
+ when(mockExecution.getVariable("DELVfModVol_requestId")).thenReturn('TEST-REQUEST-ID-0123')
+ when(mockExecution.getVariable("DELVfModVol_serviceId")).thenReturn('1234')
+ when(mockExecution.getVariable("DELVfModVol_messageId")).thenReturn('ebb9ef7b-a6a5-40e6-953e-f868f1767677')
+ when(mockExecution.getVariable("mso.workflow.message.endpoint")).thenReturn('http://localhost:28080/mso/WorkflowMessage')
+ when(mockExecution.getVariable("mso.use.qualified.host")).thenReturn('')
+
+ DeleteVfModuleVolumeInfraV1 myproc = new DeleteVfModuleVolumeInfraV1()
+ myproc.prepareVnfAdapterDeleteRequest(mockExecution, 'true')
+
+ verify(mockExecution).setVariable("DELVfModVol_deleteVnfARequest", deleteVnfAdapterRequestXml)
+
+ }
+
+ @Test
+ //@Ignore
+ public void testPrepareDbRequest() {
+
+ ExecutionEntity mockExecution = setupMock('DeleteVfModuleVolumeInfraV1')
+ when(mockExecution.getVariable("DELVfModVol_requestId")).thenReturn('TEST-REQUEST-ID-0123')
+ when(mockExecution.getVariable("DELVfModVol_volumeOutputs")).thenReturn('')
+ when(mockExecution.getVariable("mso.adapters.db.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ DeleteVfModuleVolumeInfraV1 myproc = new DeleteVfModuleVolumeInfraV1()
+ myproc.prepareDBRequest(mockExecution, 'true')
+
+ verify(mockExecution).setVariable("DELVfModVol_updateInfraRequest", dbRequestXml)
+ }
+
+ @Test
+ public void testPrepareCompletionHandlerRequest() {
+
+ ExecutionEntity mockExecution = setupMock('DeleteVfModuleVolumeInfraV1')
+ when(mockExecution.getVariable("mso-request-id")).thenReturn('TEST-REQUEST-ID-0123')
+ when(mockExecution.getVariable("DELVfModVol_source")).thenReturn('VID')
+
+ DeleteVfModuleVolumeInfraV1 myproc = new DeleteVfModuleVolumeInfraV1()
+ myproc.prepareCompletionHandlerRequest(mockExecution, 'true')
+
+ verify(mockExecution).setVariable("DELVfModVol_CompleteMsoProcessRequest", completionRequestXml)
+ }
+
+ @Test
+ public void testPrepareFalloutHandler() {
+
+ WorkflowException workflowException = new WorkflowException('DeleteVfModuleVolumeInfraV1', 5000, 'Unexpected Error')
+
+ ExecutionEntity mockExecution = setupMock('DeleteVfModuleVolumeInfraV1')
+
+ when(mockExecution.getVariable("DELVfModVol_requestId")).thenReturn('TEST-REQUEST-ID-0123')
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(workflowException)
+ when(mockExecution.getVariable("DELVfModVol_source")).thenReturn('VID')
+
+ DeleteVfModuleVolumeInfraV1 myproc = new DeleteVfModuleVolumeInfraV1()
+ myproc.prepareFalloutHandler(mockExecution, 'true')
+
+ verify(mockExecution).setVariable("DELVfModVol_Success", false)
+ verify(mockExecution).setVariable("DELVfModVol_FalloutHandlerRequest", falloutHandlerRequestXml)
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstanceTest.groovy
new file mode 100644
index 0000000000..72f79c80d9
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstanceTest.groovy
@@ -0,0 +1,103 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.scripts
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+import org.camunda.bpm.engine.ProcessEngineServices
+import org.camunda.bpm.engine.RepositoryService
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.camunda.bpm.engine.repository.ProcessDefinition
+import org.junit.Before
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.ArgumentCaptor
+import org.mockito.Captor
+import org.mockito.Mockito
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+import org.onap.so.bpmn.common.scripts.utils.XmlComparator
+
+import static org.mockito.Mockito.*
+/**
+ * @author sushilma
+ * @since January 10, 2018
+ */
+@RunWith(MockitoJUnitRunner.class)
+class DoCreateE2EServiceInstanceTest {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(28090);
+
+ @Before
+ public void init() throws IOException {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @Captor
+ static ArgumentCaptor<ExecutionEntity> captor = ArgumentCaptor.forClass(ExecutionEntity.class)
+
+ String expectedServiceInstanceData = """ <service-instance xmlns="http://org.openecomp.aai.inventory/v8">
+ <service-instance-id>1234</service-instance-id>
+ <service-instance-name>volte-service</service-instance-name>
+ <service-type>voLTE type</service-type>
+ <service-role>voLTE role</service-role>
+ <orchestration-status>Created</orchestration-status>
+ <model-invariant-id>c1d4305f-cdbd-4bbe-9069-a2f4978fd89e</model-invariant-id>
+ <model-version-id>d4df5c27-98a1-4812-a8aa-c17f055b7a3f</model-version-id>
+ </service-instance>"""
+ @Test
+ public void testPreProcessRequest(){
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("globalSubscriberId")).thenReturn("12345")
+ when(mockExecution.getVariable("serviceType")).thenReturn("TRANSPORT")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("1234")
+ when(mockExecution.getVariable("serviceInstanceName")).thenReturn("volte-service")
+ when(mockExecution.getVariable("uuiRequest")).thenReturn("""{"service":{"serviceDefId":"c1d4305f-cdbd-4bbe-9069-a2f4978fd89e" , "templateId" : "d4df5c27-98a1-4812-a8aa-c17f055b7a3f"}}""")
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("/mso/sdncadapter/")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
+ when(mockExecution.getVariable("mso.workflow.default.aai.customer.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.customer.uri")).thenReturn('/aai/v8/business/customers/customer')
+ DoCreateE2EServiceInstance obj = new DoCreateE2EServiceInstance()
+ obj.preProcessRequest(mockExecution)
+ Mockito.verify(mockExecution, times(7)).setVariable(captor.capture(), captor.capture())
+ XmlComparator.assertXMLEquals(expectedServiceInstanceData, captor.getValue())
+ }
+
+ private ExecutionEntity setupMock() {
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("DoCreateE2EServiceInstance")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("DoCreateE2EServiceInstance")
+ when(mockRepositoryService.getProcessDefinition().getId()).thenReturn("100")
+ ProcessEngineServices mockProcessEngineServices = mock(ProcessEngineServices.class)
+ when(mockProcessEngineServices.getRepositoryService()).thenReturn(mockRepositoryService)
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ when(mockExecution.getId()).thenReturn("100")
+ when(mockExecution.getProcessDefinitionId()).thenReturn("DoCreateE2EServiceInstance")
+ when(mockExecution.getProcessInstanceId()).thenReturn("DoCreateE2EServiceInstance")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+ return mockExecution
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceRollbackTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceRollbackTest.groovy
new file mode 100644
index 0000000000..5ee10bc931
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceRollbackTest.groovy
@@ -0,0 +1,369 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.scripts
+
+import static org.mockito.Mockito.*
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.ProcessEngineServices
+import org.camunda.bpm.engine.RepositoryService
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.camunda.bpm.engine.impl.pvm.process.ProcessDefinitionImpl
+import org.camunda.bpm.engine.repository.ProcessDefinition
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+import org.mockito.internal.debugging.MockitoDebuggerImpl
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.core.WorkflowException
+import org.junit.Before
+import org.junit.Rule;
+import org.junit.Test
+import org.junit.Ignore
+import org.junit.runner.RunWith
+
+import static org.onap.so.bpmn.mock.StubResponseNetworkAdapter.MockNetworkAdapterRestRollbackDelete;
+import static org.junit.Assert.*;
+
+import com.github.tomakehurst.wiremock.client.WireMock;
+import com.github.tomakehurst.wiremock.junit.WireMockRule;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+import org.apache.commons.lang3.*
+
+
+@RunWith(MockitoJUnitRunner.class)
+class DoCreateNetworkInstanceRollbackTest {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(28090);
+
+ def utils = new MsoUtils()
+ String Prefix="CRENWKIR_"
+
+
+ String rollbackNetworkRequest =
+ """<NetworkAdapter:rollbackNetwork xmlns:NetworkAdapter="http://org.onap.so/network">
+ <rollback>
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <networkStackId/>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <networkCreated>true</networkCreated>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <msoRequest>
+ <requestId>1ef47428-cade-45bd-a103-0751e8b2deb0</requestId>
+ <serviceInstanceId/>
+ </msoRequest>
+ </rollback>
+</NetworkAdapter:rollbackNetwork>"""
+
+ String rollbackActivateSDNCRequest =
+ """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>rollback</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <aetgt:SDNCRequestData>
+ <request-information>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <request-action>CreateNetworkInstance</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <service-type>MSO-dev-service-type</service-type>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <subscriber-name>MSO_1610_dev</subscriber-name>
+ </service-information>
+ <network-information>
+ <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <onap-model-information>
+ <model-invariant-uuid>invariant-uuid</model-invariant-uuid>
+ <model-customization-uuid>customization-uuid</model-customization-uuid>
+ <model-uuid>uuid</model-uuid>
+ <model-version>version</model-version>
+ <model-name>CONTRAIL_EXTERNAL</model-name>
+ </onap-model-information>
+ </network-information>
+ <network-request-information>
+ <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <tenant>7dd5365547234ee8937416c65507d266</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ </network-request-information>
+ </aetgt:SDNCRequestData>
+</aetgt:SDNCAdapterWorkflowRequest>"""
+
+ String rollbackSDNCRequest =
+ """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>rollback</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <aetgt:SDNCRequestData>
+ <request-information>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <request-action>CreateNetworkInstance</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <service-type>MSO-dev-service-type</service-type>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <subscriber-name>MSO_1610_dev</subscriber-name>
+ </service-information>
+ <network-information>
+ <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <onap-model-information>
+ <model-invariant-uuid>invariant-uuid</model-invariant-uuid>
+ <model-customization-uuid>customization-uuid</model-customization-uuid>
+ <model-uuid>uuid</model-uuid>
+ <model-version>version</model-version>
+ <model-name>CONTRAIL_EXTERNAL</model-name>
+ </onap-model-information>
+ </network-information>
+ <network-request-information>
+ <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <tenant>7dd5365547234ee8937416c65507d266</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ </network-request-information>
+ </aetgt:SDNCRequestData>
+</aetgt:SDNCAdapterWorkflowRequest>"""
+
+// - - - - - - - -
+
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+
+ }
+
+ public void initializeVariables (DelegateExecution mockExecution) {
+
+ verify(mockExecution).setVariable(Prefix + "WorkflowException", null)
+
+ verify(mockExecution).setVariable(Prefix + "rollbackNetworkRequest", null)
+ verify(mockExecution).setVariable(Prefix + "rollbackNetworkResponse", "")
+ verify(mockExecution).setVariable(Prefix + "rollbackNetworkReturnCode", "")
+
+ verify(mockExecution).setVariable(Prefix + "rollbackSDNCRequest", null)
+ verify(mockExecution).setVariable(Prefix + "rollbackSDNCResponse", "")
+ verify(mockExecution).setVariable(Prefix + "rollbackSDNCReturnCode", "")
+
+ verify(mockExecution).setVariable(Prefix + "rollbackActivateSDNCRequest", null)
+ verify(mockExecution).setVariable(Prefix + "rollbackActivateSDNCResponse", "")
+ verify(mockExecution).setVariable(Prefix + "rollbackActivateSDNCReturnCode", "")
+
+ verify(mockExecution).setVariable(Prefix + "Success", false)
+ verify(mockExecution).setVariable(Prefix + "fullRollback", false)
+ verify(mockExecution).setVariable(Prefix + "networkId", "")
+ verify(mockExecution).setVariable(Prefix + "urlRollbackPoNetwork", "")
+
+ }
+
+ @Test
+ //@Ignore
+ public void preProcessRequest() {
+
+ println "************ preProcessRequest ************* "
+
+ WorkflowException workflowException = new WorkflowException("DoCreateNetworkInstance", 2500, "Received error from Network Adapter: JBWEB000065: HTTP Status 500.")
+ Map<String, String> rollbackData = new HashMap<String, String>();
+ rollbackData.put("rollbackSDNCRequest", rollbackSDNCRequest)
+ rollbackData.put("rollbackActivateSDNCRequest", rollbackActivateSDNCRequest)
+ rollbackData.put("rollbackNetworkRequest", rollbackNetworkRequest)
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix + "")
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(workflowException)
+ when(mockExecution.getVariable("rollbackData")).thenReturn(rollbackData)
+ when(mockExecution.getVariable("sdncVersion")).thenReturn("1702")
+
+ when(mockExecution.getVariable("mso.adapters.po.auth")).thenReturn("3141634BF7E070AA289CF2892C986C0B")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ when(mockExecution.getVariable("mso.adapters.sdnc.endpoint")).thenReturn("http://localhost:28090/SDNCAdapter")
+ when(mockExecution.getVariable("mso.adapters.network.rest.endpoint")).thenReturn("http://localhost:28090/networks/NetworkAdapter")
+ when(mockExecution.getVariable("mso.adapters.sdnc.resource.endpoint")).thenReturn("http://localhost:28090/SDNCAdapterRpc")
+
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstanceRollback DoCreateNetworkInstanceRollback = new DoCreateNetworkInstanceRollback()
+ DoCreateNetworkInstanceRollback.preProcessRequest(mockExecution)
+
+// verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ //verify variable initialization
+ initializeVariables(mockExecution)
+
+ }
+
+ @Test
+ //@Ignore
+ public void callPONetworkAdapter() {
+
+ MockNetworkAdapterRestRollbackDelete("deleteNetworkResponse_Success.xml","8abc633a-810b-4ca5-8b3a-09511d13a2ce");
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix + "")
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkRequest")).thenReturn( rollbackNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCRequest")).thenReturn(rollbackSDNCRequest)
+ when(mockExecution.getVariable("mso.adapters.network.rest.endpoint")).thenReturn("http://localhost:28090/networks/NetworkAdapter")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstanceRollback DoCreateNetworkInstanceRollback = new DoCreateNetworkInstanceRollback()
+ DoCreateNetworkInstanceRollback.callPONetworkAdapter(mockExecution)
+
+ verify(mockExecution, atLeast(1)).setVariable(Prefix + "urlRollbackPoNetwork", "http://localhost:28090/networks/NetworkAdapter/8abc633a-810b-4ca5-8b3a-09511d13a2ce/rollback")
+
+ }
+
+ @Test
+ //@Ignore
+ public void validateRollbackResponses_Good() {
+
+ WorkflowException workflowException = new WorkflowException("DoCreateNetworkInstanceRollback", 2500, "AAI Update Contrail Failed. Error 404.")
+ WorkflowException expectedWorkflowException = new WorkflowException("DoCreateNetworkInstanceRollback", 2500, "AAI Update Contrail Failed. Error 404. + SNDC activate rollback completed. + PO Network rollback completed. + SNDC assign rollback completed.")
+
+ println "************ validateRollbackResponses_Good() ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix + "")
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkRequest")).thenReturn("Good")
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCRequest")).thenReturn("Good")
+ when(mockExecution.getVariable(Prefix + "rollbackActivateSDNCRequest")).thenReturn("Good")
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkResponse")).thenReturn("GoodResponse")
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCResponse")).thenReturn("GoodResponse")
+ when(mockExecution.getVariable(Prefix + "rollbackActivateSDNCReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable(Prefix + "rollbackActivateSDNCResponse")).thenReturn("GoodResponse")
+ when(mockExecution.getVariable(Prefix + "WorkflowException")).thenReturn(workflowException)
+ when(mockExecution.getVariable(Prefix + "fullRollback")).thenReturn(false)
+
+ DoCreateNetworkInstanceRollback DoCreateNetworkInstanceRollback = new DoCreateNetworkInstanceRollback()
+ DoCreateNetworkInstanceRollback.validateRollbackResponses(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ verify(mockExecution, atLeast(1)).setVariable("prefix", Prefix)
+ verify(mockExecution, atLeast(1)).setVariable("rolledBack", true)
+ verify(mockExecution, atLeast(1)).setVariable("wasDeleted", true)
+ verify(mockExecution).setVariable("WorkflowException", refEq(expectedWorkflowException, any(WorkflowException.class)))
+ //verify(mockExecution).setVariable("WorkflowException", expectedWorkflowException)
+ }
+
+ @Test
+ //@Ignore
+ public void validateRollbackResponses_FullRollback() {
+
+ Map<String, String> rollbackData = new HashMap<String, String>();
+ rollbackData.put("rollbackSDNCRequest", rollbackSDNCRequest)
+ rollbackData.put("rollbackActivateSDNCRequest", rollbackActivateSDNCRequest)
+ rollbackData.put("rollbackNetworkRequest", rollbackNetworkRequest)
+
+ println "************ validateRollbackResponses_FullRollback() ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix + "")
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkRequest")).thenReturn("Good")
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCRequest")).thenReturn("Good")
+ when(mockExecution.getVariable(Prefix + "rollbackActivateSDNCRequest")).thenReturn("Good")
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkResponse")).thenReturn("GoodResponse")
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCResponse")).thenReturn("GoodResponse")
+ when(mockExecution.getVariable(Prefix + "rollbackActivateSDNCReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable(Prefix + "rollbackActivateSDNCResponse")).thenReturn("GoodResponse")
+ when(mockExecution.getVariable(Prefix + "workflowException")).thenReturn(null)
+ when(mockExecution.getVariable(Prefix + "fullRollback")).thenReturn(true)
+ when(mockExecution.getVariable("rollbackData")).thenReturn(rollbackData)
+
+ DoCreateNetworkInstanceRollback DoCreateNetworkInstanceRollback = new DoCreateNetworkInstanceRollback()
+ DoCreateNetworkInstanceRollback.validateRollbackResponses(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ verify(mockExecution, atLeast(1)).setVariable("prefix", Prefix)
+ verify(mockExecution, atLeast(1)).setVariable("rollbackSuccessful", true)
+ verify(mockExecution, atLeast(1)).setVariable("rollbackError", false)
+
+ }
+
+
+ private ExecutionEntity setupMock() {
+
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("DoCreateNetworkInstanceRollback")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("DoCreateNetworkInstanceRollback")
+ when(mockRepositoryService.getProcessDefinition().getId()).thenReturn("100")
+ ProcessEngineServices mockProcessEngineServices = mock(ProcessEngineServices.class)
+ when(mockProcessEngineServices.getRepositoryService()).thenReturn(mockRepositoryService)
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+
+ when(mockExecution.getId()).thenReturn("100")
+ when(mockExecution.getProcessDefinitionId()).thenReturn("DoCreateNetworkInstanceRollback")
+ when(mockExecution.getProcessInstanceId()).thenReturn("DoCreateNetworkInstanceRollback")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+
+ return mockExecution
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceTest.groovy
new file mode 100644
index 0000000000..0a1f8f2859
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceTest.groovy
@@ -0,0 +1,4324 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.scripts
+
+
+import static org.mockito.Mockito.*
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetNetworkByName;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetNetworkByName_404;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetNetworkByIdWithDepth;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetNetworkCloudRegion;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetNetworkCloudRegion_404;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPutNetworkIdWithDepth;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetNetworkPolicy;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetNetworkTableReference;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetNetworkVpnBinding;
+import org.camunda.bpm.engine.ProcessEngineServices
+import org.camunda.bpm.engine.RepositoryService
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.camunda.bpm.engine.repository.ProcessDefinition
+import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.junit.Before
+import org.junit.Ignore
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.core.WorkflowException
+
+import com.github.tomakehurst.wiremock.client.WireMock
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+import org.apache.commons.lang3.*
+
+@RunWith(MockitoJUnitRunner.class)
+class DoCreateNetworkInstanceTest {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(8090);
+
+ def utils = new MsoUtils()
+ String Prefix="CRENWKI_"
+
+// ---- Start XML Zone ----
+ String xmlIncomingRequest =
+ """<rest:payload contentType="text/xml" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd">
+ <network-request xmlns:vnfreq="http://org.onap/so/infra/vnf-request/v1">
+ <request-info>
+ <request-id>1ef47428-cade-45bd-a103-0751e8b2deb0</request-id>
+ <action>CREATE</action>
+ <source>PORTAL</source>
+ </request-info>
+ <network-inputs>
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <physicalNetworkName>dvs-slcp3-01</physicalNetworkName>
+ <vlans>3008</vlans>
+ <service-instance-id>MNS-25180-L-01-dmz_direct_net_1</service-instance-id>
+ <backout-on-failure>true</backout-on-failure>
+ </network-inputs>
+ <network-params>
+ <param xmlns="" name="shared">1</param>
+ <param xmlns="" name="external">0</param>
+ </network-params>
+ </network-request>
+ </rest:payload>"""
+
+ String expectedXMLNetworkRequest =
+"""<rest:payload xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ xmlns:vnfreq="http://org.onap/so/infra/vnf-request/v1"
+ contentType="text/xml">
+ <network-request>
+ <request-info>
+ <request-id>1ef47428-cade-45bd-a103-0751e8b2deb0</request-id>
+ <action>CREATE</action>
+ <source>PORTAL</source>
+ </request-info>
+ <network-inputs>
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <physicalNetworkName>dvs-slcp3-01</physicalNetworkName>
+ <vlans>3008</vlans>
+ <service-instance-id>MNS-25180-L-01-dmz_direct_net_1</service-instance-id>
+ <backout-on-failure>true</backout-on-failure>
+ </network-inputs>
+ <network-params>
+ <param name="shared">1</param>
+ <param name="external">0</param>
+ </network-params>
+ </network-request>
+</rest:payload>"""
+
+ String expectedXMLNetworkInputs =
+"""<network-inputs>
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <physicalNetworkName>dvs-slcp3-01</physicalNetworkName>
+ <vlans>3008</vlans>
+ <service-instance-id>MNS-25180-L-01-dmz_direct_net_1</service-instance-id>
+ <backout-on-failure>true</backout-on-failure>
+</network-inputs>"""
+
+ String networkXMLOutputs =
+""""""
+
+// ---- End XML Zone ----
+
+// ---- Start JSON Zone ----
+ // JSON format Input
+ String jsonIncomingRequest =
+ """{ "requestDetails": {
+ "modelInfo": {
+ "modelType": "network",
+ "modelCustomizationId": "f21df226-8093-48c3-be7e-0408fcda0422",
+ "modelName": "CONTRAIL_EXTERNAL",
+ "modelVersion": "1.0"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "RDM2WAGPLCP",
+ "tenantId": "7dd5365547234ee8937416c65507d266"
+ },
+ "requestInfo": {
+ "instanceName": "MNS-25180-L-01-dmz_direct_net_1",
+ "source": "VID",
+ "callbackUrl": "",
+ "suppressRollback": true,
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "f70e927b-6087-4974-9ef8-c5e4d5847ca4",
+ "modelInfo": {
+ "modelType": "serviceT",
+ "modelId": "modelI",
+ "modelNameVersionId": "modelNameVersionI",
+ "modelName": "modleNam",
+ "modelVersion": "1"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": [
+ {
+ "name": "someUserParam1",
+ "value": "someValue1"
+ }
+ ]
+ }
+ }}"""
+
+ String expectedJSONNetworkRequest =
+ """<network-request xmlns="http://www.w3.org/2001/XMLSchema">
+ <request-info>
+ <request-id>null</request-id>
+ <action>CREATE</action>
+ <source>VID</source>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ </request-info>
+ <network-inputs>
+ <network-id>networkId</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <modelCustomizationId>f21df226-8093-48c3-be7e-0408fcda0422</modelCustomizationId>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>false</backout-on-failure>
+ <sdncVersion>1610</sdncVersion>
+ </network-inputs>
+ <network-params>
+ <param name="some_user_param1">someValue1</param>
+ </network-params>
+</network-request>"""
+
+ String expectedJSONNetworkInputs =
+"""<network-inputs xmlns="http://www.w3.org/2001/XMLSchema">
+ <network-id>networkId</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <modelCustomizationId>f21df226-8093-48c3-be7e-0408fcda0422</modelCustomizationId>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>false</backout-on-failure>
+ <sdncVersion>1610</sdncVersion>
+</network-inputs>"""
+
+ String networkJSONOutputs =
+"""<network-outputs>
+ <network-id>networkId</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ </network-outputs>"""
+
+// ---- End JSON Zone ----
+
+// ---- Start vPIR Zone ----
+ // expectedNetworkRequest
+ String expectedvIPRNetworkRequest =
+ """<network-request xmlns="http://www.w3.org/2001/XMLSchema">
+ <request-info>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <action>CREATE</action>
+ <source>VID</source>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ </request-info>
+ <network-inputs>
+ <network-id>networkId</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <subscription-service-type>MSO-dev-service-type</subscription-service-type>
+ <global-customer-id>globalId_45678905678</global-customer-id>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>false</backout-on-failure>
+ <failIfExist>false</failIfExist>
+ <networkModelInfo>
+ <modelName>CONTRAIL_EXTERNAL</modelName>
+ <modelUuid>sn5256d1-5a33-55df-13ab-12abad84e111</modelUuid>
+ <modelInvariantUuid>sn5256d1-5a33-55df-13ab-12abad84e764</modelInvariantUuid>
+ <modelVersion>1</modelVersion>
+ <modelCustomizationUuid>sn5256d1-5a33-55df-13ab-12abad84e222</modelCustomizationUuid>
+ </networkModelInfo>
+ <serviceModelInfo>
+ <modelName>HNGW Protected OAM</modelName>
+ <modelUuid>36a3a8ea-49a6-4ac8-b06c-89a54544b9b6</modelUuid>
+ <modelInvariantUuid>fcc85cb0-ad74-45d7-a5a1-17c8744fdb71</modelInvariantUuid>
+ <modelVersion>1.0</modelVersion>
+ <modelCustomizationUuid/>
+ </serviceModelInfo>
+ <sdncVersion>1702</sdncVersion>
+ </network-inputs>
+ <network-params/>
+</network-request>"""
+
+ String expectedvIPRNetworkInputs =
+"""<network-inputs xmlns="http://www.w3.org/2001/XMLSchema">
+ <network-id>networkId</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <subscription-service-type>MSO-dev-service-type</subscription-service-type>
+ <global-customer-id>globalId_45678905678</global-customer-id>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>false</backout-on-failure>
+ <failIfExist>false</failIfExist>
+ <networkModelInfo>
+ <modelName>CONTRAIL_EXTERNAL</modelName>
+ <modelUuid>sn5256d1-5a33-55df-13ab-12abad84e111</modelUuid>
+ <modelInvariantUuid>sn5256d1-5a33-55df-13ab-12abad84e764</modelInvariantUuid>
+ <modelVersion>1</modelVersion>
+ <modelCustomizationUuid>sn5256d1-5a33-55df-13ab-12abad84e222</modelCustomizationUuid>
+ </networkModelInfo>
+ <serviceModelInfo>
+ <modelName>HNGW Protected OAM</modelName>
+ <modelUuid>36a3a8ea-49a6-4ac8-b06c-89a54544b9b6</modelUuid>
+ <modelInvariantUuid>fcc85cb0-ad74-45d7-a5a1-17c8744fdb71</modelInvariantUuid>
+ <modelVersion>1.0</modelVersion>
+ <modelCustomizationUuid/>
+ </serviceModelInfo>
+ <sdncVersion>1702</sdncVersion>
+</network-inputs>"""
+
+ String networkvIPROutputs =
+"""<network-outputs>
+ <network-id>networkId</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ </network-outputs>"""
+
+// ---- End vPIR Zone ----
+
+ String vnfRequestFakeRegion =
+ """<vnfreq:network-request xmlns:vnfreq="http://org.onap/so/infra/vnf-request/v1">
+ <vnfreq:request-info>
+ <vnfreq:request-id>1ef47428-cade-45bd-a103-0751e8b2deb0</vnfreq:request-id>
+ <vnfreq:action>CREATE</vnfreq:action>
+ <vnfreq:source>PORTAL</vnfreq:source>
+ </vnfreq:request-info>
+ <vnfreq:network-inputs>
+ <vnfreq:network-name>MNS-25180-L-01-dmz_direct_net_1</vnfreq:network-name>
+ <vnfreq:network-type>CONTRAIL_EXTERNAL</vnfreq:network-type>
+ <subscriptionServiceType>MSO-dev-service-type</subscriptionServiceType>
+ <vnfreq:service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</vnfreq:service-id>
+ <vnfreq:aic-cloud-region>MDTWNJ21</vnfreq:aic-cloud-region>
+ <vnfreq:tenant-id>7dd5365547234ee8937416c65507d266</vnfreq:tenant-id>
+ </vnfreq:network-inputs>
+ <vnfreq:network-params>
+ <param name="shared">1</param>
+ <param name="external">0</param>
+ </vnfreq:network-params>
+</vnfreq:network-request>"""
+
+ // expectedNetworkRequest
+ String expectedNetworkRequest_Outputs =
+ """<vnfreq:network-request xmlns:vnfreq="http://org.onap/so/infra/vnf-request/v1">
+ <vnfreq:request-info>
+ <vnfreq:request-id>1ef47428-cade-45bd-a103-0751e8b2deb0</vnfreq:request-id>
+ <vnfreq:action>CREATE</vnfreq:action>
+ <vnfreq:source>PORTAL</vnfreq:source>
+ </vnfreq:request-info>
+ <vnfreq:network-inputs>
+ <vnfreq:network-name>MNS-25180-L-01-dmz_direct_net_1</vnfreq:network-name>
+ <vnfreq:network-type>CONTRAIL_EXTERNAL</vnfreq:network-type>
+ <subscriptionServiceType>MSO-dev-service-type</subscriptionServiceType>
+ <vnfreq:service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</vnfreq:service-id>
+ <vnfreq:aic-cloud-region>RDM2WAGPLCP</vnfreq:aic-cloud-region>
+ <vnfreq:tenant-id>7dd5365547234ee8937416c65507d266</vnfreq:tenant-id>
+ </vnfreq:network-inputs>
+ <vnfreq:network-outputs>
+ <vnfreq:network-name>MNS-25180-L-01-dmz_direct_net_1</vnfreq:network-name>
+ <vnfreq:network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</vnfreq:network-id>
+ </vnfreq:network-outputs>
+ <vnfreq:network-params>
+ <param name="shared">1</param>
+ <param name="external">0</param>
+ </vnfreq:network-params>
+</vnfreq:network-request>"""
+
+
+ // expectedNetworkRequest
+ String networkInputs_404 =
+ """<network-inputs xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <network-name>myOwn_Network</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>e81d842d3e8b45c5a59f57cd76af3aaf</tenant-id>
+ </network-inputs>"""
+
+ String networkInputs =
+ """<network-inputs xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>e81d842d3e8b45c5a59f57cd76af3aaf</tenant-id>
+</network-inputs>"""
+
+
+
+ String queryAAIResponse =
+ """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v3">
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>HSL_direct_net_2</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <orchestration-status>pending-create</orchestration-status>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>"""
+
+ String queryIdAIIResponse =
+ """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v6">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>Contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <resource-version>l3-version</resource-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <physical-network-name>networkName</physical-network-name>
+ <is-provider-network>false</is-provider-network>
+ <is-shared-network>true</is-shared-network>
+ <is-external-network>false</is-external-network>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ <subnet-role>ECOMP</subnet-role>
+ <ip-assignment-direction>true</ip-assignment-direction>
+ <host-routes>
+ <host-route>
+ <host-route-id>string</host-route-id>
+ <route-prefix>192.10.16.0/24</route-prefix>
+ <next-hop>192.10.16.100/24</next-hop>
+ <next-hop-type>ip-address</next-hop-type>
+ <resource-version>1505857301954</resource-version>
+ </host-route>
+ <host-route>
+ <host-route-id>string</host-route-id>
+ <route-prefix>192.110.17.0/24</route-prefix>
+ <next-hop>192.110.17.110/24</next-hop>
+ <next-hop-type>ip-address</next-hop-type>
+ <resource-version>1505857301954</resource-version>
+ </host-route>
+ </host-routes>
+ <relationship-list/>
+ </subnet>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ <ip-assignment-direction>true</ip-assignment-direction>
+ <host-routes>
+ <host-route>
+ <host-route-id>string</host-route-id>
+ <route-prefix>192.10.16.0/24</route-prefix>
+ <next-hop>192.10.16.100/24</next-hop>
+ <next-hop-type>ip-address</next-hop-type>
+ <resource-version>1505857301954</resource-version>
+ </host-route>
+ </host-routes>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <segmentation-assignments>
+ <segmentation-id>414</segmentation-id>
+ <resource-version>4132176</resource-version>
+ </segmentation-assignments>
+ <segmentation-assignments>
+ <segmentation-id>415</segmentation-id>
+ <resource-version>4132176</resource-version>
+ </segmentation-assignments>
+ <ctag-assignments>
+ <ctag-assignment>
+ <vlan-id-inner>inner</vlan-id-inner>
+ <resource-version>ctag-version</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/897deadc2b954a6bac6d3c197fb3525e/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>897deadc2b954a6bac6d3c197fb3525e</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>MSOTest1</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/a290b841-f672-44dd-b9cd-6f8c20d7d8c8/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>a290b841-f672-44dd-b9cd-6f8c20d7d8c8</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-name</property-key>
+ <property-value>oam_protected_net_6_MTN5_msotest2</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/24a4b507-853a-4a38-99aa-05fcc54be24d/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>24a4b507-853a-4a38-99aa-05fcc54be24d</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-name</property-key>
+ <property-value>oam_protected_net_6_MTN5_msotest1</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+ </ctag-assignment>
+ </ctag-assignments>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>network-policy</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg</related-link>
+ <relationship-data>
+ <relationship-key>network-policy.network-policy-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0cg</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN1</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN2</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>"""
+
+String queryIdAIIResponse_AlaCarte =
+"""<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v6">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>Contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <resource-version>l3-version</resource-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <physical-network-name>networkName</physical-network-name>
+ <is-provider-network>false</is-provider-network>
+ <is-shared-network>true</is-shared-network>
+ <is-external-network>false</is-external-network>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ <relationship-list/>
+ </subnet>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <segmentation-assignments>
+ <segmentation-id>414</segmentation-id>
+ <resource-version>4132176</resource-version>
+ </segmentation-assignments>
+ <segmentation-assignments>
+ <segmentation-id>415</segmentation-id>
+ <resource-version>4132176</resource-version>
+ </segmentation-assignments>
+ <ctag-assignments>
+ <ctag-assignment>
+ <vlan-id-inner>inner</vlan-id-inner>
+ <resource-version>ctag-version</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/897deadc2b954a6bac6d3c197fb3525e/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>897deadc2b954a6bac6d3c197fb3525e</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>MSOTest1</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/a290b841-f672-44dd-b9cd-6f8c20d7d8c8/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>a290b841-f672-44dd-b9cd-6f8c20d7d8c8</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-name</property-key>
+ <property-value>oam_protected_net_6_MTN5_msotest2</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/24a4b507-853a-4a38-99aa-05fcc54be24d/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>24a4b507-853a-4a38-99aa-05fcc54be24d</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-name</property-key>
+ <property-value>oam_protected_net_6_MTN5_msotest1</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+ </ctag-assignment>
+ </ctag-assignments>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>network-policy</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg</related-link>
+ <relationship-data>
+ <relationship-key>network-policy.network-policy-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0cg</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN1</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN2</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>"""
+
+String queryIdAIIResponse_segmentation =
+"""<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v6">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>Contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <resource-version>l3-version</resource-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <physical-network-name>networkName</physical-network-name>
+ <is-provider-network>false</is-provider-network>
+ <is-shared-network>true</is-shared-network>
+ <is-external-network>false</is-external-network>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ <relationship-list/>
+ </subnet>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <segmentation-assignments>
+ <segmentation-assignment>
+ <segmentation-id>1</segmentation-id>
+ <resource-version>1498507569188</resource-version>
+ </segmentation-assignment>
+ </segmentation-assignments>
+ <ctag-assignments>
+ <ctag-assignment>
+ <vlan-id-inner>inner</vlan-id-inner>
+ <resource-version>ctag-version</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/897deadc2b954a6bac6d3c197fb3525e/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>897deadc2b954a6bac6d3c197fb3525e</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>MSOTest1</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/a290b841-f672-44dd-b9cd-6f8c20d7d8c8/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>a290b841-f672-44dd-b9cd-6f8c20d7d8c8</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-name</property-key>
+ <property-value>oam_protected_net_6_MTN5_msotest2</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/24a4b507-853a-4a38-99aa-05fcc54be24d/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>24a4b507-853a-4a38-99aa-05fcc54be24d</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-name</property-key>
+ <property-value>oam_protected_net_6_MTN5_msotest1</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+ </ctag-assignment>
+ </ctag-assignments>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>network-policy</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg</related-link>
+ <relationship-data>
+ <relationship-key>network-policy.network-policy-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0cg</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN1</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN2</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>"""
+
+String queryIdAIIResponse_Ipv4 =
+"""<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v6">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>Contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <resource-version>l3-version</resource-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <physical-network-name>networkName</physical-network-name>
+ <is-provider-network>false</is-provider-network>
+ <is-shared-network>true</is-shared-network>
+ <is-external-network>false</is-external-network>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>ipv4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ <relationship-list/>
+ </subnet>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>ipv4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <segmentation-assignments>
+ <segmentation-id>414</segmentation-id>
+ <resource-version>4132176</resource-version>
+ </segmentation-assignments>
+ <segmentation-assignments>
+ <segmentation-id>415</segmentation-id>
+ <resource-version>4132176</resource-version>
+ </segmentation-assignments>
+ <ctag-assignments>
+ <ctag-assignment>
+ <vlan-id-inner>inner</vlan-id-inner>
+ <resource-version>ctag-version</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/897deadc2b954a6bac6d3c197fb3525e/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>897deadc2b954a6bac6d3c197fb3525e</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>MSOTest1</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/a290b841-f672-44dd-b9cd-6f8c20d7d8c8/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>a290b841-f672-44dd-b9cd-6f8c20d7d8c8</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-name</property-key>
+ <property-value>oam_protected_net_6_MTN5_msotest2</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/24a4b507-853a-4a38-99aa-05fcc54be24d/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>24a4b507-853a-4a38-99aa-05fcc54be24d</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-name</property-key>
+ <property-value>oam_protected_net_6_MTN5_msotest1</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+ </ctag-assignment>
+ </ctag-assignments>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>network-policy</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg</related-link>
+ <relationship-data>
+ <relationship-key>network-policy.network-policy-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0cg</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN1</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN2</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>"""
+
+String queryIdAIIResponse_SRIOV =
+"""<?xml version="1.0" encoding="UTF-8"?>
+<l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <network-id>6cb1ae5a-d2db-4eb6-97bf-d52a506a53d8</network-id>
+ <network-name>MSO_TEST_1702_A_HnportalProviderNetwork.HNPortalPROVIDERNETWORK.SR_IOV_Provider2_1_net_17</network-name>
+ <network-type>SR_IOV_Provider2_1</network-type>
+ <network-role>HnportalProviderNetwork.HNPortalPROVIDERNETWORK.SR_IOV_Provider2_1</network-role>
+ <network-technology>AIC_SR_IOV</network-technology>
+ <is-bound-to-vpn>false</is-bound-to-vpn>
+ <service-id/>
+ <resource-version>1487336177672</resource-version>
+ <orchestration-status>PendingCreate</orchestration-status>
+ <persona-model-id>f70d7a32-0ac8-4bd5-a0fb-3c9336540d78</persona-model-id>
+ <persona-model-version>1.0</persona-model-version>
+ <physical-network-name>Physnet21</physical-network-name>
+ <is-provider-network>true</is-provider-network>
+ <is-shared-network>false</is-shared-network>
+ <is-external-network>false</is-external-network>
+ <subnets>
+ <subnet>
+ <subnet-id>10437</subnet-id>
+ <subnet-name>MSO_TEST_1702_A_HnportalProviderNetwork.HNPortalPROVIDERNETWORK.SR_IOV_Provider2_1_net_17_S0</subnet-name>
+ <gateway-address>192.168.6.1</gateway-address>
+ <network-start-address>192.168.6.0</network-start-address>
+ <cidr-mask>26</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>PendingCreate</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <dhcp-start>192.168.6.3</dhcp-start>
+ <dhcp-end>192.168.6.62</dhcp-end>
+ <resource-version>1487336177359</resource-version>
+ </subnet>
+ </subnets>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn16/tenants/tenant/6accefef3cb442ff9e644d589fb04107</related-link>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>mtn16</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>6accefef3cb442ff9e644d589fb04107</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>MSO_TEST_1702_A</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>cloud-region</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn16</related-link>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>mtn16</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>cloud-region.owner-defined-type</property-key>
+ <property-value>lcp</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>service-instance</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/business/customers/customer/MSO_1610_ST/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/51d8336b-a993-4afe-a5fc-10b3afbd6560</related-link>
+ <relationship-data>
+ <relationship-key>customer.global-customer-id</relationship-key>
+ <relationship-value>MSO_1610_ST</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-subscription.service-type</relationship-key>
+ <relationship-value>MSO-dev-service-type</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-instance.service-instance-id</relationship-key>
+ <relationship-value>51d8336b-a993-4afe-a5fc-10b3afbd6560</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>service-instance.service-instance-name</property-key>
+ <property-value>HnportalProviderNetwork_17</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+</l3-network>"""
+
+ String queryIdAIIResponseTestScenario01 =
+ """<?xml version="1.0" encoding="UTF-8"?>
+<l3-network xmlns="http://org.openecomp.aai.inventory/v7">
+ <network-id>4da55fe4-7a9e-478c-a434-8a98d62265ab</network-id>
+ <network-name>GN_EVPN_direct_net_0_ST1</network-name>
+ <network-type>CONTRAIL30_BASIC</network-type>
+ <network-role>GN_EVPN_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <is-bound-to-vpn>false</is-bound-to-vpn>
+ <service-id>9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <resource-version>1465398611</resource-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <physical-network-name>networkName</physical-network-name>
+ <is-provider-network>false</is-provider-network>
+ <is-shared-network>true</is-shared-network>
+ <is-external-network>false</is-external-network>
+ <subnets>
+ <subnet>
+ <subnet-id>cb1a7b47-5428-44c9-89c2-8b17541c3228</subnet-id>
+ <gateway-address>108.239.40.1</gateway-address>
+ <network-start-address>108.239.40.0</network-start-address>
+ <cidr-mask>28</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <dhcp-start>108.239.40.0</dhcp-start>
+ <dhcp-end>108.239.40.0</dhcp-end>
+ <resource-version>1465398611</resource-version>
+ <subnet-name>subnetName</subnet-name>
+ <relationship-list />
+ </subnet>
+ <subnet>
+ <subnet-id>e2cc7c14-90f0-4205-840d-b4e07f04e621</subnet-id>
+ <gateway-address>2606:ae00:2e01:604::1</gateway-address>
+ <network-start-address>2606:ae00:2e01:604::</network-start-address>
+ <cidr-mask>64</cidr-mask>
+ <ip-version>6</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <dhcp-start>2606:ae00:2e01:604::</dhcp-start>
+ <dhcp-end>2606:ae00:2e01:604::</dhcp-end>
+ <resource-version>1465398611</resource-version>
+ <subnet-name>subnetName</subnet-name>
+ <relationship-list />
+ </subnet>
+ </subnets>
+ <ctag-assignments />
+ <segmentation-assignments>
+ <segmentation-id>416</segmentation-id>
+ <resource-version>4132176</resource-version>
+ </segmentation-assignments>
+ <relationship-list>
+ <relationship>
+ <related-to>cloud-region</related-to>
+ <related-link>https://localhost:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/
+ </related-link>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>AAIAIC25</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>cloud-region.owner-defined-type</property-key>
+ <property-value></property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://localhost:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/tenants/tenant/4ae1d3446a4c48b2bec44b6cfba06d68/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>4ae1d3446a4c48b2bec44b6cfba06d68
+ </relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>AAIAIC25</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>Ruchira Contrail 3.0 test</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://localhost:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>9a7b327d9-287aa00-82c4b0-100001</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-name</property-key>
+ <property-value>GN_EVPN_direct_net_0_ST1</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN1</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN2</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+</l3-network>"""
+
+ String queryIdAIIResponseVpnNotPresent =
+ """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <orchestration-status>pending-create</orchestration-status>
+ <physical-network-name>networkName</physical-network-name>
+ <is-provider-network>false</is-provider-network>
+ <is-shared-network>true</is-shared-network>
+ <is-external-network>false</is-external-network>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <relationship-list/>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>"""
+
+ String queryNameAIIResponse =
+ """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v6">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <orchestration-status>pending-create</orchestration-status>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+ </rest:RESTResponse>"""
+
+ String queryNameAIIResponseVpnNotPresent =
+ """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v6>
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <orchestration-status>pending-create</orchestration-status>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ </l3-network>
+ </rest:payload>
+ </rest:RESTResponse>"""
+
+ String aaiVpnResponseStub =
+ """<rest:payload xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ xmlns="http://org.openecomp.aai.inventory/v8"
+ contentType="text/xml">
+ <vpn-binding>
+ <global-route-target/>
+ </vpn-binding>
+</rest:payload>"""
+
+ String queryVpnBindingAAIResponse =
+ """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Mon,14 Mar 2016 20:53:33 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="localhost-20160314-20:53:33:487-134392"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <vpn-binding xmlns="http://org.openecomp.aai.inventory/v6">
+ <vpn-id>9a7b327d9-287aa00-82c4b0-105757</vpn-id>
+ <vpn-name>GN_EVPN_Test</vpn-name>
+ <global-route-target>13979:105757</global-route-target>
+ <relationship-list>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/689ec39e-c5fc-4462-8db2-4f760763ad28/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>689ec39e-c5fc-4462-8db2-4f760763ad28</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/1a49396b-19b3-40a4-8792-aa2fbd0f0704/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>1a49396b-19b3-40a4-8792-aa2fbd0f0704</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/774f3329-3c83-4771-86c7-9e6207cd50fd/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>774f3329-3c83-4771-86c7-9e6207cd50fd</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </vpn-binding>
+ </rest:payload>
+</rest:RESTResponse>"""
+
+ String createDBRequestError01 =
+ """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateInfraRequest xmlns:ns="http://org.onap.so/requestsdb">
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>Received error unexpectedly from SDN-C.</statusMessage>
+ <responseBody></responseBody>
+ <requestStatus>FAILED</requestStatus>
+ <vnfOutputs>&lt;network-id&gt;&lt;/network-id&gt;&lt;network-name&gt;&lt;/network-names&gt;</vnfOutputs>
+ </ns:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ String createDBRequest_Outputs =
+ """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:ns="http://org.onap.so/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateInfraRequest>
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>Network successfully created.</statusMessage>
+ <responseBody/>
+ <requestStatus>COMPLETED</requestStatus>
+ <progress>100</progress>
+ <vnfOutputs>&lt;network-id&gt;networkId&lt;/network-id&gt;&lt;network-name&gt;MNS-25180-L-01-dmz_direct_net_1&lt;/network-names&gt;</vnfOutputs>
+ <networkId>networkId</networkId>
+ </ns:updateInfraRequest>
+ </soapenv:Body>
+</soapenv:Envelope>"""
+
+ String createNetworkRequest =
+ """<createNetworkRequest>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ <networkId>49c86598-f766-46f8-84f8-8d1c1b10f9b4</networkId>
+ <networkName>MNS-25180-L-01-dmz_direct_net_1</networkName>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <modelCustomizationUuid>sn5256d1-5a33-55df-13ab-12abad84e222</modelCustomizationUuid>
+ <networkTechnology>CONTRAIL</networkTechnology>
+ <providerVlanNetwork>
+ <physicalNetworkName>networkName</physicalNetworkName>
+ <vlans>414,415</vlans>
+ </providerVlanNetwork>
+ <contrailNetwork>
+ <shared>true</shared>
+ <external>false</external>
+ <routeTargets>13979:105757</routeTargets>
+ <routeTargets>13979:105757</routeTargets>
+ <policyFqdns>GN_EVPN_Test</policyFqdns>
+ <routeTableFqdns>refFQDN1</routeTableFqdns>
+ <routeTableFqdns>refFQDN2</routeTableFqdns>
+ </contrailNetwork>
+ <subnets>
+ <allocationPools>
+ <start/>
+ <end/>
+ </allocationPools>
+ <cidr>107.239.52.0/24</cidr>
+ <enableDHCP>true</enableDHCP>
+ <gatewayIp>107.239.52.1</gatewayIp>
+ <ipVersion>4</ipVersion>
+ <subnetId>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnetId>
+ <subnetName>subnetName</subnetName>
+ <addrFromStart>true</addrFromStart>
+ <hostRoutes>
+ <prefix>192.10.16.0/24</prefix>
+ <nextHop>192.10.16.100/24</nextHop>
+ </hostRoutes>
+ <hostRoutes>
+ <prefix>192.110.17.0/24</prefix>
+ <nextHop>192.110.17.110/24</nextHop>
+ </hostRoutes>
+ </subnets>
+ <subnets>
+ <allocationPools>
+ <start/>
+ <end/>
+ </allocationPools>
+ <cidr>107.239.52.0/24</cidr>
+ <enableDHCP>true</enableDHCP>
+ <gatewayIp>107.239.52.1</gatewayIp>
+ <ipVersion>4</ipVersion>
+ <subnetId>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnetId>
+ <subnetName>subnetName</subnetName>
+ <addrFromStart>true</addrFromStart>
+ <hostRoutes>
+ <prefix>192.10.16.0/24</prefix>
+ <nextHop>192.10.16.100/24</nextHop>
+ </hostRoutes>
+ </subnets>
+ <skipAAI>true</skipAAI>
+ <backout>true</backout>
+ <failIfExists>false</failIfExists>
+ <msoRequest>
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <serviceInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</serviceInstanceId>
+ </msoRequest>
+ <messageId>messageId_generated</messageId>
+ <notificationUrl/>
+</createNetworkRequest>"""
+
+String createNetworkRequest_Ipv4 =
+"""<createNetworkRequest>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ <networkId>49c86598-f766-46f8-84f8-8d1c1b10f9b4</networkId>
+ <networkName>MNS-25180-L-01-dmz_direct_net_1</networkName>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <modelCustomizationUuid>sn5256d1-5a33-55df-13ab-12abad84e222</modelCustomizationUuid>
+ <networkTechnology>CONTRAIL</networkTechnology>
+ <providerVlanNetwork>
+ <physicalNetworkName>networkName</physicalNetworkName>
+ <vlans>414,415</vlans>
+ </providerVlanNetwork>
+ <contrailNetwork>
+ <shared>true</shared>
+ <external>false</external>
+ <routeTargets>13979:105757</routeTargets>
+ <routeTargets>13979:105757</routeTargets>
+ <policyFqdns>GN_EVPN_Test</policyFqdns>
+ <routeTableFqdns>refFQDN1</routeTableFqdns>
+ <routeTableFqdns>refFQDN2</routeTableFqdns>
+ </contrailNetwork>
+ <subnets>
+ <allocationPools>
+ <start/>
+ <end/>
+ </allocationPools>
+ <cidr>107.239.52.0/24</cidr>
+ <enableDHCP>true</enableDHCP>
+ <gatewayIp>107.239.52.1</gatewayIp>
+ <ipVersion>4</ipVersion>
+ <subnetId>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnetId>
+ <subnetName>subnetName</subnetName>
+ </subnets>
+ <subnets>
+ <allocationPools>
+ <start/>
+ <end/>
+ </allocationPools>
+ <cidr>107.239.52.0/24</cidr>
+ <enableDHCP>true</enableDHCP>
+ <gatewayIp>107.239.52.1</gatewayIp>
+ <ipVersion>4</ipVersion>
+ <subnetId>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnetId>
+ <subnetName>subnetName</subnetName>
+ </subnets>
+ <skipAAI>true</skipAAI>
+ <backout>true</backout>
+ <failIfExists>false</failIfExists>
+ <msoRequest>
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <serviceInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</serviceInstanceId>
+ </msoRequest>
+ <messageId>messageId_generated</messageId>
+ <notificationUrl/>
+</createNetworkRequest>"""
+
+String createNetworkRequestAlaCarte =
+"""<createNetworkRequest>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ <networkId>49c86598-f766-46f8-84f8-8d1c1b10f9b4</networkId>
+ <networkName>MNS-25180-L-01-dmz_direct_net_1</networkName>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <modelCustomizationUuid>f21df226-8093-48c3-be7e-0408fcda0422</modelCustomizationUuid>
+ <networkTechnology>CONTRAIL</networkTechnology>
+ <providerVlanNetwork>
+ <physicalNetworkName>networkName</physicalNetworkName>
+ <vlans>414,415</vlans>
+ </providerVlanNetwork>
+ <contrailNetwork>
+ <shared>true</shared>
+ <external>false</external>
+ <routeTargets>13979:105757</routeTargets>
+ <routeTargets>13979:105757</routeTargets>
+ <policyFqdns>GN_EVPN_Test</policyFqdns>
+ <routeTableFqdns>refFQDN1</routeTableFqdns>
+ <routeTableFqdns>refFQDN2</routeTableFqdns>
+ </contrailNetwork>
+ <subnets>
+ <allocationPools>
+ <start/>
+ <end/>
+ </allocationPools>
+ <cidr>107.239.52.0/24</cidr>
+ <enableDHCP>true</enableDHCP>
+ <gatewayIp>107.239.52.1</gatewayIp>
+ <ipVersion>4</ipVersion>
+ <subnetId>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnetId>
+ <subnetName>subnetName</subnetName>
+ </subnets>
+ <subnets>
+ <allocationPools>
+ <start/>
+ <end/>
+ </allocationPools>
+ <cidr>107.239.52.0/24</cidr>
+ <enableDHCP>true</enableDHCP>
+ <gatewayIp>107.239.52.1</gatewayIp>
+ <ipVersion>4</ipVersion>
+ <subnetId>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnetId>
+ <subnetName>subnetName</subnetName>
+ </subnets>
+ <skipAAI>true</skipAAI>
+ <backout>true</backout>
+ <failIfExists>false</failIfExists>
+ <networkParams>
+ <some_user_param1>someValue1</some_user_param1>
+ </networkParams>
+ <msoRequest>
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <serviceInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</serviceInstanceId>
+ </msoRequest>
+ <messageId>messageId_generated</messageId>
+ <notificationUrl/>
+</createNetworkRequest>"""
+
+String createNetworkRequest_SRIOV =
+"""<createNetworkRequest>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ <networkId>6cb1ae5a-d2db-4eb6-97bf-d52a506a53d8</networkId>
+ <networkName>MSO_TEST_1702_A_HnportalProviderNetwork.HNPortalPROVIDERNETWORK.SR_IOV_Provider2_1_net_17</networkName>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <modelCustomizationUuid>sn5256d1-5a33-55df-13ab-12abad84e222</modelCustomizationUuid>
+ <networkTechnology>AIC_SR_IOV</networkTechnology>
+ <providerVlanNetwork>
+ <physicalNetworkName>Physnet21</physicalNetworkName>
+ <vlans/>
+ </providerVlanNetwork>
+ <subnets>
+ <allocationPools>
+ <start>192.168.6.3</start>
+ <end>192.168.6.62</end>
+ </allocationPools>
+ <cidr>192.168.6.0/26</cidr>
+ <enableDHCP>true</enableDHCP>
+ <gatewayIp>192.168.6.1</gatewayIp>
+ <ipVersion>4</ipVersion>
+ <subnetId>10437</subnetId>
+ <subnetName>MSO_TEST_1702_A_HnportalProviderNetwork.HNPortalPROVIDERNETWORK.SR_IOV_Provider2_1_net_17_S0</subnetName>
+ </subnets>
+ <skipAAI>true</skipAAI>
+ <backout>true</backout>
+ <failIfExists>false</failIfExists>
+ <msoRequest>
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <serviceInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</serviceInstanceId>
+ </msoRequest>
+ <messageId>messageId_generated</messageId>
+ <notificationUrl/>
+</createNetworkRequest>"""
+
+ String createNetworkRequest_noPhysicalName =
+ """<createNetworkRequest>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ <networkId>49c86598-f766-46f8-84f8-8d1c1b10f9b4</networkId>
+ <networkName>MNS-25180-L-01-dmz_direct_net_1</networkName>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <networkTechnology>CONTRAIL</networkTechnology>
+ <providerVlanNetwork>
+ <physicalNetworkName>networkName</physicalNetworkName>
+ <vlans>414,415</vlans>
+ </providerVlanNetwork>
+ <contrailNetwork>
+ <shared>true</shared>
+ <external>false</external>
+ <routeTargets>13979:105757</routeTargets>
+ <routeTargets>13979:105757</routeTargets>
+ <policyFqdns>GN_EVPN_Test</policyFqdns>
+ </contrailNetwork>
+ <subnets>
+ <allocationPools>
+ <start/>
+ <end/>
+ </allocationPools>
+ <cidr>107.239.52.0/24</cidr>
+ <enableDHCP>true</enableDHCP>
+ <gatewayIp>107.239.52.1</gatewayIp>
+ <ipVersion>4</ipVersion>
+ <subnetId>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnetId>
+ <subnetName>subnetName</subnetName>
+ </subnets>
+ <subnets>
+ <allocationPools>
+ <start/>
+ <end/>
+ </allocationPools>
+ <cidr>107.239.52.0/24</cidr>
+ <enableDHCP>true</enableDHCP>
+ <gatewayIp>107.239.52.1</gatewayIp>
+ <ipVersion>4</ipVersion>
+ <subnetId>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnetId>
+ <subnetName>subnetName</subnetName>
+ </subnets>
+ <skipAAI>true</skipAAI>
+ <backout>true</backout>
+ <failIfExists>false</failIfExists>
+ <networkParams>
+ <dhcp-enabled>true</dhcp-enabled>
+ <serviceId>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</serviceId>
+ <cidr-mask>true</cidr-mask>
+ <backoutOnFailure>true</backoutOnFailure>
+ <gateway-address>10.10.125.1</gateway-address>
+ </networkParams>
+ <msoRequest>
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <serviceInstanceId>null</serviceInstanceId>
+ </msoRequest>
+ <messageId>messageId_generated</messageId>
+ <notificationUrl/>
+</createNetworkRequest>"""
+
+ String createNetworkResponseREST =
+ """<ns2:createNetworkResponse xmlns:ns2="http://org.onap.so/network">
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <networkFqdn>default-domain:MSOTest:GN_EVPN_direct_net_0_ST1</networkFqdn>
+ <networkStackId></networkStackId>
+ <networkCreated>true</networkCreated>
+ <subnetMap>
+ <entry>
+ <key>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</key>
+ <value>bd8e87c6-f4e2-41b8-b0bc-9596aa00cd73</value>
+ </entry>
+ <entry>
+ <key>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</key>
+ <value>bd8e87c6-f4e2-41b8-b0bc-9596aa00cd73</value>
+ </entry>
+ </subnetMap>
+ <rollback>
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <networkStackId></networkStackId>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <networkCreated>true</networkCreated>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <msoRequest>
+ <requestId>1ef47428-cade-45bd-a103-0751e8b2deb0</requestId>
+ <serviceInstanceId></serviceInstanceId>
+ </msoRequest>
+ </rollback>
+ <messageId>messageId_generated</messageId>
+</ns2:createNetworkResponse>"""
+
+ String createRollbackNetworkRequest =
+ """<rollbackNetworkRequest>
+ <networkRollback>
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <networkStackId/>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <networkCreated>true</networkCreated>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <msoRequest>
+ <requestId>1ef47428-cade-45bd-a103-0751e8b2deb0</requestId>
+ <serviceInstanceId/>
+ </msoRequest>
+ </networkRollback>
+</rollbackNetworkRequest>"""
+
+ String createNetworkResponse =
+ """<ns2:createNetworkResponse xmlns:ns2="http://org.onap.so/network"
+ xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <networkStackId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkStackId>
+ <networkFqdn>default-domain:MSOTest:GN_EVPN_direct_net_0_ST1</networkFqdn>
+ <subnetIdMap>
+ <entry>
+ <key>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</key>
+ <value>bd8e87c6-f4e2-41b8-b0bc-9596aa00cd73</value>
+ </entry>
+ </subnetIdMap>
+ <rollback>
+ <cloudId>RDM2WAGPLCP</cloudId>
+ <msoRequest>
+ <requestId>1ef47428-cade-45bd-a103-0751e8b2deb0</requestId>
+ <serviceInstanceId/>
+ </msoRequest>
+ <networkCreated>true</networkCreated>
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <networkUpdated>false</networkUpdated>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ </rollback>
+</ns2:createNetworkResponse>"""
+
+ String updateContrailAAIPayloadRequest =
+ """<l3-network xmlns="http://org.openecomp.aai.inventory/v9">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>Contrail</network-technology>
+ <neutron-network-id>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutron-network-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <resource-version>l3-version</resource-version>
+ <orchestration-status>Created</orchestration-status>
+ <contrail-network-fqdn>default-domain:MSOTest:GN_EVPN_direct_net_0_ST1</contrail-network-fqdn>
+ <physical-network-name>networkName</physical-network-name>
+ <is-provider-network>false</is-provider-network>
+ <is-shared-network>true</is-shared-network>
+ <is-external-network>false</is-external-network>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <neutron-subnet-id>bd8e87c6-f4e2-41b8-b0bc-9596aa00cd73</neutron-subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>Created</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-role>ECOMP</subnet-role>
+ <resource-version>1505857301954</resource-version>
+ <subnet-name>subnetName</subnet-name>
+ <ip-assignment-direction>true</ip-assignment-direction>
+ <host-routes>
+ <host-route>
+ <host-route-id>string</host-route-id>
+ <route-prefix>192.10.16.0/24</route-prefix>
+ <next-hop>192.10.16.100/24</next-hop>
+ <next-hop-type>ip-address</next-hop-type>
+ <resource-version>1505857301954</resource-version>
+ </host-route>
+ <host-route>
+ <host-route-id>string</host-route-id>
+ <route-prefix>192.110.17.0/24</route-prefix>
+ <next-hop>192.110.17.110/24</next-hop>
+ <next-hop-type>ip-address</next-hop-type>
+ <resource-version>1505857301954</resource-version>
+ </host-route>
+ </host-routes>
+ </subnet>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <neutron-subnet-id>bd8e87c6-f4e2-41b8-b0bc-9596aa00cd73</neutron-subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>Created</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <resource-version>1505857301954</resource-version>
+ <subnet-name>subnetName</subnet-name>
+ <ip-assignment-direction>true</ip-assignment-direction>
+ <host-routes>
+ <host-route>
+ <host-route-id>string</host-route-id>
+ <route-prefix>192.10.16.0/24</route-prefix>
+ <next-hop>192.10.16.100/24</next-hop>
+ <next-hop-type>ip-address</next-hop-type>
+ <resource-version>1505857301954</resource-version>
+ </host-route>
+ </host-routes>
+ </subnet>
+ </subnets>
+ <segmentation-assignments>
+ <segmentation-id>414</segmentation-id>
+ <resource-version>4132176</resource-version>
+ </segmentation-assignments>
+ <segmentation-assignments>
+ <segmentation-id>415</segmentation-id>
+ <resource-version>4132176</resource-version>
+ </segmentation-assignments>
+ <ctag-assignments>
+ <ctag-assignment>
+ <vlan-id-inner>inner</vlan-id-inner>
+ <resource-version>ctag-version</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/897deadc2b954a6bac6d3c197fb3525e/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>897deadc2b954a6bac6d3c197fb3525e</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>MSOTest1</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/a290b841-f672-44dd-b9cd-6f8c20d7d8c8/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>a290b841-f672-44dd-b9cd-6f8c20d7d8c8</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-name</property-key>
+ <property-value>oam_protected_net_6_MTN5_msotest2</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/24a4b507-853a-4a38-99aa-05fcc54be24d/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>24a4b507-853a-4a38-99aa-05fcc54be24d</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-name</property-key>
+ <property-value>oam_protected_net_6_MTN5_msotest1</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+ </ctag-assignment>
+ </ctag-assignments>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>network-policy</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg</related-link>
+ <relationship-data>
+ <relationship-key>network-policy.network-policy-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0cg</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN1</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN2</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+</l3-network>"""
+
+String updateContrailAAIPayloadRequest_segmentation =
+"""<l3-network xmlns="http://org.openecomp.aai.inventory/v9">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>Contrail</network-technology>
+ <neutron-network-id>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutron-network-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <resource-version>l3-version</resource-version>
+ <orchestration-status>Created</orchestration-status>
+ <contrail-network-fqdn>default-domain:MSOTest:GN_EVPN_direct_net_0_ST1</contrail-network-fqdn>
+ <physical-network-name>networkName</physical-network-name>
+ <is-provider-network>false</is-provider-network>
+ <is-shared-network>true</is-shared-network>
+ <is-external-network>false</is-external-network>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <neutron-subnet-id>bd8e87c6-f4e2-41b8-b0bc-9596aa00cd73</neutron-subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>Created</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ </subnet>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <neutron-subnet-id>bd8e87c6-f4e2-41b8-b0bc-9596aa00cd73</neutron-subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>Created</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ </subnet>
+ </subnets>
+ <segmentation-assignments>
+ <segmentation-assignment>
+ <segmentation-id>1</segmentation-id>
+ <resource-version>1498507569188</resource-version>
+ </segmentation-assignment>
+ </segmentation-assignments>
+ <ctag-assignments>
+ <ctag-assignment>
+ <vlan-id-inner>inner</vlan-id-inner>
+ <resource-version>ctag-version</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/897deadc2b954a6bac6d3c197fb3525e/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>897deadc2b954a6bac6d3c197fb3525e</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>MSOTest1</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/a290b841-f672-44dd-b9cd-6f8c20d7d8c8/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>a290b841-f672-44dd-b9cd-6f8c20d7d8c8</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-name</property-key>
+ <property-value>oam_protected_net_6_MTN5_msotest2</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/24a4b507-853a-4a38-99aa-05fcc54be24d/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>24a4b507-853a-4a38-99aa-05fcc54be24d</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-name</property-key>
+ <property-value>oam_protected_net_6_MTN5_msotest1</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+ </ctag-assignment>
+ </ctag-assignments>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>network-policy</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg</related-link>
+ <relationship-data>
+ <relationship-key>network-policy.network-policy-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0cg</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN1</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN2</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+</l3-network>"""
+
+ String updateContrailAAIResponse =
+ """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <rest:header name="Content-Length" value="0"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:551-132672"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+</rest:RESTResponse>"""
+
+ String createNetworkErrorResponse =
+ """<createNetworkError>
+ <messageId>680bd458-5ec1-4a16-b77c-509022e53450</messageId><category>INTERNAL</category>
+ <message>400 Bad Request: The server could not comply with the request since it is either malformed or otherwise incorrect., error.type=StackValidationFailed, error.message=Property error: : resources.network.properties: : Unknown Property network_ipam_refs_data</message>
+ <rolledBack>true</rolledBack>
+ </createNetworkError>"""
+
+
+ String networkException500 =
+ """<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:VersionMismatch</faultcode><faultstring>"http://org.onap.so/network", the namespace on the "createNetworkContrail" element, is not a valid SOAP version.</faultstring></soap:Fault></soap:Body></soap:Envelope>"""
+
+ String aaiResponse =
+ """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Sat,30 Jan 2016 20:09:24 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="localhost-20160130-20:09:24:814-165843"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v3">
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>HSL_direct_net_2</network-name>
+ <network-type>CONTRAIL_BASIC</network-type>
+ <network-role>HSL_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <neutron-network-id>8bbd3edf-b835-4610-96a2-a5cafa029042</neutron-network-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <orchestration-status>active</orchestration-status>
+ <heat-stack-id>HSL_direct_net_2/57594a56-1c92-4a38-9caa-641c1fa3d4b6</heat-stack-id>
+ <subnets>
+ <subnet>
+ <subnet-id>ea5f2a2c-604f-47ff-a9c5-253ee4f0ef0a</subnet-id>
+ <neutron-subnet-id>5a77fdc2-7789-4649-a1b9-6eaf1db1813a</neutron-subnet-id>
+ <gateway-address>172.16.34.1</gateway-address>
+ <network-start-address>172.16.34.0</network-start-address>
+ <cidr-mask>28</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>active</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/cloud-infrastructure/tenants/tenant/e81d842d3e8b45c5a59f57cd76af3aaf/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>e81d842d3e8b45c5a59f57cd76af3aaf</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+ </rest:RESTResponse>"""
+
+ String assignSDNCRequest =
+ """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>assign</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <aetgt:SDNCRequestData>
+ <request-information>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <request-action>NetworkActivateRequest</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <service-type>MSO-dev-service-type</service-type>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <subscriber-name>MSO_1610_dev</subscriber-name>
+ </service-information>
+ <network-request-information>
+ <network-id>networkId</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <tenant>7dd5365547234ee8937416c65507d266</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ </network-request-information>
+ </aetgt:SDNCRequestData>
+</aetgt:SDNCAdapterWorkflowRequest>"""
+
+String assignSDNCRequest_decodeUrlLink =
+"""<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>assign</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <aetgt:SDNCRequestData>
+ <request-information>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <request-action>NetworkActivateRequest</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <service-type>VIRTUAL USP</service-type>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <subscriber-name>MSO_1610_dev</subscriber-name>
+ </service-information>
+ <network-request-information>
+ <network-id>networkId</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <tenant>7dd5365547234ee8937416c65507d266</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ </network-request-information>
+ </aetgt:SDNCRequestData>
+</aetgt:SDNCAdapterWorkflowRequest>"""
+
+String assignRpcSDNCRequest =
+ """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>assign</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <aetgt:SDNCRequestData>
+ <request-information>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <request-action>CreateNetworkInstance</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <subscription-service-type>MSO-dev-service-type</subscription-service-type>
+ <onap-model-information>
+ <model-invariant-uuid>fcc85cb0-ad74-45d7-a5a1-17c8744fdb71</model-invariant-uuid>
+ <model-uuid>36a3a8ea-49a6-4ac8-b06c-89a54544b9b6</model-uuid>
+ <model-version>1.0</model-version>
+ <model-name>HNGW Protected OAM</model-name>
+ </onap-model-information>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <global-customer-id>globalId_45678905678</global-customer-id>
+ <subscriber-name>MSO_1610_dev</subscriber-name>
+ </service-information>
+ <network-information>
+ <network-id>networkId</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <onap-model-information>
+ <model-invariant-uuid>sn5256d1-5a33-55df-13ab-12abad84e764</model-invariant-uuid>
+ <model-customization-uuid>sn5256d1-5a33-55df-13ab-12abad84e222</model-customization-uuid>
+ <model-uuid>sn5256d1-5a33-55df-13ab-12abad84e111</model-uuid>
+ <model-version>1</model-version>
+ <model-name>CONTRAIL_EXTERNAL</model-name>
+ </onap-model-information>
+ </network-information>
+ <network-request-input>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <tenant>7dd5365547234ee8937416c65507d266</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <aic-clli/>
+ <network-input-parameters/>
+ </network-request-input>
+ </aetgt:SDNCRequestData>
+</aetgt:SDNCAdapterWorkflowRequest>"""
+
+String activateSDNCRequest =
+"""<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>activate</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <aetgt:SDNCRequestData>
+ <request-information>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <request-action>CreateNetworkInstance</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <subscription-service-type>MSO-dev-service-type</subscription-service-type>
+ <onap-model-information>
+ <model-invariant-uuid>fcc85cb0-ad74-45d7-a5a1-17c8744fdb71</model-invariant-uuid>
+ <model-uuid>36a3a8ea-49a6-4ac8-b06c-89a54544b9b6</model-uuid>
+ <model-version>1.0</model-version>
+ <model-name>HNGW Protected OAM</model-name>
+ </onap-model-information>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <global-customer-id>globalId_45678905678</global-customer-id>
+ <subscriber-name>MSO_1610_dev</subscriber-name>
+ </service-information>
+ <network-information>
+ <network-id>networkId</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <onap-model-information>
+ <model-invariant-uuid>sn5256d1-5a33-55df-13ab-12abad84e764</model-invariant-uuid>
+ <model-customization-uuid>sn5256d1-5a33-55df-13ab-12abad84e222</model-customization-uuid>
+ <model-uuid>sn5256d1-5a33-55df-13ab-12abad84e111</model-uuid>
+ <model-version>1</model-version>
+ <model-name>CONTRAIL_EXTERNAL</model-name>
+ </onap-model-information>
+ </network-information>
+ <network-request-input>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <tenant>7dd5365547234ee8937416c65507d266</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <aic-clli/>
+ <network-input-parameters/>
+ </network-request-input>
+ </aetgt:SDNCRequestData>
+</aetgt:SDNCAdapterWorkflowRequest>"""
+
+String assignResponse =
+"""<sdncadapterworkflow:SDNCAdapterWorkflowResponse xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1" xmlns:tag0="http://org.onap/workflow/sdnc/adapter/schema/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <sdncadapterworkflow:response-data> <tag0:CallbackHeader> <tag0:RequestId>006927ca-f5a3-47fd-880c-dfcbcd81a093</tag0:RequestId> <tag0:ResponseCode>200</tag0:ResponseCode> <tag0:ResponseMessage>OK</tag0:ResponseMessage> </tag0:CallbackHeader> <tag0:RequestData xsi:type="xs:string"><output xmlns="com:att:sdnctl:vnf"><response-code>200</response-code><svc-request-id>006927ca-f5a3-47fd-880c-dfcbcd81a093</svc-request-id><ack-final-indicator>Y</ack-final-indicator><service-information><subscriber-name>notsurewecare</subscriber-name><service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id><service-instance-id>GN_EVPN_direct_net_0_ST_noGW</service-instance-id></service-information><network-information><network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id></network-information></output></tag0:RequestData> </sdncadapterworkflow:response-data> </sdncadapterworkflow:SDNCAdapterWorkflowResponse>"""
+
+ String sdncRollbackRequest =
+ """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>rollback</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <aetgt:SDNCRequestData>
+ <request-information>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <request-action>NetworkActivateRequest</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <service-type>MSO-dev-service-type</service-type>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <subscriber-name>MSO_1610_dev</subscriber-name>
+ </service-information>
+ <network-request-information>
+ <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <tenant>7dd5365547234ee8937416c65507d266</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ </network-request-information>
+ </aetgt:SDNCRequestData>
+</aetgt:SDNCAdapterWorkflowRequest>"""
+
+String sdncRpcRollbackRequest =
+"""<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>unassign</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <aetgt:SDNCRequestData>
+ <request-information>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <request-action>DeleteNetworkInstance</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <subscription-service-type>MSO-dev-service-type</subscription-service-type>
+ <onap-model-information>
+ <model-invariant-uuid>fcc85cb0-ad74-45d7-a5a1-17c8744fdb71</model-invariant-uuid>
+ <model-uuid>36a3a8ea-49a6-4ac8-b06c-89a54544b9b6</model-uuid>
+ <model-version>1.0</model-version>
+ <model-name>HNGW Protected OAM</model-name>
+ </onap-model-information>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <global-customer-id>globalId_45678905678</global-customer-id>
+ <subscriber-name>MSO_1610_dev</subscriber-name>
+ </service-information>
+ <network-information>
+ <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <onap-model-information>
+ <model-invariant-uuid>sn5256d1-5a33-55df-13ab-12abad84e764</model-invariant-uuid>
+ <model-customization-uuid>sn5256d1-5a33-55df-13ab-12abad84e222</model-customization-uuid>
+ <model-uuid>sn5256d1-5a33-55df-13ab-12abad84e111</model-uuid>
+ <model-version>1</model-version>
+ <model-name>CONTRAIL_EXTERNAL</model-name>
+ </onap-model-information>
+ </network-information>
+ <network-request-input>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <tenant>7dd5365547234ee8937416c65507d266</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <aic-clli/>
+ <network-input-parameters/>
+ </network-request-input>
+ </aetgt:SDNCRequestData>
+</aetgt:SDNCAdapterWorkflowRequest>"""
+
+String sdncActivateRollbackRequest =
+"""<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>deactivate</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <aetgt:SDNCRequestData>
+ <request-information>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <request-action>DeleteNetworkInstance</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <subscription-service-type>MSO-dev-service-type</subscription-service-type>
+ <onap-model-information>
+ <model-invariant-uuid>fcc85cb0-ad74-45d7-a5a1-17c8744fdb71</model-invariant-uuid>
+ <model-uuid>36a3a8ea-49a6-4ac8-b06c-89a54544b9b6</model-uuid>
+ <model-version>1.0</model-version>
+ <model-name>HNGW Protected OAM</model-name>
+ </onap-model-information>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <global-customer-id>globalId_45678905678</global-customer-id>
+ <subscriber-name>MSO_1610_dev</subscriber-name>
+ </service-information>
+ <network-information>
+ <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <onap-model-information>
+ <model-invariant-uuid>sn5256d1-5a33-55df-13ab-12abad84e764</model-invariant-uuid>
+ <model-customization-uuid>sn5256d1-5a33-55df-13ab-12abad84e222</model-customization-uuid>
+ <model-uuid>sn5256d1-5a33-55df-13ab-12abad84e111</model-uuid>
+ <model-version>1</model-version>
+ <model-name>CONTRAIL_EXTERNAL</model-name>
+ </onap-model-information>
+ </network-information>
+ <network-request-input>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <tenant>7dd5365547234ee8937416c65507d266</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <aic-clli/>
+ <network-input-parameters/>
+ </network-request-input>
+ </aetgt:SDNCRequestData>
+</aetgt:SDNCAdapterWorkflowRequest>"""
+
+ String sdncAdapterWorkflowResponse =
+ """<aetgt:SDNCAdapterWorkflowResponse xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
+ <sdncadapterworkflow:response-data>
+<tag0:CallbackHeader xmlns:tag0="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <tag0:RequestId>745b1b50-e39e-4685-9cc8-c71f0bde8bf0</tag0:RequestId>
+ <tag0:ResponseCode>200</tag0:ResponseCode>
+ <tag0:ResponseMessage>OK</tag0:ResponseMessage>
+</tag0:CallbackHeader>
+ <tag0:RequestData xmlns:tag0="http://org.onap/workflow/sdnc/adapter/schema/v1"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:type="xs:string">&lt;output xmlns="com:att:sdnctl:vnf"&gt;&lt;svc-request-id&gt;00703dc8-71ff-442d-a4a8-3adc5beef6a9&lt;/svc-request-id&gt;&lt;response-code&gt;200&lt;/response-code&gt;&lt;ack-final-indicator&gt;Y&lt;/ack-final-indicator&gt;&lt;network-information&gt;&lt;network-id&gt;49c86598-f766-46f8-84f8-8d1c1b10f9b4&lt;/network-id&gt;&lt;/network-information&gt;&lt;service-information&gt;&lt;service-type&gt;a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb&lt;/service-type&gt;&lt;service-instance-id&gt;MNS-25180-L-01-dmz_direct_net_1&lt;/service-instance-id&gt;&lt;subscriber-name&gt;notsurewecare&lt;/subscriber-name&gt;&lt;/service-information&gt;&lt;/output&gt;</tag0:RequestData>
+ </sdncadapterworkflow:response-data>
+</aetgt:SDNCAdapterWorkflowResponse>"""
+
+
+ String sdncAdapterWorkflowResponse_Error =
+ """<sdncadapterworkflow:SDNCAdapterWorkflowResponse xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:tag0="http://org.onap/workflow/sdnc/adapter/schema/v1"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="com:att:sdnctl:vnf">
+ <sdncadapterworkflow:response-data>
+ <tag0:RequestData xsi:type="xs:string">
+ <output>
+ <response-code>400</response-code>
+ <response-message>Error writing to l3-netework</response-message>
+ <ack-final-indicator>Y</ack-final-indicator>
+ <svc-request-id>c79240d8-34b5-4853-af69-2021928dba00</svc-request-id>
+ </output>
+ </tag0:RequestData>
+ </sdncadapterworkflow:response-data>
+</sdncadapterworkflow:SDNCAdapterWorkflowResponse>"""
+
+ String expected_sdncAdapterWorkflowResponse_Error =
+ """<sdncadapterworkflow:SDNCAdapterWorkflowResponse xmlns="com:att:sdnctl:vnf"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:tag0="http://org.onap/workflow/sdnc/adapter/schema/v1"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <sdncadapterworkflow:response-data>
+ <tag0:RequestData xsi:type="xs:string">
+ <output>
+ <response-code>400</response-code>
+ <response-message>Error writing to l3-netework</response-message>
+ <ack-final-indicator>Y</ack-final-indicator>
+ <svc-request-id>c79240d8-34b5-4853-af69-2021928dba00</svc-request-id>
+ </output>
+ </tag0:RequestData>
+ </sdncadapterworkflow:response-data>
+</sdncadapterworkflow:SDNCAdapterWorkflowResponse>"""
+
+ String sdncAdapterWorkflowFormattedResponse =
+ """<aetgt:SDNCAdapterWorkflowResponse xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns="com:att:sdnctl:vnf">
+ <aetgt:response-data>
+ <output>
+ <svc-request-id>00703dc8-71ff-442d-a4a8-3adc5beef6a9</svc-request-id>
+ <response-code>200</response-code>
+ <ack-final-indicator>Y</ack-final-indicator>
+ <network-information>
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ </network-information>
+ <service-information>
+ <service-type>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-type>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <subscriber-name>notsurewecare</subscriber-name>
+ </service-information>
+ </output>
+ </aetgt:response-data>
+</aetgt:SDNCAdapterWorkflowResponse>"""
+
+String sdncAdapterWorkflowAssignResponse =
+"""<sdncadapterworkflow:SDNCAdapterWorkflowResponse xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:tag0="http://org.onap.so/workflow/sdnc/adapter/schema/v1"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <sdncadapterworkflow:response-data>
+ <tag0:CallbackHeader>
+ <tag0:RequestId>79ec9006-3695-4fcc-93a8-be6f9e248beb</tag0:RequestId>
+ <tag0:ResponseCode>200</tag0:ResponseCode>
+ <tag0:ResponseMessage>OK</tag0:ResponseMessage>
+ </tag0:CallbackHeader>
+ <tag0:RequestData xsi:type="xs:string">
+ <output xmlns="org:onap:sdnc:northbound:generic-resource">
+ <response-message/>
+ <svc-request-id>79ec9006-3695-4fcc-93a8-be6f9e248beb</svc-request-id>
+ <service-response-information>
+ <instance-id>f805ec2b-b4d8-473e-8325-67f110139e5d</instance-id>
+ </service-response-information>
+ <response-code>200</response-code>
+ <network-response-information>
+ <instance-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</instance-id>
+ <object-path>restconf/config/GENERIC-RESOURCE-API:services/service/f805ec2b-b4d8-473e-8325-67f110139e5d/service-data/networks/network/f7e4db56-aab5-4065-8e65-cec1cd1de24f</object-path>
+ </network-response-information>
+ <ack-final-indicator>Y</ack-final-indicator>
+ </output>
+ </tag0:RequestData>
+ </sdncadapterworkflow:response-data>
+</sdncadapterworkflow:SDNCAdapterWorkflowResponse>"""
+
+ String rollbackNetworkRequest =
+"""<NetworkAdapter:rollbackNetwork xmlns:NetworkAdapter="http://org.onap.so/network">
+ <rollback>
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <networkStackId/>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <networkCreated>true</networkCreated>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <msoRequest>
+ <requestId>1ef47428-cade-45bd-a103-0751e8b2deb0</requestId>
+ <serviceInstanceId/>
+ </msoRequest>
+ </rollback>
+</NetworkAdapter:rollbackNetwork>"""
+
+ String rollbackActivateSDNCRequest =
+"""<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>rollback</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <aetgt:SDNCRequestData>
+ <request-information>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <request-action>CreateNetworkInstance</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <service-type>MSO-dev-service-type</service-type>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <subscriber-name>MSO_1610_dev</subscriber-name>
+ </service-information>
+ <network-information>
+ <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <onap-model-information>
+ <model-invariant-uuid>invariant-uuid</model-invariant-uuid>
+ <model-customization-uuid>customization-uuid</model-customization-uuid>
+ <model-uuid>uuid</model-uuid>
+ <model-version>version</model-version>
+ <model-name>CONTRAIL_EXTERNAL</model-name>
+ </onap-model-information>
+ </network-information>
+ <network-request-information>
+ <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <tenant>7dd5365547234ee8937416c65507d266</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ </network-request-information>
+ </aetgt:SDNCRequestData>
+</aetgt:SDNCAdapterWorkflowRequest>"""
+
+ String rollbackSDNCRequest =
+"""<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>rollback</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <aetgt:SDNCRequestData>
+ <request-information>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <request-action>CreateNetworkInstance</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <service-type>MSO-dev-service-type</service-type>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <subscriber-name>MSO_1610_dev</subscriber-name>
+ </service-information>
+ <network-information>
+ <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <onap-model-information>
+ <model-invariant-uuid>invariant-uuid</model-invariant-uuid>
+ <model-customization-uuid>customization-uuid</model-customization-uuid>
+ <model-uuid>uuid</model-uuid>
+ <model-version>version</model-version>
+ <model-name>CONTRAIL_EXTERNAL</model-name>
+ </onap-model-information>
+ </network-information>
+ <network-request-information>
+ <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <tenant>7dd5365547234ee8937416c65507d266</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ </network-request-information>
+ </aetgt:SDNCRequestData>
+</aetgt:SDNCAdapterWorkflowRequest>"""
+
+// - - - - - - - -
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ public void initializeVariables (DelegateExecution mockExecution) {
+
+ verify(mockExecution).setVariable(Prefix + "networkRequest", "")
+ verify(mockExecution).setVariable(Prefix + "rollbackEnabled", null)
+ verify(mockExecution).setVariable(Prefix + "networkInputs", "")
+ //verify(mockExecution).setVariable(Prefix + "requestId", "")
+ verify(mockExecution).setVariable(Prefix + "messageId", "")
+ verify(mockExecution).setVariable(Prefix + "source", "")
+ verify(mockExecution).setVariable("BasicAuthHeaderValuePO", "")
+ verify(mockExecution).setVariable("BasicAuthHeaderValueSDNC", "")
+ verify(mockExecution).setVariable(Prefix + "serviceInstanceId","")
+ verify(mockExecution).setVariable("GENGS_type","")
+ verify(mockExecution).setVariable(Prefix + "rsrc_endpoint", null)
+ verify(mockExecution).setVariable(Prefix + "networkOutputs", "")
+ verify(mockExecution).setVariable(Prefix + "networkId","")
+ verify(mockExecution).setVariable(Prefix + "networkName","")
+
+ // AAI query Name
+ verify(mockExecution).setVariable(Prefix + "queryNameAAIRequest","")
+ verify(mockExecution).setVariable(Prefix + "queryNameAAIResponse", "")
+ verify(mockExecution).setVariable(Prefix + "aaiNameReturnCode", "")
+ verify(mockExecution).setVariable(Prefix + "isAAIqueryNameGood", false)
+
+ // AAI query Cloud Region
+ verify(mockExecution).setVariable(Prefix + "queryCloudRegionRequest","")
+ verify(mockExecution).setVariable(Prefix + "queryCloudRegionReturnCode","")
+ verify(mockExecution).setVariable(Prefix + "queryCloudRegionResponse","")
+ verify(mockExecution).setVariable(Prefix + "cloudRegionPo","")
+ verify(mockExecution).setVariable(Prefix + "cloudRegionSdnc","")
+ verify(mockExecution).setVariable(Prefix + "isCloudRegionGood", false)
+
+ // AAI query Id
+ verify(mockExecution).setVariable(Prefix + "queryIdAAIRequest","")
+ verify(mockExecution).setVariable(Prefix + "queryIdAAIResponse", "")
+ verify(mockExecution).setVariable(Prefix + "aaiIdReturnCode", "")
+
+ // AAI query vpn binding
+ verify(mockExecution).setVariable(Prefix + "queryVpnBindingAAIRequest","")
+ verify(mockExecution).setVariable(Prefix + "queryVpnBindingAAIResponse", "")
+ verify(mockExecution).setVariable(Prefix + "aaiQqueryVpnBindingReturnCode", "")
+ verify(mockExecution).setVariable(Prefix + "vpnBindings", null)
+ verify(mockExecution).setVariable(Prefix + "vpnCount", 0)
+ verify(mockExecution).setVariable(Prefix + "routeCollection", "")
+
+ // AAI query network policy
+ verify(mockExecution).setVariable(Prefix + "queryNetworkPolicyAAIRequest","")
+ verify(mockExecution).setVariable(Prefix + "queryNetworkPolicyAAIResponse", "")
+ verify(mockExecution).setVariable(Prefix + "aaiQqueryNetworkPolicyReturnCode", "")
+ verify(mockExecution).setVariable(Prefix + "networkPolicyUriList", null)
+ verify(mockExecution).setVariable(Prefix + "networkPolicyCount", 0)
+ verify(mockExecution).setVariable(Prefix + "networkCollection", "")
+
+ // AAI query route table reference
+ verify(mockExecution).setVariable(Prefix + "queryNetworkTableRefAAIRequest","")
+ verify(mockExecution).setVariable(Prefix + "queryNetworkTableRefAAIResponse", "")
+ verify(mockExecution).setVariable(Prefix + "aaiQqueryNetworkTableRefReturnCode", "")
+ verify(mockExecution).setVariable(Prefix + "networkTableRefUriList", null)
+ verify(mockExecution).setVariable(Prefix + "networkTableRefCount", 0)
+ verify(mockExecution).setVariable(Prefix + "tableRefCollection", "")
+
+ // AAI requery Id
+ verify(mockExecution).setVariable(Prefix + "requeryIdAAIRequest","")
+ verify(mockExecution).setVariable(Prefix + "requeryIdAAIResponse", "")
+ verify(mockExecution).setVariable(Prefix + "aaiRequeryIdReturnCode", "")
+
+ // AAI update contrail
+ verify(mockExecution).setVariable(Prefix + "updateContrailAAIUrlRequest","")
+ verify(mockExecution).setVariable(Prefix + "updateContrailAAIPayloadRequest","")
+ verify(mockExecution).setVariable(Prefix + "updateContrailAAIResponse", "")
+ verify(mockExecution).setVariable(Prefix + "aaiUpdateContrailReturnCode", "")
+
+ verify(mockExecution).setVariable(Prefix + "createNetworkRequest", "")
+ verify(mockExecution).setVariable(Prefix + "createNetworkResponse", "")
+ verify(mockExecution).setVariable(Prefix + "rollbackNetworkRequest", "")
+ //verify(mockExecution).setVariable(Prefix + "rollbackNetworkResponse", "")
+ verify(mockExecution).setVariable(Prefix + "networkReturnCode", "")
+ //verify(mockExecution).setVariable(Prefix + "rollbackNetworkReturnCode", "")
+ verify(mockExecution).setVariable(Prefix + "isNetworkRollbackNeeded", false)
+
+ verify(mockExecution).setVariable(Prefix + "assignSDNCRequest", "")
+ verify(mockExecution).setVariable(Prefix + "assignSDNCResponse", "")
+ verify(mockExecution).setVariable(Prefix + "rollbackSDNCRequest", "")
+ //verify(mockExecution).setVariable(Prefix + "rollbackSDNCResponse", "")
+ verify(mockExecution).setVariable(Prefix + "sdncReturnCode", "")
+ //verify(mockExecution).setVariable(Prefix + "rollbackSDNCReturnCode", "")
+ verify(mockExecution).setVariable(Prefix + "isSdncRollbackNeeded", false)
+ verify(mockExecution).setVariable(Prefix + "sdncResponseSuccess", false)
+
+ verify(mockExecution).setVariable(Prefix + "activateSDNCRequest", "")
+ verify(mockExecution).setVariable(Prefix + "activateSDNCResponse", "")
+ verify(mockExecution).setVariable(Prefix + "rollbackActivateSDNCRequest", "")
+ //verify(mockExecution).setVariable(Prefix + "rollbackActivateSDNCResponse", "")
+ verify(mockExecution).setVariable(Prefix + "sdncActivateReturnCode", "")
+ //verify(mockExecution).setVariable(Prefix + "rollbackActivateSDNCReturnCode", "")
+ verify(mockExecution).setVariable(Prefix + "isSdncActivateRollbackNeeded", false)
+ verify(mockExecution).setVariable(Prefix + "sdncActivateResponseSuccess", false)
+
+ verify(mockExecution).setVariable(Prefix + "orchestrationStatus", "")
+ verify(mockExecution).setVariable(Prefix + "isVnfBindingPresent", false)
+ verify(mockExecution).setVariable(Prefix + "Success", false)
+
+ verify(mockExecution).setVariable(Prefix + "isException", false)
+
+ }
+
+ @Test
+ //@Ignore
+ public void preProcessRequest_vIPR_NetworkRequest() {
+
+ println "************ preProcessRequest_Payload ************* "
+
+ def networkModelInfo = """{"modelUuid": "sn5256d1-5a33-55df-13ab-12abad84e111",
+ "modelName": "CONTRAIL_EXTERNAL",
+ "modelType": "CONTRAIL_EXTERNAL",
+ "modelVersion": "1",
+ "modelCustomizationUuid": "sn5256d1-5a33-55df-13ab-12abad84e222",
+ "modelInvariantUuid": "sn5256d1-5a33-55df-13ab-12abad84e764"
+ }""".trim()
+
+ def serviceModelInfo = """{"modelUuid": "36a3a8ea-49a6-4ac8-b06c-89a54544b9b6",
+ "modelName": "HNGW Protected OAM",
+ "modelType": "service",
+ "modelVersion": "1.0",
+ "modelInvariantUuid": "fcc85cb0-ad74-45d7-a5a1-17c8744fdb71"
+ }""".trim()
+
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+
+ // Pre-defined value, testing Only
+ when(mockExecution.getVariable("testMessageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ // Inputs:
+ when(mockExecution.getVariable("msoRequestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("disableRollback")).thenReturn("true")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable("networkId")).thenReturn("networkId") // optional
+ when(mockExecution.getVariable("networkName")).thenReturn("MNS-25180-L-01-dmz_direct_net_1") // optional
+ when(mockExecution.getVariable("productFamilyId")).thenReturn("a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb")
+ when(mockExecution.getVariable("networkModelInfo")).thenReturn("CONTRAIL_EXTERNAL")
+ when(mockExecution.getVariable("lcpCloudRegionId")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable("tenantId")).thenReturn("7dd5365547234ee8937416c65507d266")
+ when(mockExecution.getVariable("failIfExists")).thenReturn("false")
+ when(mockExecution.getVariable("networkModelInfo")).thenReturn(networkModelInfo)
+ when(mockExecution.getVariable("serviceModelInfo")).thenReturn(serviceModelInfo)
+ when(mockExecution.getVariable("sdncVersion")).thenReturn("1702")
+ when(mockExecution.getVariable("action")).thenReturn("CREATE")
+ when(mockExecution.getVariable("subscriptionServiceType")).thenReturn("MSO-dev-service-type")
+ when(mockExecution.getVariable("globalSubscriberId")).thenReturn("globalId_45678905678")
+
+ when(mockExecution.getVariable("mso.adapters.po.auth")).thenReturn("3141634BF7E070AA289CF2892C986C0B")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ when(mockExecution.getVariable("mso.rollback")).thenReturn("true")
+ when(mockExecution.getVariable("mso.adapters.sdnc.endpoint")).thenReturn("http://localhost:8090/SDNCAdapter")
+ when(mockExecution.getVariable("mso.adapters.network.rest.endpoint")).thenReturn("http://localhost:8090/networks/NetworkAdapter")
+ when(mockExecution.getVariable("mso.adapters.sdnc.resource.endpoint")).thenReturn("http://localhost:8090/SDNCAdapterRpc")
+
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.preProcessRequest(mockExecution)
+
+// verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ //verify variable initialization
+ initializeVariables(mockExecution)
+
+ verify(mockExecution).setVariable("action", "CREATE")
+ verify(mockExecution).setVariable(Prefix + "networkId","")
+ verify(mockExecution).setVariable(Prefix + "networkRequest", expectedvIPRNetworkRequest)
+ verify(mockExecution, atLeast(1)).setVariable(Prefix + "rollbackEnabled", false)
+ verify(mockExecution).setVariable(Prefix + "networkInputs", expectedvIPRNetworkInputs)
+ //verify(mockExecution).setVariable(Prefix + "requestId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ //verify(mockExecution).setVariable("mso-service-instance-id", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ verify(mockExecution).setVariable(Prefix + "messageId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ verify(mockExecution).setVariable(Prefix + "source", "VID")
+ verify(mockExecution).setVariable("BasicAuthHeaderValuePO", "Basic cGFzc3dvcmQ=")
+ verify(mockExecution).setVariable("BasicAuthHeaderValueSDNC", "Basic cGFzc3dvcmQ=")
+ verify(mockExecution).setVariable(Prefix + "serviceInstanceId","f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ verify(mockExecution, atLeast(1)).setVariable("GENGS_type", "service-instance")
+ //verify(mockExecution, atLeast(1)).setVariable("mso-request-id", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ //verify(mockExecution, atLeast(1)).setVariable("msoRequestId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ //verify(mockExecution).setVariable("mso-service-instance-id","88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ verify(mockExecution).setVariable(Prefix + "networkId","")
+ verify(mockExecution).setVariable(Prefix + "networkOutputs", networkvIPROutputs)
+ verify(mockExecution).setVariable(Prefix + "networkName","")
+
+ }
+
+ @Test
+ //@Ignore
+ public void preProcessRequest_JSON_NetworkRequest() {
+
+ println "************ preProcessRequest_Payload ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+
+ // Pre-defined value, testing Only
+ when(mockExecution.getVariable("testMessageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ // Inputs:
+ // when(mockExecution.getVariable("requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable("requestAction")).thenReturn("CREATE")
+ when(mockExecution.getVariable("networkId")).thenReturn("networkId") // optional
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("bpmnRequest")).thenReturn(jsonIncomingRequest) // JSON format
+ when(mockExecution.getVariable("sdncVersion")).thenReturn("1610") // 1610 default
+ when(mockExecution.getVariable("disableRollback")).thenReturn(true)
+
+ when(mockExecution.getVariable("mso.adapters.po.auth")).thenReturn("3141634BF7E070AA289CF2892C986C0B")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ when(mockExecution.getVariable("mso.rollback")).thenReturn("true")
+ when(mockExecution.getVariable("mso.adapters.sdnc.endpoint")).thenReturn("http://localhost:8090/SDNCAdapter")
+ when(mockExecution.getVariable("mso.adapters.network.rest.endpoint")).thenReturn("http://localhost:8090/networks/NetworkAdapter")
+ when(mockExecution.getVariable("mso.adapters.sdnc.resource.endpoint")).thenReturn("http://localhost:8090/SDNCAdapterRpc")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.preProcessRequest(mockExecution)
+
+// verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ //verify variable initialization
+ initializeVariables(mockExecution)
+
+ verify(mockExecution).setVariable("action", "CREATE")
+ verify(mockExecution).setVariable(Prefix + "networkRequest", expectedJSONNetworkRequest)
+ verify(mockExecution).setVariable(Prefix + "rollbackEnabled", false)
+ verify(mockExecution).setVariable(Prefix + "networkInputs", expectedJSONNetworkInputs)
+ //verify(mockExecution).setVariable(Prefix + "requestId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ //verify(mockExecution).setVariable(Prefix + "messageId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ verify(mockExecution).setVariable(Prefix + "source", "VID")
+ verify(mockExecution).setVariable("BasicAuthHeaderValuePO", "Basic cGFzc3dvcmQ=")
+ verify(mockExecution).setVariable("BasicAuthHeaderValueSDNC", "Basic cGFzc3dvcmQ=")
+ verify(mockExecution).setVariable(Prefix + "serviceInstanceId","f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ verify(mockExecution, atLeast(1)).setVariable("GENGS_type", "service-instance")
+ //verify(mockExecution, atLeast(1)).setVariable("msoRequestId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ //verify(mockExecution).setVariable("mso-service-instance-id","88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ verify(mockExecution).setVariable(Prefix + "networkId","")
+ verify(mockExecution).setVariable(Prefix + "networkOutputs", networkJSONOutputs)
+ verify(mockExecution).setVariable(Prefix + "networkName","")
+
+
+ }
+
+ @Test
+ //@Ignore
+ public void preProcessRequest_XML_NetworkRequest() {
+
+ println "************ preProcessRequest_Payload ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+
+ // Pre-defined value, testing Only
+ when(mockExecution.getVariable("testMessageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ // Inputs:
+ // when(mockExecution.getVariable("msoRequestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("bpmnRequest")).thenReturn(xmlIncomingRequest) // XML format
+
+ when(mockExecution.getVariable("mso.adapters.po.auth")).thenReturn("3141634BF7E070AA289CF2892C986C0B")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ when(mockExecution.getVariable("mso.rollback")).thenReturn("true")
+ when(mockExecution.getVariable("mso.adapters.sdnc.endpoint")).thenReturn("http://localhost:8090/SDNCAdapter")
+ when(mockExecution.getVariable("mso.adapters.network.rest.endpoint")).thenReturn("http://localhost:8090/networks/NetworkAdapter")
+ when(mockExecution.getVariable("mso.adapters.sdnc.resource.endpoint")).thenReturn("http://localhost:8090/SDNCAdapterRpc")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.preProcessRequest(mockExecution)
+
+// verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ //verify variable initialization
+ initializeVariables(mockExecution)
+
+ verify(mockExecution).setVariable("action", "CREATE")
+ verify(mockExecution).setVariable(Prefix + "networkRequest", expectedXMLNetworkRequest)
+ verify(mockExecution).setVariable(Prefix + "rollbackEnabled", true)
+ verify(mockExecution).setVariable(Prefix + "networkInputs", expectedXMLNetworkInputs)
+ //verify(mockExecution).setVariable(Prefix + "requestId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ verify(mockExecution).setVariable(Prefix + "messageId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ verify(mockExecution).setVariable(Prefix + "source", "PORTAL")
+ verify(mockExecution).setVariable("BasicAuthHeaderValuePO", "Basic cGFzc3dvcmQ=")
+ verify(mockExecution).setVariable("BasicAuthHeaderValueSDNC", "Basic cGFzc3dvcmQ=")
+ verify(mockExecution).setVariable(Prefix + "serviceInstanceId","MNS-25180-L-01-dmz_direct_net_1")
+ verify(mockExecution, atLeast(1)).setVariable("GENGS_type", "service-instance")
+ //verify(mockExecution).setVariable("mso-service-instance-id","88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ verify(mockExecution, atLeast(1)).setVariable(Prefix + "networkId","")
+ verify(mockExecution).setVariable(Prefix + "networkOutputs", networkXMLOutputs)
+ verify(mockExecution).setVariable(Prefix + "networkName","")
+
+ }
+
+
+
+ @Test
+ //@Ignore
+ public void prepareCreateNetworkRequest() {
+
+ println "************ prepareNetworkRequest ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedvIPRNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "queryIdAAIResponse")).thenReturn(queryIdAIIResponse)
+ when(mockExecution.getVariable(Prefix + "cloudRegionPo")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("messageId_generated")
+ when(mockExecution.getVariable(Prefix + "source")).thenReturn("VID")
+ //when(mockExecution.getVariable(Prefix + "queryVpnBindingAAIResponse")).thenReturn(queryVpnBindingAAIResponse)
+ when(mockExecution.getVariable(Prefix + "routeCollection")).thenReturn("<routeTargets>13979:105757</routeTargets><routeTargets>13979:105757</routeTargets>")
+ when(mockExecution.getVariable(Prefix + "networkCollection")).thenReturn("<policyFqdns>GN_EVPN_Test</policyFqdns>")
+ when(mockExecution.getVariable(Prefix + "tableRefCollection")).thenReturn("<routeTableFqdns>refFQDN1</routeTableFqdns><routeTableFqdns>refFQDN2</routeTableFqdns>")
+ when(mockExecution.getVariable(Prefix + "requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ //when(mockExecution.getVariable("URN_?????")).thenReturn("") // notificationUrl, //TODO - is this coming from URN? What variable/value to use?
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "rollbackEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.prepareCreateNetworkRequest(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ verify(mockExecution).setVariable(Prefix + "createNetworkRequest", createNetworkRequest)
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void prepareCreateNetworkRequest_Ipv4() {
+
+ println "************ prepareNetworkRequest ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedvIPRNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "queryIdAAIResponse")).thenReturn(queryIdAIIResponse_Ipv4)
+ when(mockExecution.getVariable(Prefix + "cloudRegionPo")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("messageId_generated")
+ when(mockExecution.getVariable(Prefix + "source")).thenReturn("VID")
+ //when(mockExecution.getVariable(Prefix + "queryVpnBindingAAIResponse")).thenReturn(queryVpnBindingAAIResponse)
+ when(mockExecution.getVariable(Prefix + "routeCollection")).thenReturn("<routeTargets>13979:105757</routeTargets><routeTargets>13979:105757</routeTargets>")
+ when(mockExecution.getVariable(Prefix + "networkCollection")).thenReturn("<policyFqdns>GN_EVPN_Test</policyFqdns>")
+ when(mockExecution.getVariable(Prefix + "tableRefCollection")).thenReturn("<routeTableFqdns>refFQDN1</routeTableFqdns><routeTableFqdns>refFQDN2</routeTableFqdns>")
+ when(mockExecution.getVariable(Prefix + "requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ //when(mockExecution.getVariable("URN_?????")).thenReturn("") // notificationUrl, //TODO - is this coming from URN? What variable/value to use?
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "rollbackEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.prepareCreateNetworkRequest(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ verify(mockExecution).setVariable(Prefix + "createNetworkRequest", createNetworkRequest_Ipv4)
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareCreateNetworkRequest_AlaCarte() {
+
+ println "************ prepareNetworkRequest ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedJSONNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "queryIdAAIResponse")).thenReturn(queryIdAIIResponse_AlaCarte)
+ when(mockExecution.getVariable(Prefix + "cloudRegionPo")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("messageId_generated")
+ when(mockExecution.getVariable(Prefix + "source")).thenReturn("VID")
+ //when(mockExecution.getVariable(Prefix + "queryVpnBindingAAIResponse")).thenReturn(queryVpnBindingAAIResponse)
+ when(mockExecution.getVariable(Prefix + "routeCollection")).thenReturn("<routeTargets>13979:105757</routeTargets><routeTargets>13979:105757</routeTargets>")
+ when(mockExecution.getVariable(Prefix + "networkCollection")).thenReturn("<policyFqdns>GN_EVPN_Test</policyFqdns>")
+ when(mockExecution.getVariable(Prefix + "tableRefCollection")).thenReturn("<routeTableFqdns>refFQDN1</routeTableFqdns><routeTableFqdns>refFQDN2</routeTableFqdns>")
+ when(mockExecution.getVariable(Prefix + "requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ //when(mockExecution.getVariable("URN_?????")).thenReturn("") // notificationUrl, //TODO - is this coming from URN? What variable/value to use?
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "rollbackEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.prepareCreateNetworkRequest(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ verify(mockExecution).setVariable(Prefix + "createNetworkRequest", createNetworkRequestAlaCarte)
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareCreateNetworkRequest_SRIOV() {
+
+ println "************ prepareNetworkRequest ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedvIPRNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "queryIdAAIResponse")).thenReturn(queryIdAIIResponse_SRIOV)
+ when(mockExecution.getVariable(Prefix + "cloudRegionPo")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("messageId_generated")
+ when(mockExecution.getVariable(Prefix + "source")).thenReturn("VID")
+ //when(mockExecution.getVariable(Prefix + "queryVpnBindingAAIResponse")).thenReturn(queryVpnBindingAAIResponse)
+ when(mockExecution.getVariable(Prefix + "routeCollection")).thenReturn("<routeTargets>13979:105757</routeTargets><routeTargets>13979:105757</routeTargets>")
+ when(mockExecution.getVariable(Prefix + "networkCollection")).thenReturn("<policyFqdns>GN_EVPN_Test</policyFqdns>")
+ when(mockExecution.getVariable(Prefix + "tableRefCollection")).thenReturn("<routeTableFqdns>refFQDN1</routeTableFqdns><routeTableFqdns>refFQDN2</routeTableFqdns>")
+ when(mockExecution.getVariable(Prefix + "requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ //when(mockExecution.getVariable("URN_?????")).thenReturn("") // notificationUrl, //TODO - is this coming from URN? What variable/value to use?
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "rollbackEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.prepareCreateNetworkRequest(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ verify(mockExecution).setVariable(Prefix + "createNetworkRequest", createNetworkRequest_SRIOV)
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void prepareSDNCRequest() {
+
+ println "************ prepareSDNCRequest ************* "
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedvIPRNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "cloudRegionSdnc")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(Prefix + "serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable(Prefix + "networkId")).thenReturn("networkId")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("testMessageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:8090/SDNCAdapterCallback")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("GENGSI_siResourceLink")).thenReturn("https://aai-int1.test.com:8443/aai/v8/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/6d4eb22a-82f1-4257-9f80-4176262cfe69/")
+
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.prepareSDNCRequest(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "assignSDNCRequest", assignSDNCRequest)
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareSDNCRequest_decodeUrlLink() {
+
+ println "************ prepareSDNCRequest ************* "
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedvIPRNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "cloudRegionSdnc")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(Prefix + "serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable(Prefix + "networkId")).thenReturn("networkId")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("testMessageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:8090/SDNCAdapterCallback")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("GENGSI_siResourceLink")).thenReturn("https://aai-int1.test.com:8443/aai/v8/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/VIRTUAL%20USP/service-instances/service-instance/6d4eb22a-82f1-4257-9f80-4176262cfe69/")
+
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.prepareSDNCRequest(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "assignSDNCRequest", assignSDNCRequest_decodeUrlLink)
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareRpcSDNCRequest() {
+
+ println "************ prepareRpcSDNCRequest ************* "
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedvIPRNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "cloudRegionSdnc")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(Prefix + "serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("msoRequestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("testMessageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56") // test ONLY
+ when(mockExecution.getVariable(Prefix + "networkId")).thenReturn("networkId")
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:8090/SDNCAdapterCallback")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("GENGSI_siResourceLink")).thenReturn("https://aai-int1.test.com:8443/aai/v8/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/6d4eb22a-82f1-4257-9f80-4176262cfe69/")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.prepareRpcSDNCRequest(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "assignSDNCRequest", assignRpcSDNCRequest)
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareSDNCRollbackRequest() {
+
+ println "************ prepareSDNCRollbackRequest ************* "
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedvIPRNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "cloudRegionSdnc")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(Prefix + "serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable(Prefix + "assignSDNCResponse")).thenReturn(assignResponse)
+ when(mockExecution.getVariable(Prefix + "networkId")).thenReturn("8abc633a-810b-4ca5-8b3a-09511d13a2ce")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("testMessageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:8090/SDNCAdapterCallback")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("GENGSI_siResourceLink")).thenReturn("https://aai-int1.test.com:8443/aai/v8/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/6d4eb22a-82f1-4257-9f80-4176262cfe69/")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.prepareSDNCRollbackRequest(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "rollbackSDNCRequest", sdncRollbackRequest)
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareRpcSDNCActivateRequest() {
+
+ println "************ prepareRpcSDNCActivateRequest ************* "
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedvIPRNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "cloudRegionSdnc")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(Prefix + "serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable(Prefix + "networkId")).thenReturn("networkId")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("msoRequestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("testMessageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56") // test ONLY
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:8090/SDNCAdapterCallback")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("GENGSI_siResourceLink")).thenReturn("https://aai-int1.test.com:8443/aai/v8/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/6d4eb22a-82f1-4257-9f80-4176262cfe69/")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.prepareRpcSDNCActivateRequest(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "activateSDNCRequest", activateSDNCRequest)
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void prepareRpcSDNCRollbackRequest() {
+
+ println "************ prepareRpcSDNCRollbackRequest ************* "
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedvIPRNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "cloudRegionSdnc")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(Prefix + "serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable(Prefix + "assignSDNCResponse")).thenReturn(assignResponse)
+ when(mockExecution.getVariable(Prefix + "networkId")).thenReturn("8abc633a-810b-4ca5-8b3a-09511d13a2ce")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("testMessageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56") // test ONLY
+ when(mockExecution.getVariable("msoRequestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:8090/SDNCAdapterCallback")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("GENGSI_siResourceLink")).thenReturn("https://aai-int1.test.com:8443/aai/v8/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/6d4eb22a-82f1-4257-9f80-4176262cfe69/")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.prepareRpcSDNCRollbackRequest(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "rollbackSDNCRequest", sdncRpcRollbackRequest)
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareRpcSDNCActivateRollback() {
+
+ println "************ prepareRpcSDNCActivateRollback ************* "
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedvIPRNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "cloudRegionSdnc")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(Prefix + "serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable(Prefix + "activateSDNCResponse")).thenReturn(assignResponse)
+ when(mockExecution.getVariable(Prefix + "networkId")).thenReturn("8abc633a-810b-4ca5-8b3a-09511d13a2ce")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("msoRequestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("testMessageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56") // test ONLY
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:8090/SDNCAdapterCallback")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("GENGSI_siResourceLink")).thenReturn("https://aai-int1.test.com:8443/aai/v8/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/6d4eb22a-82f1-4257-9f80-4176262cfe69/")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.prepareRpcSDNCActivateRollback(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ verify(mockExecution).setVariable("prefix", Prefix)
+ //verify(mockExecution).setVariable("mso-request-id", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ //verify(mockExecution).setVariable(Prefix + "requestId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ //verify(mockExecution).setVariable("mso-service-instance-id", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ verify(mockExecution).setVariable(Prefix + "rollbackActivateSDNCRequest", sdncActivateRollbackRequest)
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkName_200() {
+
+ println "************ callRESTQueryAAINetworkName ************* "
+
+ WireMock.reset();
+ MockGetNetworkByName("MNS-25180-L-01-dmz_direct_net_1", "CreateNetworkV2/createNetwork_queryName_AAIResponse_Success.xml");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "networkInputs")).thenReturn(networkInputs)
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ // old: when(mockExecution.getVariable("mso.workflow.DoCreateNetworkInstance.aai.network.l3-network.uri")).thenReturn("/aai/v8/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("mso.workflow.DoCreateNetworkInstance.aai.l3-network.uri")).thenReturn("/aai/v8/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.callRESTQueryAAINetworkName(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "queryNameAAIRequest", "http://localhost:8090/aai/v8/network/l3-networks/l3-network?network-name=MNS-25180-L-01-dmz_direct_net_1")
+
+ verify(mockExecution).setVariable(Prefix + "aaiNameReturnCode", "200")
+ verify(mockExecution).setVariable(Prefix + "orchestrationStatus", "PENDING-CREATE")
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkName_404() {
+
+ println "************ callRESTQueryAAINetworkName ************* "
+
+ WireMock.reset();
+ MockGetNetworkByName_404("CreateNetworkV2/createNetwork_queryName_AAIResponse_Success.xml", "myOwn_Network");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "networkInputs")).thenReturn(networkInputs_404)
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ // old: when(mockExecution.getVariable("mso.workflow.DoCreateNetworkInstance.aai.network.l3-network.uri")).thenReturn("/aai/v8/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("mso.workflow.DoCreateNetworkInstance.aai.l3-network.uri")).thenReturn("/aai/v8/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.callRESTQueryAAINetworkName(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution, atLeast(1)).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "queryNameAAIRequest", "http://localhost:8090/aai/v8/network/l3-networks/l3-network?network-name=myOwn_Network")
+ verify(mockExecution).setVariable(Prefix + "aaiNameReturnCode", "404")
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkId_200() {
+
+ println "************ callRESTQueryAAINetworkId ************* "
+
+ WireMock.reset();
+ MockGetNetworkByIdWithDepth("49c86598-f766-46f8-84f8-8d1c1b10f9b4", "CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_Success.xml", "all");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "assignSDNCResponse")).thenReturn(sdncAdapterWorkflowAssignResponse)
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ // old: when(mockExecution.getVariable("mso.workflow.DoCreateNetworkInstance.aai.network.l3-network.uri")).thenReturn("/aai/v8/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("mso.workflow.DoCreateNetworkInstance.aai.l3-network.uri")).thenReturn("/aai/v9/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("sdncVersion")).thenReturn("1702")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.callRESTQueryAAINetworkId(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "queryIdAAIRequest", "http://localhost:8090/aai/v9/network/l3-networks/l3-network/49c86598-f766-46f8-84f8-8d1c1b10f9b4"+"?depth=all")
+ verify(mockExecution).setVariable(Prefix + "aaiIdReturnCode", "200")
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAICloudRegion30_200() {
+
+ println "************ callRESTQueryAAICloudRegion30_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkCloudRegion("CreateNetworkV2/cloudRegion25_AAIResponse_Success.xml", "RDM2WAGPLCP");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix)
+ when(mockExecution.getVariable(Prefix + "networkInputs")).thenReturn(expectedvIPRNetworkRequest)
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ // old: when(mockExecution.getVariable("mso.workflow.default.aai.cloud-infrastructure.cloud-region.uri")).thenReturn("/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.cloud-region.uri")).thenReturn("/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic")
+ //
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.callRESTQueryAAICloudRegion(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution, atLeast(1)).setVariable("prefix", Prefix)
+ verify(mockExecution, atLeast(2)).setVariable(Prefix + "queryCloudRegionReturnCode", "200")
+ verify(mockExecution).setVariable(Prefix + "isCloudRegionGood", true)
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAICloudRegion25_200() {
+
+ println "************ callRESTQueryAAICloudRegion25_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkCloudRegion("CreateNetworkV2/cloudRegion25_AAIResponse_Success.xml", "RDM2WAGPLCP");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix)
+ when(mockExecution.getVariable(Prefix + "networkInputs")).thenReturn(expectedvIPRNetworkRequest)
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ // old: when(mockExecution.getVariable("mso.workflow.default.aai.cloud-infrastructure.cloud-region.uri")).thenReturn("/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.cloud-region.uri")).thenReturn("/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic")
+ //
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.callRESTQueryAAICloudRegion(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution, atLeast(1)).setVariable("prefix", Prefix)
+ verify(mockExecution, atLeast(2)).setVariable(Prefix + "queryCloudRegionReturnCode", "200")
+ verify(mockExecution).setVariable(Prefix + "isCloudRegionGood", true)
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAICloudRegion_NotFound() {
+
+ println "************ callRESTQueryAAICloudRegionFake ************* "
+
+ WireMock.reset();
+ MockGetNetworkCloudRegion_404("MDTWNJ21")
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix)
+ when(mockExecution.getVariable(Prefix + "networkInputs")).thenReturn(vnfRequestFakeRegion)
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ //old: when(mockExecution.getVariable("mso.workflow.default.aai.cloud-infrastructure.cloud-region.uri")).thenReturn("/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.cloud-region.uri")).thenReturn("/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic")
+ //
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.callRESTQueryAAICloudRegion(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution, atLeast(1)).setVariable("prefix", Prefix)
+ verify(mockExecution, atLeast(1)).setVariable(Prefix + "queryCloudRegionReturnCode", "404")
+ verify(mockExecution).setVariable(Prefix + "cloudRegionPo", "MDTWNJ21")
+ verify(mockExecution).setVariable(Prefix + "cloudRegionSdnc", "AAIAIC25")
+ verify(mockExecution).setVariable(Prefix + "isCloudRegionGood", true)
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkVpnBinding_200() {
+
+ println "************ callRESTQueryAAINetworkVpnBinding_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkVpnBinding("CreateNetworkV2/createNetwork_queryVpnBinding_AAIResponse_Success.xml", "85f015d0-2e32-4c30-96d2-87a1a27f8017");
+ MockGetNetworkVpnBinding("CreateNetworkV2/createNetwork_queryVpnBinding_AAIResponse_Success.xml", "c980a6ef-3b88-49f0-9751-dbad8608d0a6");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "queryIdAAIResponse")).thenReturn(queryIdAIIResponse) // v6
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ // old: when(mockExecution.getVariable("mso.workflow.default.aai.network.vpn-binding.uri")).thenReturn("")
+ // old: when(mockExecution.getVariable("mso.workflow.DoCreateNetworkInstance.aai.network.vpn-binding.uri")).thenReturn("")
+ when(mockExecution.getVariable("mso.workflow.DoCreateNetworkInstance.aai.vpn-binding.uri")).thenReturn("/aai/v8/network/vpn-bindings/vpn-binding")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.callRESTQueryAAINetworkVpnBinding(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "vpnCount", 2)
+ verify(mockExecution).setVariable(Prefix + "vpnBindings", ['/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/', '/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/'])
+ // the last vpnBinding value is saved.
+ verify(mockExecution).setVariable(Prefix + "queryVpnBindingAAIRequest", "http://localhost:8090/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017?depth=all")
+ verify(mockExecution, atLeast(2)).setVariable(Prefix + "aaiQqueryVpnBindingReturnCode", "200")
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkVpnBindingList_200() {
+
+ println "************ callRESTQueryAAINetworkVpnBinding_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkVpnBinding("CreateNetworkV2/createNetwork_queryVpnBindingList_AAIResponse_Success.xml", "85f015d0-2e32-4c30-96d2-87a1a27f8017");
+ MockGetNetworkVpnBinding("CreateNetworkV2/createNetwork_queryVpnBindingList_AAIResponse_Success.xml", "c980a6ef-3b88-49f0-9751-dbad8608d0a6");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "queryIdAAIResponse")).thenReturn(queryIdAIIResponse) // v6
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ when(mockExecution.getVariable("mso.workflow.DoCreateNetworkInstance.aai.vpn-binding.uri")).thenReturn("/aai/v8/network/vpn-bindings/vpn-binding")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.callRESTQueryAAINetworkVpnBinding(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "vpnCount", 2)
+ verify(mockExecution).setVariable(Prefix + "vpnBindings", ['/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/', '/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/'])
+ // the last vpnBinding value is saved.
+ verify(mockExecution).setVariable(Prefix + "queryVpnBindingAAIRequest", "http://localhost:8090/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017?depth=all")
+ verify(mockExecution, atLeast(2)).setVariable(Prefix + "aaiQqueryVpnBindingReturnCode", "200")
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkVpnBinding_TestScenario01_200() {
+
+ println "************ callRESTQueryAAINetworkVpnBinding_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkVpnBinding("CreateNetworkV2/createNetwork_queryVpnBinding_AAIResponse_Success.xml", "85f015d0-2e32-4c30-96d2-87a1a27f8017");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "queryIdAAIResponse")).thenReturn(queryIdAIIResponseTestScenario01)
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ // old: when(mockExecution.getVariable("mso.workflow.default.aai.network.vpn-binding.uri")).thenReturn("")
+ // old: when(mockExecution.getVariable("mso.workflow.DoCreateNetworkInstance.aai.network.vpn-binding.uri")).thenReturn("")
+ when(mockExecution.getVariable("mso.workflow.DoCreateNetworkInstance.aai.vpn-binding.uri")).thenReturn("/aai/v8/network/vpn-bindings/vpn-binding")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.callRESTQueryAAINetworkVpnBinding(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "vpnCount", 1)
+ verify(mockExecution).setVariable(Prefix + "vpnBindings", ['/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/'])
+ // the last vpnBinding value is saved.
+ verify(mockExecution).setVariable(Prefix + "queryVpnBindingAAIRequest", "http://localhost:8090/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017?depth=all")
+ verify(mockExecution).setVariable(Prefix + "aaiQqueryVpnBindingReturnCode", "200")
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkVpnBinding_200_URN_Uri() {
+
+ println "************ callRESTQueryAAINetworkVpnBinding_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkVpnBinding("CreateNetworkV2/createNetwork_queryVpnBinding_AAIResponse_Success.xml", "85f015d0-2e32-4c30-96d2-87a1a27f8017");
+ MockGetNetworkVpnBinding("CreateNetworkV2/createNetwork_queryVpnBinding_AAIResponse_Success.xml", "c980a6ef-3b88-49f0-9751-dbad8608d0a6");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "queryIdAAIResponse")).thenReturn(queryIdAIIResponse)
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ //when(mockExecution.getVariable("mso.workflow.DoCreateNetworkInstance.aai.network.vpn-binding.uri")).thenReturn("/aai/v8/network/vpn-bindings/vpn-binding")
+ //when(mockExecution.getVariable("mso.workflow.default.aai.network.vpn-binding.uri")).thenReturn("/aai/v8/network/vpn-bindings/vpn-binding")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.vpn-binding.uri")).thenReturn("/aai/v8/network/vpn-bindings/vpn-binding")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.callRESTQueryAAINetworkVpnBinding(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "vpnCount", 2)
+ verify(mockExecution).setVariable(Prefix + "vpnBindings", ['/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/', '/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/'])
+ // the last vpnBinding value is saved.
+ verify(mockExecution).setVariable(Prefix + "queryVpnBindingAAIRequest", "http://localhost:8090/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017?depth=all")
+ verify(mockExecution, atLeast(2)).setVariable(Prefix + "aaiQqueryVpnBindingReturnCode", "200")
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkVpnBinding_NotPresent() {
+
+ println "************ callRESTQueryAAINetworkVpnBinding_NotPresent ************* "
+
+ WireMock.reset();
+ MockGetNetworkVpnBinding("CreateNetworkV2/createNetwork_queryVpnBinding_AAIResponse_Success.xml", "85f015d0-2e32-4c30-96d2-87a1a27f8017");
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+
+ when(mockExecution.getVariable(Prefix + "queryIdAAIResponse")).thenReturn(queryIdAIIResponseVpnNotPresent)
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ //when(mockExecution.getVariable("mso.workflow.default.aai.network.l3-network.uri")).thenReturn("/aai/v8/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.l3-network.uri")).thenReturn("/aai/v8/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.callRESTQueryAAINetworkVpnBinding(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "aaiQqueryVpnBindingReturnCode", "200")
+ verify(mockExecution).setVariable(Prefix + "vpnCount", 0)
+ verify(mockExecution).setVariable(Prefix + "queryVpnBindingAAIResponse", aaiVpnResponseStub)
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkPolicy_200() {
+
+ println "************ callRESTQueryAAINetworkPolicy_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkPolicy("CreateNetworkV2/createNetwork_queryNetworkPolicy_AAIResponse_Success.xml", "cee6d136-e378-4678-a024-2cd15f0ee0cg");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "queryIdAAIResponse")).thenReturn(queryIdAIIResponse)
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ //when(mockExecution.getVariable("mso.workflow.DoCreateNetworkInstance.aai.network-policy.uri")).thenReturn("")
+ // old: when(mockExecution.getVariable("mso.workflow.default.aai.network-policy.uri")).thenReturn("/aai/v8/network/network-policies/network-policy")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.network-policy.uri")).thenReturn("/aai/v8/network/network-policies/network-policy")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.callRESTQueryAAINetworkPolicy(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "networkPolicyCount", 1)
+ verify(mockExecution).setVariable(Prefix + "networkPolicyUriList", ['/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg'])
+ // the last vpnBinding value is saved.
+ verify(mockExecution).setVariable(Prefix + "queryNetworkPolicyAAIRequest", "http://localhost:8090/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg?depth=all")
+ verify(mockExecution).setVariable(Prefix + "aaiQqueryNetworkPolicyReturnCode", "200")
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkTableRef_200() {
+
+ println "************ callRESTQueryAAINetworkTableRef_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkTableReference("CreateNetworkV2/createNetwork_queryNetworkTableRef1_AAIResponse_Success.xml", "refFQDN1");
+ MockGetNetworkTableReference("CreateNetworkV2/createNetwork_queryNetworkTableRef2_AAIResponse_Success.xml", "refFQDN2");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "queryIdAAIResponse")).thenReturn(queryIdAIIResponse)
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ when(mockExecution.getVariable("mso.workflow.default.aai.network-table-reference.uri")).thenReturn("")
+ // old: when(mockExecution.getVariable("mso.workflow.DoCreateNetworkInstance.aai.network-table-reference.uri")).thenReturn("")
+ when(mockExecution.getVariable("mso.workflow.DoCreateNetworkInstance.aai.route-table-reference.uri")).thenReturn("/aai/v8/network/route-table-references/route-table-reference")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.callRESTQueryAAINetworkTableRef(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "networkTableRefCount", 2)
+ verify(mockExecution).setVariable(Prefix + "networkTableRefUriList", ['/aai/v8/network/route-table-references/route-table-reference/refFQDN1','/aai/v8/network/route-table-references/route-table-reference/refFQDN2'])
+ // the last vpnBinding value is saved.
+ verify(mockExecution).setVariable(Prefix + "queryNetworkTableRefAAIRequest", "http://localhost:8090/aai/v8/network/route-table-references/route-table-reference/refFQDN1?depth=all")
+ verify(mockExecution, atLeast(2)).setVariable(Prefix + "aaiQqueryNetworkTableRefReturnCode", "200")
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTReQueryAAINetworkId_200() {
+
+ println "************ callRESTReQueryAAINetworkId ************* "
+
+ WireMock.reset();
+ MockGetNetworkByIdWithDepth("49c86598-f766-46f8-84f8-8d1c1b10f9b4", "CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_Success.xml", "all");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "networkId")).thenReturn("49c86598-f766-46f8-84f8-8d1c1b10f9b4")
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ //when(mockExecution.getVariable("mso.workflow.default.aai.l3-network.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.DoCreateNetworkInstance.aai.l3-network.uri")).thenReturn("/aai/v9/network/l3-networks/l3-network")
+ //old: when(mockExecution.getVariable("mso.workflow.DoCreateNetworkInstance.aai.network.l3-network.uri")).thenReturn("/aai/v8/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("sdncVersion")).thenReturn("1702")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.callRESTReQueryAAINetworkId(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "requeryIdAAIRequest", "http://localhost:8090/aai/v9/network/l3-networks/l3-network/49c86598-f766-46f8-84f8-8d1c1b10f9b4"+"?depth=all")
+ verify(mockExecution).setVariable(Prefix + "aaiRequeryIdReturnCode", "200")
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTUpdateContrailAAINetworkREST_200() {
+
+ println "************ callRESTUpdateContrailAAINetwork ************* "
+
+ WireMock.reset();
+ MockPutNetworkIdWithDepth("CreateNetworkV2/createNetwork_updateContrail_AAIResponse_Success.xml", "49c86598-f766-46f8-84f8-8d1c1b10f9b4", "all");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "networkId")).thenReturn("49c86598-f766-46f8-84f8-8d1c1b10f9b4")
+ when(mockExecution.getVariable(Prefix + "requeryIdAAIResponse")).thenReturn(queryIdAIIResponse)
+ when(mockExecution.getVariable(Prefix + "createNetworkResponse")).thenReturn(createNetworkResponseREST)
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ // old: when(mockExecution.getVariable("mso.workflow.DoCreateNetworkInstance.aai.network.l3-network.uri")).thenReturn("/aai/v8/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("mso.workflow.DoCreateNetworkInstance.aai.l3-network.uri")).thenReturn("/aai/v9/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "rollbackEnabled")).thenReturn("false")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.callRESTUpdateContrailAAINetwork(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "updateContrailAAIUrlRequest", "http://localhost:8090/aai/v9/network/l3-networks/l3-network/49c86598-f766-46f8-84f8-8d1c1b10f9b4"+"?depth=all")
+ verify(mockExecution).setVariable(Prefix + "updateContrailAAIPayloadRequest", updateContrailAAIPayloadRequest)
+ verify(mockExecution).setVariable(Prefix + "aaiUpdateContrailReturnCode", "200")
+ //verify(mockExecution).setVariable(Prefix + "updateContrailAAIResponse", updateContrailAAIResponse)
+ verify(mockExecution).setVariable(Prefix + "isPONR", true)
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTUpdateContrailAAINetworkREST_200_segmentation() {
+
+ println "************ callRESTUpdateContrailAAINetwork ************* "
+
+ WireMock.reset();
+ MockPutNetworkIdWithDepth("CreateNetworkV2/createNetwork_updateContrail_AAIResponse_Success.xml", "49c86598-f766-46f8-84f8-8d1c1b10f9b4", "all");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "networkId")).thenReturn("49c86598-f766-46f8-84f8-8d1c1b10f9b4")
+ when(mockExecution.getVariable(Prefix + "requeryIdAAIResponse")).thenReturn(queryIdAIIResponse_segmentation)
+ when(mockExecution.getVariable(Prefix + "createNetworkResponse")).thenReturn(createNetworkResponseREST)
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ // old: when(mockExecution.getVariable("mso.workflow.DoCreateNetworkInstance.aai.network.l3-network.uri")).thenReturn("/aai/v8/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("mso.workflow.DoCreateNetworkInstance.aai.l3-network.uri")).thenReturn("/aai/v9/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "rollbackEnabled")).thenReturn("false")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.callRESTUpdateContrailAAINetwork(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "updateContrailAAIUrlRequest", "http://localhost:8090/aai/v9/network/l3-networks/l3-network/49c86598-f766-46f8-84f8-8d1c1b10f9b4"+"?depth=all")
+ verify(mockExecution).setVariable(Prefix + "updateContrailAAIPayloadRequest", updateContrailAAIPayloadRequest_segmentation)
+ verify(mockExecution).setVariable(Prefix + "aaiUpdateContrailReturnCode", "200")
+ //verify(mockExecution).setVariable(Prefix + "updateContrailAAIResponse", updateContrailAAIResponse)
+ verify(mockExecution).setVariable(Prefix + "isPONR", true)
+
+ }
+
+
+
+ @Test
+ //@Ignore
+ public void validateCreateNetworkResponseREST() {
+
+ println "************ validateNetworkResponse ************* "
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "createNetworkResponse")).thenReturn(createNetworkResponseREST)
+ when(mockExecution.getVariable(Prefix + "networkReturnCode")).thenReturn('200')
+
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.validateCreateNetworkResponse(mockExecution)
+
+ //MockitoDebuggerImpl debugger = new MockitoDebuggerImpl()
+ //debugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "createNetworkResponse", createNetworkResponseREST)
+ verify(mockExecution).setVariable(Prefix + "isNetworkRollbackNeeded", true)
+ verify(mockExecution).setVariable(Prefix + "rollbackNetworkRequest", createRollbackNetworkRequest)
+
+ }
+
+ @Test
+ //@Ignore
+ public void validateCreateNetworkResponseREST_Error() {
+
+ println "************ validateNetworkResponse ************* "
+
+ WorkflowException workflowException = new WorkflowException("DoCreateNetworkInstance", 2500, "Received error from Network Adapter: JBWEB000065: HTTP Status 500.")
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "createNetworkResponse")).thenReturn(networkException500)
+ when(mockExecution.getVariable(Prefix + "networkReturnCode")).thenReturn('500')
+
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ try {
+ DoCreateNetworkInstance.validateCreateNetworkResponse(mockExecution)
+ } catch (Exception ex) {
+ println " Test End - Handle catch-throw BpmnError()! "
+ }
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution, atLeast(1)).setVariable("WorkflowException", refEq(workflowException, any(WorkflowException.class)))
+
+ }
+
+ @Test
+ //@Ignore
+ public void validateSDNCResponse() {
+
+ println "************ validateSDNCResponse ************* "
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "assignSDNCResponse")).thenReturn(sdncAdapterWorkflowResponse)
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix + "")
+ when(mockExecution.getVariable("SDNCA_SuccessIndicator")).thenReturn(true)
+ when(mockExecution.getVariable(Prefix + "sdncReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable(Prefix + "isResponseGood")).thenReturn(true)
+
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ try {
+ DoCreateNetworkInstance.validateSDNCResponse(mockExecution)
+ verify(mockExecution).setVariable(Prefix + "isSdncRollbackNeeded", true)
+
+ } catch (Exception ex) {
+ println " Graceful Exit - " + ex.getMessage()
+ }
+ //MockitoDebuggerImpl debugger = new MockitoDebuggerImpl()
+ //debugger.printInvocations(mockExecution)
+
+ //verify(mockExecution).setVariable(Prefix + "isSdncRollbackNeeded", true)
+
+ }
+
+ @Test
+ //@Ignore
+ public void validateSDNCResponse_Error() {
+
+ println "************ validateSDNCResponse ************* "
+
+ WorkflowException workflowException = new WorkflowException("DoCreateNetworkInstance", 2500, "Received error from SNDC Adapter: HTTP Status 500.")
+
+ //ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "assignSDNCResponse")).thenReturn(sdncAdapterWorkflowResponse_Error)
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix + "")
+ when(mockExecution.getVariable("SDNCA_SuccessIndicator")).thenReturn(false)
+ when(mockExecution.getVariable(Prefix + "sdncReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(workflowException)
+
+
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ try {
+ DoCreateNetworkInstance.validateSDNCResponse(mockExecution)
+ } catch (Exception ex) {
+ println " Graceful Exit! - " + ex.getMessage()
+ }
+ //MockitoDebuggerImpl debugger = new MockitoDebuggerImpl()
+ //debugger.printInvocations(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ //verify(mockExecution).setVariable(Prefix + "sdncResponseSuccess", false)
+
+ }
+
+ @Test
+ //@Ignore
+ public void validateRpcSDNCActivateResponse() {
+
+ println "************ validateRpcSDNCActivateResponse ************* "
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "activateSDNCResponse")).thenReturn(sdncAdapterWorkflowResponse)
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix + "")
+ when(mockExecution.getVariable("SDNCA_SuccessIndicator")).thenReturn(true)
+ when(mockExecution.getVariable(Prefix + "sdncActivateReturnCode")).thenReturn("200")
+
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ try {
+ DoCreateNetworkInstance.validateRpcSDNCActivateResponse(mockExecution)
+ verify(mockExecution).setVariable(Prefix + "isSdncActivateRollbackNeeded", true)
+
+ } catch (Exception ex) {
+ println " Graceful Exit - " + ex.getMessage()
+ }
+ //MockitoDebuggerImpl debugger = new MockitoDebuggerImpl()
+ //debugger.printInvocations(mockExecution)
+
+ //verify(mockExecution).setVariable(Prefix + "isSdncRollbackNeeded", true)
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareRollbackData() {
+
+ println "************ prepareRollbackData() ************* "
+
+
+
+ WorkflowException workflowException = new WorkflowException("DoCreateNetworkInstance", 2500, "Received error from Network Adapter: JBWEB000065: HTTP Status 500.")
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCRequest")).thenReturn(rollbackSDNCRequest)
+ when(mockExecution.getVariable(Prefix + "rollbackActivateSDNCRequest")).thenReturn(rollbackActivateSDNCRequest)
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkRequest")).thenReturn(rollbackNetworkRequest)
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(workflowException)
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.prepareRollbackData(mockExecution)
+
+// verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ }
+
+ @Test
+ public void postProcessResponse() {
+
+ println "************ postProcessResponse() ************* "
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("testProcessKey")).thenReturn("DoCreateNetworkInstanceTest")
+ when(mockExecution.getVariable(Prefix + "isException")).thenReturn(false)
+ when(mockExecution.getVariable("sdncVersion")).thenReturn("1702")
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCRequest")).thenReturn(sdncRpcRollbackRequest)
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkRequest")).thenReturn(rollbackSDNCRequest)
+ when(mockExecution.getVariable(Prefix + "rollbackActivateSDNCRequest")).thenReturn(sdncActivateRollbackRequest)
+
+
+ // preProcessRequest(DelegateExecution execution)
+ DoCreateNetworkInstance DoCreateNetworkInstance = new DoCreateNetworkInstance()
+ DoCreateNetworkInstance.postProcessResponse(mockExecution)
+
+// verify(mockExecution,atLeastOnce()).getVariable("isDebugLogEnabled")
+ verify(mockExecution,atLeastOnce()).setVariable("prefix", Prefix)
+ verify(mockExecution,atLeastOnce()).setVariable(Prefix + "Success", true)
+
+ }
+
+ private ExecutionEntity setupMock() {
+
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("DoCreateNetworkInstance")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("DoCreateNetworkInstance")
+ when(mockRepositoryService.getProcessDefinition().getId()).thenReturn("100")
+ ProcessEngineServices mockProcessEngineServices = mock(ProcessEngineServices.class)
+ when(mockProcessEngineServices.getRepositoryService()).thenReturn(mockRepositoryService)
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+
+ when(mockExecution.getId()).thenReturn("100")
+ when(mockExecution.getProcessDefinitionId()).thenReturn("DoCreateNetworkInstance")
+ when(mockExecution.getProcessInstanceId()).thenReturn("DoCreateNetworkInstance")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+
+ return mockExecution
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstanceTest.groovy
new file mode 100644
index 0000000000..cc6f89865f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstanceTest.groovy
@@ -0,0 +1,135 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.scripts
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+import org.camunda.bpm.engine.ProcessEngineServices
+import org.camunda.bpm.engine.RepositoryService
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.camunda.bpm.engine.repository.ProcessDefinition
+import org.junit.Assert
+import org.junit.Before
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.ArgumentCaptor
+import org.mockito.Captor
+import org.mockito.Mockito
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.core.domain.ModelInfo
+import org.onap.so.bpmn.core.domain.ServiceDecomposition
+import org.onap.so.bpmn.core.domain.ServiceInstance
+import org.onap.so.bpmn.mock.StubResponseAAI
+
+import static org.mockito.Mockito.*
+
+@RunWith(MockitoJUnitRunner.class)
+class DoCreateServiceInstanceTest {
+ def prefix = "DCRESI_"
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(28090)
+
+ @Captor
+ static ArgumentCaptor<ExecutionEntity> captor = ArgumentCaptor.forClass(ExecutionEntity.class)
+
+ @Before
+ void init() throws IOException {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @Test
+ void testPreProcessRequest() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(prefix)
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("msoRequestId")).thenReturn("12345")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("MIS/1604/0026/SW_INTERNET")
+ when(mockExecution.getVariable("lcpCloudRegionId")).thenReturn("MDTWNJ21")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("testRequestId-1503410089303")
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:28080/mso/SDNCAdapterCallbackService")
+ when(mockExecution.getVariable("globalSubscriberId")).thenReturn("MSO_dev")
+ when(mockExecution.getVariable("subscriptionServiceType")).thenReturn("MSO-dev-service-type")
+ when(mockExecution.getVariable("productFamilyId")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable("sdnc.si.svc.types")).thenReturn("PORT-MIRROR,PPROBES")
+
+ ServiceDecomposition decomposition = new ServiceDecomposition()
+ ModelInfo modelInfo = new ModelInfo()
+ ServiceInstance instance = new ServiceInstance()
+ instance.instanceId = "12345"
+ decomposition.modelInfo = modelInfo
+ decomposition.serviceInstance = instance
+
+ when(mockExecution.getVariable("serviceDecomposition")).thenReturn(decomposition)
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
+ when(mockExecution.getVariable("mso.workflow.default.aai.customer.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.customer.uri")).thenReturn('/aai/v8/business/customers/customer')
+
+
+ DoCreateServiceInstance obj = new DoCreateServiceInstance()
+ obj.preProcessRequest(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", prefix)
+ verify(mockExecution).setVariable("sdncCallbackUrl", "http://localhost:28080/mso/SDNCAdapterCallbackService")
+ }
+
+
+
+ @Test
+ void testGetAAICustomerById() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(prefix)
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("globalSubscriberId")).thenReturn("12345")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.customer.uri")).thenReturn("/aai/v9/business/customers/customer")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
+ when(mockExecution.getVariable("mso.workflow.custom.DoCreateServiceInstance.aai.version")).thenReturn('8')
+ StubResponseAAI.MockGetCustomer("12345", "")
+ DoCreateServiceInstance obj = new DoCreateServiceInstance()
+ obj.getAAICustomerById(mockExecution)
+
+ verify(mockExecution, times(1)).getVariable("aai.endpoint")
+ }
+
+ private static ExecutionEntity setupMock() {
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("DoCreateServiceInstance")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("DoCreateServiceInstance")
+ when(mockRepositoryService.getProcessDefinition().getId()).thenReturn("100")
+ ProcessEngineServices mockProcessEngineServices = mock(ProcessEngineServices.class)
+ when(mockProcessEngineServices.getRepositoryService()).thenReturn(mockRepositoryService)
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getId()).thenReturn("100")
+ when(mockExecution.getProcessDefinitionId()).thenReturn("DoCreateServiceInstance")
+ when(mockExecution.getProcessInstanceId()).thenReturn("DoCreateServiceInstance")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+
+ return mockExecution
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstanceTest.groovy
new file mode 100644
index 0000000000..6d9d5e5356
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstanceTest.groovy
@@ -0,0 +1,106 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.scripts
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+import org.camunda.bpm.engine.ProcessEngineServices
+import org.camunda.bpm.engine.RepositoryService
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.camunda.bpm.engine.repository.ProcessDefinition
+import org.junit.Before
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.ArgumentCaptor
+import org.mockito.Captor
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse
+import static com.github.tomakehurst.wiremock.client.WireMock.put
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor
+import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching
+import static org.mockito.Mockito.mock
+import static org.mockito.Mockito.times
+import static org.mockito.Mockito.verify
+import static org.mockito.Mockito.when
+
+/**
+ * @author sushilma
+ * @since January 10, 2018
+ */
+@RunWith(MockitoJUnitRunner.class)
+class DoCreateVFCNetworkServiceInstanceTest {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(28090)
+ @Before
+ public void init() throws IOException {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @Captor
+ static ArgumentCaptor<ExecutionEntity> captor = ArgumentCaptor.forClass(ExecutionEntity.class)
+
+ @Test
+ public void testAddNSRelationship(){
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("nsInstanceId")).thenReturn("NS12345")
+ when(mockExecution.getVariable("globalSubscriberId")).thenReturn("MSO_dev")
+ when(mockExecution.getVariable("serviceType")).thenReturn("MSO-dev-service-type")
+ when(mockExecution.getVariable("serviceId")).thenReturn("SER12345")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+ MockPutServiceInstance("MSO_dev", "MSO-dev-service-type", "SER12345");
+ DoCreateVFCNetworkServiceInstance DoCreateVFCNetworkServiceInstance = new DoCreateVFCNetworkServiceInstance()
+ DoCreateVFCNetworkServiceInstance.addNSRelationship(mockExecution);
+ verify(mockExecution, times(1)).getVariable("aai.endpoint")
+ verify(mockExecution, times(1)).getVariable("mso.msoKey")
+ verify(mockExecution, times(1)).getVariable("aai.auth")
+ }
+
+ private ExecutionEntity setupMock() {
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("DoCreateVFCNetworkServiceInstance")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("DoCreateVFCNetworkServiceInstance")
+ when(mockRepositoryService.getProcessDefinition().getId()).thenReturn("100")
+ ProcessEngineServices mockProcessEngineServices = mock(ProcessEngineServices.class)
+ when(mockProcessEngineServices.getRepositoryService()).thenReturn(mockRepositoryService)
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ when(mockExecution.getId()).thenReturn("100")
+ when(mockExecution.getProcessDefinitionId()).thenReturn("DoCreateVFCNetworkServiceInstance")
+ when(mockExecution.getProcessInstanceId()).thenReturn("DoCreateVFCNetworkServiceInstance")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+ return mockExecution
+ }
+
+ public static void MockPutServiceInstance(String globalCustId, String subscriptionType, String serviceInstanceId) {
+ stubFor(put(urlMatching("/aai/v[0-9]+/business/customers/customer/" + globalCustId + "/service-subscriptions/service-subscription/" + subscriptionType + "/service-instances/service-instance/" + serviceInstanceId+"/relationship-list/relationship"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml").withBody("")
+ ));
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollbackTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollbackTest.groovy
new file mode 100644
index 0000000000..c5c6187648
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollbackTest.groovy
@@ -0,0 +1,202 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.scripts
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+import org.camunda.bpm.engine.ProcessEngineServices
+import org.camunda.bpm.engine.RepositoryService
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.camunda.bpm.engine.repository.ProcessDefinition
+import org.junit.Assert
+import org.junit.Before
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.ArgumentCaptor
+import org.mockito.Captor
+import org.mockito.Mockito
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+import org.onap.so.bpmn.common.scripts.utils.XmlComparator
+import org.onap.so.bpmn.core.RollbackData
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.mock.FileUtil
+
+import static com.github.tomakehurst.wiremock.client.WireMock.*
+import static org.mockito.Mockito.*
+
+@RunWith(MockitoJUnitRunner.class)
+class DoCreateVfModuleRollbackTest {
+
+ def prefix = "DCVFMR_"
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(28090)
+
+ @Captor
+ static ArgumentCaptor<ExecutionEntity> captor = ArgumentCaptor.forClass(ExecutionEntity.class)
+
+ @Before
+ void init() throws IOException {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @Test
+ void testPrepSDNCAdapterRequest() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(prefix)
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(prefix + "serviceInstanceId")).thenReturn("12345")
+ when(mockExecution.getVariable("testReqId")).thenReturn("testReqId")
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:28080/mso/SDNCAdapterCallbackService")
+ when(mockExecution.getVariable(prefix + "source")).thenReturn("VID")
+ when(mockExecution.getVariable(prefix + "tenantId")).thenReturn("fba1bd1e195a404cacb9ce17a9b2b421")
+ when(mockExecution.getVariable(prefix + "vnfType")).thenReturn("vRRaas")
+ when(mockExecution.getVariable(prefix + "vnfName")).thenReturn("skask-test")
+ when(mockExecution.getVariable(prefix + "vnfId")).thenReturn("skask")
+ when(mockExecution.getVariable(prefix + "vfModuleModelName")).thenReturn("PCRF::module-0-2")
+ when(mockExecution.getVariable(prefix + "requestId")).thenReturn("testRequestId")
+ when(mockExecution.getVariable(prefix + "vfModuleId")).thenReturn("cb510af0-5b21-4bc7-86d9-323cb396ce32")
+ when(mockExecution.getVariable(prefix + "vfModuleName")).thenReturn("PCRF::module-0-2")
+ when(mockExecution.getVariable(prefix + "serviceId")).thenReturn("12345")
+ when(mockExecution.getVariable(prefix + "cloudSiteId")).thenReturn("RDM2WAGPLCP")
+
+ when(mockExecution.getVariable(prefix + "rollbackSDNCRequestActivate")).thenReturn("true")
+
+
+ DoCreateVfModuleRollback obj = new DoCreateVfModuleRollback()
+ obj.prepSDNCAdapterRequest(mockExecution)
+
+ Mockito.verify(mockExecution, times(1)).setVariable(captor.capture(), captor.capture())
+ String expectedValue = FileUtil.readResourceFile("__files/DoCreateVfModuleRollback/sdncAdapterWorkflowRequest.xml")
+ XmlComparator.assertXMLEquals(expectedValue, captor.getValue())
+ }
+
+
+
+ @Test
+ void testBuildSDNCRequest() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(prefix)
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(prefix + "serviceInstanceId")).thenReturn("12345")
+ when(mockExecution.getVariable("testReqId")).thenReturn("testReqId")
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:28080/mso/SDNCAdapterCallbackService")
+ when(mockExecution.getVariable(prefix + "source")).thenReturn("VID")
+ when(mockExecution.getVariable(prefix + "vnfType")).thenReturn("vRRaas")
+ when(mockExecution.getVariable(prefix + "vnfName")).thenReturn("skask-test")
+ when(mockExecution.getVariable(prefix + "vnfId")).thenReturn("skask")
+ when(mockExecution.getVariable(prefix + "requestId")).thenReturn("testRequestId")
+ when(mockExecution.getVariable(prefix + "vfModuleId")).thenReturn("cb510af0-5b21-4bc7-86d9-323cb396ce32")
+ when(mockExecution.getVariable(prefix + "vfModuleName")).thenReturn("PCRF::module-0-2")
+ when(mockExecution.getVariable(prefix + "serviceId")).thenReturn("12345")
+
+ when(mockExecution.getVariable(prefix + "rollbackSDNCRequestActivate")).thenReturn("true")
+
+
+ DoCreateVfModuleRollback obj = new DoCreateVfModuleRollback()
+ String sdncRequest = obj.buildSDNCRequest(mockExecution, "svcInstId_test", "deactivate")
+ String expectedValue = FileUtil.readResourceFile("__files/DoCreateVfModuleRollback/deactivateSDNCRequest.xml")
+ XmlComparator.assertXMLEquals(expectedValue, sdncRequest)
+ }
+
+
+
+ @Test
+ void testPrepVNFAdapterRequest() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(prefix)
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(prefix + "serviceInstanceId")).thenReturn("12345")
+ when(mockExecution.getVariable("testReqId")).thenReturn("testReqId")
+ when(mockExecution.getVariable("mso.use.qualified.host")).thenReturn("true")
+ when(mockExecution.getVariable(prefix + "vnfId")).thenReturn("skask")
+ when(mockExecution.getVariable(prefix + "requestId")).thenReturn("testRequestId")
+ when(mockExecution.getVariable(prefix + "vfModuleId")).thenReturn("cb510af0-5b21-4bc7-86d9-323cb396ce32")
+ when(mockExecution.getVariable(prefix + "mso-request-id")).thenReturn("12345")
+ when(mockExecution.getVariable("mso.workflow.message.endpoint")).thenReturn('http://localhost:18080/mso/WorkflowMessage/')
+
+
+ DoCreateVfModuleRollback obj = new DoCreateVfModuleRollback()
+ String sdncRequest = obj.prepVNFAdapterRequest(mockExecution)
+
+ Mockito.verify(mockExecution, times(1)).setVariable(captor.capture(), captor.capture())
+ String expectedValue = FileUtil.readResourceFile("__files/DoCreateVfModuleRollback/vnfAdapterRestV1Request.xml")
+ XmlComparator.assertXMLEquals(expectedValue, captor.getValue(), "messageId", "notificationUrl")
+ }
+
+ @Test
+ void testDeleteNetworkPoliciesFromAAI() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(prefix)
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("DCVFM_cloudSiteId")).thenReturn("12345")
+ when(mockExecution.getVariable("mso.workflow.DoCreateVfModuleRollback.aai.network-policy.uri")).thenReturn("/aai/v8/network/network-policies/network-policy")
+ when(mockExecution.getVariable("mso.workflow.custom.DoCreateVfModuleRollback.aai.version")).thenReturn("8")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
+ when(mockExecution.getVariable("rollbackData")).thenReturn(new RollbackData())
+ List fqdnList = new ArrayList()
+ fqdnList.add("test")
+ when(mockExecution.getVariable(prefix + "createdNetworkPolicyFqdnList")).thenReturn(fqdnList)
+ mockData()
+ DoCreateVfModuleRollback obj = new DoCreateVfModuleRollback()
+ obj.deleteNetworkPoliciesFromAAI(mockExecution)
+
+ Mockito.verify(mockExecution).setVariable("prefix", prefix)
+ Mockito.verify(mockExecution).setVariable(prefix + "networkPolicyFqdnCount", 1)
+ Mockito.verify(mockExecution).setVariable(prefix + "aaiQueryNetworkPolicyByFqdnReturnCode", 200)
+ }
+
+
+ private static ExecutionEntity setupMock() {
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("DoCreateVfModuleRollback")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("DoCreateVfModuleRollback")
+ when(mockRepositoryService.getProcessDefinition().getId()).thenReturn("100")
+ ProcessEngineServices mockProcessEngineServices = mock(ProcessEngineServices.class)
+ when(mockProcessEngineServices.getRepositoryService()).thenReturn(mockRepositoryService)
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getId()).thenReturn("100")
+ when(mockExecution.getProcessDefinitionId()).thenReturn("DoCreateVfModuleRollback")
+ when(mockExecution.getProcessInstanceId()).thenReturn("DoCreateVfModuleRollback")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+
+ return mockExecution
+ }
+
+ private static void mockData() {
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/network-policies/network-policy\\?network-policy-fqdn=.*"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("VfModularity/QueryNetworkPolicy_AAIResponse_Success.xml")))
+ stubFor(delete(urlMatching("/aai/v[0-9]+/network/network-policies/network-policy/.*"))
+ .willReturn(aResponse()
+ .withStatus(200)));
+
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleTest.groovy
new file mode 100644
index 0000000000..30e3779b53
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleTest.groovy
@@ -0,0 +1,229 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.scripts
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+import org.camunda.bpm.engine.ProcessEngineServices
+import org.camunda.bpm.engine.RepositoryService
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.camunda.bpm.engine.repository.ProcessDefinition
+import org.junit.Assert
+import org.junit.Before
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.ArgumentCaptor
+import org.mockito.Captor
+import org.mockito.Mockito
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+import org.onap.so.bpmn.common.scripts.utils.XmlComparator
+import org.onap.so.bpmn.core.RollbackData
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.mock.FileUtil
+
+import static com.github.tomakehurst.wiremock.client.WireMock.*
+import static org.mockito.Mockito.*
+
+@RunWith(MockitoJUnitRunner.class)
+class DoCreateVfModuleTest {
+ def prefix = "DCVFM_"
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(28090)
+
+ @Captor
+ static ArgumentCaptor<ExecutionEntity> captor = ArgumentCaptor.forClass(ExecutionEntity.class)
+
+ @Before
+ void init() throws IOException {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @Test
+ void testQueryAAIVfModule() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(prefix)
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("DCVFM_vnfId")).thenReturn("12345")
+ when(mockExecution.getVariable("mso.workflow.DoCreateVfModule.aai.generic-vnf.uri")).thenReturn("/aai/v9/network/generic-vnfs/generic-vnf")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
+
+ mockData()
+ DoCreateVfModule obj = new DoCreateVfModule()
+ obj.queryAAIVfModule(mockExecution)
+ Mockito.verify(mockExecution).setVariable("DCVFM_queryAAIVfModuleResponseCode", 200)
+ }
+
+
+ @Test
+ void testQueryAAIVfModuleForStatus() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(prefix)
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("DCVFM_vnfId")).thenReturn("12345")
+ when(mockExecution.getVariable("DCVFM_vfModuleName")).thenReturn("module-0")
+ when(mockExecution.getVariable("mso.workflow.DoCreateVfModule.aai.generic-vnf.uri")).thenReturn("/aai/v9/network/generic-vnfs/generic-vnf")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
+
+ mockData()
+ DoCreateVfModule obj = new DoCreateVfModule()
+ obj.queryAAIVfModuleForStatus(mockExecution)
+ Mockito.verify(mockExecution).setVariable("DCVFM_orchestrationStatus", '')
+ Mockito.verify(mockExecution).setVariable("DCVFM_queryAAIVfModuleForStatusResponseCode", 200)
+ }
+
+
+
+ @Test
+ void testPreProcessVNFAdapterRequest() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(prefix)
+ when(mockExecution.getVariable(prefix + "cloudSiteId")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(prefix + "vfModuleId")).thenReturn("cb510af0-5b21-4bc7-86d9-323cb396ce32")
+ when(mockExecution.getVariable("volumeGroupStackId")).thenReturn("12345")
+ when(mockExecution.getVariable(prefix + "vfModuleName")).thenReturn("PCRF::module-0-2")
+ when(mockExecution.getVariable("lcpCloudRegionId")).thenReturn("MDTWNJ21")
+ when(mockExecution.getVariable(prefix + "tenantId")).thenReturn("fba1bd1e195a404cacb9ce17a9b2b421")
+ when(mockExecution.getVariable(prefix + "vnfType")).thenReturn("vRRaas")
+ when(mockExecution.getVariable(prefix + "vnfName")).thenReturn("skask-test")
+ when(mockExecution.getVariable(prefix + "vnfId")).thenReturn("skask")
+ when(mockExecution.getVariable(prefix + "vfModuleModelName")).thenReturn("PCRF::module-0-2")
+ when(mockExecution.getVariable(prefix + "vfModuleIndex")).thenReturn("index")
+ when(mockExecution.getVariable(prefix + "requestId")).thenReturn("testRequestId")
+ when(mockExecution.getVariable(prefix + "serviceId")).thenReturn("12345")
+ when(mockExecution.getVariable(prefix + "serviceInstanceId")).thenReturn("MIS/1604/0026/SW_INTERNET")
+ when(mockExecution.getVariable(prefix + "backoutOnFailure")).thenReturn("12345")
+ when(mockExecution.getVariable(prefix + "volumeGroupId")).thenReturn("12345")
+ when(mockExecution.getVariable(prefix + "asdcServiceModelVersion")).thenReturn("1.0")
+ when(mockExecution.getVariable(prefix + "modelCustomizationUuid")).thenReturn("cb510af0-5b21-4bc7-86d9-323cb396ced3")
+ when(mockExecution.getVariable("baseVfModuleId")).thenReturn("12345")
+ when(mockExecution.getVariable(prefix + "baseVfModuleHeatStackId")).thenReturn("12345")
+ String sdncGetResponse = FileUtil.readResourceFile("__files/DoCreateVfModule/sdncGetResponse.xml");
+ when(mockExecution.getVariable(prefix + "getSDNCAdapterResponse")).thenReturn(sdncGetResponse)
+ Map<String, String> map = new HashMap<String, String>();
+ map.put("vrr_image_name", "MDT17");
+ map.put("availability_zone_0", "nova");
+ map.put("vrr_flavor_name", "ns.c16r32d128.v1");
+ when(mockExecution.getVariable("vnfParamsMap")).thenReturn(map)
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("testRequestId-1503410089303")
+ when(mockExecution.getVariable("mso.use.qualified.host")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.message.endpoint")).thenReturn("http://localhost:28080/mso/WorkflowMesssage")
+
+ mockData()
+ DoCreateVfModule obj = new DoCreateVfModule()
+ obj.preProcessVNFAdapterRequest(mockExecution)
+
+ String createVnfARequest = FileUtil.readResourceFile("__files/DoCreateVfModule/createVnfARequest.xml")
+ Mockito.verify(mockExecution, times(1)).setVariable(captor.capture(), captor.capture())
+ XmlComparator.assertXMLEquals(createVnfARequest, captor.getValue(), "messageId", "notificationUrl")
+ }
+
+ @Test
+ void testQueryCloudRegion() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(prefix)
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("DCVFM_cloudSiteId")).thenReturn("12345")
+ when(mockExecution.getVariable("mso.workflow.DoCreateVfModule.aai.cloud-region.uri")).thenReturn("/aai/v8/cloud-infrastructure/cloud-regions/cloud-region")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
+
+ mockData()
+ DoCreateVfModule obj = new DoCreateVfModule()
+ obj.queryCloudRegion(mockExecution)
+
+ Mockito.verify(mockExecution).setVariable("prefix", prefix)
+ Mockito.verify(mockExecution).setVariable(prefix + "queryCloudRegionRequest", "http://localhost:28090/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/12345")
+ Mockito.verify(mockExecution).setVariable(prefix + "queryCloudRegionReturnCode", "200")
+ }
+
+
+
+ @Test
+ void testCreateNetworkPoliciesInAAI() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(prefix)
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("DCVFM_cloudSiteId")).thenReturn("12345")
+ when(mockExecution.getVariable("mso.workflow.DoCreateVfModule.aai.network-policy.uri")).thenReturn("/aai/v8/network/network-policies/network-policy")
+ when(mockExecution.getVariable("mso.workflow.custom.DoCreateVfModule.aai.version")).thenReturn("8")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
+ when(mockExecution.getVariable("rollbackData")).thenReturn(new RollbackData())
+ List fqdnList = new ArrayList()
+ fqdnList.add("test")
+ when(mockExecution.getVariable("DCVFM_contrailNetworkPolicyFqdnList")).thenReturn(fqdnList)
+
+ mockData()
+ DoCreateVfModule obj = new DoCreateVfModule()
+ obj.createNetworkPoliciesInAAI(mockExecution)
+
+ Mockito.verify(mockExecution).setVariable("prefix", prefix)
+ Mockito.verify(mockExecution).setVariable(prefix + "networkPolicyFqdnCount", 1)
+ Mockito.verify(mockExecution).setVariable(prefix + "aaiQqueryNetworkPolicyByFqdnReturnCode", 200)
+ }
+
+
+
+ private static ExecutionEntity setupMock() {
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("DoCreateVfModule")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("DoCreateVfModule")
+ when(mockRepositoryService.getProcessDefinition().getId()).thenReturn("100")
+ ProcessEngineServices mockProcessEngineServices = mock(ProcessEngineServices.class)
+ when(mockProcessEngineServices.getRepositoryService()).thenReturn(mockRepositoryService)
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getId()).thenReturn("100")
+ when(mockExecution.getProcessDefinitionId()).thenReturn("DoCreateVfModule")
+ when(mockExecution.getProcessInstanceId()).thenReturn("DoCreateVfModule")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+
+ return mockExecution
+ }
+
+ private static void mockData() {
+ stubFor(get(urlMatching(".*/aai/v[0-9]+/network/generic-vnfs/generic-vnf/12345[?]depth=1"))
+ .willReturn(aResponse()
+ .withStatus(200).withHeader("Content-Type", "text/xml")
+ .withBodyFile("DoCreateVfModule/getGenericVnfResponse.xml")))
+ stubFor(get(urlMatching(".*/aai/v[0-9]+/network/generic-vnfs/generic-vnf/12345/vf-modules/vf-module[?]vf-module-name=module-0"))
+ .willReturn(aResponse()
+ .withStatus(200).withHeader("Content-Type", "text/xml")
+ .withBodyFile("DoCreateVfModule/getGenericVnfResponse.xml")))
+ stubFor(get(urlMatching(".*/aai/v[0-9]+/cloud-infrastructure/cloud-regions/cloud-region/12345"))
+ .willReturn(aResponse()
+ .withStatus(200).withHeader("Content-Type", "text/xml")
+ .withBodyFile("DoCreateVfModule/cloudRegion_AAIResponse_Success.xml")))
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/network-policies/network-policy\\?network-policy-fqdn=.*"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("VfModularity/QueryNetworkPolicy_AAIResponse_Success.xml")))
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2Test.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2Test.groovy
new file mode 100644
index 0000000000..91e7086bd3
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2Test.groovy
@@ -0,0 +1,135 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.scripts
+
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.ArgumentCaptor
+import org.mockito.Captor
+import org.mockito.Mockito
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+import org.onap.so.bpmn.common.scripts.MsoGroovyTest
+
+import static org.junit.Assert.assertEquals
+import static org.junit.Assert.assertNotNull
+import static org.mockito.Mockito.times
+import static org.mockito.Mockito.when
+
+
+@RunWith(MockitoJUnitRunner.class)
+class DoCreateVfModuleVolumeV2Test extends MsoGroovyTest {
+
+ @Captor
+ static ArgumentCaptor<ExecutionEntity> captor = ArgumentCaptor.forClass(ExecutionEntity.class)
+
+ def String volumeRollbackRequest = """
+<rollbackVolumeGroupRequest>
+ <volumeGroupRollback>
+ <volumeGroupId>171907d6-cdf0-4e08-953d-81ee104005a7</volumeGroupId>
+ <volumeGroupStackId>{{VOLUMEGROUPSTACKID}}</volumeGroupStackId>
+ <tenantId>c2141e3fcae940fcb4797ec9115e5a7a</tenantId>
+ <cloudSiteId>mtwnj1a</cloudSiteId>
+ <volumeGroupCreated>true</volumeGroupCreated>
+ <msoRequest>
+ <requestId>230fd6ac-2a39-4be4-9b1e-7b7e1cc039b5</requestId>
+ <serviceInstanceId>88c871d6-be09-4982-8490-96b1d243fb34</serviceInstanceId>
+ </msoRequest>
+ <messageId>9a5a91e8-3b79-463c-81c3-874a78f5b567</messageId>
+ </volumeGroupRollback>
+ <skipAAI>true</skipAAI>
+ <notificationUrl>http://localhost:8080/mso/WorkflowMessage/VNFAResponse/9a5a91e8-3b79-463c-81c3-874a78f5b567</notificationUrl>
+</rollbackVolumeGroupRequest>
+ """
+
+ def String volumeRollbackRequestWithStackId = """
+<rollbackVolumeGroupRequest>
+ <volumeGroupRollback>
+ <volumeGroupId>171907d6-cdf0-4e08-953d-81ee104005a7</volumeGroupId>
+ <volumeGroupStackId>mdt22avrr_volume01/0f1aaae8-efe3-45ce-83e1-bfad01db58d8</volumeGroupStackId>
+ <tenantId>c2141e3fcae940fcb4797ec9115e5a7a</tenantId>
+ <cloudSiteId>mtwnj1a</cloudSiteId>
+ <volumeGroupCreated>true</volumeGroupCreated>
+ <msoRequest>
+ <requestId>230fd6ac-2a39-4be4-9b1e-7b7e1cc039b5</requestId>
+ <serviceInstanceId>88c871d6-be09-4982-8490-96b1d243fb34</serviceInstanceId>
+ </msoRequest>
+ <messageId>9a5a91e8-3b79-463c-81c3-874a78f5b567</messageId>
+ </volumeGroupRollback>
+ <skipAAI>true</skipAAI>
+ <notificationUrl>http://localhost:8080/mso/WorkflowMessage/VNFAResponse/9a5a91e8-3b79-463c-81c3-874a78f5b567</notificationUrl>
+</rollbackVolumeGroupRequest>
+ """
+
+
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ @Test
+ public void testBuildRollbackVolumeGroupRequestXml() {
+ DoCreateVfModuleVolumeV2 process = new DoCreateVfModuleVolumeV2()
+ String xml = process.buildRollbackVolumeGroupRequestXml(
+ "171907d6-cdf0-4e08-953d-81ee104005a7", // volumeGroupId
+ "mtwnj1a", // cloudSiteId
+ "c2141e3fcae940fcb4797ec9115e5a7a", // tenantId
+ "230fd6ac-2a39-4be4-9b1e-7b7e1cc039b5", // requestId
+ "88c871d6-be09-4982-8490-96b1d243fb34", // serviceInstanceId
+ "9a5a91e8-3b79-463c-81c3-874a78f5b567", // messageId
+ "http://localhost:8080/mso/WorkflowMessage/VNFAResponse/9a5a91e8-3b79-463c-81c3-874a78f5b567") // notificationUrl
+
+ assertEquals(volumeRollbackRequest.replaceAll("\\s", ""), xml.replaceAll("\\s", ""))
+ }
+
+
+ @Test
+ public void testUpdateRollbackVolumeGroupRequestXml() {
+ DoCreateVfModuleVolumeV2 process = new DoCreateVfModuleVolumeV2()
+ String updatedXml = process.updateRollbackVolumeGroupRequestXml(volumeRollbackRequest, "mdt22avrr_volume01/0f1aaae8-efe3-45ce-83e1-bfad01db58d8")
+ assertEquals(volumeRollbackRequestWithStackId.replaceAll("\\s", ""), updatedXml.replaceAll("\\s", ""))
+ }
+
+ @Test
+ public void testPrepareVnfAdapterCreateRequest (){
+ ExecutionEntity mockExecution = setupMock('DoCreateVfModuleVolumeV2')
+
+ when(mockExecution.getVariable("prefix")).thenReturn('DCVFMODVOLV2_')
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn('')
+ when(mockExecution.getVariable("vnfId")).thenReturn('test-vnf-id')
+ when(mockExecution.getVariable("mso-request-id")).thenReturn('1234')
+ when(mockExecution.getVariable("volumeGroupId")).thenReturn('1234')
+ when(mockExecution.getVariable("mso.use.qualified.host")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.message.endpoint")).thenReturn("http://localhost:28080/mso/WorkflowMesssage")
+ Map vfModuleInputParams = new HashMap()
+ vfModuleInputParams.put("param1","value1")
+ when(mockExecution.getVariable("vfModuleInputParams")).thenReturn(vfModuleInputParams)
+ DoCreateVfModuleVolumeV2 process = new DoCreateVfModuleVolumeV2()
+ process.prepareVnfAdapterCreateRequest(mockExecution,"true");
+ Mockito.verify(mockExecution,times(2)).setVariable(captor.capture(), captor.capture())
+ String DCVFMODVOLV2_createVnfARequest = captor.getValue();
+ assertNotNull(DCVFMODVOLV2_createVnfARequest)
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfTest.groovy
new file mode 100644
index 0000000000..9b421d8b63
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfTest.groovy
@@ -0,0 +1,106 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.scripts
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+import org.camunda.bpm.engine.ProcessEngineServices
+import org.camunda.bpm.engine.RepositoryService
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.camunda.bpm.engine.repository.ProcessDefinition
+import org.junit.Assert
+import org.junit.Before
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.ArgumentCaptor
+import org.mockito.Captor
+import org.mockito.Mockito
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.core.domain.VnfResource
+
+import static org.mockito.Mockito.*
+
+@RunWith(MockitoJUnitRunner.class)
+class DoCreateVnfTest {
+ def prefix = "DoCVNF_"
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(28090)
+
+ @Captor
+ static ArgumentCaptor<ExecutionEntity> captor = ArgumentCaptor.forClass(ExecutionEntity.class)
+
+ @Before
+ void init() throws IOException {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @Test
+ void testPreProcessRequest() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(prefix)
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("msoRequestId")).thenReturn("12345")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("MIS/1604/0026/SW_INTERNET")
+ when(mockExecution.getVariable("vnfType")).thenReturn("vRRaas")
+ when(mockExecution.getVariable("vnfName")).thenReturn("skask-test")
+
+ when(mockExecution.getVariable("productFamilyId")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable("lcpCloudRegionId")).thenReturn("MDTWNJ21")
+
+ when(mockExecution.getVariable("vnfResourceDecomposition")).thenReturn(new VnfResource())
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("testRequestId-1503410089303")
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:28080/mso/SDNCAdapterCallbackService")
+
+
+
+ DoCreateVnf obj = new DoCreateVnf()
+ obj.preProcessRequest(mockExecution)
+
+ Mockito.verify(mockExecution, times(31)).setVariable(captor.capture(), captor.capture())
+ List list = captor.getAllValues()
+ String str = list.get(51)
+ Assert.assertEquals("http://localhost:28080/mso/SDNCAdapterCallbackService", str)
+ }
+
+ private static ExecutionEntity setupMock() {
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("DoCreateVnf")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("DoCreateVnf")
+ when(mockRepositoryService.getProcessDefinition().getId()).thenReturn("100")
+ ProcessEngineServices mockProcessEngineServices = mock(ProcessEngineServices.class)
+ when(mockProcessEngineServices.getRepositoryService()).thenReturn(mockRepositoryService)
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getId()).thenReturn("100")
+ when(mockExecution.getProcessDefinitionId()).thenReturn("DoCreateVnf")
+ when(mockExecution.getProcessInstanceId()).thenReturn("DoCreateVnf")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+
+ return mockExecution
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceTest.groovy
new file mode 100644
index 0000000000..bbbb82b5aa
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceTest.groovy
@@ -0,0 +1,169 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.scripts
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.junit.Before
+import org.junit.BeforeClass
+import org.junit.Ignore
+import org.junit.Rule
+import org.junit.Test
+import org.mockito.MockitoAnnotations
+import org.onap.so.bpmn.infrastructure.scripts.DoCustomDeleteE2EServiceInstance
+import org.onap.so.bpmn.mock.FileUtil
+import org.onap.so.bpmn.vcpe.scripts.GroovyTestBase
+
+import static org.assertj.core.api.Assertions.assertThatThrownBy
+import static org.mockito.Matchers.anyString
+import static org.mockito.Mockito.verify
+import static org.mockito.Mockito.when
+import static org.mockito.Mockito.eq
+
+class DoCustomDeleteE2EServiceInstanceTest extends GroovyTestBase {
+
+ private static String request
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(GroovyTestBase.PORT)
+
+ String Prefix = "CVRCS_"
+ String RbType = "DCRENI_"
+
+ @BeforeClass
+ public static void setUpBeforeClass() {
+ request = FileUtil.readResourceFile("__files/InfrastructureFlows/DeleteCustomE2EService.json")
+ }
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+ public DoCustomDeleteE2EServiceInstanceTest(){
+ super("DoCustomDeleteE2EServiceInstance")
+ }
+
+ @Test
+ public void preProcessRequestTest(){
+
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+
+ DoCustomDeleteE2EServiceInstance instance = new DoCustomDeleteE2EServiceInstance()
+ instance.preProcessRequest(mex)
+ verify(mex).setVariable("sdncCallbackUrl", "/mso/sdncadapter/")
+ verify(mex).setVariable("siParamsXml", "")
+ }
+
+ @Test
+ public void postProcessAAIGETSuccessTest(){
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+ when(mex.getVariable("GENGS_SuccessIndicator")).thenReturn(true)
+
+ String aaiGetResponse = FileUtil.readResourceFile("__files/GenericFlows/aaiGetResponse.xml")
+ when(mex.getVariable("GENGS_service")).thenReturn(aaiGetResponse)
+ DoCustomDeleteE2EServiceInstance instance = new DoCustomDeleteE2EServiceInstance()
+ instance.postProcessAAIGET(mex)
+
+ verify(mex).setVariable(eq("serviceRelationShip"), anyString())
+ }
+
+ @Test
+ public void postProcessAAIGETFailureTest(){
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+ when(mex.getVariable("GENGS_FoundIndicator")).thenReturn(false)
+ when(mex.getVariable("GENGS_SuccessIndicator")).thenReturn(false)
+
+ DoCustomDeleteE2EServiceInstance instance = new DoCustomDeleteE2EServiceInstance()
+ assertThatThrownBy { instance.postProcessAAIGET(mex) } isInstanceOf BpmnError.class
+ }
+
+ @Test
+ public void preInitResourcesOperStatusTest(){
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+ when(mex.getVariable("serviceRelationShip")).thenReturn("[{\"resourceInstanceId\":\"3333\",\"resourceType\":\"overlay\"},{\"resourceInstanceId\":\"4444\",\"resourceType\":\"underlay\"},{\"resourceInstanceId\":\"1111\",\"resourceType\":\"vIMS\"},{\"resourceInstanceId\":\"222\",\"resourceType\":\"vEPC\"}]")
+ DoCustomDeleteE2EServiceInstance instance = new DoCustomDeleteE2EServiceInstance()
+ instance.preInitResourcesOperStatus(mex)
+
+ verify(mex).setVariable(eq("CVFMI_initResOperStatusRequest"), anyString())
+ }
+
+ @Test
+ public void preResourceDeleteTest() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+ when(mex.getVariable("serviceRelationShip")).thenReturn("[{\"resourceInstanceId\":\"3333\",\"resourceType\":\"overlay\"},{\"resourceInstanceId\":\"4444\",\"resourceType\":\"underlay\"},{\"resourceInstanceId\":\"1111\",\"resourceType\":\"vIMS\"},{\"resourceInstanceId\":\"222\",\"resourceType\":\"vEPC\"}]")
+ DoCustomDeleteE2EServiceInstance instance = new DoCustomDeleteE2EServiceInstance()
+ instance.preResourceDelete(mex,"overlay")
+ verify(mex).setVariable("resourceType", "overlay")
+ }
+
+ @Test
+ public void postProcessSDNCDeleteTest(){
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+ when(mex.getVariable("SDNCA_SuccessIndicator")).thenReturn("true")
+ when(mex.getVariable("DDELSI_sdncResponseSuccess")).thenReturn("true")
+ when(mex.getVariable("prefix")).thenReturn("DDELSI_")
+ DoCustomDeleteE2EServiceInstance instance = new DoCustomDeleteE2EServiceInstance()
+ String response = FileUtil.readResourceFile("__files/GenericFlows/SDNCDeleteResponse.xml")
+ String method = "deleteE2E";
+ instance.postProcessSDNCDelete(mex, response, method)
+ // following method doesn't do anything currently -> nothing to check
+ }
+
+ @Test
+ public void postProcessAAIDELTest() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+ when(mex.getVariable("GENDS_SuccessIndicator")).thenReturn("true")
+ DoCustomDeleteE2EServiceInstance instance = new DoCustomDeleteE2EServiceInstance()
+ instance.postProcessAAIDEL(mex)
+ }
+
+ private void initPreProcess(ExecutionEntity mex) {
+ when(mex.getVariable(GroovyTestBase.DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("bpmnRequest")).thenReturn(request)
+ when(mex.getVariable("mso-request-id")).thenReturn("mri")
+ when(mex.getVariable("serviceType")).thenReturn("VoLTE")
+ when(mex.getVariable("serviceInstanceId")).thenReturn("e151059a-d924-4629-845f-264db19e50b4")
+ when(mex.getVariable("requestAction")).thenReturn("ra")
+ when(mex.getVariable("operationId")).thenReturn("59960003992")
+ when(mex.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("/mso/sdncadapter/")
+ when(mex.getVariable("GENGS_FoundIndicator")).thenReturn("true")
+ when(mex.getVariable("GENGS_siResourceLink")).thenReturn("/service-subscription/e2eserviceInstance/delete/service-instances/")
+ when(mex.getVariable("globalSubscriberId")).thenReturn("4993921112123")
+ when(mex.getVariable("GENGS_service")).thenReturn("test3434")
+ when(mex.getVariable("mso.adapters.openecomp.db.endpoint")).thenReturn("http://localhost:8080/mso")
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceRollbackTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceRollbackTest.groovy
new file mode 100644
index 0000000000..5e264c0af4
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceRollbackTest.groovy
@@ -0,0 +1,343 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.scripts
+
+
+import static org.mockito.Mockito.*
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.ProcessEngineServices
+import org.camunda.bpm.engine.RepositoryService
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.camunda.bpm.engine.impl.pvm.process.ProcessDefinitionImpl
+import org.camunda.bpm.engine.repository.ProcessDefinition
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+import org.mockito.internal.debugging.MockitoDebuggerImpl
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.core.WorkflowException
+import org.junit.Before
+import org.junit.Rule;
+import org.junit.Test
+import org.junit.Ignore
+import org.junit.runner.RunWith
+
+import static org.junit.Assert.*;
+
+import com.github.tomakehurst.wiremock.client.WireMock;
+import com.github.tomakehurst.wiremock.junit.WireMockRule;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.apache.commons.lang3.*
+
+
+@RunWith(MockitoJUnitRunner.class)
+class DoDeleteNetworkInstanceRollbackTest {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(8090);
+
+ def utils = new MsoUtils()
+ String Prefix="DELNWKIR_"
+
+
+ String rollbackNetworkRequest =
+ """<NetworkAdapter:rollbackNetwork xmlns:NetworkAdapter="http://org.onap.so/network">
+ <rollback>
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <networkStackId/>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <networkCreated>true</networkCreated>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <msoRequest>
+ <requestId>1ef47428-cade-45bd-a103-0751e8b2deb0</requestId>
+ <serviceInstanceId/>
+ </msoRequest>
+ </rollback>
+</NetworkAdapter:rollbackNetwork>"""
+
+ String rollbackDeActivateSDNCRequest =
+ """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>activate</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <aetgt:SDNCRequestData>
+ <request-information>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <request-action>CreateNetworkInstance</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <service-type>MSO-dev-service-type</service-type>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <subscriber-name>MSO_1610_dev</subscriber-name>
+ </service-information>
+ <network-information>
+ <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <onap-model-information>
+ <model-invariant-uuid>invariant-uuid</model-invariant-uuid>
+ <model-customization-uuid>customization-uuid</model-customization-uuid>
+ <model-uuid>uuid</model-uuid>
+ <model-version>version</model-version>
+ <model-name>CONTRAIL_EXTERNAL</model-name>
+ </onap-model-information>
+ </network-information>
+ <network-request-information>
+ <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <tenant>7dd5365547234ee8937416c65507d266</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ </network-request-information>
+ </aetgt:SDNCRequestData>
+</aetgt:SDNCAdapterWorkflowRequest>"""
+
+ String rollbackSDNCRequest =
+ """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>rollback</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <aetgt:SDNCRequestData>
+ <request-information>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <request-action>CreateNetworkInstance</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <service-type>MSO-dev-service-type</service-type>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <subscriber-name>MSO_1610_dev</subscriber-name>
+ </service-information>
+ <network-information>
+ <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <onap-model-information>
+ <model-invariant-uuid>invariant-uuid</model-invariant-uuid>
+ <model-customization-uuid>customization-uuid</model-customization-uuid>
+ <model-uuid>uuid</model-uuid>
+ <model-version>version</model-version>
+ <model-name>CONTRAIL_EXTERNAL</model-name>
+ </onap-model-information>
+ </network-information>
+ <network-request-information>
+ <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <tenant>7dd5365547234ee8937416c65507d266</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ </network-request-information>
+ </aetgt:SDNCRequestData>
+</aetgt:SDNCAdapterWorkflowRequest>"""
+
+// - - - - - - - -
+
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ public void initializeVariables (DelegateExecution mockExecution) {
+
+ verify(mockExecution).setVariable(Prefix + "WorkflowException", null)
+
+ verify(mockExecution).setVariable(Prefix + "rollbackDeactivateSDNCRequest", null)
+ verify(mockExecution).setVariable(Prefix + "rollbackDeactivateSDNCResponse", "")
+ verify(mockExecution).setVariable(Prefix + "rollbackDeactivateSDNCReturnCode", "")
+
+ verify(mockExecution).setVariable(Prefix + "rollbackNetworkRequest", null)
+ verify(mockExecution).setVariable(Prefix + "rollbackNetworkResponse", "")
+ verify(mockExecution).setVariable(Prefix + "rollbackNetworkReturnCode", "")
+
+ verify(mockExecution).setVariable(Prefix + "Success", false)
+ verify(mockExecution).setVariable(Prefix + "fullRollback", false)
+
+ }
+
+ @Test
+ //@Ignore
+ public void preProcessRequest() {
+
+ println "************ preProcessRequest ************* "
+
+ WorkflowException workflowException = new WorkflowException("DoCreateNetworkInstance", 2500, "Received error from Network Adapter: JBWEB000065: HTTP Status 500.")
+ Map<String, String> rollbackData = new HashMap<String, String>();
+ rollbackData.put("rollbackDeactivateSDNCRequest", rollbackDeActivateSDNCRequest)
+ rollbackData.put("rollbackNetworkRequest", rollbackNetworkRequest)
+ rollbackData.put("rollbackSDNCRequest", rollbackSDNCRequest)
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix + "")
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(workflowException)
+ when(mockExecution.getVariable("rollbackData")).thenReturn(rollbackData)
+ when(mockExecution.getVariable("sdncVersion")).thenReturn("1702")
+
+ when(mockExecution.getVariable("mso.adapters.po.auth")).thenReturn("3141634BF7E070AA289CF2892C986C0B")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ when(mockExecution.getVariable("mso.adapters.sdnc.endpoint")).thenReturn("http://localhost:8090/SDNCAdapter")
+ when(mockExecution.getVariable("mso.adapters.network.rest.endpoint")).thenReturn("http://localhost:8090/networks/NetworkAdapter")
+ when(mockExecution.getVariable("mso.adapters.sdnc.resource.endpoint")).thenReturn("http://localhost:8090/SDNCAdapterRpc")
+
+
+ // preProcessRequest(DelegateExecution execution)
+ DoDeleteNetworkInstanceRollback DoDeleteNetworkInstanceRollback = new DoDeleteNetworkInstanceRollback()
+ DoDeleteNetworkInstanceRollback.preProcessRequest(mockExecution)
+
+ //verify variable initialization
+ initializeVariables(mockExecution)
+
+// verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void validateRollbackResponses_Good() {
+
+ WorkflowException workflowException = new WorkflowException("DoDeleteNetworkInstanceRollback", 2500, "AAI Update Contrail Failed. Error 404.")
+ WorkflowException expectedWorkflowException = new WorkflowException("DoDeleteNetworkInstanceRollback", 2500, "AAI Update Contrail Failed. Error 404. + SNDC deactivate rollback completed. + PO Network rollback completed. + SNDC unassign rollback completed.")
+
+ println "************ validateRollbackResponses_Good() ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix + "")
+
+ when(mockExecution.getVariable(Prefix + "rollbackDeactivateSDNCRequest")).thenReturn("Good")
+ when(mockExecution.getVariable(Prefix + "rollbackDeactivateSDNCReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable(Prefix + "rollbackDeactivateSDNCResponse")).thenReturn("GoodResponse")
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkRequest")).thenReturn("Good")
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkResponse")).thenReturn("GoodResponse")
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCRequest")).thenReturn("Good")
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCResponse")).thenReturn("GoodResponse")
+ when(mockExecution.getVariable(Prefix + "WorkflowException")).thenReturn(workflowException)
+ when(mockExecution.getVariable(Prefix + "fullRollback")).thenReturn(false)
+
+ DoDeleteNetworkInstanceRollback DoDeleteNetworkInstanceRollback = new DoDeleteNetworkInstanceRollback()
+ DoDeleteNetworkInstanceRollback.validateRollbackResponses(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ verify(mockExecution, atLeast(1)).setVariable("prefix", Prefix)
+ verify(mockExecution, atLeast(1)).setVariable("rolledBack", true)
+ verify(mockExecution, atLeast(1)).setVariable("wasDeleted", true)
+ verify(mockExecution).setVariable("WorkflowException", refEq(expectedWorkflowException, any(WorkflowException.class)))
+ //verify(mockExecution).setVariable("WorkflowException", expectedWorkflowException)
+ }
+
+ @Test
+ //@Ignore
+ public void validateRollbackResponses_FullRollback() {
+
+ Map<String, String> rollbackData = new HashMap<String, String>();
+ rollbackData.put("rollbackDeactivateSDNCRequest", rollbackDeActivateSDNCRequest)
+ rollbackData.put("rollbackNetworkRequest", rollbackNetworkRequest)
+ rollbackData.put("rollbackSDNCRequest", rollbackSDNCRequest)
+
+ println "************ validateRollbackResponses_FullRollback() ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix + "")
+
+ when(mockExecution.getVariable(Prefix + "rollbackDeactivateSDNCRequest")).thenReturn("Good")
+ when(mockExecution.getVariable(Prefix + "rollbackDeactivateSDNCReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable(Prefix + "rollbackDeactivateSDNCResponse")).thenReturn("GoodResponse")
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkRequest")).thenReturn("Good")
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkResponse")).thenReturn("GoodResponse")
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCRequest")).thenReturn("Good")
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCResponse")).thenReturn("GoodResponse")
+ when(mockExecution.getVariable(Prefix + "WorkflowException")).thenReturn(null)
+ when(mockExecution.getVariable(Prefix + "fullRollback")).thenReturn(true)
+ when(mockExecution.getVariable("rollbackData")).thenReturn(rollbackData)
+
+ DoDeleteNetworkInstanceRollback DoDeleteNetworkInstanceRollback = new DoDeleteNetworkInstanceRollback()
+ DoDeleteNetworkInstanceRollback.validateRollbackResponses(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ verify(mockExecution, atLeast(1)).setVariable("prefix", Prefix)
+ verify(mockExecution, atLeast(1)).setVariable("rollbackSuccessful", true)
+ verify(mockExecution, atLeast(1)).setVariable("rollbackError", false)
+
+ }
+
+
+ private ExecutionEntity setupMock() {
+
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("DoDeleteNetworkInstanceRollback")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("DoDeleteNetworkInstanceRollback")
+ when(mockRepositoryService.getProcessDefinition().getId()).thenReturn("100")
+ ProcessEngineServices mockProcessEngineServices = mock(ProcessEngineServices.class)
+ when(mockProcessEngineServices.getRepositoryService()).thenReturn(mockRepositoryService)
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+
+ when(mockExecution.getId()).thenReturn("100")
+ when(mockExecution.getProcessDefinitionId()).thenReturn("DoDeleteNetworkInstanceRollback")
+ when(mockExecution.getProcessInstanceId()).thenReturn("DoDeleteNetworkInstanceRollback")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+
+ return mockExecution
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceTest.groovy
new file mode 100644
index 0000000000..1a2d16d9d0
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceTest.groovy
@@ -0,0 +1,1948 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.scripts
+
+
+import static org.mockito.Mockito.*
+
+import static org.onap.so.bpmn.mock.StubResponseNetworkAdapter.MockNetworkAdapter;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetNetworkByIdWithDepth;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetNetworkCloudRegion;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetNetworkCloudRegion_404;
+import org.camunda.bpm.engine.ProcessEngineServices
+import org.camunda.bpm.engine.RepositoryService
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.camunda.bpm.engine.repository.ProcessDefinition
+import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.junit.Before
+import org.junit.Ignore
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.core.WorkflowException
+
+import com.github.tomakehurst.wiremock.client.WireMock
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+import org.apache.commons.lang3.*
+
+
+@RunWith(MockitoJUnitRunner.class)
+class DoDeleteNetworkInstanceTest {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(8090);
+
+ def utils = new MsoUtils()
+ String Prefix="DELNWKI_"
+
+ String incomingJsonRequest =
+ """{ "requestDetails": {
+ "modelInfo": {
+ "modelType": "network",
+ "modelCustomizationId": "f21df226-8093-48c3-be7e-0408fcda0422",
+ "modelName": "CONTRAIL_EXTERNAL",
+ "modelVersion": "1.0"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "RDM2WAGPLCP",
+ "tenantId": "7dd5365547234ee8937416c65507d266"
+ },
+ "requestInfo": {
+ "instanceName": "HSL_direct_net_2",
+ "source": "VID",
+ "callbackUrl": "",
+ "suppressRollback": true,
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "f70e927b-6087-4974-9ef8-c5e4d5847ca4",
+ "modelInfo": {
+ "modelType": "serviceT",
+ "modelId": "modelI",
+ "modelNameVersionId": "modelNameVersionI",
+ "modelName": "modleNam",
+ "modelVersion": "1"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": []
+ }
+ }"""
+
+ String expectedDoDeleteNetworkInstanceRequest =
+ """{ "requestDetails": {
+ "modelInfo": {
+ "modelType": "networkTyp",
+ "modelId": "modelId",
+ "modelNameVersionId": "modelNameVersionId",
+ "modelName": "CONTRAIL_EXTERNAL",
+ "modelVersion": "1"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "RDM2WAGPLCP",
+ "tenantId": "7dd5365547234ee8937416c65507d266"
+ },
+ "requestInfo": {
+ "instanceName": "HSL_direct_net_2",
+ "source": "VID",
+ "callbackUrl": "",
+ "suppressRollback": true,
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "f70e927b-6087-4974-9ef8-c5e4d5847ca4",
+ "modelInfo": {
+ "modelType": "serviceT",
+ "modelId": "modelI",
+ "modelNameVersionId": "modelNameVersionI",
+ "modelName": "modleNam",
+ "modelVersion": "1"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": []
+ }
+ }"""
+
+ // expectedVnfRequest
+ String expectedNetworkRequest =
+"""<network-request xmlns="http://www.w3.org/2001/XMLSchema">
+ <request-info>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <action>DELETE</action>
+ <source>VID</source>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ </request-info>
+ <network-inputs>
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>HSL_direct_net_2</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <modelCustomizationId>f21df226-8093-48c3-be7e-0408fcda0422</modelCustomizationId>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>false</backout-on-failure>
+ <sdncVersion>1610</sdncVersion>
+ </network-inputs>
+ <network-params/>
+</network-request>"""
+
+ String expectedVperNetworkRequest =
+"""<network-request xmlns="http://www.w3.org/2001/XMLSchema">
+ <request-info>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <action>DELETE</action>
+ <source>VID</source>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ </request-info>
+ <network-inputs>
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <subscription-service-type>MSO-dev-service-type</subscription-service-type>
+ <global-customer-id>globalId_45678905678</global-customer-id>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>false</backout-on-failure>
+ <failIfExist>false</failIfExist>
+ <networkModelInfo>
+ <modelName>CONTRAIL_EXTERNAL</modelName>
+ <modelUuid>sn5256d1-5a33-55df-13ab-12abad84e111</modelUuid>
+ <modelInvariantUuid>sn5256d1-5a33-55df-13ab-12abad84e764</modelInvariantUuid>
+ <modelVersion>1</modelVersion>
+ <modelCustomizationUuid>sn5256d1-5a33-55df-13ab-12abad84e222</modelCustomizationUuid>
+ </networkModelInfo>
+ <serviceModelInfo>
+ <modelName/>
+ <modelUuid/>
+ <modelInvariantUuid/>
+ <modelVersion/>
+ <modelCustomizationUuid/>
+ </serviceModelInfo>
+ <sdncVersion>1702</sdncVersion>
+ </network-inputs>
+ <network-params/>
+</network-request>"""
+
+ String expected_networkInput =
+ """<network-inputs xmlns="http://www.w3.org/2001/XMLSchema">
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>HSL_direct_net_2</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <modelCustomizationId>f21df226-8093-48c3-be7e-0408fcda0422</modelCustomizationId>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>false</backout-on-failure>
+ <sdncVersion>1610</sdncVersion>
+</network-inputs>"""
+
+ String expectedVper_networkInput =
+"""<network-inputs xmlns="http://www.w3.org/2001/XMLSchema">
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <subscription-service-type>MSO-dev-service-type</subscription-service-type>
+ <global-customer-id>globalId_45678905678</global-customer-id>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>false</backout-on-failure>
+ <failIfExist>false</failIfExist>
+ <networkModelInfo>
+ <modelName>CONTRAIL_EXTERNAL</modelName>
+ <modelUuid>sn5256d1-5a33-55df-13ab-12abad84e111</modelUuid>
+ <modelInvariantUuid>sn5256d1-5a33-55df-13ab-12abad84e764</modelInvariantUuid>
+ <modelVersion>1</modelVersion>
+ <modelCustomizationUuid>sn5256d1-5a33-55df-13ab-12abad84e222</modelCustomizationUuid>
+ </networkModelInfo>
+ <serviceModelInfo>
+ <modelName/>
+ <modelUuid/>
+ <modelInvariantUuid/>
+ <modelVersion/>
+ <modelCustomizationUuid/>
+ </serviceModelInfo>
+ <sdncVersion>1702</sdncVersion>
+</network-inputs>"""
+
+// emptyRegionVnfRequest
+String emptyRegionVnfRequest =
+"""<network-request xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-info>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <action>DELETE</action>
+ <source>PORTAL</source>
+ </request-info>
+ <network-inputs>
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>HSL_direct_net_2</network-name>
+ <network-type>CONTRAIL_BASIC</network-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <aic-cloud-region/>
+ <tenant-id>e81d842d3e8b45c5a59f57cd76af3aaf</tenant-id>
+ </network-inputs>
+ <network-params>
+ <param name="shared">0</param>
+ </network-params>
+</network-request>"""
+
+String vnfRequestCloudRegionNotFound =
+"""<network-request xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-info>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <action>DELETE</action>
+ <source>PORTAL</source>
+ </request-info>
+ <network-inputs>
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>HSL_direct_net_2</network-name>
+ <network-type>CONTRAIL_BASIC</network-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <aic-cloud-region>MDTWNJ21</aic-cloud-region>
+ <tenant-id>e81d842d3e8b45c5a59f57cd76af3aaf</tenant-id>
+ </network-inputs>
+ <network-params>
+ <param name="shared">0</param>
+ </network-params>
+</network-request>"""
+
+ String vnfPayload =
+ """<rest:payload xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ contentType="text/xml">
+ <network-request xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-info>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <action>DELETE</action>
+ <source>PORTAL</source>
+ </request-info>
+ <network-inputs>
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>HSL_direct_net_2</network-name>
+ <network-type>CONTRAIL_BASIC</network-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>e81d842d3e8b45c5a59f57cd76af3aaf</tenant-id>
+ </network-inputs>
+ <network-params>
+ <param name="shared">0</param>
+ </network-params>
+ </network-request>
+</rest:payload>"""
+
+ String vnfPayload_MissingId =
+"""<rest:payload xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ contentType="text/xml">
+ <network-request xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-info>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <action>DELETE</action>
+ <source>PORTAL</source>
+ </request-info>
+ <network-inputs>
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name/>
+ <network-type>CONTRAIL_BASIC</network-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>e81d842d3e8b45c5a59f57cd76af3aaf</tenant-id>
+ </network-inputs>
+ <network-params>
+ <param name="shared">0</param>
+ </network-params>
+ </network-request>
+</rest:payload>"""
+
+ String vnfRequestRESTPayload =
+"""<network-request xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-info>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <action>DELETE</action>
+ <source>PORTAL</source>
+ </request-info>
+ <network-inputs>
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>HSL_direct_net_2</network-name>
+ <network-type>CONTRAIL_BASIC</network-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>e81d842d3e8b45c5a59f57cd76af3aaf</tenant-id>
+ </network-inputs>
+ <network-outputs>
+ <network-id>id</network-id>
+ <network-name>name</network-name>
+ </network-outputs>
+ <network-params>
+ <param name="shared">0</param>
+ </network-params>
+ </network-request>"""
+
+
+String incomingRequestMissingCloudRegion =
+"""{ "requestDetails": {
+ "modelInfo": {
+ "modelType": "network",
+ "modelCustomizationId": "f21df226-8093-48c3-be7e-0408fcda0422",
+ "modelName": "CONTRAIL_EXTERNAL",
+ "modelVersion": "1.0"
+ },
+ "cloudConfiguration": {
+ "tenantId": "7dd5365547234ee8937416c65507d266"
+ },
+ "requestInfo": {
+ "instanceName": "HSL_direct_net_2",
+ "source": "VID",
+ "callbackUrl": "",
+ "suppressRollback": true,
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "f70e927b-6087-4974-9ef8-c5e4d5847ca4",
+ "modelInfo": {
+ "modelType": "serviceT",
+ "modelId": "modelI",
+ "modelNameVersionId": "modelNameVersionI",
+ "modelName": "modleNam",
+ "modelVersion": "1"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": []
+ }
+ }"""
+
+ String expectedNetworkRequestMissingId =
+ """<network-request xmlns="http://www.w3.org/2001/XMLSchema">
+ <request-info>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <action>DELETE</action>
+ <source>VID</source>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ </request-info>
+ <network-inputs>
+ <network-id/>
+ <network-name>HSL_direct_net_2</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <modelCustomizationId>f21df226-8093-48c3-be7e-0408fcda0422</modelCustomizationId>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>false</backout-on-failure>
+ <sdncVersion>1610</sdncVersion>
+ </network-inputs>
+ <network-params/>
+</network-request>"""
+
+String expectedNetworkRequestMissingCloudRegion =
+"""<network-request xmlns="http://www.w3.org/2001/XMLSchema">
+ <request-info>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <action>DELETE</action>
+ <source>VID</source>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ </request-info>
+ <network-inputs>
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>HSL_direct_net_2</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <modelCustomizationId>f21df226-8093-48c3-be7e-0408fcda0422</modelCustomizationId>
+ <aic-cloud-region>null</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>false</backout-on-failure>
+ <sdncVersion>1610</sdncVersion>
+ </network-inputs>
+ <network-params/>
+</network-request>"""
+
+ // vnfRESTRequest
+ String vnfRESTRequest =
+"""<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ xmlns="http://www.w3.org/2001/XMLSchema"
+ statusCode="200">
+ <rest:payload contentType="text/xml">
+ <network-request>
+ <request-info>
+ <action>DELETE</action>
+ <source>VID</source>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ </request-info>
+ <network-inputs>
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>HSL_direct_net_2</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>true</backout-on-failure>
+ </network-inputs>
+ <network-params>
+ <userParams/>
+ </network-params>
+ </network-request>
+ </rest:payload>
+</rest:RESTResponse>"""
+
+ String networkInputs =
+ """<network-inputs xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>HSL_direct_net_2</network-name>
+ <network-type>CONTRAIL_BASIC</network-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>e81d842d3e8b45c5a59f57cd76af3aaf</tenant-id>
+</network-inputs>"""
+
+String networkInputsNoType =
+"""<network-inputs xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <network-id></network-id>
+ <network-name></network-name>
+ <network-type></network-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>e81d842d3e8b45c5a59f57cd76af3aaf</tenant-id>
+</network-inputs>"""
+
+ String networkInputsMissingId =
+ """<network-inputs xmlns="http://www.w3.org/2001/XMLSchema">
+ <network-id/>
+ <network-name>HSL_direct_net_2</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <modelCustomizationId>f21df226-8093-48c3-be7e-0408fcda0422</modelCustomizationId>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>false</backout-on-failure>
+ <sdncVersion>1610</sdncVersion>
+</network-inputs>"""
+
+String networkInputsMissingCloudRegion =
+"""<network-inputs xmlns="http://www.w3.org/2001/XMLSchema">
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>HSL_direct_net_2</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <modelCustomizationId>f21df226-8093-48c3-be7e-0408fcda0422</modelCustomizationId>
+ <aic-cloud-region>null</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>false</backout-on-failure>
+ <sdncVersion>1610</sdncVersion>
+</network-inputs>"""
+
+ String MissingIdFault = "Invalid value or missing network-id element"
+ String MissingRegionFault = "Invalid value or missing 'aic-cloud-region' element"
+
+ String invalidWorkflowException = """<aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>Invalid value of network-id element</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>2500</aetgt:ErrorCode>
+ </aetgt:WorkflowException>"""
+
+
+ String queryAAIResponse =
+ """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Sat,30 Jan 2016 20:09:24 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="localhost-20160130-20:09:24:814-165843"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v3">
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>HSL_direct_net_2</network-name>
+ <network-type>CONTRAIL_BASIC</network-type>
+ <network-role>HSL_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <neutron-network-id>8bbd3edf-b835-4610-96a2-a5cafa029042</neutron-network-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <orchestration-status>active</orchestration-status>
+ <heat-stack-id>HSL_direct_net_2/57594a56-1c92-4a38-9caa-641c1fa3d4b6</heat-stack-id>
+ <subnets>
+ <subnet>
+ <subnet-id>ea5f2a2c-604f-47ff-a9c5-253ee4f0ef0a</subnet-id>
+ <neutron-subnet-id>5a77fdc2-7789-4649-a1b9-6eaf1db1813a</neutron-subnet-id>
+ <gateway-address>172.16.34.1</gateway-address>
+ <network-start-address>172.16.34.0</network-start-address>
+ <cidr-mask>28</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>active</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/cloud-infrastructure/tenants/tenant/e81d842d3e8b45c5a59f57cd76af3aaf/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>e81d842d3e8b45c5a59f57cd76af3aaf</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>"""
+
+ String deleteNetworkRequest =
+ """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <NetworkAdapter:deleteNetwork xmlns:NetworkAdapter="http://org.onap.so/network">
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <tenantId>e81d842d3e8b45c5a59f57cd76af3aaf</tenantId>
+ <networkType>CONTRAIL_BASIC</networkType>
+ <networkId>HSL_direct_net_2/57594a56-1c92-4a38-9caa-641c1fa3d4b6</networkId>
+ <request>
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <serviceInstanceId>0</serviceInstanceId>
+ </request>
+ </NetworkAdapter:deleteNetwork>
+ </soapenv:Body>
+</soapenv:Envelope>"""
+
+String deleteNetworkRESTRequest =
+"""<deleteNetworkRequest>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <tenantId>e81d842d3e8b45c5a59f57cd76af3aaf</tenantId>
+ <networkId>bdc5efe8-404a-409b-85f6-0dcc9eebae30</networkId>
+ <networkStackId>HSL_direct_net_2/57594a56-1c92-4a38-9caa-641c1fa3d4b6</networkStackId>
+ <networkType>CONTRAIL_BASIC</networkType>
+ <modelCustomizationUuid>sn5256d1-5a33-55df-13ab-12abad84e222</modelCustomizationUuid>
+ <skipAAI>true</skipAAI>
+ <msoRequest>
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <serviceInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</serviceInstanceId>
+ </msoRequest>
+ <messageId>messageId_value</messageId>
+ <notificationUrl/>
+</deleteNetworkRequest>"""
+
+String deleteNetworkRESTRequestAlaCarte =
+"""<deleteNetworkRequest>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <tenantId>e81d842d3e8b45c5a59f57cd76af3aaf</tenantId>
+ <networkId>bdc5efe8-404a-409b-85f6-0dcc9eebae30</networkId>
+ <networkStackId>HSL_direct_net_2/57594a56-1c92-4a38-9caa-641c1fa3d4b6</networkStackId>
+ <networkType>CONTRAIL_BASIC</networkType>
+ <modelCustomizationUuid>f21df226-8093-48c3-be7e-0408fcda0422</modelCustomizationUuid>
+ <skipAAI>true</skipAAI>
+ <msoRequest>
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <serviceInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</serviceInstanceId>
+ </msoRequest>
+ <messageId>messageId_value</messageId>
+ <notificationUrl/>
+</deleteNetworkRequest>"""
+
+ String deleteNetworkResponse_noRollback =
+"""<ns2:deleteNetworkResponse xmlns:ns2="http://org.onap.so/network">
+ <networkDeleted>true</networkDeleted>
+</ns2:deleteNetworkResponse>
+"""
+
+ String deleteNetworkResponse =
+ """<ns2:deleteNetworkResponse xmlns:ns2="http://org.onap.so/network">
+ <networkDeleted>true</networkDeleted>
+ <rollback>
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <networkStackId></networkStackId>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <networkCreated>true</networkCreated>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <msoRequest>
+ <requestId>1ef47428-cade-45bd-a103-0751e8b2deb0</requestId>
+ <serviceInstanceId></serviceInstanceId>
+ </msoRequest>
+ </rollback>
+ </ns2:deleteNetworkResponse>"""
+
+ String deleteRollbackNetworkRequest =
+ """<NetworkAdapter:rollbackNetwork xmlns:NetworkAdapter="http://org.onap.so/network">
+ <rollback>
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <networkStackId/>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <networkCreated>true</networkCreated>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <msoRequest>
+ <requestId>1ef47428-cade-45bd-a103-0751e8b2deb0</requestId>
+ <serviceInstanceId/>
+ </msoRequest>
+ </rollback>
+</NetworkAdapter:rollbackNetwork>"""
+
+ String deleteNetworkResponseFalseCompletion =
+ """<ns2:deleteNetworkResponse xmlns:ns2="http://org.onap.so/network"
+ xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
+ <networkDeleted>false</networkDeleted>
+ </ns2:deleteNetworkResponse>"""
+
+ String deleteNetworkErrorResponse =
+ """<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<deleteNetworkError>
+<messageId>680bd458-5ec1-4a16-b77c-509022e53450</messageId><category>INTERNAL</category>
+<message>400 Bad Request: The server could not comply with the request since it is either malformed or otherwise incorrect., error.type=StackValidationFailed, error.message=Property error: : resources.network.properties: : Unknown Property network_ipam_refs_data</message>
+<rolledBack>true</rolledBack>
+</deleteNetworkError>
+"""
+
+ String deleteNetworkWorkflowException =
+ """<aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>Received error from Network Adapter: 400 Bad Request: The server could not comply with the request since it is either malformed or otherwise incorrect., error.type=StackValidationFailed, error.message=Property error: : resources.network.properties: : Unknown Property network_ipam_refs_data</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7020</aetgt:ErrorCode>
+ </aetgt:WorkflowException>"""
+
+String aaiWorkflowException =
+"""<aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>Bpmn error encountered in DoDeleteNetworkInstance flow. Unexpected Response from AAI Adapter - org.apache.http.conn.HttpHostConnectException: Connect to localhost:8090 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>2500</aetgt:ErrorCode>
+ </aetgt:WorkflowException>"""
+
+ String aaiResponse =
+ """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Sat,30 Jan 2016 20:09:24 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="localhost-20160130-20:09:24:814-165843"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>HSL_direct_net_2</network-name>
+ <network-type>CONTRAIL_BASIC</network-type>
+ <network-role>HSL_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <neutron-network-id>8bbd3edf-b835-4610-96a2-a5cafa029042</neutron-network-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <orchestration-status>active</orchestration-status>
+ <heat-stack-id>HSL_direct_net_2/57594a56-1c92-4a38-9caa-641c1fa3d4b6</heat-stack-id>
+ <subnets>
+ <subnet>
+ <subnet-id>ea5f2a2c-604f-47ff-a9c5-253ee4f0ef0a</subnet-id>
+ <neutron-subnet-id>5a77fdc2-7789-4649-a1b9-6eaf1db1813a</neutron-subnet-id>
+ <gateway-address>172.16.34.1</gateway-address>
+ <network-start-address>172.16.34.0</network-start-address>
+ <cidr-mask>28</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>active</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/e81d842d3e8b45c5a59f57cd76af3aaf/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>e81d842d3e8b45c5a59f57cd76af3aaf</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>cloud-region</related-to>
+ <related-link>cloud-infrastructure/cloud-regions/cloud-region/att-aic/RDM2WAGPLCP/</related-link>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>RDM2WAGPLCP</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>"""
+
+String aaiResponseWithRelationship =
+"""<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Sat,30 Jan 2016 20:09:24 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="localhost-20160130-20:09:24:814-165843"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>HSL_direct_net_2</network-name>
+ <network-type>CONTRAIL_BASIC</network-type>
+ <network-role>HSL_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <neutron-network-id>8bbd3edf-b835-4610-96a2-a5cafa029042</neutron-network-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <orchestration-status>active</orchestration-status>
+ <heat-stack-id>HSL_direct_net_2/57594a56-1c92-4a38-9caa-641c1fa3d4b6</heat-stack-id>
+ <subnets>
+ <subnet>
+ <subnet-id>ea5f2a2c-604f-47ff-a9c5-253ee4f0ef0a</subnet-id>
+ <neutron-subnet-id>5a77fdc2-7789-4649-a1b9-6eaf1db1813a</neutron-subnet-id>
+ <gateway-address>172.16.34.1</gateway-address>
+ <network-start-address>172.16.34.0</network-start-address>
+ <cidr-mask>28</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>active</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/e81d842d3e8b45c5a59f57cd76af3aaf/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>e81d842d3e8b45c5a59f57cd76af3aaf</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vf-module</related-to>
+ <related-link>https://aai-app-e2e.ecomp.cci.com:8443/aai/v8/network/generic-vnfs/generic-vnf/105df7e5-0b3b-49f7-a837-4864b62827c4/vf-modules/vf-module/d9217058-95a0-49ee-b9a9-949259e89349/</related-link>
+ <relationship-data>
+ <relationship-key>generic-vnf.vnf-id</relationship-key>
+ <relationship-value>105df7e5-0b3b-49f7-a837-4864b62827c4</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>vf-module.vf-module-id</relationship-key>
+ <relationship-value>d9217058-95a0-49ee-b9a9-949259e89349</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>generic-vnf</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/generic-vnfs/generic-vnf/45f822d9-73ca-4255-9844-7cef401bbf47/</related-link>
+ <relationship-data>
+ <relationship-key>generic-vnf.vnf-id</relationship-key>
+ <relationship-value>45f822d9-73ca-4255-9844-7cef401bbf47</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>generic-vnf.vnf-name</property-key>
+ <property-value>zrdm1scpx05</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>"""
+
+ String deleteSDNCRequest =
+ """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>delete</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <aetgt:SDNCRequestData>
+ <request-information>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <request-action>DisconnectNetworkRequest</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <service-type/>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <subscriber-name/>
+ </service-information>
+ <network-request-information>
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-type>CONTRAIL_BASIC</network-type>
+ <network-name>HSL_direct_net_2</network-name>
+ <tenant>7dd5365547234ee8937416c65507d266</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ </network-request-information>
+ </aetgt:SDNCRequestData>
+</aetgt:SDNCAdapterWorkflowRequest>"""
+
+ String deleteRpcSDNCRequest =
+ """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>unassign</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <aetgt:SDNCRequestData>
+ <request-information>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <request-action>DeleteNetworkInstance</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <subscription-service-type>MSO-dev-service-type</subscription-service-type>
+ <onap-model-information>
+ <model-invariant-uuid>fcc85cb0-ad74-45d7-a5a1-17c8744fdb71</model-invariant-uuid>
+ <model-uuid>36a3a8ea-49a6-4ac8-b06c-89a54544b9b6</model-uuid>
+ <model-version>1.0</model-version>
+ <model-name>HNGW Protected OAM</model-name>
+ </onap-model-information>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <global-customer-id>globalId_45678905678</global-customer-id>
+ <subscriber-name/>
+ </service-information>
+ <network-information>
+ <network-id>networkId</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <onap-model-information>
+ <model-invariant-uuid>sn5256d1-5a33-55df-13ab-12abad84e764</model-invariant-uuid>
+ <model-customization-uuid>sn5256d1-5a33-55df-13ab-12abad84e222</model-customization-uuid>
+ <model-uuid>sn5256d1-5a33-55df-13ab-12abad84e111</model-uuid>
+ <model-version>1</model-version>
+ <model-name>CONTRAIL_EXTERNAL</model-name>
+ </onap-model-information>
+ </network-information>
+ <network-request-input>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <tenant>7dd5365547234ee8937416c65507d266</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <aic-clli/>
+ <network-input-parameters/>
+ </network-request-input>
+ </aetgt:SDNCRequestData>
+</aetgt:SDNCAdapterWorkflowRequest>"""
+
+ String sdncAdapaterDeactivateRollback =
+"""<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>activate</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <aetgt:SDNCRequestData>
+ <request-information>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <request-action>CreateNetworkInstance</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <subscription-service-type>MSO-dev-service-type</subscription-service-type>
+ <onap-model-information>
+ <model-invariant-uuid>fcc85cb0-ad74-45d7-a5a1-17c8744fdb71</model-invariant-uuid>
+ <model-uuid>36a3a8ea-49a6-4ac8-b06c-89a54544b9b6</model-uuid>
+ <model-version>1.0</model-version>
+ <model-name>HNGW Protected OAM</model-name>
+ </onap-model-information>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <global-customer-id>globalId_45678905678</global-customer-id>
+ <subscriber-name/>
+ </service-information>
+ <network-information>
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <onap-model-information>
+ <model-invariant-uuid>sn5256d1-5a33-55df-13ab-12abad84e764</model-invariant-uuid>
+ <model-customization-uuid>sn5256d1-5a33-55df-13ab-12abad84e222</model-customization-uuid>
+ <model-uuid>sn5256d1-5a33-55df-13ab-12abad84e111</model-uuid>
+ <model-version>1</model-version>
+ <model-name>CONTRAIL_EXTERNAL</model-name>
+ </onap-model-information>
+ </network-information>
+ <network-request-input>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <tenant>7dd5365547234ee8937416c65507d266</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <aic-clli/>
+ <network-input-parameters/>
+ </network-request-input>
+ </aetgt:SDNCRequestData>
+</aetgt:SDNCAdapterWorkflowRequest>"""
+ String sdncAdapterWorkflowResponse =
+ """<aetgt:SDNCAdapterWorkflowResponse xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
+ <sdncadapterworkflow:response-data>
+<tag0:CallbackHeader xmlns:tag0="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <tag0:RequestId>745b1b50-e39e-4685-9cc8-c71f0bde8bf0</tag0:RequestId>
+ <tag0:ResponseCode>200</tag0:ResponseCode>
+ <tag0:ResponseMessage>OK</tag0:ResponseMessage>
+</tag0:CallbackHeader>
+ <tag0:RequestData xmlns:tag0="http://org.onap.so/workflow/sdnc/adapter/schema/v1">&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;output xmlns="com:att:sdnctl:vnf"&gt;&lt;svc-request-id&gt;19174929-3809-49ca-89eb-17f84a035389&lt;/svc-request-id&gt;&lt;response-code&gt;200&lt;/response-code&gt;&lt;ack-final-indicator&gt;Y&lt;/ack-final-indicator&gt;&lt;network-information&gt;&lt;network-id&gt;bdc5efe8-404a-409b-85f6-0dcc9eebae30&lt;/network-id&gt;&lt;/network-information&gt;&lt;service-information&gt;&lt;service-type&gt;a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb&lt;/service-type&gt;&lt;service-instance-id&gt;HSL_direct_net_2&lt;/service-instance-id&gt;&lt;subscriber-name&gt;notsurewecare&lt;/subscriber-name&gt;&lt;/service-information&gt;&lt;/output&gt;</tag0:RequestData>
+ </sdncadapterworkflow:response-data>
+ </aetgt:SDNCAdapterWorkflowResponse>"""
+
+ String sdncAdapterWorkflowResponse_404 =
+ """<aetgt:SDNCAdapterWorkflowResponse xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
+ <sdncadapterworkflow:response-data>&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;output xmlns="com:att:sdnctl:vnf"&gt;&lt;svc-request-id&gt;00703dc8-71ff-442d-a4a8-3adc5beef6a9&lt;/svc-request-id&gt;&lt;response-code&gt;404&lt;/response-code&gt;&lt;response-message&gt;Service instance not found in config tree&lt;/response-message&gt;&lt;ack-final-indicator&gt;Y&lt;/ack-final-indicator&gt;&lt;network-information&gt;&lt;network-id&gt;49c86598-f766-46f8-84f8-8d1c1b10f9b4&lt;/network-id&gt;&lt;/network-information&gt;&lt;service-information&gt;&lt;service-type&gt;a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb&lt;/service-type&gt;&lt;service-instance-id&gt;MNS-25180-L-01-dmz_direct_net_1&lt;/service-instance-id&gt;&lt;subscriber-name&gt;notsurewecare&lt;/subscriber-name&gt;&lt;/service-information&gt;&lt;/output&gt;</sdncadapterworkflow:response-data>
+</aetgt:SDNCAdapterWorkflowResponse>"""
+
+ String expected_sdncAdapterWorkflowFormattedResponse_404 =
+"""<aetgt:SDNCAdapterWorkflowResponse xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns="com:att:sdnctl:vnf">
+ <aetgt:response-data>
+ <output>
+ <svc-request-id>00703dc8-71ff-442d-a4a8-3adc5beef6a9</svc-request-id>
+ <response-code>404</response-code>
+ <response-message>Service instance not found in config tree</response-message>
+ <ack-final-indicator>Y</ack-final-indicator>
+ <network-information>
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ </network-information>
+ <service-information>
+ <service-type>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-type>
+ <service-instance-id>MNS-25180-L-01-dmz_direct_net_1</service-instance-id>
+ <subscriber-name>notsurewecare</subscriber-name>
+ </service-information>
+ </output>
+ </aetgt:response-data>
+</aetgt:SDNCAdapterWorkflowResponse>"""
+
+ String sdncAdapterWorkflowFormattedResponse =
+ """<aetgt:SDNCAdapterWorkflowResponse xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns="com:att:sdnctl:vnf">
+ <aetgt:response-data>
+ <output>
+ <svc-request-id>19174929-3809-49ca-89eb-17f84a035389</svc-request-id>
+ <response-code>200</response-code>
+ <ack-final-indicator>Y</ack-final-indicator>
+ <network-information>
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ </network-information>
+ <service-information>
+ <service-type>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-type>
+ <service-instance-id>HSL_direct_net_2</service-instance-id>
+ <subscriber-name>notsurewecare</subscriber-name>
+ </service-information>
+ </output>
+ </aetgt:response-data>
+</aetgt:SDNCAdapterWorkflowResponse>"""
+
+String sdncAdapterWorkflowFormattedResponse_404 =
+"""<aetgt:SDNCAdapterWorkflowResponse xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns="com:att:sdnctl:vnf">
+ <aetgt:response-data>
+ <output>
+ <svc-request-id>00703dc8-71ff-442d-a4a8-3adc5beef6a9</svc-request-id>
+ <response-code>404</response-code>
+ <response-message>Service instance not found in config tree</response-message>
+ <ack-final-indicator>Y</ack-final-indicator>
+ <network-information>
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ </network-information>
+ <service-information>
+ <service-type>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-type>
+ <service-instance-id>MNS-25180-L-01-dmz_direct_net_1</service-instance-id>
+ <subscriber-name>notsurewecare</subscriber-name>
+ </service-information>
+ </output>
+ </aetgt:response-data>
+</aetgt:SDNCAdapterWorkflowResponse>"""
+
+ String invalidRequest = "Invalid value of network-id element"
+
+
+
+ String sndcWorkflowException =
+ """<aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>Received error from SDN-C: No availability zone available</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>5300</aetgt:ErrorCode>
+ <aetgt:SourceSystemErrorCode>200</aetgt:SourceSystemErrorCode>
+</aetgt:WorkflowException>"""
+
+ String sndcWorkflowErrorResponse =
+ """<aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>Received error from SDN-C: <aetgt:SDNCAdapterWorkflowResponse xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
+ <sdncadapterworkflow:response-data>&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;output xmlns="com:att:sdnctl:vnf"&gt;&lt;svc-request-id&gt;00703dc8-71ff-442d-a4a8-3adc5beef6a9&lt;/svc-request-id&gt;&lt;response-code&gt;404&lt;/response-code&gt;&lt;response-message&gt;Service instance not found in config tree&lt;/response-message&gt;&lt;ack-final-indicator&gt;Y&lt;/ack-final-indicator&gt;&lt;network-information&gt;&lt;network-id&gt;49c86598-f766-46f8-84f8-8d1c1b10f9b4&lt;/network-id&gt;&lt;/network-information&gt;&lt;service-information&gt;&lt;service-type&gt;a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb&lt;/service-type&gt;&lt;service-instance-id&gt;MNS-25180-L-01-dmz_direct_net_1&lt;/service-instance-id&gt;&lt;subscriber-name&gt;notsurewecare&lt;/subscriber-name&gt;&lt;/service-information&gt;&lt;/output&gt;</sdncadapterworkflow:response-data>
+</aetgt:SDNCAdapterWorkflowResponse></aetgt:ErrorMessage>
+ <aetgt:ErrorCode>5300</aetgt:ErrorCode>
+ </aetgt:WorkflowException>"""
+
+ String unexpectedErrorEncountered =
+ """<aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>bpel error deleting network</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>5300</aetgt:ErrorCode>
+ </aetgt:WorkflowException>"""
+
+
+ // expectedVnfRequest
+ String inputViprSDC_NetworkRequest =
+ """<network-request xmlns="http://www.w3.org/2001/XMLSchema">
+ <request-info>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <action>DELETE</action>
+ <source>VID</source>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ </request-info>
+ <network-inputs>
+ <network-id>networkId</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <subscription-service-type>MSO-dev-service-type</subscription-service-type>
+ <global-customer-id>globalId_45678905678</global-customer-id>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>false</backout-on-failure>
+ <failIfExist>false</failIfExist>
+ <networkModelInfo>
+ <modelName>CONTRAIL_EXTERNAL</modelName>
+ <modelUuid>sn5256d1-5a33-55df-13ab-12abad84e111</modelUuid>
+ <modelInvariantUuid>sn5256d1-5a33-55df-13ab-12abad84e764</modelInvariantUuid>
+ <modelVersion>1</modelVersion>
+ <modelCustomizationUuid>sn5256d1-5a33-55df-13ab-12abad84e222</modelCustomizationUuid>
+ <modelType>CONTRAIL_EXTERNAL</modelType>
+ </networkModelInfo>
+ <serviceModelInfo>
+ <modelName>HNGW Protected OAM</modelName>
+ <modelUuid>36a3a8ea-49a6-4ac8-b06c-89a54544b9b6</modelUuid>
+ <modelInvariantUuid>fcc85cb0-ad74-45d7-a5a1-17c8744fdb71</modelInvariantUuid>
+ <modelVersion>1.0</modelVersion>
+ <modelCustomizationUuid/>
+ <modelType>service</modelType>
+ </serviceModelInfo>
+ <sdncVersion>1702</sdncVersion>
+ </network-inputs>
+ <network-params/>
+</network-request>"""
+// - - - - - - - -
+
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ @Test
+ //@Ignore
+ public void preProcessRequest_Json() {
+
+ println "************ preProcessRequest_Payload ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("isBaseVfModule")).thenReturn(true)
+ when(mockExecution.getVariable("recipeTimeout")).thenReturn(0)
+ when(mockExecution.getVariable("requestAction")).thenReturn("DELETE")
+ when(mockExecution.getVariable("networkId")).thenReturn("bdc5efe8-404a-409b-85f6-0dcc9eebae30")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable("vnfId")).thenReturn("")
+ when(mockExecution.getVariable("volumeGroupId")).thenReturn("")
+ //when(mockExecution.getVariable("networkId")).thenReturn("")
+ when(mockExecution.getVariable("serviceType")).thenReturn("MOG")
+ when(mockExecution.getVariable("networkType")).thenReturn("modelName")
+ when(mockExecution.getVariable("bpmnRequest")).thenReturn(incomingJsonRequest)
+ when(mockExecution.getVariable("disableRollback")).thenReturn(true)
+ when(mockExecution.getVariable("testMessageId")).thenReturn("7df689f9-7b93-430b-9b9e-28140d70cc7ad")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("mso-service-instance-id")).thenReturn("FH/VLXM/003717//SW_INTERNET")
+ when(mockExecution.getVariable("mso.adapters.po.auth")).thenReturn("3141634BF7E070AA289CF2892C986C0B")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.rollback")).thenReturn("true")
+ when(mockExecution.getVariable("sdncVersion")).thenReturn("1610")
+
+ DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+ DoDeleteNetworkInstance.preProcessRequest(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+// verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ //verify variable initialization
+ initializeVariables(mockExecution)
+
+ verify(mockExecution).setVariable("action", "DELETE")
+ verify(mockExecution).setVariable(Prefix + "networkRequest", expectedNetworkRequest)
+
+ verify(mockExecution).setVariable(Prefix + "rollbackEnabled", false)
+
+ verify(mockExecution).setVariable(Prefix + "networkInputs", expected_networkInput)
+ verify(mockExecution).setVariable(Prefix + "messageId", "7df689f9-7b93-430b-9b9e-28140d70cc7ad")
+ verify(mockExecution).setVariable(Prefix + "source", "VID")
+
+ // Authentications
+ verify(mockExecution).setVariable("BasicAuthHeaderValuePO", "Basic cGFzc3dvcmQ=")
+ verify(mockExecution).setVariable("BasicAuthHeaderValueSDNC", "Basic cGFzc3dvcmQ=")
+
+
+ }
+
+ @Test
+ //@Ignore
+ public void preProcessRequest_vPER() {
+
+ def networkModelInfo = """{"modelUuid": "sn5256d1-5a33-55df-13ab-12abad84e111",
+ "modelName": "CONTRAIL_EXTERNAL",
+ "modelType": "CONTRAIL_EXTERNAL",
+ "modelVersion": "1",
+ "modelCustomizationUuid": "sn5256d1-5a33-55df-13ab-12abad84e222",
+ "modelInvariantUuid": "sn5256d1-5a33-55df-13ab-12abad84e764"
+ }""".trim()
+
+ println "************ preProcessRequest_Payload ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("testMessageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ // Inputs:
+ when(mockExecution.getVariable("msoRequestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("disableRollback")).thenReturn("true")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable("networkId")).thenReturn("bdc5efe8-404a-409b-85f6-0dcc9eebae30") // optional
+ when(mockExecution.getVariable("networkName")).thenReturn("MNS-25180-L-01-dmz_direct_net_1") // optional
+ when(mockExecution.getVariable("productFamilyId")).thenReturn("a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb")
+ when(mockExecution.getVariable("networkModelInfo")).thenReturn("CONTRAIL_EXTERNAL")
+ when(mockExecution.getVariable("lcpCloudRegionId")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable("tenantId")).thenReturn("7dd5365547234ee8937416c65507d266")
+ when(mockExecution.getVariable("failIfExists")).thenReturn("false")
+ when(mockExecution.getVariable("networkModelInfo")).thenReturn(networkModelInfo)
+ when(mockExecution.getVariable("sdncVersion")).thenReturn("1702")
+ when(mockExecution.getVariable("action")).thenReturn("DELETE")
+ when(mockExecution.getVariable("subscriptionServiceType")).thenReturn("MSO-dev-service-type")
+ when(mockExecution.getVariable("globalSubscriberId")).thenReturn("globalId_45678905678")
+ when(mockExecution.getVariable("testMessageId")).thenReturn("7df689f9-7b93-430b-9b9e-28140d70cc7ad")
+
+ when(mockExecution.getVariable("mso.adapters.po.auth")).thenReturn("3141634BF7E070AA289CF2892C986C0B")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+ DoDeleteNetworkInstance.preProcessRequest(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+// verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ //verify variable initialization
+ initializeVariables(mockExecution)
+
+ verify(mockExecution).setVariable("action", "DELETE")
+ verify(mockExecution).setVariable(Prefix + "networkRequest", expectedVperNetworkRequest)
+
+ verify(mockExecution).setVariable(Prefix + "rollbackEnabled", false)
+
+ verify(mockExecution).setVariable(Prefix + "networkInputs", expectedVper_networkInput)
+ verify(mockExecution).setVariable(Prefix + "messageId", "7df689f9-7b93-430b-9b9e-28140d70cc7ad")
+ verify(mockExecution).setVariable(Prefix + "source", "VID")
+
+ // Authentications
+ verify(mockExecution).setVariable("BasicAuthHeaderValuePO", "Basic cGFzc3dvcmQ=")
+ verify(mockExecution).setVariable("BasicAuthHeaderValueSDNC", "Basic cGFzc3dvcmQ=")
+
+
+ }
+
+ public void initializeVariables (DelegateExecution mockExecution) {
+
+ verify(mockExecution).setVariable(Prefix + "networkRequest", "")
+ verify(mockExecution).setVariable(Prefix + "isSilentSuccess", false)
+ verify(mockExecution).setVariable(Prefix + "Success", false)
+
+ verify(mockExecution).setVariable(Prefix + "requestId", "")
+ verify(mockExecution).setVariable(Prefix + "source", "")
+ verify(mockExecution).setVariable(Prefix + "lcpCloudRegion", "")
+ verify(mockExecution).setVariable(Prefix + "networkInputs", "")
+ verify(mockExecution).setVariable(Prefix + "tenantId", "")
+
+ verify(mockExecution).setVariable(Prefix + "queryAAIRequest","")
+ verify(mockExecution).setVariable(Prefix + "queryAAIResponse", "")
+ verify(mockExecution).setVariable(Prefix + "aaiReturnCode", "")
+ verify(mockExecution).setVariable(Prefix + "isAAIGood", false)
+ verify(mockExecution).setVariable(Prefix + "isVfRelationshipExist", false)
+
+ // AAI query Cloud Region
+ verify(mockExecution).setVariable(Prefix + "queryCloudRegionRequest","")
+ verify(mockExecution).setVariable(Prefix + "queryCloudRegionReturnCode","")
+ verify(mockExecution).setVariable(Prefix + "queryCloudRegionResponse","")
+ verify(mockExecution).setVariable(Prefix + "cloudRegionPo","")
+ verify(mockExecution).setVariable(Prefix + "cloudRegionSdnc","")
+
+ verify(mockExecution).setVariable(Prefix + "deleteNetworkRequest", "")
+ verify(mockExecution).setVariable(Prefix + "deleteNetworkResponse", "")
+ verify(mockExecution).setVariable(Prefix + "networkReturnCode", "")
+ verify(mockExecution).setVariable(Prefix + "rollbackNetworkRequest", "")
+
+ verify(mockExecution).setVariable(Prefix + "deleteSDNCRequest", "")
+ verify(mockExecution).setVariable(Prefix + "deleteSDNCResponse", "")
+ verify(mockExecution).setVariable(Prefix + "sdncReturnCode", "")
+ verify(mockExecution).setVariable(Prefix + "sdncResponseSuccess", false)
+
+ verify(mockExecution).setVariable(Prefix + "deactivateSDNCRequest", "")
+ verify(mockExecution).setVariable(Prefix + "deactivateSDNCResponse", "")
+ verify(mockExecution).setVariable(Prefix + "deactivateSdncReturnCode", "")
+ verify(mockExecution).setVariable(Prefix + "isSdncDeactivateRollbackNeeded", "")
+
+ verify(mockExecution).setVariable(Prefix + "rollbackDeactivateSDNCRequest", "")
+ verify(mockExecution).setVariable(Prefix + "isException", false)
+
+ }
+
+ @Test
+ //@Ignore
+ public void preProcessRequest_Json_MissingId() {
+
+ println "************ preProcessRequest_MissingId() ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("isBaseVfModule")).thenReturn(true)
+ when(mockExecution.getVariable("recipeTimeout")).thenReturn(0)
+ when(mockExecution.getVariable("requestAction")).thenReturn("DELETE")
+ //when(mockExecution.getVariable("networkId")).thenReturn("") // missing Id
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable("vnfId")).thenReturn("")
+ when(mockExecution.getVariable("volumeGroupId")).thenReturn("")
+ //when(mockExecution.getVariable("networkId")).thenReturn("")
+ when(mockExecution.getVariable("serviceType")).thenReturn("MOG")
+ when(mockExecution.getVariable("networkType")).thenReturn("modelName")
+ when(mockExecution.getVariable("bpmnRequest")).thenReturn(incomingJsonRequest)
+ when(mockExecution.getVariable("disableRollback")).thenReturn(true)
+
+ when(mockExecution.getVariable("testMessageId")).thenReturn("7df689f9-7b93-430b-9b9e-28140d70cc7ad")
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("mso-service-instance-id")).thenReturn("FH/VLXM/003717//SW_INTERNET")
+ when(mockExecution.getVariable("mso.adapters.po.auth")).thenReturn("3141634BF7E070AA289CF2892C986C0B")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.rollback")).thenReturn("true")
+ when(mockExecution.getVariable("sdncVersion")).thenReturn("1610")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+ try {
+ DoDeleteNetworkInstance.preProcessRequest(mockExecution)
+ } catch (Exception ex) {
+ println " Test End - Handle catch-throw BpmnError()! "
+ }
+
+ //verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ //verify variable initialization
+ initializeVariables(mockExecution)
+
+ verify(mockExecution).setVariable("action", "DELETE")
+ verify(mockExecution).setVariable(Prefix + "networkRequest", expectedNetworkRequestMissingId)
+ verify(mockExecution).setVariable(Prefix + "rollbackEnabled", false)
+
+ verify(mockExecution).setVariable(Prefix + "networkInputs", networkInputsMissingId)
+ verify(mockExecution).setVariable(Prefix + "messageId", "7df689f9-7b93-430b-9b9e-28140d70cc7ad")
+ verify(mockExecution).setVariable(Prefix + "source", "VID")
+
+ }
+
+ @Test
+ //@Ignore
+ public void preProcessRequest_Json_MissingCloudRegion() {
+
+ def networkModelInfo = """{"modelVersionId": "sn5256d1-5a33-55df-13ab-12abad84e111",
+ "modelName": "CONTRAIL_EXTERNAL",
+ "modelType": "CONTRAIL_EXTERNAL",
+ "modelVersion": "1",
+ "modelCustomizationId": "sn5256d1-5a33-55df-13ab-12abad84e222",
+ "modelInvariantId": "sn5256d1-5a33-55df-13ab-12abad84e764"
+ }""".trim()
+
+ println "************ preProcessRequest_MissingCloudRegion() ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("networkModelInfo")).thenReturn(networkModelInfo)
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("isBaseVfModule")).thenReturn(true)
+ when(mockExecution.getVariable("recipeTimeout")).thenReturn(0)
+ when(mockExecution.getVariable("requestAction")).thenReturn("DELETE")
+ when(mockExecution.getVariable("networkId")).thenReturn("bdc5efe8-404a-409b-85f6-0dcc9eebae30")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable("vnfId")).thenReturn("")
+ when(mockExecution.getVariable("volumeGroupId")).thenReturn("")
+ //when(mockExecution.getVariable("networkId")).thenReturn("")
+ when(mockExecution.getVariable("serviceType")).thenReturn("MOG")
+ when(mockExecution.getVariable("networkType")).thenReturn("modelName")
+ when(mockExecution.getVariable("bpmnRequest")).thenReturn(incomingRequestMissingCloudRegion)
+ when(mockExecution.getVariable("disableRollback")).thenReturn(true)
+
+ when(mockExecution.getVariable("testMessageId")).thenReturn("7df689f9-7b93-430b-9b9e-28140d70cc7ad")
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("mso-service-instance-id")).thenReturn("FH/VLXM/003717//SW_INTERNET")
+ when(mockExecution.getVariable("mso.adapters.po.auth")).thenReturn("3141634BF7E070AA289CF2892C986C0B")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.rollback")).thenReturn("true")
+ when(mockExecution.getVariable("sdncVersion")).thenReturn("1610")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+ DoDeleteNetworkInstance.preProcessRequest(mockExecution)
+
+ //verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ //verify variable initialization
+ initializeVariables(mockExecution)
+
+ verify(mockExecution).setVariable("action", "DELETE")
+ verify(mockExecution).setVariable(Prefix + "networkRequest", expectedNetworkRequestMissingCloudRegion)
+ verify(mockExecution).setVariable(Prefix + "rollbackEnabled", false)
+
+ verify(mockExecution).setVariable(Prefix + "networkInputs", networkInputsMissingCloudRegion)
+ verify(mockExecution).setVariable(Prefix + "messageId", "7df689f9-7b93-430b-9b9e-28140d70cc7ad")
+ verify(mockExecution).setVariable(Prefix + "lcpCloudRegion", null)
+
+ verify(mockExecution).setVariable("BasicAuthHeaderValuePO","Basic cGFzc3dvcmQ=")
+ verify(mockExecution).setVariable("BasicAuthHeaderValueSDNC", "Basic cGFzc3dvcmQ=")
+
+ }
+
+
+
+ @Test
+ //@Ignore
+ public void prepareNetworkRequest() {
+
+ println "************ prepareNetworkRequest ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedVperNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "queryAAIResponse")).thenReturn(queryAAIResponse)
+ when(mockExecution.getVariable(Prefix + "cloudRegionPo")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(Prefix + "tenantId")).thenReturn("e81d842d3e8b45c5a59f57cd76af3aaf")
+
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable("mso.adapters.network.rest.endpoint")).thenReturn("http://localhost:8090/networks/NetworkAdapter")
+ when(mockExecution.getVariable("msoRequestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("messageId_value")
+ //when(mockExecution.getVariable("URN_?????")).thenReturn("") // notificationUrl, //TODO - is this coming from URN? What variable/value to use?
+ when(mockExecution.getVariable(Prefix + "rollbackEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+
+ DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+ DoDeleteNetworkInstance.prepareNetworkRequest(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable("mso.adapters.network.rest.endpoint", "http://localhost:8090/networks/NetworkAdapter/bdc5efe8-404a-409b-85f6-0dcc9eebae30")
+ //verify(mockExecution).setVariable(Prefix + "deleteNetworkRequest", deleteNetworkRequest)
+ verify(mockExecution).setVariable(Prefix + "deleteNetworkRequest", deleteNetworkRESTRequest)
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareNetworkRequest_AlaCarte() {
+
+ println "************ prepareNetworkRequest ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "queryAAIResponse")).thenReturn(queryAAIResponse)
+ when(mockExecution.getVariable(Prefix + "cloudRegionPo")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(Prefix + "tenantId")).thenReturn("e81d842d3e8b45c5a59f57cd76af3aaf")
+
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable("mso.adapters.network.rest.endpoint")).thenReturn("http://localhost:8090/networks/NetworkAdapter")
+ when(mockExecution.getVariable("msoRequestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("messageId_value")
+ //when(mockExecution.getVariable("URN_?????")).thenReturn("") // notificationUrl, //TODO - is this coming from URN? What variable/value to use?
+ when(mockExecution.getVariable(Prefix + "rollbackEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+
+ DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+ DoDeleteNetworkInstance.prepareNetworkRequest(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable("mso.adapters.network.rest.endpoint", "http://localhost:8090/networks/NetworkAdapter/bdc5efe8-404a-409b-85f6-0dcc9eebae30")
+ //verify(mockExecution).setVariable(Prefix + "deleteNetworkRequest", deleteNetworkRequest)
+ verify(mockExecution).setVariable("mso-request-id", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ verify(mockExecution).setVariable(Prefix + "deleteNetworkRequest", deleteNetworkRESTRequestAlaCarte)
+
+ }
+
+ @Test
+ //@Ignore
+ public void sendRequestToVnfAdapter() {
+
+ println "************ sendRequestToVnfAdapter ************* "
+
+ WireMock.reset();
+ MockNetworkAdapter("bdc5efe8-404a-409b-85f6-0dcc9eebae30", 200, "deleteNetworkResponse_Success.xml");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "deleteNetworkRequest")).thenReturn(deleteNetworkRESTRequest)
+ when(mockExecution.getVariable("mso.adapters.network.rest.endpoint")).thenReturn("http://localhost:8090/networks/NetworkAdapter/bdc5efe8-404a-409b-85f6-0dcc9eebae30")
+ when(mockExecution.getVariable("BasicAuthHeaderValuePO")).thenReturn("3141634BF7E070AA289CF2892C986C0B")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+
+ DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+ DoDeleteNetworkInstance.sendRequestToVnfAdapter(mockExecution)
+
+ verify(mockExecution).setVariable(Prefix + "networkReturnCode", 200)
+ //verify(mockExecution).setVariable(Prefix + "deleteNetworkResponse", deleteNetworkResponse_noRollback)
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void prepareSDNCRequest() {
+
+ println "************ prepareSDNCRequest ************* "
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "cloudRegionSdnc")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(Prefix + "queryAAIResponse")).thenReturn(aaiResponse)
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("testMessageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:8090/SDNCAdapterCallback")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+
+ DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+ DoDeleteNetworkInstance.prepareSDNCRequest(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "deleteSDNCRequest", deleteSDNCRequest)
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareRpcSDNCRequest() {
+
+ println "************ prepareRpcSDNCRequest ************* "
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(inputViprSDC_NetworkRequest)
+ when(mockExecution.getVariable(Prefix + "cloudRegionSdnc")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("msoRequestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("testMessageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56") // test ONLY
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:8090/SDNCAdapterCallback")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+
+ DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+ DoDeleteNetworkInstance.prepareRpcSDNCRequest(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "deleteSDNCRequest", deleteRpcSDNCRequest)
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareRpcSDNCActivateRollback() {
+
+ println "************ prepareRpcSDNCActivateRollback ************* "
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(inputViprSDC_NetworkRequest)
+ when(mockExecution.getVariable(Prefix + "cloudRegionSdnc")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(Prefix + "serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable(Prefix + "networkId")).thenReturn("8abc633a-810b-4ca5-8b3a-09511d13a2ce")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("msoRequestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("testMessageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56") // test ONLY
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:8090/SDNCAdapterCallback")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("GENGSI_siResourceLink")).thenReturn(null)
+ when(mockExecution.getVariable(Prefix + "deactivateSDNCResponse")).thenReturn(sdncAdapterWorkflowFormattedResponse)
+
+ // preProcessRequest(DelegateExecution execution)
+ DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+ DoDeleteNetworkInstance.prepareRpcSDNCDeactivateRollback(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ verify(mockExecution).setVariable("prefix", Prefix)
+ //verify(mockExecution).setVariable("mso-request-id", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ //verify(mockExecution).setVariable(Prefix + "requestId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ //verify(mockExecution).setVariable("mso-service-instance-id", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ verify(mockExecution).setVariable(Prefix + "rollbackDeactivateSDNCRequest", sdncAdapaterDeactivateRollback)
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAI_200() {
+
+ println "************ callRESTQueryAAI ************* "
+
+ WireMock.reset();
+ MockGetNetworkByIdWithDepth("bdc5efe8-404a-409b-85f6-0dcc9eebae30", "DeleteNetworkV2/deleteNetworkAAIResponse_Success.xml", "all");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "networkInputs")).thenReturn(expectedNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ when(mockExecution.getVariable("mso.workflow.default.aai.network.l3-network.uri")).thenReturn("")
+ // old: when(mockExecution.getVariable("mso.workflow.DoDeleteNetworkInstance.aai.network.l3-network.uri")).thenReturn("/aai/v8/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("mso.workflow.DoDeleteNetworkInstance.aai.l3-network.uri")).thenReturn("/aai/v9/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+ DoDeleteNetworkInstance.callRESTQueryAAI(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "queryAAIRequest", "http://localhost:8090/aai/v9/network/l3-networks/l3-network/bdc5efe8-404a-409b-85f6-0dcc9eebae30"+"?depth=all")
+
+ verify(mockExecution).setVariable(Prefix + "aaiReturnCode", "200")
+ //verify(mockExecution).setVariable(Prefix + "queryAAIResponse", aaiResponse)
+ verify(mockExecution).setVariable(Prefix + "isAAIGood", true)
+ verify(mockExecution).setVariable(Prefix + "isVfRelationshipExist", false)
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAI_withRelationship_200() {
+
+ println "************ callRESTQueryAAI ************* "
+
+ WireMock.reset();
+ MockGetNetworkByIdWithDepth("bdc5efe8-404a-409b-85f6-0dcc9eebae30", "DeleteNetworkV2/deleteNetworkAAIResponse_withRelationship_Success.xml", "all");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "networkInputs")).thenReturn(expectedNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ when(mockExecution.getVariable("mso.workflow.default.aai.network.l3-network.uri")).thenReturn("")
+ // old: when(mockExecution.getVariable("mso.workflow.DoDeleteNetworkInstance.aai.network.l3-network.uri")).thenReturn("/aai/v8/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("mso.workflow.DoDeleteNetworkInstance.aai.l3-network.uri")).thenReturn("/aai/v9/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+ DoDeleteNetworkInstance.callRESTQueryAAI(mockExecution)
+
+ verify(mockExecution, atLeast(1)).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "queryAAIRequest", "http://localhost:8090/aai/v9/network/l3-networks/l3-network/bdc5efe8-404a-409b-85f6-0dcc9eebae30"+"?depth=all")
+
+ verify(mockExecution).setVariable(Prefix + "aaiReturnCode", "200")
+ //verify(mockExecution).setVariable(Prefix + "queryAAIResponse", aaiResponseWithRelationship)
+ verify(mockExecution).setVariable(Prefix + "isAAIGood", true)
+ verify(mockExecution).setVariable(Prefix + "isVfRelationshipExist", true)
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAI_200_DefaultUri() {
+
+ println "************ callRESTQueryAAI ************* "
+
+ WireMock.reset();
+ MockGetNetworkByIdWithDepth("bdc5efe8-404a-409b-85f6-0dcc9eebae30", "DeleteNetworkV2/deleteNetworkAAIResponse_Success.xml", "all");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "networkInputs")).thenReturn(expectedNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ // old: when(mockExecution.getVariable("mso.workflow.default.aai.network.l3-network.uri")).thenReturn("/aai/v8/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.l3-network.uri")).thenReturn("/aai/v9/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+ DoDeleteNetworkInstance.callRESTQueryAAI(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "queryAAIRequest", "http://localhost:8090/aai/v9/network/l3-networks/l3-network/bdc5efe8-404a-409b-85f6-0dcc9eebae30"+ "?depth=all")
+
+ verify(mockExecution).setVariable(Prefix + "aaiReturnCode", "200")
+ //verify(mockExecution).setVariable(Prefix + "queryAAIResponse", aaiResponse)
+ verify(mockExecution).setVariable(Prefix + "isAAIGood", true)
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAICloudRegion30_200() {
+
+ println "************ callRESTQueryAAICloudRegion30_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkCloudRegion("DeleteNetworkV2/cloudRegion30_AAIResponse_Success.xml", "RDM2WAGPLCP");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix)
+ when(mockExecution.getVariable(Prefix + "networkInputs")).thenReturn(expectedNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "lcpCloudRegion")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ // old: when(mockExecution.getVariable("mso.workflow.default.aai.cloud-infrastructure.cloud-region.uri")).thenReturn("/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.cloud-region.uri")).thenReturn("/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+ DoDeleteNetworkInstance.callRESTQueryAAICloudRegion(mockExecution)
+
+ verify(mockExecution, atLeast(1)).setVariable("prefix", Prefix)
+ verify(mockExecution, atLeast(2)).setVariable(Prefix + "queryCloudRegionReturnCode", "200")
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAICloudRegion_NotFound() {
+
+ println "************ callRESTQueryAAICloudRegion_NotFound ************* "
+
+ WireMock.reset();
+ MockGetNetworkCloudRegion_404("MDTWNJ21");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix)
+ when(mockExecution.getVariable(Prefix + "networkInputs")).thenReturn(vnfRequestCloudRegionNotFound)
+ when(mockExecution.getVariable(Prefix + "lcpCloudRegion")).thenReturn("MDTWNJ21")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ // old: when(mockExecution.getVariable("mso.workflow.default.aai.cloud-infrastructure.cloud-region.uri")).thenReturn("/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.cloud-region.uri")).thenReturn("/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+ DoDeleteNetworkInstance.callRESTQueryAAICloudRegion(mockExecution)
+
+ verify(mockExecution, atLeast(1)).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "cloudRegionPo", "MDTWNJ21")
+ verify(mockExecution).setVariable(Prefix + "cloudRegionSdnc", "AAIAIC25")
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAICloudRegion25_200() {
+
+ println "************ callRESTQueryAAICloudRegion25_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkCloudRegion("DeleteNetworkV2/cloudRegion25_AAIResponse_Success.xml", "RDM2WAGPLCP");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix)
+ when(mockExecution.getVariable(Prefix + "networkInputs")).thenReturn(expectedNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "lcpCloudRegion")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ // old: when(mockExecution.getVariable("mso.workflow.default.aai.cloud-infrastructure.cloud-region.uri")).thenReturn("/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.cloud-region.uri")).thenReturn("/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic")
+ //
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+ DoDeleteNetworkInstance.callRESTQueryAAICloudRegion(mockExecution)
+
+ verify(mockExecution, atLeast(1)).setVariable("prefix", Prefix)
+ verify(mockExecution, atLeast(2)).setVariable(Prefix + "queryCloudRegionReturnCode", "200")
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void validateNetworkResponse() {
+
+ println "************ validateNetworkResponse ************* "
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "deleteNetworkResponse")).thenReturn(deleteNetworkResponse)
+ when(mockExecution.getVariable(Prefix + "networkReturnCode")).thenReturn('200')
+
+ DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+ DoDeleteNetworkInstance.validateNetworkResponse(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ //verify(mockExecution).setVariable(Prefix + "rollbackNetworkRequest", null)
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void validateSDNCResponse_200() {
+
+ println "************ validateSDNCResponse ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "sdncReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable("SDNCA_SuccessIndicator")).thenReturn(true)
+
+ DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+ try {
+ DoDeleteNetworkInstance.validateSDNCResponse(mockExecution, sdncAdapterWorkflowResponse)
+ } catch (Exception ex) {
+ println " Graceful Exit - " + ex.getMessage()
+ }
+
+ }
+
+ @Test
+ //@Ignore
+ public void validateSDNCResponse_404() {
+
+ println "************ validateSDNCResponse ************* "
+
+ WorkflowException workflowException = new WorkflowException("DoCreateNetworkInstance", 2500, "Received error from SNDC Adapter: HTTP Status 404.")
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "sdncReturnCode")).thenReturn("404")
+ when(mockExecution.getVariable("SDNCA_SuccessIndicator")).thenReturn(false)
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(workflowException)
+
+ DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+ try {
+ DoDeleteNetworkInstance.validateSDNCResponse(mockExecution)
+ } catch (Exception ex) {
+ println " Graceful Exit - " + ex.getMessage()
+ }
+
+ }
+
+ @Test
+ //@Ignore
+ public void validateRpcSDNCDeactivateResponse() {
+
+ println "************ validateRpcSDNCDeactivateResponse ************* "
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "deactivateSDNCResponse")).thenReturn(sdncAdapterWorkflowResponse)
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix + "")
+ when(mockExecution.getVariable("SDNCA_SuccessIndicator")).thenReturn(true)
+ when(mockExecution.getVariable(Prefix + "deactivateSDNCReturnCode")).thenReturn("200")
+
+ DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+ try {
+ DoDeleteNetworkInstance.validateRpcSDNCDeactivateResponse(mockExecution)
+ verify(mockExecution).setVariable(Prefix + "isSdncDeactivateRollbackNeeded", true)
+
+ } catch (Exception ex) {
+ println " Graceful Exit - " + ex.getMessage()
+ }
+ //MockitoDebuggerImpl debugger = new MockitoDebuggerImpl()
+ //debugger.printInvocations(mockExecution)
+
+ //verify(mockExecution).setVariable(Prefix + "isSdncRollbackNeeded", true)
+
+ }
+
+ @Test
+ @Ignore
+ public void postProcessResponse() {
+
+ println "************ postProcessResponse ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "source")).thenReturn("PORTAL")
+ when(mockExecution.getVariable(Prefix + "isException")).thenReturn(false)
+
+ // postProcessResponse(DelegateExecution execution)
+ DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+ DoDeleteNetworkInstance.postProcessResponse(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "Success", true)
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareRollbackData() {
+
+ println "************ prepareRollbackData() ************* "
+
+
+
+ WorkflowException workflowException = new WorkflowException("DoCreateNetworkInstance", 2500, "Received error from Network Adapter: JBWEB000065: HTTP Status 500.")
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkRequest")).thenReturn(deleteRollbackNetworkRequest)
+ //when(mockExecution.getVariable(Prefix + "rollbackNetworkRequest")).thenReturn(null)
+ //when(mockExecution.getVariable(Prefix + "rollbackNetworkRequest")).thenReturn("")
+ when(mockExecution.getVariable(Prefix + "rollbackDeactivateSDNCRequest")).thenReturn(sdncAdapaterDeactivateRollback)
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(workflowException)
+
+ // preProcessRequest(DelegateExecution execution)
+ DoDeleteNetworkInstance DoDeleteNetworkInstance = new DoDeleteNetworkInstance()
+ DoDeleteNetworkInstance.prepareRollbackData(mockExecution)
+
+// verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ }
+
+
+ private ExecutionEntity setupMock() {
+
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("DoDeleteNetworkInstance")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("DoDeleteNetworkInstance")
+ when(mockRepositoryService.getProcessDefinition().getId()).thenReturn("100")
+ ProcessEngineServices mockProcessEngineServices = mock(ProcessEngineServices.class)
+ when(mockProcessEngineServices.getRepositoryService()).thenReturn(mockRepositoryService)
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+
+ when(mockExecution.getId()).thenReturn("100")
+ when(mockExecution.getProcessDefinitionId()).thenReturn("DoDeleteNetworkInstance")
+ when(mockExecution.getProcessInstanceId()).thenReturn("DoDeleteNetworkInstance")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+
+ return mockExecution
+
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstanceTest.groovy
new file mode 100644
index 0000000000..a8bdfb0633
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstanceTest.groovy
@@ -0,0 +1,127 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.scripts
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+import org.camunda.bpm.engine.ProcessEngineServices
+import org.camunda.bpm.engine.RepositoryService
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.camunda.bpm.engine.repository.ProcessDefinition
+import org.junit.Assert
+import org.junit.Before
+import org.junit.Ignore
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.ArgumentCaptor
+import org.mockito.Captor
+import org.mockito.Mockito
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.mock.FileUtil
+import org.onap.so.bpmn.vcpe.scripts.GroovyTestBase
+
+import static com.github.tomakehurst.wiremock.client.WireMock.*
+import static org.mockito.Mockito.*
+
+@RunWith(MockitoJUnitRunner.class)
+class DoDeleteServiceInstanceTest {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(28090)
+
+ @Captor
+ static ArgumentCaptor<ExecutionEntity> captor = ArgumentCaptor.forClass(ExecutionEntity.class)
+
+ @Before
+ void init() throws IOException {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @Test
+ public void preProcessRequestTest() {
+
+ ExecutionEntity mex = setupMock()
+ when(mex.getVariable(GroovyTestBase.DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("serviceInstanceId")).thenReturn("e151059a-d924-4629-845f-264db19e50b4")
+ when(mex.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("/mso/sdncadapter/")
+ when(mex.getVariable("globalSubscriberId")).thenReturn("4993921112123")
+
+ DoDeleteServiceInstance instance = new DoDeleteServiceInstance()
+ instance.preProcessRequest(mex)
+
+ Mockito.verify(mex).setVariable("sdncCallbackUrl", "/mso/sdncadapter/")
+ Mockito.verify(mex).setVariable("siParamsXml", "")
+ }
+
+
+ @Test
+ public void testPostProcessAAIGET() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn('http://localhost:8090')
+ when(mockExecution.getVariable("GENGS_FoundIndicator")).thenReturn(true)
+ when(mockExecution.getVariable("sdnc.si.svc.types")).thenReturn("")
+ when(mockExecution.getVariable("globalSubscriberId")).thenReturn("globalSubscriberId_test")
+ when(mockExecution.getVariable("subscriptionServiceType")).thenReturn("subscriptionServiceType_test")
+
+ String aaiGetResponse = FileUtil.readResourceFile("__files/GenericFlows/aaiGetResponse.xml")
+ when(mockExecution.getVariable("GENGS_service")).thenReturn(aaiGetResponse)
+ when(mockExecution.getVariable("GENGS_siResourceLink")).thenReturn("/aai/v8/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn('8')
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+
+ mockData()
+ DoDeleteServiceInstance instance = new DoDeleteServiceInstance()
+ instance.postProcessAAIGET(mockExecution)
+
+ Mockito.verify(mockExecution).setVariable("sendToSDNC", true)
+ }
+
+ private static ExecutionEntity setupMock() {
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("DoDeleteServiceInstance")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("DoDeleteServiceInstance")
+ when(mockRepositoryService.getProcessDefinition().getId()).thenReturn("100")
+ ProcessEngineServices mockProcessEngineServices = mock(ProcessEngineServices.class)
+ when(mockProcessEngineServices.getRepositoryService()).thenReturn(mockRepositoryService)
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getId()).thenReturn("100")
+ when(mockExecution.getProcessDefinitionId()).thenReturn("DoDeleteServiceInstance")
+ when(mockExecution.getProcessInstanceId()).thenReturn("DoDeleteServiceInstance")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+
+ return mockExecution
+ }
+
+ private void mockData() {
+ stubFor(get(urlMatching(".*/aai/v[0-9]+/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/.*"))
+ .willReturn(aResponse()
+ .withStatus(200).withHeader("Content-Type", "text/xml")
+ .withBodyFile("")))
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnfTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnfTest.groovy
new file mode 100644
index 0000000000..fcb0fb0940
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnfTest.groovy
@@ -0,0 +1,172 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.scripts
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+import org.camunda.bpm.engine.ProcessEngineServices
+import org.camunda.bpm.engine.RepositoryService
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.camunda.bpm.engine.repository.ProcessDefinition
+import org.junit.Assert
+import org.junit.Before
+import org.junit.Ignore
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.ArgumentCaptor
+import org.mockito.Captor
+import org.mockito.Mockito
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+import org.onap.so.bpmn.core.WorkflowException
+
+import static com.github.tomakehurst.wiremock.client.WireMock.*
+import static org.mockito.Mockito.*
+
+@RunWith(MockitoJUnitRunner.class)
+class DoDeleteVfModuleFromVnfTest {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(28090);
+
+ @Captor
+ static ArgumentCaptor<ExecutionEntity> captor = ArgumentCaptor.forClass(ExecutionEntity.class)
+
+ @Before
+ public void init() throws IOException {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @Test
+ public void testPreProcessRequest() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("msoRequestId")).thenReturn("12345")
+ when(mockExecution.getVariable("source")).thenReturn("VID")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("12345")
+ when(mockExecution.getVariable("vnfId")).thenReturn("12345")
+ when(mockExecution.getVariable("tenantId")).thenReturn("19123c2924c648eb8e42a3c1f14b7682")
+ when(mockExecution.getVariable("vfModuleId")).thenReturn("12345")
+ when(mockExecution.getVariable("lcpCloudRegionId")).thenReturn("12345")
+ when(mockExecution.getVariable("sdncVersion")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:8090/SDNCAdapterCallback")
+
+ DoDeleteVfModuleFromVnf obj = new DoDeleteVfModuleFromVnf()
+ obj.preProcessRequest(mockExecution)
+
+ Mockito.verify(mockExecution).setVariable("prefix", "DDVFMV_")
+ Mockito.verify(mockExecution).setVariable("DDVFMV_contrailNetworkPolicyFqdnList", null)
+ Mockito.verify(mockExecution).setVariable("mso-request-id", "12345")
+ Mockito.verify(mockExecution).setVariable("requestId", "12345")
+ Mockito.verify(mockExecution).setVariable("cloudSiteId", "12345")
+ Mockito.verify(mockExecution).setVariable("source", "VID")
+ Mockito.verify(mockExecution).setVariable("isVidRequest", "true")
+ Mockito.verify(mockExecution).setVariable("srvInstId", "")
+ Mockito.verify(mockExecution).setVariable("DDVFMV_serviceInstanceIdToSdnc", "12345")
+ Mockito.verify(mockExecution).setVariable("DDVFMV_sdncVersion", "8")
+ Mockito.verify(mockExecution).setVariable("sdncCallbackUrl", "http://localhost:8090/SDNCAdapterCallback")
+ }
+
+
+
+ @Test
+ void testDeleteNetworkPoliciesFromAAI() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.DoDeleteVfModuleFromVnf.aai.network-policy.uri")).thenReturn("/aai/v8/network/network-policies/network-policy")
+ when(mockExecution.getVariable("mso.workflow.custom.DoDeleteVfModuleFromVnf.aai.version")).thenReturn("8")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
+ List fqdnList = new ArrayList()
+ fqdnList.add("test")
+ when(mockExecution.getVariable("DDVFMV_contrailNetworkPolicyFqdnList")).thenReturn(fqdnList)
+ mockData()
+ DoDeleteVfModuleFromVnf obj = new DoDeleteVfModuleFromVnf()
+ obj.deleteNetworkPoliciesFromAAI(mockExecution)
+
+ Mockito.verify(mockExecution).setVariable("prefix", 'DDVFMV_')
+ Mockito.verify(mockExecution).setVariable("DCVFM_aaiQueryNetworkPolicyByFqdnReturnCode", 200)
+ }
+
+
+ @Test
+ void testQueryAAIForVfModule() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("vnfId")).thenReturn("12345")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("mso.workflow.global.default.aai.namespace")
+ when(mockExecution.getVariable("mso.workflow.default.aai.generic-vnf.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.generic-vnf.uri")).thenReturn("/aai/v8/network/generic-vnfs/generic-vnf")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ mockData()
+ DoDeleteVfModuleFromVnf obj = new DoDeleteVfModuleFromVnf()
+ obj.queryAAIForVfModule(mockExecution)
+
+ Mockito.verify(mockExecution, atLeastOnce()).setVariable("DDVMFV_getVnfResponseCode", 200)
+ }
+
+
+
+ private ExecutionEntity setupMock() {
+
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("DoDeleteVfModuleFromVnf")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("DoDeleteVfModuleFromVnf")
+ when(mockRepositoryService.getProcessDefinition().getId()).thenReturn("100")
+ ProcessEngineServices mockProcessEngineServices = mock(ProcessEngineServices.class)
+ when(mockProcessEngineServices.getRepositoryService()).thenReturn(mockRepositoryService)
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+
+ when(mockExecution.getId()).thenReturn("100")
+ when(mockExecution.getProcessDefinitionId()).thenReturn("DoDeleteVfModuleFromVnf")
+ when(mockExecution.getProcessInstanceId()).thenReturn("DoDeleteVfModuleFromVnf")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+
+ return mockExecution
+
+ }
+
+ private static void mockData() {
+ stubFor(get(urlMatching(".*/aai/v[0-9]+/network/generic-vnfs/generic-vnf/12345[?]depth=1"))
+ .willReturn(aResponse()
+ .withStatus(200).withHeader("Content-Type", "text/xml")
+ .withBodyFile("VfModularity/GenerateVfModuleName_AAIResponse_Success.xml")))
+
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/network-policies/network-policy\\?network-policy-fqdn=.*"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("VfModularity/QueryNetworkPolicy_AAIResponse_Success.xml")))
+
+ stubFor(delete(urlMatching("/aai/v[0-9]+/network/network-policies/network-policy/.*"))
+ .willReturn(aResponse()
+ .withStatus(200)));
+
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleTest.groovy
new file mode 100644
index 0000000000..3390b1a6f0
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleTest.groovy
@@ -0,0 +1,163 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.scripts
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+import org.camunda.bpm.engine.ProcessEngineServices
+import org.camunda.bpm.engine.RepositoryService
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.camunda.bpm.engine.repository.ProcessDefinition
+import org.junit.Assert
+import org.junit.Before
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.ArgumentCaptor
+import org.mockito.Captor
+import org.mockito.Mockito
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+import org.onap.so.bpmn.common.scripts.utils.XmlComparator
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.mock.FileUtil
+
+import static com.github.tomakehurst.wiremock.client.WireMock.*
+import static org.mockito.Mockito.*
+
+@RunWith(MockitoJUnitRunner.class)
+class DoDeleteVfModuleTest {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(28090);
+
+ @Captor
+ static ArgumentCaptor<ExecutionEntity> captor = ArgumentCaptor.forClass(ExecutionEntity.class)
+
+ @Before
+ public void init() throws IOException {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @Test
+ public void testPrepSDNCAdapterRequest() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("testReqId")).thenReturn("testReqId")
+ when(mockExecution.getVariable("requestId")).thenReturn("12345")
+ when(mockExecution.getVariable("source")).thenReturn("VID")
+ when(mockExecution.getVariable("serviceId")).thenReturn("12345")
+ when(mockExecution.getVariable("vnfId")).thenReturn("12345")
+ when(mockExecution.getVariable("tenantId")).thenReturn("19123c2924c648eb8e42a3c1f14b7682")
+ when(mockExecution.getVariable("vfModuleId")).thenReturn("12345")
+ when(mockExecution.getVariable("DoDVfMod_serviceInstanceIdToSdnc")).thenReturn("123456789")
+ when(mockExecution.getVariable("vfModuleName")).thenReturn("vfModuleName_test")
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:8090/SDNCAdapterCallback")
+
+ DoDeleteVfModule obj = new DoDeleteVfModule()
+ obj.prepSDNCAdapterRequest(mockExecution, 'release')
+
+ String expectedValue = FileUtil.readResourceFile("__files/DoDeleteVfModule/sdncAdapterWorkflowRequest.xml")
+ Mockito.verify(mockExecution, times(1)).setVariable(captor.capture(), captor.capture())
+ XmlComparator.assertXMLEquals(expectedValue, captor.getValue())
+ }
+
+
+ @Test
+ void testDeleteNetworkPoliciesFromAAI() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.DoDeleteVfModule.aai.network-policy.uri")).thenReturn("/aai/v8/network/network-policies/network-policy")
+ when(mockExecution.getVariable("mso.workflow.custom.DoDeleteVfModule.aai.version")).thenReturn("8")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
+ List fqdnList = new ArrayList()
+ fqdnList.add("test")
+ when(mockExecution.getVariable("DoDVfMod_contrailNetworkPolicyFqdnList")).thenReturn(fqdnList)
+ mockData()
+ DoDeleteVfModule obj = new DoDeleteVfModule()
+ obj.deleteNetworkPoliciesFromAAI(mockExecution)
+
+ Mockito.verify(mockExecution).setVariable("DCVFM_aaiQueryNetworkPolicyByFqdnReturnCode", 200)
+ }
+
+
+ @Test
+ void testQueryAAIVfModuleForStatus() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("DCVFM_vnfId")).thenReturn("12345")
+ when(mockExecution.getVariable("DCVFM_vfModuleName")).thenReturn("module-0")
+ when(mockExecution.getVariable("mso.workflow.DoDeleteVfModule.aai.generic-vnf.uri")).thenReturn("/aai/v9/network/generic-vnfs/generic-vnf")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
+
+ mockData()
+ DoCreateVfModule obj = new DoCreateVfModule()
+ obj.queryAAIVfModuleForStatus(mockExecution)
+
+ Mockito.verify(mockExecution).setVariable("DCVFM_queryAAIVfModuleForStatusResponseCode", 200)
+ }
+
+
+
+ private ExecutionEntity setupMock() {
+
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("DoDeleteVfModule")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("DoDeleteVfModule")
+ when(mockRepositoryService.getProcessDefinition().getId()).thenReturn("100")
+ ProcessEngineServices mockProcessEngineServices = mock(ProcessEngineServices.class)
+ when(mockProcessEngineServices.getRepositoryService()).thenReturn(mockRepositoryService)
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+
+ when(mockExecution.getId()).thenReturn("100")
+ when(mockExecution.getProcessDefinitionId()).thenReturn("DoDeleteVfModule")
+ when(mockExecution.getProcessInstanceId()).thenReturn("DoDeleteVfModule")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+
+ return mockExecution
+
+ }
+
+ private static void mockData() {
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/network-policies/network-policy\\?network-policy-fqdn=.*"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("VfModularity/QueryNetworkPolicy_AAIResponse_Success.xml")))
+
+ stubFor(delete(urlMatching("/aai/v[0-9]+/network/network-policies/network-policy/.*"))
+ .willReturn(aResponse()
+ .withStatus(200)))
+
+ stubFor(get(urlMatching(".*/aai/v[0-9]+/network/generic-vnfs/generic-vnf/12345/vf-modules/vf-module[?]vf-module-name=module-0"))
+ .willReturn(aResponse()
+ .withStatus(200).withHeader("Content-Type", "text/xml")
+ .withBodyFile("DoDeleteVfModule/getGenericVnfResponse.xml")))
+
+ }
+}
+
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleVolumeV2Test.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleVolumeV2Test.groovy
new file mode 100644
index 0000000000..730be14df0
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleVolumeV2Test.groovy
@@ -0,0 +1,152 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.scripts
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+import org.camunda.bpm.engine.ProcessEngineServices
+import org.camunda.bpm.engine.RepositoryService
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.camunda.bpm.engine.repository.ProcessDefinition
+import org.junit.Assert
+import org.junit.Before
+import org.junit.Ignore
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.ArgumentCaptor
+import org.mockito.Captor
+import org.mockito.Mockito
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+import org.onap.so.bpmn.common.scripts.utils.XmlComparator
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.mock.FileUtil
+
+import static com.github.tomakehurst.wiremock.client.WireMock.*
+import static org.mockito.Mockito.*
+
+@RunWith(MockitoJUnitRunner.class)
+class DoDeleteVfModuleVolumeV2Test {
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(28090);
+
+ @Captor
+ static ArgumentCaptor<ExecutionEntity> captor = ArgumentCaptor.forClass(ExecutionEntity.class)
+
+ @Before
+ public void init() throws IOException {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @Test
+ public void testCallRESTQueryAAICloudRegion() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn("DDVMV_")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("lcpCloudRegionId")).thenReturn("12345")
+ when(mockExecution.getVariable("mso.workflow.DoDeleteVfModuleVolumeV2.aai.cloud-region.uri")).thenReturn("/aai/v8/cloud-infrastructure/cloud-regions/cloud-region")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
+
+ mockData()
+ DoDeleteVfModuleVolumeV2 obj = new DoDeleteVfModuleVolumeV2()
+ obj.callRESTQueryAAICloudRegion(mockExecution, "true")
+ Mockito.verify(mockExecution).setVariable("DDVMV_queryCloudRegionReturnCode", "200")
+ Mockito.verify(mockExecution).setVariable("DDVMV_aicCloudRegion", "RDM2WAGPLCP")
+ }
+
+ @Test
+ public void testCallRESTQueryAAICloudRegionAAiEndpointNull() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn("DDVMV_")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("lcpCloudRegionId")).thenReturn("12345")
+ when(mockExecution.getVariable("mso.workflow.DoDeleteVfModuleVolumeV2.aai.cloud-region.uri")).thenReturn("/aai/v8/cloud-infrastructure/cloud-regions/cloud-region")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn(null)
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
+
+ mockData()
+ try {
+ DoDeleteVfModuleVolumeV2 obj = new DoDeleteVfModuleVolumeV2()
+ obj.callRESTQueryAAICloudRegion(mockExecution, "true")
+
+ } catch (Exception ex) {
+ println " Test End - Handle catch-throw BpmnError()! "
+ }
+ Mockito.verify(mockExecution,atLeastOnce()).setVariable(captor.capture(),captor.capture())
+ WorkflowException workflowException = captor.getValue()
+ Assert.assertEquals(9999, workflowException.getErrorCode())
+ }
+
+ @Test
+ public void testPrepareVnfAdapterDeleteRequest() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn("DDVMV_")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("aicCloudRegion")).thenReturn("RegionOne")
+ when(mockExecution.getVariable("tenantId")).thenReturn("12345")
+ when(mockExecution.getVariable("volumeGroupId")).thenReturn("12345")
+ when(mockExecution.getVariable("volumeGroupHeatStackId")).thenReturn("12345")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("12345")
+ when(mockExecution.getVariable("msoRequestId")).thenReturn("12345")
+ when(mockExecution.getVariable("mso.use.qualified.host")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.message.endpoint")).thenReturn("http://localhost:18080/mso/WorkflowMessage")
+
+ DoDeleteVfModuleVolumeV2 obj = new DoDeleteVfModuleVolumeV2()
+ obj.prepareVnfAdapterDeleteRequest(mockExecution, "true")
+
+ Mockito.verify(mockExecution, times(1)).setVariable(captor.capture(), captor.capture())
+ String str = FileUtil.readResourceFile("__files/DoCreateVfModuleVolumeV2/vnfAdapterDeleteRequest.xml")
+ XmlComparator.assertXMLEquals(str, captor.getValue(),"messageId","notificationUrl")
+ }
+
+
+ private ExecutionEntity setupMock() {
+
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("DoDeleteVfModuleVolumeV2")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("DoDeleteVfModuleVolumeV2")
+ when(mockRepositoryService.getProcessDefinition().getId()).thenReturn("100")
+ ProcessEngineServices mockProcessEngineServices = mock(ProcessEngineServices.class)
+ when(mockProcessEngineServices.getRepositoryService()).thenReturn(mockRepositoryService)
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+
+ when(mockExecution.getId()).thenReturn("100")
+ when(mockExecution.getProcessDefinitionId()).thenReturn("DoDeleteVfModuleVolumeV2")
+ when(mockExecution.getProcessInstanceId()).thenReturn("DoDeleteVfModuleVolumeV2")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+
+ return mockExecution
+
+ }
+
+ private void mockData() {
+ stubFor(get(urlMatching(".*/aai/v[0-9]+/cloud-infrastructure/cloud-regions/cloud-region/12345"))
+ .willReturn(aResponse()
+ .withStatus(200).withHeader("Content-Type", "text/xml")
+ .withBodyFile("DoCreateVfModuleVolumeV2/cloudRegion_AAIResponse_Success.xml")))
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnfAndModulesTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnfAndModulesTest.groovy
new file mode 100644
index 0000000000..0b95ffc053
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnfAndModulesTest.groovy
@@ -0,0 +1,162 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.scripts
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+import org.camunda.bpm.engine.ProcessEngineServices
+import org.camunda.bpm.engine.RepositoryService
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.camunda.bpm.engine.repository.ProcessDefinition
+import org.junit.Assert
+import org.junit.Before
+import org.junit.Ignore
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.ArgumentCaptor
+import org.mockito.Captor
+import org.mockito.Mockito
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+import org.onap.so.bpmn.core.WorkflowException
+
+import static com.github.tomakehurst.wiremock.client.WireMock.*
+import static org.mockito.Mockito.*
+
+@RunWith(MockitoJUnitRunner.class)
+public class DoDeleteVnfAndModulesTest {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(28090);
+
+ @Captor
+ static ArgumentCaptor<ExecutionEntity> captor = ArgumentCaptor.forClass(ExecutionEntity.class)
+
+ String cloudConfiguration = "{ " +
+ "\"lcpCloudRegionId\": \"mdt1\"," +
+ "\"tenantId\": \"88a6ca3ee0394ade9403f075db23167e\"" + "}";
+
+ @Before
+ public void init() throws IOException {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @Test
+ public void testPreProcessRequestTest() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("cloudConfiguration")).thenReturn(cloudConfiguration)
+ when(mockExecution.getVariable("msoRequestId")).thenReturn("12345")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("serviceInstanceId")
+ when(mockExecution.getVariable("sdncVersion")).thenReturn("1702")
+ when(mockExecution.getVariable("productFamilyId")).thenReturn("productFamilyId")
+ when(mockExecution.getVariable("lcpCloudRegionId")).thenReturn("mdt1")
+ when(mockExecution.getVariable("tenantId")).thenReturn("19123c2924c648eb8e42a3c1f14b7682")
+ when(mockExecution.getVariable("globalSubscriberId")).thenReturn("MSO_test")
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:8090/SDNCAdapterCallback")
+
+ DoDeleteVnfAndModules obj = new DoDeleteVnfAndModules()
+ obj.preProcessRequest(mockExecution)
+
+ Mockito.verify(mockExecution).setVariable("prefix", "DDVAM_")
+ Mockito.verify(mockExecution).setVariable("requestId", "12345")
+ Mockito.verify(mockExecution).setVariable("mso-request-id", "12345")
+ Mockito.verify(mockExecution).setVariable("DDVAM_source", "VID")
+ Mockito.verify(mockExecution).setVariable("DDVAM_isVidRequest", "true")
+ Mockito.verify(mockExecution).setVariable("DDVAM_sdncVersion", "1702")
+ Mockito.verify(mockExecution).setVariable("DDVAM_isVidRequest", "true")
+ Mockito.verify(mockExecution).setVariable("sdncCallbackUrl", "http://localhost:8090/SDNCAdapterCallback")
+ }
+
+
+
+ @Test
+ public void testQueryAAIVfModuleNullEndPoint() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("vnfId")).thenReturn("12345")
+ when(mockExecution.getVariable("mso.workflow.DoDeleteVnfAndModules.aai.generic-vnf.uri")).thenReturn("/aai/v8/network/generic-vnfs/generic-vnf")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn(null)
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
+
+ mockData()
+ try {
+ DoDeleteVnfAndModules obj = new DoDeleteVnfAndModules()
+ obj.queryAAIVfModule(mockExecution)
+ } catch (Exception ex) {
+ println " Test End - Handle catch-throw BpmnError()! "
+ }
+
+ Mockito.verify(mockExecution,atLeastOnce()).setVariable(captor.capture(),captor.capture())
+ WorkflowException workflowException = captor.getValue()
+ Assert.assertEquals("AAI GET Failed:null", workflowException.getErrorMessage())
+ Assert.assertEquals(1002, workflowException.getErrorCode())
+ }
+
+ @Test
+ public void testQueryAAIVfModule() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("vnfId")).thenReturn("12345")
+ when(mockExecution.getVariable("mso.workflow.DoDeleteVnfAndModules.aai.generic-vnf.uri")).thenReturn("/aai/v8/network/generic-vnfs/generic-vnf")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
+
+ mockData()
+ DoDeleteVnfAndModules obj = new DoDeleteVnfAndModules()
+ obj.queryAAIVfModule(mockExecution)
+
+ Mockito.verify(mockExecution).setVariable("DCVFM_queryAAIVfModuleResponseCode", 200)
+ }
+
+ private ExecutionEntity setupMock() {
+
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("DoDeleteVnfAndModules")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("DoDeleteVnfAndModules")
+ when(mockRepositoryService.getProcessDefinition().getId()).thenReturn("100")
+ ProcessEngineServices mockProcessEngineServices = mock(ProcessEngineServices.class)
+ when(mockProcessEngineServices.getRepositoryService()).thenReturn(mockRepositoryService)
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+
+ when(mockExecution.getId()).thenReturn("100")
+ when(mockExecution.getProcessDefinitionId()).thenReturn("DoDeleteVnfAndModules")
+ when(mockExecution.getProcessInstanceId()).thenReturn("DoDeleteVnfAndModules")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+
+ return mockExecution
+
+ }
+
+ private void mockData() {
+
+ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/12345[?]depth=1"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("GenericFlows/getGenericVnfResponse_hasRelationships.xml")));
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoScaleE2EServiceInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoScaleE2EServiceInstanceTest.groovy
new file mode 100644
index 0000000000..4e993525f9
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoScaleE2EServiceInstanceTest.groovy
@@ -0,0 +1,110 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 CMCC All rights reserved. *
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.so.bpmn.infrastructure.scripts
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.junit.Before
+import org.junit.BeforeClass
+import org.junit.Rule
+import org.junit.Test
+import org.mockito.MockitoAnnotations
+import org.onap.so.bpmn.mock.FileUtil
+import org.onap.so.bpmn.vcpe.scripts.GroovyTestBase
+
+import static org.mockito.Mockito.verify
+import static org.mockito.Mockito.when
+
+class DoScaleE2EServiceInstanceTest extends GroovyTestBase {
+
+ private static String request
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(GroovyTestBase.PORT)
+
+ String Prefix = "CVRCS_"
+
+ @BeforeClass
+ public static void setUpBeforeClass() {
+ request = FileUtil.readResourceFile("__files/InfrastructureFlows/DoScaleE2EServiceInstance.json")
+ }
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+ public DoScaleE2EServiceInstanceTest(){
+ super("DoScaleE2EServiceInstance")
+ }
+
+ @Test
+ public void preProcessRequestTest(){
+
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+
+ DoScaleE2EServiceInstance instance = new DoScaleE2EServiceInstance()
+ instance.preProcessRequest(mex)
+ verify(mex).setVariable("resourceTemplateUUIDs", "ns111:ns333:")
+ }
+
+ @Test
+ public void preInitResourcesOperStatusTest(){
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+ DoScaleE2EServiceInstance instance = new DoScaleE2EServiceInstance()
+ instance.preInitResourcesOperStatus(mex)
+
+ verify(mex).setVariable("serviceInstanceId","e151059a-d924-4629-845f-264db19e50b4")
+ verify(mex).setVariable("operationId", "59960003992")
+ verify(mex).setVariable("operationType", "SCALE")
+ verify(mex).setVariable("URN_mso_openecomp_adapters_db_endpoint","http://mso.mso.testlab.openecomp.org:8080/dbadapters/RequestsDbAdapter")
+
+ String payload =
+ """<soapenv:Envelope xmlns:ns="http://org.onap.so/requestsdb"
+ xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:initResourceOperationStatus>
+ <serviceId>e151059a-d924-4629-845f-264db19e50b4</serviceId>
+ <operationId>59960003992</operationId>
+ <operationType>SCALE</operationType>
+ <resourceTemplateUUIDs>ns111:ns333:</resourceTemplateUUIDs>
+ </ns:initResourceOperationStatus>
+ </soapenv:Body>
+</soapenv:Envelope>"""
+ verify(mex).setVariable("CVFMI_initResOperStatusRequest", payload)
+ }
+
+ private void initPreProcess(ExecutionEntity mex) {
+ when(mex.getVariable(GroovyTestBase.DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("bpmnRequest")).thenReturn(request)
+ when(mex.getVariable("msoRequestId")).thenReturn("mri")
+ when(mex.getVariable("serviceType")).thenReturn("VoLTE")
+ when(mex.getVariable("serviceInstanceId")).thenReturn("e151059a-d924-4629-845f-264db19e50b4")
+ when(mex.getVariable("serviceInstanceName")).thenReturn("ra")
+ when(mex.getVariable("operationId")).thenReturn("59960003992")
+ when(mex.getVariable("globalSubscriberId")).thenReturn("4993921112123")
+ when(mex.getVariable("resourceTemplateUUIDs")).thenReturn("ns111:ns333:")
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceRollbackTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceRollbackTest.groovy
new file mode 100644
index 0000000000..0189d065df
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceRollbackTest.groovy
@@ -0,0 +1,332 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.scripts
+
+import static org.mockito.Mockito.*
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.ProcessEngineServices
+import org.camunda.bpm.engine.RepositoryService
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.camunda.bpm.engine.repository.ProcessDefinition
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.core.WorkflowException
+import org.junit.Before
+import org.junit.Rule;
+import org.junit.Test
+import org.junit.Ignore
+import org.junit.runner.RunWith
+
+import static org.junit.Assert.*;
+
+import com.github.tomakehurst.wiremock.client.WireMock;
+import com.github.tomakehurst.wiremock.junit.WireMockRule;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+import org.apache.commons.lang3.*
+
+
+@RunWith(MockitoJUnitRunner.class)
+class DoUpdateNetworkInstanceRollbackTest {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(28090);
+
+ def utils = new MsoUtils()
+ String Prefix="UPDNETIR_"
+
+
+ String rollbackNetworkRequest =
+ """<NetworkAdapter:rollbackNetwork xmlns:NetworkAdapter="http://org.onap.so/network">
+ <rollback>
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <networkStackId/>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <networkCreated>true</networkCreated>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <msoRequest>
+ <requestId>1ef47428-cade-45bd-a103-0751e8b2deb0</requestId>
+ <serviceInstanceId/>
+ </msoRequest>
+ </rollback>
+</NetworkAdapter:rollbackNetwork>"""
+
+ String rollbackActivateSDNCRequest =
+ """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>rollback</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <aetgt:SDNCRequestData>
+ <request-information>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <request-action>CreateNetworkInstance</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <service-type>MSO-dev-service-type</service-type>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <subscriber-name>MSO_1610_dev</subscriber-name>
+ </service-information>
+ <network-information>
+ <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <onap-model-information>
+ <model-invariant-uuid>invariant-uuid</model-invariant-uuid>
+ <model-customization-uuid>customization-uuid</model-customization-uuid>
+ <model-uuid>uuid</model-uuid>
+ <model-version>version</model-version>
+ <model-name>CONTRAIL_EXTERNAL</model-name>
+ </onap-model-information>
+ </network-information>
+ <network-request-information>
+ <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <tenant>7dd5365547234ee8937416c65507d266</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ </network-request-information>
+ </aetgt:SDNCRequestData>
+</aetgt:SDNCAdapterWorkflowRequest>"""
+
+ String rollbackSDNCRequest =
+ """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>rollback</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <aetgt:SDNCRequestData>
+ <request-information>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <request-action>CreateNetworkInstance</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <service-type>MSO-dev-service-type</service-type>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <subscriber-name>MSO_1610_dev</subscriber-name>
+ </service-information>
+ <network-information>
+ <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <onap-model-information>
+ <model-invariant-uuid>invariant-uuid</model-invariant-uuid>
+ <model-customization-uuid>customization-uuid</model-customization-uuid>
+ <model-uuid>uuid</model-uuid>
+ <model-version>version</model-version>
+ <model-name>CONTRAIL_EXTERNAL</model-name>
+ </onap-model-information>
+ </network-information>
+ <network-request-information>
+ <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <tenant>7dd5365547234ee8937416c65507d266</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ </network-request-information>
+ </aetgt:SDNCRequestData>
+</aetgt:SDNCAdapterWorkflowRequest>"""
+
+// - - - - - - - -
+
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ public void initializeVariables (DelegateExecution mockExecution) {
+
+ verify(mockExecution).setVariable(Prefix + "rollbackNetworkRequest", null)
+ verify(mockExecution).setVariable(Prefix + "rollbackSDNCRequest", null)
+ verify(mockExecution).setVariable(Prefix + "WorkflowException", null)
+
+ verify(mockExecution).setVariable(Prefix + "rollbackNetworkRequest", "")
+ verify(mockExecution).setVariable(Prefix + "rollbackNetworkResponse", "")
+ verify(mockExecution).setVariable(Prefix + "rollbackNetworkReturnCode", "")
+
+ verify(mockExecution).setVariable(Prefix + "rollbackSDNCRequest", "")
+ verify(mockExecution).setVariable(Prefix + "rollbackSDNCResponse", "")
+ verify(mockExecution).setVariable(Prefix + "rollbackSDNCReturnCode", "")
+
+ verify(mockExecution).setVariable(Prefix + "Success", false)
+ verify(mockExecution).setVariable(Prefix + "fullRollback", false)
+
+
+ }
+
+ @Test
+ //@Ignore
+ public void preProcessRequest() {
+
+ println "************ preProcessRequest ************* "
+
+ WorkflowException workflowException = new WorkflowException("DoUpdateNetworkInstanceRollback", 2500, "Received error from Network Adapter: JBWEB000065: HTTP Status 500.")
+ Map<String, String> rollbackData = new HashMap<String, String>();
+ rollbackData.put("rollbackSDNCRequest", rollbackSDNCRequest)
+ rollbackData.put("rollbackNetworkRequest", rollbackNetworkRequest)
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix + "")
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(workflowException)
+ when(mockExecution.getVariable("rollbackData")).thenReturn(rollbackData)
+ when(mockExecution.getVariable("sdncVersion")).thenReturn("1610")
+ when(mockExecution.getVariable("mso.adapters.po.auth")).thenReturn("3141634BF7E070AA289CF2892C986C0B")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ when(mockExecution.getVariable("mso.adapters.sdnc.endpoint")).thenReturn("http://localhost:28090/SDNCAdapter")
+ when(mockExecution.getVariable("mso.adapters.network.rest.endpoint")).thenReturn("http://localhost:28090/networks/NetworkAdapter")
+ when(mockExecution.getVariable("mso.adapters.sdnc.resource.endpoint")).thenReturn("http://localhost:28090/SDNCAdapterRpc")
+
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstanceRollback DoUpdateNetworkInstanceRollback = new DoUpdateNetworkInstanceRollback()
+ DoUpdateNetworkInstanceRollback.preProcessRequest(mockExecution)
+
+// verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ //verify variable initialization
+ initializeVariables(mockExecution)
+
+ }
+
+
+ @Test
+ @Ignore
+ public void validateRollbackResponses_Good() {
+
+ WorkflowException workflowException = new WorkflowException("DoUpdateNetworkInstanceRollback", 2500, "AAI Update Contrail Failed. Error 404.")
+ WorkflowException expectedWorkflowException = new WorkflowException("DoUpdateNetworkInstanceRollback", 2500, "AAI Update Contrail Failed. Error 404. + SNDC activate rollback completed. + PO Network rollback completed. + SNDC assign rollback completed.")
+
+ println "************ validateRollbackResponses_Good() ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix + "")
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkRequest")).thenReturn("Good")
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCRequest")).thenReturn("Good")
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkResponse")).thenReturn("GoodResponse")
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCResponse")).thenReturn("GoodResponse")
+ when(mockExecution.getVariable(Prefix + "WorkflowException")).thenReturn(workflowException)
+ when(mockExecution.getVariable(Prefix + "fullRollback")).thenReturn(false)
+
+ DoUpdateNetworkInstanceRollback DoUpdateNetworkInstanceRollback = new DoUpdateNetworkInstanceRollback()
+ DoUpdateNetworkInstanceRollback.validateRollbackResponses(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ verify(mockExecution, atLeast(1)).setVariable("prefix", Prefix)
+ verify(mockExecution, atLeast(1)).setVariable("rolledBack", true)
+ verify(mockExecution, atLeast(1)).setVariable("wasDeleted", true)
+ verify(mockExecution).setVariable("WorkflowException", refEq(expectedWorkflowException, any(WorkflowException.class)))
+ //verify(mockExecution).setVariable("WorkflowException", expectedWorkflowException)
+ }
+
+ @Test
+ //@Ignore
+ public void validateRollbackResponses_FullRollback() {
+
+ Map<String, String> rollbackData = new HashMap<String, String>();
+ rollbackData.put("rollbackSDNCRequest", rollbackSDNCRequest)
+ rollbackData.put("rollbackNetworkRequest", rollbackNetworkRequest)
+
+ println "************ validateRollbackResponses_FullRollback() ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix)
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkRequest")).thenReturn("Good")
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCRequest")).thenReturn("Good")
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkResponse")).thenReturn("GoodResponse")
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCResponse")).thenReturn("GoodResponse")
+ when(mockExecution.getVariable(Prefix + "WorkflowException")).thenReturn(null)
+ when(mockExecution.getVariable(Prefix + "fullRollback")).thenReturn(true)
+ when(mockExecution.getVariable("rollbackData")).thenReturn(rollbackData)
+
+ DoUpdateNetworkInstanceRollback DoUpdateNetworkInstanceRollback = new DoUpdateNetworkInstanceRollback()
+ DoUpdateNetworkInstanceRollback.validateRollbackResponses(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ verify(mockExecution, atLeast(1)).setVariable("prefix", Prefix)
+ verify(mockExecution, atLeast(1)).setVariable("rollbackSuccessful", true)
+ verify(mockExecution, atLeast(1)).setVariable("rollbackError", false)
+
+ }
+
+
+ private ExecutionEntity setupMock() {
+
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("DoUpdateNetworkInstanceRollback")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("DoUpdateNetworkInstanceRollback")
+ when(mockRepositoryService.getProcessDefinition().getId()).thenReturn("100")
+ ProcessEngineServices mockProcessEngineServices = mock(ProcessEngineServices.class)
+ when(mockProcessEngineServices.getRepositoryService()).thenReturn(mockRepositoryService)
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+
+ when(mockExecution.getId()).thenReturn("100")
+ when(mockExecution.getProcessDefinitionId()).thenReturn("DoUpdateNetworkInstanceRollback")
+ when(mockExecution.getProcessInstanceId()).thenReturn("DoUpdateNetworkInstanceRollback")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+
+ return mockExecution
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceTest.groovy
new file mode 100644
index 0000000000..de3db5b5a8
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceTest.groovy
@@ -0,0 +1,2762 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.scripts
+
+
+import static org.mockito.Mockito.*
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetNetworkByIdWithDepth;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetNetworkCloudRegion;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetNetworkCloudRegion_404;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetNetworkVpnBinding;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetNetworkTableReference;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetNetworkPolicy;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPutNetworkIdWithDepth;
+import org.camunda.bpm.engine.ProcessEngineServices
+import org.camunda.bpm.engine.RepositoryService
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.camunda.bpm.engine.repository.ProcessDefinition
+import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.junit.Before
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.core.WorkflowException
+
+import com.github.tomakehurst.wiremock.client.WireMock
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+import org.apache.commons.lang3.*
+
+
+@RunWith(MockitoJUnitRunner.class)
+class DoUpdateNetworkInstanceTest {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(8090);
+
+ def utils = new MsoUtils()
+ String Prefix="UPDNETI_"
+
+ String jsonIncomingRequest =
+ """{ "requestDetails": {
+ "modelInfo": {
+ "modelType": "network",
+ "modelCustomizationId": "f21df226-8093-48c3-be7e-0408fcda0422",
+ "modelName": "CONTRAIL_EXTERNAL",
+ "modelVersion": "1.0"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "RDM2WAGPLCP",
+ "tenantId": "7dd5365547234ee8937416c65507d266"
+ },
+ "requestInfo": {
+ "instanceName": "MNS-25180-L-01-dmz_direct_net_1",
+ "source": "VID",
+ "callbackUrl": "",
+ "suppressRollback": true,
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "f70e927b-6087-4974-9ef8-c5e4d5847ca4",
+ "modelInfo": {
+ "modelType": "serviceT",
+ "modelId": "modelI",
+ "modelNameVersionId": "modelNameVersionI",
+ "modelName": "modleNam",
+ "modelVersion": "1"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": [
+ {
+ "name": "someUserParam1",
+ "value": "someValue1"
+ }
+ ]
+ }
+ }}"""
+
+
+ String jsonIncomingRequest_MissingCloudRegion =
+ """{ "requestDetails": {
+ "modelInfo": {
+ "modelType": "network",
+ "modelCustomizationId": "f21df226-8093-48c3-be7e-0408fcda0422",
+ "modelName": "CONTRAIL_EXTERNAL",
+ "modelVersion": "1.0"
+ },
+ "cloudConfiguration": {
+ "tenantId": "7dd5365547234ee8937416c65507d266"
+ },
+ "requestInfo": {
+ "instanceName": "MNS-25180-L-01-dmz_direct_net_1",
+ "source": "VID",
+ "callbackUrl": "",
+ "suppressRollback": true,
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "f70e927b-6087-4974-9ef8-c5e4d5847ca4",
+ "modelInfo": {
+ "modelType": "serviceT",
+ "modelId": "modelI",
+ "modelNameVersionId": "modelNameVersionI",
+ "modelName": "modleNam",
+ "modelVersion": "1"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": []
+ }
+ }}"""
+
+
+
+ String expectedNetworkRequestMissingNetworkId =
+ """<network-request xmlns="http://www.w3.org/2001/XMLSchema">
+ <request-info>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <action>UPDATE</action>
+ <source>VID</source>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ </request-info>
+ <network-inputs>
+ <network-id/>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <modelCustomizationId>f21df226-8093-48c3-be7e-0408fcda0422</modelCustomizationId>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>false</backout-on-failure>
+ <sdncVersion>1610</sdncVersion>
+ </network-inputs>
+ <network-params>
+ <param name="some_user_param1">someValue1</param>
+ </network-params>
+</network-request>"""
+
+
+String expectedNetworkRequestMissingCloudRegion =
+"""<network-request xmlns="http://www.w3.org/2001/XMLSchema">
+ <request-info>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <action>UPDATE</action>
+ <source>VID</source>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ </request-info>
+ <network-inputs>
+ <network-id>networkId</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <modelCustomizationId>f21df226-8093-48c3-be7e-0408fcda0422</modelCustomizationId>
+ <aic-cloud-region>null</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>false</backout-on-failure>
+ <sdncVersion>null</sdncVersion>
+ </network-inputs>
+ <network-params/>
+</network-request>"""
+
+String expectedNetworkInputMissingCloudRegion =
+"""<network-inputs xmlns="http://www.w3.org/2001/XMLSchema">
+ <network-id>networkId</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <modelCustomizationId>f21df226-8093-48c3-be7e-0408fcda0422</modelCustomizationId>
+ <aic-cloud-region>null</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>false</backout-on-failure>
+ <sdncVersion>null</sdncVersion>
+</network-inputs>"""
+
+ String networkInputsMissingName =
+ """<network-inputs xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <network-name/>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>e81d842d3e8b45c5a59f57cd76af3aaf</tenant-id>
+ </network-inputs>"""
+
+String networkInputsMissingCloudRegion =
+"""<network-inputs xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <aic-cloud-region/>
+ <tenant-id>e81d842d3e8b45c5a59f57cd76af3aaf</tenant-id>
+</network-inputs>"""
+
+ // expectedNetworkRequest
+ String expectedNetworkRequest =
+ """<network-request xmlns="http://www.w3.org/2001/XMLSchema">
+ <request-info>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <action>UPDATE</action>
+ <source>VID</source>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ </request-info>
+ <network-inputs>
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <modelCustomizationId>f21df226-8093-48c3-be7e-0408fcda0422</modelCustomizationId>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>false</backout-on-failure>
+ <sdncVersion>1610</sdncVersion>
+ </network-inputs>
+ <network-params>
+ <param name="some_user_param1">someValue1</param>
+ </network-params>
+</network-request>"""
+
+String expectedNetworkInputs =
+"""<network-inputs xmlns="http://www.w3.org/2001/XMLSchema">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <modelCustomizationId>f21df226-8093-48c3-be7e-0408fcda0422</modelCustomizationId>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>false</backout-on-failure>
+ <sdncVersion>1610</sdncVersion>
+</network-inputs>"""
+
+String expectedVperNetworkRequest =
+"""<network-request xmlns="http://www.w3.org/2001/XMLSchema">
+ <request-info>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <action>UPDATE</action>
+ <source>VID</source>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ </request-info>
+ <network-inputs>
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <subscription-service-type>MSO-dev-service-type</subscription-service-type>
+ <global-customer-id>globalId_45678905678</global-customer-id>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>false</backout-on-failure>
+ <failIfExist>false</failIfExist>
+ <networkModelInfo>
+ <modelName>CONTRAIL_EXTERNAL</modelName>
+ <modelUuid>sn5256d1-5a33-55df-13ab-12abad84e111</modelUuid>
+ <modelInvariantUuid>sn5256d1-5a33-55df-13ab-12abad84e764</modelInvariantUuid>
+ <modelVersion>1</modelVersion>
+ <modelCustomizationUuid>sn5256d1-5a33-55df-13ab-12abad84e222</modelCustomizationUuid>
+ </networkModelInfo>
+ <serviceModelInfo>
+ <modelName/>
+ <modelUuid/>
+ <modelInvariantUuid/>
+ <modelVersion/>
+ <modelCustomizationUuid/>
+ </serviceModelInfo>
+ <sdncVersion>1702</sdncVersion>
+ </network-inputs>
+ <network-params/>
+</network-request>"""
+
+String expectedVperNetworkInputs =
+"""<network-inputs xmlns="http://www.w3.org/2001/XMLSchema">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <subscription-service-type>MSO-dev-service-type</subscription-service-type>
+ <global-customer-id>globalId_45678905678</global-customer-id>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>false</backout-on-failure>
+ <failIfExist>false</failIfExist>
+ <networkModelInfo>
+ <modelName>CONTRAIL_EXTERNAL</modelName>
+ <modelUuid>sn5256d1-5a33-55df-13ab-12abad84e111</modelUuid>
+ <modelInvariantUuid>sn5256d1-5a33-55df-13ab-12abad84e764</modelInvariantUuid>
+ <modelVersion>1</modelVersion>
+ <modelCustomizationUuid>sn5256d1-5a33-55df-13ab-12abad84e222</modelCustomizationUuid>
+ </networkModelInfo>
+ <serviceModelInfo>
+ <modelName/>
+ <modelUuid/>
+ <modelInvariantUuid/>
+ <modelVersion/>
+ <modelCustomizationUuid/>
+ </serviceModelInfo>
+ <sdncVersion>1702</sdncVersion>
+</network-inputs>"""
+
+String expectedNetworkInputsMissingNetworkId =
+"""<network-inputs xmlns="http://www.w3.org/2001/XMLSchema">
+ <network-id/>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <modelCustomizationId>f21df226-8093-48c3-be7e-0408fcda0422</modelCustomizationId>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>7dd5365547234ee8937416c65507d266</tenant-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <backout-on-failure>false</backout-on-failure>
+ <sdncVersion>1610</sdncVersion>
+</network-inputs>"""
+
+
+ String NetworkRequest_noPhysicalName =
+ """<vnfreq:network-request xmlns:vnfreq="http://org.onap/so/infra/vnf-request/v1">
+ <vnfreq:request-info>
+ <vnfreq:request-id>1ef47428-cade-45bd-a103-0751e8b2deb0</vnfreq:request-id>
+ <vnfreq:action>UPDATE</vnfreq:action>
+ <vnfreq:source>PORTAL</vnfreq:source>
+ </vnfreq:request-info>
+ <vnfreq:network-inputs>
+ <vnfreq:network-name>MNS-25180-L-01-dmz_direct_net_1</vnfreq:network-name>
+ <vnfreq:network-type>CONTRAIL_EXTERNAL</vnfreq:network-type>
+ <vnfreq:modelCustomizationId></vnfreq:modelCustomizationId>
+ <vnfreq:service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</vnfreq:service-id>
+ <vnfreq:aic-cloud-region>RDM2WAGPLCP</vnfreq:aic-cloud-region>
+ <vnfreq:tenant-id>7dd5365547234ee8937416c65507d266</vnfreq:tenant-id>
+ <vnfreq:vlans>3008</vnfreq:vlans>
+ </vnfreq:network-inputs>
+ <vnfreq:network-params>
+ <network-params>
+ <param name="dhcp-enabled">true</param>
+ <param name="serviceId">a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</param>
+ <param name="cidr-mask">true</param>
+ <param name="backoutOnFailure">true</param>
+ <param name="gateway-address">10.10.125.1</param>
+ </network-params>
+ </vnfreq:network-params>
+</vnfreq:network-request>"""
+
+ String vnfRequestFakeRegion =
+ """<vnfreq:network-request xmlns:vnfreq="http://org.onap/so/infra/vnf-request/v1">
+ <vnfreq:request-info>
+ <vnfreq:request-id>1ef47428-cade-45bd-a103-0751e8b2deb0</vnfreq:request-id>
+ <vnfreq:action>UPDATE</vnfreq:action>
+ <vnfreq:source>PORTAL</vnfreq:source>
+ </vnfreq:request-info>
+ <vnfreq:network-inputs>
+ <vnfreq:network-name>MNS-25180-L-01-dmz_direct_net_1</vnfreq:network-name>
+ <vnfreq:network-type>CONTRAIL_EXTERNAL</vnfreq:network-type>
+ <vnfreq:service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</vnfreq:service-id>
+ <vnfreq:aic-cloud-region>MDTWNJ21</vnfreq:aic-cloud-region>
+ <vnfreq:tenant-id>7dd5365547234ee8937416c65507d266</vnfreq:tenant-id>
+ </vnfreq:network-inputs>
+ <vnfreq:network-params>
+ <param name="shared">1</param>
+ <param name="external">0</param>
+ </vnfreq:network-params>
+</vnfreq:network-request>"""
+
+ // expectedNetworkRequest
+ String expectedNetworkRequest_Outputs =
+ """<vnfreq:network-request xmlns:vnfreq="http://org.onap/so/infra/vnf-request/v1">
+ <vnfreq:request-info>
+ <vnfreq:request-id>1ef47428-cade-45bd-a103-0751e8b2deb0</vnfreq:request-id>
+ <vnfreq:action>UPDATE</vnfreq:action>
+ <vnfreq:source>PORTAL</vnfreq:source>
+ </vnfreq:request-info>
+ <vnfreq:network-inputs>
+ <vnfreq:network-name>MNS-25180-L-01-dmz_direct_net_1</vnfreq:network-name>
+ <vnfreq:network-type>CONTRAIL_EXTERNAL</vnfreq:network-type>
+ <vnfreq:service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</vnfreq:service-id>
+ <vnfreq:aic-cloud-region>RDM2WAGPLCP</vnfreq:aic-cloud-region>
+ <vnfreq:tenant-id>7dd5365547234ee8937416c65507d266</vnfreq:tenant-id>
+ </vnfreq:network-inputs>
+ <vnfreq:network-outputs>
+ <vnfreq:network-name>MNS-25180-L-01-dmz_direct_net_1</vnfreq:network-name>
+ <vnfreq:network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</vnfreq:network-id>
+ </vnfreq:network-outputs>
+ <vnfreq:network-params>
+ <param name="shared">1</param>
+ <param name="external">0</param>
+ </vnfreq:network-params>
+</vnfreq:network-request>"""
+
+
+ String networkInputs =
+ """<network-inputs xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant-id>e81d842d3e8b45c5a59f57cd76af3aaf</tenant-id>
+</network-inputs>"""
+
+ String networkOutputs =
+ """<network-outputs>
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ </network-outputs>"""
+
+ String queryAAIResponse =
+ """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v3">
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <orchestration-status>pending-delete</orchestration-status>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-delete</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>"""
+
+ String queryIdAIIResponse =
+ """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v6">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <resource-version>l3-version</resource-version>
+ <orchestration-status>pending-delete</orchestration-status>
+ <heat-stack-id>ST_2Bindings_6006/55288ef0-595c-47d3-819e-cf93aaac6326</heat-stack-id>
+ <physical-network-name>networkName</physical-network-name>
+ <is-provider-network>false</is-provider-network>
+ <is-shared-network>true</is-shared-network>
+ <is-external-network>false</is-external-network>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-update</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ <subnet-role>ECOMP</subnet-role>
+ <ip-assignment-direction>true</ip-assignment-direction>
+ <host-routes>
+ <host-route>
+ <host-route-id>400d286b-7e44-4514-b9b3-f70f7360ff32</host-route-id>
+ <route-prefix>172.20.1.0/24</route-prefix>
+ <next-hop>10.102.200.1</next-hop>
+ <next-hop-type>ip-address</next-hop-type>
+ <resource-version>1505857300987</resource-version>
+ </host-route>
+ <host-route>
+ <host-route-id>6f038013-8b15-4eb8-914b-507489fbc8ee</host-route-id>
+ <route-prefix>10.102.0.0/16</route-prefix>
+ <next-hop>10.102.200.1</next-hop>
+ <next-hop-type>ip-address</next-hop-type>
+ <resource-version>1505857301151</resource-version>
+ </host-route>
+ <host-route>
+ <host-route-id>8811c5f8-f1ed-4fa0-a505-e1be60396e28</host-route-id>
+ <route-prefix>192.168.2.0/25</route-prefix>
+ <next-hop>10.102.200.1</next-hop>
+ <resource-version>1505857301954</resource-version>
+ </host-route>
+ </host-routes>
+ <relationship-list/>
+ </subnet>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-delete</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ <ip-assignment-direction>true</ip-assignment-direction>
+ <host-routes>
+ <host-route>
+ <host-route-id>400d286b-7e44-4514-b9b3-f70f7360ff32</host-route-id>
+ <route-prefix>172.20.1.0/24</route-prefix>
+ <next-hop>10.102.200.1</next-hop>
+ <resource-version>1505857300987</resource-version>
+ </host-route>
+ </host-routes>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <segmentation-assignments>
+ <segmentation-id>414</segmentation-id>
+ <resource-version>4132176</resource-version>
+ </segmentation-assignments>
+ <segmentation-assignments>
+ <segmentation-id>415</segmentation-id>
+ <resource-version>4132176</resource-version>
+ </segmentation-assignments>
+ <ctag-assignments>
+ <ctag-assignment>
+ <vlan-id-inner>inner</vlan-id-inner>
+ <resource-version>ctag-version</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/897deadc2b954a6bac6d3c197fb3525e/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>897deadc2b954a6bac6d3c197fb3525e</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>MSOTest1</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/a290b841-f672-44dd-b9cd-6f8c20d7d8c8/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>a290b841-f672-44dd-b9cd-6f8c20d7d8c8</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-name</property-key>
+ <property-value>oam_protected_net_6_MTN5_msotest2</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/24a4b507-853a-4a38-99aa-05fcc54be24d/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>24a4b507-853a-4a38-99aa-05fcc54be24d</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-name</property-key>
+ <property-value>oam_protected_net_6_MTN5_msotest1</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+ </ctag-assignment>
+ </ctag-assignments>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>network-policy</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg</related-link>
+ <relationship-data>
+ <relationship-key>network-policy.network-policy-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0cg</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN1</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN2</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>"""
+
+ String queryIdAIIResponseTestScenario01 =
+ """<?xml version="1.0" encoding="UTF-8"?>
+<l3-network xmlns="http://org.openecomp.aai.inventory/v7">
+ <network-id>4da55fe4-7a9e-478c-a434-8a98d62265ab</network-id>
+ <network-name>GN_EVPN_direct_net_0_ST1</network-name>
+ <network-type>CONTRAIL30_BASIC</network-type>
+ <network-role>GN_EVPN_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <is-bound-to-vpn>false</is-bound-to-vpn>
+ <service-id>9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <resource-version>1465398611</resource-version>
+ <orchestration-status>pending-delete</orchestration-status>
+ <physical-network-name>networkName</physical-network-name>
+ <is-provider-network>false</is-provider-network>
+ <is-shared-network>true</is-shared-network>
+ <is-external-network>false</is-external-network>
+ <subnets>
+ <subnet>
+ <subnet-id>cb1a7b47-5428-44c9-89c2-8b17541c3228</subnet-id>
+ <gateway-address>108.239.40.1</gateway-address>
+ <network-start-address>108.239.40.0</network-start-address>
+ <cidr-mask>28</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-delete</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <dhcp-start>108.239.40.0</dhcp-start>
+ <dhcp-end>108.239.40.0</dhcp-end>
+ <resource-version>1465398611</resource-version>
+ <subnet-name>subnetName</subnet-name>
+ <relationship-list />
+ </subnet>
+ <subnet>
+ <subnet-id>e2cc7c14-90f0-4205-840d-b4e07f04e621</subnet-id>
+ <gateway-address>2606:ae00:2e01:604::1</gateway-address>
+ <network-start-address>2606:ae00:2e01:604::</network-start-address>
+ <cidr-mask>64</cidr-mask>
+ <ip-version>6</ip-version>
+ <orchestration-status>pending-delete</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <dhcp-start>2606:ae00:2e01:604::</dhcp-start>
+ <dhcp-end>2606:ae00:2e01:604::</dhcp-end>
+ <resource-version>1465398611</resource-version>
+ <subnet-name>subnetName</subnet-name>
+ <relationship-list />
+ </subnet>
+ </subnets>
+ <ctag-assignments />
+ <segmentation-assignments>
+ <segmentation-id>416</segmentation-id>
+ <resource-version>4132176</resource-version>
+ </segmentation-assignments>
+ <relationship-list>
+ <relationship>
+ <related-to>cloud-region</related-to>
+ <related-link>https://localhost:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/
+ </related-link>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>AAIAIC25</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>cloud-region.owner-defined-type</property-key>
+ <property-value></property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://localhost:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/tenants/tenant/4ae1d3446a4c48b2bec44b6cfba06d68/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>4ae1d3446a4c48b2bec44b6cfba06d68
+ </relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>AAIAIC25</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>Ruchira Contrail 3.0 test</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://localhost:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>9a7b327d9-287aa00-82c4b0-100001</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-name</property-key>
+ <property-value>GN_EVPN_direct_net_0_ST1</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+</l3-network>"""
+
+ String queryIdAIIResponseVpnNotPresent =
+ """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v6">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <orchestration-status>pending-delete</orchestration-status>
+ <physical-network-name>networkName</physical-network-name>
+ <is-provider-network>false</is-provider-network>
+ <is-shared-network>true</is-shared-network>
+ <is-external-network>false</is-external-network>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-delete</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <relationship-list/>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>"""
+
+ String queryNameAIIResponse =
+ """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v6">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <orchestration-status>pending-delete</orchestration-status>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-delete</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+ </rest:RESTResponse>"""
+
+ String queryNameAIIResponseVpnNotPresent =
+ """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v6>
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <orchestration-status>pending-delete</orchestration-status>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-delete</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ </l3-network>
+ </rest:payload>
+ </rest:RESTResponse>"""
+
+ String aaiVpnResponseStub =
+ """<rest:payload xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ xmlns="http://org.openecomp.aai.inventory/v8"
+ contentType="text/xml">
+ <vpn-binding>
+ <global-route-target/>
+ </vpn-binding>
+</rest:payload>"""
+
+ String queryVpnBindingAAIResponse =
+ """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Mon,14 Mar 2016 20:53:33 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="localhost-20160314-20:53:33:487-134392"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <vpn-binding xmlns="http://org.openecomp.aai.inventory/v6">
+ <vpn-id>9a7b327d9-287aa00-82c4b0-105757</vpn-id>
+ <vpn-name>GN_EVPN_Test</vpn-name>
+ <global-route-target>13979:105757</global-route-target>
+ <relationship-list>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/689ec39e-c5fc-4462-8db2-4f760763ad28/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>689ec39e-c5fc-4462-8db2-4f760763ad28</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/1a49396b-19b3-40a4-8792-aa2fbd0f0704/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>1a49396b-19b3-40a4-8792-aa2fbd0f0704</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/774f3329-3c83-4771-86c7-9e6207cd50fd/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>774f3329-3c83-4771-86c7-9e6207cd50fd</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </vpn-binding>
+ </rest:payload>
+</rest:RESTResponse>"""
+
+
+ String updateNetworkRequest =
+ """<updateNetworkRequest>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ <networkId>49c86598-f766-46f8-84f8-8d1c1b10f9b4</networkId>
+ <networkStackId>ST_2Bindings_6006/55288ef0-595c-47d3-819e-cf93aaac6326</networkStackId>
+ <networkName>MNS-25180-L-01-dmz_direct_net_1</networkName>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <modelCustomizationUuid>sn5256d1-5a33-55df-13ab-12abad84e222</modelCustomizationUuid>
+ <networkTypeVersion/>
+ <networkTechnology>CONTRAIL</networkTechnology>
+ <providerVlanNetwork>
+ <physicalNetworkName>networkName</physicalNetworkName>
+ <vlans>414,415</vlans>
+ </providerVlanNetwork>
+ <contrailNetwork>
+ <shared>true</shared>
+ <external>false</external>
+ <routeTargets>13979:105757</routeTargets>
+ <routeTargets>13979:105757</routeTargets>
+ <policyFqdns>GN_EVPN_Test</policyFqdns>
+ <routeTableFqdns>refFQDN1</routeTableFqdns>
+ <routeTableFqdns>refFQDN2</routeTableFqdns>
+ </contrailNetwork>
+ <subnets>
+ <allocationPools>
+ <start/>
+ <end/>
+ </allocationPools>
+ <cidr>107.239.52.0/24</cidr>
+ <enableDHCP>true</enableDHCP>
+ <gatewayIp>107.239.52.1</gatewayIp>
+ <ipVersion>4</ipVersion>
+ <subnetId>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnetId>
+ <subnetName>subnetName</subnetName>
+ <addrFromStart>true</addrFromStart>
+ <hostRoutes>
+ <prefix>172.20.1.0/24</prefix>
+ <nextHop>10.102.200.1</nextHop>
+ </hostRoutes>
+ <hostRoutes>
+ <prefix>10.102.0.0/16</prefix>
+ <nextHop>10.102.200.1</nextHop>
+ </hostRoutes>
+ <hostRoutes>
+ <prefix>192.168.2.0/25</prefix>
+ <nextHop>10.102.200.1</nextHop>
+ </hostRoutes>
+ </subnets>
+ <skipAAI>true</skipAAI>
+ <backout>true</backout>
+ <failIfExists>false</failIfExists>
+ <msoRequest>
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <serviceInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</serviceInstanceId>
+ </msoRequest>
+ <messageId>messageId_generated</messageId>
+ <notificationUrl/>
+</updateNetworkRequest>"""
+
+String updateNetworkRequest_noPhysicalName =
+"""<updateNetworkRequest>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ <networkId>49c86598-f766-46f8-84f8-8d1c1b10f9b4</networkId>
+ <networkStackId>ST_2Bindings_6006/55288ef0-595c-47d3-819e-cf93aaac6326</networkStackId>
+ <networkName>MNS-25180-L-01-dmz_direct_net_1</networkName>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <modelCustomizationUuid/>
+ <networkTypeVersion/>
+ <networkTechnology>CONTRAIL</networkTechnology>
+ <providerVlanNetwork>
+ <physicalNetworkName>networkName</physicalNetworkName>
+ <vlans>414,415</vlans>
+ </providerVlanNetwork>
+ <contrailNetwork>
+ <shared>true</shared>
+ <external>false</external>
+ <routeTargets>13979:105757</routeTargets>
+ <routeTargets>13979:105757</routeTargets>
+ <policyFqdns>GN_EVPN_Test</policyFqdns>
+ </contrailNetwork>
+ <subnets>
+ <allocationPools>
+ <start/>
+ <end/>
+ </allocationPools>
+ <cidr>107.239.52.0/24</cidr>
+ <enableDHCP>true</enableDHCP>
+ <gatewayIp>107.239.52.1</gatewayIp>
+ <ipVersion>4</ipVersion>
+ <subnetId>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnetId>
+ <subnetName>subnetName</subnetName>
+ <addrFromStart>true</addrFromStart>
+ <hostRoutes>
+ <prefix>172.20.1.0/24</prefix>
+ <nextHop>10.102.200.1</nextHop>
+ </hostRoutes>
+ <hostRoutes>
+ <prefix>10.102.0.0/16</prefix>
+ <nextHop>10.102.200.1</nextHop>
+ </hostRoutes>
+ <hostRoutes>
+ <prefix>192.168.2.0/25</prefix>
+ <nextHop>10.102.200.1</nextHop>
+ </hostRoutes>
+ </subnets>
+ <skipAAI>true</skipAAI>
+ <backout>true</backout>
+ <failIfExists>false</failIfExists>
+ <networkParams>
+ <dhcp-enabled>true</dhcp-enabled>
+ <serviceId>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</serviceId>
+ <cidr-mask>true</cidr-mask>
+ <backoutOnFailure>true</backoutOnFailure>
+ <gateway-address>10.10.125.1</gateway-address>
+ </networkParams>
+ <msoRequest>
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <serviceInstanceId>null</serviceInstanceId>
+ </msoRequest>
+ <messageId>messageId_generated</messageId>
+ <notificationUrl/>
+</updateNetworkRequest>"""
+
+ String updateNetworkResponseREST =
+ """<ns2:updateNetworkContrailResponse xmlns:ns2="http://org.onap.so/network">
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <networkFqdn>default-domain:MSOTest:GN_EVPN_direct_net_0_ST1</networkFqdn>
+ <networkStackId></networkStackId>
+ <subnetMap>
+ <entry>
+ <key>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</key>
+ <value>bd8e87c6-f4e2-41b8-b0bc-9596aa00cd73</value>
+ </entry>
+ <entry>
+ <key>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</key>
+ <value>bd8e87c6-f4e2-41b8-b0bc-9596aa00cd73</value>
+ </entry>
+ </subnetMap>
+ <rollback>
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <networkStackId></networkStackId>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <networkUpdated>true</networkUpdated>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <msoRequest>
+ <requestId>1ef47428-cade-45bd-a103-0751e8b2deb0</requestId>
+ <serviceInstanceId></serviceInstanceId>
+ </msoRequest>
+ </rollback>
+ <messageId>messageId_generated</messageId>
+</ns2:updateNetworkContrailResponse>"""
+
+ String updateRollbackNetworkRequest =
+ """<rollbackNetworkRequest>
+ <networkRollback>
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <networkStackId/>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <networkUpdated>true</networkUpdated>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <msoRequest>
+ <requestId>1ef47428-cade-45bd-a103-0751e8b2deb0</requestId>
+ <serviceInstanceId/>
+ </msoRequest>
+ </networkRollback>
+</rollbackNetworkRequest>"""
+
+ String updateNetworkResponse =
+ """<ns2:updateNetworkContrailResponse xmlns:ns2="http://org.onap.so/network"
+ xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <networkStackId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkStackId>
+ <networkFqdn>default-domain:MSOTest:GN_EVPN_direct_net_0_ST1</networkFqdn>
+ <subnetIdMap>
+ <entry>
+ <key>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</key>
+ <value>bd8e87c6-f4e2-41b8-b0bc-9596aa00cd73</value>
+ </entry>
+ </subnetIdMap>
+ <rollback>
+ <cloudId>RDM2WAGPLCP</cloudId>
+ <msoRequest>
+ <requestId>1ef47428-cade-45bd-a103-0751e8b2deb0</requestId>
+ <serviceInstanceId/>
+ </msoRequest>
+ <networkUpdated>true</networkUpdated>
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <networkUpdated>false</networkUpdated>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ </rollback>
+</ns2:updateNetworkContrailResponse>"""
+
+ String updateContrailAAIPayloadRequest =
+ """<l3-network xmlns="http://org.openecomp.aai.inventory/v9">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <neutron-network-id>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutron-network-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <resource-version>l3-version</resource-version>
+ <orchestration-status>Active</orchestration-status>
+ <heat-stack-id>ST_2Bindings_6006/55288ef0-595c-47d3-819e-cf93aaac6326</heat-stack-id>
+ <contrail-network-fqdn>default-domain:MSOTest:GN_EVPN_direct_net_0_ST1</contrail-network-fqdn>
+ <physical-network-name>networkName</physical-network-name>
+ <is-provider-network>false</is-provider-network>
+ <is-shared-network>true</is-shared-network>
+ <is-external-network>false</is-external-network>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <neutron-subnet-id>bd8e87c6-f4e2-41b8-b0bc-9596aa00cd73</neutron-subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>Active</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-role>ECOMP</subnet-role>
+ <resource-version>1505857300987</resource-version>
+ <subnet-name>subnetName</subnet-name>
+ <ip-assignment-direction>true</ip-assignment-direction>
+ <host-routes>
+ <host-route>
+ <host-route-id>400d286b-7e44-4514-b9b3-f70f7360ff32</host-route-id>
+ <route-prefix>172.20.1.0/24</route-prefix>
+ <next-hop>10.102.200.1</next-hop>
+ <next-hop-type>ip-address</next-hop-type>
+ <resource-version>1505857300987</resource-version>
+ </host-route>
+ <host-route>
+ <host-route-id>6f038013-8b15-4eb8-914b-507489fbc8ee</host-route-id>
+ <route-prefix>10.102.0.0/16</route-prefix>
+ <next-hop>10.102.200.1</next-hop>
+ <next-hop-type>ip-address</next-hop-type>
+ <resource-version>1505857301151</resource-version>
+ </host-route>
+ <host-route>
+ <host-route-id>8811c5f8-f1ed-4fa0-a505-e1be60396e28</host-route-id>
+ <route-prefix>192.168.2.0/25</route-prefix>
+ <next-hop>10.102.200.1</next-hop>
+ <next-hop-type/>
+ <resource-version>1505857301954</resource-version>
+ </host-route>
+ </host-routes>
+ </subnet>
+ </subnets>
+ <segmentation-assignments>
+ <segmentation-id>414</segmentation-id>
+ <resource-version>4132176</resource-version>
+ </segmentation-assignments>
+ <segmentation-assignments>
+ <segmentation-id>415</segmentation-id>
+ <resource-version>4132176</resource-version>
+ </segmentation-assignments>
+ <ctag-assignments>
+ <ctag-assignment>
+ <vlan-id-inner>inner</vlan-id-inner>
+ <resource-version>ctag-version</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/897deadc2b954a6bac6d3c197fb3525e/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>897deadc2b954a6bac6d3c197fb3525e</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>MSOTest1</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/a290b841-f672-44dd-b9cd-6f8c20d7d8c8/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>a290b841-f672-44dd-b9cd-6f8c20d7d8c8</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-name</property-key>
+ <property-value>oam_protected_net_6_MTN5_msotest2</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/24a4b507-853a-4a38-99aa-05fcc54be24d/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>24a4b507-853a-4a38-99aa-05fcc54be24d</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-name</property-key>
+ <property-value>oam_protected_net_6_MTN5_msotest1</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+ </ctag-assignment>
+ </ctag-assignments>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>network-policy</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg</related-link>
+ <relationship-data>
+ <relationship-key>network-policy.network-policy-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0cg</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN1</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN2</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+</l3-network>"""
+
+
+ String updateContrailAAIResponse =
+ """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <rest:header name="Content-Length" value="0"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:551-132672"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+</rest:RESTResponse>"""
+
+ String updateNetworkErrorResponse =
+ """<updateNetworkError>
+ <messageId>680bd458-5ec1-4a16-b77c-509022e53450</messageId><category>INTERNAL</category>
+ <message>400 Bad Request: The server could not comply with the request since it is either malformed or otherwise incorrect., error.type=StackValidationFailed, error.message=Property error: : resources.network.properties: : Unknown Property network_ipam_refs_data</message>
+ <rolledBack>true</rolledBack>
+ </updateNetworkError>"""
+
+
+ String networkException500 =
+ """<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:VersionMismatch</faultcode><faultstring>"http://org.onap.so/network", the namespace on the "updateNetworkContrail" element, is not a valid SOAP version.</faultstring></soap:Fault></soap:Body></soap:Envelope>"""
+
+ String aaiResponse =
+ """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Sat,30 Jan 2016 20:09:24 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="localhost-20160130-20:09:24:814-165843"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v3">
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>HSL_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <neutron-network-id>8bbd3edf-b835-4610-96a2-a5cafa029042</neutron-network-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <orchestration-status>active</orchestration-status>
+ <heat-stack-id>MNS-25180-L-01-dmz_direct_net_1/57594a56-1c92-4a38-9caa-641c1fa3d4b6</heat-stack-id>
+ <subnets>
+ <subnet>
+ <subnet-id>ea5f2a2c-604f-47ff-a9c5-253ee4f0ef0a</subnet-id>
+ <neutron-subnet-id>5a77fdc2-7789-4649-a1b9-6eaf1db1813a</neutron-subnet-id>
+ <gateway-address>172.16.34.1</gateway-address>
+ <network-start-address>172.16.34.0</network-start-address>
+ <cidr-mask>28</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>active</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/cloud-infrastructure/tenants/tenant/e81d842d3e8b45c5a59f57cd76af3aaf/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>e81d842d3e8b45c5a59f57cd76af3aaf</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+ </rest:RESTResponse>"""
+
+ String changeAssignSDNCRequest =
+ """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>changeassign</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <aetgt:SDNCRequestData>
+ <request-information>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <request-action>NetworkActivateRequest</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <service-type>MSO-dev-service-type</service-type>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <subscriber-name>MSO_1610_dev</subscriber-name>
+ </service-information>
+ <network-request-information>
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <tenant>7dd5365547234ee8937416c65507d266</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ </network-request-information>
+ </aetgt:SDNCRequestData>
+</aetgt:SDNCAdapterWorkflowRequest>"""
+
+String assignResponse =
+"""<sdncadapterworkflow:SDNCAdapterWorkflowResponse xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1" xmlns:tag0="http://org.onap.so/workflow/sdnc/adapter/schema/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <sdncadapterworkflow:response-data> <tag0:CallbackHeader> <tag0:RequestId>006927ca-f5a3-47fd-880c-dfcbcd81a093</tag0:RequestId> <tag0:ResponseCode>200</tag0:ResponseCode> <tag0:ResponseMessage>OK</tag0:ResponseMessage> </tag0:CallbackHeader> <tag0:RequestData xsi:type="xs:string"><output xmlns="com:att:sdnctl:vnf"><response-code>200</response-code><svc-request-id>006927ca-f5a3-47fd-880c-dfcbcd81a093</svc-request-id><ack-final-indicator>Y</ack-final-indicator><service-information><subscriber-name>notsurewecare</subscriber-name><service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id><service-instance-id>GN_EVPN_direct_net_0_ST_noGW</service-instance-id></service-information><network-information><network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id></network-information></output></tag0:RequestData> </sdncadapterworkflow:response-data> </sdncadapterworkflow:SDNCAdapterWorkflowResponse>"""
+
+ String sdncRollbackRequest =
+ """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>rollback</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <aetgt:SDNCRequestData>
+ <request-information>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <request-action>NetworkActivateRequest</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <service-type>MSO-dev-service-type</service-type>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <subscriber-name>MSO_1610_dev</subscriber-name>
+ </service-information>
+ <network-request-information>
+ <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <tenant>7dd5365547234ee8937416c65507d266</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ </network-request-information>
+ </aetgt:SDNCRequestData>
+</aetgt:SDNCAdapterWorkflowRequest>"""
+
+ String sdncAdapterWorkflowResponse =
+ """<aetgt:SDNCAdapterWorkflowResponse xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
+ <sdncadapterworkflow:response-data>
+<tag0:CallbackHeader xmlns:tag0="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <tag0:RequestId>745b1b50-e39e-4685-9cc8-c71f0bde8bf0</tag0:RequestId>
+ <tag0:ResponseCode>200</tag0:ResponseCode>
+ <tag0:ResponseMessage>OK</tag0:ResponseMessage>
+</tag0:CallbackHeader>
+ <tag0:RequestData xmlns:tag0="http://org.onap.so/workflow/sdnc/adapter/schema/v1"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:type="xs:string">&lt;output xmlns="com:att:sdnctl:vnf"&gt;&lt;svc-request-id&gt;00703dc8-71ff-442d-a4a8-3adc5beef6a9&lt;/svc-request-id&gt;&lt;response-code&gt;200&lt;/response-code&gt;&lt;ack-final-indicator&gt;Y&lt;/ack-final-indicator&gt;&lt;network-information&gt;&lt;network-id&gt;49c86598-f766-46f8-84f8-8d1c1b10f9b4&lt;/network-id&gt;&lt;/network-information&gt;&lt;service-information&gt;&lt;service-type&gt;a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb&lt;/service-type&gt;&lt;service-instance-id&gt;MNS-25180-L-01-dmz_direct_net_1&lt;/service-instance-id&gt;&lt;subscriber-name&gt;notsurewecare&lt;/subscriber-name&gt;&lt;/service-information&gt;&lt;/output&gt;</tag0:RequestData>
+ </sdncadapterworkflow:response-data>
+</aetgt:SDNCAdapterWorkflowResponse>"""
+
+
+ String sdncAdapterWorkflowResponse_Error =
+ """<sdncadapterworkflow:SDNCAdapterWorkflowResponse xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:tag0="http://org.onap.so/workflow/sdnc/adapter/schema/v1"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="com:att:sdnctl:vnf">
+ <sdncadapterworkflow:response-data>
+ <tag0:RequestData xsi:type="xs:string">
+ <output>
+ <response-code>400</response-code>
+ <response-message>Error writing to l3-netework</response-message>
+ <ack-final-indicator>Y</ack-final-indicator>
+ <svc-request-id>c79240d8-34b5-4853-af69-2021928dba00</svc-request-id>
+ </output>
+ </tag0:RequestData>
+ </sdncadapterworkflow:response-data>
+</sdncadapterworkflow:SDNCAdapterWorkflowResponse>"""
+
+ String expected_sdncAdapterWorkflowResponse_Error =
+ """<sdncadapterworkflow:SDNCAdapterWorkflowResponse xmlns="com:att:sdnctl:vnf"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:tag0="http://org.onap.so/workflow/sdnc/adapter/schema/v1"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <sdncadapterworkflow:response-data>
+ <tag0:RequestData xsi:type="xs:string">
+ <output>
+ <response-code>400</response-code>
+ <response-message>Error writing to l3-netework</response-message>
+ <ack-final-indicator>Y</ack-final-indicator>
+ <svc-request-id>c79240d8-34b5-4853-af69-2021928dba00</svc-request-id>
+ </output>
+ </tag0:RequestData>
+ </sdncadapterworkflow:response-data>
+</sdncadapterworkflow:SDNCAdapterWorkflowResponse>"""
+
+ String sdncAdapterWorkflowFormattedResponse =
+ """<aetgt:SDNCAdapterWorkflowResponse xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns="com:att:sdnctl:vnf">
+ <aetgt:response-data>
+ <output>
+ <svc-request-id>00703dc8-71ff-442d-a4a8-3adc5beef6a9</svc-request-id>
+ <response-code>200</response-code>
+ <ack-final-indicator>Y</ack-final-indicator>
+ <network-information>
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ </network-information>
+ <service-information>
+ <service-type>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-type>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <subscriber-name>notsurewecare</subscriber-name>
+ </service-information>
+ </output>
+ </aetgt:response-data>
+</aetgt:SDNCAdapterWorkflowResponse>"""
+
+String rollbackSDNCRequest =
+"""<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>f70e927b-6087-4974-9ef8-c5e4d5847ca4</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>rollback</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <aetgt:SDNCRequestData>
+ <request-information>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <request-action>CreateNetworkInstance</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <service-type>MSO-dev-service-type</service-type>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <subscriber-name>MSO_1610_dev</subscriber-name>
+ </service-information>
+ <network-information>
+ <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <onap-model-information>
+ <model-invariant-uuid>invariant-uuid</model-invariant-uuid>
+ <model-customization-uuid>customization-uuid</model-customization-uuid>
+ <model-uuid>uuid</model-uuid>
+ <model-version>version</model-version>
+ <model-name>CONTRAIL_EXTERNAL</model-name>
+ </onap-model-information>
+ </network-information>
+ <network-request-information>
+ <network-id>8abc633a-810b-4ca5-8b3a-09511d13a2ce</network-id>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <tenant>7dd5365547234ee8937416c65507d266</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ </network-request-information>
+ </aetgt:SDNCRequestData>
+</aetgt:SDNCAdapterWorkflowRequest>"""
+
+String rollbackNetworkRequest =
+"""<NetworkAdapter:rollbackNetwork xmlns:NetworkAdapter="http://org.onap.so/network">
+ <rollback>
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <networkStackId/>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <networkCreated>true</networkCreated>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <msoRequest>
+ <requestId>1ef47428-cade-45bd-a103-0751e8b2deb0</requestId>
+ <serviceInstanceId/>
+ </msoRequest>
+ </rollback>
+</NetworkAdapter:rollbackNetwork>"""
+
+// - - - - - - - -
+
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ public void initializeVariables (DelegateExecution mockExecution) {
+
+ verify(mockExecution).setVariable(Prefix + "messageId", "")
+ verify(mockExecution).setVariable("BasicAuthHeaderValuePO", "")
+ verify(mockExecution).setVariable("BasicAuthHeaderValueSDNC", "")
+ verify(mockExecution).setVariable(Prefix + "networkRequest", "")
+ verify(mockExecution).setVariable(Prefix + "networkInputs", "")
+ verify(mockExecution).setVariable(Prefix + "networkOutputs", "")
+ verify(mockExecution).setVariable(Prefix + "requestId", "")
+ verify(mockExecution).setVariable(Prefix + "source", "")
+ verify(mockExecution).setVariable(Prefix + "networkId", "")
+
+ verify(mockExecution).setVariable(Prefix + "isPONR", false)
+
+ // AAI query Cloud Region
+ verify(mockExecution).setVariable(Prefix + "queryCloudRegionRequest","")
+ verify(mockExecution).setVariable(Prefix + "queryCloudRegionReturnCode","")
+ verify(mockExecution).setVariable(Prefix + "queryCloudRegionResponse","")
+ verify(mockExecution).setVariable(Prefix + "cloudRegionPo","")
+ verify(mockExecution).setVariable(Prefix + "cloudRegionSdnc","")
+ verify(mockExecution).setVariable(Prefix + "isCloudRegionGood", false)
+
+ // AAI query Id
+ verify(mockExecution).setVariable(Prefix + "queryIdAAIRequest","")
+ verify(mockExecution).setVariable(Prefix + "queryIdAAIResponse", "")
+ verify(mockExecution).setVariable(Prefix + "aaiIdReturnCode", "")
+
+ // AAI query vpn binding
+ verify(mockExecution).setVariable(Prefix + "queryVpnBindingAAIRequest","")
+ verify(mockExecution).setVariable(Prefix + "queryVpnBindingAAIResponse", "")
+ verify(mockExecution).setVariable(Prefix + "aaiQqueryVpnBindingReturnCode", "")
+ verify(mockExecution).setVariable(Prefix + "vpnBindings", null)
+ verify(mockExecution).setVariable(Prefix + "vpnCount", 0)
+ verify(mockExecution).setVariable(Prefix + "routeCollection", "")
+
+ // AAI query network policy
+ verify(mockExecution).setVariable(Prefix + "queryNetworkPolicyAAIRequest","")
+ verify(mockExecution).setVariable(Prefix + "queryNetworkPolicyAAIResponse", "")
+ verify(mockExecution).setVariable(Prefix + "aaiQqueryNetworkPolicyReturnCode", "")
+ verify(mockExecution).setVariable(Prefix + "networkPolicyUriList", null)
+ verify(mockExecution).setVariable(Prefix + "networkPolicyCount", 0)
+ verify(mockExecution).setVariable(Prefix + "networkCollection", "")
+
+ // AAI query route table reference
+ verify(mockExecution).setVariable(Prefix + "queryNetworkTableRefAAIRequest","")
+ verify(mockExecution).setVariable(Prefix + "queryNetworkTableRefAAIResponse", "")
+ verify(mockExecution).setVariable(Prefix + "aaiQqueryNetworkTableRefReturnCode", "")
+ verify(mockExecution).setVariable(Prefix + "networkTableRefUriList", null)
+ verify(mockExecution).setVariable(Prefix + "networkTableRefCount", 0)
+ verify(mockExecution).setVariable(Prefix + "tableRefCollection", "")
+
+
+ // AAI requery Id
+ verify(mockExecution).setVariable(Prefix + "requeryIdAAIRequest","")
+ verify(mockExecution).setVariable(Prefix + "requeryIdAAIResponse", "")
+ verify(mockExecution).setVariable(Prefix + "aaiRequeryIdReturnCode", "")
+
+ // AAI update contrail
+ verify(mockExecution).setVariable(Prefix + "updateContrailAAIUrlRequest","")
+ verify(mockExecution).setVariable(Prefix + "updateContrailAAIPayloadRequest","")
+ verify(mockExecution).setVariable(Prefix + "updateContrailAAIResponse", "")
+ verify(mockExecution).setVariable(Prefix + "aaiUpdateContrailReturnCode", "")
+
+ verify(mockExecution).setVariable(Prefix + "updateNetworkRequest", "")
+ verify(mockExecution).setVariable(Prefix + "updateNetworkResponse", "")
+ verify(mockExecution).setVariable(Prefix + "rollbackNetworkRequest", "")
+ //verify(mockExecution).setVariable(Prefix + "rollbackNetworkResponse", "")
+ verify(mockExecution).setVariable(Prefix + "networkReturnCode", "")
+ //verify(mockExecution).setVariable(Prefix + "rollbackNetworkReturnCode", "")
+ verify(mockExecution).setVariable(Prefix + "isNetworkRollbackNeeded", false)
+
+ verify(mockExecution).setVariable(Prefix + "changeAssignSDNCRequest", "")
+ verify(mockExecution).setVariable(Prefix + "changeAssignSDNCResponse", "")
+ verify(mockExecution).setVariable(Prefix + "rollbackSDNCRequest", "")
+ //verify(mockExecution).setVariable(Prefix + "rollbackSDNCResponse", "")
+ verify(mockExecution).setVariable(Prefix + "sdncReturnCode", "")
+ //verify(mockExecution).setVariable(Prefix + "rollbackSDNCReturnCode", "")
+ verify(mockExecution).setVariable(Prefix + "isSdncRollbackNeeded", false)
+ verify(mockExecution).setVariable(Prefix + "sdncResponseSuccess", false)
+
+ verify(mockExecution).setVariable(Prefix + "isVnfBindingPresent", false)
+ verify(mockExecution).setVariable(Prefix + "Success", false)
+ verify(mockExecution).setVariable(Prefix + "serviceInstanceId", "")
+
+ verify(mockExecution).setVariable(Prefix + "isException", false)
+
+ }
+
+ @Test
+ //@Ignore
+ public void preProcessRequest_NetworkRequest() {
+
+ println "************ preProcessRequest_Payload ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("isBaseVfModule")).thenReturn(true)
+ when(mockExecution.getVariable("recipeTimeout")).thenReturn(0)
+ when(mockExecution.getVariable("requestAction")).thenReturn("UPDATE")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable("vnfId")).thenReturn("")
+ when(mockExecution.getVariable("volumeGroupId")).thenReturn("")
+ when(mockExecution.getVariable("networkId")).thenReturn("49c86598-f766-46f8-84f8-8d1c1b10f9b4")
+ when(mockExecution.getVariable("serviceType")).thenReturn("MOG")
+ when(mockExecution.getVariable("networkType")).thenReturn("modelName")
+ when(mockExecution.getVariable("bpmnRequest")).thenReturn(jsonIncomingRequest)
+ when(mockExecution.getVariable("sdncVersion")).thenReturn("1610")
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("mso.adapters.po.auth")).thenReturn("3141634BF7E070AA289CF2892C986C0B")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.rollback")).thenReturn("true")
+ when(mockExecution.getVariable("disableRollback")).thenReturn("true")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ DoUpdateNetworkInstance.preProcessRequest(mockExecution)
+
+// verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix + "")
+
+ //verify variable initialization
+ initializeVariables(mockExecution)
+
+ // Authentications
+ verify(mockExecution).setVariable("action", "UPDATE")
+ verify(mockExecution).setVariable(Prefix + "networkRequest", expectedNetworkRequest)
+ verify(mockExecution).setVariable(Prefix + "rollbackEnabled", false)
+ verify(mockExecution).setVariable(Prefix + "networkInputs", expectedNetworkInputs)
+ verify(mockExecution).setVariable("BasicAuthHeaderValuePO", "Basic cGFzc3dvcmQ=")
+ verify(mockExecution).setVariable("BasicAuthHeaderValueSDNC", "Basic cGFzc3dvcmQ=")
+ verify(mockExecution).setVariable(Prefix + "networkOutputs", "")
+
+ }
+
+ @Test
+ //@Ignore
+ public void preProcessRequest_vPERNetworkRequest() {
+
+ def networkModelInfo = """{"modelUuid": "sn5256d1-5a33-55df-13ab-12abad84e111",
+ "modelName": "CONTRAIL_EXTERNAL",
+ "modelType": "CONTRAIL_EXTERNAL",
+ "modelVersion": "1",
+ "modelCustomizationUuid": "sn5256d1-5a33-55df-13ab-12abad84e222",
+ "modelInvariantUuid": "sn5256d1-5a33-55df-13ab-12abad84e764"
+ }""".trim()
+
+ println "************ preProcessRequest_Payload ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("msoRequestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("disableRollback")).thenReturn("true")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable("networkId")).thenReturn("49c86598-f766-46f8-84f8-8d1c1b10f9b4") // optional
+ when(mockExecution.getVariable("networkName")).thenReturn("MNS-25180-L-01-dmz_direct_net_1") // optional
+ when(mockExecution.getVariable("productFamilyId")).thenReturn("a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb")
+ when(mockExecution.getVariable("networkModelInfo")).thenReturn("CONTRAIL_EXTERNAL")
+ when(mockExecution.getVariable("lcpCloudRegionId")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable("tenantId")).thenReturn("7dd5365547234ee8937416c65507d266")
+ when(mockExecution.getVariable("failIfExists")).thenReturn("false")
+ when(mockExecution.getVariable("networkModelInfo")).thenReturn(networkModelInfo)
+ when(mockExecution.getVariable("sdncVersion")).thenReturn("1702")
+ when(mockExecution.getVariable("action")).thenReturn("UPDATE")
+ when(mockExecution.getVariable("subscriptionServiceType")).thenReturn("MSO-dev-service-type")
+ when(mockExecution.getVariable("globalSubscriberId")).thenReturn("globalId_45678905678")
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+
+ when(mockExecution.getVariable("mso.adapters.po.auth")).thenReturn("3141634BF7E070AA289CF2892C986C0B")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ when(mockExecution.getVariable("mso.rollback")).thenReturn("true")
+ when(mockExecution.getVariable("mso.adapters.sdnc.endpoint")).thenReturn("http://localhost:8090/SDNCAdapter")
+ when(mockExecution.getVariable("mso.adapters.network.rest.endpoint")).thenReturn("http://localhost:8090/networks/NetworkAdapter")
+ when(mockExecution.getVariable("mso.adapters.sdnc.resource.endpoint")).thenReturn("http://localhost:8090/SDNCAdapterRpc")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ DoUpdateNetworkInstance.preProcessRequest(mockExecution)
+
+// verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix + "")
+
+ //verify variable initialization
+ initializeVariables(mockExecution)
+
+ // Authentications
+ verify(mockExecution).setVariable("action", "UPDATE")
+ verify(mockExecution).setVariable(Prefix + "networkRequest", expectedVperNetworkRequest)
+ verify(mockExecution).setVariable(Prefix + "rollbackEnabled", false)
+ verify(mockExecution).setVariable(Prefix + "networkInputs", expectedVperNetworkInputs)
+ verify(mockExecution).setVariable("BasicAuthHeaderValuePO", "Basic cGFzc3dvcmQ=")
+ verify(mockExecution).setVariable("BasicAuthHeaderValueSDNC", "Basic cGFzc3dvcmQ=")
+ verify(mockExecution).setVariable(Prefix + "networkOutputs", "")
+
+ }
+
+ @Test
+ //@Ignore
+ public void preProcessRequest_MissingNetworkId() {
+
+ println "************ preProcessRequest_MissingName() ************* "
+
+ WorkflowException missingNameWorkflowException = new WorkflowException("DoUpdateNetworkInstance", 2500, "Variable 'network-id' value/element is missing.")
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("isBaseVfModule")).thenReturn(true)
+ when(mockExecution.getVariable("recipeTimeout")).thenReturn(0)
+ when(mockExecution.getVariable("requestAction")).thenReturn("UPDATE")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable("vnfId")).thenReturn("")
+ when(mockExecution.getVariable("volumeGroupId")).thenReturn("")
+ //when(mockExecution.getVariable("networkId")).thenReturn("49c86598-f766-46f8-84f8-8d1c1b10f9b4")
+ when(mockExecution.getVariable("serviceType")).thenReturn("MOG")
+ when(mockExecution.getVariable("networkType")).thenReturn("modelName")
+ when(mockExecution.getVariable("bpmnRequest")).thenReturn(jsonIncomingRequest)
+ when(mockExecution.getVariable("sdncVersion")).thenReturn("1610")
+
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("mso.adapters.po.auth")).thenReturn("3141634BF7E070AA289CF2892C986C0B")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.rollback")).thenReturn("true")
+ when(mockExecution.getVariable("disableRollback")).thenReturn("true")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ try {
+ DoUpdateNetworkInstance.preProcessRequest(mockExecution)
+ } catch (Exception ex) {
+ println " Test End - Handle catch-throw BpmnError()! "
+ }
+
+ verify(mockExecution, atLeast(1)).getVariable("isDebugLogEnabled")
+ verify(mockExecution, atLeast(1)).setVariable("prefix", Prefix + "")
+
+ //verify variable initialization
+ initializeVariables(mockExecution)
+
+ verify(mockExecution).setVariable("action", "UPDATE")
+ verify(mockExecution).setVariable(Prefix + "networkRequest", expectedNetworkRequestMissingNetworkId)
+ verify(mockExecution).setVariable(Prefix + "rollbackEnabled", false)
+ verify(mockExecution).setVariable(Prefix + "networkInputs", expectedNetworkInputsMissingNetworkId)
+ verify(mockExecution).setVariable(Prefix + "messageId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ verify(mockExecution).setVariable(Prefix + "source", "VID")
+ verify(mockExecution).setVariable(Prefix + "networkOutputs", "")
+
+ verify(mockExecution).setVariable(eq("WorkflowException"), refEq(missingNameWorkflowException))
+
+ }
+
+ @Test
+ //@Ignore
+ public void preProcessRequest_MissingCloudRegion() {
+
+ println "************ preProcessRequest_MissingCloudRegion() ************* "
+
+ WorkflowException missingCloudRegionWorkflowException = new WorkflowException("DoUpdateNetworkInstance", 2500, "requestDetails has missing 'aic-cloud-region' value/element.")
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("isBaseVfModule")).thenReturn(true)
+ when(mockExecution.getVariable("recipeTimeout")).thenReturn(0)
+ when(mockExecution.getVariable("requestAction")).thenReturn("UPDATE")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable("vnfId")).thenReturn("")
+ when(mockExecution.getVariable("volumeGroupId")).thenReturn("")
+ when(mockExecution.getVariable("networkId")).thenReturn("networkId")
+ when(mockExecution.getVariable("serviceType")).thenReturn("MOG")
+ when(mockExecution.getVariable("networkType")).thenReturn("modelName")
+
+ when(mockExecution.getVariable("bpmnRequest")).thenReturn(jsonIncomingRequest_MissingCloudRegion)
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("mso.adapters.po.auth")).thenReturn("3141634BF7E070AA289CF2892C986C0B")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.rollback")).thenReturn("true")
+ when(mockExecution.getVariable("disableRollback")).thenReturn("true")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ try {
+ DoUpdateNetworkInstance.preProcessRequest(mockExecution)
+ } catch (Exception ex) {
+ println " Test End - Handle catch-throw BpmnError()! "
+ }
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution, atLeast(1)).getVariable("isDebugLogEnabled")
+ verify(mockExecution, atLeast(1)).setVariable("prefix", Prefix + "")
+
+ //verify variable initialization
+ initializeVariables(mockExecution)
+
+ verify(mockExecution).setVariable("action", "UPDATE")
+ verify(mockExecution).setVariable(Prefix + "networkRequest", expectedNetworkRequestMissingCloudRegion)
+ verify(mockExecution).setVariable(Prefix + "rollbackEnabled", false)
+ verify(mockExecution).setVariable(Prefix + "networkInputs", expectedNetworkInputMissingCloudRegion)
+ verify(mockExecution).setVariable(Prefix + "messageId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ verify(mockExecution).setVariable(Prefix + "source", "VID")
+
+ verify(mockExecution).setVariable(eq("WorkflowException"), refEq(missingCloudRegionWorkflowException))
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareUpdateNetworkRequest() {
+
+ println "************ prepareNetworkRequest ************* "
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedVperNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "requeryIdAAIResponse")).thenReturn(queryIdAIIResponse)
+ when(mockExecution.getVariable(Prefix + "cloudRegionPo")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("messageId_generated")
+ when(mockExecution.getVariable(Prefix + "source")).thenReturn("VID")
+ //when(mockExecution.getVariable(Prefix + "queryVpnBindingAAIResponse")).thenReturn(queryVpnBindingAAIResponse)
+ when(mockExecution.getVariable(Prefix + "routeCollection")).thenReturn("<routeTargets>13979:105757</routeTargets><routeTargets>13979:105757</routeTargets>")
+ when(mockExecution.getVariable(Prefix + "networkCollection")).thenReturn("<policyFqdns>GN_EVPN_Test</policyFqdns>")
+ when(mockExecution.getVariable(Prefix + "tableRefCollection")).thenReturn("<routeTableFqdns>refFQDN1</routeTableFqdns><routeTableFqdns>refFQDN2</routeTableFqdns>")
+ when(mockExecution.getVariable(Prefix + "requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ //when(mockExecution.getVariable("URN_?????")).thenReturn("") // notificationUrl, //TODO - is this coming from URN? What variable/value to use?
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "rollbackEnabled")).thenReturn("true")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ DoUpdateNetworkInstance.prepareUpdateNetworkRequest(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ verify(mockExecution).setVariable("prefix", Prefix + "")
+
+ verify(mockExecution).setVariable(Prefix + "updateNetworkRequest", updateNetworkRequest)
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void prepareUpdateNetworkRequest_NoPhysicalname() {
+
+ println "************ prepareNetworkRequest ************* "
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(NetworkRequest_noPhysicalName)
+ when(mockExecution.getVariable(Prefix + "requeryIdAAIResponse")).thenReturn(queryIdAIIResponse)
+ when(mockExecution.getVariable(Prefix + "cloudRegionPo")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("messageId_generated")
+ when(mockExecution.getVariable(Prefix + "source")).thenReturn("VID")
+ //when(mockExecution.getVariable(Prefix + "queryVpnBindingAAIResponse")).thenReturn(queryVpnBindingAAIResponse)
+ when(mockExecution.getVariable(Prefix + "routeCollection")).thenReturn("<routeTargets>13979:105757</routeTargets><routeTargets>13979:105757</routeTargets>")
+ when(mockExecution.getVariable(Prefix + "networkCollection")).thenReturn("<policyFqdns>GN_EVPN_Test</policyFqdns>")
+ when(mockExecution.getVariable(Prefix + "tableRefCollection")).thenReturn("")
+ when(mockExecution.getVariable(Prefix + "requestId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ //when(mockExecution.getVariable("URN_?????")).thenReturn("") // notificationUrl, //TODO - is this coming from URN? What variable/value to use?
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "rollbackEnabled")).thenReturn("true")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ DoUpdateNetworkInstance.prepareUpdateNetworkRequest(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ verify(mockExecution).setVariable("prefix", Prefix + "")
+
+ verify(mockExecution).setVariable(Prefix + "updateNetworkRequest", updateNetworkRequest_noPhysicalName)
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareSDNCRequest() {
+
+ println "************ prepareSDNCRequest ************* "
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "cloudRegionSdnc")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(Prefix + "serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable(Prefix + "queryIdAAIResponse")).thenReturn(aaiResponse)
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("testMessageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:8090/SDNCAdapterCallback")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("GENGSI_siResourceLink")).thenReturn("https://aai-int1.test.com:8443/aai/v8/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/6d4eb22a-82f1-4257-9f80-4176262cfe69/")
+
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ DoUpdateNetworkInstance.prepareSDNCRequest(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ verify(mockExecution).setVariable("prefix", Prefix + "")
+ verify(mockExecution).setVariable(Prefix + "changeAssignSDNCRequest", changeAssignSDNCRequest)
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareSDNCRollbackRequest() {
+
+ println "************ prepareSDNCRollbackRequest ************* "
+
+
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "cloudRegionSdnc")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(Prefix + "serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+ when(mockExecution.getVariable(Prefix + "changeAssignSDNCResponse")).thenReturn(assignResponse)
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("testMessageId")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:8090/SDNCAdapterCallback")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("GENGSI_siResourceLink")).thenReturn("https://aai-int1.test.com:8443/aai/v8/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/6d4eb22a-82f1-4257-9f80-4176262cfe69/")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ DoUpdateNetworkInstance.prepareSDNCRollbackRequest(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ verify(mockExecution).setVariable("prefix", Prefix + "")
+ verify(mockExecution).setVariable(Prefix + "WorkflowException", null)
+ verify(mockExecution).setVariable(Prefix + "rollbackSDNCRequest", sdncRollbackRequest)
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkId_200() {
+
+ println "************ callRESTQueryAAINetworkId ************* "
+
+ WireMock.reset();
+ MockGetNetworkByIdWithDepth("49c86598-f766-46f8-84f8-8d1c1b10f9b4", "UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_Success.xml", "all");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ when(mockExecution.getVariable("mso.workflow.DoUpdateNetworkInstance.aai.l3-network.uri")).thenReturn("/aai/v9/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ DoUpdateNetworkInstance.callRESTQueryAAINetworkId(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix + "")
+ verify(mockExecution).setVariable(Prefix + "queryIdAAIRequest", "http://localhost:8090/aai/v9/network/l3-networks/l3-network/49c86598-f766-46f8-84f8-8d1c1b10f9b4"+"?depth=all")
+ verify(mockExecution).setVariable(Prefix + "aaiIdReturnCode", "200")
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAICloudRegion30_200() {
+
+ println "************ callRESTQueryAAICloudRegion30_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkCloudRegion("CreateNetworkV2/cloudRegion30_AAIResponse_Success.xml", "RDM2WAGPLCP");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix + "")
+ when(mockExecution.getVariable(Prefix + "networkInputs")).thenReturn(expectedNetworkRequest)
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.cloud-region.uri")).thenReturn("/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ DoUpdateNetworkInstance.callRESTQueryAAICloudRegion(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution, atLeast(1)).setVariable("prefix", Prefix + "")
+ verify(mockExecution, atLeast(2)).setVariable(Prefix + "queryCloudRegionReturnCode", "200")
+ verify(mockExecution).setVariable(Prefix + "isCloudRegionGood", true)
+
+ }
+
+ @Test
+ public void callRESTQueryAAICloudRegion25_200() {
+
+ println "************ callRESTQueryAAICloudRegion25_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkCloudRegion("CreateNetworkV2/cloudRegion25_AAIResponse_Success.xml", "RDM2WAGPLCP");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix + "")
+ when(mockExecution.getVariable(Prefix + "networkInputs")).thenReturn(expectedNetworkRequest)
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.cloud-region.uri")).thenReturn("/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ DoUpdateNetworkInstance.callRESTQueryAAICloudRegion(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution, atLeast(1)).setVariable("prefix", Prefix + "")
+ verify(mockExecution).setVariable(Prefix + "isCloudRegionGood", true)
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAICloudRegion_NotFound() {
+
+ println "************ callRESTQueryAAICloudRegionFake ************* "
+
+ WireMock.reset();
+ MockGetNetworkCloudRegion_404("MDTWNJ21");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix + "")
+ when(mockExecution.getVariable(Prefix + "networkInputs")).thenReturn(vnfRequestFakeRegion)
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.cloud-region.uri")).thenReturn("/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ DoUpdateNetworkInstance.callRESTQueryAAICloudRegion(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution, atLeast(1)).setVariable("prefix", Prefix + "")
+ verify(mockExecution, atLeast(1)).setVariable(Prefix + "queryCloudRegionReturnCode", "404")
+ verify(mockExecution).setVariable(Prefix + "cloudRegionPo", "MDTWNJ21")
+ verify(mockExecution).setVariable(Prefix + "cloudRegionSdnc", "AAIAIC25")
+ verify(mockExecution).setVariable(Prefix + "isCloudRegionGood", true)
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkVpnBinding_200() {
+
+ println "************ callRESTQueryAAINetworkVpnBinding_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkVpnBinding("UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", "85f015d0-2e32-4c30-96d2-87a1a27f8017");
+ MockGetNetworkVpnBinding("UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", "c980a6ef-3b88-49f0-9751-dbad8608d0a6");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "requeryIdAAIResponse")).thenReturn(queryIdAIIResponse) // v6
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.vpn-binding.uri")).thenReturn("/aai/v8/network/vpn-bindings/vpn-binding")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ DoUpdateNetworkInstance.callRESTQueryAAINetworkVpnBinding(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix + "")
+ verify(mockExecution).setVariable(Prefix + "vpnCount", 2)
+ verify(mockExecution).setVariable(Prefix + "vpnBindings", ['/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/', '/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/'])
+ // the last vpnBinding value is saved.
+ verify(mockExecution).setVariable(Prefix + "queryVpnBindingAAIRequest", "http://localhost:8090/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017?depth=all")
+ verify(mockExecution, atLeast(2)).setVariable(Prefix + "aaiQqueryVpnBindingReturnCode", "200")
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkVpnBindingList_200() {
+
+ println "************ callRESTQueryAAINetworkVpnBinding_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkVpnBinding("UpdateNetworkV2/updateNetwork_queryVpnBindingList_AAIResponse_Success.xml", "85f015d0-2e32-4c30-96d2-87a1a27f8017");
+ MockGetNetworkVpnBinding("UpdateNetworkV2/updateNetwork_queryVpnBindingList_AAIResponse_Success.xml", "c980a6ef-3b88-49f0-9751-dbad8608d0a6");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "requeryIdAAIResponse")).thenReturn(queryIdAIIResponse) // v6
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.vpn-binding.uri")).thenReturn("/aai/v8/network/vpn-bindings/vpn-binding")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ DoUpdateNetworkInstance.callRESTQueryAAINetworkVpnBinding(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix + "")
+ verify(mockExecution).setVariable(Prefix + "vpnCount", 2)
+ verify(mockExecution).setVariable(Prefix + "vpnBindings", ['/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/', '/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/'])
+ // the last vpnBinding value is saved.
+ verify(mockExecution).setVariable(Prefix + "queryVpnBindingAAIRequest", "http://localhost:8090/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017?depth=all")
+ verify(mockExecution, atLeast(2)).setVariable(Prefix + "aaiQqueryVpnBindingReturnCode", "200")
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkVpnBinding_TestScenario01_200() {
+
+ println "************ callRESTQueryAAINetworkVpnBinding_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkVpnBinding("UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", "85f015d0-2e32-4c30-96d2-87a1a27f8017");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "requeryIdAAIResponse")).thenReturn(queryIdAIIResponseTestScenario01)
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.vpn-binding.uri")).thenReturn("/aai/v8/network/vpn-bindings/vpn-binding")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ DoUpdateNetworkInstance.callRESTQueryAAINetworkVpnBinding(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix + "")
+ verify(mockExecution).setVariable(Prefix + "vpnCount", 1)
+ verify(mockExecution).setVariable(Prefix + "vpnBindings", ['/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/'])
+ // the last vpnBinding value is saved.
+ verify(mockExecution).setVariable(Prefix + "queryVpnBindingAAIRequest", "http://localhost:8090/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017?depth=all")
+ verify(mockExecution).setVariable(Prefix + "aaiQqueryVpnBindingReturnCode", "200")
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkVpnBinding_200_URN_Uri() {
+
+ println "************ callRESTQueryAAINetworkVpnBinding_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkVpnBinding("UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", "85f015d0-2e32-4c30-96d2-87a1a27f8017");
+ MockGetNetworkVpnBinding("UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", "c980a6ef-3b88-49f0-9751-dbad8608d0a6");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "requeryIdAAIResponse")).thenReturn(queryIdAIIResponse)
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.vpn-binding.uri")).thenReturn("/aai/v8/network/vpn-bindings/vpn-binding")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ DoUpdateNetworkInstance.callRESTQueryAAINetworkVpnBinding(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix + "")
+ verify(mockExecution).setVariable(Prefix + "vpnCount", 2)
+ verify(mockExecution).setVariable(Prefix + "vpnBindings", ['/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/', '/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/'])
+ // the last vpnBinding value is saved.
+ verify(mockExecution).setVariable(Prefix + "queryVpnBindingAAIRequest", "http://localhost:8090/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017?depth=all")
+ verify(mockExecution, atLeast(2)).setVariable(Prefix + "aaiQqueryVpnBindingReturnCode", "200")
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkVpnBinding_NotPresent() {
+
+ println "************ callRESTQueryAAINetworkVpnBinding_NotPresent ************* "
+
+ WireMock.reset();
+ MockGetNetworkVpnBinding("UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml", "85f015d0-2e32-4c30-96d2-87a1a27f8017");
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+
+ when(mockExecution.getVariable(Prefix + "requeryIdAAIResponse")).thenReturn(queryIdAIIResponseVpnNotPresent)
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.l3-network.uri")).thenReturn("/aai/v8/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ DoUpdateNetworkInstance.callRESTQueryAAINetworkVpnBinding(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix + "")
+ verify(mockExecution).setVariable(Prefix + "aaiQqueryVpnBindingReturnCode", "200")
+ verify(mockExecution).setVariable(Prefix + "vpnCount", 0)
+ verify(mockExecution).setVariable(Prefix + "queryVpnBindingAAIResponse", aaiVpnResponseStub)
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkTableRef_200() {
+
+ println "************ callRESTQueryAAINetworkTableRef_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkTableReference("UpdateNetworkV2/updateNetwork_queryNetworkTableRef1_AAIResponse_Success.xml", "refFQDN1");
+ MockGetNetworkTableReference("UpdateNetworkV2/updateNetwork_queryNetworkTableRef2_AAIResponse_Success.xml", "refFQDN2");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "requeryIdAAIResponse")).thenReturn(queryIdAIIResponse)
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ when(mockExecution.getVariable("mso.workflow.default.aai.network-table-reference.uri")).thenReturn("")
+ when(mockExecution.getVariable("mso.workflow.DoUpdateNetworkInstance.aai.route-table-reference.uri")).thenReturn("/aai/v8/network/route-table-references/route-table-reference")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ DoUpdateNetworkInstance.callRESTQueryAAINetworkTableRef(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix + "")
+ verify(mockExecution).setVariable(Prefix + "networkTableRefCount", 2)
+ verify(mockExecution).setVariable(Prefix + "networkTableRefUriList", ['/aai/v8/network/route-table-references/route-table-reference/refFQDN1','/aai/v8/network/route-table-references/route-table-reference/refFQDN2'])
+ // the last vpnBinding value is saved.
+ verify(mockExecution).setVariable(Prefix + "queryNetworkTableRefAAIRequest", "http://localhost:8090/aai/v8/network/route-table-references/route-table-reference/refFQDN1?depth=all")
+ verify(mockExecution, atLeast(2)).setVariable(Prefix + "aaiQqueryNetworkTableRefReturnCode", "200")
+
+ }
+
+ @Test
+ //@Ignore
+ public void callRESTQueryAAINetworkPolicy_200() {
+
+ println "************ callRESTQueryAAINetworkPolicy_200 ************* "
+
+ WireMock.reset();
+ MockGetNetworkPolicy("UpdateNetworkV2/updateNetwork_queryNetworkPolicy_AAIResponse_Success.xml", "cee6d136-e378-4678-a024-2cd15f0ee0cg");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "requeryIdAAIResponse")).thenReturn(queryIdAIIResponse)
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.network-policy.uri")).thenReturn("/aai/v8/network/network-policies/network-policy")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ DoUpdateNetworkInstance.callRESTQueryAAINetworkPolicy(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix + "")
+ verify(mockExecution).setVariable(Prefix + "networkPolicyCount", 1)
+ verify(mockExecution).setVariable(Prefix + "networkPolicyUriList", ['/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg'])
+ // the last vpnBinding value is saved.
+ verify(mockExecution).setVariable(Prefix + "queryNetworkPolicyAAIRequest", "http://localhost:8090/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg?depth=all")
+ verify(mockExecution).setVariable(Prefix + "aaiQqueryNetworkPolicyReturnCode", "200")
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void callRESTReQueryAAINetworkId_200() {
+
+ println "************ callRESTReQueryAAINetworkId ************* "
+
+ WireMock.reset();
+ MockGetNetworkByIdWithDepth("49c86598-f766-46f8-84f8-8d1c1b10f9b4", "UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_Success.xml", "all");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "changeAssignSDNCResponse")).thenReturn(sdncAdapterWorkflowFormattedResponse)
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ when(mockExecution.getVariable("mso.workflow.DoUpdateNetworkInstance.aai.l3-network.uri")).thenReturn("/aai/v9/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ DoUpdateNetworkInstance.callRESTReQueryAAINetworkId(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix + "")
+ verify(mockExecution).setVariable(Prefix + "requeryIdAAIRequest", "http://localhost:8090/aai/v9/network/l3-networks/l3-network/49c86598-f766-46f8-84f8-8d1c1b10f9b4"+"?depth=all")
+ verify(mockExecution).setVariable(Prefix + "aaiRequeryIdReturnCode", "200")
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void callRESTUpdateContrailAAINetworkREST_200() {
+
+ println "************ callRESTUpdateContrailAAINetwork ************* "
+
+ WireMock.reset();
+ MockPutNetworkIdWithDepth("UpdateNetworkV2/updateNetwork_updateContrail_AAIResponse_Success.xml", "49c86598-f766-46f8-84f8-8d1c1b10f9b4", "all");
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedNetworkRequest)
+ when(mockExecution.getVariable(Prefix + "changeAssignSDNCResponse")).thenReturn(sdncAdapterWorkflowFormattedResponse)
+ when(mockExecution.getVariable(Prefix + "requeryIdAAIResponse")).thenReturn(queryIdAIIResponse)
+ when(mockExecution.getVariable(Prefix + "updateNetworkResponse")).thenReturn(updateNetworkResponseREST)
+ when(mockExecution.getVariable(Prefix + "messageId")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
+ when(mockExecution.getVariable("mso.workflow.DoUpdateNetworkInstance.aai.l3-network.uri")).thenReturn("/aai/v9/network/l3-networks/l3-network")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ DoUpdateNetworkInstance.callRESTUpdateContrailAAINetwork(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix + "")
+ verify(mockExecution).setVariable(Prefix + "updateContrailAAIUrlRequest", "http://localhost:8090/aai/v9/network/l3-networks/l3-network/49c86598-f766-46f8-84f8-8d1c1b10f9b4"+"?depth=all")
+ verify(mockExecution).setVariable(Prefix + "updateContrailAAIPayloadRequest", updateContrailAAIPayloadRequest)
+ verify(mockExecution).setVariable(Prefix + "aaiUpdateContrailReturnCode", "200")
+ //verify(mockExecution).setVariable(Prefix + "updateContrailAAIResponse", updateContrailAAIResponse)
+ verify(mockExecution).setVariable(Prefix + "isPONR", true)
+
+ }
+
+
+
+ @Test
+ //@Ignore
+ public void validateUpdateNetworkResponseREST() {
+
+ println "************ validateNetworkResponse ************* "
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "updateNetworkResponse")).thenReturn(updateNetworkResponseREST)
+ when(mockExecution.getVariable(Prefix + "networkReturnCode")).thenReturn('200')
+
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ DoUpdateNetworkInstance.validateUpdateNetworkResponse(mockExecution)
+
+ //MockitoDebuggerImpl debugger = new MockitoDebuggerImpl()
+ //debugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix + "")
+ verify(mockExecution).setVariable(Prefix + "updateNetworkResponse", updateNetworkResponseREST)
+ verify(mockExecution).setVariable(Prefix + "isNetworkRollbackNeeded", true)
+ verify(mockExecution).setVariable(Prefix + "rollbackNetworkRequest", updateRollbackNetworkRequest)
+
+ }
+
+ @Test
+ //@Ignore
+ public void validateUpdateNetworkResponseREST_Error() {
+
+ println "************ validateNetworkResponse ************* "
+
+ WorkflowException workflowException = new WorkflowException("DoUpdateNetworkInstance", 2500, "Received error from Network Adapter: JBWEB000065: HTTP Status 500.")
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "updateNetworkResponse")).thenReturn(networkException500)
+ when(mockExecution.getVariable(Prefix + "networkReturnCode")).thenReturn('500')
+
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ try {
+ DoUpdateNetworkInstance.validateUpdateNetworkResponse(mockExecution)
+ } catch (Exception ex) {
+ println " Test End - Handle catch-throw BpmnError()! "
+ }
+
+ verify(mockExecution).setVariable("prefix", Prefix + "")
+ verify(mockExecution, atLeast(1)).setVariable("WorkflowException", refEq(workflowException, any(WorkflowException.class)))
+
+ }
+
+ @Test
+ //@Ignore
+ public void validateSDNCResponse() {
+
+ println "************ validateSDNCResponse ************* "
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "changeAssignSDNCResponse")).thenReturn(sdncAdapterWorkflowResponse)
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix + "")
+ when(mockExecution.getVariable("SDNCA_SuccessIndicator")).thenReturn(true)
+ when(mockExecution.getVariable(Prefix + "sdncReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable(Prefix + "isResponseGood")).thenReturn(true)
+
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ try {
+ DoUpdateNetworkInstance.validateSDNCResponse(mockExecution)
+ verify(mockExecution).setVariable(Prefix + "isSdncRollbackNeeded", true)
+ verify(mockExecution).setVariable(Prefix + "rollbackSDNCRequest", "")
+
+ } catch (Exception ex) {
+ println " Graceful Exit - " + ex.getMessage()
+ }
+ //MockitoDebuggerImpl debugger = new MockitoDebuggerImpl()
+ //debugger.printInvocations(mockExecution)
+
+ //verify(mockExecution).setVariable(Prefix + "isSdncRollbackNeeded", true)
+
+ }
+
+ @Test
+ //@Ignore
+ public void validateSDNCResponse_Error() {
+
+ println "************ validateSDNCResponse ************* "
+ //ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "changeAssignSDNCResponse")).thenReturn(sdncAdapterWorkflowResponse_Error)
+ when(mockExecution.getVariable("prefix")).thenReturn(Prefix + "")
+ when(mockExecution.getVariable("SDNCA_SuccessIndicator")).thenReturn(false)
+ when(mockExecution.getVariable(Prefix + "sdncReturnCode")).thenReturn("200")
+ when(mockExecution.getVariable(Prefix + "isResponseGood")).thenReturn(true)
+
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ try {
+ DoUpdateNetworkInstance.validateSDNCResponse(mockExecution)
+ } catch (Exception ex) {
+ println " Graceful Exit! - " + ex.getMessage()
+ }
+ //MockitoDebuggerImpl debugger = new MockitoDebuggerImpl()
+ //debugger.printInvocations(mockExecution)
+
+ // verify set prefix = Prefix + ""
+ //verify(mockExecution).setVariable(Prefix + "sdncResponseSuccess", false)
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareRollbackData() {
+
+ println "************ prepareRollbackData() ************* "
+
+
+
+ WorkflowException workflowException = new WorkflowException("DoUpdateNetworkInstance", 2500, "Received error from Network Adapter: JBWEB000065: HTTP Status 500.")
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCRequest")).thenReturn(rollbackSDNCRequest)
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkRequest")).thenReturn(rollbackNetworkRequest)
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(workflowException)
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ DoUpdateNetworkInstance.prepareRollbackData(mockExecution)
+
+// verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ }
+
+ @Test
+ //@Ignore
+ public void postProcessResponse() {
+
+ println "************ postProcessResponse() ************* "
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(Prefix + "isException")).thenReturn(false)
+ when(mockExecution.getVariable("sdncVersion")).thenReturn("1610")
+ when(mockExecution.getVariable(Prefix + "rollbackSDNCRequest")).thenReturn(rollbackSDNCRequest)
+ when(mockExecution.getVariable(Prefix + "rollbackNetworkRequest")).thenReturn(rollbackSDNCRequest)
+ when(mockExecution.getVariable(Prefix + "networkRequest")).thenReturn(expectedNetworkRequest)
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("requestId")
+
+ // preProcessRequest(DelegateExecution execution)
+ DoUpdateNetworkInstance DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+ DoUpdateNetworkInstance.postProcessResponse(mockExecution)
+
+// verify(mockExecution, atLeast(3)).getVariable("isDebugLogEnabled")
+ verify(mockExecution, atLeast(3)).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "Success", true)
+
+ }
+
+ private ExecutionEntity setupMock() {
+
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("DoUpdateNetworkInstance")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("DoUpdateNetworkInstance")
+ when(mockRepositoryService.getProcessDefinition().getId()).thenReturn("100")
+ ProcessEngineServices mockProcessEngineServices = mock(ProcessEngineServices.class)
+ when(mockProcessEngineServices.getRepositoryService()).thenReturn(mockRepositoryService)
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+
+ when(mockExecution.getId()).thenReturn("100")
+ when(mockExecution.getProcessDefinitionId()).thenReturn("DoUpdateNetworkInstance")
+ when(mockExecution.getProcessInstanceId()).thenReturn("DoUpdateNetworkInstance")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+
+ return mockExecution
+ }
+
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModuleTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModuleTest.groovy
new file mode 100644
index 0000000000..beaebceaf7
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModuleTest.groovy
@@ -0,0 +1,309 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.scripts
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+import org.camunda.bpm.engine.ProcessEngineServices
+import org.camunda.bpm.engine.RepositoryService
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.camunda.bpm.engine.repository.ProcessDefinition
+import org.junit.Assert
+import org.junit.Before
+import org.junit.Ignore
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.ArgumentCaptor
+import org.mockito.Captor
+import org.mockito.Mockito
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+import org.onap.so.bpmn.common.scripts.VfModule
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.mock.FileUtil
+
+import static com.github.tomakehurst.wiremock.client.WireMock.*
+import static org.mockito.Mockito.*
+import org.onap.so.bpmn.common.scripts.utils.XmlComparator
+
+@RunWith(MockitoJUnitRunner.class)
+class DoUpdateVfModuleTest {
+
+ def prefix = "DOUPVfMod_"
+ String doUpdateVfModuleRequest = FileUtil.readResourceFile("__files/VfModularity/DoUpdateVfModuleRequest.xml");
+ String sdncChangeAssignRequest = FileUtil.readResourceFile("__files/DoUpdateVfModule/sdncChangeAssignRequest.xml")
+ String sdncTopologyRequest = FileUtil.readResourceFile("__files/DoUpdateVfModule/sdncTopologyRequest.xml")
+
+ @Captor
+ static ArgumentCaptor<ExecutionEntity> captor = ArgumentCaptor.forClass(ExecutionEntity.class)
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(28090);
+
+ @Before
+ public void init() {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ @Test
+ void testPreProcessRequest() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(prefix)
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("DoUpdateVfModuleRequest")).thenReturn(doUpdateVfModuleRequest)
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:28080/mso/SDNCAdapterCallbackService")
+
+ DoUpdateVfModule obj = new DoUpdateVfModule()
+ obj.preProcessRequest(mockExecution)
+
+ Mockito.verify(mockExecution, atLeastOnce()).getVariable("mso.workflow.sdncadapter.callback")
+ }
+
+
+
+ @Test
+ void testPrepConfirmVolumeGroupTenant() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(prefix)
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(prefix + "aicCloudRegion")).thenReturn("att-aic")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.cloud-region.uri")).thenReturn("/aai/v8/cloud-infrastructure/cloud-regions/cloud-region")
+ when(mockExecution.getVariable("mso.workflow.default.aai.cloud-region.version")).thenReturn("8")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
+
+ mockData()
+ DoUpdateVfModule obj = new DoUpdateVfModule()
+ obj.prepConfirmVolumeGroupTenant(mockExecution)
+
+ Mockito.verify(mockExecution).setVariable(prefix + "queryCloudRegionRequest", "http://localhost:28090/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic")
+ Mockito.verify(mockExecution).setVariable(prefix + "queryCloudRegionReturnCode", "200")
+ Mockito.verify(mockExecution).setVariable(prefix + "cloudRegionForVolume", "AAIAIC25")
+ Mockito.verify(mockExecution).setVariable(prefix + "isCloudRegionGood", true)
+ }
+
+
+ @Test
+ void testPrepSDNCTopologyChg() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(prefix)
+ when(mockExecution.getVariable(prefix + "requestId")).thenReturn("12345")
+ when(mockExecution.getVariable("testReqId")).thenReturn("testReqId")
+
+
+ when(mockExecution.getVariable(prefix + "cloudSiteId")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(prefix + "vfModuleId")).thenReturn("cb510af0-5b21-4bc7-86d9-323cb396ce32")
+ when(mockExecution.getVariable("volumeGroupStackId")).thenReturn("12345")
+ when(mockExecution.getVariable(prefix + "vfModuleName")).thenReturn("PCRF::module-0-2")
+ when(mockExecution.getVariable(prefix + "aicCloudRegion")).thenReturn("MDTWNJ21")
+ when(mockExecution.getVariable(prefix + "usePreload")).thenReturn("Y")
+ when(mockExecution.getVariable(prefix + "vnfNameFromAAI")).thenReturn("skask-test")
+
+ def node = new Node(null, 'vfModule')
+ new Node(node, 'vf-module-name', "abc")
+ VfModule vfModule = new VfModule(node, true);
+ when(mockExecution.getVariable(prefix + "vfModule")).thenReturn(vfModule)
+
+ when(mockExecution.getVariable(prefix + "tenantId")).thenReturn("fba1bd1e195a404cacb9ce17a9b2b421")
+ when(mockExecution.getVariable(prefix + "vnfType")).thenReturn("vRRaas")
+ when(mockExecution.getVariable(prefix + "vnfName")).thenReturn("skask-test")
+ when(mockExecution.getVariable(prefix + "vnfId")).thenReturn("skask")
+ when(mockExecution.getVariable(prefix + "vfModuleModelName")).thenReturn("PCRF::module-0-2")
+ when(mockExecution.getVariable(prefix + "requestId")).thenReturn("testRequestId")
+ when(mockExecution.getVariable(prefix + "serviceId")).thenReturn("12345")
+ when(mockExecution.getVariable(prefix + "serviceInstanceId")).thenReturn("MIS/1604/0026/SW_INTERNET")
+ Map<String, String> map = new HashMap<String, String>();
+ map.put("vrr_image_name", "MDT17");
+ map.put("availability_zone_0", "nova");
+ map.put("vrr_flavor_name", "ns.c16r32d128.v1");
+ when(mockExecution.getVariable("vnfParamsMap")).thenReturn(map)
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("testRequestId-1503410089303")
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:8090/SDNCAdapter")
+
+ mockData()
+ DoUpdateVfModule obj = new DoUpdateVfModule()
+ obj.prepSDNCTopologyChg(mockExecution)
+
+ Mockito.verify(mockExecution).setVariable(prefix + "vnfName", "skask-test")
+
+ Mockito.verify(mockExecution, times(2)).setVariable(captor.capture(), captor.capture())
+ XmlComparator.assertXMLEquals(sdncChangeAssignRequest, captor.getValue())
+ }
+
+
+
+ @Test
+ void testPrepSDNCTopologyQuery() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(prefix)
+ when(mockExecution.getVariable("testReqId")).thenReturn("testReqId")
+ when(mockExecution.getVariable(prefix + "vfModuleId")).thenReturn("12345")
+ when(mockExecution.getVariable(prefix + "serviceId")).thenReturn("12345")
+ when(mockExecution.getVariable(prefix + "serviceInstanceId")).thenReturn("MIS/1604/0026/SW_INTERNET")
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:8090/SDNCAdapter")
+
+ mockData()
+ DoUpdateVfModule obj = new DoUpdateVfModule()
+ obj.prepSDNCTopologyQuery(mockExecution)
+
+ Mockito.verify(mockExecution, times(1)).setVariable(captor.capture(), captor.capture())
+ XmlComparator.assertXMLEquals(sdncTopologyRequest, captor.getValue())
+ }
+
+
+
+ @Test
+ void testPrepVnfAdapterRest() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(prefix)
+ when(mockExecution.getVariable(prefix + "aicCloudRegion")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(prefix + "vfModuleId")).thenReturn("cb510af0-5b21-4bc7-86d9-323cb396ce32")
+ when(mockExecution.getVariable(prefix + "volumeGroupStackId")).thenReturn("12345")
+ when(mockExecution.getVariable(prefix + "vfModuleName")).thenReturn("PCRF::module-0-2")
+ when(mockExecution.getVariable(prefix + "tenantId")).thenReturn("fba1bd1e195a404cacb9ce17a9b2b421")
+ when(mockExecution.getVariable(prefix + "vnfType")).thenReturn("vRRaas")
+ when(mockExecution.getVariable(prefix + "vnfName")).thenReturn("skask-test")
+ when(mockExecution.getVariable(prefix + "vnfId")).thenReturn("skask")
+ when(mockExecution.getVariable(prefix + "vfModuleModelName")).thenReturn("PCRF::module-0-2")
+ when(mockExecution.getVariable(prefix + "vfModuleIndex")).thenReturn("index")
+ when(mockExecution.getVariable(prefix + "requestId")).thenReturn("testRequestId")
+ when(mockExecution.getVariable(prefix + "serviceId")).thenReturn("12345")
+ when(mockExecution.getVariable(prefix + "serviceInstanceId")).thenReturn("MIS/1604/0026/SW_INTERNET")
+ when(mockExecution.getVariable(prefix + "backoutOnFailure")).thenReturn("12345")
+ when(mockExecution.getVariable(prefix + "volumeGroupId")).thenReturn("12345")
+ when(mockExecution.getVariable(prefix + "asdcServiceModelVersion")).thenReturn("1.0")
+ when(mockExecution.getVariable(prefix + "modelCustomizationUuid")).thenReturn("cb510af0-5b21-4bc7-86d9-323cb396ced3")
+ when(mockExecution.getVariable(prefix + "baseVfModuleId")).thenReturn("12345")
+ when(mockExecution.getVariable(prefix + "baseVfModuleHeatStackId")).thenReturn("12345")
+
+ def node = new Node(null, 'vfModule')
+ new Node(node, 'heat-stack-id', "abc")
+ VfModule vfModule = new VfModule(node, true);
+ when(mockExecution.getVariable(prefix + "vfModule")).thenReturn(vfModule)
+
+ String sdncGetResponse = FileUtil.readResourceFile("__files/DoUpdateVfModule/sdncGetResponse.xml");
+ when(mockExecution.getVariable(prefix + "sdncTopologyResponse")).thenReturn(sdncGetResponse)
+ Map<String, String> map = new HashMap<String, String>();
+ map.put("vrr_image_name", "MDT17");
+ map.put("availability_zone_0", "nova");
+ map.put("vrr_flavor_name", "ns.c16r32d128.v1");
+ when(mockExecution.getVariable(prefix + "vnfParamsMap")).thenReturn(map)
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("testRequestId-1503410089303")
+ when(mockExecution.getVariable("mso.use.qualified.host")).thenReturn("true")
+ when(mockExecution.getVariable("mso.workflow.message.endpoint")).thenReturn("http://localhost:28080/mso/WorkflowMesssage")
+
+ mockData()
+ DoUpdateVfModule obj = new DoUpdateVfModule()
+ obj.prepVnfAdapterRest(mockExecution)
+
+ String createVnfARequest = FileUtil.readResourceFile("__files/DoUpdateVfModule/vnfAdapterRestRequest.xml")
+ Mockito.verify(mockExecution, times(1)).setVariable(captor.capture(), captor.capture())
+ XmlComparator.assertXMLEquals(createVnfARequest, captor.getValue(), "messageId", "notificationUrl")
+ }
+
+
+
+ @Test
+ void testPrepSDNCTopologyAct() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(prefix)
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(prefix + "aicCloudRegion")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable("testReqId")).thenReturn("testReqId")
+ when(mockExecution.getVariable(prefix + "vfModuleId")).thenReturn("cb510af0-5b21-4bc7-86d9-323cb396ce32")
+ when(mockExecution.getVariable(prefix + "tenantId")).thenReturn("fba1bd1e195a404cacb9ce17a9b2b421")
+ when(mockExecution.getVariable(prefix + "vnfType")).thenReturn("vRRaas")
+ when(mockExecution.getVariable(prefix + "vnfName")).thenReturn("skask-test")
+ when(mockExecution.getVariable(prefix + "vnfId")).thenReturn("skask")
+ when(mockExecution.getVariable(prefix + "vfModuleModelName")).thenReturn("PCRF::module-0-2")
+ when(mockExecution.getVariable(prefix + "requestId")).thenReturn("testRequestId")
+ when(mockExecution.getVariable(prefix + "serviceId")).thenReturn("12345")
+ when(mockExecution.getVariable(prefix + "serviceInstanceId")).thenReturn("MIS/1604/0026/SW_INTERNET")
+ when(mockExecution.getVariable(prefix + "usePreload")).thenReturn("Y")
+ when(mockExecution.getVariable(prefix + "modelCustomizationUuid")).thenReturn("cb510af0-5b21-4bc7-86d9-323cb396ced3")
+
+ def node = new Node(null, 'vfModule')
+ new Node(node, 'vf-module-name', "abc")
+ VfModule vfModule = new VfModule(node, true);
+ when(mockExecution.getVariable(prefix + "vfModule")).thenReturn(vfModule)
+
+ when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://localhost:8090/SDNCAdapter")
+
+ mockData()
+ DoUpdateVfModule obj = new DoUpdateVfModule()
+ obj.prepSDNCTopologyAct(mockExecution)
+
+ String createVnfARequest = FileUtil.readResourceFile("__files/DoUpdateVfModule/sdncActivateRequest.xml")
+ Mockito.verify(mockExecution, times(1)).setVariable(captor.capture(), captor.capture())
+ XmlComparator.assertXMLEquals(createVnfARequest, captor.getValue())
+ }
+
+ @Test
+ void testQueryAAIVfModule() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(prefix)
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(prefix + "vnfId")).thenReturn("12345")
+ when(mockExecution.getVariable("mso.workflow.default.aai.generic-vnf.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.generic-vnf.uri")).thenReturn("/aai/v8/network/generic-vnfs/generic-vnf")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
+
+ mockData()
+ DoUpdateVfModule obj = new DoUpdateVfModule()
+ obj.queryAAIVfModule(mockExecution)
+ Mockito.verify(mockExecution).setVariable(prefix + "queryAAIVfModuleResponseCode", 200)
+ }
+
+
+ private static ExecutionEntity setupMock() {
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("DoUpdateVfModule")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("DoUpdateVfModule")
+ when(mockRepositoryService.getProcessDefinition().getId()).thenReturn("100")
+ ProcessEngineServices mockProcessEngineServices = mock(ProcessEngineServices.class)
+ when(mockProcessEngineServices.getRepositoryService()).thenReturn(mockRepositoryService)
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getId()).thenReturn("100")
+ when(mockExecution.getProcessDefinitionId()).thenReturn("DoUpdateVfModule")
+ when(mockExecution.getProcessInstanceId()).thenReturn("DoUpdateVfModule")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+
+ return mockExecution
+ }
+
+ private static void mockData() {
+ stubFor(get(urlMatching(".*/aai/v[0-9]+/cloud-infrastructure/cloud-regions/cloud-region/att-aic"))
+ .willReturn(aResponse()
+ .withStatus(200).withHeader("Content-Type", "text/xml")
+ .withBodyFile("DoUpdateVfModule/cloudRegion_AAIResponse_Success.xml")))
+
+ stubFor(get(urlMatching(".*/aai/v[0-9]+/network/generic-vnfs/generic-vnf/12345[?]depth=1"))
+ .willReturn(aResponse()
+ .withStatus(200).withHeader("Content-Type", "text/xml")
+ .withBodyFile("DoUpdateVfModule/getGenericVnfResponse.xml")))
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModulesTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModulesTest.groovy
new file mode 100644
index 0000000000..ba54787dc1
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModulesTest.groovy
@@ -0,0 +1,126 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.scripts
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+import org.camunda.bpm.engine.ProcessEngineServices
+import org.camunda.bpm.engine.RepositoryService
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.camunda.bpm.engine.repository.ProcessDefinition
+import org.junit.Assert
+import org.junit.Before
+import org.junit.Ignore
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.ArgumentCaptor
+import org.mockito.Captor
+import org.mockito.Mockito
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+import org.onap.so.bpmn.core.WorkflowException
+
+import static com.github.tomakehurst.wiremock.client.WireMock.*
+import static org.mockito.Mockito.*
+
+@RunWith(MockitoJUnitRunner.class)
+class DoUpdateVnfAndModulesTest {
+
+ @Captor
+ static ArgumentCaptor<ExecutionEntity> captor = ArgumentCaptor.forClass(ExecutionEntity.class)
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(28090);
+
+ @Before
+ public void init() {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ @Test
+ void testQueryAAIVfModule() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("vnfId")).thenReturn("12345")
+ when(mockExecution.getVariable("mso.workflow.default.aai.generic-vnf.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.generic-vnf.uri")).thenReturn("/aai/v8/network/generic-vnfs/generic-vnf")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
+
+ mockData()
+ DoUpdateVnfAndModules obj = new DoUpdateVnfAndModules()
+ obj.queryAAIVfModule(mockExecution)
+ Mockito.verify(mockExecution).setVariable("DUVAM_queryAAIVfModuleResponseCode", 200)
+ }
+
+ @Test
+ @Ignore
+ void testQueryAAIVfModuleEndpointNull() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("vnfId")).thenReturn("12345")
+ when(mockExecution.getVariable("mso.workflow.default.aai.generic-vnf.version")).thenReturn("8")
+ when(mockExecution.getVariable("mso.workflow.default.aai.v8.generic-vnf.uri")).thenReturn("/aai/v8/network/generic-vnfs/generic-vnf")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn(null)
+ when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
+
+ mockData()
+ try {
+ DoUpdateVnfAndModules obj = new DoUpdateVnfAndModules()
+ obj.queryAAIVfModule(mockExecution)
+ } catch (Exception ex) {
+ println " Test End - Handle catch-throw BpmnError()! "
+ }
+ Mockito.verify(mockExecution, atLeastOnce()).setVariable(captor.capture(), captor.capture())
+ WorkflowException workflowException = captor.getValue()
+ Assert.assertEquals(1002, workflowException.getErrorCode())
+ Assert.assertEquals("AAI GET Failed:org.apache.http.client.ClientProtocolException", workflowException.getErrorMessage())
+ }
+
+ private static ExecutionEntity setupMock() {
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("DoUpdateVfModule")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("DoUpdateVfModule")
+ when(mockRepositoryService.getProcessDefinition().getId()).thenReturn("100")
+ ProcessEngineServices mockProcessEngineServices = mock(ProcessEngineServices.class)
+ when(mockProcessEngineServices.getRepositoryService()).thenReturn(mockRepositoryService)
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getId()).thenReturn("100")
+ when(mockExecution.getProcessDefinitionId()).thenReturn("DoUpdateVfModule")
+ when(mockExecution.getProcessInstanceId()).thenReturn("DoUpdateVfModule")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+
+ return mockExecution
+ }
+
+ private static void mockData() {
+ stubFor(get(urlMatching(".*/aai/v[0-9]+/network/generic-vnfs/generic-vnf/12345[?]depth=1"))
+ .willReturn(aResponse()
+ .withStatus(200).withHeader("Content-Type", "text/xml")
+ .withBodyFile("DoUpdateVfModule/getGenericVnfResponse.xml")))
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/ScaleCustomE2EServiceInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/ScaleCustomE2EServiceInstanceTest.groovy
new file mode 100644
index 0000000000..e196a62e1f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/ScaleCustomE2EServiceInstanceTest.groovy
@@ -0,0 +1,195 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.scripts
+
+import static org.mockito.Mockito.*
+
+import org.apache.commons.lang3.*
+import org.camunda.bpm.engine.ProcessEngineServices
+import org.camunda.bpm.engine.RepositoryService
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.camunda.bpm.engine.repository.ProcessDefinition
+import org.camunda.bpm.engine.runtime.Execution
+import org.junit.Before
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+
+@RunWith(MockitoJUnitRunner.class)
+class SacleCustomE2EServiceInstanceTest{
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(8090);
+
+ String Prefix="CRESI_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ String globalSubscriberId="test_custormer"
+ String requestDescription = "request description for test"
+ def utils = new MsoUtils()
+
+ String jsonIncomingRequest = """{"service":{
+ "serviceType":"example-service-type",
+ "globalSubscriberId":"test_custormer",
+ "resources":[
+ {
+ "resourceInstanceId":"ns111",
+ "scaleType":"SCALE_NS",
+ "scaleNsData":{
+ "scaleNsByStepsData":{
+ "numberOfSteps":"4",
+ "aspectId":"TIC_EDGE_HW",
+ "scalingDirection":"UP"
+ }
+ }
+ },
+ {
+ "resourceInstanceId":"ns333",
+ "scaleType":"SCALE_NS",
+ "scaleNsData":{
+ "scaleNsByStepsData":{
+ "numberOfSteps":"4",
+ "aspectId":"TIC_EDGE_HW",
+ "scalingDirection":"UP"
+ }
+ }
+ }],
+ "serviceInstanceName":"XXXX"
+ },
+ "operationId":"0a5b1651-c56e-4263-8c26-c8f8a6ef72d8"
+ }"""
+
+ String xmlMsoCompletionRequest = """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1"
+ xmlns:w1aaan0="http://org.onap/so/infra/vnf-request/v1">
+ <w1aaan0:request-info>
+ <w1aaan0:request-id>56c881ad-6c9d-4b79-aacc-401e5640b47f</w1aaan0:request-id>
+ <w1aaan0:action>SCALE</w1aaan0:action>
+ <w1aaan0:source>null</w1aaan0:source>
+ </w1aaan0:request-info>
+ <status-message>Service Instance was scaled successfully.</status-message>
+ <serviceInstanceId>56c881ad-6c9d-4b79-aacc-401e5640b47f</serviceInstanceId>
+ <mso-bpel-name>ScaleGenericALaCarteServiceInstance</mso-bpel-name>
+</aetgt:MsoCompletionRequest>"""
+
+ String requestInfo = """<request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>56c881ad-6c9d-4b79-aacc-401e5640b47f</request-id>
+ <action>SCALE</action>
+ <source>null</source>
+ </request-info>"""
+
+ String payload ="""<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:ns="http://org.onap.so/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateServiceOperationStatus xmlns:ns="http://org.onap.so/requestsdb">
+ <serviceId>56c881ad-6c9d-4b79-aacc-401e5640b47f</serviceId>
+ <operationId>0a5b1651-c56e-4263-8c26-c8f8a6ef72d8</operationId>
+ <operationType>SCALE</operationType>
+ <userId></userId>
+ <result>processing</result>
+ <operationContent>Prepare service scaling</operationContent>
+ <progress>0</progress>
+ <reason></reason>
+ </ns:updateServiceOperationStatus>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ @Test
+ public void preProcessRequestTest() {
+ println "************ preProcessRequest_Payload ************* "
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("bpmnRequest")).thenReturn(jsonIncomingRequest)
+
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("56c881ad-6c9d-4b79-aacc-401e5640b47f")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("56c881ad-6c9d-4b79-aacc-401e5640b47f")
+
+ ScaleCustomE2EServiceInstance scaleCustomE2EServiceInstance = new ScaleCustomE2EServiceInstance()
+ scaleCustomE2EServiceInstance.preProcessRequest(mockExecution)
+
+ verify(mockExecution).setVariable("globalSubscriberId", globalSubscriberId)
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable("requestDescription", requestDescription)
+ }
+
+ @Test
+ public void sendSyncResponseTest() {
+ println "************ sendSyncResponse ************* "
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("operationId")).thenReturn("3338b250-e995-4782-8936-081b66ba4dbf")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("56c881ad-6c9d-4b79-aacc-401e5640b47f")
+
+ ScaleCustomE2EServiceInstance scaleCustomE2EServiceInstance = new ScaleCustomE2EServiceInstance()
+ scaleCustomE2EServiceInstance.sendSyncResponse(mockExecution)
+
+ verify(mockExecution).setVariable("sentSyncResponse", true)
+ }
+
+ @Test
+ public void prepareCompletionRequestTest() {
+ println "************ prepareCompletionRequest ************* "
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("msoRequestId")).thenReturn("56c881ad-6c9d-4b79-aacc-401e5640b47f")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("56c881ad-6c9d-4b79-aacc-401e5640b47f")
+
+ ScaleCustomE2EServiceInstance scaleCustomE2EServiceInstance = new ScaleCustomE2EServiceInstance()
+ scaleCustomE2EServiceInstance.prepareCompletionRequest(mockExecution)
+
+ verify(mockExecution).setVariable("CompleteMsoProcessRequest", xmlMsoCompletionRequest)
+
+ }
+
+ @Test
+ public void prepareInitServiceOperationStatusTest() {
+ println "************ prepareInitServiceOperationStatus ************* "
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("56c881ad-6c9d-4b79-aacc-401e5640b47f")
+ //when(mockExecution.getVariable("serviceInstanceName")).thenReturn("XXXX")
+ when(mockExecution.getVariable("operationId")).thenReturn("0a5b1651-c56e-4263-8c26-c8f8a6ef72d8")
+
+ ScaleCustomE2EServiceInstance scaleCustomE2EServiceInstance = new ScaleCustomE2EServiceInstance()
+ scaleCustomE2EServiceInstance.prepareInitServiceOperationStatus(mockExecution)
+
+ payload = utils.formatXml(payload)
+ verify(mockExecution).setVariable("CVFMI_updateServiceOperStatusRequest", payload)
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateNetworkInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateNetworkInstanceTest.groovy
new file mode 100644
index 0000000000..fd3c1e352f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateNetworkInstanceTest.groovy
@@ -0,0 +1,358 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.scripts
+
+
+import static org.mockito.Mockito.*
+
+import org.camunda.bpm.engine.ProcessEngineServices
+import org.camunda.bpm.engine.RepositoryService
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.camunda.bpm.engine.repository.ProcessDefinition
+import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.junit.Before
+import org.junit.Ignore
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.core.WorkflowException
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+import org.apache.commons.lang3.*
+
+
+@RunWith(MockitoJUnitRunner.class)
+class UpdateNetworkInstanceTest {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(8090);
+
+ String Prefix="UPDNI_"
+ def utils = new MsoUtils()
+
+ String createDBRequestError =
+"""<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateInfraRequest xmlns:ns="http://org.onap.so/requestsdb">
+ <requestId>88f65519-9a38-4c4b-8445-9eb4a5a5af56</requestId>
+ <lastModifiedBy>BPMN</lastModifiedBy>
+ <statusMessage>Received error from SDN-C: No availability zone available</statusMessage>
+ <responseBody></responseBody>
+ <requestStatus>FAILED</requestStatus>
+ <vnfOutputs>&lt;network-id&gt;&lt;/network-id&gt;&lt;network-name&gt;&lt;/network-names&gt;</vnfOutputs>
+ </ns:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ String falloutHandlerRequest =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1"
+ xmlns:wfsch="http://org.onap/so/workflow/schema/v1">
+ <request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>b69c9054-da09-4a2c-adf5-51042b62bfac</request-id>
+ <action>UPDATE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>Received error from SDN-C: No availability zone available.</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>5300</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ String completeMsoProcessRequest =
+ """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1"
+ xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-info>
+ <request-id>88f65519-9a38-4c4b-8445-9eb4a5a5af56</request-id>
+ <action>UPDATE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:status-message>Network has been updated successfully.</aetgt:status-message>
+ <aetgt:mso-bpel-name>BPMN Network action: UPDATE</aetgt:mso-bpel-name>
+</aetgt:MsoCompletionRequest>"""
+
+
+String jsonIncomingRequest =
+"""{ "requestDetails": {
+ "modelInfo": {
+ "modelType": "networkTyp",
+ "modelId": "modelId",
+ "modelNameVersionId": "modelNameVersionId",
+ "modelName": "CONTRAIL_EXTERNAL",
+ "modelVersion": "1"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "RDM2WAGPLCP",
+ "tenantId": "7dd5365547234ee8937416c65507d266"
+ },
+ "requestInfo": {
+ "instanceName": "MNS-25180-L-01-dmz_direct_net_1",
+ "source": "VID",
+ "callbackUrl": "",
+ "suppressRollback": true,
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "f70e927b-6087-4974-9ef8-c5e4d5847ca4",
+ "modelInfo": {
+ "modelType": "serviceT",
+ "modelId": "modelI",
+ "modelNameVersionId": "modelNameVersionI",
+ "modelName": "modleNam",
+ "modelVersion": "1"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": [
+ {
+ "name": "someUserParam1",
+ "value": "someValue1"
+ }
+ ]
+ }
+ }}"""
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ public void initializeVariables(DelegateExecution mockExecution) {
+
+ verify(mockExecution).setVariable(Prefix + "source", "")
+ verify(mockExecution).setVariable(Prefix + "Success", false)
+
+ verify(mockExecution).setVariable(Prefix + "CompleteMsoProcessRequest", "")
+ verify(mockExecution).setVariable(Prefix + "FalloutHandlerRequest", "")
+
+ }
+
+ @Test
+ //@Ignore
+ public void preProcessRequest() {
+
+ println "************ preProcessRequest() ************* "
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("bpmnRequest")).thenReturn(jsonIncomingRequest)
+
+ when(mockExecution.getVariable("mso.adapters.db.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+
+ // preProcessRequest(DelegateExecution execution)
+ UpdateNetworkInstance UpdateNetworkInstance = new UpdateNetworkInstance()
+ UpdateNetworkInstance.preProcessRequest(mockExecution)
+
+// verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ initializeVariables(mockExecution)
+ //verify(mockExecution).setVariable(Prefix + "Success", false)
+
+ }
+
+
+ @Test
+ //@Ignore
+ public void getNetworkModelInfo() {
+
+ println "************ getNetworkModelInfo() ************* "
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+
+ // preProcessRequest(DelegateExecution execution)
+ UpdateNetworkInstance UpdateNetworkInstance = new UpdateNetworkInstance()
+ UpdateNetworkInstance.getNetworkModelInfo(mockExecution)
+
+// verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ }
+
+ @Test
+ //@Ignore
+ public void sendSyncResponse() {
+
+ println "************ sendSyncResponse ************* "
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("isAsyncProcess")).thenReturn(true)
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+
+ // preProcessRequest(DelegateExecution execution)
+ UpdateNetworkInstance UpdateNetworkInstance = new UpdateNetworkInstance()
+ UpdateNetworkInstance.sendSyncResponse(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable("UpdateNetworkInstanceResponseCode", "202")
+
+ }
+
+ @Test
+ //@Ignore
+ public void sendSyncError() {
+
+ println "************ sendSyncError ************* "
+
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("isAsyncProcess")).thenReturn(true)
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("e8ebf6a0-f8ea-4dc0-8b99-fe98a87722d6")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
+
+ UpdateNetworkInstance UpdateNetworkInstance = new UpdateNetworkInstance()
+ UpdateNetworkInstance.sendSyncError(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable("UpdateNetworkInstanceResponseCode", "500")
+
+ }
+
+ @Test
+ //@Ignore
+ public void prepareCompletion() {
+
+ println "************ postProcessResponse ************* "
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("88f65519-9a38-4c4b-8445-9eb4a5a5af56")
+ when(mockExecution.getVariable(Prefix + "dbReturnCode")).thenReturn("200")
+
+ // postProcessResponse(DelegateExecution execution)
+ UpdateNetworkInstance UpdateNetworkInstance = new UpdateNetworkInstance()
+ UpdateNetworkInstance.prepareCompletion(mockExecution)
+
+ // check the sequence of variable invocation
+ //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
+ //preDebugger.printInvocations(mockExecution)
+
+ verify(mockExecution).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "Success", true)
+ verify(mockExecution).setVariable(Prefix + "CompleteMsoProcessRequest", completeMsoProcessRequest)
+
+ }
+
+ @Test
+ //@Ignore
+ public void buildErrorResponse() {
+
+ println "************ buildErrorResponse ************* "
+
+
+ WorkflowException sndcWorkflowException = new WorkflowException("UpdateNetworkInstance", 5300, "Received error from SDN-C: No availability zone available.")
+
+ ExecutionEntity mockExecution = setupMock()
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("b69c9054-da09-4a2c-adf5-51042b62bfac")
+ //when(mockExecution.getVariable("WorkflowException")).thenReturn(sndcWorkflowException)
+ when(mockExecution.getVariable("WorkflowException")).thenReturn(sndcWorkflowException)
+
+ // buildErrorResponse(DelegateExecution execution)
+ UpdateNetworkInstance UpdateNetworkInstance = new UpdateNetworkInstance()
+ UpdateNetworkInstance.buildErrorResponse(mockExecution)
+
+ verify(mockExecution, atLeast(1)).setVariable("prefix", Prefix)
+ verify(mockExecution).setVariable(Prefix + "FalloutHandlerRequest", falloutHandlerRequest)
+
+ //MockitoDebuggerImpl debugger = new MockitoDebuggerImpl()
+ //debugger.printInvocations(mockExecution)
+
+ }
+
+ @Test
+ //@Ignore
+ public void postProcessResponse() {
+
+ println "************ postProcessResponse() ************* "
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("CMSO_ResponseCode")).thenReturn("200")
+
+ // postProcessResponse(DelegateExecution execution)
+ UpdateNetworkInstance UpdateNetworkInstance = new UpdateNetworkInstance()
+ UpdateNetworkInstance.postProcessResponse(mockExecution)
+
+ //verify(mockExecution).getVariable("isDebugLogEnabled")
+ //verify(mockExecution).setVariable("prefix", Prefix)
+
+ verify(mockExecution).setVariable(Prefix + "Success", true)
+
+ }
+
+ @Test
+ //@Ignore
+ public void processRollbackData() {
+
+ println "************ callDBCatalog() ************* "
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+
+ // preProcessRequest(DelegateExecution execution)
+ UpdateNetworkInstance UpdateNetworkInstance = new UpdateNetworkInstance()
+ UpdateNetworkInstance.processRollbackData(mockExecution)
+
+// verify(mockExecution).getVariable("isDebugLogEnabled")
+ verify(mockExecution).setVariable("prefix", Prefix)
+
+ }
+
+ private ExecutionEntity setupMock() {
+
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("UpdateNetworkInstance")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("UpdateNetworkInstance")
+ when(mockRepositoryService.getProcessDefinition().getId()).thenReturn("100")
+ ProcessEngineServices mockProcessEngineServices = mock(ProcessEngineServices.class)
+ when(mockProcessEngineServices.getRepositoryService()).thenReturn(mockRepositoryService)
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+
+ when(mockExecution.getId()).thenReturn("100")
+ when(mockExecution.getProcessDefinitionId()).thenReturn("UpdateNetworkInstance")
+ when(mockExecution.getProcessInstanceId()).thenReturn("UpdateNetworkInstance")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+
+ return mockExecution
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1Test.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1Test.groovy
new file mode 100644
index 0000000000..620b0b787d
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1Test.groovy
@@ -0,0 +1,134 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.scripts
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+import org.camunda.bpm.engine.ProcessEngineServices
+import org.camunda.bpm.engine.RepositoryService
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.camunda.bpm.engine.repository.ProcessDefinition
+import org.junit.Assert
+import org.junit.Before
+import org.junit.Ignore
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.ArgumentCaptor
+import org.mockito.Captor
+import org.mockito.Mockito
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+import org.onap.so.bpmn.common.scripts.utils.XmlComparator
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.mock.FileUtil
+
+import static com.github.tomakehurst.wiremock.client.WireMock.*
+import static org.mockito.Mockito.*
+
+@RunWith(MockitoJUnitRunner.class)
+class UpdateVfModuleVolumeInfraV1Test {
+
+ def prefix = "UPDVfModVol_"
+ @Captor
+ static ArgumentCaptor<ExecutionEntity> captor = ArgumentCaptor.forClass(ExecutionEntity.class)
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(28090);
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ @Test
+ void testQueryAAIForVfModule() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(prefix)
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("UPDVfModVol_relatedVfModuleLink")).thenReturn("/aai/v8/network/generic-vnfs/generic-vnf/12345/vf-modules/vf-module/12345")
+ when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:28090")
+ when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
+ when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
+
+ mockData()
+ UpdateVfModuleVolumeInfraV1 obj = new UpdateVfModuleVolumeInfraV1()
+ obj.queryAAIForVfModule(mockExecution, "true")
+
+ Mockito.verify(mockExecution, atLeastOnce()).setVariable("UPDVfModVol_personaModelId", "ff5256d2-5a33-55df-13ab-12abad84e7ff")
+ }
+
+ @Test
+ void testPrepVnfAdapterRest() {
+ ExecutionEntity mockExecution = setupMock()
+ when(mockExecution.getVariable("prefix")).thenReturn(prefix)
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable(prefix + "aicCloudRegion")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(prefix + "tenantId")).thenReturn("")
+ when(mockExecution.getVariable(prefix + "aaiVolumeGroupResponse")).thenReturn(FileUtil.readResourceFile("__files/UpdateVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_Success.xml"))
+ when(mockExecution.getVariable(prefix + "vnfType")).thenReturn("vnf1")
+ when(mockExecution.getVariable(prefix + "vnfVersion")).thenReturn("1")
+ when(mockExecution.getVariable(prefix + "AAIQueryGenericVfnResponse")).thenReturn(FileUtil.readResourceFile("__files/GenericFlows/getGenericVnfByNameResponse.xml"))
+ when(mockExecution.getVariable(prefix + "requestId")).thenReturn("12345")
+ when(mockExecution.getVariable(prefix + "serviceId")).thenReturn("12345")
+ when(mockExecution.getVariable("mso-request-id")).thenReturn("12345")
+ when(mockExecution.getVariable("mso.workflow.message.endpoint")).thenReturn('http://localhost:28080/mso/WorkflowMessage')
+ when(mockExecution.getVariable("mso.use.qualified.host")).thenReturn("true")
+
+ mockData()
+ UpdateVfModuleVolumeInfraV1 obj = new UpdateVfModuleVolumeInfraV1()
+ obj.prepVnfAdapterRest(mockExecution, "true")
+
+ Mockito.verify(mockExecution, times(1)).setVariable(captor.capture(), captor.capture())
+ def updateVolumeGroupRequest = captor.getValue()
+ String expectedValue = FileUtil.readResourceFile("__files/UpdateVfModuleVolumeInfraV1/updateVolumeGroupRequest.xml")
+ XmlComparator.assertXMLEquals(expectedValue, updateVolumeGroupRequest, "messageId", "notificationUrl")
+ }
+
+
+ private static ExecutionEntity setupMock() {
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("UpdateVfModuleVolumeInfraV1")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("UpdateVfModuleVolumeInfraV1")
+ when(mockRepositoryService.getProcessDefinition().getId()).thenReturn("100")
+ ProcessEngineServices mockProcessEngineServices = mock(ProcessEngineServices.class)
+ when(mockProcessEngineServices.getRepositoryService()).thenReturn(mockRepositoryService)
+
+ ExecutionEntity mockExecution = mock(ExecutionEntity.class)
+ // Initialize prerequisite variables
+ when(mockExecution.getId()).thenReturn("100")
+ when(mockExecution.getProcessDefinitionId()).thenReturn("UpdateVfModuleVolumeInfraV1")
+ when(mockExecution.getProcessInstanceId()).thenReturn("UpdateVfModuleVolumeInfraV1")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+
+ return mockExecution
+ }
+
+ private static void mockData() {
+ stubFor(get(urlMatching(".*/aai/v[0-9]+/network/generic-vnfs/generic-vnf/12345/vf-modules/vf-module/.*"))
+ .willReturn(aResponse()
+ .withStatus(200).withHeader("Content-Type", "text/xml")
+ .withBodyFile("UpdateVfModuleVolumeInfraV1/vf_module_aai_response.xml")))
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/CreateVcpeResCustServiceTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/CreateVcpeResCustServiceTest.groovy
new file mode 100644
index 0000000000..523c791efc
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/CreateVcpeResCustServiceTest.groovy
@@ -0,0 +1,1269 @@
+/*
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.so.bpmn.vcpe.scripts
+
+
+import org.camunda.bpm.engine.ProcessEngineServices
+import org.camunda.bpm.engine.RepositoryService
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.camunda.bpm.engine.repository.ProcessDefinition
+import org.junit.Before
+import org.junit.BeforeClass
+import org.junit.Rule
+import org.junit.Test
+import org.junit.Ignore
+import org.mockito.MockitoAnnotations
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.core.domain.HomingSolution
+import org.onap.so.bpmn.mock.FileUtil
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse
+import static com.github.tomakehurst.wiremock.client.WireMock.get
+import static com.github.tomakehurst.wiremock.client.WireMock.patch
+import static com.github.tomakehurst.wiremock.client.WireMock.put
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor
+import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetAllottedResource
+import org.onap.so.bpmn.core.domain.ServiceDecomposition
+import org.onap.so.bpmn.core.domain.VnfResource
+import org.onap.so.bpmn.core.domain.AllottedResource
+import org.onap.so.bpmn.core.domain.ModelInfo
+import org.onap.so.bpmn.core.domain.HomingSolution
+import org.onap.so.bpmn.core.RollbackData
+import org.onap.so.bpmn.vcpe.scripts.MapGetter
+import org.onap.so.bpmn.vcpe.scripts.MapSetter
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+
+class CreateVcpeResCustServiceTest extends GroovyTestBase {
+
+ private static String request
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(PORT)
+
+ String Prefix = "CVRCS_"
+ String RbType = "DCRENI_"
+
+ @BeforeClass
+ public static void setUpBeforeClass() {
+ request = FileUtil.readResourceFile("__files/VCPE/CreateVcpeResCustService/request.json")
+ }
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ public CreateVcpeResCustServiceTest() {
+ super("CreateVcpeResCustService")
+ }
+
+
+ // ***** preProcessRequest *****
+
+ @Test
+ @Ignore // 1802 merge
+ public void preProcessRequest() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.preProcessRequest(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("prefix", Prefix)
+ verify(mex).setVariable("aaiDistDelay", "aaidelay")
+ verify(mex).setVariable("createVcpeServiceRequest", request)
+ verify(mex).setVariable("msoRequestId", "mri")
+ assertEquals("sii", map.get("serviceInstanceId"))
+ verify(mex).setVariable("requestAction", "ra")
+ verify(mex).setVariable("source", "VID")
+ verify(mex).setVariable("globalSubscriberId", CUST)
+ verify(mex).setVariable("globalCustomerId", CUST)
+ verify(mex).setVariable("subscriptionServiceType", SVC)
+ verify(mex).setVariable("disableRollback", "false")
+ verify(mex).setVariable("productFamilyId", "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb")
+ assertTrue(map.containsKey("subscriberInfo"))
+
+ verify(mex).setVariable("brgWanMacAddress", "brgmac")
+ verify(mex).setVariable("customerLocation", ["customerLatitude":"32.897480", "customerLongitude":"-97.040443", "customerName":"some_company"])
+ verify(mex).setVariable("homingService", "sniro")
+ assertTrue(map.containsKey("serviceInputParams"))
+ assertTrue(map.containsKey(Prefix+"requestInfo"))
+
+ def reqinfo = map.get(Prefix+"requestInfo")
+ assertTrue(reqinfo.indexOf("<request-id>mri</") >= 0)
+ assertTrue(reqinfo.indexOf("<source>VID</") >= 0)
+ }
+
+ @Test
+ // @Ignore
+ public void preProcessRequest_MissingAaiDistDelay() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+
+ when(mex.getVariable("URN_mso_workflow_aai_distribution_delay")).thenReturn(null)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> CreateVcpeResCustService.preProcessRequest(mex) }))
+ }
+
+ @Test
+ @Ignore // 1802 merge
+ public void preProcessRequest_EmptyParts() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+
+ def req = request
+ .replace('"source"', '"sourceXXX"')
+ .replace('"BRG_WAN_MAC_Address"', '"BRG_WAN_MAC_AddressXXX"')
+ .replace('"Customer_Location"', '"Customer_LocationXXX"')
+
+ when(mex.getVariable("bpmnRequest")).thenReturn(req)
+ when(mex.getVariable("serviceInstanceId")).thenReturn(null)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.preProcessRequest(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("prefix", Prefix)
+ verify(mex).setVariable("createVcpeServiceRequest", req)
+ verify(mex).setVariable("msoRequestId", "mri")
+ assertNotNull(map.get("serviceInstanceId"))
+ assertFalse(map.get("serviceInstanceId").isEmpty())
+ verify(mex).setVariable("requestAction", "ra")
+ verify(mex).setVariable("source", "VID")
+ verify(mex).setVariable("globalSubscriberId", CUST)
+ verify(mex).setVariable("globalCustomerId", CUST)
+ verify(mex).setVariable("subscriptionServiceType", SVC)
+ verify(mex).setVariable("disableRollback", "false")
+ verify(mex).setVariable("productFamilyId", "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb")
+ assertTrue(map.containsKey("subscriberInfo"))
+
+ assertEquals("", map.get("brgWanMacAddress"))
+ assertEquals("", map.get("customerLocation"))
+ assertEquals("oof", map.get("homingService"))
+ assertTrue(map.containsKey("serviceInputParams"))
+ assertTrue(map.containsKey(Prefix+"requestInfo"))
+
+ def reqinfo = map.get(Prefix+"requestInfo")
+ println reqinfo
+ assertTrue(reqinfo.indexOf("<request-id>mri</") >= 0)
+ assertTrue(reqinfo.indexOf("<source>VID</") >= 0)
+ }
+
+ @Test
+ // @Ignore
+ public void preProcessRequest_MissingSubscriberId() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+
+ def req = request
+ .replace('"globalSubscriberId"', '"globalSubscriberIdXXX"')
+
+ when(mex.getVariable("bpmnRequest")).thenReturn(req)
+ when(mex.getVariable("serviceInstanceId")).thenReturn(null)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> CreateVcpeResCustService.preProcessRequest(mex) }))
+ }
+
+ @Test
+ // @Ignore
+ public void preProcessRequest_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ when(mex.getVariable("bpmnRequest")).thenThrow(new BpmnError("expected exception"))
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> CreateVcpeResCustService.preProcessRequest(mex) }))
+ }
+
+ @Test
+ // @Ignore
+ public void preProcessRequest_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ when(mex.getVariable("bpmnRequest")).thenThrow(new RuntimeException("expected exception"))
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> CreateVcpeResCustService.preProcessRequest(mex) }))
+ }
+
+ // ***** sendSyncResponse *****
+
+ @Test
+ // @Ignore
+ public void sendSyncResponse() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initSendSyncResponse(mex)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.sendSyncResponse(mex)
+
+ verify(mex, times(2)).getVariable(DBGFLAG)
+
+ verify(mex).setVariable(processName+"WorkflowResponseSent", "true")
+
+ assertEquals("202", map.get(processName+"ResponseCode"))
+ assertEquals("Success", map.get(processName+"Status"))
+
+ def resp = map.get(processName+"Response")
+
+ assertTrue(resp.indexOf('"instanceId":"sii"') >= 0)
+ assertTrue(resp.indexOf('"requestId":"mri"') >= 0)
+ }
+
+ @Test
+ // @Ignore
+ public void sendSyncResponse_Ex() {
+ ExecutionEntity mex = setupMock()
+ initSendSyncResponse(mex)
+
+ when(mex.getVariable("serviceInstanceId")).thenThrow(new RuntimeException("expected exception"))
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> CreateVcpeResCustService.sendSyncResponse(mex) }))
+ }
+
+
+ // ***** prepareDecomposeService *****
+
+ @Test
+ // @Ignore
+ public void prepareDecomposeService() {
+ ExecutionEntity mex = setupMock()
+ initPrepareDecomposeService(mex)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.prepareDecomposeService(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("serviceModelInfo", "mi")
+ }
+
+ @Test
+ // @Ignore
+ public void prepareDecomposeService_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPrepareDecomposeService(mex)
+
+ when(mex.getVariable("createVcpeServiceRequest")).thenThrow(new RuntimeException("expected exception"))
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> CreateVcpeResCustService.prepareDecomposeService(mex) }))
+ }
+
+
+ // ***** prepareCreateServiceInstance *****
+
+ @Test
+ // @Ignore
+ public void prepareCreateServiceInstance() {
+ ExecutionEntity mex = setupMock()
+ initPrepareCreateServiceInstance(mex)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.prepareCreateServiceInstance(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("serviceInstanceName", "VCPE1")
+ verify(mex).setVariable("serviceDecompositionString", "mydecomp")
+ }
+
+ @Test
+ // @Ignore
+ public void prepareCreateServiceInstance_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPrepareCreateServiceInstance(mex)
+
+ when(mex.getVariable("createVcpeServiceRequest")).thenThrow(new RuntimeException("expected exception"))
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> CreateVcpeResCustService.prepareCreateServiceInstance(mex) }))
+ }
+
+
+ // ***** postProcessServiceInstanceCreate *****
+
+ @Test
+ // @Ignore
+ public void postProcessServiceInstanceCreate() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPostProcessServiceInstanceCreate(mex)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.postProcessServiceInstanceCreate(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ def reqinfo = map.get(Prefix+"setUpdateDbInstancePayload")
+
+ assertTrue(reqinfo.indexOf("<requestId>mri</") >= 0)
+ assertTrue(reqinfo.indexOf("<serviceInstanceId>sii</") >= 0)
+ assertTrue(reqinfo.indexOf("<serviceInstanceName>sin</") >= 0)
+ }
+
+ @Test
+ // @Ignore
+ public void postProcessServiceInstanceCreate_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPostProcessServiceInstanceCreate(mex)
+
+ doThrow(new BpmnError("expected exception")).when(mex).setVariable(endsWith("setUpdateDbInstancePayload"), any())
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> CreateVcpeResCustService.postProcessServiceInstanceCreate(mex) }))
+ }
+
+ @Test
+ // @Ignore
+ public void postProcessServiceInstanceCreate_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPostProcessServiceInstanceCreate(mex)
+
+ doThrow(new RuntimeException("expected exception")).when(mex).setVariable(endsWith("setUpdateDbInstancePayload"), any())
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> CreateVcpeResCustService.postProcessServiceInstanceCreate(mex) }))
+ }
+
+
+ // ***** processDecomposition *****
+
+ @Test
+ // @Ignore
+ public void processDecomposition() {
+ ExecutionEntity mex = setupMock()
+ def svcdecomp = initProcessDecomposition(mex)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.processDecomposition(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ verify(mex).setVariable("vnfList", svcdecomp.getVnfResources())
+ verify(mex).setVariable("vnfListString", '[myvnf]')
+ verify(mex).setVariable(Prefix+"VNFsCount", 1)
+
+ verify(mex).setVariable("vnfModelInfo", "mymodel")
+ verify(mex).setVariable("vnfModelInfoString", "mymodel")
+ }
+
+ @Test
+ // @Ignore
+ public void processDecomposition_EmptyNet_EmptyVnf() {
+ ExecutionEntity mex = setupMock()
+ def svcdecomp = initProcessDecomposition(mex)
+
+ when(svcdecomp.getVnfResources()).thenReturn(new LinkedList<VnfResource>())
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.processDecomposition(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ verify(mex).setVariable("vnfList", svcdecomp.getVnfResources())
+ verify(mex).setVariable("vnfListString", '[]')
+ verify(mex).setVariable(Prefix+"VNFsCount", 0)
+
+ verify(mex).setVariable("vnfModelInfo", "")
+ verify(mex).setVariable("vnfModelInfoString", "")
+ }
+
+ @Test
+ // @Ignore
+ public void processDecomposition_Ex() {
+ ExecutionEntity mex = setupMock()
+ def svcdecomp = initProcessDecomposition(mex)
+
+ when(svcdecomp.getVnfResources()).thenThrow(new RuntimeException("expected exception"))
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> CreateVcpeResCustService.processDecomposition(mex) }))
+ }
+
+
+ // ***** filterVnfs *****
+
+ @Test
+ // @Ignore
+ public void filterVnfs() {
+ ExecutionEntity mex = setupMock()
+ def svcdecomp = initFilterVnfs(mex)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.processDecomposition(mex)
+
+ verify(mex).setVariable("vnfListString", '[myvnf3, myvnf5]')
+ }
+
+ @Test
+ // @Ignore
+ public void filterVnfs_Null() {
+ ExecutionEntity mex = setupMock()
+ def svcdecomp = initFilterVnfs(mex)
+
+ when(svcdecomp.getVnfResources()).thenReturn(null)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.processDecomposition(mex)
+
+ // nothing more to check, as long as it didn't throw an exception
+ }
+
+
+ // ***** prepareCreateAllottedResourceTXC *****
+
+ @Test
+ // @Ignore
+ public void prepareCreateAllottedResourceTXC() {
+ ExecutionEntity mex = setupMock()
+ initPrepareCreateAllottedResourceTXC(mex)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.prepareCreateAllottedResourceTXC(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ verify(mex).setVariable("createTXCAR", true)
+ verify(mex).setVariable("allottedResourceModelInfoTXC", "modelB")
+ verify(mex).setVariable("allottedResourceRoleTXC", "TXCr")
+ verify(mex).setVariable("allottedResourceTypeTXC", "Tunnel XConn")
+ verify(mex).setVariable("parentServiceInstanceIdTXC", "homeB")
+ }
+
+ @Test
+ // @Ignore
+ public void prepareCreateAllottedResourceTXC_NullArList() {
+ ExecutionEntity mex = setupMock()
+ def svcdecomp = initPrepareCreateAllottedResourceTXC(mex)
+
+ when(svcdecomp.getAllottedResources()).thenReturn(null)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.prepareCreateAllottedResourceTXC(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ verify(mex, never()).setVariable("createTXCAR", true)
+ verify(mex, never()).setVariable("allottedResourceModelInfoTXC", "modelB")
+ verify(mex, never()).setVariable("allottedResourceRoleTXC", "TXCr")
+ verify(mex, never()).setVariable("allottedResourceTypeTXC", "Tunnel XConn")
+ verify(mex, never()).setVariable("parentServiceInstanceIdTXC", "homeB")
+ }
+
+ @Test
+ // @Ignore
+ public void prepareCreateAllottedResourceTXC_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPrepareCreateAllottedResourceTXC(mex)
+
+ when(mex.getVariable("createVcpeServiceRequest")).thenThrow(new RuntimeException("expected exception"))
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> CreateVcpeResCustService.prepareCreateAllottedResourceTXC(mex) }))
+ }
+
+
+ // ***** prepareCreateAllottedResourceBRG *****
+
+ @Test
+ // @Ignore
+ public void prepareCreateAllottedResourceBRG() {
+ ExecutionEntity mex = setupMock()
+ initPrepareCreateAllottedResourceBRG(mex)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.prepareCreateAllottedResourceBRG(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ verify(mex).setVariable("createBRGAR", true)
+ verify(mex).setVariable("allottedResourceModelInfoBRG", "modelB")
+ verify(mex).setVariable("allottedResourceRoleBRG", "BRGr")
+ verify(mex).setVariable("allottedResourceTypeBRG", "BRG")
+ verify(mex).setVariable("parentServiceInstanceIdBRG", "homeB")
+ }
+
+ @Test
+ // @Ignore
+ public void prepareCreateAllottedResourceBRG_NullArList() {
+ ExecutionEntity mex = setupMock()
+ def svcdecomp = initPrepareCreateAllottedResourceBRG(mex)
+
+ when(svcdecomp.getAllottedResources()).thenReturn(null)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.prepareCreateAllottedResourceBRG(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ verify(mex, never()).setVariable("createBRGAR", true)
+ verify(mex, never()).setVariable("allottedResourceModelInfoBRG", "modelB")
+ verify(mex, never()).setVariable("allottedResourceRoleBRG", "BRGr")
+ verify(mex, never()).setVariable("allottedResourceTypeBRG", "BRG")
+ verify(mex, never()).setVariable("parentServiceInstanceIdBRG", "homeB")
+ }
+
+ @Test
+ // @Ignore
+ public void prepareCreateAllottedResourceBRG_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPrepareCreateAllottedResourceBRG(mex)
+
+ when(mex.getVariable("createVcpeServiceRequest")).thenThrow(new RuntimeException("expected exception"))
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> CreateVcpeResCustService.prepareCreateAllottedResourceBRG(mex) }))
+ }
+
+
+ // ***** prepareVnfAndModulesCreate *****
+
+ @Test
+ // @Ignore
+ public void prepareVnfAndModulesCreate() {
+ ExecutionEntity mex = setupMock()
+ initPrepareVnfAndModulesCreate(mex)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.prepareVnfAndModulesCreate(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ verify(mex).setVariable("productFamilyId", "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb")
+ verify(mex).setVariable("lcpCloudRegionId", "mdt1")
+ verify(mex).setVariable("tenantId", "8b1df54faa3b49078e3416e21370a3ba")
+ }
+
+ @Test
+ // @Ignore
+ public void prepareVnfAndModulesCreate_EmptyList() {
+ ExecutionEntity mex = setupMock()
+ initPrepareVnfAndModulesCreate(mex)
+
+ when(mex.getVariable("vnfList")).thenReturn(new LinkedList<VnfResource>())
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.prepareVnfAndModulesCreate(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ verify(mex).setVariable("productFamilyId", "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb")
+ verify(mex).setVariable("lcpCloudRegionId", "mdt1")
+ verify(mex).setVariable("tenantId", "8b1df54faa3b49078e3416e21370a3ba")
+ }
+
+ @Test
+ // @Ignore
+ public void prepareVnfAndModulesCreate_NullList() {
+ ExecutionEntity mex = setupMock()
+ initPrepareVnfAndModulesCreate(mex)
+
+ when(mex.getVariable("vnfList")).thenReturn(null)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.prepareVnfAndModulesCreate(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ verify(mex).setVariable("productFamilyId", "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb")
+ verify(mex).setVariable("lcpCloudRegionId", "mdt1")
+ verify(mex).setVariable("tenantId", "8b1df54faa3b49078e3416e21370a3ba")
+ }
+
+ @Test
+ // @Ignore
+ public void prepareVnfAndModulesCreate_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPrepareVnfAndModulesCreate(mex)
+
+ when(mex.getVariable("vnfList")).thenThrow(new RuntimeException("expected exception"))
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> CreateVcpeResCustService.prepareVnfAndModulesCreate(mex) }))
+ }
+
+
+ // ***** validateVnfCreate *****
+
+ @Test
+ // @Ignore
+ public void validateVnfCreate() {
+ ExecutionEntity mex = setupMock()
+ initValidateVnfCreate(mex)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.validateVnfCreate(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ verify(mex).setVariable(Prefix+"VnfsCreatedCount", 3)
+ }
+
+ @Test
+ // @Ignore
+ public void validateVnfCreate_Ex() {
+ ExecutionEntity mex = setupMock()
+ initValidateVnfCreate(mex)
+
+ when(mex.getVariable(Prefix+"VnfsCreatedCount")).thenThrow(new RuntimeException("expected exception"))
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> CreateVcpeResCustService.validateVnfCreate(mex) }))
+ }
+
+
+ // ***** postProcessResponse *****
+
+ @Test
+ // @Ignore
+ public void postProcessResponse() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPostProcessResponse(mex)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.postProcessResponse(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ verify(mex).setVariable(Prefix+"Success", true)
+
+ def reqinfo = map.get(Prefix+"CompleteMsoProcessRequest")
+
+ assertTrue(reqinfo.indexOf("request-id>mri</") >= 0)
+ assertTrue(reqinfo.indexOf("source>mysrc</") >= 0)
+ assertTrue(reqinfo.indexOf("serviceInstanceId>sii</") >= 0)
+ }
+
+ @Test
+ // @Ignore
+ public void postProcessResponse_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPostProcessResponse(mex)
+
+ when(mex.getVariable("source")).thenThrow(new BpmnError("expected exception"))
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> CreateVcpeResCustService.postProcessResponse(mex) }))
+ }
+
+ @Test
+ // @Ignore
+ public void postProcessResponse_Ex() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPostProcessResponse(mex)
+
+ when(mex.getVariable("source")).thenThrow(new RuntimeException("expected exception"))
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> CreateVcpeResCustService.postProcessResponse(mex) }))
+ }
+
+
+ // ***** preProcessRollback *****
+
+ @Test
+ // @Ignore
+ public void preProcessRollback() {
+ ExecutionEntity mex = setupMock()
+ def wfe = initPreProcessRollback(mex)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.preProcessRollback(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ verify(mex).setVariable("prevWorkflowException", wfe)
+ }
+
+ @Test
+ // @Ignore
+ public void preProcessRollback_NullWfe() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ def wfe = initPreProcessRollback(mex)
+
+ when(mex.getVariable("WorkflowException")).thenReturn(null)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.preProcessRollback(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ assertFalse(map.containsKey("prevWorkflowException"))
+ }
+
+ @Test
+ // @Ignore
+ public void preProcessRollback_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ def wfe = initPreProcessRollback(mex)
+
+ when(mex.getVariable("WorkflowException")).thenThrow(new BpmnError("expected exception"))
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.preProcessRollback(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ assertFalse(map.containsKey("prevWorkflowException"))
+ }
+
+ @Test
+ // @Ignore
+ public void preProcessRollback_Ex() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ def wfe = initPreProcessRollback(mex)
+
+ when(mex.getVariable("WorkflowException")).thenThrow(new RuntimeException("expected exception"))
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.preProcessRollback(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ assertFalse(map.containsKey("prevWorkflowException"))
+ }
+
+
+ // ***** postProcessRollback *****
+
+ @Test
+ // @Ignore
+ public void postProcessRollback() {
+ ExecutionEntity mex = setupMock()
+ def wfe = initPostProcessRollback(mex)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.postProcessRollback(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ verify(mex).setVariable("WorkflowException", wfe)
+ }
+
+ @Test
+ // @Ignore
+ public void postProcessRollback_NullWfe() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ def wfe = initPostProcessRollback(mex)
+
+ when(mex.getVariable("prevWorkflowException")).thenReturn(null)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.postProcessRollback(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ assertFalse(map.containsKey("WorkflowException"))
+ }
+
+ @Test
+ // @Ignore
+ public void postProcessRollback_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ def wfe = initPostProcessRollback(mex)
+
+ when(mex.getVariable("prevWorkflowException")).thenThrow(new BpmnError("expected exception"))
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ assertTrue(doBpmnError( { _ -> CreateVcpeResCustService.postProcessRollback(mex) }))
+ }
+
+ @Test
+ // @Ignore
+ public void postProcessRollback_Ex() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ def wfe = initPostProcessRollback(mex)
+
+ when(mex.getVariable("prevWorkflowException")).thenThrow(new RuntimeException("expected exception"))
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.postProcessRollback(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ assertFalse(map.containsKey("WorkflowException"))
+ }
+
+
+ // ***** prepareFalloutRequest *****
+
+ @Test
+ // @Ignore
+ public void prepareFalloutRequest() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPrepareFalloutRequest(mex)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.prepareFalloutRequest(mex)
+
+ verify(mex, times(2)).getVariable(DBGFLAG)
+
+ def fo = map.get(Prefix+"falloutRequest")
+
+ assertTrue(fo.indexOf("<hello>world</") >= 0)
+ assertTrue(fo.indexOf("ErrorMessage>mymsg</") >= 0)
+ assertTrue(fo.indexOf("ErrorCode>999</") >= 0)
+ }
+
+ @Test
+ // @Ignore
+ public void prepareFalloutRequest_Ex() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPrepareFalloutRequest(mex)
+
+ when(mex.getVariable("WorkflowException")).thenThrow(new RuntimeException("expected exception"))
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> CreateVcpeResCustService.prepareFalloutRequest(mex) }))
+ }
+
+ // ***** sendSyncError *****
+
+ @Test
+ // @Ignore
+ public void sendSyncError() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initSendSyncError(mex)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.sendSyncError(mex)
+
+ verify(mex, times(2)).getVariable(DBGFLAG)
+
+ verify(mex).setVariable(processName+"WorkflowResponseSent", "true")
+
+ assertEquals("500", map.get(processName+"ResponseCode"))
+ assertEquals("Fail", map.get(processName+"Status"))
+
+ def resp = map.get(processName+"Response")
+
+ assertTrue(resp.indexOf("ErrorMessage>mymsg</") >= 0)
+
+ verify(mex).setVariable("WorkflowResponse", resp)
+ }
+
+ @Test
+ // @Ignore
+ public void sendSyncError_NotWfe() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initSendSyncError(mex)
+
+ when(mex.getVariable("WorkflowException")).thenReturn("not a WFE")
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.sendSyncError(mex)
+
+ verify(mex, times(2)).getVariable(DBGFLAG)
+
+ verify(mex).setVariable(processName+"WorkflowResponseSent", "true")
+
+ assertEquals("500", map.get(processName+"ResponseCode"))
+ assertEquals("Fail", map.get(processName+"Status"))
+
+ def resp = map.get(processName+"Response")
+
+ assertTrue(resp.indexOf("ErrorMessage>Sending Sync Error.</") >= 0)
+
+ verify(mex).setVariable("WorkflowResponse", resp)
+ }
+
+ @Test
+ // @Ignore
+ public void sendSyncError_NullWfe() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initSendSyncError(mex)
+
+ when(mex.getVariable("WorkflowException")).thenReturn(null)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+ CreateVcpeResCustService.sendSyncError(mex)
+
+ verify(mex, times(2)).getVariable(DBGFLAG)
+
+ verify(mex).setVariable(processName+"WorkflowResponseSent", "true")
+
+ assertEquals("500", map.get(processName+"ResponseCode"))
+ assertEquals("Fail", map.get(processName+"Status"))
+
+ def resp = map.get(processName+"Response")
+
+ assertTrue(resp.indexOf("ErrorMessage>Sending Sync Error.</") >= 0)
+
+ verify(mex).setVariable("WorkflowResponse", resp)
+ }
+
+ @Test
+ // @Ignore
+ public void sendSyncError_Ex() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initSendSyncError(mex)
+
+ when(mex.getVariable("WorkflowException")).thenThrow(new RuntimeException("expected exception"))
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+
+ CreateVcpeResCustService.sendSyncError(mex)
+
+ assertFalse(map.containsKey(processName+"ResponseCode"))
+ }
+
+
+ // ***** processJavaException *****
+
+ @Test
+ // @Ignore
+ public void processJavaException() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initProcessJavaException(mex)
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> CreateVcpeResCustService.processJavaException(mex) }))
+
+ verify(mex, times(2)).getVariable(DBGFLAG)
+
+ verify(mex).setVariable("prefix", Prefix)
+
+ def wfe = map.get("WorkflowException")
+
+ assertEquals("Caught a Java Lang Exception", wfe.getErrorMessage())
+ }
+
+ @Test
+ // @Ignore
+ public void processJavaException_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initProcessJavaException(mex)
+
+ when(mex.getVariables()).thenThrow(new BpmnError("expected exception"))
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> CreateVcpeResCustService.processJavaException(mex) }))
+
+ assertFalse(map.containsKey("WorkflowException"))
+ }
+
+ @Test
+ // @Ignore
+ public void processJavaException_Ex() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initProcessJavaException(mex)
+
+ when(mex.getVariables()).thenThrow(new RuntimeException("expected exception"))
+
+ CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> CreateVcpeResCustService.processJavaException(mex) }))
+
+ def wfe = map.get("WorkflowException")
+
+ assertEquals("Exception in processJavaException method", wfe.getErrorMessage())
+ }
+
+
+ private void initPreProcess(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("bpmnRequest")).thenReturn(request)
+ when(mex.getVariable("URN_mso_workflow_aai_distribution_delay")).thenReturn("aaidelay")
+ when(mex.getVariable("mso-request-id")).thenReturn("mri")
+ when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
+ when(mex.getVariable("requestAction")).thenReturn("ra")
+ }
+
+ private initSendSyncResponse(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("mso-request-id")).thenReturn("mri")
+ when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
+ }
+
+ private void initPrepareDecomposeService(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("createVcpeServiceRequest")).thenReturn('{"requestDetails":{"modelInfo":"mi"}}')
+ }
+
+ private void initPrepareCreateServiceInstance(ExecutionEntity mex) {
+ ServiceDecomposition svcdecomp = mock(ServiceDecomposition.class)
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("createVcpeServiceRequest")).thenReturn(request)
+ when(mex.getVariable("serviceDecomposition")).thenReturn(svcdecomp)
+
+ when(svcdecomp.toJsonStringNoRootName()).thenReturn("mydecomp")
+ }
+
+ private void initPostProcessServiceInstanceCreate(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("mso-request-id")).thenReturn("mri")
+ when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
+ when(mex.getVariable("serviceInstanceName")).thenReturn("sin")
+ }
+
+ private ServiceDecomposition initProcessDecomposition(ExecutionEntity mex) {
+ List<VnfResource> vnflst = new LinkedList<>()
+ vnflst.add(makeVnf("", ""))
+ vnflst.add(makeVnf("2", "BRG"))
+ vnflst.add(makeVnf("3", "BRG"))
+
+ ServiceDecomposition svcdecomp = mock(ServiceDecomposition.class)
+ when(svcdecomp.getVnfResources()).thenReturn(vnflst)
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("serviceDecomposition")).thenReturn(svcdecomp)
+ when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
+ when(mex.getVariable("serviceInstanceName")).thenReturn("sin")
+
+ return svcdecomp
+ }
+
+ private ServiceDecomposition initFilterVnfs(ExecutionEntity mex) {
+ List<VnfResource> vnflst = new LinkedList<>()
+ vnflst.add(makeVnf("", "BRG"))
+ vnflst.add(makeVnf("2", "Tunnel XConn"))
+ vnflst.add(makeVnf("3", ""))
+ vnflst.add(makeVnf("4", "BRG"))
+ vnflst.add(makeVnf("5", "other"))
+
+ ServiceDecomposition svcdecomp = mock(ServiceDecomposition.class)
+ when(svcdecomp.getVnfResources()).thenReturn(vnflst)
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("serviceDecomposition")).thenReturn(svcdecomp)
+ when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
+ when(mex.getVariable("serviceInstanceName")).thenReturn("sin")
+
+ return svcdecomp
+ }
+
+ private initAwaitAaiDistribution(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ }
+
+ private ServiceDecomposition initPrepareCreateAllottedResourceTXC(ExecutionEntity mex) {
+ ServiceDecomposition svcdecomp = mock(ServiceDecomposition.class)
+ List<AllottedResource> arlst = new LinkedList<>()
+
+ arlst.add(makeArBRG("A"))
+ arlst.add(makeArTXC("B"))
+ arlst.add(makeArBRG("C"))
+
+ when(svcdecomp.getAllottedResources()).thenReturn(arlst)
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("createVcpeServiceRequest")).thenReturn(request)
+ when(mex.getVariable("serviceDecomposition")).thenReturn(svcdecomp)
+ when(mex.getVariable("allottedResourceId")).thenReturn(ARID)
+
+ return svcdecomp
+ }
+
+ private ServiceDecomposition initPrepareCreateAllottedResourceBRG(ExecutionEntity mex) {
+ ServiceDecomposition svcdecomp = mock(ServiceDecomposition.class)
+ List<AllottedResource> arlst = new LinkedList<>()
+
+ arlst.add(makeArTXC("A"))
+ arlst.add(makeArBRG("B"))
+ arlst.add(makeArTXC("C"))
+
+ when(svcdecomp.getAllottedResources()).thenReturn(arlst)
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("createVcpeServiceRequest")).thenReturn(request)
+ when(mex.getVariable("serviceDecomposition")).thenReturn(svcdecomp)
+ when(mex.getVariable("allottedResourceId")).thenReturn(ARID)
+
+ return svcdecomp
+ }
+
+ private AllottedResource makeArTXC(String id) {
+ AllottedResource ar = mock(AllottedResource.class)
+ ModelInfo mod = mock(ModelInfo.class)
+ HomingSolution home = mock(HomingSolution.class)
+
+ when(ar.toJsonStringNoRootName()).thenReturn("json"+id)
+ when(ar.getAllottedResourceType()).thenReturn("Tunnel XConn")
+ when(ar.getModelInfo()).thenReturn(mod)
+ when(ar.getAllottedResourceRole()).thenReturn("TXCr")
+ when(ar.getHomingSolution()).thenReturn(home)
+
+ when(mod.toJsonStringNoRootName()).thenReturn("model"+id)
+
+ when(home.getServiceInstanceId()).thenReturn("home"+id)
+
+ return ar
+ }
+
+ private AllottedResource makeArBRG(String id) {
+ AllottedResource ar = mock(AllottedResource.class)
+ ModelInfo mod = mock(ModelInfo.class)
+ HomingSolution home = mock(HomingSolution.class)
+
+ when(ar.toJsonStringNoRootName()).thenReturn("json"+id)
+ when(ar.getAllottedResourceType()).thenReturn("BRG")
+ when(ar.getModelInfo()).thenReturn(mod)
+ when(ar.getAllottedResourceRole()).thenReturn("BRGr")
+ when(ar.getHomingSolution()).thenReturn(home)
+
+ when(mod.toJsonStringNoRootName()).thenReturn("model"+id)
+
+ when(home.getServiceInstanceId()).thenReturn("home"+id)
+
+ return ar
+ }
+
+ private initPrepareVnfAndModulesCreate(ExecutionEntity mex) {
+
+ List<VnfResource> vnflst = new LinkedList<>()
+
+ vnflst.add(makeVnf("A", "BRG"))
+ vnflst.add(makeVnf("B", ""))
+ vnflst.add(makeVnf("C", ""))
+ vnflst.add(makeVnf("D", "Tunnel XConn"))
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("createVcpeServiceRequest")).thenReturn(request)
+ when(mex.getVariable("vnfList")).thenReturn(vnflst)
+ when(mex.getVariable(Prefix+"VnfsCreatedCount")).thenReturn(2)
+ when(mex.getVariable("vnfModelInfo")).thenReturn("nomodel")
+ when(mex.getVariable("sdncVersion")).thenReturn("myvers")
+ }
+
+ private VnfResource makeVnf(String id, String role) {
+ ModelInfo mod = mock(ModelInfo.class)
+ VnfResource vnf = mock(VnfResource.class)
+
+ when(mod.toString()).thenReturn('{"modelInfo":"mymodel'+id+'"}')
+
+ when(vnf.toString()).thenReturn("myvnf"+id)
+ when(vnf.getModelInfo()).thenReturn(mod)
+ when(vnf.getNfRole()).thenReturn(role)
+
+ return vnf
+ }
+
+ private initValidateVnfCreate(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable(Prefix+"VnfsCreatedCount")).thenReturn(2)
+ }
+
+ private initPostProcessResponse(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("source")).thenReturn("mysrc")
+ when(mex.getVariable("mso-request-id")).thenReturn("mri")
+ when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
+ }
+
+ private WorkflowException initPreProcessRollback(ExecutionEntity mex) {
+ WorkflowException wfe = mock(WorkflowException.class)
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("WorkflowException")).thenReturn(wfe)
+
+ return wfe
+ }
+
+ private WorkflowException initPostProcessRollback(ExecutionEntity mex) {
+ WorkflowException wfe = mock(WorkflowException.class)
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("prevWorkflowException")).thenReturn(wfe)
+
+ return wfe
+ }
+
+ private initPrepareFalloutRequest(ExecutionEntity mex) {
+ WorkflowException wfe = mock(WorkflowException.class)
+
+ when(wfe.getErrorMessage()).thenReturn("mymsg")
+ when(wfe.getErrorCode()).thenReturn(999)
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("WorkflowException")).thenReturn(wfe)
+ when(mex.getVariable(Prefix+"requestInfo")).thenReturn("<hello>world</hello>")
+
+ return wfe
+ }
+
+ private initSendSyncError(ExecutionEntity mex) {
+ WorkflowException wfe = mock(WorkflowException.class)
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("mso-request-id")).thenReturn("mri")
+ when(mex.getVariable("WorkflowException")).thenReturn(wfe)
+
+ when(wfe.getErrorMessage()).thenReturn("mymsg")
+ }
+
+ private initProcessJavaException(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DeleteVcpeResCustServiceTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DeleteVcpeResCustServiceTest.groovy
new file mode 100644
index 0000000000..b7c754938a
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DeleteVcpeResCustServiceTest.groovy
@@ -0,0 +1,773 @@
+/*
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.so.bpmn.vcpe.scripts
+
+
+import org.camunda.bpm.engine.ProcessEngineServices
+import org.camunda.bpm.engine.RepositoryService
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.camunda.bpm.engine.repository.ProcessDefinition
+import org.junit.Before
+import org.junit.BeforeClass
+import org.junit.Rule
+import org.junit.Test
+import org.junit.Ignore
+import org.mockito.MockitoAnnotations
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.mock.FileUtil
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse
+import static com.github.tomakehurst.wiremock.client.WireMock.get
+import static com.github.tomakehurst.wiremock.client.WireMock.patch
+import static com.github.tomakehurst.wiremock.client.WireMock.put
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor
+import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetAllottedResource
+import org.onap.so.bpmn.core.domain.ServiceDecomposition
+import org.onap.so.bpmn.core.domain.VnfResource
+import org.onap.so.bpmn.core.domain.AllottedResource
+import org.onap.so.bpmn.core.domain.ModelInfo
+
+import org.onap.so.bpmn.core.RollbackData
+import org.onap.so.bpmn.vcpe.scripts.MapGetter
+import org.onap.so.bpmn.vcpe.scripts.MapSetter
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+
+class DeleteVcpeResCustServiceTest extends GroovyTestBase {
+
+ private static String request
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(PORT)
+
+ String Prefix = "DVRCS_"
+ String RbType = "DCRENI_"
+
+ @BeforeClass
+ public static void setUpBeforeClass() {
+ request = FileUtil.readResourceFile("__files/VCPE/DeleteVcpeResCustService/request.json")
+ }
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ public DeleteVcpeResCustServiceTest() {
+ super("DeleteVcpeResCustService")
+ }
+
+
+ // ***** preProcessRequest *****
+
+ @Test
+// @Ignore
+ public void preProcessRequest() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+ DeleteVcpeResCustService.preProcessRequest(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ assertEquals(Prefix, map.get("prefix"))
+ assertEquals(request, map.get("DeleteVcpeResCustServiceRequest"))
+ assertEquals("mri", map.get("msoRequestId"))
+ assertEquals("ra", map.get("requestAction"))
+ assertEquals("VID", map.get("source"))
+ assertEquals(CUST, map.get("globalSubscriberId"))
+ assertEquals(CUST, map.get("globalCustomerId"))
+ assertEquals("false", map.get("disableRollback"))
+ assertEquals("a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb", map.get("productFamilyId"))
+ assertEquals(SVC, map.get("subscriptionServiceType"))
+
+ assertEquals("mdt1", map.get("lcpCloudRegionId"))
+ assertEquals("8b1df54faa3b49078e3416e21370a3ba", map.get("tenantId"))
+ assertEquals("1707", map.get("sdncVersion"))
+ assertEquals("service-instance", map.get("GENGS_type"))
+ assertEquals("""{"tenantId":"8b1df54faa3b49078e3416e21370a3ba","lcpCloudRegionId":"mdt1"}""", map.get("cloudConfiguration"))
+ assertTrue(map.containsKey(Prefix+"requestInfo"))
+
+ def reqinfo = map.get(Prefix+"requestInfo")
+ assertTrue(reqinfo.indexOf("<request-id>mri</") >= 0)
+ assertTrue(reqinfo.indexOf("<source>VID</") >= 0)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_EmptyParts() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcess(mex)
+
+ def req = request
+ .replace('"source"', '"sourceXXX"')
+
+ when(mex.getVariable("bpmnRequest")).thenReturn(req)
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+ DeleteVcpeResCustService.preProcessRequest(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("prefix", Prefix)
+ verify(mex).setVariable("DeleteVcpeResCustServiceRequest", req)
+ verify(mex).setVariable("msoRequestId", "mri")
+ verify(mex).setVariable("requestAction", "ra")
+ verify(mex).setVariable("source", "VID")
+ verify(mex).setVariable("globalSubscriberId", CUST)
+ verify(mex).setVariable("globalCustomerId", CUST)
+ verify(mex).setVariable("disableRollback", "false")
+ verify(mex).setVariable("productFamilyId", "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb")
+ verify(mex).setVariable("subscriptionServiceType", SVC)
+
+ verify(mex).setVariable("lcpCloudRegionId", "mdt1")
+ verify(mex).setVariable("tenantId", "8b1df54faa3b49078e3416e21370a3ba")
+ assertEquals("""{"tenantId":"8b1df54faa3b49078e3416e21370a3ba","lcpCloudRegionId":"mdt1"}""", map.get("cloudConfiguration"))
+ verify(mex).setVariable("sdncVersion", "1707")
+ verify(mex).setVariable("GENGS_type", "service-instance")
+ assertTrue(map.containsKey(Prefix+"requestInfo"))
+
+ def reqinfo = map.get(Prefix+"requestInfo")
+ println reqinfo
+ assertTrue(reqinfo.indexOf("<request-id>mri</") >= 0)
+ assertTrue(reqinfo.indexOf("<source>VID</") >= 0)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_MissingServiceInstanceId() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ when(mex.getVariable("serviceInstanceId")).thenReturn(null)
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> DeleteVcpeResCustService.preProcessRequest(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ when(mex.getVariable("bpmnRequest")).thenThrow(new BpmnError("expected exception"))
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> DeleteVcpeResCustService.preProcessRequest(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ when(mex.getVariable("bpmnRequest")).thenThrow(new RuntimeException("expected exception"))
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> DeleteVcpeResCustService.preProcessRequest(mex) }))
+ }
+
+ private void initPreProcess(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("bpmnRequest")).thenReturn(request)
+ when(mex.getVariable("mso-request-id")).thenReturn("mri")
+ when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
+ when(mex.getVariable("requestAction")).thenReturn("ra")
+ }
+
+ // ***** sendSyncResponse *****
+
+ @Test
+// @Ignore
+ public void sendSyncResponse() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initSendSyncResponse(mex)
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+ DeleteVcpeResCustService.sendSyncResponse(mex)
+
+ verify(mex, times(2)).getVariable(DBGFLAG)
+
+ verify(mex).setVariable(processName+"WorkflowResponseSent", "true")
+
+ assertEquals("202", map.get(processName+"ResponseCode"))
+ assertEquals("Success", map.get(processName+"Status"))
+
+ def resp = map.get(processName+"Response")
+
+ assertTrue(resp.indexOf('"instanceId":"sii"') >= 0)
+ assertTrue(resp.indexOf('"requestId":"mri"') >= 0)
+ }
+
+ @Test
+// @Ignore
+ public void sendSyncResponse_Ex() {
+ ExecutionEntity mex = setupMock()
+ initSendSyncResponse(mex)
+
+ when(mex.getVariable("serviceInstanceId")).thenThrow(new RuntimeException("expected exception"))
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> DeleteVcpeResCustService.sendSyncResponse(mex) }))
+ }
+
+ private initSendSyncResponse(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("mso-request-id")).thenReturn("mri")
+ when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
+ }
+
+ // ***** prepareServiceDelete *****
+
+ @Test
+// @Ignore
+ public void prepareServiceDelete() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPrepareServiceDelete(mex)
+
+ myMockGetAr("/aai/v11/anytxc", 200, "arGetTXCById.xml");
+ myMockGetAr("/aai/v11/anybrg", 200, "arGetBRGById.xml");
+ myMockGetAr("/aai/v11/other", 200, "arGetOtherById.xml");
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+ DeleteVcpeResCustService.prepareServiceDelete(mex)
+
+ verify(mex).setVariable(Prefix+"TunnelXConn", true)
+ assertEquals("ar-txcA", map.get("TXC_allottedResourceId"))
+
+ verify(mex).setVariable(Prefix+"BRG", true)
+ assertEquals("ar-brgB", map.get("BRG_allottedResourceId"))
+
+ verify(mex).setVariable(Prefix+"vnfsCount", 2)
+ assertNotNull(map.get(Prefix+"relatedVnfIdList"))
+ assertEquals("[vnfX, vnfY]", map.get(Prefix+"relatedVnfIdList").toString())
+
+ verify(mex, never()).setVariable(processName+"WorkflowResponseSent", "true")
+ }
+
+ @Test
+// @Ignore
+ public void prepareServiceDelete_NotFound() {
+ ExecutionEntity mex = setupMock()
+ initPrepareServiceDelete(mex)
+
+ when(mex.getVariable("GENGS_FoundIndicator")).thenReturn(false)
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+
+ assertTrue(doBpmnError({ _ -> DeleteVcpeResCustService.prepareServiceDelete(mex) }))
+
+ verify(mex, never()).setVariable(processName+"WorkflowResponseSent", "true")
+ }
+
+ @Test
+// @Ignore
+ public void prepareServiceDelete_Empty() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPrepareServiceDelete(mex)
+
+ when(mex.getVariable("GENGS_service")).thenReturn("<empty></empty>")
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+ DeleteVcpeResCustService.prepareServiceDelete(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ verify(mex).setVariable(Prefix+"TunnelXConn", false)
+ assertNull(map.get("TXC_allottedResourceId"))
+
+ verify(mex).setVariable(Prefix+"BRG", false)
+ assertNull(map.get("BRG_allottedResourceId"))
+
+ assertEquals(0, map.get(Prefix+"vnfsCount"))
+ assertFalse(map.containsKey(Prefix+"relatedVnfIdList"))
+
+ verify(mex, never()).setVariable(processName+"WorkflowResponseSent", "true")
+ }
+
+ @Test
+// @Ignore
+ public void prepareServiceDelete_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPrepareServiceDelete(mex)
+
+ when(mex.getVariable("GENGS_FoundIndicator")).thenThrow(new BpmnError("expected exception"))
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+
+ assertTrue(doBpmnError({ _ -> DeleteVcpeResCustService.prepareServiceDelete(mex) }))
+
+ verify(mex, never()).setVariable(processName+"WorkflowResponseSent", "true")
+ }
+
+ @Test
+// @Ignore
+ public void prepareServiceDelete_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPrepareServiceDelete(mex)
+
+ when(mex.getVariable("GENGS_FoundIndicator")).thenThrow(new RuntimeException("expected exception"))
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+
+ assertTrue(doBpmnError({ _ -> DeleteVcpeResCustService.prepareServiceDelete(mex) }))
+
+ verify(mex).setVariable(processName+"WorkflowResponseSent", "true")
+ }
+
+ private initPrepareServiceDelete(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
+ when(mex.getVariable("GENGS_FoundIndicator")).thenReturn(true)
+ when(mex.getVariable("mso-request-id")).thenReturn("mri")
+ when(mex.getVariable("DeleteVcpeResCustServiceRequest")).thenReturn(request)
+ when(mex.getVariable("URN_aai_endpoint")).thenReturn(aaiUriPfx)
+ when(mex.getVariable("GENGS_service")).thenReturn(FileUtil.readResourceFile("__files/VCPE/DeleteVcpeResCustService/serviceToDelete.xml"))
+ }
+
+ // ***** getAaiAr *****
+
+ @Test
+// @Ignore
+ public void getAaiAr() {
+ myMockGetAr("/myurl/ar1", 200, "arGetBRGById.xml");
+
+ ExecutionEntity mex = setupMock()
+ initGetAaiAr(mex)
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+ def (type, id) = DeleteVcpeResCustService.getAaiAr(mex, "/myurl/ar1")
+
+ assertEquals("BRG", type)
+ assertEquals("ar-brgB", id)
+ }
+
+ @Test
+// @Ignore
+ public void getAaiAr_401() {
+ myMockGetAr("/myurl/ar1", 401, "arGetBRGById.xml");
+
+ ExecutionEntity mex = setupMock()
+ initGetAaiAr(mex)
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+ def (type, id) = DeleteVcpeResCustService.getAaiAr(mex, "/myurl/ar1")
+
+ assertEquals(null, type)
+ assertEquals(null, id)
+ }
+
+ @Test
+// @Ignore
+ public void getAaiAr_EmptyResponse() {
+ myMockGetAr("/myurl/ar1", 200, "empty.txt");
+
+ ExecutionEntity mex = setupMock()
+ initGetAaiAr(mex)
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+ def (type, id) = DeleteVcpeResCustService.getAaiAr(mex, "/myurl/ar1")
+
+ assertEquals(null, type)
+ assertEquals(null, id)
+ }
+
+ private void initGetAaiAr(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("URN_aai_endpoint")).thenReturn(aaiUriPfx)
+ }
+
+ // ***** prepareVnfAndModulesDelete *****
+
+ @Test
+// @Ignore
+ public void prepareVnfAndModulesDelete() {
+ ExecutionEntity mex = setupMock()
+ initPrepareVnfAndModulesDelete(mex)
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+ DeleteVcpeResCustService.prepareVnfAndModulesDelete(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ verify(mex).setVariable("vnfId", "vnfB")
+ }
+
+ @Test
+// @Ignore
+ public void prepareVnfAndModulesDelete_Empty() {
+ ExecutionEntity mex = setupMock()
+ initPrepareVnfAndModulesDelete(mex)
+
+ when(mex.getVariable(Prefix+"relatedVnfIdList")).thenReturn(new LinkedList())
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+ DeleteVcpeResCustService.prepareVnfAndModulesDelete(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ verify(mex).setVariable("vnfId", "")
+ }
+
+ @Test
+// @Ignore
+ public void prepareVnfAndModulesDelete_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPrepareVnfAndModulesDelete(mex)
+
+ when(mex.getVariable(Prefix+"relatedVnfIdList")).thenThrow(new RuntimeException("expected exception"))
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+
+ assertTrue(doBpmnError({ _ -> DeleteVcpeResCustService.prepareVnfAndModulesDelete(mex) }))
+ }
+
+ private initPrepareVnfAndModulesDelete(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable(Prefix+"relatedVnfIdList")).thenReturn(Arrays.asList("vnfA", "vnfB", "vnfC"))
+ when(mex.getVariable(Prefix+"vnfsDeletedCount")).thenReturn(1)
+ }
+
+ // ***** validateVnfDelete *****
+
+ @Test
+// @Ignore
+ public void validateVnfDelete() {
+ ExecutionEntity mex = setupMock()
+ initValidateVnfDelete(mex)
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+ DeleteVcpeResCustService.validateVnfDelete(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ verify(mex).setVariable(Prefix+"vnfsDeletedCount", 3)
+ }
+
+ @Test
+// @Ignore
+ public void validateVnfDelete_Ex() {
+ ExecutionEntity mex = setupMock()
+ initValidateVnfDelete(mex)
+
+ when(mex.getVariable(Prefix+"vnfsDeletedCount")).thenThrow(new RuntimeException("expected exception"))
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+
+ assertTrue(doBpmnError({ _ -> DeleteVcpeResCustService.validateVnfDelete(mex) }))
+ }
+
+ private initValidateVnfDelete(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable(Prefix+"vnfsDeletedCount")).thenReturn(2)
+ }
+
+ // ***** postProcessResponse *****
+
+ @Test
+// @Ignore
+ public void postProcessResponse() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPostProcessResponse(mex)
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+ DeleteVcpeResCustService.postProcessResponse(mex)
+
+ verify(mex).getVariable(DBGFLAG)
+
+ assertEquals(true, map.get(Prefix+"Success"))
+
+ def req = map.get(Prefix+"CompleteMsoProcessRequest")
+
+ assertTrue(req.indexOf("<request-id>mri</") >= 0)
+ assertTrue(req.indexOf("<source>mysrc</") >= 0)
+ }
+
+ @Test
+// @Ignore
+ public void postProcessResponse_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPostProcessResponse(mex)
+
+ when(mex.getVariable("source")).thenThrow(new BpmnError("expected exception"))
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> DeleteVcpeResCustService.postProcessResponse(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void postProcessResponse_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPostProcessResponse(mex)
+
+ when(mex.getVariable("source")).thenThrow(new RuntimeException("expected exception"))
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> DeleteVcpeResCustService.postProcessResponse(mex) }))
+ }
+
+ private initPostProcessResponse(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("source")).thenReturn("mysrc")
+ when(mex.getVariable("msoRequestId")).thenReturn("mri")
+ }
+
+
+ // ***** prepareFalloutRequest *****
+
+ @Test
+// @Ignore
+ public void prepareFalloutRequest() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPrepareFalloutRequest(mex)
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+ DeleteVcpeResCustService.prepareFalloutRequest(mex)
+
+ verify(mex, times(2)).getVariable(DBGFLAG)
+
+ def fo = map.get(Prefix+"falloutRequest")
+
+ assertTrue(fo.indexOf("<hello>world</") >= 0)
+ assertTrue(fo.indexOf("ErrorMessage>mymsg</") >= 0)
+ assertTrue(fo.indexOf("ErrorCode>999</") >= 0)
+ }
+
+ @Test
+// @Ignore
+ public void prepareFalloutRequest_Ex() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPrepareFalloutRequest(mex)
+
+ when(mex.getVariable("WorkflowException")).thenThrow(new RuntimeException("expected exception"))
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> DeleteVcpeResCustService.prepareFalloutRequest(mex) }))
+ }
+
+ private initPrepareFalloutRequest(ExecutionEntity mex) {
+ WorkflowException wfe = mock(WorkflowException.class)
+
+ when(wfe.getErrorMessage()).thenReturn("mymsg")
+ when(wfe.getErrorCode()).thenReturn(999)
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("WorkflowException")).thenReturn(wfe)
+ when(mex.getVariable(Prefix+"requestInfo")).thenReturn("<hello>world</hello>")
+
+ return wfe
+ }
+
+ // ***** sendSyncError *****
+
+ @Test
+// @Ignore
+ public void sendSyncError() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initSendSyncError(mex)
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+ DeleteVcpeResCustService.sendSyncError(mex)
+
+ verify(mex, times(2)).getVariable(DBGFLAG)
+
+ verify(mex).setVariable(processName+"WorkflowResponseSent", "true")
+
+ assertEquals("500", map.get(processName+"ResponseCode"))
+ assertEquals("Fail", map.get(processName+"Status"))
+
+ def resp = map.get(processName+"Response")
+
+ assertTrue(resp.indexOf("ErrorMessage>mymsg</") >= 0)
+
+ verify(mex).setVariable("WorkflowResponse", resp)
+ }
+
+ @Test
+// @Ignore
+ public void sendSyncError_NotWfe() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initSendSyncError(mex)
+
+ when(mex.getVariable("WorkflowException")).thenReturn("not a WFE")
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+ DeleteVcpeResCustService.sendSyncError(mex)
+
+ verify(mex, times(2)).getVariable(DBGFLAG)
+
+ verify(mex).setVariable(processName+"WorkflowResponseSent", "true")
+
+ assertEquals("500", map.get(processName+"ResponseCode"))
+ assertEquals("Fail", map.get(processName+"Status"))
+
+ def resp = map.get(processName+"Response")
+
+ assertTrue(resp.indexOf("ErrorMessage>Sending Sync Error.</") >= 0)
+
+ verify(mex).setVariable("WorkflowResponse", resp)
+ }
+
+ @Test
+// @Ignore
+ public void sendSyncError_NullWfe() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initSendSyncError(mex)
+
+ when(mex.getVariable("WorkflowException")).thenReturn(null)
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+ DeleteVcpeResCustService.sendSyncError(mex)
+
+ verify(mex, times(2)).getVariable(DBGFLAG)
+
+ verify(mex).setVariable(processName+"WorkflowResponseSent", "true")
+
+ assertEquals("500", map.get(processName+"ResponseCode"))
+ assertEquals("Fail", map.get(processName+"Status"))
+
+ def resp = map.get(processName+"Response")
+
+ assertTrue(resp.indexOf("ErrorMessage>Sending Sync Error.</") >= 0)
+
+ verify(mex).setVariable("WorkflowResponse", resp)
+ }
+
+ @Test
+// @Ignore
+ public void sendSyncError_Ex() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initSendSyncError(mex)
+
+ when(mex.getVariable("WorkflowException")).thenThrow(new RuntimeException("expected exception"))
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+
+ DeleteVcpeResCustService.sendSyncError(mex)
+
+ assertFalse(map.containsKey(processName+"ResponseCode"))
+ }
+
+ private initSendSyncError(ExecutionEntity mex) {
+ WorkflowException wfe = mock(WorkflowException.class)
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("mso-request-id")).thenReturn("mri")
+ when(mex.getVariable("WorkflowException")).thenReturn(wfe)
+
+ when(wfe.getErrorMessage()).thenReturn("mymsg")
+ }
+
+
+ // ***** processJavaException *****
+
+ @Test
+// @Ignore
+ public void processJavaException() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initProcessJavaException(mex)
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> DeleteVcpeResCustService.processJavaException(mex) }))
+
+ verify(mex, times(2)).getVariable(DBGFLAG)
+
+ verify(mex).setVariable("prefix", Prefix)
+
+ def wfe = map.get("WorkflowException")
+
+ assertEquals("Caught a Java Lang Exception", wfe.getErrorMessage())
+ }
+
+ @Test
+// @Ignore
+ public void processJavaException_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initProcessJavaException(mex)
+
+ when(mex.getVariables()).thenThrow(new BpmnError("expected exception"))
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> DeleteVcpeResCustService.processJavaException(mex) }))
+
+ assertFalse(map.containsKey("WorkflowException"))
+ }
+
+ @Test
+// @Ignore
+ public void processJavaException_Ex() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initProcessJavaException(mex)
+
+ when(mex.getVariables()).thenThrow(new RuntimeException("expected exception"))
+
+ DeleteVcpeResCustService DeleteVcpeResCustService = new DeleteVcpeResCustService()
+
+ assertTrue(doBpmnError( { _ -> DeleteVcpeResCustService.processJavaException(mex) }))
+
+ def wfe = map.get("WorkflowException")
+
+ assertEquals("Exception in processJavaException method", wfe.getErrorMessage())
+ }
+
+ private initProcessJavaException(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ }
+
+ private void myMockGetAr(String url, int status, String fileResp) {
+ stubFor(get(urlMatching(url))
+ .willReturn(aResponse()
+ .withStatus(status)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile("VCPE/DeleteVcpeResCustService/" + fileResp)));
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGRollbackTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGRollbackTest.groovy
new file mode 100644
index 0000000000..1e8842e68f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGRollbackTest.groovy
@@ -0,0 +1,654 @@
+/*
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.vcpe.scripts
+
+
+import org.camunda.bpm.engine.ProcessEngineServices
+import org.camunda.bpm.engine.RepositoryService
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.camunda.bpm.engine.repository.ProcessDefinition
+import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.junit.Before
+import org.junit.BeforeClass
+import org.junit.Rule
+import org.junit.Test
+import org.junit.Ignore
+import org.mockito.MockitoAnnotations
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.mock.FileUtil
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse
+import static com.github.tomakehurst.wiremock.client.WireMock.get
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor
+import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockDeleteAllottedResource
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetAllottedResource
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPatchAllottedResource
+
+import org.onap.so.bpmn.core.RollbackData
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+
+class DoCreateAllottedResourceBRGRollbackTest extends GroovyTestBase {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(PORT)
+
+ String Prefix = "DCARBRGRB_"
+ String RbType = "DCARBRG_"
+
+ @BeforeClass
+ public static void setUpBeforeClass() {
+ super.setUpBeforeClass()
+ }
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ public DoCreateAllottedResourceBRGRollbackTest() {
+ super("DoCreateAllottedResourceBRGRollback")
+ }
+
+
+ // ***** preProcessRequest *****
+
+ @Test
+// @Ignore
+ public void preProcessRequest() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+ DoCreateAllottedResourceBRGRollback.preProcessRequest(mex)
+
+ ////verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("prefix", Prefix)
+ verify(mex).setVariable("serviceInstanceId", "sii")
+ verify(mex).setVariable("parentServiceInstanceId", "psii")
+ verify(mex).setVariable("allottedResourceId", "myid")
+ verify(mex).setVariable("rollbackAAI", true)
+ verify(mex).setVariable("aaiARPath", "mypath")
+ verify(mex).setVariable("rollbackSDNC", true)
+ verify(mex).setVariable("deactivateSdnc", "myactivate")
+ verify(mex).setVariable("deleteSdnc", "mycreate")
+ verify(mex).setVariable("unassignSdnc", "true")
+ verify(mex).setVariable("sdncDeactivateRequest", "activatereq")
+ verify(mex).setVariable("sdncDeleteRequest", "createreq")
+ verify(mex).setVariable("sdncUnassignRequest", "assignreq")
+
+ verify(mex, never()).setVariable("skipRollback", true)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_RollbackDisabled() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ when(mex.getVariable("disableRollback")).thenReturn("true")
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+ DoCreateAllottedResourceBRGRollback.preProcessRequest(mex)
+
+ ////verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("prefix", Prefix)
+ verify(mex).setVariable("serviceInstanceId", "sii")
+ verify(mex).setVariable("parentServiceInstanceId", "psii")
+ verify(mex).setVariable("allottedResourceId", "myid")
+ verify(mex).setVariable("rollbackAAI", true)
+ verify(mex).setVariable("aaiARPath", "mypath")
+ verify(mex).setVariable("rollbackSDNC", true)
+ verify(mex).setVariable("deactivateSdnc", "myactivate")
+ verify(mex).setVariable("deleteSdnc", "mycreate")
+ verify(mex).setVariable("unassignSdnc", "true")
+ verify(mex).setVariable("sdncDeactivateRequest", "activatereq")
+ verify(mex).setVariable("sdncDeleteRequest", "createreq")
+ verify(mex).setVariable("sdncUnassignRequest", "assignreq")
+
+ verify(mex).setVariable("skipRollback", true)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_NoAAI() {
+ ExecutionEntity mex = setupMock()
+ def data = initPreProcess(mex)
+
+ when(mex.getVariable("rollbackAAI")).thenReturn(false)
+ data.put(RbType, "rollbackAAI", "false")
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+ DoCreateAllottedResourceBRGRollback.preProcessRequest(mex)
+
+ //verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("prefix", Prefix)
+ verify(mex).setVariable("serviceInstanceId", "sii")
+ verify(mex).setVariable("parentServiceInstanceId", "psii")
+ verify(mex).setVariable("allottedResourceId", "myid")
+ verify(mex, never()).setVariable("rollbackAAI", true)
+ verify(mex, never()).setVariable("aaiARPath", "mypath")
+ verify(mex).setVariable("rollbackSDNC", true)
+ verify(mex).setVariable("deactivateSdnc", "myactivate")
+ verify(mex).setVariable("deleteSdnc", "mycreate")
+ verify(mex).setVariable("unassignSdnc", "true")
+ verify(mex).setVariable("sdncDeactivateRequest", "activatereq")
+ verify(mex).setVariable("sdncDeleteRequest", "createreq")
+ verify(mex).setVariable("sdncUnassignRequest", "assignreq")
+
+ verify(mex, never()).setVariable("skipRollback", true)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_NoAssign() {
+ ExecutionEntity mex = setupMock()
+ def data = initPreProcess(mex)
+
+ when(mex.getVariable("rollbackSDNC")).thenReturn(false)
+ data.put(RbType, "rollbackSDNCassign", "false")
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+ DoCreateAllottedResourceBRGRollback.preProcessRequest(mex)
+
+ //verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("prefix", Prefix)
+ verify(mex).setVariable("serviceInstanceId", "sii")
+ verify(mex).setVariable("parentServiceInstanceId", "psii")
+ verify(mex).setVariable("allottedResourceId", "myid")
+ verify(mex).setVariable("rollbackAAI", true)
+ verify(mex).setVariable("aaiARPath", "mypath")
+ verify(mex, never()).setVariable("rollbackSDNC", true)
+ verify(mex, never()).setVariable("deactivateSdnc", "myactivate")
+ verify(mex, never()).setVariable("deleteSdnc", "mycreate")
+ verify(mex, never()).setVariable("unassignSdnc", "true")
+ verify(mex, never()).setVariable("sdncDeactivateRequest", "activatereq")
+ verify(mex, never()).setVariable("sdncDeleteRequest", "createreq")
+ verify(mex, never()).setVariable("sdncUnassignRequest", "assignreq")
+
+ verify(mex, never()).setVariable("skipRollback", true)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_NoAAI_NoAssign() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ when(mex.getVariable("rollbackAAI")).thenReturn(false)
+ when(mex.getVariable("rollbackSDNC")).thenReturn(false)
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+ DoCreateAllottedResourceBRGRollback.preProcessRequest(mex)
+
+ verify(mex).setVariable("skipRollback", true)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_NoRbStructure() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ when(mex.getVariable("rollbackData")).thenReturn(new RollbackData())
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+ DoCreateAllottedResourceBRGRollback.preProcessRequest(mex)
+
+ verify(mex).setVariable("skipRollback", true)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_NullRb() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ when(mex.getVariable("rollbackData")).thenReturn(null)
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+ DoCreateAllottedResourceBRGRollback.preProcessRequest(mex)
+
+ verify(mex).setVariable("skipRollback", true)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ when(mex.getVariable("rollbackData")).thenThrow(new BpmnError("expected exception"))
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceBRGRollback.preProcessRequest(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ when(mex.getVariable("rollbackData")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceBRGRollback.preProcessRequest(mex) }))
+ }
+
+ @Test
+ @Ignore
+ public void updateAaiAROrchStatus() {
+ ExecutionEntity mex = setupMock()
+ initUpdateAaiAROrchStatus(mex)
+
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml")
+ MockPatchAllottedResource(CUST, SVC, INST, ARID)
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+ DoCreateAllottedResourceBRGRollback.updateAaiAROrchStatus(mex, "success")
+ }
+
+ @Test
+// @Ignore
+ public void updateAaiAROrchStatus_EmptyResponse() {
+ ExecutionEntity mex = setupMock()
+ initUpdateAaiAROrchStatus(mex)
+
+ wireMockRule
+ .stubFor(get(urlMatching("/aai/v[0-9]+/.*"))
+ .willReturn(aResponse()
+ .withStatus(200)))
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceBRGRollback.updateAaiAROrchStatus(mex, "success") }))
+ }
+
+ @Test
+// @Ignore
+ public void updateAaiAROrchStatus_NoArPath() {
+ ExecutionEntity mex = setupMock()
+ initUpdateAaiAROrchStatus(mex)
+
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml")
+ MockPatchAllottedResource(CUST, SVC, INST, ARID)
+
+ when(mex.getVariable("aaiARPath")).thenReturn(null)
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceBRGRollback.updateAaiAROrchStatus(mex, "success") }))
+ }
+
+
+ // ***** validateSDNCResp *****
+
+ @Test
+// @Ignore
+ public void validateSDNCResp() {
+ ExecutionEntity mex = setupMock()
+ initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp()
+
+ when(mex.getVariable(Prefix+"sdncResponseSuccess")).thenReturn(true)
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+
+ DoCreateAllottedResourceBRGRollback.validateSDNCResp(mex, resp, "create")
+
+ verify(mex).getVariable("WorkflowException")
+ verify(mex).getVariable("SDNCA_SuccessIndicator")
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_Unsuccessful() {
+ ExecutionEntity mex = setupMock()
+ initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp()
+
+ when(mex.getVariable(Prefix+"sdncResponseSuccess")).thenReturn(false)
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceBRGRollback.validateSDNCResp(mex, resp, "create") }))
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_BpmnError404() {
+ ExecutionEntity mex = setupMock()
+ initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp()
+ when(mex.getVariable(Prefix+"sdncResponseSuccess")).thenReturn(true)
+
+ when(mex.getVariable("WorkflowException")).thenThrow(new BpmnError("404", "expected exception"))
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+
+ DoCreateAllottedResourceBRGRollback.validateSDNCResp(mex, resp, "create")
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp()
+ when(mex.getVariable(Prefix+"sdncResponseSuccess")).thenReturn(true)
+
+ when(mex.getVariable("WorkflowException")).thenThrow(new BpmnError("expected exception"))
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceBRGRollback.validateSDNCResp(mex, resp, "create") }))
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_Ex() {
+ ExecutionEntity mex = setupMock()
+ initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp()
+ when(mex.getVariable(Prefix+"sdncResponseSuccess")).thenReturn(true)
+
+ when(mex.getVariable("WorkflowException")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceBRGRollback.validateSDNCResp(mex, resp, "create") }))
+ }
+
+ @Test
+ @Ignore
+ public void deleteAaiAR() {
+ ExecutionEntity mex = setupMock()
+ initDeleteAaiAR(mex)
+
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml")
+ MockDeleteAllottedResource(CUST, SVC, INST, ARID, VERS)
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+ DoCreateAllottedResourceBRGRollback.deleteAaiAR(mex)
+ }
+
+ @Test
+// @Ignore
+ public void deleteAaiAR_NoArPath() {
+ ExecutionEntity mex = setupMock()
+ initDeleteAaiAR(mex)
+
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml")
+ MockDeleteAllottedResource(CUST, SVC, INST, ARID, VERS)
+
+ when(mex.getVariable("aaiARPath")).thenReturn("")
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceBRGRollback.deleteAaiAR(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void deleteAaiAR_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initDeleteAaiAR(mex)
+
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml")
+ MockDeleteAllottedResource(CUST, SVC, INST, ARID, VERS)
+
+ when(mex.getVariable("aaiARPath")).thenThrow(new BpmnError("expected exception"))
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceBRGRollback.deleteAaiAR(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void deleteAaiAR_Ex() {
+ ExecutionEntity mex = setupMock()
+ initDeleteAaiAR(mex)
+
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml")
+ MockDeleteAllottedResource(CUST, SVC, INST, ARID, VERS)
+
+ when(mex.getVariable("aaiARPath")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceBRGRollback.deleteAaiAR(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void postProcessRequest() {
+ ExecutionEntity mex = setupMock()
+ initPostProcessRequest(mex)
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+ DoCreateAllottedResourceBRGRollback.postProcessRequest(mex)
+
+ //verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("rollbackData", null)
+ verify(mex).setVariable("rolledBack", true)
+ }
+
+ @Test
+// @Ignore
+ public void postProcessRequest_RolledBack() {
+ ExecutionEntity mex = setupMock()
+ initPostProcessRequest(mex)
+
+ when(mex.getVariable("skipRollback")).thenReturn(true)
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+ DoCreateAllottedResourceBRGRollback.postProcessRequest(mex)
+
+ //verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("rollbackData", null)
+ verify(mex, never()).setVariable("rolledBack", true)
+ }
+
+ @Test
+// @Ignore
+ public void postProcessRequest_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPostProcessRequest(mex)
+
+ when(mex.getVariable("skipRollback")).thenThrow(new BpmnError("expected exception"))
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+ DoCreateAllottedResourceBRGRollback.postProcessRequest(mex)
+
+ //verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("rollbackData", null)
+ verify(mex, never()).setVariable("rolledBack", true)
+ }
+
+ @Test
+// @Ignore
+ public void postProcessRequest_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPostProcessRequest(mex)
+
+ when(mex.getVariable("skipRollback")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+ DoCreateAllottedResourceBRGRollback.postProcessRequest(mex)
+
+ //verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("rollbackData", null)
+ verify(mex, never()).setVariable("rolledBack", true)
+ }
+
+ @Test
+// @Ignore
+ public void processRollbackException() {
+ ExecutionEntity mex = setupMock()
+ initProcessRollbackException(mex)
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+ DoCreateAllottedResourceBRGRollback.processRollbackException(mex)
+
+ //verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("rollbackData", null)
+ verify(mex).setVariable("rolledBack", false)
+ verify(mex).setVariable("rollbackError", "Caught exception in AllottedResource Create Rollback")
+ verify(mex).setVariable("WorkflowException", null)
+ }
+
+ @Test
+// @Ignore
+ public void processRollbackException_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initProcessRollbackException(mex)
+
+ doThrow(new BpmnError("expected exception")).when(mex).setVariable("rollbackData", null)
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+ DoCreateAllottedResourceBRGRollback.processRollbackException(mex)
+ }
+
+ @Test
+// @Ignore
+ public void processRollbackException_Ex() {
+ ExecutionEntity mex = setupMock()
+ initProcessRollbackException(mex)
+
+ doThrow(new RuntimeException("expected exception")).when(mex).setVariable("rollbackData", null)
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+ DoCreateAllottedResourceBRGRollback.processRollbackException(mex)
+ }
+
+ @Test
+// @Ignore
+ public void processRollbackJavaException() {
+ ExecutionEntity mex = setupMock()
+ initProcessRollbackException(mex)
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+ DoCreateAllottedResourceBRGRollback.processRollbackJavaException(mex)
+
+ //verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("rollbackData", null)
+ verify(mex).setVariable("rolledBack", false)
+ verify(mex).setVariable("rollbackError", "Caught Java exception in AllottedResource Create Rollback")
+ verify(mex, never()).setVariable("WorkflowException", null)
+ }
+
+ @Test
+// @Ignore
+ public void processRollbackJavaException_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initProcessRollbackException(mex)
+
+ doThrow(new BpmnError("expected exception")).when(mex).setVariable("rollbackData", null)
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+ DoCreateAllottedResourceBRGRollback.processRollbackJavaException(mex)
+ }
+
+ @Test
+// @Ignore
+ public void processRollbackJavaException_Ex() {
+ ExecutionEntity mex = setupMock()
+ initProcessRollbackException(mex)
+
+ doThrow(new RuntimeException("expected exception")).when(mex).setVariable("rollbackData", null)
+
+ DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
+ DoCreateAllottedResourceBRGRollback.processRollbackJavaException(mex)
+ }
+
+ private RollbackData initPreProcess(ExecutionEntity mex) {
+ def data = new RollbackData()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("rollbackData")).thenReturn(data)
+ when(mex.getVariable("rollbackAAI")).thenReturn(true)
+ when(mex.getVariable("rollbackSDNC")).thenReturn(true)
+ when(mex.getVariable("disableRollback")).thenReturn("false")
+
+ data.put("SERVICEINSTANCE", "allottedResourceId", "myid")
+
+ data.put(RbType, "serviceInstanceId", "sii")
+ data.put(RbType, "parentServiceInstanceId", "psii")
+
+ data.put(RbType, "rollbackAAI", "true")
+ data.put(RbType, "aaiARPath", "mypath")
+
+ data.put(RbType, "rollbackSDNCassign", "true")
+ data.put(RbType, "rollbackSDNCactivate", "myactivate")
+ data.put(RbType, "rollbackSDNCcreate", "mycreate")
+ data.put(RbType, "sdncActivateRollbackReq", "activatereq")
+ data.put(RbType, "sdncCreateRollbackReq", "createreq")
+ data.put(RbType, "sdncAssignRollbackReq", "assignreq")
+
+ return data
+ }
+
+ private initUpdateAaiAROrchStatus(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("aaiARPath")).thenReturn(aaiUriPfx + "/aai/v9/business/customers/customer/"+CUST+"/service-subscriptions/service-subscription/"+SVC+"/service-instances/service-instance/"+INST+"/allotted-resources/allotted-resource/"+ARID)
+ when(mex.getVariable("aai.endpoint")).thenReturn(aaiUriPfx)
+ }
+
+ private initValidateSDNCResp(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("prefix")).thenReturn(Prefix)
+ when(mex.getVariable("SDNCA_SuccessIndicator")).thenReturn(true)
+ }
+
+ private String initValidateSDNCResp_Resp() {
+ return "<response-data>&lt;response-code&gt;200&lt;/response-code&gt;</response-data>"
+ }
+
+ private initDeleteAaiAR(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("aaiARResourceVersion")).thenReturn(VERS)
+ when(mex.getVariable("aaiARPath")).thenReturn(aaiUriPfx + "/aai/v9/business/customers/customer/"+CUST+"/service-subscriptions/service-subscription/"+SVC+"/service-instances/service-instance/"+INST+"/allotted-resources/allotted-resource/"+ARID)
+ when(mex.getVariable("aai.endpoint")).thenReturn(aaiUriPfx)
+ }
+
+ private initPostProcessRequest(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("skipRollback")).thenReturn(false)
+ }
+
+ private initProcessRollbackException(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ }
+
+ private initProcessRollbackJavaException(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGTest.groovy
new file mode 100644
index 0000000000..543bb1db05
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGTest.groovy
@@ -0,0 +1,999 @@
+/*
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.vcpe.scripts
+
+
+import org.camunda.bpm.engine.ProcessEngineServices
+import org.camunda.bpm.engine.RepositoryService
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.camunda.bpm.engine.repository.ProcessDefinition
+import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.junit.Before
+import org.junit.BeforeClass
+import org.junit.Rule
+import org.junit.Test
+import org.junit.Ignore
+import org.mockito.MockitoAnnotations
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.onap.so.bpmn.core.UrnPropertiesReader
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.mock.FileUtil
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse
+import static com.github.tomakehurst.wiremock.client.WireMock.put
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor
+import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetAllottedResource
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPatchAllottedResource
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPutAllottedResource
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPutAllottedResource_500
+
+import org.onap.so.bpmn.core.RollbackData
+import org.onap.so.bpmn.vcpe.scripts.MapSetter
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+
+class DoCreateAllottedResourceBRGTest extends GroovyTestBase {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(PORT)
+
+ String Prefix = "DCARBRG_"
+
+ @BeforeClass
+ public static void setUpBeforeClass() {
+ super.setUpBeforeClass()
+ }
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ public DoCreateAllottedResourceBRGTest() {
+ super("DoCreateAllottedResourceBRG")
+ }
+
+
+ // ***** preProcessRequest *****
+
+ @Test
+// @Ignore
+ public void preProcessRequest() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+ DoCreateAllottedResourceBRG.preProcessRequest(mex)
+
+ //verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("prefix", Prefix)
+
+ assertTrue(checkMissingPreProcessRequest("mso.workflow.sdncadapter.callback"))
+ assertTrue(checkMissingPreProcessRequest("mso.workflow.sdnc.replication.delay"))
+ assertTrue(checkMissingPreProcessRequest("serviceInstanceId"))
+ assertTrue(checkMissingPreProcessRequest("parentServiceInstanceId"))
+ assertTrue(checkMissingPreProcessRequest("allottedResourceModelInfo"))
+ assertTrue(checkMissingPreProcessRequest("vni"))
+ assertTrue(checkMissingPreProcessRequest("vgmuxBearerIP"))
+ assertTrue(checkMissingPreProcessRequest("brgWanMacAddress"))
+ assertTrue(checkMissingPreProcessRequest("allottedResourceRole"))
+ assertTrue(checkMissingPreProcessRequest("allottedResourceType"))
+ }
+
+
+ // ***** getAaiAR *****
+
+ @Test
+ @Ignore
+ public void getAaiAR() {
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRG/getArBrg.xml")
+
+ ExecutionEntity mex = setupMock()
+ initGetAaiAR(mex)
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+ DoCreateAllottedResourceBRG.getAaiAR(mex)
+
+ verify(mex).setVariable("foundActiveAR", true)
+ }
+
+ @Test
+// @Ignore
+ public void getAaiAR_Duplicate() {
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRG/getArBrg.xml")
+
+ ExecutionEntity mex = setupMock()
+ initGetAaiAR(mex)
+
+ // fail if duplicate
+ when(mex.getVariable("failExists")).thenReturn("true")
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceBRG.getAaiAR(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void getAaiAR_NotActive() {
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRG/getArBrg.xml")
+
+ ExecutionEntity mex = setupMock()
+ initGetAaiAR(mex)
+
+ // not active
+ when(mex.getVariable("aaiAROrchStatus")).thenReturn("not-active")
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceBRG.getAaiAR(mex) }))
+ }
+
+ @Test
+ @Ignore
+ public void getAaiAR_NoStatus() {
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRG/getArBrg.xml")
+
+ ExecutionEntity mex = setupMock()
+ initGetAaiAR(mex)
+
+ when(mex.getVariable("aaiAROrchStatus")).thenReturn(null)
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+ DoCreateAllottedResourceBRG.getAaiAR(mex)
+
+ verify(mex, never()).setVariable("foundActiveAR", true)
+ }
+
+
+ // ***** createAaiAR *****
+
+ @Test
+ @Ignore
+ public void createAaiAR() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initCreateAaiAr(mex)
+
+ MockPutAllottedResource(CUST, SVC, INST, ARID)
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+ DoCreateAllottedResourceBRG.createAaiAR(mex)
+
+ def data = map.get("rollbackData")
+ assertNotNull(data)
+ assertTrue(data instanceof RollbackData)
+
+ assertEquals("45", data.get(Prefix, "disableRollback"))
+ assertEquals("true", data.get(Prefix, "rollbackAAI"))
+ assertEquals(ARID, data.get(Prefix, "allottedResourceId"))
+ assertEquals("sii", data.get(Prefix, "serviceInstanceId"))
+ assertEquals("psii", data.get(Prefix, "parentServiceInstanceId"))
+ assertEquals(mex.getVariable("PSI_resourceLink")+"/allotted-resources/allotted-resource/"+ARID, data.get(Prefix, "aaiARPath"))
+ }
+
+ @Test
+ @Ignore
+ public void createAaiAR_NoArid_NoModelUuids() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initCreateAaiAr(mex)
+
+ // no allottedResourceId - will be generated
+
+ when(mex.getVariable("allottedResourceId")).thenReturn(null)
+
+ wireMockRule
+ .stubFor(put(urlMatching("/aai/.*/allotted-resource/.*"))
+ .willReturn(aResponse()
+ .withStatus(200)))
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+ DoCreateAllottedResourceBRG.createAaiAR(mex)
+
+ def arid = map.get("allottedResourceId")
+ assertNotNull(arid)
+ assertFalse(arid.isEmpty())
+
+ def data = map.get("rollbackData")
+ assertNotNull(data)
+ assertTrue(data instanceof RollbackData)
+
+ assertEquals(arid, data.get(Prefix, "allottedResourceId"))
+ }
+
+ @Test
+// @Ignore
+ public void createAaiAR_MissingPsiLink() {
+ ExecutionEntity mex = setupMock()
+ initCreateAaiAr(mex)
+
+ when(mex.getVariable("PSI_resourceLink")).thenReturn(null)
+
+ MockPutAllottedResource(CUST, SVC, INST, ARID)
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceBRG.createAaiAR(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void createAaiAR_HttpFailed() {
+ ExecutionEntity mex = setupMock()
+ initCreateAaiAr(mex)
+
+ MockPutAllottedResource_500(CUST, SVC, INST, ARID)
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceBRG.createAaiAR(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void createAaiAR_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initCreateAaiAr(mex)
+
+ when(mex.getVariable("aai.endpoint")).thenThrow(new BpmnError("expected exception"))
+
+ MockPutAllottedResource(CUST, SVC, INST, ARID)
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceBRG.createAaiAR(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void createAaiAR_Ex() {
+ ExecutionEntity mex = setupMock()
+ initCreateAaiAr(mex)
+
+ when(mex.getVariable("aai.endpoint")).thenThrow(new RuntimeException("expected exception"))
+
+ MockPutAllottedResource(CUST, SVC, INST, ARID)
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceBRG.createAaiAR(mex) }))
+ }
+
+
+ // ***** buildSDNCRequest *****
+
+ @Test
+// @Ignore
+ public void buildSDNCRequest() {
+ ExecutionEntity mex = setupMock()
+ initBuildSDNCRequest(mex)
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ String result = DoCreateAllottedResourceBRG.buildSDNCRequest(mex, "myact", "myreq")
+
+ assertTrue(result.indexOf("<sdncadapter:RequestId>myreq</") >= 0)
+ assertTrue(result.indexOf("<sdncadapter:SvcAction>myact</") >= 0)
+ assertTrue(result.indexOf("<allotted-resource-id>ari</") >= 0)
+ assertTrue(result.indexOf("<sdncadapter:SvcInstanceId>sii</") >= 0)
+ assertTrue(result.indexOf("<service-instance-id>sii</") >= 0)
+ assertTrue(result.indexOf("<parent-service-instance-id>psii</") >= 0)
+ assertTrue(result.indexOf("<subscription-service-type>sst</") >= 0)
+ assertTrue(result.indexOf("<global-customer-id>gci</") >= 0)
+ assertTrue(result.indexOf("<sdncadapter:CallbackUrl>scu</") >= 0)
+ assertTrue(result.indexOf("<request-id>mri</") >= 0)
+ assertTrue(result.indexOf("<brg-wan-mac-address>bwma</") >= 0)
+ assertTrue(result.indexOf("<vni>myvni</") >= 0)
+ assertTrue(result.indexOf("<vgmux-bearer-ip>vbi</") >= 0)
+ assertTrue(result.indexOf("<model-invariant-uuid>miu</") >= 0)
+ assertTrue(result.indexOf("<model-uuid>mu</") >= 0)
+ assertTrue(result.indexOf("<model-customization-uuid>mcu</") >= 0)
+ assertTrue(result.indexOf("<model-version>mv</") >= 0)
+ assertTrue(result.indexOf("<model-name>mn</") >= 0)
+ }
+
+ @Test
+// @Ignore
+ public void buildSDNCRequest_EmptyModelInfo() {
+ ExecutionEntity mex = setupMock()
+ initBuildSDNCRequest(mex)
+
+ when(mex.getVariable("allottedResourceModelInfo")).thenReturn("{}")
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ String result = DoCreateAllottedResourceBRG.buildSDNCRequest(mex, "myact", "myreq")
+
+ assertTrue(result.indexOf("<sdncadapter:RequestId>myreq</") >= 0)
+ assertTrue(result.indexOf("<sdncadapter:SvcAction>myact</") >= 0)
+ assertTrue(result.indexOf("<allotted-resource-id>ari</") >= 0)
+ assertTrue(result.indexOf("<sdncadapter:SvcInstanceId>sii</") >= 0)
+ assertTrue(result.indexOf("<service-instance-id>sii</") >= 0)
+ assertTrue(result.indexOf("<parent-service-instance-id>psii</") >= 0)
+ assertTrue(result.indexOf("<subscription-service-type>sst</") >= 0)
+ assertTrue(result.indexOf("<global-customer-id>gci</") >= 0)
+ assertTrue(result.indexOf("<sdncadapter:CallbackUrl>scu</") >= 0)
+ assertTrue(result.indexOf("<request-id>mri</") >= 0)
+ assertTrue(result.indexOf("<brg-wan-mac-address>bwma</") >= 0)
+ assertTrue(result.indexOf("<vni>myvni</") >= 0)
+ assertTrue(result.indexOf("<vgmux-bearer-ip>vbi</") >= 0)
+ assertTrue(result.indexOf("<model-invariant-uuid/>") >= 0)
+ assertTrue(result.indexOf("<model-uuid/>") >= 0)
+ assertTrue(result.indexOf("<model-customization-uuid/>") >= 0)
+ assertTrue(result.indexOf("<model-version/>") >= 0)
+ assertTrue(result.indexOf("<model-name/>") >= 0)
+ }
+
+ @Test
+// @Ignore
+ public void buildSDNCRequest_Ex() {
+ ExecutionEntity mex = setupMock()
+ initBuildSDNCRequest(mex)
+
+ when(mex.getVariable("allottedResourceId")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceBRG.buildSDNCRequest(mex, "myact", "myreq") }))
+ }
+
+
+ // ***** preProcessSDNCAssign *****
+
+ @Test
+// @Ignore
+ public void preProcessSDNCAssign() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ def data = initPreProcessSDNC(mex)
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+ DoCreateAllottedResourceBRG.preProcessSDNCAssign(mex)
+
+ def req = map.get("sdncAssignRequest")
+ assertNotNull(req)
+
+ assertEquals(data, map.get("rollbackData"))
+
+ def rbreq = data.get(Prefix, "sdncAssignRollbackReq")
+
+ assertTrue(req.indexOf("<sdncadapter:SvcAction>assign</") >= 0)
+ assertTrue(req.indexOf("<request-action>CreateBRGInstance</") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:RequestId>") >= 0)
+
+ assertTrue(rbreq.indexOf("<sdncadapter:SvcAction>unassign</") >= 0)
+ assertTrue(rbreq.indexOf("<request-action>DeleteBRGInstance</") >= 0)
+ assertTrue(rbreq.indexOf("<sdncadapter:RequestId>") >= 0)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessSDNCAssign_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("rollbackData")).thenThrow(new BpmnError("expected exception"))
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceBRG.preProcessSDNCAssign(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void preProcessSDNCAssign_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("rollbackData")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceBRG.preProcessSDNCAssign(mex) }))
+ }
+
+
+ // ***** preProcessSDNCCreate *****
+
+ @Test
+// @Ignore
+ public void preProcessSDNCCreate() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ def data = initPreProcessSDNC(mex)
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+ DoCreateAllottedResourceBRG.preProcessSDNCCreate(mex)
+
+ def req = map.get("sdncCreateRequest")
+ assertNotNull(req)
+
+ assertEquals(data, map.get("rollbackData"))
+
+ def rbreq = data.get(Prefix, "sdncCreateRollbackReq")
+
+ assertTrue(req.indexOf("<sdncadapter:SvcAction>create</") >= 0)
+ assertTrue(req.indexOf("<request-action>CreateBRGInstance</") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:RequestId>") >= 0)
+
+ assertTrue(rbreq.indexOf("<sdncadapter:SvcAction>delete</") >= 0)
+ assertTrue(rbreq.indexOf("<request-action>DeleteBRGInstance</") >= 0)
+ assertTrue(rbreq.indexOf("<sdncadapter:RequestId>") >= 0)
+
+ }
+
+ @Test
+// @Ignore
+ public void preProcessSDNCCreate_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("rollbackData")).thenThrow(new BpmnError("expected exception"))
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceBRG.preProcessSDNCCreate(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void preProcessSDNCCreate_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("rollbackData")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceBRG.preProcessSDNCCreate(mex) }))
+ }
+
+
+ // ***** preProcessSDNCActivate *****
+
+ @Test
+// @Ignore
+ public void preProcessSDNCActivate() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ def data = initPreProcessSDNC(mex)
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+ DoCreateAllottedResourceBRG.preProcessSDNCActivate(mex)
+
+ def req = map.get("sdncActivateRequest")
+ assertNotNull(req)
+
+ assertEquals(data, map.get("rollbackData"))
+
+ def rbreq = data.get(Prefix, "sdncActivateRollbackReq")
+
+ assertTrue(req.indexOf("<sdncadapter:SvcAction>activate</") >= 0)
+ assertTrue(req.indexOf("<request-action>CreateBRGInstance</") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:RequestId>") >= 0)
+
+ assertTrue(rbreq.indexOf("<sdncadapter:SvcAction>deactivate</") >= 0)
+ assertTrue(rbreq.indexOf("<request-action>DeleteBRGInstance</") >= 0)
+ assertTrue(rbreq.indexOf("<sdncadapter:RequestId>") >= 0)
+
+ }
+
+ @Test
+// @Ignore
+ public void preProcessSDNCActivate_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("rollbackData")).thenThrow(new BpmnError("expected exception"))
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceBRG.preProcessSDNCActivate(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void preProcessSDNCActivate_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("rollbackData")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceBRG.preProcessSDNCActivate(mex) }))
+ }
+
+
+ // ***** validateSDNCResp *****
+
+ @Test
+// @Ignore
+ public void validateSDNCResp() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ def data = initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp()
+
+ when(mex.getVariable(Prefix+"sdncResponseSuccess")).thenReturn(true)
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ DoCreateAllottedResourceBRG.validateSDNCResp(mex, resp, "create")
+
+ verify(mex).getVariable("WorkflowException")
+ verify(mex).getVariable("SDNCA_SuccessIndicator")
+ verify(mex).getVariable("rollbackData")
+
+ assertEquals(data, map.get("rollbackData"))
+
+ assertEquals("true", data.get(Prefix, "rollback" + "SDNCcreate"))
+
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_Get() {
+ ExecutionEntity mex = setupMock()
+ def data = initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp()
+
+ when(mex.getVariable(Prefix+"sdncResponseSuccess")).thenReturn(true)
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ DoCreateAllottedResourceBRG.validateSDNCResp(mex, resp, "get")
+
+ verify(mex).getVariable("WorkflowException")
+ verify(mex).getVariable("SDNCA_SuccessIndicator")
+
+ verify(mex, never()).getVariable("rollbackData")
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_Unsuccessful() {
+ ExecutionEntity mex = setupMock()
+ initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp()
+
+ // unsuccessful
+ when(mex.getVariable(Prefix+"sdncResponseSuccess")).thenReturn(false)
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceBRG.validateSDNCResp(mex, resp, "create") }))
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp()
+
+ when(mex.getVariable("WorkflowException")).thenThrow(new BpmnError("expected exception"))
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceBRG.validateSDNCResp(mex, resp, "create") }))
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_Ex() {
+ ExecutionEntity mex = setupMock()
+ initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp()
+
+ when(mex.getVariable("WorkflowException")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceBRG.validateSDNCResp(mex, resp, "create") }))
+ }
+
+
+ // ***** preProcessSDNCGet *****
+
+ @Test
+// @Ignore
+ public void preProcessSDNCGet_FoundAR() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcessSDNCGet(mex)
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+ DoCreateAllottedResourceBRG.preProcessSDNCGet(mex)
+
+ String req = map.get("sdncGetRequest")
+
+ assertTrue(req.indexOf("<sdncadapter:RequestId>") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:SvcInstanceId>sii</") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:SvcOperation>arlink</") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:CallbackUrl>myurl</") >= 0)
+
+ }
+
+ @Test
+// @Ignore
+ public void preProcessSDNCGet_NotFoundAR() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcessSDNCGet(mex)
+
+ when(mex.getVariable("foundActiveAR")).thenReturn(false)
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+ DoCreateAllottedResourceBRG.preProcessSDNCGet(mex)
+
+ String req = map.get("sdncGetRequest")
+
+ assertTrue(req.indexOf("<sdncadapter:RequestId>") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:SvcInstanceId>sii</") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:SvcOperation>assignlink</") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:CallbackUrl>myurl</") >= 0)
+
+ }
+
+ @Test
+// @Ignore
+ public void preProcessSDNCGet_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNCGet(mex)
+
+ when(mex.getVariable("foundActiveAR")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceBRG.preProcessSDNCGet(mex) }))
+ }
+
+
+ // ***** updateAaiAROrchStatus *****
+
+ @Test
+ @Ignore
+ public void updateAaiAROrchStatus() {
+ MockPatchAllottedResource(CUST, SVC, INST, ARID)
+
+ ExecutionEntity mex = setupMock()
+ initUpdateAaiAROrchStatus(mex)
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+ DoCreateAllottedResourceBRG.updateAaiAROrchStatus(mex, "success")
+ }
+
+
+ // ***** generateOutputs *****
+
+ @Test
+// @Ignore
+ public void generateOutputs() {
+ ExecutionEntity mex = setupMock()
+ def brgtop = FileUtil.readResourceFile("__files/VCPE/DoCreateAllottedResourceBRG/SDNCTopologyQueryCallback.xml")
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("enhancedCallbackRequestData")).thenReturn(brgtop)
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+ DoCreateAllottedResourceBRG.generateOutputs(mex)
+
+ verify(mex).setVariable("allotedResourceName", "namefromrequest")
+
+ }
+
+ @Test
+// @Ignore
+ public void generateOutputs_BadXml() {
+ ExecutionEntity mex = setupMock()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("enhancedCallbackRequestData")).thenReturn("invalid xml")
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+ DoCreateAllottedResourceBRG.generateOutputs(mex)
+
+ verify(mex, never()).setVariable(anyString(), anyString())
+
+ }
+
+ @Test
+// @Ignore
+ public void generateOutputs_BpmnError() {
+ ExecutionEntity mex = setupMock()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("enhancedCallbackRequestData")).thenThrow(new BpmnError("expected exception"))
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ DoCreateAllottedResourceBRG.generateOutputs(mex)
+ verify(mex, never()).setVariable(anyString(), anyString())
+
+ }
+
+ @Test
+// @Ignore
+ public void generateOutputs_Ex() {
+ ExecutionEntity mex = setupMock()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("enhancedCallbackRequestData")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ DoCreateAllottedResourceBRG.generateOutputs(mex)
+ verify(mex, never()).setVariable(anyString(), anyString())
+
+ }
+
+
+ // ***** preProcessRollback *****
+
+ @Test
+// @Ignore
+ public void preProcessRollback() {
+ ExecutionEntity mex = setupMock()
+ WorkflowException wfe = mock(WorkflowException.class)
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("WorkflowException")).thenReturn(wfe)
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+ DoCreateAllottedResourceBRG.preProcessRollback(mex)
+
+ verify(mex).setVariable("prevWorkflowException", wfe)
+
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRollback_NotWFE() {
+ ExecutionEntity mex = setupMock()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("WorkflowException")).thenReturn("I'm not a WFE")
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+ DoCreateAllottedResourceBRG.preProcessRollback(mex)
+
+// verify(mex, never()).setVariable("prevWorkflowException", any())
+
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRollback_BpmnError() {
+ ExecutionEntity mex = setupMock()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("WorkflowException")).thenThrow(new BpmnError("expected exception"))
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ DoCreateAllottedResourceBRG.preProcessRollback(mex)
+
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRollback_Ex() {
+ ExecutionEntity mex = setupMock()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("WorkflowException")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ DoCreateAllottedResourceBRG.preProcessRollback(mex)
+
+ }
+
+
+ // ***** postProcessRollback *****
+
+ @Test
+// @Ignore
+ public void postProcessRollback() {
+ ExecutionEntity mex = setupMock()
+ WorkflowException wfe = mock(WorkflowException.class)
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("prevWorkflowException")).thenReturn(wfe)
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+ DoCreateAllottedResourceBRG.postProcessRollback(mex)
+
+ verify(mex).setVariable("WorkflowException", wfe)
+ verify(mex).setVariable("rollbackData", null)
+
+ }
+
+ @Test
+// @Ignore
+ public void postProcessRollback_NotWFE() {
+ ExecutionEntity mex = setupMock()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("prevWorkflowException")).thenReturn("I'm not a WFE")
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+ DoCreateAllottedResourceBRG.postProcessRollback(mex)
+
+// verify(mex, never()).setVariable("WorkflowException", any())
+ verify(mex).setVariable("rollbackData", null)
+
+ }
+
+ @Test
+// @Ignore
+ public void postProcessRollback_BpmnError() {
+ ExecutionEntity mex = setupMock()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("prevWorkflowException")).thenThrow(new BpmnError("expected exception"))
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceBRG.postProcessRollback(mex) }))
+ verify(mex, never()).setVariable("rollbackData", null)
+
+ }
+
+ @Test
+// @Ignore
+ public void postProcessRollback_Ex() {
+ ExecutionEntity mex = setupMock()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("prevWorkflowException")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ DoCreateAllottedResourceBRG.postProcessRollback(mex)
+ verify(mex, never()).setVariable("rollbackData", null)
+
+ }
+
+ private boolean checkMissingPreProcessRequest(String fieldnm) {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ DoCreateAllottedResourceBRG DoCreateAllottedResourceBRG = new DoCreateAllottedResourceBRG()
+
+ when(mex.getVariable(fieldnm)).thenReturn("")
+
+ return doBpmnError( { _ -> DoCreateAllottedResourceBRG.preProcessRequest(mex) })
+ }
+
+ private void initPreProcess(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("sdncurn")
+ when(mex.getVariable("mso.workflow.sdnc.replication.delay")).thenReturn("sdncdelay")
+ when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
+ when(mex.getVariable("parentServiceInstanceId")).thenReturn("psii")
+ when(mex.getVariable("allottedResourceModelInfo")).thenReturn("armi")
+ when(mex.getVariable("vni")).thenReturn("myvni")
+ when(mex.getVariable("vgmuxBearerIP")).thenReturn("vbi")
+ when(mex.getVariable("brgWanMacAddress")).thenReturn("bwma")
+ when(mex.getVariable("allottedResourceRole")).thenReturn("arr")
+ when(mex.getVariable("allottedResourceType")).thenReturn("art")
+ }
+
+ private void initGetAaiAR(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("allottedResourceType")).thenReturn("BRGt")
+ when(mex.getVariable("allottedResourceRole")).thenReturn("BRGr")
+ when(mex.getVariable("CSI_service")).thenReturn(FileUtil.readResourceFile("__files/VCPE/DoCreateAllottedResourceBRG/getAR.xml"))
+ when(mex.getVariable("aai.endpoint")).thenReturn(aaiUriPfx)
+ when(mex.getVariable("aaiAROrchStatus")).thenReturn("Active")
+ }
+
+ private initCreateAaiAr(ExecutionEntity mex) {
+ when(mex.getVariable("disableRollback")).thenReturn(45)
+ when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
+ when(mex.getVariable("parentServiceInstanceId")).thenReturn("psii")
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("allottedResourceId")).thenReturn(ARID)
+ when(mex.getVariable("aai.endpoint")).thenReturn(aaiUriPfx)
+ when(mex.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn(UrnPropertiesReader.getVariable("mso.workflow.global.default.aai.namespace"))
+ when(mex.getVariable("PSI_resourceLink")).thenReturn(aaiUriPfx + "/aai/v9/business/customers/customer/"+CUST+"/service-subscriptions/service-subscription/"+SVC+"/service-instances/service-instance/"+INST)
+ when(mex.getVariable("allottedResourceType")).thenReturn("BRGt")
+ when(mex.getVariable("allottedResourceRole")).thenReturn("BRGr")
+ when(mex.getVariable("CSI_resourceLink")).thenReturn(aaiUriPfx+"/aai/v9/mycsi")
+ when(mex.getVariable("allottedResourceModelInfo")).thenReturn("""
+ {
+ "modelInvariantUuid":"modelinvuuid",
+ "modelUuid":"modeluuid",
+ "modelCustomizationUuid":"modelcustuuid"
+ }
+ """)
+ }
+
+ private initBuildSDNCRequest(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("allottedResourceId")).thenReturn("ari")
+ when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
+ when(mex.getVariable("parentServiceInstanceId")).thenReturn("psii")
+ when(mex.getVariable("subscriptionServiceType")).thenReturn("sst")
+ when(mex.getVariable("globalCustomerId")).thenReturn("gci")
+ when(mex.getVariable("sdncCallbackUrl")).thenReturn("scu")
+ when(mex.getVariable("msoRequestId")).thenReturn("mri")
+ when(mex.getVariable("brgWanMacAddress")).thenReturn("bwma")
+ when(mex.getVariable("vni")).thenReturn("myvni")
+ when(mex.getVariable("vgmuxBearerIP")).thenReturn("vbi")
+ when(mex.getVariable("allottedResourceModelInfo")).thenReturn("""
+ {
+ "modelInvariantUuid":"miu",
+ "modelUuid":"mu",
+ "modelCustomizationUuid":"mcu",
+ "modelVersion":"mv",
+ "modelName":"mn"
+ }
+ """)
+ }
+
+ private RollbackData initPreProcessSDNC(ExecutionEntity mex) {
+ def data = new RollbackData()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("rollbackData")).thenReturn(data)
+
+ return data
+ }
+
+ private initPreProcessSDNCGet(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("sdncCallbackUrl")).thenReturn("myurl")
+ when(mex.getVariable("foundActiveAR")).thenReturn(true)
+ when(mex.getVariable("aaiARGetResponse")).thenReturn("<selflink>arlink</selflink>")
+ when(mex.getVariable("sdncAssignResponse")).thenReturn("<response-data>&lt;object-path&gt;assignlink&lt;/object-path&gt;</response-data>")
+ when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
+ when(mex.getVariable("sdncCallbackUrl")).thenReturn("myurl")
+ }
+
+ private RollbackData initValidateSDNCResp(ExecutionEntity mex) {
+ def data = new RollbackData()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("prefix")).thenReturn(Prefix)
+ when(mex.getVariable("SDNCA_SuccessIndicator")).thenReturn(true)
+ when(mex.getVariable("rollbackData")).thenReturn(data)
+
+ return data
+ }
+
+ private String initValidateSDNCResp_Resp() {
+ return "<response-data>&lt;response-code&gt;200&lt;/response-code&gt;</response-data>"
+ }
+
+ private initUpdateAaiAROrchStatus(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("aaiARPath")).thenReturn(aaiUriPfx + "/aai/v9/business/customers/customer/"+CUST+"/service-subscriptions/service-subscription/"+SVC+"/service-instances/service-instance/"+INST+"/allotted-resources/allotted-resource/"+ARID)
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCRollbackTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCRollbackTest.groovy
new file mode 100644
index 0000000000..66cfdb635d
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCRollbackTest.groovy
@@ -0,0 +1,654 @@
+/*
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.vcpe.scripts
+
+
+import org.camunda.bpm.engine.ProcessEngineServices
+import org.camunda.bpm.engine.RepositoryService
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.camunda.bpm.engine.repository.ProcessDefinition
+import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.junit.Before
+import org.junit.BeforeClass
+import org.junit.Rule
+import org.junit.Test
+import org.junit.Ignore
+import org.mockito.MockitoAnnotations
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.mock.FileUtil
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse
+import static com.github.tomakehurst.wiremock.client.WireMock.get
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor
+import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockDeleteAllottedResource
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetAllottedResource
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPatchAllottedResource
+
+import org.onap.so.bpmn.core.RollbackData
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+
+class DoCreateAllottedResourceTXCRollbackTest extends GroovyTestBase {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(PORT)
+
+ String Prefix = "DCARTXCRB_"
+ String RbType = "DCARTXC_"
+
+ @BeforeClass
+ public static void setUpBeforeClass() {
+ super.setUpBeforeClass()
+ }
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ public DoCreateAllottedResourceTXCRollbackTest() {
+ super("DoCreateAllottedResourceTXCRollback")
+ }
+
+
+ // ***** preProcessRequest *****
+
+ @Test
+// @Ignore
+ public void preProcessRequest() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+ DoCreateAllottedResourceTXCRollback.preProcessRequest(mex)
+
+ //verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("prefix", Prefix)
+ verify(mex).setVariable("serviceInstanceId", "sii")
+ verify(mex).setVariable("parentServiceInstanceId", "psii")
+ verify(mex).setVariable("allottedResourceId", "myid")
+ verify(mex).setVariable("rollbackAAI", true)
+ verify(mex).setVariable("aaiARPath", "mypath")
+ verify(mex).setVariable("rollbackSDNC", true)
+ verify(mex).setVariable("deactivateSdnc", "myactivate")
+ verify(mex).setVariable("deleteSdnc", "mycreate")
+ verify(mex).setVariable("unassignSdnc", "true")
+ verify(mex).setVariable("sdncDeactivateRequest", "activatereq")
+ verify(mex).setVariable("sdncDeleteRequest", "createreq")
+ verify(mex).setVariable("sdncUnassignRequest", "assignreq")
+
+ verify(mex, never()).setVariable("skipRollback", true)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_RollbackDisabled() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ when(mex.getVariable("disableRollback")).thenReturn("true")
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+ DoCreateAllottedResourceTXCRollback.preProcessRequest(mex)
+
+ //verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("prefix", Prefix)
+ verify(mex).setVariable("serviceInstanceId", "sii")
+ verify(mex).setVariable("parentServiceInstanceId", "psii")
+ verify(mex).setVariable("allottedResourceId", "myid")
+ verify(mex).setVariable("rollbackAAI", true)
+ verify(mex).setVariable("aaiARPath", "mypath")
+ verify(mex).setVariable("rollbackSDNC", true)
+ verify(mex).setVariable("deactivateSdnc", "myactivate")
+ verify(mex).setVariable("deleteSdnc", "mycreate")
+ verify(mex).setVariable("unassignSdnc", "true")
+ verify(mex).setVariable("sdncDeactivateRequest", "activatereq")
+ verify(mex).setVariable("sdncDeleteRequest", "createreq")
+ verify(mex).setVariable("sdncUnassignRequest", "assignreq")
+
+ verify(mex).setVariable("skipRollback", true)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_NoAAI() {
+ ExecutionEntity mex = setupMock()
+ def data = initPreProcess(mex)
+
+ when(mex.getVariable("rollbackAAI")).thenReturn(false)
+ data.put(RbType, "rollbackAAI", "false")
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+ DoCreateAllottedResourceTXCRollback.preProcessRequest(mex)
+
+ //verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("prefix", Prefix)
+ verify(mex).setVariable("serviceInstanceId", "sii")
+ verify(mex).setVariable("parentServiceInstanceId", "psii")
+ verify(mex).setVariable("allottedResourceId", "myid")
+ verify(mex, never()).setVariable("rollbackAAI", true)
+ verify(mex, never()).setVariable("aaiARPath", "mypath")
+ verify(mex).setVariable("rollbackSDNC", true)
+ verify(mex).setVariable("deactivateSdnc", "myactivate")
+ verify(mex).setVariable("deleteSdnc", "mycreate")
+ verify(mex).setVariable("unassignSdnc", "true")
+ verify(mex).setVariable("sdncDeactivateRequest", "activatereq")
+ verify(mex).setVariable("sdncDeleteRequest", "createreq")
+ verify(mex).setVariable("sdncUnassignRequest", "assignreq")
+
+ verify(mex, never()).setVariable("skipRollback", true)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_NoAssign() {
+ ExecutionEntity mex = setupMock()
+ def data = initPreProcess(mex)
+
+ when(mex.getVariable("rollbackSDNC")).thenReturn(false)
+ data.put(RbType, "rollbackSDNCassign", "false")
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+ DoCreateAllottedResourceTXCRollback.preProcessRequest(mex)
+
+ //verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("prefix", Prefix)
+ verify(mex).setVariable("serviceInstanceId", "sii")
+ verify(mex).setVariable("parentServiceInstanceId", "psii")
+ verify(mex).setVariable("allottedResourceId", "myid")
+ verify(mex).setVariable("rollbackAAI", true)
+ verify(mex).setVariable("aaiARPath", "mypath")
+ verify(mex, never()).setVariable("rollbackSDNC", true)
+ verify(mex, never()).setVariable("deactivateSdnc", "myactivate")
+ verify(mex, never()).setVariable("deleteSdnc", "mycreate")
+ verify(mex, never()).setVariable("unassignSdnc", "true")
+ verify(mex, never()).setVariable("sdncDeactivateRequest", "activatereq")
+ verify(mex, never()).setVariable("sdncDeleteRequest", "createreq")
+ verify(mex, never()).setVariable("sdncUnassignRequest", "assignreq")
+
+ verify(mex, never()).setVariable("skipRollback", true)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_NoAAI_NoAssign() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ when(mex.getVariable("rollbackAAI")).thenReturn(false)
+ when(mex.getVariable("rollbackSDNC")).thenReturn(false)
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+ DoCreateAllottedResourceTXCRollback.preProcessRequest(mex)
+
+ verify(mex).setVariable("skipRollback", true)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_NoRbStructure() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ when(mex.getVariable("rollbackData")).thenReturn(new RollbackData())
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+ DoCreateAllottedResourceTXCRollback.preProcessRequest(mex)
+
+ verify(mex).setVariable("skipRollback", true)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_NullRb() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ when(mex.getVariable("rollbackData")).thenReturn(null)
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+ DoCreateAllottedResourceTXCRollback.preProcessRequest(mex)
+
+ verify(mex).setVariable("skipRollback", true)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ when(mex.getVariable("rollbackData")).thenThrow(new BpmnError("expected exception"))
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceTXCRollback.preProcessRequest(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ when(mex.getVariable("rollbackData")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceTXCRollback.preProcessRequest(mex) }))
+ }
+
+ @Test
+ @Ignore
+ public void updateAaiAROrchStatus() {
+ ExecutionEntity mex = setupMock()
+ initUpdateAaiAROrchStatus(mex)
+
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXCRollback/arGetById.xml")
+ MockPatchAllottedResource(CUST, SVC, INST, ARID)
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+ DoCreateAllottedResourceTXCRollback.updateAaiAROrchStatus(mex, "success")
+ }
+
+ @Test
+// @Ignore
+ public void updateAaiAROrchStatus_EmptyResponse() {
+ ExecutionEntity mex = setupMock()
+ initUpdateAaiAROrchStatus(mex)
+
+ wireMockRule
+ .stubFor(get(urlMatching("/aai/v[0-9]+/.*"))
+ .willReturn(aResponse()
+ .withStatus(200)))
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceTXCRollback.updateAaiAROrchStatus(mex, "success") }))
+ }
+
+ @Test
+// @Ignore
+ public void updateAaiAROrchStatus_NoArPath() {
+ ExecutionEntity mex = setupMock()
+ initUpdateAaiAROrchStatus(mex)
+
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXCRollback/arGetById.xml")
+ MockPatchAllottedResource(CUST, SVC, INST, ARID)
+
+ when(mex.getVariable("aaiARPath")).thenReturn(null)
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceTXCRollback.updateAaiAROrchStatus(mex, "success") }))
+ }
+
+
+ // ***** validateSDNCResp *****
+
+ @Test
+// @Ignore
+ public void validateSDNCResp() {
+ ExecutionEntity mex = setupMock()
+ initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp()
+
+ when(mex.getVariable(Prefix+"sdncResponseSuccess")).thenReturn(true)
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+
+ DoCreateAllottedResourceTXCRollback.validateSDNCResp(mex, resp, "create")
+
+ verify(mex).getVariable("WorkflowException")
+ verify(mex).getVariable("SDNCA_SuccessIndicator")
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_Unsuccessful() {
+ ExecutionEntity mex = setupMock()
+ initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp()
+
+ when(mex.getVariable(Prefix+"sdncResponseSuccess")).thenReturn(false)
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceTXCRollback.validateSDNCResp(mex, resp, "create") }))
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_BpmnError404() {
+ ExecutionEntity mex = setupMock()
+ initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp()
+ when(mex.getVariable(Prefix+"sdncResponseSuccess")).thenReturn(true)
+
+ when(mex.getVariable("WorkflowException")).thenThrow(new BpmnError("404", "expected exception"))
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+
+ DoCreateAllottedResourceTXCRollback.validateSDNCResp(mex, resp, "create")
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp()
+ when(mex.getVariable(Prefix+"sdncResponseSuccess")).thenReturn(true)
+
+ when(mex.getVariable("WorkflowException")).thenThrow(new BpmnError("expected exception"))
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceTXCRollback.validateSDNCResp(mex, resp, "create") }))
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_Ex() {
+ ExecutionEntity mex = setupMock()
+ initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp()
+ when(mex.getVariable(Prefix+"sdncResponseSuccess")).thenReturn(true)
+
+ when(mex.getVariable("WorkflowException")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceTXCRollback.validateSDNCResp(mex, resp, "create") }))
+ }
+
+ @Test
+ @Ignore
+ public void deleteAaiAR() {
+ ExecutionEntity mex = setupMock()
+ initDeleteAaiAR(mex)
+
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXCRollback/arGetById.xml")
+ MockDeleteAllottedResource(CUST, SVC, INST, ARID, VERS)
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+ DoCreateAllottedResourceTXCRollback.deleteAaiAR(mex)
+ }
+
+ @Test
+// @Ignore
+ public void deleteAaiAR_NoArPath() {
+ ExecutionEntity mex = setupMock()
+ initDeleteAaiAR(mex)
+
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXCRollback/arGetById.xml")
+ MockDeleteAllottedResource(CUST, SVC, INST, ARID, VERS)
+
+ when(mex.getVariable("aaiARPath")).thenReturn("")
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceTXCRollback.deleteAaiAR(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void deleteAaiAR_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initDeleteAaiAR(mex)
+
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXCRollback/arGetById.xml")
+ MockDeleteAllottedResource(CUST, SVC, INST, ARID, VERS)
+
+ when(mex.getVariable("aaiARPath")).thenThrow(new BpmnError("expected exception"))
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceTXCRollback.deleteAaiAR(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void deleteAaiAR_Ex() {
+ ExecutionEntity mex = setupMock()
+ initDeleteAaiAR(mex)
+
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXCRollback/arGetById.xml")
+ MockDeleteAllottedResource(CUST, SVC, INST, ARID, VERS)
+
+ when(mex.getVariable("aaiARPath")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceTXCRollback.deleteAaiAR(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void postProcessRequest() {
+ ExecutionEntity mex = setupMock()
+ initPostProcessRequest(mex)
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+ DoCreateAllottedResourceTXCRollback.postProcessRequest(mex)
+
+ //verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("rollbackData", null)
+ verify(mex).setVariable("rolledBack", true)
+ }
+
+ @Test
+// @Ignore
+ public void postProcessRequest_RolledBack() {
+ ExecutionEntity mex = setupMock()
+ initPostProcessRequest(mex)
+
+ when(mex.getVariable("skipRollback")).thenReturn(true)
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+ DoCreateAllottedResourceTXCRollback.postProcessRequest(mex)
+
+ //verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("rollbackData", null)
+ verify(mex, never()).setVariable("rolledBack", true)
+ }
+
+ @Test
+// @Ignore
+ public void postProcessRequest_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPostProcessRequest(mex)
+
+ when(mex.getVariable("skipRollback")).thenThrow(new BpmnError("expected exception"))
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+ DoCreateAllottedResourceTXCRollback.postProcessRequest(mex)
+
+ //verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("rollbackData", null)
+ verify(mex, never()).setVariable("rolledBack", true)
+ }
+
+ @Test
+// @Ignore
+ public void postProcessRequest_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPostProcessRequest(mex)
+
+ when(mex.getVariable("skipRollback")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+ DoCreateAllottedResourceTXCRollback.postProcessRequest(mex)
+
+ //verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("rollbackData", null)
+ verify(mex, never()).setVariable("rolledBack", true)
+ }
+
+ @Test
+// @Ignore
+ public void processRollbackException() {
+ ExecutionEntity mex = setupMock()
+ initProcessRollbackException(mex)
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+ DoCreateAllottedResourceTXCRollback.processRollbackException(mex)
+
+ //verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("rollbackData", null)
+ verify(mex).setVariable("rolledBack", false)
+ verify(mex).setVariable("rollbackError", "Caught exception in AllottedResource Create Rollback")
+ verify(mex).setVariable("WorkflowException", null)
+ }
+
+ @Test
+// @Ignore
+ public void processRollbackException_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initProcessRollbackException(mex)
+
+ doThrow(new BpmnError("expected exception")).when(mex).setVariable("rollbackData", null)
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+ DoCreateAllottedResourceTXCRollback.processRollbackException(mex)
+ }
+
+ @Test
+// @Ignore
+ public void processRollbackException_Ex() {
+ ExecutionEntity mex = setupMock()
+ initProcessRollbackException(mex)
+
+ doThrow(new RuntimeException("expected exception")).when(mex).setVariable("rollbackData", null)
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+ DoCreateAllottedResourceTXCRollback.processRollbackException(mex)
+ }
+
+ @Test
+// @Ignore
+ public void processRollbackJavaException() {
+ ExecutionEntity mex = setupMock()
+ initProcessRollbackException(mex)
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+ DoCreateAllottedResourceTXCRollback.processRollbackJavaException(mex)
+
+ //verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("rollbackData", null)
+ verify(mex).setVariable("rolledBack", false)
+ verify(mex).setVariable("rollbackError", "Caught Java exception in AllottedResource Create Rollback")
+ verify(mex, never()).setVariable("WorkflowException", null)
+ }
+
+ @Test
+// @Ignore
+ public void processRollbackJavaException_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initProcessRollbackException(mex)
+
+ doThrow(new BpmnError("expected exception")).when(mex).setVariable("rollbackData", null)
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+ DoCreateAllottedResourceTXCRollback.processRollbackJavaException(mex)
+ }
+
+ @Test
+// @Ignore
+ public void processRollbackJavaException_Ex() {
+ ExecutionEntity mex = setupMock()
+ initProcessRollbackException(mex)
+
+ doThrow(new RuntimeException("expected exception")).when(mex).setVariable("rollbackData", null)
+
+ DoCreateAllottedResourceTXCRollback DoCreateAllottedResourceTXCRollback = new DoCreateAllottedResourceTXCRollback()
+ DoCreateAllottedResourceTXCRollback.processRollbackJavaException(mex)
+ }
+
+ private RollbackData initPreProcess(ExecutionEntity mex) {
+ def data = new RollbackData()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("rollbackData")).thenReturn(data)
+ when(mex.getVariable("rollbackAAI")).thenReturn(true)
+ when(mex.getVariable("rollbackSDNC")).thenReturn(true)
+ when(mex.getVariable("disableRollback")).thenReturn("false")
+
+ data.put("SERVICEINSTANCE", "allottedResourceId", "myid")
+
+ data.put(RbType, "serviceInstanceId", "sii")
+ data.put(RbType, "parentServiceInstanceId", "psii")
+
+ data.put(RbType, "rollbackAAI", "true")
+ data.put(RbType, "aaiARPath", "mypath")
+
+ data.put(RbType, "rollbackSDNCassign", "true")
+ data.put(RbType, "rollbackSDNCactivate", "myactivate")
+ data.put(RbType, "rollbackSDNCcreate", "mycreate")
+ data.put(RbType, "sdncActivateRollbackReq", "activatereq")
+ data.put(RbType, "sdncCreateRollbackReq", "createreq")
+ data.put(RbType, "sdncAssignRollbackReq", "assignreq")
+
+ return data
+ }
+
+ private initUpdateAaiAROrchStatus(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("aaiARPath")).thenReturn(aaiUriPfx + "/aai/v9/business/customers/customer/"+CUST+"/service-subscriptions/service-subscription/"+SVC+"/service-instances/service-instance/"+INST+"/allotted-resources/allotted-resource/"+ARID)
+ when(mex.getVariable("aai.endpoint")).thenReturn(aaiUriPfx)
+ }
+
+ private initValidateSDNCResp(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("prefix")).thenReturn(Prefix)
+ when(mex.getVariable("SDNCA_SuccessIndicator")).thenReturn(true)
+ }
+
+ private String initValidateSDNCResp_Resp() {
+ return "<response-data>&lt;response-code&gt;200&lt;/response-code&gt;</response-data>"
+ }
+
+ private initDeleteAaiAR(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("aaiARResourceVersion")).thenReturn(VERS)
+ when(mex.getVariable("aaiARPath")).thenReturn(aaiUriPfx + "/aai/v9/business/customers/customer/"+CUST+"/service-subscriptions/service-subscription/"+SVC+"/service-instances/service-instance/"+INST+"/allotted-resources/allotted-resource/"+ARID)
+ when(mex.getVariable("aai.endpoint")).thenReturn(aaiUriPfx)
+ }
+
+ private initPostProcessRequest(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("skipRollback")).thenReturn(false)
+ }
+
+ private initProcessRollbackException(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ }
+
+ private initProcessRollbackJavaException(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCTest.groovy
new file mode 100644
index 0000000000..fa40c17e63
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCTest.groovy
@@ -0,0 +1,957 @@
+/*
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.vcpe.scripts
+
+
+import org.camunda.bpm.engine.ProcessEngineServices
+import org.camunda.bpm.engine.RepositoryService
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.camunda.bpm.engine.repository.ProcessDefinition
+import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.junit.Before
+import org.junit.BeforeClass
+import org.junit.Rule
+import org.junit.Test
+import org.junit.Ignore
+import org.mockito.MockitoAnnotations
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.onap.so.bpmn.core.UrnPropertiesReader
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.mock.FileUtil
+import org.springframework.beans.factory.config.YamlPropertiesFactoryBean
+import org.springframework.core.io.ClassPathResource
+import org.springframework.core.io.FileSystemResource
+import org.springframework.core.io.Resource
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse
+import static com.github.tomakehurst.wiremock.client.WireMock.put
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor
+import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetAllottedResource
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPatchAllottedResource
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPutAllottedResource
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPutAllottedResource_500
+
+import java.util.Map
+
+import org.onap.so.bpmn.core.RollbackData
+import org.onap.so.bpmn.vcpe.scripts.MapSetter
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+
+class DoCreateAllottedResourceTXCTest extends GroovyTestBase {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(PORT)
+
+ String Prefix = "DCARTXC_"
+
+ @BeforeClass
+ public static void setUpBeforeClass() {
+ aaiUriPfx = UrnPropertiesReader.getVariable("aai.endpoint")
+ }
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ public DoCreateAllottedResourceTXCTest() {
+ super("DoCreateAllottedResourceTXC")
+ }
+
+
+ // ***** preProcessRequest *****
+
+ @Test
+ // @Ignore
+ public void preProcessRequest() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+ DoCreateAllottedResourceTXC.preProcessRequest(mex)
+
+ //verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("prefix", Prefix)
+
+ assertTrue(checkMissingPreProcessRequest("mso.workflow.sdncadapter.callback"))
+ assertTrue(checkMissingPreProcessRequest("mso.workflow.sdnc.replication.delay"))
+ assertTrue(checkMissingPreProcessRequest("serviceInstanceId"))
+ assertTrue(checkMissingPreProcessRequest("parentServiceInstanceId"))
+ assertTrue(checkMissingPreProcessRequest("allottedResourceModelInfo"))
+ assertTrue(checkMissingPreProcessRequest("brgWanMacAddress"))
+ assertTrue(checkMissingPreProcessRequest("allottedResourceRole"))
+ assertTrue(checkMissingPreProcessRequest("allottedResourceType"))
+ }
+
+
+ // ***** getAaiAR *****
+
+ @Test
+ @Ignore
+ public void getAaiAR() {
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXC/getArTxc.xml")
+
+ ExecutionEntity mex = setupMock()
+ initGetAaiAR(mex)
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+ DoCreateAllottedResourceTXC.getAaiAR(mex)
+
+ verify(mex).setVariable("foundActiveAR", true)
+ }
+
+ @Test
+ // @Ignore
+ public void getAaiAR_Duplicate() {
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXC/getArTxc.xml")
+
+ ExecutionEntity mex = setupMock()
+ initGetAaiAR(mex)
+
+ // fail if duplicate
+ when(mex.getVariable("failExists")).thenReturn("true")
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceTXC.getAaiAR(mex) }))
+ }
+
+ @Test
+ // @Ignore
+ public void getAaiAR_NotActive() {
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXC/getArTxc.xml")
+
+ ExecutionEntity mex = setupMock()
+ initGetAaiAR(mex)
+
+ // not active
+ when(mex.getVariable("aaiAROrchStatus")).thenReturn("not-active")
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ assertTrue(doBpmnError( { _ -> DoCreateAllottedResourceTXC.getAaiAR(mex) }))
+ }
+
+ @Test
+ @Ignore
+ public void getAaiAR_NoStatus() {
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXC/getArTxc.xml")
+
+ ExecutionEntity mex = setupMock()
+ initGetAaiAR(mex)
+
+ when(mex.getVariable("aaiAROrchStatus")).thenReturn(null)
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+ DoCreateAllottedResourceTXC.getAaiAR(mex)
+
+ verify(mex, never()).setVariable("foundActiveAR", true)
+ }
+
+
+ // ***** createAaiAR *****
+
+ @Test
+ @Ignore
+ public void createAaiAR() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initCreateAaiAr(mex)
+
+ MockPutAllottedResource(CUST, SVC, INST, ARID)
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+ DoCreateAllottedResourceTXC.createAaiAR(mex)
+
+ def data = map.get("rollbackData")
+ assertNotNull(data)
+ assertTrue(data instanceof RollbackData)
+
+ assertEquals("45", data.get(Prefix, "disableRollback"))
+ assertEquals("true", data.get(Prefix, "rollbackAAI"))
+ assertEquals(ARID, data.get(Prefix, "allottedResourceId"))
+ assertEquals("sii", data.get(Prefix, "serviceInstanceId"))
+ assertEquals("psii", data.get(Prefix, "parentServiceInstanceId"))
+ assertEquals(mex.getVariable("PSI_resourceLink")+"/allotted-resources/allotted-resource/"+ARID, data.get(Prefix, "aaiARPath"))
+ }
+
+ @Test
+ @Ignore
+ public void createAaiAR_NoArid_NoModelUuids() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initCreateAaiAr(mex)
+
+ // no allottedResourceId - will be generated
+
+ when(mex.getVariable("allottedResourceId")).thenReturn(null)
+
+ wireMockRule
+ .stubFor(put(urlMatching("/aai/.*/allotted-resource/.*"))
+ .willReturn(aResponse()
+ .withStatus(200)))
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+ DoCreateAllottedResourceTXC.createAaiAR(mex)
+
+ def arid = map.get("allottedResourceId")
+ assertNotNull(arid)
+ assertFalse(arid.isEmpty())
+
+ def data = map.get("rollbackData")
+ assertNotNull(data)
+ assertTrue(data instanceof RollbackData)
+
+ assertEquals(arid, data.get(Prefix, "allottedResourceId"))
+ }
+
+ @Test
+ // @Ignore
+ public void createAaiAR_MissingPsiLink() {
+ ExecutionEntity mex = setupMock()
+ initCreateAaiAr(mex)
+
+ when(mex.getVariable("PSI_resourceLink")).thenReturn(null)
+
+ MockPutAllottedResource(CUST, SVC, INST, ARID)
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceTXC.createAaiAR(mex) }))
+ }
+
+ @Test
+ // @Ignore
+ public void createAaiAR_HttpFailed() {
+ ExecutionEntity mex = setupMock()
+ initCreateAaiAr(mex)
+
+ MockPutAllottedResource_500(CUST, SVC, INST, ARID)
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceTXC.createAaiAR(mex) }))
+ }
+
+ @Test
+ // @Ignore
+ public void createAaiAR_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initCreateAaiAr(mex)
+
+ when(mex.getVariable("aai.endpoint")).thenThrow(new BpmnError("expected exception"))
+
+ MockPutAllottedResource(CUST, SVC, INST, ARID)
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceTXC.createAaiAR(mex) }))
+ }
+
+ @Test
+ // @Ignore
+ public void createAaiAR_Ex() {
+ ExecutionEntity mex = setupMock()
+ initCreateAaiAr(mex)
+
+ when(mex.getVariable("aai.endpoint")).thenThrow(new RuntimeException("expected exception"))
+
+ MockPutAllottedResource(CUST, SVC, INST, ARID)
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceTXC.createAaiAR(mex) }))
+ }
+
+
+ // ***** buildSDNCRequest *****
+
+ @Test
+ // @Ignore
+ public void buildSDNCRequest() {
+ ExecutionEntity mex = setupMock()
+ initBuildSDNCRequest(mex)
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ String result = DoCreateAllottedResourceTXC.buildSDNCRequest(mex, "myact", "myreq")
+
+ assertTrue(result.indexOf("<sdncadapter:RequestId>myreq</") >= 0)
+ assertTrue(result.indexOf("<sdncadapter:SvcAction>myact</") >= 0)
+ assertTrue(result.indexOf("<allotted-resource-id>ari</") >= 0)
+ assertTrue(result.indexOf("<sdncadapter:SvcInstanceId>sii</") >= 0)
+ assertTrue(result.indexOf("<service-instance-id>sii</") >= 0)
+ assertTrue(result.indexOf("<parent-service-instance-id>psii</") >= 0)
+ assertTrue(result.indexOf("<subscription-service-type>sst</") >= 0)
+ assertTrue(result.indexOf("<global-customer-id>gci</") >= 0)
+ assertTrue(result.indexOf("<sdncadapter:CallbackUrl>scu</") >= 0)
+ assertTrue(result.indexOf("<request-id>mri</") >= 0)
+ assertTrue(result.indexOf("<model-invariant-uuid/>") >= 0)
+ assertTrue(result.indexOf("<model-uuid/>") >= 0)
+ assertTrue(result.indexOf("<model-customization-uuid/>") >= 0)
+ assertTrue(result.indexOf("<model-version/>") >= 0)
+ assertTrue(result.indexOf("<model-name/>") >= 0)
+ }
+
+ @Test
+ // @Ignore
+ public void buildSDNCRequest_Ex() {
+ ExecutionEntity mex = setupMock()
+ initBuildSDNCRequest(mex)
+
+ when(mex.getVariable("allottedResourceId")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceTXC.buildSDNCRequest(mex, "myact", "myreq") }))
+ }
+
+
+ // ***** preProcessSDNCAssign *****
+
+ @Test
+ // @Ignore
+ public void preProcessSDNCAssign() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ def data = initPreProcessSDNC(mex)
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+ DoCreateAllottedResourceTXC.preProcessSDNCAssign(mex)
+
+ def req = map.get("sdncAssignRequest")
+ assertNotNull(req)
+
+ assertEquals(data, map.get("rollbackData"))
+
+ def rbreq = data.get(Prefix, "sdncAssignRollbackReq")
+
+ assertTrue(req.indexOf("<sdncadapter:SvcAction>assign</") >= 0)
+ assertTrue(req.indexOf("<request-action>CreateTunnelXConnInstance</") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:RequestId>") >= 0)
+
+ assertTrue(rbreq.indexOf("<sdncadapter:SvcAction>unassign</") >= 0)
+ assertTrue(rbreq.indexOf("<request-action>DeleteTunnelXConnInstance</") >= 0)
+ assertTrue(rbreq.indexOf("<sdncadapter:RequestId>") >= 0)
+ }
+
+ @Test
+ // @Ignore
+ public void preProcessSDNCAssign_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("rollbackData")).thenThrow(new BpmnError("expected exception"))
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceTXC.preProcessSDNCAssign(mex) }))
+ }
+
+ @Test
+ // @Ignore
+ public void preProcessSDNCAssign_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("rollbackData")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceTXC.preProcessSDNCAssign(mex) }))
+ }
+
+
+ // ***** preProcessSDNCCreate *****
+
+ @Test
+ // @Ignore
+ public void preProcessSDNCCreate() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ def data = initPreProcessSDNC(mex)
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+ DoCreateAllottedResourceTXC.preProcessSDNCCreate(mex)
+
+ def req = map.get("sdncCreateRequest")
+ assertNotNull(req)
+
+ assertEquals(data, map.get("rollbackData"))
+
+ def rbreq = data.get(Prefix, "sdncCreateRollbackReq")
+
+ assertTrue(req.indexOf("<sdncadapter:SvcAction>create</") >= 0)
+ assertTrue(req.indexOf("<request-action>CreateTunnelXConnInstance</") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:RequestId>") >= 0)
+
+ assertTrue(rbreq.indexOf("<sdncadapter:SvcAction>delete</") >= 0)
+ assertTrue(rbreq.indexOf("<request-action>DeleteTunnelXConnInstance</") >= 0)
+ assertTrue(rbreq.indexOf("<sdncadapter:RequestId>") >= 0)
+
+ }
+
+ @Test
+ // @Ignore
+ public void preProcessSDNCCreate_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("rollbackData")).thenThrow(new BpmnError("expected exception"))
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceTXC.preProcessSDNCCreate(mex) }))
+ }
+
+ @Test
+ // @Ignore
+ public void preProcessSDNCCreate_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("rollbackData")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceTXC.preProcessSDNCCreate(mex) }))
+ }
+
+
+ // ***** preProcessSDNCActivate *****
+
+ @Test
+ // @Ignore
+ public void preProcessSDNCActivate() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ def data = initPreProcessSDNC(mex)
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+ DoCreateAllottedResourceTXC.preProcessSDNCActivate(mex)
+
+ def req = map.get("sdncActivateRequest")
+ assertNotNull(req)
+
+ assertEquals(data, map.get("rollbackData"))
+
+ def rbreq = data.get(Prefix, "sdncActivateRollbackReq")
+
+ assertTrue(req.indexOf("<sdncadapter:SvcAction>activate</") >= 0)
+ assertTrue(req.indexOf("<request-action>CreateTunnelXConnInstance</") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:RequestId>") >= 0)
+
+ assertTrue(rbreq.indexOf("<sdncadapter:SvcAction>deactivate</") >= 0)
+ assertTrue(rbreq.indexOf("<request-action>DeleteTunnelXConnInstance</") >= 0)
+ assertTrue(rbreq.indexOf("<sdncadapter:RequestId>") >= 0)
+
+ }
+
+ @Test
+ // @Ignore
+ public void preProcessSDNCActivate_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("rollbackData")).thenThrow(new BpmnError("expected exception"))
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceTXC.preProcessSDNCActivate(mex) }))
+ }
+
+ @Test
+ // @Ignore
+ public void preProcessSDNCActivate_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("rollbackData")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceTXC.preProcessSDNCActivate(mex) }))
+ }
+
+
+ // ***** validateSDNCResp *****
+
+ @Test
+ // @Ignore
+ public void validateSDNCResp() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ def data = initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp()
+
+ when(mex.getVariable(Prefix+"sdncResponseSuccess")).thenReturn(true)
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ DoCreateAllottedResourceTXC.validateSDNCResp(mex, resp, "create")
+
+ verify(mex).getVariable("WorkflowException")
+ verify(mex).getVariable("SDNCA_SuccessIndicator")
+ verify(mex).getVariable("rollbackData")
+
+ assertEquals(data, map.get("rollbackData"))
+
+ assertEquals("true", data.get(Prefix, "rollback" + "SDNCcreate"))
+
+ }
+
+ @Test
+ // @Ignore
+ public void validateSDNCResp_Get() {
+ ExecutionEntity mex = setupMock()
+ def data = initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp()
+
+ when(mex.getVariable(Prefix+"sdncResponseSuccess")).thenReturn(true)
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ DoCreateAllottedResourceTXC.validateSDNCResp(mex, resp, "get")
+
+ verify(mex).getVariable("WorkflowException")
+ verify(mex).getVariable("SDNCA_SuccessIndicator")
+
+ verify(mex, never()).getVariable("rollbackData")
+ }
+
+ @Test
+ // @Ignore
+ public void validateSDNCResp_Unsuccessful() {
+ ExecutionEntity mex = setupMock()
+ initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp()
+
+ // unsuccessful
+ when(mex.getVariable(Prefix+"sdncResponseSuccess")).thenReturn(false)
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceTXC.validateSDNCResp(mex, resp, "create") }))
+ }
+
+ @Test
+ // @Ignore
+ public void validateSDNCResp_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp()
+
+ when(mex.getVariable("WorkflowException")).thenThrow(new BpmnError("expected exception"))
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceTXC.validateSDNCResp(mex, resp, "create") }))
+ }
+
+ @Test
+ // @Ignore
+ public void validateSDNCResp_Ex() {
+ ExecutionEntity mex = setupMock()
+ initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp()
+
+ when(mex.getVariable("WorkflowException")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceTXC.validateSDNCResp(mex, resp, "create") }))
+ }
+
+
+ // ***** preProcessSDNCGet *****
+
+ @Test
+ // @Ignore
+ public void preProcessSDNCGet_FoundAR() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcessSDNCGet(mex)
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+ DoCreateAllottedResourceTXC.preProcessSDNCGet(mex)
+
+ String req = map.get("sdncGetRequest")
+
+ assertTrue(req.indexOf("<sdncadapter:RequestId>") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:SvcInstanceId>sii</") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:SvcOperation>arlink</") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:CallbackUrl>myurl</") >= 0)
+
+ }
+
+ @Test
+ // @Ignore
+ public void preProcessSDNCGet_NotFoundAR() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcessSDNCGet(mex)
+
+ when(mex.getVariable("foundActiveAR")).thenReturn(false)
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+ DoCreateAllottedResourceTXC.preProcessSDNCGet(mex)
+
+ String req = map.get("sdncGetRequest")
+
+ assertTrue(req.indexOf("<sdncadapter:RequestId>") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:SvcInstanceId>sii</") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:SvcOperation>assignlink</") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:CallbackUrl>myurl</") >= 0)
+
+ }
+
+ @Test
+ // @Ignore
+ public void preProcessSDNCGet_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNCGet(mex)
+
+ when(mex.getVariable("foundActiveAR")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceTXC.preProcessSDNCGet(mex) }))
+ }
+
+
+ // ***** updateAaiAROrchStatus *****
+
+ @Test
+ @Ignore
+ public void updateAaiAROrchStatus() {
+ MockPatchAllottedResource(CUST, SVC, INST, ARID)
+
+ ExecutionEntity mex = setupMock()
+ initUpdateAaiAROrchStatus(mex)
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+ DoCreateAllottedResourceTXC.updateAaiAROrchStatus(mex, "success")
+ }
+
+
+ // ***** generateOutputs *****
+
+ @Test
+ // @Ignore
+ public void generateOutputs() {
+ ExecutionEntity mex = setupMock()
+ def txctop = FileUtil.readResourceFile("__files/VCPE/DoCreateAllottedResourceTXC/SDNCTopologyQueryCallback.xml")
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("enhancedCallbackRequestData")).thenReturn(txctop)
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+ DoCreateAllottedResourceTXC.generateOutputs(mex)
+
+ verify(mex).setVariable("allotedResourceName", "namefromrequest")
+ verify(mex).setVariable("vni", "my-vni")
+ verify(mex).setVariable("vgmuxBearerIP", "my-bearer-ip")
+ verify(mex).setVariable("vgmuxLanIP", "my-lan-ip")
+
+ }
+
+ @Test
+ // @Ignore
+ public void generateOutputs_BadXml() {
+ ExecutionEntity mex = setupMock()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("enhancedCallbackRequestData")).thenReturn("invalid xml")
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+ DoCreateAllottedResourceTXC.generateOutputs(mex)
+
+ verify(mex, never()).setVariable(anyString(), anyString())
+
+ }
+
+ @Test
+ // @Ignore
+ public void generateOutputs_BpmnError() {
+ ExecutionEntity mex = setupMock()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("enhancedCallbackRequestData")).thenThrow(new BpmnError("expected exception"))
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ DoCreateAllottedResourceTXC.generateOutputs(mex)
+ verify(mex, never()).setVariable(anyString(), anyString())
+
+ }
+
+ @Test
+ // @Ignore
+ public void generateOutputs_Ex() {
+ ExecutionEntity mex = setupMock()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("enhancedCallbackRequestData")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ DoCreateAllottedResourceTXC.generateOutputs(mex)
+ verify(mex, never()).setVariable(anyString(), anyString())
+
+ }
+
+
+ // ***** preProcessRollback *****
+
+ @Test
+ // @Ignore
+ public void preProcessRollback() {
+ ExecutionEntity mex = setupMock()
+ WorkflowException wfe = mock(WorkflowException.class)
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("WorkflowException")).thenReturn(wfe)
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+ DoCreateAllottedResourceTXC.preProcessRollback(mex)
+
+ verify(mex).setVariable("prevWorkflowException", wfe)
+
+ }
+
+ @Test
+ // @Ignore
+ public void preProcessRollback_NotWFE() {
+ ExecutionEntity mex = setupMock()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("WorkflowException")).thenReturn("I'm not a WFE")
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+ DoCreateAllottedResourceTXC.preProcessRollback(mex)
+
+// verify(mex, never()).setVariable("prevWorkflowException", any())
+
+ }
+
+ @Test
+ // @Ignore
+ public void preProcessRollback_BpmnError() {
+ ExecutionEntity mex = setupMock()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("WorkflowException")).thenThrow(new BpmnError("expected exception"))
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ DoCreateAllottedResourceTXC.preProcessRollback(mex)
+
+ }
+
+ @Test
+ // @Ignore
+ public void preProcessRollback_Ex() {
+ ExecutionEntity mex = setupMock()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("WorkflowException")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ DoCreateAllottedResourceTXC.preProcessRollback(mex)
+
+ }
+
+
+ // ***** postProcessRollback *****
+
+ @Test
+ // @Ignore
+ public void postProcessRollback() {
+ ExecutionEntity mex = setupMock()
+ WorkflowException wfe = mock(WorkflowException.class)
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("prevWorkflowException")).thenReturn(wfe)
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+ DoCreateAllottedResourceTXC.postProcessRollback(mex)
+
+ verify(mex).setVariable("WorkflowException", wfe)
+ verify(mex).setVariable("rollbackData", null)
+
+ }
+
+ @Test
+ // @Ignore
+ public void postProcessRollback_NotWFE() {
+ ExecutionEntity mex = setupMock()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("prevWorkflowException")).thenReturn("I'm not a WFE")
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+ DoCreateAllottedResourceTXC.postProcessRollback(mex)
+
+// verify(mex, never()).setVariable("WorkflowException", any())
+ verify(mex).setVariable("rollbackData", null)
+
+ }
+
+ @Test
+ // @Ignore
+ public void postProcessRollback_BpmnError() {
+ ExecutionEntity mex = setupMock()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("prevWorkflowException")).thenThrow(new BpmnError("expected exception"))
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceTXC.postProcessRollback(mex) }))
+ verify(mex, never()).setVariable("rollbackData", null)
+
+ }
+
+ @Test
+ // @Ignore
+ public void postProcessRollback_Ex() {
+ ExecutionEntity mex = setupMock()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("prevWorkflowException")).thenThrow(new RuntimeException("expected exception"))
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ DoCreateAllottedResourceTXC.postProcessRollback(mex)
+ verify(mex, never()).setVariable("rollbackData", null)
+
+ }
+
+ private boolean checkMissingPreProcessRequest(String fieldnm) {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ DoCreateAllottedResourceTXC DoCreateAllottedResourceTXC = new DoCreateAllottedResourceTXC()
+
+ when(mex.getVariable(fieldnm)).thenReturn("")
+
+ return doBpmnError( { _ -> DoCreateAllottedResourceTXC.preProcessRequest(mex) })
+ }
+
+ private void initPreProcess(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("sdncurn")
+ when(mex.getVariable("mso.workflow.sdnc.replication.delay")).thenReturn("sdncdelay")
+ when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
+ when(mex.getVariable("parentServiceInstanceId")).thenReturn("psii")
+ when(mex.getVariable("allottedResourceModelInfo")).thenReturn("armi")
+ when(mex.getVariable("brgWanMacAddress")).thenReturn("bwma")
+ when(mex.getVariable("allottedResourceRole")).thenReturn("arr")
+ when(mex.getVariable("allottedResourceType")).thenReturn("art")
+ }
+
+ private void initGetAaiAR(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("allottedResourceType")).thenReturn("TXCt")
+ when(mex.getVariable("allottedResourceRole")).thenReturn("TXCr")
+ when(mex.getVariable("CSI_service")).thenReturn(FileUtil.readResourceFile("__files/VCPE/DoCreateAllottedResourceTXC/getAR.xml"))
+ when(mex.getVariable("aai.endpoint")).thenReturn(aaiUriPfx)
+ when(mex.getVariable("aaiAROrchStatus")).thenReturn("Active")
+ }
+
+ private initCreateAaiAr(ExecutionEntity mex) {
+ when(mex.getVariable("disableRollback")).thenReturn(45)
+ when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
+ when(mex.getVariable("parentServiceInstanceId")).thenReturn("psii")
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("allottedResourceId")).thenReturn(ARID)
+ when(mex.getVariable("aai.endpoint")).thenReturn(aaiUriPfx)
+ when(mex.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn(UrnPropertiesReader.getVariable("mso.workflow.global.default.aai.namespace"))
+ when(mex.getVariable("PSI_resourceLink")).thenReturn(aaiUriPfx + "/aai/v9/business/customers/customer/"+CUST+"/service-subscriptions/service-subscription/"+SVC+"/service-instances/service-instance/"+INST)
+ when(mex.getVariable("allottedResourceType")).thenReturn("TXCt")
+ when(mex.getVariable("allottedResourceRole")).thenReturn("TXCr")
+ when(mex.getVariable("CSI_resourceLink")).thenReturn(aaiUriPfx+"/aai/v9/mycsi")
+ when(mex.getVariable("allottedResourceModelInfo")).thenReturn("""
+ {
+ "modelInvariantUuid":"modelinvuuid",
+ "modelUuid":"modeluuid",
+ "modelCustomizationUuid":"modelcustuuid"
+ }
+ """)
+ }
+
+ private initBuildSDNCRequest(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("allottedResourceId")).thenReturn("ari")
+ when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
+ when(mex.getVariable("parentServiceInstanceId")).thenReturn("psii")
+ when(mex.getVariable("subscriptionServiceType")).thenReturn("sst")
+ when(mex.getVariable("globalCustomerId")).thenReturn("gci")
+ when(mex.getVariable("sdncCallbackUrl")).thenReturn("scu")
+ when(mex.getVariable("msoRequestId")).thenReturn("mri")
+ }
+
+ private RollbackData initPreProcessSDNC(ExecutionEntity mex) {
+ def data = new RollbackData()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("rollbackData")).thenReturn(data)
+
+ return data
+ }
+
+ private initPreProcessSDNCGet(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("sdncCallbackUrl")).thenReturn("myurl")
+ when(mex.getVariable("foundActiveAR")).thenReturn(true)
+ when(mex.getVariable("aaiARGetResponse")).thenReturn("<selflink>arlink</selflink>")
+ when(mex.getVariable("sdncAssignResponse")).thenReturn("<response-data>&lt;object-path&gt;assignlink&lt;/object-path&gt;</response-data>")
+ when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
+ when(mex.getVariable("sdncCallbackUrl")).thenReturn("myurl")
+ }
+
+ private RollbackData initValidateSDNCResp(ExecutionEntity mex) {
+ def data = new RollbackData()
+
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("prefix")).thenReturn(Prefix)
+ when(mex.getVariable("SDNCA_SuccessIndicator")).thenReturn(true)
+ when(mex.getVariable("rollbackData")).thenReturn(data)
+
+ return data
+ }
+
+ private String initValidateSDNCResp_Resp() {
+ return "<response-data>&lt;response-code&gt;200&lt;/response-code&gt;</response-data>"
+ }
+
+ private initUpdateAaiAROrchStatus(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("aaiARPath")).thenReturn(aaiUriPfx + "/aai/v9/business/customers/customer/"+CUST+"/service-subscriptions/service-subscription/"+SVC+"/service-instances/service-instance/"+INST+"/allotted-resources/allotted-resource/"+ARID)
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceBRGTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceBRGTest.groovy
new file mode 100644
index 0000000000..e8004d3d2b
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceBRGTest.groovy
@@ -0,0 +1,606 @@
+/*
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.vcpe.scripts
+
+
+import org.camunda.bpm.engine.ProcessEngineServices
+import org.camunda.bpm.engine.RepositoryService
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.camunda.bpm.engine.repository.ProcessDefinition
+import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.junit.Before
+import org.junit.BeforeClass
+import org.junit.Rule
+import org.junit.Test
+import org.junit.Ignore
+import org.mockito.MockitoAnnotations
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.onap.so.bpmn.core.UrnPropertiesReader
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.mock.FileUtil
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse
+import static com.github.tomakehurst.wiremock.client.WireMock.delete
+import static com.github.tomakehurst.wiremock.client.WireMock.get
+import static com.github.tomakehurst.wiremock.client.WireMock.patch
+import static com.github.tomakehurst.wiremock.client.WireMock.put
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor
+import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockDeleteAllottedResource
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetAllottedResource
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPatchAllottedResource
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockQueryAllottedResourceById
+
+import java.util.Map
+
+import org.onap.so.bpmn.core.RollbackData
+import org.onap.so.bpmn.vcpe.scripts.MapSetter
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+
+class DoDeleteAllottedResourceBRGTest extends GroovyTestBase {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(PORT)
+
+ String Prefix = "DDARBRG_"
+
+ @BeforeClass
+ public static void setUpBeforeClass() {
+ super.setUpBeforeClass()
+ }
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ public DoDeleteAllottedResourceBRGTest() {
+ super("DoDeleteAllottedResourceBRG")
+ }
+
+
+ // ***** preProcessRequest *****
+
+ @Test
+// @Ignore
+ public void preProcessRequest() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+ DoDeleteAllottedResourceBRG.preProcessRequest(mex)
+
+ //verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("prefix", Prefix)
+ verify(mex).setVariable("sdncCallbackUrl", "sdncurn")
+
+ assertTrue(checkMissingPreProcessRequest("mso.workflow.sdncadapter.callback"))
+ assertTrue(checkMissingPreProcessRequest("serviceInstanceId"))
+ assertTrue(checkMissingPreProcessRequest("allottedResourceId"))
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ when(mex.getVariable("serviceInstanceId")).thenThrow(new BpmnError("expected exception"))
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+
+ assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceBRG.preProcessRequest(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ when(mex.getVariable("serviceInstanceId")).thenThrow(new RuntimeException("expected exception"))
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+
+ assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceBRG.preProcessRequest(mex) }))
+ }
+
+
+ // ***** getAaiAR *****
+
+ @Test
+ @Ignore
+ public void getAaiAR() {
+ MockQueryAllottedResourceById(ARID, "GenericFlows/getARUrlById.xml")
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceBRG/arGetById.xml")
+
+ ExecutionEntity mex = setupMock()
+ initGetAaiAR(mex)
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+ DoDeleteAllottedResourceBRG.getAaiAR(mex)
+
+ verify(mex).setVariable("parentServiceInstanceId", INST)
+ }
+
+ @Test
+// @Ignore
+ public void getAaiAR_EmptyResponse() {
+
+ // note: empty result-link
+ wireMockRule
+ .stubFor(get(urlMatching("/aai/.*/search/.*"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBody("<result-data></result-data>")))
+
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceBRG/arGetById.xml")
+
+ ExecutionEntity mex = setupMock()
+ initGetAaiAR(mex)
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+
+ assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceBRG.getAaiAR(mex) }))
+ }
+
+
+ // ***** updateAaiAROrchStatus *****
+
+ @Test
+ @Ignore
+ public void updateAaiAROrchStatus() {
+ ExecutionEntity mex = setupMock()
+ initUpdateAaiAROrchStatus(mex)
+
+ MockPatchAllottedResource(CUST, SVC, INST, ARID)
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+ DoDeleteAllottedResourceBRG.updateAaiAROrchStatus(mex, "success")
+ }
+
+
+ // ***** buildSDNCRequest *****
+
+ @Test
+// @Ignore
+ public void buildSDNCRequest() {
+ ExecutionEntity mex = setupMock()
+ initBuildSDNCRequest(mex)
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+
+ String result = DoDeleteAllottedResourceBRG.buildSDNCRequest(mex, "myact", "myreq")
+
+ assertTrue(result.indexOf("<sdncadapter:RequestId>myreq</") >= 0)
+ assertTrue(result.indexOf("<sdncadapter:SvcAction>myact</") >= 0)
+ assertTrue(result.indexOf("<allotted-resource-id>ari</") >= 0)
+ assertTrue(result.indexOf("<sdncadapter:SvcInstanceId>sii</") >= 0)
+ assertTrue(result.indexOf("<service-instance-id>sii</") >= 0)
+ assertTrue(result.indexOf("<parent-service-instance-id>psii</") >= 0)
+ assertTrue(result.indexOf("<subscription-service-type>sst</") >= 0)
+ assertTrue(result.indexOf("<global-customer-id>gci</") >= 0)
+ assertTrue(result.indexOf("<sdncadapter:CallbackUrl>scu</") >= 0)
+ assertTrue(result.indexOf("<request-id>mri</") >= 0)
+ assertTrue(result.indexOf("<model-invariant-uuid/>") >= 0)
+ assertTrue(result.indexOf("<model-uuid/>") >= 0)
+ assertTrue(result.indexOf("<model-customization-uuid/>") >= 0)
+ assertTrue(result.indexOf("<model-version/>") >= 0)
+ assertTrue(result.indexOf("<model-name/>") >= 0)
+ }
+
+ @Test
+// @Ignore
+ public void buildSDNCRequest_Ex() {
+ ExecutionEntity mex = setupMock()
+ initBuildSDNCRequest(mex)
+
+ when(mex.getVariable("allottedResourceId")).thenThrow(new RuntimeException("expected exception"))
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceBRG.buildSDNCRequest(mex, "myact", "myreq") }))
+ }
+
+
+ // ***** preProcessSDNCUnassign *****
+
+ @Test
+// @Ignore
+ public void preProcessSDNCUnassign() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcessSDNC(mex)
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+ DoDeleteAllottedResourceBRG.preProcessSDNCUnassign(mex)
+
+ def req = map.get("sdncUnassignRequest")
+
+ assertTrue(req.indexOf("<sdncadapter:SvcAction>unassign</") >= 0)
+ assertTrue(req.indexOf("<request-action>DeleteBRGInstance</") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:RequestId>") >= 0)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessSDNCUnassign_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("allottedResourceId")).thenThrow(new BpmnError("expected exception"))
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceBRG.preProcessSDNCUnassign(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void preProcessSDNCUnassign_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("allottedResourceId")).thenThrow(new RuntimeException("expected exception"))
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceBRG.preProcessSDNCUnassign(mex) }))
+ }
+
+
+ // ***** preProcessSDNCDelete *****
+
+ @Test
+// @Ignore
+ public void preProcessSDNCDelete() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcessSDNC(mex)
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+ DoDeleteAllottedResourceBRG.preProcessSDNCDelete(mex)
+
+ def req = map.get("sdncDeleteRequest")
+
+ assertTrue(req.indexOf("<sdncadapter:SvcAction>delete</") >= 0)
+ assertTrue(req.indexOf("<request-action>DeleteBRGInstance</") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:RequestId>") >= 0)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessSDNCDelete_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("allottedResourceId")).thenThrow(new BpmnError("expected exception"))
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceBRG.preProcessSDNCDelete(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void preProcessSDNCDelete_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("allottedResourceId")).thenThrow(new RuntimeException("expected exception"))
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceBRG.preProcessSDNCDelete(mex) }))
+ }
+
+
+ // ***** preProcessSDNCDeactivate *****
+
+ @Test
+// @Ignore
+ public void preProcessSDNCDeactivate() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcessSDNC(mex)
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+ DoDeleteAllottedResourceBRG.preProcessSDNCDeactivate(mex)
+
+ def req = map.get("sdncDeactivateRequest")
+
+ assertTrue(req.indexOf("<sdncadapter:SvcAction>deactivate</") >= 0)
+ assertTrue(req.indexOf("<request-action>DeleteBRGInstance</") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:RequestId>") >= 0)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessSDNCDeactivate_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("allottedResourceId")).thenThrow(new BpmnError("expected exception"))
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceBRG.preProcessSDNCDeactivate(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void preProcessSDNCDeactivate_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("allottedResourceId")).thenThrow(new RuntimeException("expected exception"))
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceBRG.preProcessSDNCDeactivate(mex) }))
+ }
+
+
+ // ***** validateSDNCResp *****
+
+ @Test
+// @Ignore
+ public void validateSDNCResp() {
+ ExecutionEntity mex = setupMock()
+ def data = initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp(200)
+
+ when(mex.getVariable(Prefix+"sdncResponseSuccess")).thenReturn(true)
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+
+ DoDeleteAllottedResourceBRG.validateSDNCResp(mex, resp, "create")
+
+ verify(mex).getVariable("WorkflowException")
+ verify(mex).getVariable("SDNCA_SuccessIndicator")
+ verify(mex).getVariable(Prefix+"sdncResponseSuccess")
+
+ verify(mex, never()).getVariable(Prefix + "sdncRequestDataResponseCode")
+ verify(mex, never()).setVariable("wasDeleted", false)
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_Fail404_Deactivate_FailNotFound() {
+ ExecutionEntity mex = setupMock()
+ def data = initValidateSDNCResp(mex)
+
+ def resp = initValidateSDNCResp_Resp(404)
+ when(mex.getVariable(Prefix+"sdncRequestDataResponseCode")).thenReturn("404")
+ when(mex.getVariable("failNotFound")).thenReturn("true")
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+
+ assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceBRG.validateSDNCResp(mex, resp, "deactivate")}))
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_Fail404_Deactivate() {
+ ExecutionEntity mex = setupMock()
+ def data = initValidateSDNCResp(mex)
+
+ def resp = initValidateSDNCResp_Resp(404)
+ when(mex.getVariable(Prefix+"sdncRequestDataResponseCode")).thenReturn("404")
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+
+ DoDeleteAllottedResourceBRG.validateSDNCResp(mex, resp, "deactivate")
+
+ verify(mex).setVariable("ARNotFoundInSDNC", true)
+ verify(mex).setVariable("wasDeleted", false)
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_Fail404() {
+ ExecutionEntity mex = setupMock()
+ def data = initValidateSDNCResp(mex)
+
+ def resp = initValidateSDNCResp_Resp(404)
+ when(mex.getVariable(Prefix+"sdncRequestDataResponseCode")).thenReturn("404")
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+
+ assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceBRG.validateSDNCResp(mex, resp, "create")}))
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_Deactivate() {
+ ExecutionEntity mex = setupMock()
+ def data = initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp(200)
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+
+ assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceBRG.validateSDNCResp(mex, resp, "deactivate")}))
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp(200)
+
+ when(mex.getVariable("WorkflowException")).thenThrow(new BpmnError("expected exception"))
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceBRG.validateSDNCResp(mex, resp, "create") }))
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_Ex() {
+ ExecutionEntity mex = setupMock()
+ initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp(200)
+
+ when(mex.getVariable("WorkflowException")).thenThrow(new RuntimeException("expected exception"))
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+
+ assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceBRG.validateSDNCResp(mex, resp, "create") }))
+ }
+
+ @Test
+ @Ignore
+ public void deleteAaiAR() {
+ ExecutionEntity mex = setupMock()
+ initDeleteAaiAR(mex)
+
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceBRG/arGetById.xml")
+ MockDeleteAllottedResource(CUST, SVC, INST, ARID, VERS)
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+ DoDeleteAllottedResourceBRG.deleteAaiAR(mex)
+ }
+
+ @Test
+// @Ignore
+ public void deleteAaiAR_NoArPath() {
+ ExecutionEntity mex = setupMock()
+ initDeleteAaiAR(mex)
+
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceBRG/arGetById.xml")
+ MockDeleteAllottedResource(CUST, SVC, INST, ARID, VERS)
+
+ when(mex.getVariable("aaiARPath")).thenReturn("")
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+
+ assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceBRG.deleteAaiAR(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void deleteAaiAR_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initDeleteAaiAR(mex)
+
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceBRG/arGetById.xml")
+ MockDeleteAllottedResource(CUST, SVC, INST, ARID, VERS)
+
+ when(mex.getVariable("aaiARPath")).thenThrow(new BpmnError("expected exception"))
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+
+ assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceBRG.deleteAaiAR(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void deleteAaiAR_Ex() {
+ ExecutionEntity mex = setupMock()
+ initDeleteAaiAR(mex)
+
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceBRG/arGetById.xml")
+ MockDeleteAllottedResource(CUST, SVC, INST, ARID, VERS)
+
+ when(mex.getVariable("aaiARPath")).thenThrow(new RuntimeException("expected exception"))
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+
+ assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceBRG.deleteAaiAR(mex) }))
+ }
+
+ private boolean checkMissingPreProcessRequest(String fieldnm) {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
+
+ when(mex.getVariable(fieldnm)).thenReturn("")
+
+ return doBpmnError( { _ -> DoDeleteAllottedResourceBRG.preProcessRequest(mex) })
+ }
+
+ private void initPreProcess(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("sdncurn")
+ when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
+ when(mex.getVariable("allottedResourceId")).thenReturn("ari")
+ }
+
+ private void initGetAaiAR(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("allottedResourceType")).thenReturn("BRG")
+ when(mex.getVariable("allottedResourceRole")).thenReturn("BRG")
+ when(mex.getVariable("allottedResourceId")).thenReturn(ARID)
+ when(mex.getVariable("CSI_service")).thenReturn(FileUtil.readResourceFile("__files/VCPE/DoDeleteAllottedResourceBRG/getAR.xml"))
+ when(mex.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn(UrnPropertiesReader.getVariable("mso.workflow.global.default.aai.namespace"))
+ when(mex.getVariable("mso.workflow.global.default.aai.version")).thenReturn(UrnPropertiesReader.getVariable("mso.workflow.global.default.aai.version"))
+ when(mex.getVariable("mso.workflow.default.aai.v8.nodes.query.uri")).thenReturn(UrnPropertiesReader.getVariable("mso.workflow.default.aai.v8.nodes-query.uri"))
+ when(mex.getVariable("aai.endpoint")).thenReturn(aaiUriPfx)
+ when(mex.getVariable("aaiARPath")).thenReturn(aaiUriPfx + "/aai/v9/business/customers/customer/"+CUST+"/service-subscriptions/service-subscription/"+SVC+"/service-instances/service-instance/"+INST+"/allotted-resources/allotted-resource/"+ARID)
+ when(mex.getVariable("aaiAROrchStatus")).thenReturn("Active")
+ }
+
+ private initUpdateAaiAROrchStatus(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("aaiARPath")).thenReturn(aaiUriPfx + "/aai/v9/business/customers/customer/"+CUST+"/service-subscriptions/service-subscription/"+SVC+"/service-instances/service-instance/"+INST+"/allotted-resources/allotted-resource/"+ARID)
+ }
+
+ private initBuildSDNCRequest(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("allottedResourceId")).thenReturn("ari")
+ when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
+ when(mex.getVariable("parentServiceInstanceId")).thenReturn("psii")
+ when(mex.getVariable("subscriptionServiceType")).thenReturn("sst")
+ when(mex.getVariable("globalCustomerId")).thenReturn("gci")
+ when(mex.getVariable("sdncCallbackUrl")).thenReturn("scu")
+ when(mex.getVariable("msoRequestId")).thenReturn("mri")
+ }
+
+ private initPreProcessSDNC(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ }
+
+ private initValidateSDNCResp(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("prefix")).thenReturn(Prefix)
+ when(mex.getVariable("SDNCA_SuccessIndicator")).thenReturn(true)
+ }
+
+ private String initValidateSDNCResp_Resp(int code) {
+ return "<response-data>&lt;response-code&gt;${code}&lt;/response-code&gt;</response-data>"
+ }
+
+ private initDeleteAaiAR(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("aaiARPath")).thenReturn(aaiUriPfx + "/aai/v9/business/customers/customer/"+CUST+"/service-subscriptions/service-subscription/"+SVC+"/service-instances/service-instance/"+INST+"/allotted-resources/allotted-resource/"+ARID)
+ when(mex.getVariable("aaiARResourceVersion")).thenReturn("myvers")
+ when(mex.getVariable("aai.endpoint")).thenReturn(aaiUriPfx)
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceTXCTest.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceTXCTest.groovy
new file mode 100644
index 0000000000..6719be17a1
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceTXCTest.groovy
@@ -0,0 +1,607 @@
+/*
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.vcpe.scripts
+
+
+import org.camunda.bpm.engine.ProcessEngineServices
+import org.camunda.bpm.engine.RepositoryService
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.camunda.bpm.engine.repository.ProcessDefinition
+import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.junit.Before
+import org.junit.BeforeClass
+import org.junit.Rule
+import org.junit.Test
+import org.junit.Ignore
+import org.mockito.MockitoAnnotations
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.onap.so.bpmn.core.UrnPropertiesReader
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.mock.FileUtil
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse
+import static com.github.tomakehurst.wiremock.client.WireMock.delete
+import static com.github.tomakehurst.wiremock.client.WireMock.get
+import static com.github.tomakehurst.wiremock.client.WireMock.patch
+import static com.github.tomakehurst.wiremock.client.WireMock.put
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor
+import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockDeleteAllottedResource
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetAllottedResource
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPatchAllottedResource
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockQueryAllottedResourceById
+
+
+import java.util.Map
+
+import org.onap.so.bpmn.core.RollbackData
+import org.onap.so.bpmn.vcpe.scripts.MapSetter
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+
+class DoDeleteAllottedResourceTXCTest extends GroovyTestBase {
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(PORT)
+
+ String Prefix = "DDARTXC_"
+
+ @BeforeClass
+ public static void setUpBeforeClass() {
+ super.setUpBeforeClass()
+ }
+
+ @Before
+ public void init()
+ {
+ MockitoAnnotations.initMocks(this)
+ }
+
+ public DoDeleteAllottedResourceTXCTest() {
+ super("DoDeleteAllottedResourceTXC")
+ }
+
+
+ // ***** preProcessRequest *****
+
+ @Test
+// @Ignore
+ public void preProcessRequest() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+ DoDeleteAllottedResourceTXC.preProcessRequest(mex)
+
+ //verify(mex).getVariable(DBGFLAG)
+ verify(mex).setVariable("prefix", Prefix)
+ verify(mex).setVariable("sdncCallbackUrl", "sdncurn")
+
+ assertTrue(checkMissingPreProcessRequest("mso.workflow.sdncadapter.callback"))
+ assertTrue(checkMissingPreProcessRequest("serviceInstanceId"))
+ assertTrue(checkMissingPreProcessRequest("allottedResourceId"))
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ when(mex.getVariable("serviceInstanceId")).thenThrow(new BpmnError("expected exception"))
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+
+ assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceTXC.preProcessRequest(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void preProcessRequest_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ when(mex.getVariable("serviceInstanceId")).thenThrow(new RuntimeException("expected exception"))
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+
+ assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceTXC.preProcessRequest(mex) }))
+ }
+
+
+ // ***** getAaiAR *****
+
+ @Test
+ @Ignore
+ public void getAaiAR() {
+ MockQueryAllottedResourceById(ARID, "GenericFlows/getARUrlById.xml")
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceTXC/arGetById.xml")
+
+ ExecutionEntity mex = setupMock()
+ initGetAaiAR(mex)
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+ DoDeleteAllottedResourceTXC.getAaiAR(mex)
+
+ verify(mex).setVariable("parentServiceInstanceId", INST)
+ }
+
+ @Test
+// @Ignore
+ public void getAaiAR_EmptyResponse() {
+
+ // note: empty result-link
+ wireMockRule
+ .stubFor(get(urlMatching("/aai/.*/search/.*"))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBody("<result-data></result-data>")))
+
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceTXC/arGetById.xml")
+
+ ExecutionEntity mex = setupMock()
+ initGetAaiAR(mex)
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+
+ assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceTXC.getAaiAR(mex) }))
+ }
+
+
+ // ***** updateAaiAROrchStatus *****
+
+ @Test
+ @Ignore
+ public void updateAaiAROrchStatus() {
+ ExecutionEntity mex = setupMock()
+ initUpdateAaiAROrchStatus(mex)
+
+ MockPatchAllottedResource(CUST, SVC, INST, ARID)
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+ DoDeleteAllottedResourceTXC.updateAaiAROrchStatus(mex, "success")
+ }
+
+
+ // ***** buildSDNCRequest *****
+
+ @Test
+// @Ignore
+ public void buildSDNCRequest() {
+ ExecutionEntity mex = setupMock()
+ initBuildSDNCRequest(mex)
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+
+ String result = DoDeleteAllottedResourceTXC.buildSDNCRequest(mex, "myact", "myreq")
+
+ assertTrue(result.indexOf("<sdncadapter:RequestId>myreq</") >= 0)
+ assertTrue(result.indexOf("<sdncadapter:SvcAction>myact</") >= 0)
+ assertTrue(result.indexOf("<allotted-resource-id>ari</") >= 0)
+ assertTrue(result.indexOf("<sdncadapter:SvcInstanceId>sii</") >= 0)
+ assertTrue(result.indexOf("<service-instance-id>sii</") >= 0)
+ assertTrue(result.indexOf("<parent-service-instance-id>psii</") >= 0)
+ assertTrue(result.indexOf("<subscription-service-type>sst</") >= 0)
+ assertTrue(result.indexOf("<global-customer-id>gci</") >= 0)
+ assertTrue(result.indexOf("<sdncadapter:CallbackUrl>scu</") >= 0)
+ assertTrue(result.indexOf("<request-id>mri</") >= 0)
+ assertTrue(result.indexOf("<model-invariant-uuid/>") >= 0)
+ assertTrue(result.indexOf("<model-uuid/>") >= 0)
+ assertTrue(result.indexOf("<model-customization-uuid/>") >= 0)
+ assertTrue(result.indexOf("<model-version/>") >= 0)
+ assertTrue(result.indexOf("<model-name/>") >= 0)
+ }
+
+ @Test
+// @Ignore
+ public void buildSDNCRequest_Ex() {
+ ExecutionEntity mex = setupMock()
+ initBuildSDNCRequest(mex)
+
+ when(mex.getVariable("allottedResourceId")).thenThrow(new RuntimeException("expected exception"))
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceTXC.buildSDNCRequest(mex, "myact", "myreq") }))
+ }
+
+
+ // ***** preProcessSDNCUnassign *****
+
+ @Test
+// @Ignore
+ public void preProcessSDNCUnassign() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcessSDNC(mex)
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+ DoDeleteAllottedResourceTXC.preProcessSDNCUnassign(mex)
+
+ def req = map.get("sdncUnassignRequest")
+
+ assertTrue(req.indexOf("<sdncadapter:SvcAction>unassign</") >= 0)
+ assertTrue(req.indexOf("<request-action>DeleteTunnelXConnInstance</") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:RequestId>") >= 0)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessSDNCUnassign_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("allottedResourceId")).thenThrow(new BpmnError("expected exception"))
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceTXC.preProcessSDNCUnassign(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void preProcessSDNCUnassign_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("allottedResourceId")).thenThrow(new RuntimeException("expected exception"))
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceTXC.preProcessSDNCUnassign(mex) }))
+ }
+
+
+ // ***** preProcessSDNCDelete *****
+
+ @Test
+// @Ignore
+ public void preProcessSDNCDelete() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcessSDNC(mex)
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+ DoDeleteAllottedResourceTXC.preProcessSDNCDelete(mex)
+
+ def req = map.get("sdncDeleteRequest")
+
+ assertTrue(req.indexOf("<sdncadapter:SvcAction>delete</") >= 0)
+ assertTrue(req.indexOf("<request-action>DeleteTunnelXConnInstance</") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:RequestId>") >= 0)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessSDNCDelete_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("allottedResourceId")).thenThrow(new BpmnError("expected exception"))
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceTXC.preProcessSDNCDelete(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void preProcessSDNCDelete_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("allottedResourceId")).thenThrow(new RuntimeException("expected exception"))
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceTXC.preProcessSDNCDelete(mex) }))
+ }
+
+
+ // ***** preProcessSDNCDeactivate *****
+
+ @Test
+// @Ignore
+ public void preProcessSDNCDeactivate() {
+ ExecutionEntity mex = setupMock()
+ def map = setupMap(mex)
+ initPreProcessSDNC(mex)
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+ DoDeleteAllottedResourceTXC.preProcessSDNCDeactivate(mex)
+
+ def req = map.get("sdncDeactivateRequest")
+
+ assertTrue(req.indexOf("<sdncadapter:SvcAction>deactivate</") >= 0)
+ assertTrue(req.indexOf("<request-action>DeleteTunnelXConnInstance</") >= 0)
+ assertTrue(req.indexOf("<sdncadapter:RequestId>") >= 0)
+ }
+
+ @Test
+// @Ignore
+ public void preProcessSDNCDeactivate_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("allottedResourceId")).thenThrow(new BpmnError("expected exception"))
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceTXC.preProcessSDNCDeactivate(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void preProcessSDNCDeactivate_Ex() {
+ ExecutionEntity mex = setupMock()
+ initPreProcessSDNC(mex)
+
+ when(mex.getVariable("allottedResourceId")).thenThrow(new RuntimeException("expected exception"))
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceTXC.preProcessSDNCDeactivate(mex) }))
+ }
+
+
+ // ***** validateSDNCResp *****
+
+ @Test
+// @Ignore
+ public void validateSDNCResp() {
+ ExecutionEntity mex = setupMock()
+ def data = initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp(200)
+
+ when(mex.getVariable(Prefix+"sdncResponseSuccess")).thenReturn(true)
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+
+ DoDeleteAllottedResourceTXC.validateSDNCResp(mex, resp, "create")
+
+ verify(mex).getVariable("WorkflowException")
+ verify(mex).getVariable("SDNCA_SuccessIndicator")
+ verify(mex).getVariable(Prefix+"sdncResponseSuccess")
+
+ verify(mex, never()).getVariable(Prefix + "sdncRequestDataResponseCode")
+ verify(mex, never()).setVariable("wasDeleted", false)
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_Fail404_Deactivate_FailNotFound() {
+ ExecutionEntity mex = setupMock()
+ def data = initValidateSDNCResp(mex)
+
+ def resp = initValidateSDNCResp_Resp(404)
+ when(mex.getVariable(Prefix+"sdncRequestDataResponseCode")).thenReturn("404")
+ when(mex.getVariable("failNotFound")).thenReturn("true")
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+
+ assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceTXC.validateSDNCResp(mex, resp, "deactivate")}))
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_Fail404_Deactivate() {
+ ExecutionEntity mex = setupMock()
+ def data = initValidateSDNCResp(mex)
+
+ def resp = initValidateSDNCResp_Resp(404)
+ when(mex.getVariable(Prefix+"sdncRequestDataResponseCode")).thenReturn("404")
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+
+ DoDeleteAllottedResourceTXC.validateSDNCResp(mex, resp, "deactivate")
+
+ verify(mex).setVariable("ARNotFoundInSDNC", true)
+ verify(mex).setVariable("wasDeleted", false)
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_Fail404() {
+ ExecutionEntity mex = setupMock()
+ def data = initValidateSDNCResp(mex)
+
+ def resp = initValidateSDNCResp_Resp(404)
+ when(mex.getVariable(Prefix+"sdncRequestDataResponseCode")).thenReturn("404")
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+
+ assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceTXC.validateSDNCResp(mex, resp, "create")}))
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_Deactivate() {
+ ExecutionEntity mex = setupMock()
+ def data = initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp(200)
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+
+ assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceTXC.validateSDNCResp(mex, resp, "deactivate")}))
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp(200)
+
+ when(mex.getVariable("WorkflowException")).thenThrow(new BpmnError("expected exception"))
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceTXC.validateSDNCResp(mex, resp, "create") }))
+ }
+
+ @Test
+// @Ignore
+ public void validateSDNCResp_Ex() {
+ ExecutionEntity mex = setupMock()
+ initValidateSDNCResp(mex)
+ def resp = initValidateSDNCResp_Resp(200)
+
+ when(mex.getVariable("WorkflowException")).thenThrow(new RuntimeException("expected exception"))
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+
+ assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceTXC.validateSDNCResp(mex, resp, "create") }))
+ }
+
+ @Test
+ @Ignore
+ public void deleteAaiAR() {
+ ExecutionEntity mex = setupMock()
+ initDeleteAaiAR(mex)
+
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceTXC/arGetById.xml")
+ MockDeleteAllottedResource(CUST, SVC, INST, ARID, VERS)
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+ DoDeleteAllottedResourceTXC.deleteAaiAR(mex)
+ }
+
+ @Test
+// @Ignore
+ public void deleteAaiAR_NoArPath() {
+ ExecutionEntity mex = setupMock()
+ initDeleteAaiAR(mex)
+
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceTXC/arGetById.xml")
+ MockDeleteAllottedResource(CUST, SVC, INST, ARID, VERS)
+
+ when(mex.getVariable("aaiARPath")).thenReturn("")
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+
+ assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceTXC.deleteAaiAR(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void deleteAaiAR_BpmnError() {
+ ExecutionEntity mex = setupMock()
+ initDeleteAaiAR(mex)
+
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceTXC/arGetById.xml")
+ MockDeleteAllottedResource(CUST, SVC, INST, ARID, VERS)
+
+ when(mex.getVariable("aaiARPath")).thenThrow(new BpmnError("expected exception"))
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+
+ assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceTXC.deleteAaiAR(mex) }))
+ }
+
+ @Test
+// @Ignore
+ public void deleteAaiAR_Ex() {
+ ExecutionEntity mex = setupMock()
+ initDeleteAaiAR(mex)
+
+ MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceTXC/arGetById.xml")
+ MockDeleteAllottedResource(CUST, SVC, INST, ARID, VERS)
+
+ when(mex.getVariable("aaiARPath")).thenThrow(new RuntimeException("expected exception"))
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+
+ assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceTXC.deleteAaiAR(mex) }))
+ }
+
+ private boolean checkMissingPreProcessRequest(String fieldnm) {
+ ExecutionEntity mex = setupMock()
+ initPreProcess(mex)
+
+ DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
+
+ when(mex.getVariable(fieldnm)).thenReturn("")
+
+ return doBpmnError( { _ -> DoDeleteAllottedResourceTXC.preProcessRequest(mex) })
+ }
+
+ private void initPreProcess(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("sdncurn")
+ when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
+ when(mex.getVariable("allottedResourceId")).thenReturn("ari")
+ }
+
+ private void initGetAaiAR(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("allottedResourceType")).thenReturn("TXC")
+ when(mex.getVariable("allottedResourceRole")).thenReturn("TXC")
+ when(mex.getVariable("allottedResourceId")).thenReturn(ARID)
+ when(mex.getVariable("CSI_service")).thenReturn(FileUtil.readResourceFile("__files/VCPE/DoDeleteAllottedResourceTXC/getAR.xml"))
+ when(mex.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn(UrnPropertiesReader.getVariable("mso.workflow.global.default.aai.namespace"))
+ when(mex.getVariable("mso.workflow.global.default.aai.version")).thenReturn(UrnPropertiesReader.getVariable("mso.workflow.global.default.aai.version"))
+ when(mex.getVariable("mso.workflow.default.aai.v8.nodes.query.uri")).thenReturn(UrnPropertiesReader.getVariable("mso.workflow.default.aai.v8.nodes-query.uri"))
+ when(mex.getVariable("aai.endpoint")).thenReturn(aaiUriPfx)
+ when(mex.getVariable("aaiARPath")).thenReturn(aaiUriPfx + "/aai/v9/business/customers/customer/"+CUST+"/service-subscriptions/service-subscription/"+SVC+"/service-instances/service-instance/"+INST+"/allotted-resources/allotted-resource/"+ARID)
+ when(mex.getVariable("aaiAROrchStatus")).thenReturn("Active")
+ }
+
+ private initUpdateAaiAROrchStatus(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("aaiARPath")).thenReturn(aaiUriPfx + "/aai/v9/business/customers/customer/"+CUST+"/service-subscriptions/service-subscription/"+SVC+"/service-instances/service-instance/"+INST+"/allotted-resources/allotted-resource/"+ARID)
+ }
+
+ private initBuildSDNCRequest(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("allottedResourceId")).thenReturn("ari")
+ when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
+ when(mex.getVariable("parentServiceInstanceId")).thenReturn("psii")
+ when(mex.getVariable("subscriptionServiceType")).thenReturn("sst")
+ when(mex.getVariable("globalCustomerId")).thenReturn("gci")
+ when(mex.getVariable("sdncCallbackUrl")).thenReturn("scu")
+ when(mex.getVariable("msoRequestId")).thenReturn("mri")
+ }
+
+ private initPreProcessSDNC(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ }
+
+ private initValidateSDNCResp(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("prefix")).thenReturn(Prefix)
+ when(mex.getVariable("SDNCA_SuccessIndicator")).thenReturn(true)
+ }
+
+ private String initValidateSDNCResp_Resp(int code) {
+ return "<response-data>&lt;response-code&gt;${code}&lt;/response-code&gt;</response-data>"
+ }
+
+ private initDeleteAaiAR(ExecutionEntity mex) {
+ when(mex.getVariable(DBGFLAG)).thenReturn("true")
+ when(mex.getVariable("aaiARPath")).thenReturn(aaiUriPfx + "/aai/v9/business/customers/customer/"+CUST+"/service-subscriptions/service-subscription/"+SVC+"/service-instances/service-instance/"+INST+"/allotted-resources/allotted-resource/"+ARID)
+ when(mex.getVariable("aaiARResourceVersion")).thenReturn("myvers")
+ when(mex.getVariable("aai.endpoint")).thenReturn(aaiUriPfx)
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/GroovyTestBase.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/GroovyTestBase.groovy
new file mode 100644
index 0000000000..764e6244d4
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/GroovyTestBase.groovy
@@ -0,0 +1,124 @@
+/*
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.vcpe.scripts
+
+
+import org.camunda.bpm.engine.ProcessEngineServices
+import org.camunda.bpm.engine.RepositoryService
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.camunda.bpm.engine.repository.ProcessDefinition
+import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.junit.Before
+import org.junit.BeforeClass
+import org.junit.Rule
+import org.junit.Test
+import org.junit.Ignore
+import org.mockito.MockitoAnnotations
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.onap.so.bpmn.core.UrnPropertiesReader
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.mock.FileUtil
+import org.springframework.beans.factory.config.YamlPropertiesFactoryBean
+import org.springframework.core.io.ClassPathResource
+import org.springframework.core.io.Resource
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse
+import static com.github.tomakehurst.wiremock.client.WireMock.get
+import static com.github.tomakehurst.wiremock.client.WireMock.patch
+import static com.github.tomakehurst.wiremock.client.WireMock.put
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor
+import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetAllottedResource
+import org.onap.so.bpmn.core.RollbackData
+import org.onap.so.bpmn.vcpe.scripts.MapSetter
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule
+
+class GroovyTestBase {
+
+ static final int PORT = 28090
+ static final String LOCAL_URI = "http://localhost:" + PORT
+
+ static final String CUST = "SDN-ETHERNET-INTERNET"
+ static final String SVC = "123456789"
+ static final String INST = "MIS%252F1604%252F0026%252FSW_INTERNET"
+ static final String ARID = "arId-1"
+ static final String VERS = "myvers"
+
+ static final String DBGFLAG = "isDebugLogEnabled"
+
+ static String aaiUriPfx
+
+ String processName
+
+ public static void setUpBeforeClass() {
+ aaiUriPfx = UrnPropertiesReader.getVariable("aai.endpoint")
+ }
+
+ public GroovyTestBase(String processName) {
+ this.processName = processName
+ }
+
+ public boolean doBpmnError(def func) {
+
+ try {
+ func()
+ return false;
+
+ } catch(BpmnError e) {
+ return true;
+ }
+ }
+
+ public ExecutionEntity setupMock() {
+
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn(processName)
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn(processName)
+ when(mockRepositoryService.getProcessDefinition().getId()).thenReturn("100")
+ ProcessEngineServices mockProcessEngineServices = mock(ProcessEngineServices.class)
+ when(mockProcessEngineServices.getRepositoryService()).thenReturn(mockRepositoryService)
+
+ ExecutionEntity mex = mock(ExecutionEntity.class)
+
+ when(mex.getId()).thenReturn("100")
+ when(mex.getProcessDefinitionId()).thenReturn(processName)
+ when(mex.getProcessInstanceId()).thenReturn(processName)
+ when(mex.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mex.getProcessEngineServices().getRepositoryService().getProcessDefinition(mex.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+
+ when(mex.getVariable("isAsyncProcess")).thenReturn("true")
+ when(mex.getVariable(processName+"WorkflowResponseSent")).thenReturn("false")
+
+ return mex
+ }
+
+ public Map<String,Object> setupMap(ExecutionEntity mex) {
+ MapSetter mapset = new MapSetter();
+ doAnswer(mapset).when(mex).setVariable(any(), any())
+ return mapset.getMap();
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/MapGetter.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/MapGetter.groovy
new file mode 100644
index 0000000000..fa5dcec4bc
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/MapGetter.groovy
@@ -0,0 +1,49 @@
+/*
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.vcpe.scripts;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.mockito.invocation.InvocationOnMock;
+import org.mockito.stubbing.Answer;
+
+class MapGetter implements Answer<Object> {
+ final Map<String,Object> map;
+
+ public MapGetter() {
+ map = new HashMap<>();
+ }
+
+ public MapGetter(Map<String,Object> map) {
+ this.map = map;
+ }
+
+ public Map<String, Object> getMap() {
+ return map;
+ }
+
+ @Override
+ public Object answer(InvocationOnMock invocation) throws Throwable {
+ return map.get(invocation.getArgumentAt(0, String.class));
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/MapSetter.groovy b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/MapSetter.groovy
new file mode 100644
index 0000000000..7b50c616ea
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/MapSetter.groovy
@@ -0,0 +1,50 @@
+/*
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.vcpe.scripts;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.mockito.invocation.InvocationOnMock;
+import org.mockito.stubbing.Answer;
+
+class MapSetter implements Answer<Void> {
+ final Map<String,Object> map;
+
+ public MapSetter() {
+ map = new HashMap<>();
+ }
+
+ public MapSetter(Map<String,Object> map) {
+ this.map = map;
+ }
+
+ public Map<String, Object> getMap() {
+ return map;
+ }
+
+ @Override
+ public Void answer(InvocationOnMock invocation) throws Throwable {
+ map.put(invocation.getArgumentAt(0, String.class), invocation.getArgumentAt(1, Object.class));
+ return null;
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/CreateSiSample.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/CreateSiSample.json
new file mode 100644
index 0000000000..c824213423
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/CreateSiSample.json
@@ -0,0 +1,72 @@
+{
+ "variables": {
+ "bpmnRequest": {
+ "value": "{\n \"requestDetails\": {\n \"cloudConfiguration\": {\n \"lcpCloudRegionId\": \"mtn6\", \n \"tenantId\": \"0422ffb57ba042c0800a29dc85ca70f8\"\n }, \n \"modelInfo\": {\n \"modelInvariantUuid\": \"52b49b5d-3086-4ffd-b5e6-1b1e5e7e062f\", \n \"modelName\": \"MSO Test Network\", \n \"modelType\": \"service\", \n \"modelUuid\": \"aed5a5b7-20d3-44f7-90a3-ddbd16f14d1e\", \n \"modelVersion\": \"1.0\"\n }, \n \"owningEntity\": {\n \"owningEntityId\": \"123459af-0427-42c2-9d15-971b99b12345\", \n \"owningEntityName\": \"vSAMP10a Entity-200\"\n }, \n \"project\": {\n \"projectName\": \"vSAMP10a Project-3\"\n }, \n \"requestInfo\": {\n \"instanceName\": \"MSO-DEV-SI-1802-v6-2-19-10\", \n \"requestorId\": \"xxxxxx\", \n \"source\": \"VID\", \n \"suppressRollback\": false\n }, \n \"requestParameters\": {\n \"aLaCarte\": true, \n \"subscriptionServiceType\": \"MSO-dev-service-type\", \n \"userParams\": [\n {\n \"name\": \"someUserParam\", \n \"value\": \"someValue\"\n }\n ]\n }, \n \"subscriberInfo\": {\n \"globalSubscriberId\": \"MSO_1610_dev\", \n \"subscriberName\": \"MSO_1610_dev\"\n }\n }\n}\n",
+ "type": "String"
+ },
+ "requestId": {
+ "value": "6dd20050-76ee-418f-a153-50720a8f3286",
+ "type": "String"
+ },
+ "mso-request-id": {
+ "value": "6dd20050-76ee-418f-a153-50720a8f3286",
+ "type": "String"
+ },
+ "isBaseVfModule": {
+ "value": false,
+ "type": "Boolean"
+ },
+ "recipeTimeout": {
+ "value": 180,
+ "type": "Integer"
+ },
+ "requestAction": {
+ "value": "createInstance",
+ "type": "String"
+ },
+ "serviceInstanceId": {
+ "value": "",
+ "type": "String"
+ },
+ "vnfId": {
+ "value": "",
+ "type": "String"
+ },
+ "vfModuleId": {
+ "value": "",
+ "type": "String"
+ },
+ "volumeGroupId": {
+ "value": "",
+ "type": "String"
+ },
+ "networkId": {
+ "value": "",
+ "type": "String"
+ },
+ "configurationId": {
+ "value": "",
+ "type": "String"
+ },
+ "serviceType": {
+ "value": "",
+ "type": "String"
+ },
+ "vnfType": {
+ "value": "",
+ "type": "String"
+ },
+ "vfModuleType": {
+ "value": "",
+ "type": "String"
+ },
+ "networkType": {
+ "value": "",
+ "type": "String"
+ },
+ "host": {
+ "value": "localhost",
+ "type": "String"
+ }
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateAllottedResourceBRG.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateAllottedResourceBRG.bpmn
new file mode 100644
index 0000000000..b33aad7443
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateAllottedResourceBRG.bpmn
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_DkzPAHB4EeaJwpcpVN5gXw" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.9.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="DoCreateAllottedResourceBRG" name="DoCreateAllottedResourceBRG" isExecutable="true">
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="initialization" />
+ <bpmn2:scriptTask id="initialization" name="set rollbackData">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1v2f9n5</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[#{execution.setVariable("rollbackData", true)}]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_1v2f9n5</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" errorRef="Error_2" />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1v2f9n5" sourceRef="initialization" targetRef="EndEvent_1" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" name="Java Lang Exception" errorCode="java.lang.Exception" />
+ <bpmn2:error id="Error_2" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateAllottedResourceBRG">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_68" bpmnElement="StartEvent_1">
+ <dc:Bounds x="-91" y="222" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-73" y="263" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_285" bpmnElement="initialization">
+ <dc:Bounds x="35" y="200" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_68" targetElement="_BPMNShape_ScriptTask_285">
+ <di:waypoint xsi:type="dc:Point" x="-55" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="35" y="241" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-55" y="225.5" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_225" bpmnElement="EndEvent_1">
+ <dc:Bounds x="235" y="222" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="208" y="263" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1v2f9n5_di" bpmnElement="SequenceFlow_1v2f9n5">
+ <di:waypoint xsi:type="dc:Point" x="135" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="235" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="140" y="219" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateAllottedResourceBRGRollback.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateAllottedResourceBRGRollback.bpmn
new file mode 100644
index 0000000000..807efae1af
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateAllottedResourceBRGRollback.bpmn
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_DkzPAHB4EeaJwpcpVN5gXw" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.9.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="DoCreateAllottedResourceBRGRollback" name="DoCreateAllottedResourceBRGRollback" isExecutable="true">
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_03yvb82" />
+ <bpmn2:endEvent id="EndEvent_1sn21jr">
+ <bpmn2:incoming>SequenceFlow_1epm19d</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_03yvb82" name="set Success">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1epm19d</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[#{execution.setVariable("rolledBack", true)}]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1epm19d" sourceRef="ScriptTask_03yvb82" targetRef="EndEvent_1sn21jr" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" name="Java Lang Exception" errorCode="java.lang.Exception" />
+ <bpmn2:error id="Error_2" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateAllottedResourceBRGRollback">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_68" bpmnElement="StartEvent_1">
+ <dc:Bounds x="66" y="392" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="84" y="433" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_68" targetElement="ScriptTask_03yvb82_di">
+ <di:waypoint xsi:type="dc:Point" x="101" y="412" />
+ <di:waypoint xsi:type="dc:Point" x="207" y="410" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="109" y="396" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_1sn21jr_di" bpmnElement="EndEvent_1sn21jr">
+ <dc:Bounds x="413" y="392" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="386" y="432" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_03yvb82_di" bpmnElement="ScriptTask_03yvb82">
+ <dc:Bounds x="207" y="370" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1epm19d_di" bpmnElement="SequenceFlow_1epm19d">
+ <di:waypoint xsi:type="dc:Point" x="307" y="410" />
+ <di:waypoint xsi:type="dc:Point" x="377" y="410" />
+ <di:waypoint xsi:type="dc:Point" x="377" y="410" />
+ <di:waypoint xsi:type="dc:Point" x="413" y="410" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="392" y="404" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateAllottedResourceTXC.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateAllottedResourceTXC.bpmn
new file mode 100644
index 0000000000..b2f280d7e9
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateAllottedResourceTXC.bpmn
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_DkzPAHB4EeaJwpcpVN5gXw" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.9.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="DoCreateAllottedResourceTXC" name="DoCreateAllottedResourceTXC" isExecutable="true">
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="EndEvent_1" />
+ <bpmn2:endEvent id="EndEvent_1">
+ <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" errorRef="Error_2" />
+ </bpmn2:endEvent>
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" name="Java Lang Exception" errorCode="java.lang.Exception" />
+ <bpmn2:error id="Error_2" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateAllottedResourceTXC">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_68" bpmnElement="StartEvent_1">
+ <dc:Bounds x="-91" y="222" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-73" y="263" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_68" targetElement="_BPMNShape_EndEvent_225">
+ <di:waypoint xsi:type="dc:Point" x="-55" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="139" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-3" y="225" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_225" bpmnElement="EndEvent_1">
+ <dc:Bounds x="139" y="222" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="112" y="263" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateServiceInstanceRollback.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateServiceInstanceRollback.bpmn
new file mode 100644
index 0000000000..532ca867bb
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateServiceInstanceRollback.bpmn
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.9.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="DoCreateServiceInstanceRollback" name="DoCreateServiceInstanceRollback" isExecutable="true">
+ <bpmn2:startEvent id="createSIRollback_startEvent" name="Start Flow">
+ <bpmn2:outgoing>SequenceFlow_1ipu8um</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_3">
+ <bpmn2:incoming>SequenceFlow_1l4c4k0</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="ScriptTask_05ltxyj" name="set Success">
+ <bpmn2:incoming>SequenceFlow_1ipu8um</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1l4c4k0</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[#{execution.setVariable("rolledBack", true)}]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1ipu8um" sourceRef="createSIRollback_startEvent" targetRef="ScriptTask_05ltxyj" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1l4c4k0" sourceRef="ScriptTask_05ltxyj" targetRef="EndEvent_3" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateServiceInstanceRollback">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createSIRollback_startEvent">
+ <dc:Bounds x="151" y="79" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="146" y="120" width="48" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_BPMNShape_EndEvent_177" bpmnElement="EndEvent_3">
+ <dc:Bounds x="484" y="79" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="457" y="120" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_05ltxyj_di" bpmnElement="ScriptTask_05ltxyj">
+ <dc:Bounds x="287" y="57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ipu8um_di" bpmnElement="SequenceFlow_1ipu8um">
+ <di:waypoint xsi:type="dc:Point" x="187" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="287" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="237" y="76" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1l4c4k0_di" bpmnElement="SequenceFlow_1l4c4k0">
+ <di:waypoint xsi:type="dc:Point" x="387" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="484" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="435.5" y="76" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateVnfAndModules.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateVnfAndModules.bpmn
new file mode 100644
index 0000000000..5e4400e9bd
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateVnfAndModules.bpmn
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.9.0">
+ <bpmn:process id="DoCreateVnfAndModules" name="DoCreateVnfAndModules" isExecutable="true">
+ <bpmn:startEvent id="StartEvent_1">
+ <bpmn:outgoing>SequenceFlow_11sp3s9</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_11sp3s9" sourceRef="StartEvent_1" targetRef="ScriptTask_0y5wsgy" />
+ <bpmn:scriptTask id="ScriptTask_0y5wsgy" name="set rollbackData">
+ <bpmn:incoming>SequenceFlow_11sp3s9</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0q1lfmf</bpmn:outgoing>
+ <bpmn:script><![CDATA[#{execution.setVariable("rollbackData", true)}]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0q1lfmf" sourceRef="ScriptTask_0y5wsgy" targetRef="EndEvent_0vgtf5f" />
+ <bpmn:endEvent id="EndEvent_0vgtf5f">
+ <bpmn:incoming>SequenceFlow_0q1lfmf</bpmn:incoming>
+ </bpmn:endEvent>
+ </bpmn:process>
+ <bpmn:error id="Error_1" name="Java Lang Exception" errorCode="java.lang.Exception" />
+ <bpmn:error id="Error_2" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateVnfAndModules">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
+ <dc:Bounds x="152" y="147" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="170" y="183" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_11sp3s9_di" bpmnElement="SequenceFlow_11sp3s9">
+ <di:waypoint xsi:type="dc:Point" x="188" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="268" y="165" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="183" y="144" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0y5wsgy_di" bpmnElement="ScriptTask_0y5wsgy">
+ <dc:Bounds x="268" y="125" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0q1lfmf_di" bpmnElement="SequenceFlow_0q1lfmf">
+ <di:waypoint xsi:type="dc:Point" x="368" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="447" y="165" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="362.5" y="144" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_0vgtf5f_di" bpmnElement="EndEvent_0vgtf5f">
+ <dc:Bounds x="447" y="147" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="420" y="187" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateVnfAndModulesRollback.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateVnfAndModulesRollback.bpmn
new file mode 100644
index 0000000000..2867a671b6
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoCreateVnfAndModulesRollback.bpmn
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_Wblj8GyfEeWUWLTvug7ZOg" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.9.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="DoCreateVnfAndModulesRollback" name="DoCreateVnfAndModulesRollback" isExecutable="true">
+ <bpmn2:startEvent id="StartEvent_1gai4qr">
+ <bpmn2:outgoing>SequenceFlow_1537b7m</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_1seag7u">
+ <bpmn2:incoming>SequenceFlow_1mz2mgf</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1537b7m" sourceRef="StartEvent_1gai4qr" targetRef="ScriptTask_0fpaoo0" />
+ <bpmn2:scriptTask id="ScriptTask_0fpaoo0" name="set Success">
+ <bpmn2:incoming>SequenceFlow_1537b7m</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1mz2mgf</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[#{execution.setVariable("rolledBack", true)}]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1mz2mgf" sourceRef="ScriptTask_0fpaoo0" targetRef="EndEvent_1seag7u" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
+ <bpmn2:message id="Message_1" name="DoCreateVfModuleRollbackRequest" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateVnfAndModulesRollback">
+ <bpmndi:BPMNShape id="StartEvent_1gai4qr_di" bpmnElement="StartEvent_1gai4qr">
+ <dc:Bounds x="-91" y="655" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-73" y="691" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1seag7u_di" bpmnElement="EndEvent_1seag7u">
+ <dc:Bounds x="248" y="655" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="660" y="676" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1537b7m_di" bpmnElement="SequenceFlow_1537b7m">
+ <di:waypoint xsi:type="dc:Point" x="-55" y="673" />
+ <di:waypoint xsi:type="dc:Point" x="55" y="673" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-45" y="658" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0fpaoo0_di" bpmnElement="ScriptTask_0fpaoo0">
+ <dc:Bounds x="55" y="633" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1mz2mgf_di" bpmnElement="SequenceFlow_1mz2mgf">
+ <di:waypoint xsi:type="dc:Point" x="155" y="673" />
+ <di:waypoint xsi:type="dc:Point" x="248" y="673" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="201.5" y="652" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoDeleteVnfAndModules.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoDeleteVnfAndModules.bpmn
new file mode 100644
index 0000000000..517df36c74
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/DoDeleteVnfAndModules.bpmn
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_9MhrcHqVEea26OhQB97uCQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.9.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="DoDeleteVnfAndModules" name="DoDeleteVnfAndModules" isExecutable="true">
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_0qi7pl3</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0qi7pl3" sourceRef="StartEvent_1" targetRef="EndEvent_11dfyam" />
+ <bpmn2:endEvent id="EndEvent_11dfyam">
+ <bpmn2:incoming>SequenceFlow_0qi7pl3</bpmn2:incoming>
+ </bpmn2:endEvent>
+ </bpmn2:process>
+ <bpmn2:error id="Error_1" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_2" name="Java Lang Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoDeleteVnfAndModules">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_79" bpmnElement="StartEvent_1">
+ <dc:Bounds x="238" y="209" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="256" y="250" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0qi7pl3_di" bpmnElement="SequenceFlow_0qi7pl3">
+ <di:waypoint xsi:type="dc:Point" x="274" y="227" />
+ <di:waypoint xsi:type="dc:Point" x="387" y="227" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="285.5" y="206" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_11dfyam_di" bpmnElement="EndEvent_11dfyam">
+ <dc:Bounds x="387" y="209" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="360" y="249" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/Homing.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/Homing.bpmn
new file mode 100644
index 0000000000..ad4c3c816d
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/VCPE/stubprocess/Homing.bpmn
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_vwRmIBsREeeIQtzUKIjH4g" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.9.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="Homing" name="Homing" isExecutable="true">
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_0tyavm9</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_0n56tas">
+ <bpmn2:incoming>SequenceFlow_0tyavm9</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0tyavm9" sourceRef="StartEvent_1" targetRef="EndEvent_0n56tas" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_10hit0u" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_1lwpypa" name="Java Lang Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Homing">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
+ <dc:Bounds x="147" y="275" width="36" height="36" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0ougemc_di" bpmnElement="EndEvent_0n56tas">
+ <dc:Bounds x="263" y="275" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="236" y="311" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0tyavm9_di" bpmnElement="SequenceFlow_0tyavm9">
+ <di:waypoint xsi:type="dc:Point" x="183" y="293" />
+ <di:waypoint xsi:type="dc:Point" x="263" y="293" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="223" y="272" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/AAI_defaultCloudRegionByCloudRegionId.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/AAI_defaultCloudRegionByCloudRegionId.json
new file mode 100644
index 0000000000..a4190a76ee
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/AAI_defaultCloudRegionByCloudRegionId.json
@@ -0,0 +1,12 @@
+{
+ "cloud-owner": "att-aic",
+ "cloud-region-id": "mdt1",
+ "cloud-type": "openstack",
+ "owner-defined-type": "lcp",
+ "cloud-region-version": "aic3.0",
+ "identity-url": "https://localhost:5000/v2.0",
+ "cloud-zone": "z1",
+ "complex-name": "c1",
+ "sriov-automation": false,
+ "resource-version": "1503072127235"
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/AAI_genericVnfGet.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/AAI_genericVnfGet.json
new file mode 100644
index 0000000000..921918f267
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/AAI_genericVnfGet.json
@@ -0,0 +1,9 @@
+{
+ "vnf-id": "msoVnf123",
+ "vnf-name": "MSO-Test-VNF-123",
+ "vnf-type": "vnf-type",
+ "orchestration-status": "active",
+ "in-maint": false,
+ "is-closed-loop-disabled": false,
+ "resource-version": "1525360206136"
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/AAI_genericVnfsByVnfId.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/AAI_genericVnfsByVnfId.json
new file mode 100644
index 0000000000..f0936d6648
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/AAI_genericVnfsByVnfId.json
@@ -0,0 +1,434 @@
+{
+ "vnf-id": "example-vnf-id-val-90603",
+ "vnf-name": "example-vnf-name-val-56838",
+ "vnf-name2": "example-vnf-name2-val-56319",
+ "vnf-type": "example-vnf-type-val-30533",
+ "service-id": "example-service-id-val-28290",
+ "regional-resource-zone": "example-regional-resource-zone-val-11059",
+ "prov-status": "example-prov-status-val-59777",
+ "operational-status": "example-operational-status-val-22513",
+ "in-maint": true,
+
+ "equipment-role": "example-equipment-role-val-23396",
+ "orchestration-status": "example-orchestration-status-val-59435",
+ "heat-stack-id": "example-heat-stack-id-val-96869",
+ "mso-catalog-key": "example-mso-catalog-key-val-30721",
+ "management-option": "example-management-option-val-61927",
+ "ipv4-oam-address": "192.168.10.14",
+ "ipv4-loopback0-address": "example-ipv4-loopback0-address-val-87072",
+ "nm-lan-v6-address": "example-nm-lan-v6-address-val-91063",
+ "management-v6-address": "example-management-v6-address-val-80466",
+ "vcpu": 45837298,
+ "vcpu-units": "example-vcpu-units-val-86249",
+ "vmemory": 57288956,
+ "vmemory-units": "example-vmemory-units-val-13291",
+ "vdisk": 16937143,
+ "vdisk-units": "example-vdisk-units-val-73197",
+
+ "is-closed-loop-disabled": true,
+ "summary-status": "example-summary-status-val-86438",
+ "encrypted-access-flag": true,
+
+
+
+
+ "model-invariant-id": "example-model-invariant-id-val-14704",
+ "model-version-id": "example-model-version-id-val-47847",
+ "model-customization-id": "example-model-customization-id-val-52688",
+ "widget-model-id": "example-widget-model-id-val-20939",
+ "widget-model-version": "example-widget-model-version-val-72210",
+ "as-number": "example-as-number-val-68358",
+ "regional-resource-subzone": "example-regional-resource-subzone-val-34391",
+ "nf-type": "example-nf-type-val-54866",
+ "nf-function": "example-nf-function-val-24790",
+ "nf-role": "example-nf-role-val-4780",
+ "nf-naming-code": "example-nf-naming-code-val-25118",
+ "selflink": "example-selflink-val-68404",
+
+ "relationship-list": {"relationship": [
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.ComposedOf",
+ "related-link": "/aai/v12/business/customers/customer/e433710f-9217-458d-a79d-1c7aff376d89/service-subscriptions/service-subscription/VIRTUAL%20USP/service-instances/service-instance/2c323333-af4f-4849-af03-c862c0e93e3b",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "e433710f-9217-458d-a79d-1c7aff376d89"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "VIRTUAL USP"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "2c323333-af4f-4849-af03-c862c0e93e3b"
+ }
+ ],
+ "related-to-property": [ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "kjhgfd1"
+ }]
+ },
+ {
+ "related-to": "vserver",
+ "relationship-label": "tosca.relationships.HostedOn",
+ "related-link": "/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn23a/tenants/tenant/e6beab145f6b49098277ac163ac1b4f3/vservers/vserver/1b3f44e5-d96d-4aac-bd9a-310e8cfb0af5",
+ "relationship-data": [
+ {
+ "relationship-key": "cloud-region.cloud-owner",
+ "relationship-value": "att-aic"
+ },
+ {
+ "relationship-key": "cloud-region.cloud-region-id",
+ "relationship-value": "mtn23a"
+ },
+ {
+ "relationship-key": "tenant.tenant-id",
+ "relationship-value": "e6beab145f6b49098277ac163ac1b4f3"
+ },
+ {
+ "relationship-key": "vserver.vserver-id",
+ "relationship-value": "1b3f44e5-d96d-4aac-bd9a-310e8cfb0af5"
+ }
+ ],
+ "related-to-property": [ {
+ "property-key": "vserver.vserver-name",
+ "property-value": "comx5000vm003"
+ }]
+ },
+ {
+ "related-to": "vserver",
+ "relationship-label": "tosca.relationships.HostedOn",
+ "related-link": "/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn23a/tenants/tenant/e6beab145f6b49098277ac163ac1b4f3/vservers/vserver/14551849-1e70-45cd-bc5d-a256d49548a2",
+ "relationship-data": [
+ {
+ "relationship-key": "cloud-region.cloud-owner",
+ "relationship-value": "att-aic"
+ },
+ {
+ "relationship-key": "cloud-region.cloud-region-id",
+ "relationship-value": "mtn23a"
+ },
+ {
+ "relationship-key": "tenant.tenant-id",
+ "relationship-value": "e6beab145f6b49098277ac163ac1b4f3"
+ },
+ {
+ "relationship-key": "vserver.vserver-id",
+ "relationship-value": "14551849-1e70-45cd-bc5d-a256d49548a2"
+ }
+ ],
+ "related-to-property": [ {
+ "property-key": "vserver.vserver-name",
+ "property-value": "comx5000vm002"
+ }]
+ },
+ {
+ "related-to": "vserver",
+ "relationship-label": "tosca.relationships.HostedOn",
+ "related-link": "/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn23a/tenants/tenant/e6beab145f6b49098277ac163ac1b4f3/vservers/vserver/48bd7f11-408f-417c-b834-b41c1b98f7d7",
+ "relationship-data": [
+ {
+ "relationship-key": "cloud-region.cloud-owner",
+ "relationship-value": "att-aic"
+ },
+ {
+ "relationship-key": "cloud-region.cloud-region-id",
+ "relationship-value": "mtn23a"
+ },
+ {
+ "relationship-key": "tenant.tenant-id",
+ "relationship-value": "e6beab145f6b49098277ac163ac1b4f3"
+ },
+ {
+ "relationship-key": "vserver.vserver-id",
+ "relationship-value": "48bd7f11-408f-417c-b834-b41c1b98f7d7"
+ }
+ ],
+ "related-to-property": [ {
+ "property-key": "vserver.vserver-name",
+ "property-value": "comx5000vm001"
+ }]
+ }
+ ]},
+
+
+ "l-interfaces": {
+ "l-interface": [
+ {
+ "interface-name": "example-interface-name-val-50593",
+ "interface-role": "example-interface-role-val-23375",
+ "v6-wan-link-ip": "example-v6-wan-link-ip-val-5921",
+ "selflink": "example-selflink-val-75663",
+ "interface-id": "example-interface-id-val-37465",
+ "macaddr": "example-macaddr-val-62657",
+ "network-name": "example-network-name-val-7252",
+ "management-option": "example-management-option-val-32963",
+ "interface-description": "example-interface-description-val-89453",
+ "is-port-mirrored": true,
+ "vlans": {
+ "vlan": [
+ {
+ "vlan-interface": "example-vlan-interface-val-16684",
+ "vlan-id-inner": 8602916,
+ "vlan-id-outer": 97348542,
+ "speed-value": "example-speed-value-val-90330",
+ "speed-units": "example-speed-units-val-15849",
+ "vlan-description": "example-vlan-description-val-46942",
+ "backdoor-connection": "example-backdoor-connection-val-78445",
+
+ "orchestration-status": "example-orchestration-status-val-44994",
+
+
+
+ "l3-interface-ipv4-address-list": [
+ {
+ "l3-interface-ipv4-address": "example-l3-interface-ipv4-address-val-90277",
+ "l3-interface-ipv4-prefix-length": 3364150,
+ "vlan-id-inner": 44021171,
+ "vlan-id-outer": 55708677,
+ "is-floating": true,
+ "neutron-network-id": "example-neutron-network-id-val-43267",
+ "neutron-subnet-id": "example-neutron-subnet-id-val-62870"
+ }
+ ],
+ "l3-interface-ipv6-address-list": [
+ {
+ "l3-interface-ipv6-address": "example-l3-interface-ipv6-address-val-45323",
+ "l3-interface-ipv6-prefix-length": 56688923,
+ "vlan-id-inner": 5703071,
+ "vlan-id-outer": 86682265,
+ "is-floating": true,
+ "neutron-network-id": "example-neutron-network-id-val-28366",
+ "neutron-subnet-id": "example-neutron-subnet-id-val-53034"
+ }
+ ]
+ }
+ ]
+ },
+ "sriov-vfs": {
+ "sriov-vf": [
+ {
+ "pci-id": "example-pci-id-val-4720",
+ "vf-vlan-filter": "example-vf-vlan-filter-val-42594",
+ "vf-mac-filter": "example-vf-mac-filter-val-13375",
+ "vf-vlan-strip": true,
+ "vf-vlan-anti-spoof-check": true,
+ "vf-mac-anti-spoof-check": true,
+ "vf-mirrors": "example-vf-mirrors-val-6057",
+ "vf-broadcast-allow": true,
+ "vf-unknown-multicast-allow": true,
+ "vf-unknown-unicast-allow": true,
+ "vf-insert-stag": true,
+ "vf-link-status": "example-vf-link-status-val-81448",
+ "neutron-network-id": "example-neutron-network-id-val-9504"
+ }
+ ]
+ },
+ "l-interfaces": {
+ "l-interface": [
+ {
+ "interface-name": "example-interface-name-val-16738",
+ "interface-role": "example-interface-role-val-13943",
+ "v6-wan-link-ip": "example-v6-wan-link-ip-val-63173",
+ "selflink": "example-selflink-val-43085",
+ "interface-id": "example-interface-id-val-51379",
+ "macaddr": "example-macaddr-val-16195",
+ "network-name": "example-network-name-val-45683",
+ "management-option": "example-management-option-val-78983",
+ "interface-description": "example-interface-description-val-34414",
+ "is-port-mirrored": true
+ }
+ ]
+ },
+ "l3-interface-ipv4-address-list": [
+ {
+ "l3-interface-ipv4-address": "example-l3-interface-ipv4-address-val-99078",
+ "l3-interface-ipv4-prefix-length": 55755841,
+ "vlan-id-inner": 81525473,
+ "vlan-id-outer": 90908072,
+ "is-floating": true,
+ "neutron-network-id": "example-neutron-network-id-val-47919",
+ "neutron-subnet-id": "example-neutron-subnet-id-val-84236"
+ }
+ ],
+ "l3-interface-ipv6-address-list": [
+ {
+ "l3-interface-ipv6-address": "example-l3-interface-ipv6-address-val-21939",
+ "l3-interface-ipv6-prefix-length": 50057584,
+ "vlan-id-inner": 75774660,
+ "vlan-id-outer": 4421090,
+ "is-floating": true,
+ "neutron-network-id": "example-neutron-network-id-val-46377",
+ "neutron-subnet-id": "example-neutron-subnet-id-val-16585"
+ }
+ ]
+ }
+ ]
+ },
+ "lag-interfaces": {
+ "lag-interface": [
+ {
+ "interface-name": "example-interface-name-val-39234",
+ "interface-description": "example-interface-description-val-1037",
+ "speed-value": "example-speed-value-val-1929",
+ "speed-units": "example-speed-units-val-74937",
+ "interface-id": "example-interface-id-val-91265",
+ "interface-role": "example-interface-role-val-19613",
+
+
+ "l-interfaces": {
+ "l-interface": [
+ {
+ "interface-name": "example-interface-name-val-10722",
+ "interface-role": "example-interface-role-val-95194",
+ "v6-wan-link-ip": "example-v6-wan-link-ip-val-24328",
+ "selflink": "example-selflink-val-24987",
+ "interface-id": "example-interface-id-val-75726",
+ "macaddr": "example-macaddr-val-36940",
+ "network-name": "example-network-name-val-65359",
+ "management-option": "example-management-option-val-49521",
+ "interface-description": "example-interface-description-val-70528",
+ "is-port-mirrored": true,
+ "vlans": {
+ "vlan": [
+ {
+ "vlan-interface": "example-vlan-interface-val-70827",
+ "vlan-id-inner": 55659612,
+ "vlan-id-outer": 90335612,
+ "speed-value": "example-speed-value-val-54761",
+ "speed-units": "example-speed-units-val-91398",
+ "vlan-description": "example-vlan-description-val-17018",
+ "backdoor-connection": "example-backdoor-connection-val-4021",
+
+ "orchestration-status": "example-orchestration-status-val-18315",
+
+
+ "l3-interface-ipv4-address-list": [
+ {
+ "l3-interface-ipv4-address": "example-l3-interface-ipv4-address-val-59336",
+ "l3-interface-ipv4-prefix-length": 57636053,
+ "vlan-id-inner": 34068397,
+ "vlan-id-outer": 48570286,
+ "is-floating": true,
+ "neutron-network-id": "example-neutron-network-id-val-69862",
+ "neutron-subnet-id": "example-neutron-subnet-id-val-75795"
+ }
+ ],
+ "l3-interface-ipv6-address-list": [
+ {
+ "l3-interface-ipv6-address": "example-l3-interface-ipv6-address-val-15038",
+ "l3-interface-ipv6-prefix-length": 42694503,
+ "vlan-id-inner": 15929806,
+ "vlan-id-outer": 87413856,
+ "is-floating": true,
+ "neutron-network-id": "example-neutron-network-id-val-52519",
+ "neutron-subnet-id": "example-neutron-subnet-id-val-24471"
+ }
+ ]
+ }
+ ]
+ },
+ "sriov-vfs": {
+ "sriov-vf": [
+ {
+ "pci-id": "example-pci-id-val-44669",
+ "vf-vlan-filter": "example-vf-vlan-filter-val-53436",
+ "vf-mac-filter": "example-vf-mac-filter-val-71902",
+ "vf-vlan-strip": true,
+ "vf-vlan-anti-spoof-check": true,
+ "vf-mac-anti-spoof-check": true,
+ "vf-mirrors": "example-vf-mirrors-val-54963",
+ "vf-broadcast-allow": true,
+ "vf-unknown-multicast-allow": true,
+ "vf-unknown-unicast-allow": true,
+ "vf-insert-stag": true,
+ "vf-link-status": "example-vf-link-status-val-1546",
+ "neutron-network-id": "example-neutron-network-id-val-92159"
+ }
+ ]
+ },
+ "l-interfaces": {
+ "l-interface": [
+ {
+ "interface-name": "example-interface-name-val-9327",
+ "interface-role": "example-interface-role-val-21859",
+ "v6-wan-link-ip": "example-v6-wan-link-ip-val-21445",
+ "selflink": "example-selflink-val-6085",
+ "interface-id": "example-interface-id-val-39854",
+ "macaddr": "example-macaddr-val-14433",
+ "network-name": "example-network-name-val-3722",
+ "management-option": "example-management-option-val-64739",
+ "interface-description": "example-interface-description-val-5814",
+ "is-port-mirrored": true
+
+
+
+ }
+ ]
+ },
+ "l3-interface-ipv4-address-list": [
+ {
+ "l3-interface-ipv4-address": "example-l3-interface-ipv4-address-val-64531",
+ "l3-interface-ipv4-prefix-length": 66545882,
+ "vlan-id-inner": 12194134,
+ "vlan-id-outer": 29589286,
+ "is-floating": true,
+ "neutron-network-id": "example-neutron-network-id-val-91108",
+ "neutron-subnet-id": "example-neutron-subnet-id-val-56984"
+ }
+ ],
+ "l3-interface-ipv6-address-list": [
+ {
+ "l3-interface-ipv6-address": "example-l3-interface-ipv6-address-val-37408",
+ "l3-interface-ipv6-prefix-length": 5116459,
+ "vlan-id-inner": 39229896,
+ "vlan-id-outer": 15091934,
+ "is-floating": true,
+ "neutron-network-id": "example-neutron-network-id-val-87700",
+ "neutron-subnet-id": "example-neutron-subnet-id-val-37352"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "vf-modules": {
+ "vf-module": [
+ {
+ "vf-module-id": "example-vf-module-id-val-56249",
+ "vf-module-name": "example-vf-module-name-val-18987",
+ "heat-stack-id": "example-heat-stack-id-val-80110",
+ "orchestration-status": "example-orchestration-status-val-8226",
+ "is-base-vf-module": true,
+ "model-invariant-id": "example-model-invariant-id-val-5071",
+ "model-version-id": "example-model-version-id-val-80793",
+ "model-customization-id": "example-model-customization-id-val-83277",
+ "widget-model-id": "example-widget-model-id-val-99814",
+ "widget-model-version": "example-widget-model-version-val-22799",
+ "contrail-service-instance-fqdn": "example-contrail-service-instance-fqdn-val-52133",
+ "module-index": 1933,
+ "selflink": "example-selflink-val-69992"
+ }
+ ]
+ },
+ "licenses": {
+ "license": [
+ {
+ "group-uuid": "example-group-uuid-val-73012",
+ "resource-uuid": "example-resource-uuid-val-80045"
+ }
+ ]
+ },
+ "entitlements": {
+ "entitlement": [
+ {
+ "group-uuid": "example-group-uuid-val-14874",
+ "resource-uuid": "example-resource-uuid-val-49146"
+ }
+ ]
+ }
+
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/AAI_pserverByVnfId.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/AAI_pserverByVnfId.json
new file mode 100644
index 0000000000..4b1f69aacf
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/AAI_pserverByVnfId.json
@@ -0,0 +1,72 @@
+ {
+
+ "result": [{
+
+ "hostname": "8862-PserverHOSTNAME-LB1113",
+ "equipType": "JUNIPER UCPE",
+ "equipVendor": "JUNIPER",
+ "equipModel": "QFX51010-PNF",
+ "ipv4OamAddress": "192.168.5.199",
+ "serialNumber": "VX986001PNF",
+ "pserverId": "5715CE4F-8600-58E103FE60C79",
+ "internetTopology": "WAN",
+ "inMaint": false,
+ "resourceVersion": "1500495668780",
+ "pserverName2": "test81600",
+ "relationshipList": {
+ "relationship": [
+ {
+ "relatedTo": "vserver",
+ "relatedLink": "/aai/v10/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/tenants/tenant/8862-tenantl-LB1113/vservers/vserver/8862-Lvserver-LB1113",
+ "relationshipData": [
+ {
+ "relationshipKey": "cloud-region.cloud-owner",
+ "relationshipValue": "att-aic"
+ },
+ {
+ "relationshipKey": "cloud-region.cloud-region-id",
+ "relationshipValue": "AAIAIC25"
+ },
+ {
+ "relationshipKey": "tenant.tenant-id",
+ "relationshipValue": "8862-tenantl-LB1113"
+ },
+ {
+ "relationshipKey": "vserver.vserver-id",
+ "relationshipValue": "8862-Lvserver-LB1113"
+ }
+ ],
+ "relatedToProperty": [
+ {
+ "propertyKey": "vserver.vserver-name",
+ "propertyValue": "hjZAYKyl5LO"
+ }
+ ]
+ }
+ ]
+ },
+ "pinterfaces": {
+ "pinterface": [
+ {
+ "interfaceName": "ge-0/5/8",
+ "speedValue": "1",
+ "speedUnits": "GBPS",
+ "resourceVersion": "1500495668784",
+ "inMaint": false
+ },
+ {
+ "interfaceName": "ge-1/5/8",
+ "speedValue": "1",
+ "speedUnits": "GBPS",
+ "resourceVersion": "1500495668788",
+ "inMaint": false
+ }
+ ]
+ }
+ }
+
+
+
+ ]
+}
+ \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/AAI_vfModuleByVfModuleId.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/AAI_vfModuleByVfModuleId.json
new file mode 100644
index 0000000000..d79137b0cd
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/AAI_vfModuleByVfModuleId.json
@@ -0,0 +1,27 @@
+{
+ "vf-module-id": "example-vnf-id-val-90603",
+ "vf-module-name": "example-vnf-name-val-56838",
+ "vnf-name2": "example-vnf-name2-val-56319",
+ "vnf-type": "example-vnf-type-val-30533",
+ "service-id": "example-service-id-val-28290",
+ "regional-resource-zone": "example-regional-resource-zone-val-11059",
+ "prov-status": "example-prov-status-val-59777",
+ "operational-status": "example-operational-status-val-22513",
+ "in-maint": true,
+
+ "equipment-role": "example-equipment-role-val-23396",
+ "orchestration-status": "example-orchestration-status-val-59435",
+ "heat-stack-id": "example-heat-stack-id-val-96869",
+ "mso-catalog-key": "example-mso-catalog-key-val-30721",
+ "management-option": "example-management-option-val-61927",
+ "ipv4-oam-address": "192.168.10.14",
+ "ipv4-loopback0-address": "example-ipv4-loopback0-address-val-87072",
+ "nm-lan-v6-address": "example-nm-lan-v6-address-val-91063",
+ "management-v6-address": "example-management-v6-address-val-80466",
+ "vcpu": 45837298,
+ "vcpu-units": "example-vcpu-units-val-86249",
+ "vmemory": 57288956,
+ "vmemory-units": "example-vmemory-units-val-13291",
+ "vdisk": 16937143,
+ "vdisk-units": "example-vdisk-units-val-73197"
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/mockObject.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/mockObject.json
new file mode 100644
index 0000000000..2f97b47dd3
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/AAI/mockObject.json
@@ -0,0 +1,10 @@
+{
+ "id" : "something",
+ "resource-version" : "1234",
+ "plural" : {
+ "singular" : [{
+ "id" : "something2",
+ "resource-version" : "5678"
+ }]
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/APPC/appc_error.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/APPC/appc_error.json
new file mode 100644
index 0000000000..e28878d1aa
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/APPC/appc_error.json
@@ -0,0 +1,21 @@
+{
+ "output": {
+ "status": {
+ "code": 200,
+ "message": "RESULT_MESSAGE"
+ },
+ "common-header": {
+ "api-ver": "API_VERSION",
+ "request-id": "ECOMP_REQUEST_ID",
+ "originator-id": "ECOMP_SYSTEM_ID",
+ "sub-request-id": "ECOMP_SUBREQUEST_ID",
+ "timestamp": "2016-08-08T23:09:00.11Z",
+ "flags": {
+ "ttl": 1000,
+ "force": "TRUE",
+ "mode": "EXCLUSIVE"
+ }
+ },
+ "locked": "TRUE"
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/createNetworkRequest.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/createNetworkRequest.xml
new file mode 100644
index 0000000000..34079bd23f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/createNetworkRequest.xml
@@ -0,0 +1,75 @@
+<createNetworkRequest>
+ <cloudSiteId>mtn6</cloudSiteId>
+ <tenantId>0422ffb57ba042c0800a29dc85ca70f8</tenantId>
+ <networkId>8d35a433-c1db-4d54-a611-6de10aeb76f9</networkId>
+ <networkName>Dev_Bindings_1802_1311</networkName>
+ <networkType>CONTRAIL30_BASIC</networkType>
+ <modelCustomizationUuid>f1fc12e8-afe4-4716-954d-ed4d21a480ad</modelCustomizationUuid>
+ <networkTechnology>CONTRAIL</networkTechnology>
+ <providerVlanNetwork>
+ <physicalNetworkName>tbd</physicalNetworkName>
+ <vlans/>
+ </providerVlanNetwork>
+ <contrailNetwork>
+ <shared>true</shared>
+ <external>false</external>
+ <routeTargets>
+ <routeTarget>2001:051111</routeTarget>
+ <routeTargetRole>EXPORT</routeTargetRole>
+ </routeTargets>
+ <routeTargets>
+ <routeTarget>1000:051113</routeTarget>
+ <routeTargetRole>IMPORT</routeTargetRole>
+ </routeTargets>
+ <routeTargets>
+ <routeTarget>1000:051112</routeTarget>
+ <routeTargetRole>BOTH</routeTargetRole>
+ </routeTargets>
+ <routeTargets>
+ <routeTarget>1000:051115</routeTarget>
+ <routeTargetRole>EXPORT</routeTargetRole>
+ </routeTargets>
+ <routeTargets>
+ <routeTarget>1000:051114</routeTarget>
+ <routeTargetRole>IMPORT</routeTargetRole>
+ </routeTargets>
+ <policyFqdns>default-domain:ECOMP_MSO_DND:MSOPolicyD</policyFqdns>
+ <policyFqdns>default-domain:ECOMP_MSO_DND:MSOPolicyC</policyFqdns>
+ <routeTableFqdns/>
+ </contrailNetwork>
+ <subnets>
+ <allocationPools>
+ <start>107.118.41.3</start>
+ <end>107.118.41.45</end>
+ </allocationPools>
+ <cidr>107.118.41.0/24</cidr>
+ <enableDHCP>true</enableDHCP>
+ <gatewayIp>107.118.41.1</gatewayIp>
+ <ipVersion>4</ipVersion>
+ <subnetId>9dbb9e7e-fe18-421f-bad6-2305bd282471</subnetId>
+ <subnetName/>
+ <addrFromStart>true</addrFromStart>
+ </subnets>
+ <subnets>
+ <allocationPools>
+ <start>107.118.42.3</start>
+ <end>107.118.42.45</end>
+ </allocationPools>
+ <cidr>107.118.42.0/24</cidr>
+ <enableDHCP>true</enableDHCP>
+ <gatewayIp>107.118.42.1</gatewayIp>
+ <ipVersion>4</ipVersion>
+ <subnetId>1bb4e1d2-d225-47f3-b6fc-2d0b290de1ab</subnetId>
+ <subnetName/>
+ <addrFromStart>true</addrFromStart>
+ </subnets>
+ <skipAAI>true</skipAAI>
+ <backout>true</backout>
+ <failIfExists>false</failIfExists>
+ <msoRequest>
+ <requestId>3d35ca0c-2da5-4f60-84d9-3e005de335c0</requestId>
+ <serviceInstanceId>f1d1c7da-fc42-4c31-866e-cfe963e55723</serviceInstanceId>
+ </msoRequest>
+ <messageId>d4515ea9-2852-4d3a-b424-9d7b6cf69d8e</messageId>
+ <notificationUrl/>
+</createNetworkRequest> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/createNetworkResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/createNetworkResponse.xml
new file mode 100644
index 0000000000..607dd5af92
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/createNetworkResponse.xml
@@ -0,0 +1,31 @@
+<createNetworkResponse>
+ <messageId>d4515ea9-2852-4d3a-b424-9d7b6cf69d8e</messageId>
+ <networkCreated>true</networkCreated>
+ <networkFqdn>default-domain:ECOMP_MSO_DND:Dev_Bindings_1802_1311</networkFqdn>
+ <networkId>8d35a433-c1db-4d54-a611-6de10aeb76f9</networkId>
+ <networkStackId>Dev_Bindings_1802_1311/ecf7e197-72db-452e-9eda-253cb642c9b7</networkStackId>
+ <neutronNetworkId>b6a7820c-4734-4ef2-8a73-a22c824423fa</neutronNetworkId>
+ <rollback>
+ <cloudId>mtn6</cloudId>
+ <modelCustomizationUuid>f1fc12e8-afe4-4716-954d-ed4d21a480ad</modelCustomizationUuid>
+ <msoRequest>
+ <requestId>3d35ca0c-2da5-4f60-84d9-3e005de335c0</requestId>
+ <serviceInstanceId>f1d1c7da-fc42-4c31-866e-cfe963e55723</serviceInstanceId>
+ </msoRequest>
+ <networkCreated>true</networkCreated>
+ <networkStackId>Dev_Bindings_1802_1311/ecf7e197-72db-452e-9eda-253cb642c9b7</networkStackId>
+ <networkType>CONTRAIL30_BASIC</networkType>
+ <neutronNetworkId>b6a7820c-4734-4ef2-8a73-a22c824423fa</neutronNetworkId>
+ <tenantId>0422ffb57ba042c0800a29dc85ca70f8</tenantId>
+ </rollback>
+ <subnetMap>
+ <entry>
+ <key>9dbb9e7e-fe18-421f-bad6-2305bd282471</key>
+ <value>27d414c7-1076-4595-aa45-4717ee992cef</value>
+ </entry>
+ <entry>
+ <key>1bb4e1d2-d225-47f3-b6fc-2d0b290de1ab</key>
+ <value>db64710c-fbbc-4dc9-8109-3925b87268fa</value>
+ </entry>
+ </subnetMap>
+</createNetworkResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/defaultNetwork.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/defaultNetwork.json
new file mode 100644
index 0000000000..dda149a560
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/defaultNetwork.json
@@ -0,0 +1,10 @@
+{
+ "networkTechnology": "NEUTRON",
+ "failIfExists": false,
+ "backout": true,
+ "networkParams": [],
+ "msoRequest": {},
+ "contrailRequest": false,
+ "skipAAI": false,
+ "synchronous": true
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/l3NetworkBbObject.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/l3NetworkBbObject.json
new file mode 100644
index 0000000000..d5d234cbf6
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/l3NetworkBbObject.json
@@ -0,0 +1,226 @@
+{
+ "sharedNetwork": false,
+ "boundToVpn": false,
+ "externalNetwork": false,
+ "providerNetwork": false,
+ "network-id": "TEST_NETWORK_ID",
+ "cascaded": false,
+ "cloud-params": null,
+ "network-name": "TEST_NETWORK_NAME",
+ "is-bound-to-vpn": false,
+ "service-id": null,
+ "network-role-instance": null,
+ "orchestration-status": "Active",
+ "heat-stack-id": "Dev_Bindings_1802_020118/06c2445f-1ca1-4ad8-be08-454c4de443bb",
+ "contrail-network-fqdn": "default-domain:ECOMP_MSO_DND:Dev_Bindings_1802_020118",
+ "widget-model-id": null,
+ "widget-model-version": null,
+ "physical-network-name": null,
+ "is-provider-network": false,
+ "is-shared-network": false,
+ "is-external-network": false,
+ "self-link": null,
+ "operational-status": null,
+ "subnets": {
+ "subnet": [
+ {
+ "subnet-id": "209f62cf-cf0c-42f8-b13c-f038b92ef108",
+ "subnet-name": "",
+ "neutron-subnet-id": "3942ca32-5f5b-4d62-a2e4-b528b7a4318c",
+ "gateway-address": "192.168.41.1",
+ "network-start-address": "192.168.41.0",
+ "cidr-mask": "24",
+ "ip-version": "4",
+ "orchestration-status": "Active",
+ "dhcp-enabled": true,
+ "dhcp-start": "192.168.41.3",
+ "dhcp-end": "192.168.41.45",
+ "ip-assignment-direction": "",
+ "resource-version": "1517496965497",
+ "host-routes": {
+ "host-route": [
+ {
+ "host-route-id": "400d286b-7e44-4514-b9b3-f70f7360ff32",
+ "route-prefix": "172.20.1.0/24",
+ "next-hop": "10.102.200.1",
+ "next-hop-type": "ip-address",
+ "resource-version": "1505857300987"
+ },
+ {
+ "host-route-id": "6f038013-8b15-4eb8-914b-507489fbc8ee",
+ "route-prefix": "10.102.0.0/16",
+ "next-hop": "10.102.200.1",
+ "next-hop-type": "ip-address",
+ "resource-version": "1505857301151"
+ },
+ {
+ "host-route-id": "8811c5f8-f1ed-4fa0-a505-e1be60396e28",
+ "route-prefix": "192.168.2.0/25",
+ "next-hop": "10.102.200.1",
+ "resource-version": "1505857301954"
+ }
+ ]
+ }
+ },
+ {
+ "subnet-id": "971bc608-1aff-47c0-923d-92e43b699f01",
+ "subnet-name": "",
+ "neutron-subnet-id": "81a5ff92-7ca4-4756-a493-496479f0d10f",
+ "gateway-address": "192.168.42.1",
+ "network-start-address": "192.168.42.0",
+ "cidr-mask": "24",
+ "ip-version": "4",
+ "orchestration-status": "Active",
+ "dhcp-enabled": true,
+ "dhcp-start": "192.168.42.3",
+ "dhcp-end": "192.168.42.45",
+ "ip-assignment-direction": "",
+ "resource-version": "1517496965508"
+ }
+ ]
+ },
+ "relationship-list": {
+ "relationship": [
+ {
+ "related-to": "service-instance",
+ "related-link": "/aai/v11/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/cc88915e-fb95-4b16-9c1e-a0abf40d1e40",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "MSO_1610_dev"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "MSO-dev-service-type"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "cc88915e-fb95-4b16-9c1e-a0abf40d1e40"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "MSO-DEV-SI-1802-v6-2-01-nwk1"
+ }
+ ]
+ },
+ {
+ "related-to": "cloud-region",
+ "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn6",
+ "relationship-data": [
+ {
+ "relationship-key": "cloud-region.cloud-owner",
+ "relationship-value": "att-aic"
+ },
+ {
+ "relationship-key": "cloud-region.cloud-region-id",
+ "relationship-value": "mtn6"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "cloud-region.owner-defined-type",
+ "property-value": "LCP"
+ }
+ ]
+ },
+ {
+ "related-to": "tenant",
+ "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn6/tenants/tenant/0422ffb57ba042c0800a29dc85ca70f8",
+ "relationship-data": [
+ {
+ "relationship-key": "cloud-region.cloud-owner",
+ "relationship-value": "att-aic"
+ },
+ {
+ "relationship-key": "cloud-region.cloud-region-id",
+ "relationship-value": "mtn6"
+ },
+ {
+ "relationship-key": "tenant.tenant-id",
+ "relationship-value": "0422ffb57ba042c0800a29dc85ca70f8"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "tenant.tenant-name",
+ "property-value": "ECOMP_MSO_DND"
+ }
+ ]
+ },
+ {
+ "related-to": "route-table-reference",
+ "related-link": "/aai/v11/network/route-table-references/route-table-reference/c87fa27e-ac15-4b3e-b7ef-866682d8ca00",
+ "relationship-data": [
+ {
+ "relationship-key": "route-table-reference.route-table-reference-id",
+ "relationship-value": "c87fa27e-ac15-4b3e-b7ef-866682d8ca00"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "route-table-reference.route-table-reference-fqdn",
+ "property-value": "default-domain:ECOMP_MSO_DND:RTA"
+ }
+ ]
+ },
+ {
+ "related-to": "network-policy",
+ "related-link": "/aai/v11/network/network-policies/network-policy/0219d83f-7c4a-48e2-b8fc-9b20459356bc",
+ "relationship-data": [
+ {
+ "relationship-key": "network-policy.network-policy-id",
+ "relationship-value": "0219d83f-7c4a-48e2-b8fc-9b20459356bc"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "network-policy.network-policy-fqdn",
+ "property-value": "default-domain:ECOMP_MSO_DND:MSOPolicyD"
+ }
+ ]
+ },
+ {
+ "related-to": "network-policy",
+ "related-link": "/aai/v11/network/network-policies/network-policy/e7a3560c-8b29-4611-a404-83af0b31ce64",
+ "relationship-data": [
+ {
+ "relationship-key": "network-policy.network-policy-id",
+ "relationship-value": "e7a3560c-8b29-4611-a404-83af0b31ce64"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "network-policy.network-policy-fqdn",
+ "property-value": "default-domain:ECOMP_MSO_DND:MSOPolicyC"
+ }
+ ]
+ },
+ {
+ "related-to": "vpn-binding",
+ "related-link": "/aai/v11/network/vpn-bindings/vpn-binding/9a7b327d9-287aa00-82c4b0-100001",
+ "relationship-data": [
+ {
+ "relationship-key": "vpn-binding.vpn-id",
+ "relationship-value": "9a7b327d9-287aa00-82c4b0-100001"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "vpn-binding.vpn-name",
+ "property-value": "MSO_VPN_TEST"
+ },
+ {
+ "property-key": "vpn-binding.vpn-type"
+ }
+ ]
+ }
+ ]
+ },
+ "ctag-assignments": [
+ ],
+ "segmentation-assignments": [
+ ],
+ "model-info-network": null
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/payloadUpdateCreated.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/payloadUpdateCreated.json
new file mode 100644
index 0000000000..aa6320801e
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/payloadUpdateCreated.json
@@ -0,0 +1,216 @@
+{
+ "network-id": "0384d743-f69b-4cc8-9aa8-c3ae66662c44",
+ "network-name": "Dev_Bindings_1802_020118",
+ "network-type": "CONTRAIL30_BASIC",
+ "network-role": "GN_EVPN_direct",
+ "network-technology": "contrail",
+ "neutron-network-id": "1112b912-0e00-4d6d-9392-014e106399ee",
+ "is-bound-to-vpn": true,
+ "service-id": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "network-role-instance": 0,
+ "resource-version": "1517496965485",
+ "orchestration-status": "Active",
+ "heat-stack-id": "Dev_Bindings_1802_020118/06c2445f-1ca1-4ad8-be08-454c4de443bb",
+ "contrail-network-fqdn": "default-domain:ECOMP_MSO_DND:Dev_Bindings_1802_020118",
+ "physical-network-name": "tbd",
+ "is-provider-network": false,
+ "is-shared-network": true,
+ "is-external-network": false,
+ "subnets": {
+ "subnet": [
+ {
+ "subnet-id": "209f62cf-cf0c-42f8-b13c-f038b92ef108",
+ "subnet-name": "",
+ "neutron-subnet-id": "3942ca32-5f5b-4d62-a2e4-b528b7a4318c",
+ "gateway-address": "192.168.41.1",
+ "network-start-address": "192.168.41.0",
+ "cidr-mask": "24",
+ "ip-version": "4",
+ "orchestration-status": "Active",
+ "dhcp-enabled": true,
+ "dhcp-start": "192.168.41.3",
+ "dhcp-end": "192.168.41.45",
+ "ip-assignment-direction": "",
+ "resource-version": "1517496965497",
+ "host-routes": {
+ "host-route": [
+ {
+ "host-route-id": "400d286b-7e44-4514-b9b3-f70f7360ff32",
+ "route-prefix": "172.20.1.0/24",
+ "next-hop": "10.102.200.1",
+ "next-hop-type": "ip-address",
+ "resource-version": "1505857300987"
+ },
+ {
+ "host-route-id": "6f038013-8b15-4eb8-914b-507489fbc8ee",
+ "route-prefix": "10.102.0.0/16",
+ "next-hop": "10.102.200.1",
+ "next-hop-type": "ip-address",
+ "resource-version": "1505857301151"
+ },
+ {
+ "host-route-id": "8811c5f8-f1ed-4fa0-a505-e1be60396e28",
+ "route-prefix": "192.168.2.0/25",
+ "next-hop": "10.102.200.1",
+ "resource-version": "1505857301954"
+ }
+ ]
+ }
+ },
+ {
+ "subnet-id": "971bc608-1aff-47c0-923d-92e43b699f01",
+ "subnet-name": "",
+ "neutron-subnet-id": "81a5ff92-7ca4-4756-a493-496479f0d10f",
+ "gateway-address": "192.168.42.1",
+ "network-start-address": "192.168.42.0",
+ "cidr-mask": "24",
+ "ip-version": "4",
+ "orchestration-status": "Active",
+ "dhcp-enabled": true,
+ "dhcp-start": "192.168.42.3",
+ "dhcp-end": "192.168.42.45",
+ "ip-assignment-direction": "",
+ "resource-version": "1517496965508"
+ }
+ ]
+ },
+ "relationship-list": {
+ "relationship": [
+ {
+ "related-to": "service-instance",
+ "related-link": "/aai/v11/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/cc88915e-fb95-4b16-9c1e-a0abf40d1e40",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "MSO_1610_dev"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "MSO-dev-service-type"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "cc88915e-fb95-4b16-9c1e-a0abf40d1e40"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "MSO-DEV-SI-1802-v6-2-01-nwk1"
+ }
+ ]
+ },
+ {
+ "related-to": "cloud-region",
+ "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn6",
+ "relationship-data": [
+ {
+ "relationship-key": "cloud-region.cloud-owner",
+ "relationship-value": "att-aic"
+ },
+ {
+ "relationship-key": "cloud-region.cloud-region-id",
+ "relationship-value": "mtn6"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "cloud-region.owner-defined-type",
+ "property-value": "LCP"
+ }
+ ]
+ },
+ {
+ "related-to": "tenant",
+ "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn6/tenants/tenant/0422ffb57ba042c0800a29dc85ca70f8",
+ "relationship-data": [
+ {
+ "relationship-key": "cloud-region.cloud-owner",
+ "relationship-value": "att-aic"
+ },
+ {
+ "relationship-key": "cloud-region.cloud-region-id",
+ "relationship-value": "mtn6"
+ },
+ {
+ "relationship-key": "tenant.tenant-id",
+ "relationship-value": "0422ffb57ba042c0800a29dc85ca70f8"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "tenant.tenant-name",
+ "property-value": "ECOMP_MSO_DND"
+ }
+ ]
+ },
+ {
+ "related-to": "route-table-reference",
+ "related-link": "/aai/v11/network/route-table-references/route-table-reference/c87fa27e-ac15-4b3e-b7ef-866682d8ca00",
+ "relationship-data": [
+ {
+ "relationship-key": "route-table-reference.route-table-reference-id",
+ "relationship-value": "c87fa27e-ac15-4b3e-b7ef-866682d8ca00"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "route-table-reference.route-table-reference-fqdn",
+ "property-value": "default-domain:ECOMP_MSO_DND:RTA"
+ }
+ ]
+ },
+ {
+ "related-to": "network-policy",
+ "related-link": "/aai/v11/network/network-policies/network-policy/0219d83f-7c4a-48e2-b8fc-9b20459356bc",
+ "relationship-data": [
+ {
+ "relationship-key": "network-policy.network-policy-id",
+ "relationship-value": "0219d83f-7c4a-48e2-b8fc-9b20459356bc"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "network-policy.network-policy-fqdn",
+ "property-value": "default-domain:ECOMP_MSO_DND:MSOPolicyD"
+ }
+ ]
+ },
+ {
+ "related-to": "network-policy",
+ "related-link": "/aai/v11/network/network-policies/network-policy/e7a3560c-8b29-4611-a404-83af0b31ce64",
+ "relationship-data": [
+ {
+ "relationship-key": "network-policy.network-policy-id",
+ "relationship-value": "e7a3560c-8b29-4611-a404-83af0b31ce64"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "network-policy.network-policy-fqdn",
+ "property-value": "default-domain:ECOMP_MSO_DND:MSOPolicyC"
+ }
+ ]
+ },
+ {
+ "related-to": "vpn-binding",
+ "related-link": "/aai/v11/network/vpn-bindings/vpn-binding/9a7b327d9-287aa00-82c4b0-100001",
+ "relationship-data": [
+ {
+ "relationship-key": "vpn-binding.vpn-id",
+ "relationship-value": "9a7b327d9-287aa00-82c4b0-100001"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "vpn-binding.vpn-name",
+ "property-value": "MSO_VPN_TEST"
+ },
+ {
+ "property-key": "vpn-binding.vpn-type"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAICloudRegion.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAICloudRegion.json
new file mode 100644
index 0000000000..5addff2d70
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAICloudRegion.json
@@ -0,0 +1,596 @@
+{
+ "cloud-owner": "att-aic",
+ "cloud-region-id": "mtn6",
+ "cloud-type": "openstack",
+ "owner-defined-type": "LCP",
+ "cloud-region-version": "3.0",
+ "cloud-zone": "AUS1",
+ "complex-name": "mtn6",
+ "resource-version": "1485202577",
+ "relationship-list": {"relationship": [
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/316fd41a-5943-4028-b537-9eace4a94387",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "316fd41a-5943-4028-b537-9eace4a94387"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1702-125"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/c7910b86-8830-4b43-8d93-895f4e71ee8a",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "c7910b86-8830-4b43-8d93-895f4e71ee8a"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_33"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/491508c7-1246-4ebc-a080-98fbe272291a",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "491508c7-1246-4ebc-a080-98fbe272291a"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwOamNetVto.HNGWOAMNETVTO.OAM_net_23"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/acaccfdb-2bf9-4ccb-b123-c54e28e8e310",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "acaccfdb-2bf9-4ccb-b123-c54e28e8e310"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-2002"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/8594c6a8-f8ff-43aa-a0b5-952fd60c9f6a",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "8594c6a8-f8ff-43aa-a0b5-952fd60c9f6a"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_45"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/cf82a73f-de7f-4f84-8dfc-16a487c63a36",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "cf82a73f-de7f-4f84-8dfc-16a487c63a36"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-2001"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/259062a4-dc9a-43f2-b46d-46f8b31bb661",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "259062a4-dc9a-43f2-b46d-46f8b31bb661"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_29"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/5102bbfc-44f3-4cd3-ae1e-0c9942653aed",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "5102bbfc-44f3-4cd3-ae1e-0c9942653aed"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_30"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/9b6d2ec3-1e58-4927-91a4-0dabe260436e",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "9b6d2ec3-1e58-4927-91a4-0dabe260436e"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_31"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/268c0582-a5b3-4f9f-8f4f-ea0f93620212",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "268c0582-a5b3-4f9f-8f4f-ea0f93620212"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_23"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/48627fd2-b3f2-4867-9fa3-f6425a7d22f5",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "48627fd2-b3f2-4867-9fa3-f6425a7d22f5"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwOamNetVto.HNGWOAMNETVTO.OAM_net_10"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/fb630eb9-44a3-4a90-a0c9-e52002f9f555",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "fb630eb9-44a3-4a90-a0c9-e52002f9f555"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_28"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/65cc74dd-bffb-4f71-8db8-0fb6e6ac36ef",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "65cc74dd-bffb-4f71-8db8-0fb6e6ac36ef"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_26"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/29ee3893-b7d0-4420-a035-c990fc32eb1c",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "29ee3893-b7d0-4420-a035-c990fc32eb1c"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_48"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/f8fb2eaa-68f7-4a1a-8adb-37ba7b3d891e",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "f8fb2eaa-68f7-4a1a-8adb-37ba7b3d891e"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1702-126"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/c1fc2c47-4986-4d42-80c3-379d5252bdb1",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "c1fc2c47-4986-4d42-80c3-379d5252bdb1"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_40"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/e47d1154-03b4-44a1-8196-6fb947f4d4b3",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "e47d1154-03b4-44a1-8196-6fb947f4d4b3"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwOamNetVto.HNGWOAMNETVTO.OAM_net_26"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/09e0d15b-e36c-4bf5-8c2b-f4ce9256854f",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "09e0d15b-e36c-4bf5-8c2b-f4ce9256854f"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "oam-net"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/7b86609c-1c79-4329-bf21-15df6db1ffe0",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "7b86609c-1c79-4329-bf21-15df6db1ffe0"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "oam-net"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/c547848e-2617-4161-9154-1aa6cca60994",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "c547848e-2617-4161-9154-1aa6cca60994"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "oam-net"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/d348293a-2f7b-4925-bf21-fd59c2e52bfa",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "d348293a-2f7b-4925-bf21-fd59c2e52bfa"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_32"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/92e7461d-358a-47a3-be5e-669dcf6400ef",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "92e7461d-358a-47a3-be5e-669dcf6400ef"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "oam-net"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/01c857bf-c75e-4f1c-886c-f651a8479037",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "01c857bf-c75e-4f1c-886c-f651a8479037"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-0509A"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/4cadeb8b-f258-436d-a998-de887f10d180",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "4cadeb8b-f258-436d-a998-de887f10d180"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-0511C"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/d9b00452-16c5-441f-9455-2954b93b7be7",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "d9b00452-16c5-441f-9455-2954b93b7be7"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-0512C"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/f170b669-031a-47ff-a545-61a5fbfaf884",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "f170b669-031a-47ff-a545-61a5fbfaf884"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_1Bindings_324_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/fb7ed40a-4c29-464c-a9d7-edc314802cc4",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "fb7ed40a-4c29-464c-a9d7-edc314802cc4"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-0512A"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/f901b9d6-3779-4f0d-a925-cb7e5e84650a",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "f901b9d6-3779-4f0d-a925-cb7e5e84650a"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-155"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/e901cbc9-b964-4e8f-a363-12fe30585526",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "e901cbc9-b964-4e8f-a363-12fe30585526"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Mobility_ATM_1707_int_HngwOamNetVto.HNGWOAMNETVTO.OAM_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/4a5b95a6-4659-406e-bd39-d7909fed055f",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "4a5b95a6-4659-406e-bd39-d7909fed055f"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-1707-ipv6-6001-badMask"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/7883684f-4ee0-460e-a277-0276e79fb8b8",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "7883684f-4ee0-460e-a277-0276e79fb8b8"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Mobility_ATM_1707_HnportalProviderNetwork.HNPortalPROVIDERNETWORK.SR_IOV_Provider2_1_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/da4d0845-1e2f-4d94-a66f-bca45242c12f",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "da4d0845-1e2f-4d94-a66f-bca45242c12f"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Mobility_ATM_1707_int_HngwOamNetVto.HNGWOAMNETVTO.OAM_net_29"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/c06bf62e-7c26-4c12-818f-927c3c25a38a",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "c06bf62e-7c26-4c12-818f-927c3c25a38a"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Mobility_ATM_1707_int_HngwOamNetVto.HNGWOAMNETVTO.OAM_net_2"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/b09885f5-afce-400c-84dc-0a2779fc3e21",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "b09885f5-afce-400c-84dc-0a2779fc3e21"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "ST-MTN6-NoBinding-1707-18-1000A"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/e746082a-41dc-40ec-a06e-d1138004902e",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "e746082a-41dc-40ec-a06e-d1138004902e"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1710-4001"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/f1c5642c-c7d8-4409-997f-b5b186d8892f",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "f1c5642c-c7d8-4409-997f-b5b186d8892f"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-119"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/51e3b192-31e3-4c3e-89a9-e1f2592e15fc",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "51e3b192-31e3-4c3e-89a9-e1f2592e15fc"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_Bindings_1802_1311"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/fc0ae18f-0a1f-4773-b387-5aed5b58fffb",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "fc0ae18f-0a1f-4773-b387-5aed5b58fffb"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_Bindings_1802_021618"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/0384d743-f69b-4cc8-9aa8-c3ae66662c44",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "0384d743-f69b-4cc8-9aa8-c3ae66662c44"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_Bindings_1802_020118"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/6ee51b6e-2b54-45cf-83f7-8bfa2c4ecaf3",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "6ee51b6e-2b54-45cf-83f7-8bfa2c4ecaf3"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_Dev_HostRoutes-1802-bns-2001"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/aaaa-bbbb-cccc-dddd-eeee",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "aaaa-bbbb-cccc-dddd-eeee"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "direct_dhcp_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/800bdc98-4326-4358-980d-e552e2105eaf",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "800bdc98-4326-4358-980d-e552e2105eaf"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-0512B"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/b11eb5fc-082d-424a-a14c-f356d1ce611d",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "b11eb5fc-082d-424a-a14c-f356d1ce611d"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "DEV-1Binding-1710-0814-1000A"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/4636eea4-86a3-4cd3-806d-a63f29542ba3",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "4636eea4-86a3-4cd3-806d-a63f29542ba3"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "DEV-MTN6-NoBinding-1707-20-1000A"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/1111-2222-3333-4444-5555",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "1111-2222-3333-4444-5555"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MNS-25180-L-06Shared_OAM_PROTECTED_NET_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/67743f38-c2ac-4309-b81c-8b05381e5522",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "67743f38-c2ac-4309-b81c-8b05381e5522"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "dev_Bindings_full_1710_0907A"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/wwww-xxxx-yyyy-zzzz",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "wwww-xxxx-yyyy-zzzz"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MNS-25180-P-ALPSGA01_oam_direct_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/ed885e04-ffe5-47fb-bb20-103e5e22ef89",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "ed885e04-ffe5-47fb-bb20-103e5e22ef89"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_Dev_HostRoutes-1802-bns-1002"
+ }]
+ },
+ {
+ "related-to": "complex",
+ "related-link": "/aai/v11/cloud-infrastructure/complexes/complex/AUSTTXGR",
+ "relationship-data": [ {
+ "relationship-key": "complex.physical-location-id",
+ "relationship-value": "AUSTTXGR"
+ }]
+ }
+ ]}
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAICloudRegion25.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAICloudRegion25.json
new file mode 100644
index 0000000000..fadbf9c244
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAICloudRegion25.json
@@ -0,0 +1,596 @@
+{
+ "cloud-owner": "att-aic",
+ "cloud-region-id": "mtn6",
+ "cloud-type": "openstack",
+ "owner-defined-type": "LCP",
+ "cloud-region-version": "2.5",
+ "cloud-zone": "AUS1",
+ "complex-name": "mtn6",
+ "resource-version": "1485202577",
+ "relationship-list": {"relationship": [
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/316fd41a-5943-4028-b537-9eace4a94387",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "316fd41a-5943-4028-b537-9eace4a94387"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1702-125"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/c7910b86-8830-4b43-8d93-895f4e71ee8a",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "c7910b86-8830-4b43-8d93-895f4e71ee8a"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_33"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/491508c7-1246-4ebc-a080-98fbe272291a",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "491508c7-1246-4ebc-a080-98fbe272291a"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwOamNetVto.HNGWOAMNETVTO.OAM_net_23"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/acaccfdb-2bf9-4ccb-b123-c54e28e8e310",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "acaccfdb-2bf9-4ccb-b123-c54e28e8e310"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-2002"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/8594c6a8-f8ff-43aa-a0b5-952fd60c9f6a",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "8594c6a8-f8ff-43aa-a0b5-952fd60c9f6a"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_45"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/cf82a73f-de7f-4f84-8dfc-16a487c63a36",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "cf82a73f-de7f-4f84-8dfc-16a487c63a36"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-2001"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/259062a4-dc9a-43f2-b46d-46f8b31bb661",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "259062a4-dc9a-43f2-b46d-46f8b31bb661"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_29"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/5102bbfc-44f3-4cd3-ae1e-0c9942653aed",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "5102bbfc-44f3-4cd3-ae1e-0c9942653aed"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_30"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/9b6d2ec3-1e58-4927-91a4-0dabe260436e",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "9b6d2ec3-1e58-4927-91a4-0dabe260436e"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_31"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/268c0582-a5b3-4f9f-8f4f-ea0f93620212",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "268c0582-a5b3-4f9f-8f4f-ea0f93620212"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_23"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/48627fd2-b3f2-4867-9fa3-f6425a7d22f5",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "48627fd2-b3f2-4867-9fa3-f6425a7d22f5"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwOamNetVto.HNGWOAMNETVTO.OAM_net_10"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/fb630eb9-44a3-4a90-a0c9-e52002f9f555",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "fb630eb9-44a3-4a90-a0c9-e52002f9f555"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_28"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/65cc74dd-bffb-4f71-8db8-0fb6e6ac36ef",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "65cc74dd-bffb-4f71-8db8-0fb6e6ac36ef"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_26"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/29ee3893-b7d0-4420-a035-c990fc32eb1c",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "29ee3893-b7d0-4420-a035-c990fc32eb1c"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_48"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/f8fb2eaa-68f7-4a1a-8adb-37ba7b3d891e",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "f8fb2eaa-68f7-4a1a-8adb-37ba7b3d891e"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1702-126"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/c1fc2c47-4986-4d42-80c3-379d5252bdb1",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "c1fc2c47-4986-4d42-80c3-379d5252bdb1"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_40"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/e47d1154-03b4-44a1-8196-6fb947f4d4b3",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "e47d1154-03b4-44a1-8196-6fb947f4d4b3"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwOamNetVto.HNGWOAMNETVTO.OAM_net_26"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/09e0d15b-e36c-4bf5-8c2b-f4ce9256854f",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "09e0d15b-e36c-4bf5-8c2b-f4ce9256854f"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "oam-net"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/7b86609c-1c79-4329-bf21-15df6db1ffe0",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "7b86609c-1c79-4329-bf21-15df6db1ffe0"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "oam-net"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/c547848e-2617-4161-9154-1aa6cca60994",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "c547848e-2617-4161-9154-1aa6cca60994"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "oam-net"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/d348293a-2f7b-4925-bf21-fd59c2e52bfa",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "d348293a-2f7b-4925-bf21-fd59c2e52bfa"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_32"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/92e7461d-358a-47a3-be5e-669dcf6400ef",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "92e7461d-358a-47a3-be5e-669dcf6400ef"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "oam-net"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/01c857bf-c75e-4f1c-886c-f651a8479037",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "01c857bf-c75e-4f1c-886c-f651a8479037"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-0509A"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/4cadeb8b-f258-436d-a998-de887f10d180",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "4cadeb8b-f258-436d-a998-de887f10d180"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-0511C"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/d9b00452-16c5-441f-9455-2954b93b7be7",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "d9b00452-16c5-441f-9455-2954b93b7be7"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-0512C"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/f170b669-031a-47ff-a545-61a5fbfaf884",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "f170b669-031a-47ff-a545-61a5fbfaf884"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_1Bindings_324_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/fb7ed40a-4c29-464c-a9d7-edc314802cc4",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "fb7ed40a-4c29-464c-a9d7-edc314802cc4"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-0512A"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/f901b9d6-3779-4f0d-a925-cb7e5e84650a",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "f901b9d6-3779-4f0d-a925-cb7e5e84650a"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-155"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/e901cbc9-b964-4e8f-a363-12fe30585526",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "e901cbc9-b964-4e8f-a363-12fe30585526"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Mobility_ATM_1707_int_HngwOamNetVto.HNGWOAMNETVTO.OAM_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/4a5b95a6-4659-406e-bd39-d7909fed055f",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "4a5b95a6-4659-406e-bd39-d7909fed055f"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-1707-ipv6-6001-badMask"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/7883684f-4ee0-460e-a277-0276e79fb8b8",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "7883684f-4ee0-460e-a277-0276e79fb8b8"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Mobility_ATM_1707_HnportalProviderNetwork.HNPortalPROVIDERNETWORK.SR_IOV_Provider2_1_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/da4d0845-1e2f-4d94-a66f-bca45242c12f",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "da4d0845-1e2f-4d94-a66f-bca45242c12f"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Mobility_ATM_1707_int_HngwOamNetVto.HNGWOAMNETVTO.OAM_net_29"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/c06bf62e-7c26-4c12-818f-927c3c25a38a",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "c06bf62e-7c26-4c12-818f-927c3c25a38a"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Mobility_ATM_1707_int_HngwOamNetVto.HNGWOAMNETVTO.OAM_net_2"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/b09885f5-afce-400c-84dc-0a2779fc3e21",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "b09885f5-afce-400c-84dc-0a2779fc3e21"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "ST-MTN6-NoBinding-1707-18-1000A"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/e746082a-41dc-40ec-a06e-d1138004902e",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "e746082a-41dc-40ec-a06e-d1138004902e"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1710-4001"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/f1c5642c-c7d8-4409-997f-b5b186d8892f",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "f1c5642c-c7d8-4409-997f-b5b186d8892f"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-119"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/51e3b192-31e3-4c3e-89a9-e1f2592e15fc",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "51e3b192-31e3-4c3e-89a9-e1f2592e15fc"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_Bindings_1802_1311"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/fc0ae18f-0a1f-4773-b387-5aed5b58fffb",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "fc0ae18f-0a1f-4773-b387-5aed5b58fffb"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_Bindings_1802_021618"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/0384d743-f69b-4cc8-9aa8-c3ae66662c44",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "0384d743-f69b-4cc8-9aa8-c3ae66662c44"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_Bindings_1802_020118"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/6ee51b6e-2b54-45cf-83f7-8bfa2c4ecaf3",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "6ee51b6e-2b54-45cf-83f7-8bfa2c4ecaf3"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_Dev_HostRoutes-1802-bns-2001"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/aaaa-bbbb-cccc-dddd-eeee",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "aaaa-bbbb-cccc-dddd-eeee"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "direct_dhcp_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/800bdc98-4326-4358-980d-e552e2105eaf",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "800bdc98-4326-4358-980d-e552e2105eaf"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-0512B"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/b11eb5fc-082d-424a-a14c-f356d1ce611d",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "b11eb5fc-082d-424a-a14c-f356d1ce611d"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "DEV-1Binding-1710-0814-1000A"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/4636eea4-86a3-4cd3-806d-a63f29542ba3",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "4636eea4-86a3-4cd3-806d-a63f29542ba3"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "DEV-MTN6-NoBinding-1707-20-1000A"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/1111-2222-3333-4444-5555",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "1111-2222-3333-4444-5555"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MNS-25180-L-06Shared_OAM_PROTECTED_NET_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/67743f38-c2ac-4309-b81c-8b05381e5522",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "67743f38-c2ac-4309-b81c-8b05381e5522"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "dev_Bindings_full_1710_0907A"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/wwww-xxxx-yyyy-zzzz",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "wwww-xxxx-yyyy-zzzz"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MNS-25180-P-ALPSGA01_oam_direct_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/ed885e04-ffe5-47fb-bb20-103e5e22ef89",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "ed885e04-ffe5-47fb-bb20-103e5e22ef89"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_Dev_HostRoutes-1802-bns-1002"
+ }]
+ },
+ {
+ "related-to": "complex",
+ "related-link": "/aai/v11/cloud-infrastructure/complexes/complex/AUSTTXGR",
+ "relationship-data": [ {
+ "relationship-key": "complex.physical-location-id",
+ "relationship-value": "AUSTTXGR"
+ }]
+ }
+ ]}
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAICloudRegionError.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAICloudRegionError.json
new file mode 100644
index 0000000000..97611c1d62
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAICloudRegionError.json
@@ -0,0 +1,596 @@
+{
+ "cloud-owner": "att-aic",
+ "cloud-region-id": "ERROR",
+ "cloud-type": "openstack",
+ "owner-defined-type": "LCP",
+ "cloud-region-version": "3.0",
+ "cloud-zone": "AUS1",
+ "complex-name": "mtn6",
+ "resource-version": "1485202577",
+ "relationship-list": {"relationship": [
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/316fd41a-5943-4028-b537-9eace4a94387",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "316fd41a-5943-4028-b537-9eace4a94387"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1702-125"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/c7910b86-8830-4b43-8d93-895f4e71ee8a",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "c7910b86-8830-4b43-8d93-895f4e71ee8a"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_33"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/491508c7-1246-4ebc-a080-98fbe272291a",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "491508c7-1246-4ebc-a080-98fbe272291a"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwOamNetVto.HNGWOAMNETVTO.OAM_net_23"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/acaccfdb-2bf9-4ccb-b123-c54e28e8e310",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "acaccfdb-2bf9-4ccb-b123-c54e28e8e310"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-2002"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/8594c6a8-f8ff-43aa-a0b5-952fd60c9f6a",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "8594c6a8-f8ff-43aa-a0b5-952fd60c9f6a"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_45"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/cf82a73f-de7f-4f84-8dfc-16a487c63a36",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "cf82a73f-de7f-4f84-8dfc-16a487c63a36"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-2001"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/259062a4-dc9a-43f2-b46d-46f8b31bb661",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "259062a4-dc9a-43f2-b46d-46f8b31bb661"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_29"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/5102bbfc-44f3-4cd3-ae1e-0c9942653aed",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "5102bbfc-44f3-4cd3-ae1e-0c9942653aed"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_30"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/9b6d2ec3-1e58-4927-91a4-0dabe260436e",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "9b6d2ec3-1e58-4927-91a4-0dabe260436e"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_31"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/268c0582-a5b3-4f9f-8f4f-ea0f93620212",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "268c0582-a5b3-4f9f-8f4f-ea0f93620212"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_23"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/48627fd2-b3f2-4867-9fa3-f6425a7d22f5",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "48627fd2-b3f2-4867-9fa3-f6425a7d22f5"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwOamNetVto.HNGWOAMNETVTO.OAM_net_10"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/fb630eb9-44a3-4a90-a0c9-e52002f9f555",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "fb630eb9-44a3-4a90-a0c9-e52002f9f555"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_28"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/65cc74dd-bffb-4f71-8db8-0fb6e6ac36ef",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "65cc74dd-bffb-4f71-8db8-0fb6e6ac36ef"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_26"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/29ee3893-b7d0-4420-a035-c990fc32eb1c",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "29ee3893-b7d0-4420-a035-c990fc32eb1c"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_48"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/f8fb2eaa-68f7-4a1a-8adb-37ba7b3d891e",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "f8fb2eaa-68f7-4a1a-8adb-37ba7b3d891e"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1702-126"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/c1fc2c47-4986-4d42-80c3-379d5252bdb1",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "c1fc2c47-4986-4d42-80c3-379d5252bdb1"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_40"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/e47d1154-03b4-44a1-8196-6fb947f4d4b3",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "e47d1154-03b4-44a1-8196-6fb947f4d4b3"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwOamNetVto.HNGWOAMNETVTO.OAM_net_26"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/09e0d15b-e36c-4bf5-8c2b-f4ce9256854f",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "09e0d15b-e36c-4bf5-8c2b-f4ce9256854f"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "oam-net"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/7b86609c-1c79-4329-bf21-15df6db1ffe0",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "7b86609c-1c79-4329-bf21-15df6db1ffe0"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "oam-net"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/c547848e-2617-4161-9154-1aa6cca60994",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "c547848e-2617-4161-9154-1aa6cca60994"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "oam-net"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/d348293a-2f7b-4925-bf21-fd59c2e52bfa",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "d348293a-2f7b-4925-bf21-fd59c2e52bfa"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_TEST_1702_A_int_HngwProtectedOam.OAM_net_32"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/92e7461d-358a-47a3-be5e-669dcf6400ef",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "92e7461d-358a-47a3-be5e-669dcf6400ef"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "oam-net"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/01c857bf-c75e-4f1c-886c-f651a8479037",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "01c857bf-c75e-4f1c-886c-f651a8479037"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-0509A"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/4cadeb8b-f258-436d-a998-de887f10d180",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "4cadeb8b-f258-436d-a998-de887f10d180"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-0511C"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/d9b00452-16c5-441f-9455-2954b93b7be7",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "d9b00452-16c5-441f-9455-2954b93b7be7"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-0512C"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/f170b669-031a-47ff-a545-61a5fbfaf884",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "f170b669-031a-47ff-a545-61a5fbfaf884"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_1Bindings_324_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/fb7ed40a-4c29-464c-a9d7-edc314802cc4",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "fb7ed40a-4c29-464c-a9d7-edc314802cc4"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-0512A"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/f901b9d6-3779-4f0d-a925-cb7e5e84650a",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "f901b9d6-3779-4f0d-a925-cb7e5e84650a"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-155"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/e901cbc9-b964-4e8f-a363-12fe30585526",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "e901cbc9-b964-4e8f-a363-12fe30585526"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Mobility_ATM_1707_int_HngwOamNetVto.HNGWOAMNETVTO.OAM_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/4a5b95a6-4659-406e-bd39-d7909fed055f",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "4a5b95a6-4659-406e-bd39-d7909fed055f"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-1707-ipv6-6001-badMask"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/7883684f-4ee0-460e-a277-0276e79fb8b8",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "7883684f-4ee0-460e-a277-0276e79fb8b8"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Mobility_ATM_1707_HnportalProviderNetwork.HNPortalPROVIDERNETWORK.SR_IOV_Provider2_1_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/da4d0845-1e2f-4d94-a66f-bca45242c12f",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "da4d0845-1e2f-4d94-a66f-bca45242c12f"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Mobility_ATM_1707_int_HngwOamNetVto.HNGWOAMNETVTO.OAM_net_29"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/c06bf62e-7c26-4c12-818f-927c3c25a38a",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "c06bf62e-7c26-4c12-818f-927c3c25a38a"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Mobility_ATM_1707_int_HngwOamNetVto.HNGWOAMNETVTO.OAM_net_2"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/b09885f5-afce-400c-84dc-0a2779fc3e21",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "b09885f5-afce-400c-84dc-0a2779fc3e21"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "ST-MTN6-NoBinding-1707-18-1000A"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/e746082a-41dc-40ec-a06e-d1138004902e",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "e746082a-41dc-40ec-a06e-d1138004902e"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1710-4001"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/f1c5642c-c7d8-4409-997f-b5b186d8892f",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "f1c5642c-c7d8-4409-997f-b5b186d8892f"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-119"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/51e3b192-31e3-4c3e-89a9-e1f2592e15fc",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "51e3b192-31e3-4c3e-89a9-e1f2592e15fc"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_Bindings_1802_1311"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/fc0ae18f-0a1f-4773-b387-5aed5b58fffb",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "fc0ae18f-0a1f-4773-b387-5aed5b58fffb"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_Bindings_1802_021618"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/0384d743-f69b-4cc8-9aa8-c3ae66662c44",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "0384d743-f69b-4cc8-9aa8-c3ae66662c44"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_Bindings_1802_020118"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/6ee51b6e-2b54-45cf-83f7-8bfa2c4ecaf3",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "6ee51b6e-2b54-45cf-83f7-8bfa2c4ecaf3"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_Dev_HostRoutes-1802-bns-2001"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/aaaa-bbbb-cccc-dddd-eeee",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "aaaa-bbbb-cccc-dddd-eeee"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "direct_dhcp_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/800bdc98-4326-4358-980d-e552e2105eaf",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "800bdc98-4326-4358-980d-e552e2105eaf"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "Dev_NoBinding-1707-0512B"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/b11eb5fc-082d-424a-a14c-f356d1ce611d",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "b11eb5fc-082d-424a-a14c-f356d1ce611d"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "DEV-1Binding-1710-0814-1000A"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/4636eea4-86a3-4cd3-806d-a63f29542ba3",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "4636eea4-86a3-4cd3-806d-a63f29542ba3"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "DEV-MTN6-NoBinding-1707-20-1000A"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/1111-2222-3333-4444-5555",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "1111-2222-3333-4444-5555"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MNS-25180-L-06Shared_OAM_PROTECTED_NET_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/67743f38-c2ac-4309-b81c-8b05381e5522",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "67743f38-c2ac-4309-b81c-8b05381e5522"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "dev_Bindings_full_1710_0907A"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/wwww-xxxx-yyyy-zzzz",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "wwww-xxxx-yyyy-zzzz"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MNS-25180-P-ALPSGA01_oam_direct_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "related-link": "/aai/v11/network/l3-networks/l3-network/ed885e04-ffe5-47fb-bb20-103e5e22ef89",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "ed885e04-ffe5-47fb-bb20-103e5e22ef89"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MSO_Dev_HostRoutes-1802-bns-1002"
+ }]
+ },
+ {
+ "related-to": "complex",
+ "related-link": "/aai/v11/cloud-infrastructure/complexes/complex/AUSTTXGR",
+ "relationship-data": [ {
+ "relationship-key": "complex.physical-location-id",
+ "relationship-value": "AUSTTXGR"
+ }]
+ }
+ ]}
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAINetworkTestResponse.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAINetworkTestResponse.json
new file mode 100644
index 0000000000..181494dff2
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAINetworkTestResponse.json
@@ -0,0 +1,141 @@
+{
+ "network-id": "467e3349-bec1-4922-bcb1-d0bb041bce30",
+ "network-name": "vprobes_pktinternal_net_4_1806",
+ "network-type": "CONTRAIL30_BASIC",
+ "network-role": "NetworkPktinternalInt2.pktinternal_int",
+ "network-technology": "",
+ "is-bound-to-vpn": false,
+ "service-id": "eb68dedb-840d-4bd4-a745-d9fcd8fc8468",
+ "network-role-instance": 0,
+ "resource-version": "1527285069624",
+ "orchestration-status": "Assigned",
+ "physical-network-name": "tbd",
+ "is-provider-network": false,
+ "is-shared-network": false,
+ "is-external-network": false,
+ "selflink": "restconf/config/GENERIC-RESOURCE-API:services/service/eb68dedb-840d-4bd4-a745-d9fcd8fc8468/service-data/networks/network/467e3349-bec1-4922-bcb1-d0bb041bce30/network-data/network-topology/",
+ "subnets": {
+ "subnet": [
+ {
+ "subnet-id": "46aee427-3aa0-4c1f-beb6-edf6caae2dc1",
+ "subnet-name": "vprobes_pktinternal_net_4_1806_subnet_1",
+ "gateway-address": "192.168.224.1",
+ "network-start-address": "192.168.224.0",
+ "cidr-mask": "21",
+ "ip-version": "4",
+ "orchestration-status": "PendingCreate",
+ "dhcp-enabled": false,
+ "dhcp-start": "192.168.224.3",
+ "dhcp-end": "192.168.224.5",
+ "subnet-role": "DHCP",
+ "ip-assignment-direction": "true",
+ "resource-version": "1527285068387",
+ "host-routes": {
+ "host-route": [
+ {
+ "host-route-id": "1de02743-580a-4f99-8285-3ba6eadb0892",
+ "route-prefix": "",
+ "next-hop": "",
+ "resource-version": "1527285059650"
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "relationship-list": {
+ "relationship": [
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.ComposedOf",
+ "related-link": "/aai/v12/business/customers/customer/a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb/service-subscriptions/service-subscription/Mobility/service-instances/service-instance/eb68dedb-840d-4bd4-a745-d9fcd8fc8468",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "Mobility"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "eb68dedb-840d-4bd4-a745-d9fcd8fc8468"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "eb68dedb-840d-4bd4-a745-d9fcd8fc8468"
+ }
+ ]
+ },
+ {
+ "related-to": "cloud-region",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/att-aic/DYH1A",
+ "relationship-data": [
+ {
+ "relationship-key": "cloud-region.cloud-owner",
+ "relationship-value": "att-aic"
+ },
+ {
+ "relationship-key": "cloud-region.cloud-region-id",
+ "relationship-value": "DYH1A"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "cloud-region.owner-defined-type",
+ "property-value": "lcp"
+ }
+ ]
+ },
+ {
+ "related-to": "tenant",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/att-aic/DYH1A/tenants/tenant/2871503957144f72b3cf481b379828ec",
+ "relationship-data": [
+ {
+ "relationship-key": "cloud-region.cloud-owner",
+ "relationship-value": "att-aic"
+ },
+ {
+ "relationship-key": "cloud-region.cloud-region-id",
+ "relationship-value": "DYH1A"
+ },
+ {
+ "relationship-key": "tenant.tenant-id",
+ "relationship-value": "2871503957144f72b3cf481b379828ec"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "tenant.tenant-name",
+ "property-value": "APP-C-24595-T-IST-04A"
+ }
+ ]
+ },
+ {
+ "related-to": "vpn-binding",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/vpn-bindings/vpn-binding/13e94b71-3ce1-4988-ab0e-61208fc91f1c",
+ "relationship-data": [
+ {
+ "relationship-key": "vpn-binding.vpn-id",
+ "relationship-value": "13e94b71-3ce1-4988-ab0e-61208fc91f1c"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "vpn-binding.vpn-name",
+ "property-value": "vMDNS"
+ },
+ {
+ "property-key": "vpn-binding.vpn-type"
+ }
+ ]
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAIResponse.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAIResponse.json
new file mode 100644
index 0000000000..b22f389c40
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAIResponse.json
@@ -0,0 +1,166 @@
+{
+ "network-id": "0384d743-f69b-4cc8-9aa8-c3ae66662c44",
+ "network-name": "Dev_Bindings_1802_020118",
+ "network-type": "CONTRAIL30_BASIC",
+ "network-role": "GN_EVPN_direct",
+ "network-technology": "contrail",
+ "neutron-network-id": "1112b912-0e00-4d6d-9392-014e106399ee",
+ "is-bound-to-vpn": true,
+ "service-id": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "network-role-instance": 0,
+ "resource-version": "1517496965485",
+ "orchestration-status": "Active",
+ "heat-stack-id": "Dev_Bindings_1802_020118/06c2445f-1ca1-4ad8-be08-454c4de443bb",
+ "contrail-network-fqdn": "default-domain:ECOMP_MSO_DND:Dev_Bindings_1802_020118",
+ "physical-network-name": "tbd",
+ "is-provider-network": false,
+ "is-shared-network": true,
+ "is-external-network": false,
+ "subnets": {"subnet": [
+ {
+ "subnet-id": "209f62cf-cf0c-42f8-b13c-f038b92ef108",
+ "subnet-name": "",
+ "neutron-subnet-id": "3942ca32-5f5b-4d62-a2e4-b528b7a4318c",
+ "gateway-address": "192.168.41.1",
+ "network-start-address": "192.168.41.0",
+ "cidr-mask": "24",
+ "ip-version": "4",
+ "orchestration-status": "Active",
+ "dhcp-enabled": true,
+ "dhcp-start": "192.168.41.3",
+ "dhcp-end": "192.168.41.45",
+ "ip-assignment-direction": "",
+ "resource-version": "1517496965497"
+ },
+ {
+ "subnet-id": "971bc608-1aff-47c0-923d-92e43b699f01",
+ "subnet-name": "",
+ "neutron-subnet-id": "81a5ff92-7ca4-4756-a493-496479f0d10f",
+ "gateway-address": "192.168.42.1",
+ "network-start-address": "192.168.42.0",
+ "cidr-mask": "24",
+ "ip-version": "4",
+ "orchestration-status": "Active",
+ "dhcp-enabled": true,
+ "dhcp-start": "192.168.42.3",
+ "dhcp-end": "192.168.42.45",
+ "ip-assignment-direction": "",
+ "resource-version": "1517496965508"
+ }
+ ]},
+ "relationship-list": {"relationship": [
+ {
+ "related-to": "service-instance",
+ "related-link": "/aai/v11/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/cc88915e-fb95-4b16-9c1e-a0abf40d1e40",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "MSO_1610_dev"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "MSO-dev-service-type"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "cc88915e-fb95-4b16-9c1e-a0abf40d1e40"
+ }
+ ],
+ "related-to-property": [ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "MSO-DEV-SI-1802-v6-2-01-nwk1"
+ }]
+ },
+ {
+ "related-to": "cloud-region",
+ "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn6",
+ "relationship-data": [
+ {
+ "relationship-key": "cloud-region.cloud-owner",
+ "relationship-value": "att-aic"
+ },
+ {
+ "relationship-key": "cloud-region.cloud-region-id",
+ "relationship-value": "mtn6"
+ }
+ ],
+ "related-to-property": [ {
+ "property-key": "cloud-region.owner-defined-type",
+ "property-value": "LCP"
+ }]
+ },
+ {
+ "related-to": "tenant",
+ "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn6/tenants/tenant/0422ffb57ba042c0800a29dc85ca70f8",
+ "relationship-data": [
+ {
+ "relationship-key": "cloud-region.cloud-owner",
+ "relationship-value": "att-aic"
+ },
+ {
+ "relationship-key": "cloud-region.cloud-region-id",
+ "relationship-value": "mtn6"
+ },
+ {
+ "relationship-key": "tenant.tenant-id",
+ "relationship-value": "0422ffb57ba042c0800a29dc85ca70f8"
+ }
+ ],
+ "related-to-property": [ {
+ "property-key": "tenant.tenant-name",
+ "property-value": "ECOMP_MSO_DND"
+ }]
+ },
+ {
+ "related-to": "route-table-reference",
+ "related-link": "/aai/v11/network/route-table-references/route-table-reference/c87fa27e-ac15-4b3e-b7ef-866682d8ca00",
+ "relationship-data": [ {
+ "relationship-key": "route-table-reference.route-table-reference-id",
+ "relationship-value": "c87fa27e-ac15-4b3e-b7ef-866682d8ca00"
+ }],
+ "related-to-property": [ {
+ "property-key": "route-table-reference.route-table-reference-fqdn",
+ "property-value": "default-domain:ECOMP_MSO_DND:RTA"
+ }]
+ },
+ {
+ "related-to": "network-policy",
+ "related-link": "/aai/v11/network/network-policies/network-policy/0219d83f-7c4a-48e2-b8fc-9b20459356bc",
+ "relationship-data": [ {
+ "relationship-key": "network-policy.network-policy-id",
+ "relationship-value": "0219d83f-7c4a-48e2-b8fc-9b20459356bc"
+ }],
+ "related-to-property": [ {
+ "property-key": "network-policy.network-policy-fqdn",
+ "property-value": "default-domain:ECOMP_MSO_DND:MSOPolicyD"
+ }]
+ },
+ {
+ "related-to": "network-policy",
+ "related-link": "/aai/v11/network/network-policies/network-policy/e7a3560c-8b29-4611-a404-83af0b31ce64",
+ "relationship-data": [ {
+ "relationship-key": "network-policy.network-policy-id",
+ "relationship-value": "e7a3560c-8b29-4611-a404-83af0b31ce64"
+ }],
+ "related-to-property": [ {
+ "property-key": "network-policy.network-policy-fqdn",
+ "property-value": "default-domain:ECOMP_MSO_DND:MSOPolicyC"
+ }]
+ },
+ {
+ "related-to": "vpn-binding",
+ "related-link": "/aai/v11/network/vpn-bindings/vpn-binding/9a7b327d9-287aa00-82c4b0-100001",
+ "relationship-data": [ {
+ "relationship-key": "vpn-binding.vpn-id",
+ "relationship-value": "9a7b327d9-287aa00-82c4b0-100001"
+ }],
+ "related-to-property": [
+ {
+ "property-key": "vpn-binding.vpn-name",
+ "property-value": "MSO_VPN_TEST"
+ },
+ {"property-key": "vpn-binding.vpn-type"}
+ ]
+ }
+ ]}
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAIResponseEmptyUri.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAIResponseEmptyUri.json
new file mode 100644
index 0000000000..c581e54ef0
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAIResponseEmptyUri.json
@@ -0,0 +1,53 @@
+{
+ "network-id": "0384d743-f69b-4cc8-9aa8-c3ae66662c44",
+ "network-name": "Dev_Bindings_1802_020118",
+ "network-type": "CONTRAIL30_BASIC",
+ "network-role": "GN_EVPN_direct",
+ "network-technology": "contrail",
+ "neutron-network-id": "1112b912-0e00-4d6d-9392-014e106399ee",
+ "is-bound-to-vpn": true,
+ "service-id": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "network-role-instance": 0,
+ "resource-version": "1517496965485",
+ "orchestration-status": "Active",
+ "heat-stack-id": "Dev_Bindings_1802_020118/06c2445f-1ca1-4ad8-be08-454c4de443bb",
+ "contrail-network-fqdn": "default-domain:ECOMP_MSO_DND:Dev_Bindings_1802_020118",
+ "physical-network-name": "tbd",
+ "is-provider-network": false,
+ "is-shared-network": true,
+ "is-external-network": false,
+ "subnets": {"subnet": [
+ {
+ "subnet-id": "209f62cf-cf0c-42f8-b13c-f038b92ef108",
+ "subnet-name": "",
+ "neutron-subnet-id": "3942ca32-5f5b-4d62-a2e4-b528b7a4318c",
+ "gateway-address": "192.168.41.1",
+ "network-start-address": "192.168.41.0",
+ "cidr-mask": "24",
+ "ip-version": "4",
+ "orchestration-status": "Active",
+ "dhcp-enabled": true,
+ "dhcp-start": "192.168.41.3",
+ "dhcp-end": "192.168.41.45",
+ "ip-assignment-direction": "",
+ "resource-version": "1517496965497"
+ },
+ {
+ "subnet-id": "971bc608-1aff-47c0-923d-92e43b699f01",
+ "subnet-name": "",
+ "neutron-subnet-id": "81a5ff92-7ca4-4756-a493-496479f0d10f",
+ "gateway-address": "192.168.42.1",
+ "network-start-address": "192.168.42.0",
+ "cidr-mask": "24",
+ "ip-version": "4",
+ "orchestration-status": "Active",
+ "dhcp-enabled": true,
+ "dhcp-start": "192.168.42.3",
+ "dhcp-end": "192.168.42.45",
+ "ip-assignment-direction": "",
+ "resource-version": "1517496965508"
+ }
+ ]},
+ "relationship-list": {"relationship": []
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAIVpnBindingTestResponse.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAIVpnBindingTestResponse.json
new file mode 100644
index 0000000000..5d9231d4c6
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryAAIVpnBindingTestResponse.json
@@ -0,0 +1,891 @@
+{
+ "vpn-id": "13e94b71-3ce1-4988-ab0e-61208fc91f1c",
+ "vpn-name": "vMDNS",
+ "resource-version": "1510956324462",
+ "relationship-list": {"relationship": [
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/b3376949-5487-4a74-9029-332c07720c07",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "b3376949-5487-4a74-9029-332c07720c07"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "vEPDG-FN-26642-T-01_hsl_fn_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/d0b8ecd3-aee4-48ba-8bc5-222d3fb08162",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "d0b8ecd3-aee4-48ba-8bc5-222d3fb08162"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A_Shared_oam_protected_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/34305bd0-ad54-4349-8567-6f65ea09e750",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "34305bd0-ad54-4349-8567-6f65ea09e750"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APP-C-DND_vEPDG-FN_swu_direct_fn_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/dfa4972a-ed82-43cd-98be-ed73bb3406a9",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "dfa4972a-ed82-43cd-98be-ed73bb3406a9"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A_Shared_EXN_INTERNET_NET_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/93556256-aa23-449d-a2fd-3a9c034f232a",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "93556256-aa23-449d-a2fd-3a9c034f232a"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A_CORE-NSD-TOAM0_net_0"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/7ce01c3a-5998-4908-85f6-ab29bc507a92",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "7ce01c3a-5998-4908-85f6-ab29bc507a92"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02B-VSHAKEN_CORE-NSD-TOAM0_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/016d3722-999b-4133-b4e6-8a1088bab664",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "016d3722-999b-4133-b4e6-8a1088bab664"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APP-C-DND-vepdg-FN-Shared_oam_protected_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/80038196-9eae-452c-ad06-1f3fef1bef9f",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "80038196-9eae-452c-ad06-1f3fef1bef9f"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APP-C-DND_VPMS-FN-26071-T-BE-01_cdr_direct_net420"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/f5f38447-dc62-4969-90a3-c60474f9c0ac",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "f5f38447-dc62-4969-90a3-c60474f9c0ac"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02B_Shared_OAM_DIRECT_NET_3"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/58b374aa-01ca-4a39-99b9-889c2f7ae908",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "58b374aa-01ca-4a39-99b9-889c2f7ae908"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A_OAM_MGMT_NET_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/efe0dfca-18e7-4992-a63a-041b9f8271e0",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "efe0dfca-18e7-4992-a63a-041b9f8271e0"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A_APN-dns_int_apn_dns_fn_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/dab7e704-6a6e-4c53-9a80-fb5857a43b6f",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "dab7e704-6a6e-4c53-9a80-fb5857a43b6f"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02B-VSHAKEN_CORE-NSD-TOAM0_net_0"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/634653b3-9084-41d9-ad6a-40863a3d666f",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "634653b3-9084-41d9-ad6a-40863a3d666f"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-01A_int_fw_dns_trusted_net_5"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/6117b35e-c029-4308-85e6-007c24014484",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "6117b35e-c029-4308-85e6-007c24014484"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APP-C-24595-D-T001_vprobes_int_mgmt_net_2"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/eb1ce51b-d10f-4b08-9166-345335b9f73b",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "eb1ce51b-d10f-4b08-9166-345335b9f73b"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A_OAMP_NSD_ISBC0_net_0"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/468f83be-4abb-4901-950b-e399b77a09a0",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "468f83be-4abb-4901-950b-e399b77a09a0"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A_IRPR-TOAM0_net_0"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/103d17dc-6575-427c-a2c1-301493e08ec0",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "103d17dc-6575-427c-a2c1-301493e08ec0"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A_segw_hsl_direct_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/305214f8-64be-4209-8a0d-10b6dfb77dd1",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "305214f8-64be-4209-8a0d-10b6dfb77dd1"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APP-C-DND_vMDS_FN_int_fw_dns_trusted_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/7989a6d2-ba10-4a5d-8f15-4520bc833090",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "7989a6d2-ba10-4a5d-8f15-4520bc833090"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02AShared_cor_direct_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/f040ebf4-76ad-4b05-a766-1deec26549ae",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "f040ebf4-76ad-4b05-a766-1deec26549ae"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "vEPDG-FN-26642-T-01_gn_untrusted_fn_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/26d6038b-4b9e-4fe5-bcff-9af7586651cc",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "26d6038b-4b9e-4fe5-bcff-9af7586651cc"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APP-C-24595-D-T001_vprobes_pktinternal_net_10"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/9e78d3f4-85b5-40b8-803e-c3a0ab6d6165",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "9e78d3f4-85b5-40b8-803e-c3a0ab6d6165"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APP-C-DND_MNS_Shared_oam_protected_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/a2de22f9-eb91-452e-aff5-e81a1a679ef6",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "a2de22f9-eb91-452e-aff5-e81a1a679ef6"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A_Shared_GN_DIRECT_NET_01"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/6d6b7254-72d2-4731-80d6-8e8375d959e9",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "6d6b7254-72d2-4731-80d6-8e8375d959e9"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A_VDBE-PED-DMZ0_net_0"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/21819ac4-95c4-490f-ba7c-0ad92920f805",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "21819ac4-95c4-490f-ba7c-0ad92920f805"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A_FN_int_pktinternal_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/98ff6827-320a-4b71-bd2b-df2bd20b6855",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "98ff6827-320a-4b71-bd2b-df2bd20b6855"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02B_Shared_oam_protected_net_2"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/e229ab86-279c-4505-a08a-91e373293e20",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "e229ab86-279c-4505-a08a-91e373293e20"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A_Shared_OAM_DIRECT_NET_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/bb722f93-2d1a-42a5-bd11-57ad30ff1085",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "bb722f93-2d1a-42a5-bd11-57ad30ff1085"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A_segw_hsl_direct_net_2"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/0399443d-1fc6-42a6-934c-77030d751916",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "0399443d-1fc6-42a6-934c-77030d751916"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APP-C-DND_VDBE-PED-DMZ0_net_0"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/d259ec74-304d-4bd2-bbd6-93c201acba42",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "d259ec74-304d-4bd2-bbd6-93c201acba42"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A__vprobes_int_mgmt_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/f69fb458-e2bd-4d0f-9a47-430d18cbebfd",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "f69fb458-e2bd-4d0f-9a47-430d18cbebfd"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APP-C-DND_VPMS-FN-26071-T-BE-01_cdr_direct_net4"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/0f18b91f-ee79-403b-a081-8c0a89650641",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "0f18b91f-ee79-403b-a081-8c0a89650641"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APP-C-DND_VPMS-FN_int_pktinternal_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/90fdbbbb-42bb-41ff-9356-db245466a4fc",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "90fdbbbb-42bb-41ff-9356-db245466a4fc"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A_Shared_oam_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/0e66adce-d5dd-4968-bcb2-83f0281424db",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "0e66adce-d5dd-4968-bcb2-83f0281424db"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02B-VSHAKEN_VDBF-MIS-UDAT0_net_0"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/db572383-dbd7-4d5e-93cb-8c7c1d209a90",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "db572383-dbd7-4d5e-93cb-8c7c1d209a90"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A_TRST_VIF_ISBC0_net_0"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/478b7f86-8544-48e5-95f1-568dfd18730d",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "478b7f86-8544-48e5-95f1-568dfd18730d"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02B_Shared_GN_DIRECT_NET_01"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/0f725895-5224-4016-b49a-d9d016eaafff",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "0f725895-5224-4016-b49a-d9d016eaafff"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02B_Shared_OAM_DIRECT_NET_2"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/9cd47b0c-ee58-46f0-9ec5-b4db504dd59b",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "9cd47b0c-ee58-46f0-9ec5-b4db504dd59b"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "MNS-FN-25180-T-01Shared_oam_protected_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/f95259c9-f5c6-4861-a9f4-b6eec199b33f",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "f95259c9-f5c6-4861-a9f4-b6eec199b33f"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02B_Shared_oam_protected_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/caf98ee4-2496-4c92-a41c-b6a50efcc29f",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "caf98ee4-2496-4c92-a41c-b6a50efcc29f"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A_MGM-CORE-NSD-TOAM0_net_0"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/754739cb-5371-4d5b-a02a-489587d17443",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "754739cb-5371-4d5b-a02a-489587d17443"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02B_Shared_OAM_DIRECT_NET_4"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/8cd7add8-0cfc-4f65-bbf8-d0f25a0dbc70",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "8cd7add8-0cfc-4f65-bbf8-d0f25a0dbc70"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APP-C-DND_VDBE-MIS-UDAT0_net_0"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/7093921f-bed8-4866-bb3c-a2b8c376ca69",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "7093921f-bed8-4866-bb3c-a2b8c376ca69"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A_VIRPR-TDAT0_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/691da8b2-805e-4dd1-aaf5-b0e37414c662",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "691da8b2-805e-4dd1-aaf5-b0e37414c662"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A_int_pktmirror_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/00eaa0b3-90df-4b43-a850-9d30abb7fded",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "00eaa0b3-90df-4b43-a850-9d30abb7fded"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-01AShared_oam_protected_net_5"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/6ba57200-c61a-46be-821b-88b3fa169b66",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "6ba57200-c61a-46be-821b-88b3fa169b66"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02B_OAM_MGMT_NET_3"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/8e32ec2c-47a1-4514-b21a-2806e23f0437",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "8e32ec2c-47a1-4514-b21a-2806e23f0437"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02B-VSHAKENb_VDBF-PSD-DMZ0_net_0"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/a755ddd0-512a-444d-9f38-97b3eff70f85",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "a755ddd0-512a-444d-9f38-97b3eff70f85"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A_UNTR_VSE_ISBC0_net_0"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/c7bde85d-1c12-467c-ae6f-57bdf5c1d380",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "c7bde85d-1c12-467c-ae6f-57bdf5c1d380"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02B-VSHAKENb_VDBF-PSD-DMZ0_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/0933fcec-9e78-4045-a21a-8258e18cb78e",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "0933fcec-9e78-4045-a21a-8258e18cb78e"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APP-C-DND_vdbe_oam_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/6a26a729-d9ce-4619-a20e-38597205ba7d",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "6a26a729-d9ce-4619-a20e-38597205ba7d"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "vEPDG-FN-26642-T-01_swu_direct_fn_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/c1a06665-518b-408b-bfe0-8f393204baf6",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "c1a06665-518b-408b-bfe0-8f393204baf6"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02B_OAM_MGMT_NET_2"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/fb51398b-7622-4570-9bd6-e29c82621d44",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "fb51398b-7622-4570-9bd6-e29c82621d44"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02B_OAM_MGMT_NET_4"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/92072731-1c40-45c2-a218-5e75b713b312",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "92072731-1c40-45c2-a218-5e75b713b312"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A_TRST_VIF_ISBC0_net_0001"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/c6d94632-fd6b-4bfe-993e-377b0368476b",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "c6d94632-fd6b-4bfe-993e-377b0368476b"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-01AShared_int_ha_net_5"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/84516ef3-e371-4039-908e-83cd2b55a4a1",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "84516ef3-e371-4039-908e-83cd2b55a4a1"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "VPMS-FN-26071-T-BE-01_vprobes_int_mgmt_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/2c4f3adc-1a45-4484-8fb6-9eeac99eb922",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "2c4f3adc-1a45-4484-8fb6-9eeac99eb922"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A_VDBE-MIS-UDAT0_net_0"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/1fea0624-dac2-4997-904d-34ca1bc12fa9",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "1fea0624-dac2-4997-904d-34ca1bc12fa9"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02AShared_cps_internal_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/8ab98982-05b7-45b2-828d-648da3d6cc0f",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "8ab98982-05b7-45b2-828d-648da3d6cc0f"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "vEPDG-FN-26642-T-01_swu_direct_fn_net_2"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/c8934d59-24a8-41cc-af9d-2026ef261843",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "c8934d59-24a8-41cc-af9d-2026ef261843"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APPC-24595-T-IST-02A_Shared_oam_protected_net_vrar_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/c741fe5b-bf27-4ad9-b30d-20518e115495",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "c741fe5b-bf27-4ad9-b30d-20518e115495"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APP-C-DND_int_apn_dns_fn_net_PB_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/8285fbae-ec25-44f7-ac52-89a968d45a2b",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "8285fbae-ec25-44f7-ac52-89a968d45a2b"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APP-C-T2B_vEPDG-FN_swu_direct_fn_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/65e6d4b0-0c96-4bfa-bdd6-2baa16df322a",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "65e6d4b0-0c96-4bfa-bdd6-2baa16df322a"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APP-C-DND_vEPDG-FN_gn_untrusted_fn_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/38e51c7b-adc2-491a-a036-3189645b007c",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "38e51c7b-adc2-491a-a036-3189645b007c"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "vprobes_pktinternal_net_2_1806"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/4d210b09-b6ce-41b3-95a6-5e4dffea9ca2",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "4d210b09-b6ce-41b3-95a6-5e4dffea9ca2"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "vprobes_pktinternal_net_3_1806"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/c5df1c57-3c85-4abc-973f-a1ffb13e391a",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "c5df1c57-3c85-4abc-973f-a1ffb13e391a"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APP-C-24595-T-IST-04AShared_untrusted_vDBE_net_1"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/467e3349-bec1-4922-bcb1-d0bb041bce30",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "467e3349-bec1-4922-bcb1-d0bb041bce30"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "vprobes_pktinternal_net_4_1806"
+ }]
+ },
+ {
+ "related-to": "l3-network",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v12/network/l3-networks/l3-network/1596f4d2-66b5-4627-96f2-c26794154530",
+ "relationship-data": [ {
+ "relationship-key": "l3-network.network-id",
+ "relationship-value": "1596f4d2-66b5-4627-96f2-c26794154530"
+ }],
+ "related-to-property": [ {
+ "property-key": "l3-network.network-name",
+ "property-value": "APP-C-24595-T-IST-04AShared_untrusted_vDBE_net_2"
+ }]
+ }
+ ]}
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryIdAAIResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryIdAAIResponse.xml
new file mode 100644
index 0000000000..6dd91c64c9
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/queryIdAAIResponse.xml
@@ -0,0 +1,145 @@
+<l3-network xmlns="http://org.onap.aai.inventory/v11">
+ <network-id>8d35a433-c1db-4d54-a611-6de10aeb76f9</network-id>
+ <network-name>Dev_Bindings_1802_1311</network-name>
+ <network-type>CONTRAIL30_BASIC</network-type>
+ <network-role>GN_EVPN_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <is-bound-to-vpn>true</is-bound-to-vpn>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <resource-version>1517430804756</resource-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <physical-network-name>tbd</physical-network-name>
+ <is-provider-network>true</is-provider-network>
+ <is-shared-network>true</is-shared-network>
+ <is-external-network>false</is-external-network>
+ <subnets>
+ <subnet>
+ <subnet-id>9dbb9e7e-fe18-421f-bad6-2305bd282471</subnet-id>
+ <subnet-name />
+ <gateway-address>107.118.41.1</gateway-address>
+ <network-start-address>107.118.41.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <dhcp-start>107.118.41.3</dhcp-start>
+ <dhcp-end>107.118.41.45</dhcp-end>
+ <subnet-role />
+ <ip-assignment-direction>true</ip-assignment-direction>
+ <resource-version>1517430804770</resource-version>
+ </subnet>
+ <subnet>
+ <subnet-id>1bb4e1d2-d225-47f3-b6fc-2d0b290de1ab</subnet-id>
+ <subnet-name />
+ <gateway-address>107.118.42.1</gateway-address>
+ <network-start-address>107.118.42.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <dhcp-start>107.118.42.3</dhcp-start>
+ <dhcp-end>107.118.42.45</dhcp-end>
+ <subnet-role />
+ <ip-assignment-direction>true</ip-assignment-direction>
+ <resource-version>1517430804782</resource-version>
+ </subnet>
+ </subnets>
+ <relationship-list>
+ <relationship>
+ <related-to>service-instance</related-to>
+ <related-link>/aai/v11/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/f1d1c7da-fc42-4c31-866e-cfe963e55723</related-link>
+ <relationship-data>
+ <relationship-key>customer.global-customer-id</relationship-key>
+ <relationship-value>MSO_1610_dev</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-subscription.service-type</relationship-key>
+ <relationship-value>MSO-dev-service-type</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-instance.service-instance-id</relationship-key>
+ <relationship-value>f1d1c7da-fc42-4c31-866e-cfe963e55723</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>service-instance.service-instance-name</property-key>
+ <property-value>MSO-DEV-SI-1802-v6-1-31-nwk1</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>cloud-region</related-to>
+ <related-link>/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn6</related-link>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>mtn6</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>cloud-region.owner-defined-type</property-key>
+ <property-value>LCP</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn6/tenants/tenant/0422ffb57ba042c0800a29dc85ca70f8</related-link>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>mtn6</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>0422ffb57ba042c0800a29dc85ca70f8</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>ECOMP_MSO_DND</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>network-policy</related-to>
+ <related-link>/aai/v11/network/network-policies/network-policy/0219d83f-7c4a-48e2-b8fc-9b20459356bc</related-link>
+ <relationship-data>
+ <relationship-key>network-policy.network-policy-id</relationship-key>
+ <relationship-value>0219d83f-7c4a-48e2-b8fc-9b20459356bc</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>network-policy.network-policy-fqdn</property-key>
+ <property-value>default-domain:ECOMP_MSO_DND:MSOPolicyD</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>network-policy</related-to>
+ <related-link>/aai/v11/network/network-policies/network-policy/e7a3560c-8b29-4611-a404-83af0b31ce64</related-link>
+ <relationship-data>
+ <relationship-key>network-policy.network-policy-id</relationship-key>
+ <relationship-value>e7a3560c-8b29-4611-a404-83af0b31ce64</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>network-policy.network-policy-fqdn</property-key>
+ <property-value>default-domain:ECOMP_MSO_DND:MSOPolicyC</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>/aai/v11/network/vpn-bindings/vpn-binding/9a7b327d9-287aa00-82c4b0-100001</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>9a7b327d9-287aa00-82c4b0-100001</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-name</property-key>
+ <property-value>MSO_VPN_TEST</property-value>
+ </related-to-property>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-type</property-key>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+</l3-network> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/unassignNetworkBB_queryAAIResponse_.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/unassignNetworkBB_queryAAIResponse_.json
new file mode 100644
index 0000000000..f076c9044c
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/unassignNetworkBB_queryAAIResponse_.json
@@ -0,0 +1,162 @@
+{
+ "network-id": "0384d743-f69b-4cc8-9aa8-c3ae66662c44",
+ "network-name": "Dev_Bindings_1802_020118",
+ "network-type": "CONTRAIL30_BASIC",
+ "network-role": "GN_EVPN_direct",
+ "network-technology": "contrail",
+ "neutron-network-id": "1112b912-0e00-4d6d-9392-014e106399ee",
+ "is-bound-to-vpn": true,
+ "service-id": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "network-role-instance": 0,
+ "resource-version": "1517496965485",
+ "orchestration-status": "Active",
+ "heat-stack-id": "Dev_Bindings_1802_020118/06c2445f-1ca1-4ad8-be08-454c4de443bb",
+ "contrail-network-fqdn": "default-domain:ECOMP_MSO_DND:Dev_Bindings_1802_020118",
+ "physical-network-name": "tbd",
+ "is-provider-network": false,
+ "is-shared-network": true,
+ "is-external-network": false,
+ "subnets": {"subnet": [
+ {
+ "subnet-id": "209f62cf-cf0c-42f8-b13c-f038b92ef108",
+ "subnet-name": "",
+ "neutron-subnet-id": "3942ca32-5f5b-4d62-a2e4-b528b7a4318c",
+ "gateway-address": "192.168.41.1",
+ "network-start-address": "192.168.41.0",
+ "cidr-mask": "24",
+ "ip-version": "4",
+ "orchestration-status": "Active",
+ "dhcp-enabled": true,
+ "dhcp-start": "192.168.41.3",
+ "dhcp-end": "192.168.41.45",
+ "ip-assignment-direction": "",
+ "resource-version": "1517496965497"
+ },
+ {
+ "subnet-id": "971bc608-1aff-47c0-923d-92e43b699f01",
+ "subnet-name": "",
+ "neutron-subnet-id": "81a5ff92-7ca4-4756-a493-496479f0d10f",
+ "gateway-address": "192.168.42.1",
+ "network-start-address": "192.168.42.0",
+ "cidr-mask": "24",
+ "ip-version": "4",
+ "orchestration-status": "Active",
+ "dhcp-enabled": true,
+ "dhcp-start": "192.168.42.3",
+ "dhcp-end": "192.168.42.45",
+ "ip-assignment-direction": "",
+ "resource-version": "1517496965508"
+ }
+ ]},
+ "relationship-list": {"relationship": [
+ {
+ "related-to": "service-instance",
+ "related-link": "/aai/v11/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/cc88915e-fb95-4b16-9c1e-a0abf40d1e40",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "MSO_1610_dev"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "MSO-dev-service-type"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "cc88915e-fb95-4b16-9c1e-a0abf40d1e40"
+ }
+ ],
+ "related-to-property": [ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "MSO-DEV-SI-1802-v6-2-01-nwk1"
+ }]
+ },
+ {
+ "related-to": "cloud-region",
+ "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn6",
+ "relationship-data": [
+ {
+ "relationship-key": "cloud-region.cloud-owner",
+ "relationship-value": "att-aic"
+ },
+ {
+ "relationship-key": "cloud-region.cloud-region-id",
+ "relationship-value": "mtn6"
+ }
+ ],
+ "related-to-property": [ {
+ "property-key": "cloud-region.owner-defined-type",
+ "property-value": "LCP"
+ }]
+ },
+ {
+ "related-to": "vf-module",
+ "related-link": "aai/v11/network/generic-vnfs/generic-vnf/105df7e5-0b3b-49f7-a837-4864b62827c4/vf-modules/vf-module/d9217058-95a0-49ee-b9a9-949259e89349",
+ "relationship-data": [
+ {
+ "relationship-key": "generic-vnf.vnf-id",
+ "relationship-value": "105df7e5-0b3b-49f7-a837-4864b62827c4"
+ },
+ {
+ "relationship-key": "vf-module.vf-module-id",
+ "relationship-value": "d9217058-95a0-49ee-b9a9-949259e89349"
+ }
+ ],
+ "related-to-property": [ {
+ "property-key": "tenant.tenant-name",
+ "property-value": "ECOMP_MSO_DND"
+ }]
+ },
+ {
+ "related-to": "route-table-reference",
+ "related-link": "/aai/v11/network/route-table-references/route-table-reference/c87fa27e-ac15-4b3e-b7ef-866682d8ca00",
+ "relationship-data": [ {
+ "relationship-key": "route-table-reference.route-table-reference-id",
+ "relationship-value": "c87fa27e-ac15-4b3e-b7ef-866682d8ca00"
+ }],
+ "related-to-property": [ {
+ "property-key": "route-table-reference.route-table-reference-fqdn",
+ "property-value": "default-domain:ECOMP_MSO_DND:RTA"
+ }]
+ },
+ {
+ "related-to": "network-policy",
+ "related-link": "/aai/v11/network/network-policies/network-policy/0219d83f-7c4a-48e2-b8fc-9b20459356bc",
+ "relationship-data": [ {
+ "relationship-key": "network-policy.network-policy-id",
+ "relationship-value": "0219d83f-7c4a-48e2-b8fc-9b20459356bc"
+ }],
+ "related-to-property": [ {
+ "property-key": "network-policy.network-policy-fqdn",
+ "property-value": "default-domain:ECOMP_MSO_DND:MSOPolicyD"
+ }]
+ },
+ {
+ "related-to": "network-policy",
+ "related-link": "/aai/v11/network/network-policies/network-policy/e7a3560c-8b29-4611-a404-83af0b31ce64",
+ "relationship-data": [ {
+ "relationship-key": "network-policy.network-policy-id",
+ "relationship-value": "e7a3560c-8b29-4611-a404-83af0b31ce64"
+ }],
+ "related-to-property": [ {
+ "property-key": "network-policy.network-policy-fqdn",
+ "property-value": "default-domain:ECOMP_MSO_DND:MSOPolicyC"
+ }]
+ },
+ {
+ "related-to": "vpn-binding",
+ "related-link": "/aai/v11/network/vpn-bindings/vpn-binding/9a7b327d9-287aa00-82c4b0-100001",
+ "relationship-data": [ {
+ "relationship-key": "vpn-binding.vpn-id",
+ "relationship-value": "9a7b327d9-287aa00-82c4b0-100001"
+ }],
+ "related-to-property": [
+ {
+ "property-key": "vpn-binding.vpn-name",
+ "property-value": "MSO_VPN_TEST"
+ },
+ {"property-key": "vpn-binding.vpn-type"}
+ ]
+ }
+ ]}
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/updateContrailAAIPayloadRequest.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/updateContrailAAIPayloadRequest.xml
new file mode 100644
index 0000000000..92fec2dc64
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/Network/updateContrailAAIPayloadRequest.xml
@@ -0,0 +1,149 @@
+<l3-network xmlns="http://org.onap.aai.inventory/v11">
+ <network-id>8d35a433-c1db-4d54-a611-6de10aeb76f9</network-id>
+ <network-name>Dev_Bindings_1802_1311</network-name>
+ <network-type>CONTRAIL30_BASIC</network-type>
+ <network-role>GN_EVPN_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <neutron-network-id>b6a7820c-4734-4ef2-8a73-a22c824423fa</neutron-network-id>
+ <is-bound-to-vpn>true</is-bound-to-vpn>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <resource-version>1517430804756</resource-version>
+ <orchestration-status>Created</orchestration-status>
+ <heat-stack-id>Dev_Bindings_1802_1311/ecf7e197-72db-452e-9eda-253cb642c9b7</heat-stack-id>
+ <contrail-network-fqdn>default-domain:ECOMP_MSO_DND:Dev_Bindings_1802_1311</contrail-network-fqdn>
+ <physical-network-name>tbd</physical-network-name>
+ <is-provider-network>true</is-provider-network>
+ <is-shared-network>true</is-shared-network>
+ <is-external-network>false</is-external-network>
+ <subnets>
+ <subnet>
+ <subnet-id>9dbb9e7e-fe18-421f-bad6-2305bd282471</subnet-id>
+ <neutron-subnet-id>27d414c7-1076-4595-aa45-4717ee992cef</neutron-subnet-id>
+ <gateway-address>107.118.41.1</gateway-address>
+ <network-start-address>107.118.41.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>Created</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <dhcp-start>107.118.41.3</dhcp-start>
+ <dhcp-end>107.118.41.45</dhcp-end>
+ <resource-version>1517430804770</resource-version>
+ <subnet-name/>
+ <ip-assignment-direction>true</ip-assignment-direction>
+ </subnet>
+ <subnet>
+ <subnet-id>1bb4e1d2-d225-47f3-b6fc-2d0b290de1ab</subnet-id>
+ <neutron-subnet-id>db64710c-fbbc-4dc9-8109-3925b87268fa</neutron-subnet-id>
+ <gateway-address>107.118.42.1</gateway-address>
+ <network-start-address>107.118.42.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>Created</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <dhcp-start>107.118.42.3</dhcp-start>
+ <dhcp-end>107.118.42.45</dhcp-end>
+ <resource-version>1517430804782</resource-version>
+ <subnet-name/>
+ <ip-assignment-direction>true</ip-assignment-direction>
+ </subnet>
+ </subnets>
+ <relationship-list>
+ <relationship>
+ <related-to>service-instance</related-to>
+ <related-link>/aai/v11/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/f1d1c7da-fc42-4c31-866e-cfe963e55723</related-link>
+ <relationship-data>
+ <relationship-key>customer.global-customer-id</relationship-key>
+ <relationship-value>MSO_1610_dev</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-subscription.service-type</relationship-key>
+ <relationship-value>MSO-dev-service-type</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-instance.service-instance-id</relationship-key>
+ <relationship-value>f1d1c7da-fc42-4c31-866e-cfe963e55723</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>service-instance.service-instance-name</property-key>
+ <property-value>MSO-DEV-SI-1802-v6-1-31-nwk1</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>cloud-region</related-to>
+ <related-link>/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn6</related-link>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>mtn6</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>cloud-region.owner-defined-type</property-key>
+ <property-value>LCP</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn6/tenants/tenant/0422ffb57ba042c0800a29dc85ca70f8</related-link>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>mtn6</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>0422ffb57ba042c0800a29dc85ca70f8</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>ECOMP_MSO_DND</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>network-policy</related-to>
+ <related-link>/aai/v11/network/network-policies/network-policy/0219d83f-7c4a-48e2-b8fc-9b20459356bc</related-link>
+ <relationship-data>
+ <relationship-key>network-policy.network-policy-id</relationship-key>
+ <relationship-value>0219d83f-7c4a-48e2-b8fc-9b20459356bc</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>network-policy.network-policy-fqdn</property-key>
+ <property-value>default-domain:ECOMP_MSO_DND:MSOPolicyD</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>network-policy</related-to>
+ <related-link>/aai/v11/network/network-policies/network-policy/e7a3560c-8b29-4611-a404-83af0b31ce64</related-link>
+ <relationship-data>
+ <relationship-key>network-policy.network-policy-id</relationship-key>
+ <relationship-value>e7a3560c-8b29-4611-a404-83af0b31ce64</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>network-policy.network-policy-fqdn</property-key>
+ <property-value>default-domain:ECOMP_MSO_DND:MSOPolicyC</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>/aai/v11/network/vpn-bindings/vpn-binding/9a7b327d9-287aa00-82c4b0-100001</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>9a7b327d9-287aa00-82c4b0-100001</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-name</property-key>
+ <property-value>MSO_VPN_TEST</property-value>
+ </related-to-property>
+ <related-to-property>
+ <property-key>vpn-binding.vpn-type</property-key>
+ <property-value/>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+</l3-network> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/sniroCallback2AR1Vnf b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/sniroCallback2AR1Vnf
new file mode 100644
index 0000000000..09634c199b
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/sniroCallback2AR1Vnf
@@ -0,0 +1,107 @@
+{
+ "transactionId": "testRequestId",
+ "requestId": "testRequestId",
+ "requestState": "complete",
+ "statusMessage": "",
+ "solutionInfo": {
+ "licenseInfo": [
+ {
+ "entitlementPoolList": [
+ "f1d563e8-e714-4393-8f99-cc480144a05e",
+ "j1d563e8-e714-4393-8f99-cc480144a05e"
+ ],
+ "licenseKeyGroupList": [
+ "s1d563e8-e714-4393-8f99-cc480144a05e",
+ "b1d563e8-e714-4393-8f99-cc480144a05e"
+ ],
+ "resourceModuleName": "vHNPortalaaS_primary_1",
+ "serviceResourceId": "testResourceIdAR"
+ },
+ {
+ "entitlementPoolList": [
+ "91d563e8-e714-4393-8f99-cc480144a05e",
+ "21d563e8-e714-4393-8f99-cc480144a05e"
+ ],
+ "licenseKeyGroupList": [
+ "31d563e8-e714-4393-8f99-cc480144a05e",
+ "71d563e8-e714-4393-8f99-cc480144a05e"
+ ],
+ "resourceModuleName": "vHNPortalaaS_secondary_1",
+ "serviceResourceId": "testResourceIdVNF"
+ }
+ ],
+ "placementInfo": [
+ {
+ "assignmentInfo": [
+ {
+ "variableName": "cloudOwner",
+ "variableValue": "aic"
+ },
+ {
+ "variableName": "vnfHostName",
+ "variableValue": "MDTNJ01"
+ },
+ {
+ "variableName": "aicClli",
+ "variableValue": "KDTNJ01"
+ },
+ {
+ "variableName": "aicVersion",
+ "variableValue": "3.0"
+ }
+ ],
+ "cloudRegionId": "dfwtx",
+ "inventoryType": "service",
+ "resourceModuleName": "ALLOTTED_RESOURCE",
+ "serviceInstanceId": "testSIID1",
+ "serviceResourceId": "testResourceIdAR"
+ },
+ {
+ "assignmentInfo": [
+ {
+ "variableName": "cloudOwner",
+ "variableValue": "aic"
+ },
+ {
+ "variableName": "vnfHostName",
+ "variableValue": "testVnfHostname2"
+ },
+ {
+ "variableName": "aicClli",
+ "variableValue": "testAicClli2"
+ },
+ {
+ "variableName": "aicVersion",
+ "variableValue": "3.0"
+ }
+ ],
+ "cloudRegionId": "testCloudRegionId2",
+ "inventoryType": "service",
+ "resourceModuleName": "ALLOTTED_RESOURCE",
+ "serviceInstanceId": "testSIID2",
+ "serviceResourceId": "testResourceIdAR2"
+ },
+ {
+ "assignmentInfo": [
+ {
+ "variableName": "cloudOwner",
+ "variableValue": "aic"
+ },
+ {
+ "variableName": "aicClli",
+ "variableValue": "testAicClli3"
+ },
+ {
+ "variableName": "aicVersion",
+ "variableValue": "3.0"
+ }
+ ],
+ "cloudRegionId": "testCloudRegionId3",
+ "inventoryType": "cloud",
+ "resourceModuleName": "VNF",
+ "serviceInstanceId": "",
+ "serviceResourceId": "testResourceIdVNF"
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/sniroCallback2AR1Vnf2Net b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/sniroCallback2AR1Vnf2Net
new file mode 100644
index 0000000000..ac9b466ab7
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/sniroCallback2AR1Vnf2Net
@@ -0,0 +1,165 @@
+{
+ "transactionId": "testRequestId",
+ "requestId": "testRequestId",
+ "requestState": "complete",
+ "statusMessage": "",
+ "solutionInfo": {
+ "licenseInfo": [
+ {
+ "entitlementPoolList": [
+ "f1d563e8-e714-4393-8f99-cc480144a05e",
+ "j1d563e8-e714-4393-8f99-cc480144a05e"
+ ],
+ "licenseKeyGroupList": [
+ "s1d563e8-e714-4393-8f99-cc480144a05e",
+ "b1d563e8-e714-4393-8f99-cc480144a05e"
+ ],
+ "resourceModuleName": "vHNPortalaaS_primary_1",
+ "serviceResourceId": "testResourceIdAR"
+ },
+ {
+ "entitlementPoolList": [
+ "f1d563e8-e714-4393-8f99-cc480144a05n",
+ "j1d563e8-e714-4393-8f99-cc480144a05n"
+ ],
+ "licenseKeyGroupList": [
+ "s1d563e8-e714-4393-8f99-cc480144a05n",
+ "b1d563e8-e714-4393-8f99-cc480144a05n"
+ ],
+ "resourceModuleName": "net",
+ "serviceResourceId": "testResourceIdNet2"
+ },
+ {
+ "entitlementPoolList": [
+ "91d563e8-e714-4393-8f99-cc480144a05e",
+ "21d563e8-e714-4393-8f99-cc480144a05e"
+ ],
+ "licenseKeyGroupList": [
+ "31d563e8-e714-4393-8f99-cc480144a05e",
+ "71d563e8-e714-4393-8f99-cc480144a05e"
+ ],
+ "resourceModuleName": "vHNPortalaaS_secondary_1",
+ "serviceResourceId": "testResourceIdVNF"
+ }
+ ],
+ "placementInfo": [
+ {
+ "assignmentInfo": [
+ {
+ "variableName": "cloudOwner",
+ "variableValue": "aic"
+ },
+ {
+ "variableName": "vnfHostName",
+ "variableValue": "MDTNJ01"
+ },
+ {
+ "variableName": "aicClli",
+ "variableValue": "KDTNJ01"
+ },
+ {
+ "variableName": "aicVersion",
+ "variableValue": "3.0"
+ }
+ ],
+ "cloudRegionId": "dfwtx",
+ "inventoryType": "service",
+ "resourceModuleName": "ALLOTTED_RESOURCE",
+ "serviceInstanceId": "testSIID1",
+ "serviceResourceId": "testResourceIdAR"
+ },
+ {
+ "assignmentInfo": [
+ {
+ "variableName": "cloudOwner",
+ "variableValue": "aic"
+ },
+ {
+ "variableName": "vnfHostName",
+ "variableValue": "testVnfHostname2"
+ },
+ {
+ "variableName": "aicClli",
+ "variableValue": "testAicClli2"
+ },
+ {
+ "variableName": "aicVersion",
+ "variableValue": "3.0"
+ }
+ ],
+ "cloudRegionId": "testCloudRegionId2",
+ "inventoryType": "service",
+ "resourceModuleName": "ALLOTTED_RESOURCE",
+ "serviceInstanceId": "testSIID2",
+ "serviceResourceId": "testResourceIdAR2"
+ },
+ {
+ "assignmentInfo": [
+ {
+ "variableName": "cloudOwner",
+ "variableValue": "aic"
+ },
+ {
+ "variableName": "vnfHostName",
+ "variableValue": "testVnfHostNameNet"
+ },
+ {
+ "variableName": "aicClli",
+ "variableValue": "testAicClliNet"
+ },
+ {
+ "variableName": "aicVersion",
+ "variableValue": "3.0"
+ }
+ ],
+ "cloudRegionId": "testCloudRegionIdNet",
+ "inventoryType": "service",
+ "resourceModuleName": "NETWORK",
+ "serviceInstanceId": "testServiceInstanceIdNet",
+ "serviceResourceId": "testResourceIdNet"
+ },
+ {
+ "assignmentInfo": [
+ {
+ "variableName": "cloudOwner",
+ "variableValue": "aic"
+ },
+ {
+ "variableName": "aicClli",
+ "variableValue": "testAicClliNet2"
+ },
+ {
+ "variableName": "aicVersion",
+ "variableValue": "3.0"
+ }
+ ],
+ "cloudRegionId": "testCloudRegionIdNet2",
+ "inventoryType": "cloud",
+ "resourceModuleName": "NETWORK",
+ "serviceInstanceId": "",
+ "serviceResourceId": "testResourceIdNet2"
+ },
+ {
+ "assignmentInfo": [
+ {
+ "variableName": "cloudOwner",
+ "variableValue": "aic"
+ },
+ {
+ "variableName": "aicClli",
+ "variableValue": "testAicClli3"
+ },
+ {
+ "variableName": "aicVersion",
+ "variableValue": "3.0"
+ }
+ ],
+ "cloudRegionId": "testCloudRegionId3",
+ "inventoryType": "cloud",
+ "resourceModuleName": "VNF",
+ "serviceInstanceId": "",
+ "serviceResourceId": "testResourceIdVNF"
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/sniroCallbackNoSolutionFound b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/sniroCallbackNoSolutionFound
new file mode 100644
index 0000000000..2150a053fb
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/sniroCallbackNoSolutionFound
@@ -0,0 +1,15 @@
+{
+ "requestState": "",
+ "responseTime": "",
+ "solutionInfo": {
+ "placementInfo": [],
+ "licenseInfo": {
+ "featureGroupId": ""
+ }
+ },
+ "percentProgress": "",
+ "requestId": "02c2e322-5839-4c97-9d46-0a5fa6bb642e",
+ "startTime": "",
+ "statusMessage": "No solution found for plan 08e1b8cf-144a-4bac-b293-d5e2eedc97e8",
+ "requestType": ""
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/sniroCallbackPolicyException b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/sniroCallbackPolicyException
new file mode 100644
index 0000000000..b82688428e
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/sniroCallbackPolicyException
@@ -0,0 +1,9 @@
+{
+ "requestError": {
+ "policyException": {
+ "requestId": "ae81d9a8-c949-493a-999c-f76c80503233",
+ "text": "Message content size exceeds the allowable limit",
+ "messageId": "SVC0001"
+ }
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/sniroCallbackServiceException b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/sniroCallbackServiceException
new file mode 100644
index 0000000000..6cc78a7cdb
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/BuildingBlocks/sniroCallbackServiceException
@@ -0,0 +1,12 @@
+{
+ "requestError": {
+ "serviceException": {
+ "variables": [
+ "severity", 400
+ ],
+ "requestId": "ae81d9a8-c949-493a-999c-f76c80503233",
+ "text": "SNIROPlacementError: requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http://135.21.171.200:8091/v1/plans/97b4e303-5f75-492c-8fb2-21098281c8b8",
+ "messageId": "SVC0001"
+ }
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/cloudRegion25_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/cloudRegion25_AAIResponse_Success.xml
new file mode 100644
index 0000000000..90c668c576
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/cloudRegion25_AAIResponse_Success.xml
@@ -0,0 +1,20 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <cloud-owner>att-aic</cloud-owner>
+ <cloud-region-id>RDM2WAGPLCP</cloud-region-id>
+ <cloud-region-version>2.5</cloud-region-version>
+ <complex-name>RDM2WAGPLCP</complex-name>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/cloudRegion30_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/cloudRegion30_AAIResponse_Success.xml
new file mode 100644
index 0000000000..9b651f25e3
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/cloudRegion30_AAIResponse_Success.xml
@@ -0,0 +1,20 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <cloud-owner>att-aic</cloud-owner>
+ <cloud-region-id>RDM2WAGPLCP</cloud-region-id>
+ <cloud-region-version>3.0</cloud-region-version>
+ <complex-name>RDM2WAGPLCP</complex-name>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetworkResponse_400.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetworkResponse_400.xml
new file mode 100644
index 0000000000..a5640b2b26
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetworkResponse_400.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<createNetworkError>
+<messageId>680bd458-5ec1-4a16-b77c-509022e53450</messageId><category>INTERNAL</category>
+<message>400 Bad Request: The server could not comply with the request since it is either malformed or otherwise incorrect., error.type=StackValidationFailed, error.message=Property error: : resources.network.properties: : Unknown Property network_ipam_refs_data</message>
+<rolledBack>true</rolledBack>
+</createNetworkError>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetworkResponse_500.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetworkResponse_500.xml
new file mode 100644
index 0000000000..02996a13ea
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetworkResponse_500.xml
@@ -0,0 +1,80 @@
+<html>
+ <head>
+ <title>JBoss Web/7.2.2.Final-redhat-1 - JBWEB000064: Error report
+ </title>
+ <style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
+ H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}
+ H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}
+ BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;}
+ B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}
+ P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A
+ {color : black;}A.name {color : black;}HR {color : #525D76;} -->
+ </style>
+ </head>
+ <body>
+ <h1>JBWEB000065: HTTP Status 500 - java.lang.NullPointerException</h1>
+ <HR size="1" noshade="noshade" />
+ <p>
+ <b>JBWEB000309: type</b>
+ JBWEB000066: Exception report
+ </p>
+ <p>
+ <b>JBWEB000068: message</b>
+ <u>java.lang.NullPointerException</u>
+ </p>
+ <p>
+ <b>JBWEB000069: description</b>
+ <u>JBWEB000145: The server encountered an internal error that
+ prevented it from fulfilling this request.
+ </u>
+ </p>
+ <p>
+ <b>JBWEB000070: exception</b>
+ <pre>org.jboss.resteasy.spi.UnhandledException:
+ java.lang.NullPointerException
+ org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:365)
+ org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:233)
+ org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:209)
+ org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:557)
+ org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:524)
+ org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:126)
+ org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
+ org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
+ org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
+ javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
+ org.onap.so.logger.LogFilter.doFilter(LogFilter.java:35)
+ </pre>
+ </p>
+ <p>
+ <b>JBWEB000071: root cause</b>
+ <pre>java.lang.NullPointerException
+ org.onap.so.adapters.network.NetworkAdapterRest$CreateNetworkVolumesTask.run(NetworkAdapterRest.java:128)
+ org.onap.so.adapters.network.NetworkAdapterRest.createNetwork(NetworkAdapterRest.java:64)
+ sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+ sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
+ sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+ java.lang.reflect.Method.invoke(Method.java:606)
+ org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:167)
+ org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:269)
+ org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:227)
+ org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:216)
+ org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:542)
+ org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:524)
+ org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:126)
+ org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
+ org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
+ org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
+ javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
+ org.onap.so.logger.LogFilter.doFilter(LogFilter.java:35)
+ </pre>
+ </p>
+ <p>
+ <b>JBWEB000072: note</b>
+ <u>JBWEB000073: The full stack trace of the root cause is available
+ in the JBoss Web/7.2.2.Final-redhat-1 logs.
+ </u>
+ </p>
+ <HR size="1" noshade="noshade" />
+ <h3>JBoss Web/7.2.2.Final-redhat-1</h3>
+ </body>
+</html> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetworkResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetworkResponse_Success.xml
new file mode 100644
index 0000000000..90177f1c6d
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetworkResponse_Success.xml
@@ -0,0 +1,24 @@
+<ns2:createNetworkResponse xmlns:ns2="http://org.onap.so/network"
+ xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <subnetIdMap>
+ <entry>
+ <key>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</key>
+ <value>bd8e87c6-f4e2-41b8-b0bc-9596aa00cd73</value>
+ </entry>
+ </subnetIdMap>
+ <rollback>
+ <cloudId>RDM2WAGPLCP</cloudId>
+ <msoRequest>
+ <requestId>1ef47428-cade-45bd-a103-0751e8b2deb0</requestId>
+ <serviceInstanceId/>
+ </msoRequest>
+ <networkCreated>true</networkCreated>
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <networkUpdated>false</networkUpdated>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ </rollback>
+</ns2:createNetworkResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryInstance_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryInstance_Success.xml
new file mode 100644
index 0000000000..ca5145c226
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryInstance_Success.xml
@@ -0,0 +1,4 @@
+<result-data>
+ <resource-type>service-instance</resource-type>
+ <resource-link>https://aai-conexus-e2e.test.com:8443/aai/v8/business/customers/customer/8310000058863/service-subscriptions/service-subscription/vMOG/service-instances/service-instance/f70e927b-6087-4974-9ef8-c5e4d5847ca4</resource-link>
+</result-data> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryName2_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryName2_AAIResponse_Success.xml
new file mode 100644
index 0000000000..d6f7737a2a
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryName2_AAIResponse_Success.xml
@@ -0,0 +1,62 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4_3</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <orchestration-status>pending-create</orchestration-status>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNameActive_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNameActive_AAIResponse_Success.xml
new file mode 100644
index 0000000000..03b37814b1
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNameActive_AAIResponse_Success.xml
@@ -0,0 +1,74 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_2</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <orchestration-status>active</orchestration-status>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>active</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <segmentation-assignments>
+ <segmentation-id>413</segmentation-id>
+ <resource-version>4132176</resource-version>
+ </segmentation-assignments>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryName_AAIResponse_404.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryName_AAIResponse_404.xml
new file mode 100644
index 0000000000..5cda12da2f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryName_AAIResponse_404.xml
@@ -0,0 +1,19 @@
+<rest:RESTFault xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ errorType="transport">
+ <rest:errorCode>404</rest:errorCode>
+ <rest:message>HTTP method: GET Not Found </rest:message>
+ <rest:messageDetails>&lt;Fault&gt;
+ &lt;requestError&gt;
+ &lt;serviceException&gt;
+ &lt;messageId&gt;SVC3001&lt;/messageId&gt;
+ &lt;text&gt;Resource not found for %1 using id %2 (msg=%3) (ec=%4)&lt;/text&gt;
+ &lt;variables&gt;
+ &lt;variable&gt;GETl3Networks&lt;/variable&gt;
+ &lt;variable xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/&gt;
+ &lt;variable&gt;Node Not Found:No Node of type l3Network found for properties: (network-id = null)&lt;/variable&gt;
+ &lt;variable&gt;ERR.5.4.6114&lt;/variable&gt;
+ &lt;/variables&gt;
+ &lt;/serviceException&gt;
+ &lt;/requestError&gt;
+&lt;/Fault&gt;</rest:messageDetails>
+</rest:RESTFault> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryName_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryName_AAIResponse_Success.xml
new file mode 100644
index 0000000000..4eadb1061e
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryName_AAIResponse_Success.xml
@@ -0,0 +1,62 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <orchestration-status>pending-create</orchestration-status>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_404.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_404.xml
new file mode 100644
index 0000000000..5cda12da2f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_404.xml
@@ -0,0 +1,19 @@
+<rest:RESTFault xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ errorType="transport">
+ <rest:errorCode>404</rest:errorCode>
+ <rest:message>HTTP method: GET Not Found </rest:message>
+ <rest:messageDetails>&lt;Fault&gt;
+ &lt;requestError&gt;
+ &lt;serviceException&gt;
+ &lt;messageId&gt;SVC3001&lt;/messageId&gt;
+ &lt;text&gt;Resource not found for %1 using id %2 (msg=%3) (ec=%4)&lt;/text&gt;
+ &lt;variables&gt;
+ &lt;variable&gt;GETl3Networks&lt;/variable&gt;
+ &lt;variable xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/&gt;
+ &lt;variable&gt;Node Not Found:No Node of type l3Network found for properties: (network-id = null)&lt;/variable&gt;
+ &lt;variable&gt;ERR.5.4.6114&lt;/variable&gt;
+ &lt;/variables&gt;
+ &lt;/serviceException&gt;
+ &lt;/requestError&gt;
+&lt;/Fault&gt;</rest:messageDetails>
+</rest:RESTFault> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_NoPayload_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_NoPayload_Success.xml
new file mode 100644
index 0000000000..e06d27ea88
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_NoPayload_Success.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <orchestration-status>pending-create</orchestration-status>
+ <physical-network-name>networkName</physical-network-name>
+ <is-provider-network>false</is-provider-network>
+ <is-shared-network>true</is-shared-network>
+ <is-external-network>false</is-external-network>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <segmentation-assignments>
+ <segmentation-id>413</segmentation-id>
+ <resource-version>4132176</resource-version>
+ </segmentation-assignments>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>network-policy</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg</related-link>
+ <relationship-data>
+ <relationship-key>network-policy.network-policy-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0cg</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+</l3-network>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_Success.xml
new file mode 100644
index 0000000000..6e319c4c73
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkId_AAIResponse_Success.xml
@@ -0,0 +1,110 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <orchestration-status>pending-create</orchestration-status>
+ <physical-network-name>networkName</physical-network-name>
+ <is-provider-network>false</is-provider-network>
+ <is-shared-network>true</is-shared-network>
+ <is-external-network>false</is-external-network>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ <ip-assignment-direction>true</ip-assignment-direction>
+ <host-routes>
+ <host-route>
+ <host-route-id>string</host-route-id>
+ <route-prefix>192.10.16.0/24</route-prefix>
+ <next-hop>192.10.16.100/24</next-hop>
+ <next-hop-type>ip-address</next-hop-type>
+ </host-route>
+ <host-route>
+ <host-route-id>string</host-route-id>
+ <route-prefix>192.110.17.0/24</route-prefix>
+ <next-hop>192.110.17.110/24</next-hop>
+ <next-hop-type>ip-address</next-hop-type>
+ </host-route>
+ </host-routes>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <segmentation-assignments>
+ <segmentation-id>413</segmentation-id>
+ <resource-version>4132176</resource-version>
+ </segmentation-assignments>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>network-policy</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg</related-link>
+ <relationship-data>
+ <relationship-key>network-policy.network-policy-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0cg</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN1</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN2</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkPolicy_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkPolicy_AAIResponse_Success.xml
new file mode 100644
index 0000000000..79cc14ada3
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkPolicy_AAIResponse_Success.xml
@@ -0,0 +1,21 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Mon,14 Mar 2016 20:53:33 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="localhost-20160314-20:53:33:487-134392"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <network-policy xmlns="http://org.openecomp.aai.inventory/v8">
+ <network-policy-id>9a7b327d9-287aa00-82c4b0-105757</network-policy-id>
+ <network-policy-fqdn>GN_EVPN_Test</network-policy-fqdn>
+ <heat-stack-id>13979:105757</heat-stack-id>
+ <resource-version>13979:105757</resource-version>
+ </network-policy>
+ </rest:payload>
+</rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkTableRef1_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkTableRef1_AAIResponse_Success.xml
new file mode 100644
index 0000000000..db134a1127
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkTableRef1_AAIResponse_Success.xml
@@ -0,0 +1,20 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Mon,14 Mar 2016 20:53:33 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="localhost-20160314-20:53:33:487-134392"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <route-table-references xmlns="http://org.openecomp.aai.inventory/v8">
+ <route-table-reference-id>5938baec-03ca-2bd5-a3f1-d54x123e253a</route-table-reference-id>
+ <route-table-reference-fqdn>refFQDN1</route-table-reference-fqdn>
+ <resource-version>12345</resource-version>
+ </route-table-references>
+ </rest:payload>
+</rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkTableRef2_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkTableRef2_AAIResponse_Success.xml
new file mode 100644
index 0000000000..34b4a036c4
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryNetworkTableRef2_AAIResponse_Success.xml
@@ -0,0 +1,20 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Mon,14 Mar 2016 20:53:33 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="localhost-20160314-20:53:33:487-134392"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <route-table-references xmlns="http://org.openecomp.aai.inventory/v8">
+ <route-table-reference-id>5938baec-03ca-2bd5-a3f1-d54x123e253a</route-table-reference-id>
+ <route-table-reference-fqdn>refFQDN2</route-table-reference-fqdn>
+ <resource-version>12345</resource-version>
+ </route-table-references>
+ </rest:payload>
+</rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryVpnBindingList_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryVpnBindingList_AAIResponse_Success.xml
new file mode 100644
index 0000000000..c01d0a4f61
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryVpnBindingList_AAIResponse_Success.xml
@@ -0,0 +1,57 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Mon,14 Mar 2016 20:53:33 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="localhost-20160314-20:53:33:487-134392"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <vpn-binding xmlns="http://org.openecomp.aai.inventory/v8">
+ <vpn-id>9a7b327d9-287aa00-82c4b0-105757</vpn-id>
+ <vpn-name>GN_EVPN_Test</vpn-name>
+ <route-targets>
+ <route-target>
+ <global-route-target>13979:105708</global-route-target>
+ <route-target-role>EXPORT</route-target-role>
+ <resource-version>1504025599510</resource-version>
+ </route-target>
+ <route-target>
+ <global-route-target>13979:105707</global-route-target>
+ <route-target-role>IMPORT</route-target-role>
+ <resource-version>1504025599519</resource-version>
+ </route-target>
+ </route-targets>
+ <relationship-list>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/l3-networks/l3-network/689ec39e-c5fc-4462-8db2-4f760763ad28/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>689ec39e-c5fc-4462-8db2-4f760763ad28</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/l3-networks/l3-network/1a49396b-19b3-40a4-8792-aa2fbd0f0704/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>1a49396b-19b3-40a4-8792-aa2fbd0f0704</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/l3-networks/l3-network/774f3329-3c83-4771-86c7-9e6207cd50fd/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>774f3329-3c83-4771-86c7-9e6207cd50fd</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </vpn-binding>
+ </rest:payload>
+</rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryVpnBinding_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryVpnBinding_AAIResponse_Success.xml
new file mode 100644
index 0000000000..5f1c2cafa5
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_queryVpnBinding_AAIResponse_Success.xml
@@ -0,0 +1,46 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Mon,14 Mar 2016 20:53:33 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="localhost-20160314-20:53:33:487-134392"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <vpn-binding xmlns="http://org.openecomp.aai.inventory/v8">
+ <vpn-id>9a7b327d9-287aa00-82c4b0-105757</vpn-id>
+ <vpn-name>GN_EVPN_Test</vpn-name>
+ <global-route-target>13979:105757</global-route-target>
+ <relationship-list>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/l3-networks/l3-network/689ec39e-c5fc-4462-8db2-4f760763ad28/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>689ec39e-c5fc-4462-8db2-4f760763ad28</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/l3-networks/l3-network/1a49396b-19b3-40a4-8792-aa2fbd0f0704/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>1a49396b-19b3-40a4-8792-aa2fbd0f0704</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/l3-networks/l3-network/774f3329-3c83-4771-86c7-9e6207cd50fd/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>774f3329-3c83-4771-86c7-9e6207cd50fd</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </vpn-binding>
+ </rest:payload>
+</rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_updateContrail_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_updateContrail_AAIResponse_Success.xml
new file mode 100644
index 0000000000..eedbda9343
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2/createNetwork_updateContrail_AAIResponse_Success.xml
@@ -0,0 +1,11 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <rest:header name="Content-Length" value="0"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:551-132672"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+</rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2mock/sdncCreateNetworkTopologyRsrcAssignResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2mock/sdncCreateNetworkTopologyRsrcAssignResponse.xml
new file mode 100644
index 0000000000..4f87e1a1da
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2mock/sdncCreateNetworkTopologyRsrcAssignResponse.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:v1="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <soapenv:Header />
+ <soapenv:Body>
+ <SDNCAdapterCallbackRequest xmlns="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <CallbackHeader>
+ <RequestId>79ec9006-3695-4fcc-93a8-be6f9e248beb</RequestId>
+ <ResponseCode>200</ResponseCode>
+ <ResponseMessage>OK</ResponseMessage>
+ </CallbackHeader>
+ <RequestData xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">&lt;output xmlns="org:onap:sdnc:northbound:generic-resource"&gt;&lt;response-message&gt;&lt;/response-message&gt;&lt;svc-request-id&gt;79ec9006-3695-4fcc-93a8-be6f9e248beb&lt;/svc-request-id&gt;&lt;service-response-information&gt;&lt;instance-id&gt;f805ec2b-b4d8-473e-8325-67f110139e5d&lt;/instance-id&gt;&lt;/service-response-information&gt;&lt;response-code&gt;200&lt;/response-code&gt;&lt;network-response-information&gt;&lt;instance-id&gt;49c86598-f766-46f8-84f8-8d1c1b10f9b4&lt;/instance-id&gt;&lt;object-path&gt;restconf/config/GENERIC-RESOURCE-API:services/service/f805ec2b-b4d8-473e-8325-67f110139e5d/service-data/networks/network/f7e4db56-aab5-4065-8e65-cec1cd1de24f&lt;/object-path&gt;&lt;/network-response-information&gt;&lt;ack-final-indicator&gt;Y&lt;/ack-final-indicator&gt;&lt;/output&gt;</RequestData>
+ </SDNCAdapterCallbackRequest>
+ </soapenv:Body>
+</soapenv:Envelope>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2mock/sdncCreateNetworkTopologySimResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2mock/sdncCreateNetworkTopologySimResponse.xml
new file mode 100644
index 0000000000..836b3c8055
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateNetworkV2mock/sdncCreateNetworkTopologySimResponse.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:v1="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <soapenv:Header />
+ <soapenv:Body>
+ <SDNCAdapterCallbackRequest xmlns="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <CallbackHeader>
+ <RequestId>testRequestId</RequestId>
+ <ResponseCode>200</ResponseCode>
+ <ResponseMessage>OK</ResponseMessage>
+ </CallbackHeader>
+ <RequestData xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:type="xs:string">&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;output xmlns="com:att:sdnctl:vnf"&gt;&lt;svc-request-id&gt;19174929-3809-49ca-89eb-17f84a035389&lt;/svc-request-id&gt;&lt;response-code&gt;200&lt;/response-code&gt;&lt;ack-final-indicator&gt;Y&lt;/ack-final-indicator&gt;&lt;network-information&gt;&lt;network-id&gt;49c86598-f766-46f8-84f8-8d1c1b10f9b4&lt;/network-id&gt;&lt;/network-information&gt;&lt;service-information&gt;&lt;service-type&gt;a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb&lt;/service-type&gt;&lt;service-instance-id&gt;HSL_direct_net_2&lt;/service-instance-id&gt;&lt;subscriber-name&gt;notsurewecare&lt;/subscriber-name&gt;&lt;/service-information&gt;&lt;/output&gt;</RequestData>
+ </SDNCAdapterCallbackRequest>
+ </soapenv:Body>
+</soapenv:Envelope>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateServiceInstance/DoCreateServiceInstanceInput.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateServiceInstance/DoCreateServiceInstanceInput.json
new file mode 100644
index 0000000000..45b09a1f59
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateServiceInstance/DoCreateServiceInstanceInput.json
@@ -0,0 +1,42 @@
+{
+"requestDetails": {
+"modelInfo": {
+"modelType": "service",
+"modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+"modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+"modelName": "Test",
+"modelVersion": "1.0"
+},
+"cloudConfiguration": {
+"lcpCloudRegionId": "mdt1",
+"tenantId": "88a6ca3ee0394ade9403f075db23167e"
+},
+"owningEntity": {
+"owningEntityId": "a",
+"owningEntityName": "a"
+},
+"project": {
+"projectName": "temp project"
+},
+"subscriberInfo": {
+"globalSubscriberId": "some subscriber id",
+"subscriberName": "some subscriber name"
+},
+"requestInfo": {
+"productFamilyId":"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+"source": "VID",
+"suppressRollback": true,
+"requestorId": "xxxxxx"
+},
+"requestParameters": {
+"subscriptionServiceType": "MOG",
+"aLaCarte": false,
+"userParams": [
+{
+"name": "someUserParam",
+"value": "someValue"
+}
+]
+}
+}
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateServiceInstance/SetupServiceDecompJson.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateServiceInstance/SetupServiceDecompJson.json
new file mode 100644
index 0000000000..e7960b7273
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateServiceInstance/SetupServiceDecompJson.json
@@ -0,0 +1,36 @@
+{
+ "requestDetails": {
+ "serviceInstance": {
+ "serviceInstanceId": "MSORefactorTest3",
+ "serviceInstanceName": "bensServiceInstance3",
+ "serviceType": "MSO-dev-service-type",
+ "serviceRole": "abc",
+ "modelInvariantUuid": "d214abcc-2083-11e7-93ae-92361f002671",
+ "modelUuid": "c4503baa-2083-11e7-93ae-92361f002671",
+ "modelVersion": "1.0",
+ "modelName": "MSOTADevInfra_vSAMP12_Service",
+ "environmentContext": "Luna",
+ "workloadContext": "Oxygen",
+ "orchestrationStatus": "ACTIVE"
+ },
+ "project": {
+ "projectName": "vSAMP12 Project"
+ },
+ "owningEntity": {
+ "owningEntityId": "MSO-Test-OE",
+ "owningEntityName": "MSO-Test123"
+ },
+ "customer": {
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "globalSubscriberId": "MSO_1610_dev"
+ },
+ "request": {
+ "sdncRequestId": "736c7370-640b-4f7a-975d-320f73340dd3",
+ "callbackURL": "abc",
+ "requestId": "223c2e74-a23a-4ab8-bddb-2c2431dcb67f",
+ "productFamilyId": "abc",
+ "callbackUrl": "http://localhost:8080/adapters/rest/SDNCNotify",
+ "serviceId": "123"
+ }
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateServiceInstance/createServiceInstance_createServiceInstance_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateServiceInstance/createServiceInstance_createServiceInstance_AAIResponse_Success.xml
new file mode 100644
index 0000000000..eedbda9343
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateServiceInstance/createServiceInstance_createServiceInstance_AAIResponse_Success.xml
@@ -0,0 +1,11 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <rest:header name="Content-Length" value="0"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:551-132672"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+</rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateServiceInstance/createServiceInstance_queryGlobalCustomerId_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateServiceInstance/createServiceInstance_queryGlobalCustomerId_AAIResponse_Success.xml
new file mode 100644
index 0000000000..be820b83b1
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateServiceInstance/createServiceInstance_queryGlobalCustomerId_AAIResponse_Success.xml
@@ -0,0 +1,62 @@
+<rest:RESTResponse
+ xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked" />
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT" />
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC" />
+ <rest:header name="X-AAI-TXID"
+ value="mtcnjv9aaas03-20160310-00:01:18:502-132671" />
+ <rest:header name="Content-Type" value="application/xml" />
+ <rest:header name="Server" value="Apache-Coyote/1.1" />
+ <rest:header name="Cache-Control" value="private" />
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <customer xmlns="http://org.openecomp.aai.inventory/v8">
+ <global-customer-id>8310000058863</global-customer-id>
+ <subscriber-name>Mobility</subscriber-name>
+ <subscriber-type>INFRA</subscriber-type>
+ <resource-version>1452288058</resource-version>
+ <service-subscriptions>
+ <service-subscription>
+ <service-type>vMOG</service-type>
+ <resource-version>1452288058</resource-version>
+ <service-instances>
+ <service-instance>
+ <service-instance-id>f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance-id>
+ <persona-model-id>gg0e927b-6087-5574-9ef8-c5e4d5847db5</persona-model-id>
+ <persona-model-version>V1.0</persona-model-version>
+ <service-instance-name>vMOG-AKRON-1234</service-instance-name>
+ <resource-version>1462561835</resource-version>
+ <relationship-list />
+ <metadata />
+ </service-instance>
+ </service-instances>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-conexus-e2e.test.com:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/tenants/tenant/396d61752cf04c3b8ca2afcb4ee049e9/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>396d61752cf04c3b8ca2afcb4ee049e9</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>AAIAIC25</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>vMOG-AKRON-PROD</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+ </service-subscription>
+ </service-subscriptions>
+ <relationship-list />
+ </customer>
+ </rest:payload>
+</rest:RESTResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/CreateVfModuleCallbackException.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/CreateVfModuleCallbackException.xml
new file mode 100644
index 0000000000..1ede44427a
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/CreateVfModuleCallbackException.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<volumeGroupException>
+ <messageId>{{MESSAGE-ID}}</messageId>
+ <category>INTERNAL</category>
+ <message>Exception during create VF Create VF Module: Unable to determine specific VF Module Type: Nimbus_LU2_PXMC_Svc/PXMC_09_20_2016_v2 3::Pxmc09202016V2..pxmc_base.yaml..module-2 with version = 3.0</message>
+ <rolledBack>true</rolledBack>
+</volumeGroupException> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/CreateVfModuleVolumeCallbackResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/CreateVfModuleVolumeCallbackResponse.xml
new file mode 100644
index 0000000000..a421355aba
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/CreateVfModuleVolumeCallbackResponse.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<createVolumeGroupResponse>
+ <messageId>{{MESSAGE-ID}}</messageId>
+ <volumeGroupCreated>true</volumeGroupCreated>
+ <volumeGroupId>d485ecee-957c-4a0a-8b95-27a22b90103f</volumeGroupId>
+ <volumeGroupOutputs>
+ <entry>
+ <key>mmsc_vol_1</key>
+ <value>a73e0fe9-1ce8-49c2-8fef-e2788605be29</value>
+ </entry>
+ <entry>
+ <key>mmsc_vol_2</key>
+ <value>37b6455a-5ea8-463a-89e3-0efeaf7b7c6d</value>
+ </entry>
+ <entry>
+ <key>nemsfe_vol_1</key>
+ <value>b7ff1c21-d138-49a3-bf13-4cfd91efaf48</value>
+ </entry>
+ <entry>
+ <key>nemsbe_vol_1</key>
+ <value>a5988471-cd42-44d8-b078-64f2f13d3d4c</value>
+ </entry>
+ <entry>
+ <key>mmsc_vol_5</key>
+ <value>f7b91c1e-ab8c-413a-a850-ba80a246c7e0</value>
+ </entry>
+ <entry>
+ <key>nemsfe_vol_2</key>
+ <value>957ea3f3-2d4a-4707-bfd2-ba66f42037c2</value>
+ </entry>
+ <entry>
+ <key>mmsc_vol_3</key>
+ <value>de6fccfe-d61a-48b0-b03b-87bf1bf749b3</value>
+ </entry>
+ <entry>
+ <key>mmsc_vol_4</key>
+ <value>76162310-2c38-4c32-981c-5c2880190077</value>
+ </entry>
+ </volumeGroupOutputs>
+ <volumeGroupRollback>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <messageId>e585e4f4-9452-437a-b294-45a2d6d3b7a3</messageId>
+ <msoRequest>
+ <requestId>c30b9453-4b68-4c2e-aacf-58a5ba648bf5</requestId>
+ <serviceInstanceId>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</serviceInstanceId>
+ </msoRequest>
+ <tenantId>1bbab536a19b4756926e7d0ec1eb543c</tenantId>
+ <volumeGroupCreated>true</volumeGroupCreated>
+ <volumeGroupId>78987</volumeGroupId>
+ <volumeGroupStackId>ZRDM1MMSC01_base_vol/7f74e5e1-5fc1-4593-ac7e-cc9899a106ef</volumeGroupStackId>
+ </volumeGroupRollback>
+ <volumeGroupStackId>ZRDM1MMSC01_base_vol/7f74e5e1-5fc1-4593-ac7e-cc9899a106ef</volumeGroupStackId>
+</createVolumeGroupResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/CreateVfModuleVolumeRequest.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/CreateVfModuleVolumeRequest.xml
new file mode 100644
index 0000000000..34604f1edd
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/CreateVfModuleVolumeRequest.xml
@@ -0,0 +1,24 @@
+<volume-request xmlns="http://org.onap/so/infra/vnf-request/v1" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <request-info>
+ <test-data-only>123abc</test-data-only> <!-- don't remove this tag. Its used for junit test -->
+ <request-id>d8d4fcfa-fd7e-4413-b19d-c95aa67291b8</request-id>
+ <action>CREATE_VF_MODULE_VOL</action>
+ <source>SoapUI-bns-create-base-vol-1001-1</source>
+ </request-info>
+ <volume-inputs>
+ <vnf-type>Test/vSAMP12</vnf-type>
+ <vf-module-model-name>vSAMP12::base::module-0</vf-module-model-name>
+ <backout-on-failure/>
+ <asdc-service-model-version/>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <aic-cloud-region>MDTWNJ21</aic-cloud-region>
+ <tenant-id>897deadc2b954a6bac6d3c197fb3525e</tenant-id>
+ <volume-group-name>MSOTESTVOL101a-vSAMP12_base_vol_module-0</volume-group-name>
+ <volume-group-id/>
+ </volume-inputs>
+ <volume-params>
+ <param name="param1">value1</param>"
+ <param name="param2">value2</param>"
+ <param name="param3">value3</param>"
+ </volume-params>
+</volume-request>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/GenericVnf.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/GenericVnf.xml
new file mode 100644
index 0000000000..aea1a46017
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/GenericVnf.xml
@@ -0,0 +1,38 @@
+<generic-vnf xmlns="http://org.openecomp.aai.inventory/v8">
+ <vnf-id>TEST-VNF-ID-0123</vnf-id>
+ <vnf-name>STMTN5MMSC20</vnf-name>
+ <vnf-type>pcrf-capacity</vnf-type>
+ <service-id>SDN-MOBILITY</service-id>
+ <equipment-role>vPCRF</equipment-role>
+ <orchestration-status>pending-create</orchestration-status>
+ <in-maint>false</in-maint>
+ <is-closed-loop-disabled>false</is-closed-loop-disabled>
+ <persona-model-id>introvert</persona-model-id>
+ <persona-model-version>2.0</persona-model-version>
+ <resource-version>0000020</resource-version>
+ <vf-modules>
+ <vf-module>
+ <vf-module-id>lukewarm</vf-module-id>
+ <vf-module-name>PCRF::module-0-0</vf-module-name>
+ <persona-model-id>introvert</persona-model-id>
+ <persona-model-version>2.0</persona-model-version>
+ <is-base-vf-module>true</is-base-vf-module>
+ <heat-stack-id>fastburn</heat-stack-id>
+ <orchestration-status>pending-create</orchestration-status>
+ <resource-version>0000074</resource-version>
+ </vf-module>
+ <vf-module>
+ <vf-module-id>supercool</vf-module-id>
+ <vf-module-name>PCRF::module-1-0</vf-module-name>
+ <persona-model-id>extrovert</persona-model-id>
+ <persona-model-version>2.0</persona-model-version>
+ <is-base-vf-module>false</is-base-vf-module>
+ <heat-stack-id>slowburn</heat-stack-id>
+ <orchestration-status>pending-create</orchestration-status>
+ <resource-version>0000075</resource-version>
+ </vf-module>
+ </vf-modules>
+ <relationship-list/>
+ <l-interfaces/>
+ <lag-interfaces/>
+</generic-vnf> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/RollbackVfModuleVolumeCallbackResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/RollbackVfModuleVolumeCallbackResponse.xml
new file mode 100644
index 0000000000..6ab9416617
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/RollbackVfModuleVolumeCallbackResponse.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<rollbackVolumeGroupResponse>
+ <messageId>{{MESSAGE-ID}}</messageId>
+ <volumeGroupRolledback>true</volumeGroupRolledback>
+</rollbackVolumeGroupResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_VID_request.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_VID_request.json
new file mode 100644
index 0000000000..6853daa4b1
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_VID_request.json
@@ -0,0 +1,71 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "volumeGroup",
+ "modelInvariantUuid": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12::base::module-0",
+ "modelVersion": "1",
+ "modelCustomizationUuid": "ee6478e5-ea33-3346-ac12-ab121484a3fe"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "MSOTESTVOL101a-vSAMP12_base_vol_module-0",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "{service-instance-id}",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantUuid": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "Test",
+ "modelVersion": "2.0"
+ }
+ }
+ }, {
+ "relatedInstance": {
+ "instanceId": "{vnf-instance-id}",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantUuid": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1",
+ "modelInstanceName": "vSAMP12"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "serviceId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "userParams": [
+ {"name": "vnfName", "value": "STMTN5MMSC20" },
+ {"name": "vnfName2", "value": "US1117MTSNJVBR0246" },
+ {"name": "vnfNmInformation", "value": "" },
+ {"name": "vnfType", "value": "pcrf-capacity" },
+ {"name": "vnfId", "value": "skask" },
+ {"name": "vnfStackId", "value": "slowburn" },
+ {"name": "vnfStatus", "value": "created" },
+ {"name": "aicCloudRegion", "value": "MDTWNJ21" },
+ {"name": "availabilityZone", "value": "slcp3-esx-az01" },
+ {"name": "oamNetworkName", "value": "VLAN-OAM-1323" },
+ {"name": "vmName", "value": "slcp34246vbc246ceb" },
+ {"name": "ipagNetworkId", "value": "970cd2b9-7f09-4a12-af47-182ea38ba1f0" },
+ {"name": "vpeNetworkId", "value": "545cc2c3-1930-4100-b534-5d82d0e12bb6" },
+ {"name": "vlc_sctp_b_route_prefixes",
+ "value": [
+ { "interface_route_table_routes_route_prefix": "107.239.41.163/32" },
+ { "interface_route_table_routes_route_prefix": "107.239.41.164/32" },
+ { "interface_route_table_routes_route_prefix": "107.239.41.165/32" }
+ ]}
+ ]
+ }
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_VID_request_noreqparm.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_VID_request_noreqparm.json
new file mode 100644
index 0000000000..de99a6da56
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_VID_request_noreqparm.json
@@ -0,0 +1,45 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "volumeGroup",
+ "modelId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12::base::module-0",
+ "modelVersion": "1"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "MSOTESTVOL101a-vSAMP12_base_vol_module-0",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "{service-instance-id}",
+ "modelInfo": {
+ "modelType": "service",
+ "modelId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "{parent service model name}",
+ "modelVersion": "1"
+ }
+ }
+ }, {
+ "relatedInstance": {
+ "instanceId": "{vnf-instance-id}",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "Test/vSAMP12",
+ "modelVersion": "1"
+ }
+ }
+ }
+ ]
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_createVolumeName_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_createVolumeName_AAIResponse_Success.xml
new file mode 100644
index 0000000000..02b43ff186
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_createVolumeName_AAIResponse_Success.xml
@@ -0,0 +1,49 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="X-CSI-Internal-WriteableRequest" value="true"/>
+ <rest:header name="X-CSI-MethodName" value="UNKNOWN"/>
+ <rest:header name="Content-Length" value="968"/>
+ <rest:header name="breadcrumbId" value="ID-mtsnjv9aaas23-44965-1459957053425-0-211465"/>
+ <rest:header name="X-CSI-UniqueTransactionId"
+ value="AjscCsiRestful28795@mtsnjv9aaas237d4a4d21-e60a-495f-935f-cc225dc3c847"/>
+ <rest:header name="User-Agent" value="Jakarta Commons-HttpClient/3.1"/>
+ <rest:header name="X-TransactionID" value="3a19f95d-d63e-4a8e-8b9c-6563895628aa"/>
+ <rest:header name="X-CSI-ServiceName" value="UNKNOWN"/>
+ <rest:header name="Server" value="Jetty(9.2.z-SNAPSHOT)"/>
+ <rest:header name="Cache-Control" value="no-cache,no-store"/>
+ <rest:header name="X-FromAppId" value="MSO"/>
+ <rest:header name="Date" value="Fri,08 Apr 2016 16:53:04 GMT"/>
+ <rest:header name="X-CSI-ConversationId"
+ value="ajscUser~CNG-CSI~c0a2bb44-2167-4e85-ad6a-483a24c0823a"/>
+ <rest:header name="volume-group-name" value="simpleCinderVolume_201604071"/>
+ <rest:header name="X-CSI-MessageId" value="f6d6eed4-456e-4033-be04-b17582902dc2"/>
+ <rest:header name="X-AAI-TXID" value="mtsnjv9aaas23-20160408-16:53:04:592-73255"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Accept" value="application/xml"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <volume-group xmlns="http://org.openecomp.aai.inventory/v8">
+ <volume-group-id>simpleCinderVolume_201604071</volume-group-id>
+ <volume-group-name>simpleCinderVolume_201604071</volume-group-name>
+ <heat-stack-id>simpleCinderVolume_201604071</heat-stack-id>
+ <vnf-type>simple_cinder_master</vnf-type>
+ <orchestration-status>Pending</orchestration-status>
+ <resource-version>1460134360</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v6/cloud-infrastructure/tenants/tenant/897deadc2b954a6bac6d3c197fb3525e/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>897deadc2b954a6bac6d3c197fb3525e</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>MSOTest1</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+ </volume-group>
+ </rest:payload>
+</rest:RESTResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_deleteVolumeName_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_deleteVolumeName_AAIResponse_Success.xml
new file mode 100644
index 0000000000..1574310474
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_deleteVolumeName_AAIResponse_Success.xml
@@ -0,0 +1,24 @@
+ <rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="X-CSI-Internal-WriteableRequest" value="true"/>
+ <rest:header name="X-CSI-MethodName" value="helloWorld-GetMethod(Logical)"/>
+ <rest:header name="Content-Length" value="0"/>
+ <rest:header name="breadcrumbId" value="ID-mtsnjv9aaas23-44965-1459957053425-0-211467"/>
+ <rest:header name="X-CSI-UniqueTransactionId"
+ value="AjscCsiRestful28795@mtsnjv9aaas23d44059bc-ef96-4af8-a28b-98044e08d7af"/>
+ <rest:header name="User-Agent" value="Jakarta Commons-HttpClient/3.1"/>
+ <rest:header name="X-TransactionID" value="3749995c-266b-4025-a0c4-4ce6983efc66"/>
+ <rest:header name="X-CSI-ServiceName" value="helloWorld"/>
+ <rest:header name="Server" value="Jetty(9.2.z-SNAPSHOT)"/>
+ <rest:header name="Cache-Control" value="no-cache,no-store"/>
+ <rest:header name="X-FromAppId" value="MSO"/>
+ <rest:header name="Date" value="Fri,08 Apr 2016 16:53:04 GMT"/>
+ <rest:header name="X-CSI-ConversationId"
+ value="ajscUser~CNG-CSI~bbd0e78f-d4e7-41be-b9ad-4a6767fa660a"/>
+ <rest:header name="X-CSI-MessageId" value="6ccfeb13-56da-4836-bfbd-5a42dee60939"/>
+ <rest:header name="X-AAI-TXID" value="mtsnjv9aaas23-20160408-16:53:04:629-73256"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Accept" value="application/xml"/>
+ </rest:headers>
+ </rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_queryVolumeName_AAIResponse_404.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_queryVolumeName_AAIResponse_404.xml
new file mode 100644
index 0000000000..96e906f9bf
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_queryVolumeName_AAIResponse_404.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<volume-group xmlns="http://org.openecomp.aai.inventory/v7">
+ <volume-group-id>94f0f72f-4be1-49ed-8410-702396797163</volume-group-id>
+ <volume-group-name>MSOTESTVOL103H-vSAMP12_base_vol_module-0</volume-group-name>
+ <heat-stack-id/>
+ <vnf-type>Test/vSAMP12</vnf-type>
+ <orchestration-status>Pending</orchestration-status>
+ <resource-version>1469203133</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v7/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn6/tenants/tenant/e444c311b27a45dc9522f2370d70f90f/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>e444c311b27a45dc9522f2370d70f90f</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>mtn6</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>MSOCustomer1</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+</volume-group>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_queryVolumeName_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_queryVolumeName_AAIResponse_Success.xml
new file mode 100644
index 0000000000..7aa9c3e8ac
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_queryVolumeName_AAIResponse_Success.xml
@@ -0,0 +1,50 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="X-CSI-Internal-WriteableRequest" value="true"/>
+ <rest:header name="X-CSI-MethodName" value="UNKNOWN"/>
+ <rest:header name="Content-Length" value="968"/>
+ <rest:header name="breadcrumbId" value="ID-mtsnjv9aaas23-44965-1459957053425-0-211465"/>
+ <rest:header name="X-CSI-UniqueTransactionId"
+ value="AjscCsiRestful28795@mtsnjv9aaas237d4a4d21-e60a-495f-935f-cc225dc3c847"/>
+ <rest:header name="User-Agent" value="Jakarta Commons-HttpClient/3.1"/>
+ <rest:header name="X-TransactionID" value="3a19f95d-d63e-4a8e-8b9c-6563895628aa"/>
+ <rest:header name="X-CSI-ServiceName" value="UNKNOWN"/>
+ <rest:header name="Server" value="Jetty(9.2.z-SNAPSHOT)"/>
+ <rest:header name="Cache-Control" value="no-cache,no-store"/>
+ <rest:header name="X-FromAppId" value="MSO"/>
+ <rest:header name="Date" value="Fri,08 Apr 2016 16:53:04 GMT"/>
+ <rest:header name="X-CSI-ConversationId"
+ value="ajscUser~CNG-CSI~c0a2bb44-2167-4e85-ad6a-483a24c0823a"/>
+ <rest:header name="volume-group-name" value="simpleCinderVolume_201604071"/>
+ <rest:header name="X-CSI-MessageId" value="f6d6eed4-456e-4033-be04-b17582902dc2"/>
+ <rest:header name="X-AAI-TXID" value="mtsnjv9aaas23-20160408-16:53:04:592-73255"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Accept" value="application/xml"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <volume-group xmlns="http://org.openecomp.aai.inventory/v8">
+ <volume-group-id>8424bb3c-c3e7-4553-9662-469649ed9379</volume-group-id>
+ <volume-group-name>MSOTESTVOL103W-vSAMP12_base_vol_module-0</volume-group-name>
+ <heat-stack-id/>
+ <vnf-type>simple_cinder_master</vnf-type>
+ <orchestration-status>Pending</orchestration-status>
+ <vf-module-model-customization-id>ee6478e5-ea33-3346-ac12-ab121484a3fe</vf-module-model-customization-id>
+ <resource-version>1460134360</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v6/cloud-infrastructure/tenants/tenant/897deadc2b954a6bac6d3c197fb3525e/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>897deadc2b954a6bac6d3c197fb3525e</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>MSOTest1</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+ </volume-group>
+ </rest:payload>
+</rest:RESTResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_updateVolumeName_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_updateVolumeName_AAIResponse_Success.xml
new file mode 100644
index 0000000000..1574310474
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_updateVolumeName_AAIResponse_Success.xml
@@ -0,0 +1,24 @@
+ <rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="X-CSI-Internal-WriteableRequest" value="true"/>
+ <rest:header name="X-CSI-MethodName" value="helloWorld-GetMethod(Logical)"/>
+ <rest:header name="Content-Length" value="0"/>
+ <rest:header name="breadcrumbId" value="ID-mtsnjv9aaas23-44965-1459957053425-0-211467"/>
+ <rest:header name="X-CSI-UniqueTransactionId"
+ value="AjscCsiRestful28795@mtsnjv9aaas23d44059bc-ef96-4af8-a28b-98044e08d7af"/>
+ <rest:header name="User-Agent" value="Jakarta Commons-HttpClient/3.1"/>
+ <rest:header name="X-TransactionID" value="3749995c-266b-4025-a0c4-4ce6983efc66"/>
+ <rest:header name="X-CSI-ServiceName" value="helloWorld"/>
+ <rest:header name="Server" value="Jetty(9.2.z-SNAPSHOT)"/>
+ <rest:header name="Cache-Control" value="no-cache,no-store"/>
+ <rest:header name="X-FromAppId" value="MSO"/>
+ <rest:header name="Date" value="Fri,08 Apr 2016 16:53:04 GMT"/>
+ <rest:header name="X-CSI-ConversationId"
+ value="ajscUser~CNG-CSI~bbd0e78f-d4e7-41be-b9ad-4a6767fa660a"/>
+ <rest:header name="X-CSI-MessageId" value="6ccfeb13-56da-4836-bfbd-5a42dee60939"/>
+ <rest:header name="X-AAI-TXID" value="mtsnjv9aaas23-20160408-16:53:04:629-73256"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Accept" value="application/xml"/>
+ </rest:headers>
+ </rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/getSIUrlById.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/getSIUrlById.xml
new file mode 100644
index 0000000000..416689e10c
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/getSIUrlById.xml
@@ -0,0 +1,6 @@
+ <search-results xmlns="http://org.openecomp.aai.inventory">
+ <result-data>
+ <resource-type>service-instance</resource-type>
+ <resource-link>https://aai-ext1.test.com:8443/aai/v7/business/customers/customer/SDN-ETHERNET-INTERNET/service-subscriptions/service-subscription/123456789/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET</resource-link>
+ </result-data>
+ </search-results> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_HasVfModRelationship.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_HasVfModRelationship.xml
new file mode 100644
index 0000000000..7e2a676283
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_HasVfModRelationship.xml
@@ -0,0 +1,62 @@
+<volume-group xmlns="http://com.att.aai.inventory/v8">
+ <volume-group-id>78987</volume-group-id>
+ <volume-group-name>MSOTESTVOL102a-vSAMP12_base_vol_module-0</volume-group-name>
+ <heat-stack-id/>
+ <vnf-type>Test/vSAMP12</vnf-type>
+ <orchestration-status>Pending</orchestration-status>
+ <resource-version>0000020</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>generic-vnf</related-to>
+ <related-link>https://localhost:8443/aai/v8/network/generic-vnfs/generic-vnf/9e48f6ea-f786-46de-800a-d480e5ccc846/</related-link>
+ <relationship-data>
+ <relationship-key>generic-vnf.vnf-id</relationship-key>
+ <relationship-value>9e48f6ea-f786-46de-800a-d480e5ccc846</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>generic-vnf.vnf-name</property-key>
+ <property-value>MSOSTSAMP12-10601</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://localhost:8443/aai/v7/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mdt1/tenants/tenant/fba1bd1e195a404cacb9ce17a9b2b421/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>fba1bd1e195a404cacb9ce17a9b2b421</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>mdt1</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>ECOMP_MDT1</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vf-module</related-to>
+ <related-link>https://localhost:8443/aai/v7/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mdt1/tenants/tenant/fba1bd1e195a404cacb9ce17a9b2b421/</related-link>
+ <relationship-data>
+ <relationship-key>vf-module.vf-module-id</relationship-key>
+ <relationship-value>fba1bd1e195a404cacb9ce17a9b2b421</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>mdt1</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>vf-module.vf-module-name</property-key>
+ <property-value>ECOMP_MDT1</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+</volume-group> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModule_VID_request.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModule_VID_request.json
new file mode 100644
index 0000000000..808e371191
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModule_VID_request.json
@@ -0,0 +1,77 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vfModule",
+ "modelInvariantUuid": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "STMTN5MMSC21-MMSC::model-1-0",
+ "modelVersion": "1",
+ "modelCustomizationUuid": "ee6478e5-ea33-3346-ac12-ab121484a3fe"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev_id",
+ "subscriberName": "MSO_1610_dev_name"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "MDTWNJ21",
+ "tenantId": "fba1bd1e195a404cacb9ce17a9b2b421"
+ },
+ "requestInfo": {
+ "instanceName": "PCRF::module-0-2",
+ "source": "VID",
+ "suppressRollback": true
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "17ef4658-bd1f-4ef0-9ca0-ea76e2bf122c",
+ "instanceName": "MSOTESTVOL103a-vSAMP12_base_module-0_vol",
+ "modelInfo": {
+ "modelType": "volumeGroup",
+ "modelInvariantUuid": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12..base..module-0",
+ "modelVersion": "1"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "123456",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantUuid": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "SERVICE_MODEL_NAME",
+ "modelVersion": "1.0"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "skask",
+ "instanceName": "skask-test",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantUuid": "skask",
+ "modelUuid": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelInstanceName": "vSAMP12 1"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "usePreload": true,
+ "aLaCarte": false,
+ "userParams": [{
+ "name": "vlc_sctp_b_route_prefixes",
+ "value": [
+ { "interface_route_table_routes_route_prefix": "107.239.41.163/32" },
+ { "interface_route_table_routes_route_prefix": "107.239.41.164/32" },
+ { "interface_route_table_routes_route_prefix": "107.239.41.165/32" }
+ ]}]
+ }
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModule_VID_request_noPreloads.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModule_VID_request_noPreloads.json
new file mode 100644
index 0000000000..b51741f879
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModule_VID_request_noPreloads.json
@@ -0,0 +1,79 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vfModule",
+ "modelInvariantUuid": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "STMTN5MMSC21-MMSC::model-1-0",
+ "modelVersion": "1",
+ "modelCustomizationUuid": "ee6478e5-ea33-3346-ac12-ab121484a3fe"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev_id",
+ "subscriberName": "MSO_1610_dev_name"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "MDTWNJ21",
+ "tenantId": "fba1bd1e195a404cacb9ce17a9b2b421"
+ },
+ "requestInfo": {
+ "instanceName": "PCRF::module-0-2",
+ "source": "VID",
+ "suppressRollback": true
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "17ef4658-bd1f-4ef0-9ca0-ea76e2bf122c",
+ "instanceName": "MSOTESTVOL103a-vSAMP12_base_module-0_vol",
+ "modelInfo": {
+ "modelType": "volumeGroup",
+ "modelInvariantUuid": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12..base..module-0",
+ "modelVersion": "1"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "123456",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantUuid": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "SERVICE_MODEL_NAME",
+ "modelVersion": "1.0"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "skask",
+ "instanceName": "skask-test",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantUuid": "skask",
+ "modelUuid": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelInstanceName": "vSAMP12 1"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "usePreload": false,
+ "userParams": [
+ {
+ "name": "someUserParam",
+ "value": "someValue"
+ },
+ {
+ "name": "sgi_protected_subnet_id",
+ "value": "thisissomefakevalue"
+ }
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModule_VID_request_userParam.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModule_VID_request_userParam.json
new file mode 100644
index 0000000000..68de099c16
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/CreateVfModule_VID_request_userParam.json
@@ -0,0 +1,77 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vfModule",
+ "modelInvariantUuid": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "STMTN5MMSC21-MMSC::model-1-0",
+ "modelVersion": "1",
+ "modelCustomizationUuid": "ee6478e5-ea33-3346-ac12-ab121484a3fe"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev_id",
+ "subscriberName": "MSO_1610_dev_name"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "MDTWNJ21",
+ "tenantId": "fba1bd1e195a404cacb9ce17a9b2b421"
+ },
+ "requestInfo": {
+ "instanceName": "PCRF::module-0-2",
+ "source": "VID",
+ "suppressRollback": true
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "17ef4658-bd1f-4ef0-9ca0-ea76e2bf122c",
+ "instanceName": "MSOTESTVOL103a-vSAMP12_base_module-0_vol",
+ "modelInfo": {
+ "modelType": "volumeGroup",
+ "modelInvariantUuid": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12..base..module-0",
+ "modelVersion": "1"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "123456",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantUuid": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "SERVICE_MODEL_NAME",
+ "modelVersion": "1.0"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "skask",
+ "instanceName": "skask-test",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantUuid": "skask",
+ "modelUuid": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelInstanceName": "vSAMP12 1"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "usePreload": true,
+ "aLaCarte": false,
+ "userParams": [{
+ "name": "vlc_sctp_b_route_prefixes",
+ "value": [
+ { "interface_route_table_routes_route_prefix": "107.239.41.163/32" },
+ { "interface_route_table_routes_route_prefix": "107.239.41.164/32" },
+ { "interface_route_table_routes_route_prefix": "107.239.41.165/32" }
+ ]}
+ ]}
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DBUpdateResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DBUpdateResponse.xml
new file mode 100644
index 0000000000..0942e09e31
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DBUpdateResponse.xml
@@ -0,0 +1,4 @@
+
+
+<ns2:updateRequestResponse xmlns:ns2="http://org.onap/requestsdb"
+ xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"/> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Database/DBAdapter.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Database/DBAdapter.xml
new file mode 100644
index 0000000000..5a36d741d0
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Database/DBAdapter.xml
@@ -0,0 +1 @@
+<DbTag>Notified</DbTag> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Database/DBUpdateResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Database/DBUpdateResponse.xml
new file mode 100644
index 0000000000..0ae5b79484
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Database/DBUpdateResponse.xml
@@ -0,0 +1,4 @@
+
+
+<ns2:updateRequestResponse xmlns:ns2="http://org.onap.so/requestsdb"
+ xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"/> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteGenericVNFV1/sdncAdapterResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteGenericVNFV1/sdncAdapterResponse.xml
new file mode 100644
index 0000000000..ca195324d3
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteGenericVNFV1/sdncAdapterResponse.xml
@@ -0,0 +1,7 @@
+<sdncadapterworkflow:SDNCAdapterWorkflowResponse xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
+ <sdncadapterworkflow:response-data>
+ <tag0:RequestData xmlns:tag0="http://org.onap/workflow/sdnc/adapter/schema/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">
+ &lt;output xmlns="org:onap:sdnctl:vnf"&gt;&lt;svc-request-id&gt;1660b8da-0a94-442d-8ed5-ea079e3c67c8&lt;/svc-request-id&gt;&lt;response-code&gt;200&lt;/response-code&gt;&lt;ack-final-indicator&gt;Y&lt;/ack-final-indicator&gt;&lt;vnf-information&gt;&lt;vnf-id&gt;8925b50d-de67-44c1-b984-e7ce7b0f4dae&lt;/vnf-id&gt;&lt;/vnf-information&gt;&lt;service-information&gt;&lt;service-type&gt;a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb&lt;/service-type&gt;&lt;service-instance-id&gt;8925b50d-de67-44c1-b984-e7ce7b0f4dae&lt;/service-instance-id&gt;&lt;subscriber-name&gt;notsurewecare&lt;/subscriber-name&gt;&lt;/service-information&gt;&lt;/output&gt;
+ </tag0:RequestData>
+ </sdncadapterworkflow:response-data>
+</sdncadapterworkflow:SDNCAdapterWorkflowResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2/cloudRegion25_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2/cloudRegion25_AAIResponse_Success.xml
new file mode 100644
index 0000000000..90c668c576
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2/cloudRegion25_AAIResponse_Success.xml
@@ -0,0 +1,20 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <cloud-owner>att-aic</cloud-owner>
+ <cloud-region-id>RDM2WAGPLCP</cloud-region-id>
+ <cloud-region-version>2.5</cloud-region-version>
+ <complex-name>RDM2WAGPLCP</complex-name>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2/cloudRegion30_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2/cloudRegion30_AAIResponse_Success.xml
new file mode 100644
index 0000000000..9b651f25e3
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2/cloudRegion30_AAIResponse_Success.xml
@@ -0,0 +1,20 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <cloud-owner>att-aic</cloud-owner>
+ <cloud-region-id>RDM2WAGPLCP</cloud-region-id>
+ <cloud-region-version>3.0</cloud-region-version>
+ <complex-name>RDM2WAGPLCP</complex-name>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2/deleteAAIResponse_Failure500_RESTFault.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2/deleteAAIResponse_Failure500_RESTFault.xml
new file mode 100644
index 0000000000..4ce7048950
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2/deleteAAIResponse_Failure500_RESTFault.xml
@@ -0,0 +1,19 @@
+<rest:RESTFault xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ errorType="transport">
+ <rest:errorCode>500</rest:errorCode>
+ <rest:message>HTTP method: GET Internal Server Error </rest:message>
+ <rest:messageDetails>&lt;Fault&gt;
+ &lt;requestError&gt;
+ &lt;serviceException&gt;
+ &lt;messageId&gt;SVC3002&lt;/messageId&gt;
+ &lt;text&gt;Error writing output performing %1 on %2 (msg=%3) (ec=%4)&lt;/text&gt;
+ &lt;variables&gt;
+ &lt;variable&gt;PUT customer&lt;/variable&gt;
+ &lt;variable&gt;SubName32&lt;/variable&gt;
+ &lt;variable&gt;Unexpected error reading/updating database:Adding this property for key [service-instance-id] and value [12312442454112] violates a uniqueness constraint [service-instance-id]&lt;/variable&gt;
+ &lt;variable&gt;ERR.5.4.5105&lt;/variable&gt;
+ &lt;/variables&gt;
+ &lt;/serviceException&gt;
+ &lt;/requestError&gt;
+&lt;/Fault&gt;</rest:messageDetails>
+</rest:RESTFault>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2/deleteNetworkAAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2/deleteNetworkAAIResponse_Success.xml
new file mode 100644
index 0000000000..c12bcd49c9
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2/deleteNetworkAAIResponse_Success.xml
@@ -0,0 +1,61 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Sat,30 Jan 2016 20:09:24 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="localhost-20160130-20:09:24:814-165843"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>HSL_direct_net_2</network-name>
+ <network-type>CONTRAIL_BASIC</network-type>
+ <network-role>HSL_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <neutron-network-id>8bbd3edf-b835-4610-96a2-a5cafa029042</neutron-network-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <orchestration-status>active</orchestration-status>
+ <heat-stack-id>HSL_direct_net_2/57594a56-1c92-4a38-9caa-641c1fa3d4b6</heat-stack-id>
+ <subnets>
+ <subnet>
+ <subnet-id>ea5f2a2c-604f-47ff-a9c5-253ee4f0ef0a</subnet-id>
+ <neutron-subnet-id>5a77fdc2-7789-4649-a1b9-6eaf1db1813a</neutron-subnet-id>
+ <gateway-address>172.16.34.1</gateway-address>
+ <network-start-address>172.16.34.0</network-start-address>
+ <cidr-mask>28</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>active</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/e81d842d3e8b45c5a59f57cd76af3aaf/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>e81d842d3e8b45c5a59f57cd76af3aaf</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>cloud-region</related-to>
+ <related-link>cloud-infrastructure/cloud-regions/cloud-region/att-aic/RDM2WAGPLCP/</related-link>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>RDM2WAGPLCP</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2/deleteNetworkAAIResponse_withRelationship_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2/deleteNetworkAAIResponse_withRelationship_Success.xml
new file mode 100644
index 0000000000..b108fb25ab
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2/deleteNetworkAAIResponse_withRelationship_Success.xml
@@ -0,0 +1,73 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Sat,30 Jan 2016 20:09:24 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="localhost-20160130-20:09:24:814-165843"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <network-id>bdc5efe8-404a-409b-85f6-0dcc9eebae30</network-id>
+ <network-name>HSL_direct_net_2</network-name>
+ <network-type>CONTRAIL_BASIC</network-type>
+ <network-role>HSL_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <neutron-network-id>8bbd3edf-b835-4610-96a2-a5cafa029042</neutron-network-id>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <orchestration-status>active</orchestration-status>
+ <heat-stack-id>HSL_direct_net_2/57594a56-1c92-4a38-9caa-641c1fa3d4b6</heat-stack-id>
+ <subnets>
+ <subnet>
+ <subnet-id>ea5f2a2c-604f-47ff-a9c5-253ee4f0ef0a</subnet-id>
+ <neutron-subnet-id>5a77fdc2-7789-4649-a1b9-6eaf1db1813a</neutron-subnet-id>
+ <gateway-address>172.16.34.1</gateway-address>
+ <network-start-address>172.16.34.0</network-start-address>
+ <cidr-mask>28</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>active</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/e81d842d3e8b45c5a59f57cd76af3aaf/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>e81d842d3e8b45c5a59f57cd76af3aaf</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vf-module</related-to>
+ <related-link>https://aai-app-e2e.ecomp.cci.com:8443/aai/v8/network/generic-vnfs/generic-vnf/105df7e5-0b3b-49f7-a837-4864b62827c4/vf-modules/vf-module/d9217058-95a0-49ee-b9a9-949259e89349/</related-link>
+ <relationship-data>
+ <relationship-key>generic-vnf.vnf-id</relationship-key>
+ <relationship-value>105df7e5-0b3b-49f7-a837-4864b62827c4</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>vf-module.vf-module-id</relationship-key>
+ <relationship-value>d9217058-95a0-49ee-b9a9-949259e89349</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>generic-vnf</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/generic-vnfs/generic-vnf/45f822d9-73ca-4255-9844-7cef401bbf47/</related-link>
+ <relationship-data>
+ <relationship-key>generic-vnf.vnf-id</relationship-key>
+ <relationship-value>45f822d9-73ca-4255-9844-7cef401bbf47</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>generic-vnf.vnf-name</property-key>
+ <property-value>zrdm1scpx05</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2mock/sdncDeleteNetworkTopologySimResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2mock/sdncDeleteNetworkTopologySimResponse.xml
new file mode 100644
index 0000000000..1d198caf5d
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2mock/sdncDeleteNetworkTopologySimResponse.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:v1="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <soapenv:Header />
+ <soapenv:Body>
+ <SDNCAdapterCallbackRequest xmlns="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <CallbackHeader>
+ <RequestId>19174929-3809-49ca-89eb-17f84a035389</RequestId>
+ <ResponseCode>200</ResponseCode>
+ <ResponseMessage>OK</ResponseMessage>
+ </CallbackHeader>
+ <RequestData xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:type="xs:string">&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;output xmlns="com:att:sdnctl:vnf"&gt;&lt;svc-request-id&gt;19174929-3809-49ca-89eb-17f84a035389&lt;/svc-request-id&gt;&lt;response-code&gt;200&lt;/response-code&gt;&lt;ack-final-indicator&gt;Y&lt;/ack-final-indicator&gt;&lt;network-information&gt;&lt;network-id&gt;bdc5efe8-404a-409b-85f6-0dcc9eebae30&lt;/network-id&gt;&lt;/network-information&gt;&lt;service-information&gt;&lt;service-type&gt;a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb&lt;/service-type&gt;&lt;service-instance-id&gt;HSL_direct_net_2&lt;/service-instance-id&gt;&lt;subscriber-name&gt;notsurewecare&lt;/subscriber-name&gt;&lt;/service-information&gt;&lt;/output&gt;</RequestData>
+ </SDNCAdapterCallbackRequest>
+ </soapenv:Body>
+</soapenv:Envelope>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2mock/sdncDeleteNetworkTopologySimResponse_noExtraTag.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2mock/sdncDeleteNetworkTopologySimResponse_noExtraTag.xml
new file mode 100644
index 0000000000..bc0eab88a7
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteNetworkV2mock/sdncDeleteNetworkTopologySimResponse_noExtraTag.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:v1="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <soapenv:Header />
+ <soapenv:Body>
+ <SDNCAdapterCallbackRequest xmlns="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <CallbackHeader>
+ <RequestId>19174929-3809-49ca-89eb-17f84a035389</RequestId>
+ <ResponseCode>200</ResponseCode>
+ <ResponseMessage>OK</ResponseMessage>
+ </CallbackHeader>
+ <RequestData xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:type="xs:string">&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;output xmlns="com:att:sdnctl:vnf"&gt;&lt;svc-request-id&gt;19174929-3809-49ca-89eb-17f84a035389&lt;/svc-request-id&gt;&lt;response-code&gt;200&lt;/response-code&gt;&lt;ack-final-indicator&gt;Y&lt;/ack-final-indicator&gt;&lt;network-information&gt;&lt;network-id&gt;bdc5efe8-404a-409b-85f6-0dcc9eebae30&lt;/network-id&gt;&lt;/network-information&gt;&lt;service-information&gt;&lt;service-type&gt;a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb&lt;/service-type&gt;&lt;service-instance-id&gt;HSL_direct_net_2&lt;/service-instance-id&gt;&lt;subscriber-name&gt;notsurewecare&lt;/subscriber-name&gt;&lt;/service-information&gt;&lt;/output&gt;</RequestData>
+ </SDNCAdapterCallbackRequest>
+ </soapenv:Body>
+</soapenv:Envelope>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteVfModuleCallbackResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteVfModuleCallbackResponse.xml
new file mode 100644
index 0000000000..74a3beb221
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteVfModuleCallbackResponse.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<deleteVfModuleResponse>
+ <messageId>86651f79-057e-4245-8f5f-174db3cef553-1502888133261</messageId>
+ <vfModuleDeleted>true</vfModuleDeleted>
+ <vfModuleId>20928949-5230-495d-86a6-f3690b9b5d60</vfModuleId>
+ <vfModuleOutputs>
+ <entry>
+ <key>shared_private_network_id</key>
+ <value>bcd04543-b3d7-4c64-a910-1735b875ebb2</value>
+ </entry>
+ <entry>
+ <key>server1_port</key>
+ <value>d1605e82-50ba-4544-9f8d-a8a37b678046</value>
+ </entry>
+ <entry>
+ <key>vnf_id</key>
+ <value>7da56895-6be1-4bec-856b-525e0e573199</value>
+ </entry>
+ </vfModuleOutputs>
+ <vnfId>7da56895-6be1-4bec-856b-525e0e573199</vnfId>
+</deleteVfModuleResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteVfModuleVolumeInfraV1/DeleteVfModuleVolumeCallbackResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteVfModuleVolumeInfraV1/DeleteVfModuleVolumeCallbackResponse.xml
new file mode 100644
index 0000000000..25aa45afd9
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteVfModuleVolumeInfraV1/DeleteVfModuleVolumeCallbackResponse.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<deleteVolumeGroupResponse>
+ <messageId>{{MESSAGE-ID}}</messageId>
+ <volumeGroupDeleted>true</volumeGroupDeleted>
+</deleteVolumeGroupResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteVfModuleVolumeInfraV1/deleteVfModuleVolume_VID_request_st.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteVfModuleVolumeInfraV1/deleteVfModuleVolume_VID_request_st.json
new file mode 100644
index 0000000000..c6cc1ca428
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteVfModuleVolumeInfraV1/deleteVfModuleVolume_VID_request_st.json
@@ -0,0 +1,17 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "volumeGroup",
+ "modelInvariantUuid": "0b01b8c2-8416-11e6-ae22-56b6b6499611",
+ "modelName": "vSAMP12::base::module-0",
+ "modelVersion": "1.0"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "MDTWNJ21",
+ "tenantId": "fba1bd1e195a404cacb9ce17a9b2b421"
+ },
+ "requestInfo": {
+ "source": "VID"
+ }
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_Success.xml
new file mode 100644
index 0000000000..fd10548cef
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_Success.xml
@@ -0,0 +1,42 @@
+<volume-group xmlns="http://org.openecomp.aai.inventory/v8">
+ <volume-group-id>78987</volume-group-id>
+ <volume-group-name>MSOTESTVOL102a-vSAMP12_base_vol_module-0</volume-group-name>
+ <heat-stack-id/>
+ <vnf-type>Test/vSAMP12</vnf-type>
+ <orchestration-status>Pending</orchestration-status>
+ <resource-version>0000020</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>generic-vnf</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/network/generic-vnfs/generic-vnf/9e48f6ea-f786-46de-800a-d480e5ccc846/</related-link>
+ <relationship-data>
+ <relationship-key>generic-vnf.vnf-id</relationship-key>
+ <relationship-value>9e48f6ea-f786-46de-800a-d480e5ccc846</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>generic-vnf.vnf-name</property-key>
+ <property-value>MSOSTSAMP12-10601</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v7/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mdt1/tenants/tenant/fba1bd1e195a404cacb9ce17a9b2b421/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>fba1bd1e195a404cacb9ce17a9b2b421</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>mdt1</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>ECOMP_MDT1</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+</volume-group> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteVfModule_VID_request.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteVfModule_VID_request.json
new file mode 100644
index 0000000000..c75c32d498
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DeleteVfModule_VID_request.json
@@ -0,0 +1,50 @@
+{
+"requestDetails": {
+"modelInfo": {
+"modelType": "vfModule",
+"modelInvariantId": "973ed047-d251-4fb9-bf1a-65b8949e0a73",
+"modelNameVersionId": "973ed047-d251-4fb9-bf1a-65b8949e0a73",
+"modelName": "STMTN5MMSC21-MMSC::model-1-0",
+"modelVersion": "1"
+},
+"cloudConfiguration": {
+"lcpCloudRegionId": "MDTWNJ21",
+"tenantId": "fba1bd1e195a404cacb9ce17a9b2b421"
+},
+"requestInfo": {
+"instanceId": "973ed047-d251-4fb9-bf1a-65b8949e0a73",
+"source": "VID",
+"suppressRollback": true
+},
+"relatedInstanceList": [
+{
+"relatedInstance": {
+"instanceId": "00000000-0000-0000-0000-000000000000",
+"modelInfo": {
+"modelType": "service",
+"modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+"modelNameVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+"modelName": "SERVICE_MODEL_NAME",
+"modelVersion": "1.0"
+}
+}
+},
+{
+"relatedInstance": {
+"instanceId": "a27ce5a9-29c4-4c22-a017-6615ac73c721",
+"modelInfo": {
+"modelType": "vnf",
+"modelInvariantId": "skask",
+"modelNameVersionId": "a27ce5a9-29c4-4c22-a017-6615ac73c721",
+"modelName": "vSAMP12",
+"modelVersion": "1.0",
+"modelCustomizationName": "vSAMP12 1"
+}
+}
+}
+],
+"requestParameters": {
+"userParams": {}
+}
+}
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule/DoCreateVfModuleRequest.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule/DoCreateVfModuleRequest.xml
new file mode 100644
index 0000000000..4aaa56f79a
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule/DoCreateVfModuleRequest.xml
@@ -0,0 +1,31 @@
+<vnf-request xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
+ <request-info>
+ <request-id>test-VF-0011</request-id>
+ <action>CREATE_VF_MODULE</action>
+ <source>VID</source>
+ <service-instance-id>MIS/1604/0026/SW_INTERNET</service-instance-id>
+ </request-info>
+ <vnf-inputs>
+ <vnf-id>skask</vnf-id>
+ <vnf-name>STMTN5MMSC20</vnf-name>
+ <vnf-type>myvnftype</vnf-type>
+ <vf-module-name>PCRF::module-0-2</vf-module-name>
+ <vf-module-model-name>STMTN5MMSC21-MMSC::model-1-0</vf-module-model-name>
+ <persona-model-id>00000000-0000-0000-0000-000000000000</persona-model-id>
+ <persona-model-version>1.0</persona-model-version>
+ <service-id>00000000-0000-0000-0000-000000000000</service-id>
+ <aic-cloud-region>MDTWNJ21</aic-cloud-region>
+ <tenant-id>fba1bd1e195a404cacb9ce17a9b2b421</tenant-id>
+ <volume-group-id>78987</volume-group-id>
+ </vnf-inputs>
+ <vnf-params xmlns:tns="http://ecomp.att.com/mso/infra/vnf-request/v1">
+ <param name="vnf_instance_name">STMTN5MMSC20</param>
+ <param name="tenant_id">vpe-tenant-123</param>
+ <param name="aic_cloud_region">MDTWNJ21</param>
+ <param name="is_avpn_service">false</param>
+ <param name="asn">asn-1234</param>
+ <param name="release_for_aero">release-for-aero-something</param>
+ <param name="aic_clli">MTJWNJA4LCP</param>
+ <param name="svc_provider_part_number">svc-provide-number-1234</param>
+ </vnf-params>
+</vnf-request> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule/cloudRegion_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule/cloudRegion_AAIResponse_Success.xml
new file mode 100644
index 0000000000..90c668c576
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule/cloudRegion_AAIResponse_Success.xml
@@ -0,0 +1,20 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <cloud-owner>att-aic</cloud-owner>
+ <cloud-region-id>RDM2WAGPLCP</cloud-region-id>
+ <cloud-region-version>2.5</cloud-region-version>
+ <complex-name>RDM2WAGPLCP</complex-name>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule/createVnfARequest.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule/createVnfARequest.xml
new file mode 100644
index 0000000000..f78d38f802
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule/createVnfARequest.xml
@@ -0,0 +1,169 @@
+<createVfModuleRequest>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <tenantId>fba1bd1e195a404cacb9ce17a9b2b421</tenantId>
+ <vnfId>skask</vnfId>
+ <vnfName>skask-test</vnfName>
+ <vfModuleName>PCRF::module-0-2</vfModuleName>
+ <vfModuleId>cb510af0-5b21-4bc7-86d9-323cb396ce32</vfModuleId>
+ <vnfType>vRRaas</vnfType>
+ <vfModuleType>PCRF::module-0-2</vfModuleType>
+ <vnfVersion>1.0</vnfVersion>
+ <modelCustomizationUuid>cb510af0-5b21-4bc7-86d9-323cb396ced3</modelCustomizationUuid>
+ <requestType></requestType>
+ <volumeGroupId>12345</volumeGroupId>
+ <volumeGroupStackId>null</volumeGroupStackId>
+ <baseVfModuleId>null</baseVfModuleId>
+ <baseVfModuleStackId>12345</baseVfModuleStackId>
+ <skipAAI>true</skipAAI>
+ <backout>12345</backout>
+ <failIfExists>true</failIfExists>
+ <vfModuleParams>
+ <entry>
+ <key>vf_module_id</key>
+ <value>cb510af0-5b21-4bc7-86d9-323cb396ce32</value>
+ </entry>
+ <entry>
+ <key>vrra_Internal-Network1_ips</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>ADIG_SRIOV_2_subnet_id</key>
+ <value></value>
+ </entry>
+ <entry>
+ <key>vrra_ADIGOam.OAM_v6_ips</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>vnf_name</key>
+ <value>skask-test</value>
+ </entry>
+ <entry>
+ <key>ADIGOam.OAM_v6_subnet_id</key>
+ <value></value>
+ </entry>
+ <entry>
+ <key>workload_context</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>vf_module_name</key>
+ <value>PCRF::module-0-2</value>
+ </entry>
+ <entry>
+ <key>vnf_id</key>
+ <value>skask</value>
+ </entry>
+ <entry>
+ <key>ADIG_SRIOV_2_v6_subnet_id</key>
+ <value></value>
+ </entry>
+ <entry>
+ <key>vrra_ADIG_SRIOV_1_ips</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>ADIG_SRIOV_1_v6_subnet_id</key>
+ <value></value>
+ </entry>
+ <entry>
+ <key>ADIG_SRIOV_1_subnet_id</key>
+ <value></value>
+ </entry>
+ <entry>
+ <key>ADIG_SRIOV_2_net_name</key>
+ <value>ADIG_SRIOV_2</value>
+ </entry>
+ <entry>
+ <key>ADIGOam.OAM_subnet_id</key>
+ <value></value>
+ </entry>
+ <entry>
+ <key>ADIGOam.OAM_net_id</key>
+ <value>491c7cef-a3f4-4990-883e-b0af397466d0</value>
+ </entry>
+ <entry>
+ <key>environment_context</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>ADIG_SRIOV_1_net_fqdn</key>
+ <value></value>
+ </entry>
+ <entry>
+ <key>ADIGOam.OAM_net_name</key>
+ <value>ADIGOAM.OAM</value>
+ </entry>
+ <entry>
+ <key>vrra_name_0</key>
+ <value>frkdevRvrra24</value>
+ </entry>
+ <entry>
+ <key>vrra_ADIG_SRIOV_2_ips</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>ADIG_SRIOV_2_net_fqdn</key>
+ <value></value>
+ </entry>
+ <entry>
+ <key>vrra_Internal-Network2_ips</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>ADIG_SRIOV_1_net_name</key>
+ <value>ADIG_SRIOV_1</value>
+ </entry>
+ <entry>
+ <key>vrra_ADIG_SRIOV_1_v6_ips</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>vrra_ADIGOam.OAM_ips</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>vrra_Internal-Network1_v6_ips</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>ADIGOam.OAM_net_fqdn</key>
+ <value></value>
+ </entry>
+ <entry>
+ <key>vrra_names</key>
+ <value>frkdevRvrra24</value>
+ </entry>
+ <entry>
+ <key>ADIG_SRIOV_1_net_id</key>
+ <value>491c7cef-a3f4-4990-883e-b0af397466d0</value>
+ </entry>
+ <entry>
+ <key>vrra_Internal-Network2_v6_ips</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>vrra_ADIG_SRIOV_2_v6_ips</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>ADIG_SRIOV_2_net_id</key>
+ <value>491c7cef-a3f4-4990-883e-b0af397466d0</value>
+ </entry>
+ <entry>
+ <key>vf_module_index</key>
+ <value>index</value>
+ </entry>
+ <entry>
+ <key>availability_zone_0</key>
+ <value>frkde-esx-az01</value>
+ </entry>
+
+ </vfModuleParams>
+ <msoRequest>
+ <requestId>testRequestId</requestId>
+ <serviceInstanceId>MIS/1604/0026/SW_INTERNET</serviceInstanceId>
+ </msoRequest>
+ <messageId>testRequestId-1503410089303-1513204371234</messageId>
+ <notificationUrl>http://localhost:28080/mso/WorkflowMesssage/VNFAResponse/testRequestId-1503410089303-1513204371234</notificationUrl>
+</createVfModuleRequest> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule/getGenericVnfResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule/getGenericVnfResponse.xml
new file mode 100644
index 0000000000..be5130ead8
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule/getGenericVnfResponse.xml
@@ -0,0 +1,28 @@
+<generic-vnf xmlns="http://com.att.aai.inventory/v10">
+ <vnf-id>6d2e2469-8708-47c3-a0d4-73fa28a8a50b</vnf-id>
+ <vnf-name>STMTN5MMSC20</vnf-name>
+ <vnf-type>pcrf-capacity</vnf-type>
+ <service-id>SDN-MOBILITY</service-id>
+ <equipment-role>vPCRF</equipment-role>
+ <orchestration-status>created</orchestration-status>
+ <in-maint>false</in-maint>
+ <is-closed-loop-disabled>false</is-closed-loop-disabled>
+ <persona-model-id>introvert</persona-model-id>
+ <persona-model-version>2.0</persona-model-version>
+ <resource-version>0000020</resource-version>
+ <vf-modules>
+ <vf-module>
+ <vf-module-id>baseVfModuleId</vf-module-id>
+ <vf-module-name>PCRF::module-0-0</vf-module-name>
+ <persona-model-id>introvert</persona-model-id>
+ <persona-model-version>2.0</persona-model-version>
+ <is-base-vf-module>false</is-base-vf-module>
+ <heat-stack-id>baseVfModuleHeatStackId</heat-stack-id>
+ <orchestration-status>Created</orchestration-status>
+ <resource-version>0000074</resource-version>
+ </vf-module>
+ </vf-modules>
+ <relationship-list/>
+ <l-interfaces/>
+ <lag-interfaces/>
+</generic-vnf> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule/sdncGetResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule/sdncGetResponse.xml
new file mode 100644
index 0000000000..20b5462729
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule/sdncGetResponse.xml
@@ -0,0 +1,195 @@
+<response-data>
+ <tag0CallbackHeader>
+ <tag0RequestId>2681784d-118e-4485-929f-2ae3212f5c07-1507707098467</tag0RequestId>
+ <tag0ResponseCode>200</tag0ResponseCode>
+ <tag0ResponseMessage>OK</tag0ResponseMessage>
+ </tag0CallbackHeader>
+ <tag0RequestData>
+ <service-list>
+ <service-instance-id>vnfID-1712_26</service-instance-id>
+ <service-status>
+ <response-code>200</response-code>
+ <request-status>synccomplete</request-status>
+ <response-timestamp>2017-09-19T143942.327Z</response-timestamp>
+ <final-indicator>Y</final-indicator>
+ <rpc-name>activate-vnf-request</rpc-name>
+ </service-status>
+ <service-data>
+ <service-information>
+ <service-type>vRRaaS</service-type>
+ <service-instance-id>vnfID-1712_26</service-instance-id>
+ </service-information>
+ <request-information>
+ <request-id>ae322537-d081-4a01-95a5-c1448116d0c5</request-id>
+ </request-information>
+ <ipsec-tunnel-parameters/>
+ <vnf-topology-information>
+ <vnf-assignments>
+ <availability-zones>
+ <availability-zone>frkde-esx-az01</availability-zone>
+ </availability-zones>
+ <vnf-vms>
+ <vm-type>vrra</vm-type>
+ <vm-count>1</vm-count>
+ <vm-networks>
+ <network-role>ADIGOam.OAM</network-role>
+ <network-name>ADIGOAM.OAM</network-name>
+ <v4-assigned-ip-list>
+ <v4-ip-type>NMLAN</v4-ip-type>
+ <ipv4-gateway-prefix>10.66.132.113</ipv4-gateway-prefix>
+ <v4-ip-prefix>10.66.132.115</v4-ip-prefix>
+ <v4-ip-prefix-length>32</v4-ip-prefix-length>
+ <v4-ip-source>EIPAM</v4-ip-source>
+ </v4-assigned-ip-list>
+ <network-id>VPEADIG1d77c-1086-41ec-b7f3-94bb30936807</network-id>
+ </vm-networks>
+ <vm-networks>
+ <network-role>ADIG_SRIOV_1</network-role>
+ <network-name>ADIG_SRIOV_1</network-name>
+ <network-id>VPEADIG1d77c-1086-41ec-b7f3-94bb30936808</network-id>
+ <vlan-filter>[,]</vlan-filter>
+ </vm-networks>
+ <vm-networks>
+ <network-role>ADIG_SRIOV_2</network-role>
+ <network-name>ADIG_SRIOV_2</network-name>
+ <network-id>VPEADIG1d77c-1086-41ec-b7f3-94bb30936809</network-id>
+ <vlan-filter>[,]</vlan-filter>
+ </vm-networks>
+ <vm-networks>
+ <network-role>Internal-Network1</network-role>
+ <v4-assigned-ip-list>
+ <v4-ip-type>INTERNAL</v4-ip-type>
+ <v4-ip-prefix-length>24</v4-ip-prefix-length>
+ <v4-ip-source>OTHER</v4-ip-source>
+ <v4-ip-prefix>128.0.0.1</v4-ip-prefix>
+ <ipv4-prefix-block>128.0.0.0</ipv4-prefix-block>
+ </v4-assigned-ip-list>
+ <network-name>VRR-STMTN5MMSC20-INT1</network-name>
+ <network-forwarding>12</network-forwarding>
+ <network-id>VMX-INT1</network-id>
+ </vm-networks>
+ <vm-networks>
+ <network-role>Internal-Network2</network-role>
+ <v4-assigned-ip-list>
+ <v4-ip-type>INTERNAL</v4-ip-type>
+ <v4-ip-prefix-length>24</v4-ip-prefix-length>
+ <v4-ip-source>OTHER</v4-ip-source>
+ <v4-ip-prefix>128.0.0.1</v4-ip-prefix>
+ <ipv4-prefix-block>128.0.0.0</ipv4-prefix-block>
+ </v4-assigned-ip-list>
+ <network-name>VRR-STMTN5MMSC20-INT2</network-name>
+ <network-forwarding>12</network-forwarding>
+ <network-id>VMX-INT2</network-id>
+ </vm-networks>
+ <vm-names>
+ <vm-name>frkdevRvrra24</vm-name>
+ <vm-uuid>b05a42c3-28ea-4d18-8653-6515125acc1a</vm-uuid>
+ </vm-names>
+ </vnf-vms>
+ <vnf-status>Activated</vnf-status>
+ <vnf-networks>
+ <network-role>ADIGOam.OAM</network-role>
+ <network-name>ADIGOAM.OAM</network-name>
+ <neutron-id>491c7cef-a3f4-4990-883e-b0af397466d0</neutron-id>
+ <network-id>VPEADIG1d77c-1086-41ec-b7f3-94bb30936807</network-id>
+ </vnf-networks>
+ <vnf-networks>
+ <network-role>ADIG_SRIOV_2</network-role>
+ <network-name>ADIG_SRIOV_2</network-name>
+ <neutron-id>491c7cef-a3f4-4990-883e-b0af397466d0</neutron-id>
+ <network-id>VPEADIG1d77c-1086-41ec-b7f3-94bb30936809</network-id>
+ </vnf-networks>
+ <vnf-networks>
+ <network-role>ADIG_SRIOV_1</network-role>
+ <network-name>ADIG_SRIOV_1</network-name>
+ <neutron-id>491c7cef-a3f4-4990-883e-b0af397466d0</neutron-id>
+ <network-id>VPEADIG1d77c-1086-41ec-b7f3-94bb30936808</network-id>
+ </vnf-networks>
+ </vnf-assignments>
+ </vnf-topology-information>
+ <generic-vnf-service>
+ <cloud-region-id>FRN1</cloud-region-id>
+ <outer-vlan-tag>4027</outer-vlan-tag>
+ <cloud-owner>att-aic</cloud-owner>
+ <service-ecomp-model-information>
+ <model-uuid>b73c6911-be64-448a-bb4b-7b7a7006507a</model-uuid>
+ <model-version>5.0</model-version>
+ <model-name>MOW AVPN vMX AV vPE Service</model-name>
+ <model-invariant-uuid>d48764b1-043d-4783-89e3-8817602dc833</model-invariant-uuid>
+ </service-ecomp-model-information>
+ <as-number>65001</as-number>
+ <infra-service-instance-id>wl3900-1712-46db-99be-de9eb963a6cf26</infra-service-instance-id>
+ <country-code>DE</country-code>
+ <vnf-id>vnfID-1712_26</vnf-id>
+ <vnf-host-name>26VRR_mtrnj151rv2</vnf-host-name>
+ <vf-module-ecomp-model-information>
+ <vf-module-model-customization-uuid-list>
+ <vf-module-model-customization-uuid>778c2ed5-77a8-426e-94fe-51a4d40199c4
+ </vf-module-model-customization-uuid>
+ </vf-module-model-customization-uuid-list>
+ <vf-module-model-customization-uuid-list>
+ <vf-module-model-customization-uuid>cb510af0-5b21-4bc7-86d9-323cb396ced4
+ </vf-module-model-customization-uuid>
+ </vf-module-model-customization-uuid-list>
+ <model-uuid>c91330e5-8e1a-459b-95ee-d682046cbeca</model-uuid>
+ <model-version>3</model-version>
+ <model-name>MowAvpnVmxAvVpe..base_vRE_AV..module-0</model-name>
+ <model-invariant-uuid>f9f41064-cbe7-4e94-ac4c-93d9c54af317</model-invariant-uuid>
+ </vf-module-ecomp-model-information>
+ <orchestration-status>Activated</orchestration-status>
+ <vnf-type>RR</vnf-type>
+ <aic-clli>FRNKGEFF</aic-clli>
+ <prov-status>PROV</prov-status>
+ <v4-assigned-ip-list>
+ <v4-ip-type>NMLAN</v4-ip-type>
+ <ipv4-gateway-prefix>10.66.132.113</ipv4-gateway-prefix>
+ <v4-ip-prefix>10.66.132.115</v4-ip-prefix>
+ <v4-ip-prefix-length>32</v4-ip-prefix-length>
+ <v4-ip-source>EIPAM</v4-ip-source>
+ </v4-assigned-ip-list>
+ <vnf-ecomp-model-information>
+ <model-uuid>07bc0630-11d2-4c08-9c8f-75b036db1f4d</model-uuid>
+ <model-version>3.0</model-version>
+ <model-name>MOW AVPN vMX AV vPE</model-name>
+ <vnf-model-customization-uuid>31d077f6-356f-436e-b447-1997faff4c68
+ </vnf-model-customization-uuid>
+ <model-invariant-uuid>31d077f6-356f-436e-b447-1997faff4c68</model-invariant-uuid>
+ </vnf-ecomp-model-information>
+ <vnf-networks>
+ <network-role>ADIGOam.OAM</network-role>
+ <network-name>ADIGOAM.OAM</network-name>
+ <neutron-id>491c7cef-a3f4-4990-883e-b0af397466d0</neutron-id>
+ <network-id>VPEADIG1d77c-1086-41ec-b7f3-94bb30936807</network-id>
+ </vnf-networks>
+ <vnf-networks>
+ <network-role>ADIG_SRIOV_2</network-role>
+ <network-name>ADIG_SRIOV_2</network-name>
+ <neutron-id>491c7cef-a3f4-4990-883e-b0af397466d0</neutron-id>
+ <network-id>VPEADIG1d77c-1086-41ec-b7f3-94bb30936809</network-id>
+ </vnf-networks>
+ <vnf-networks>
+ <network-role>ADIG_SRIOV_1</network-role>
+ <network-name>ADIG_SRIOV_1</network-name>
+ <neutron-id>491c7cef-a3f4-4990-883e-b0af397466d0</neutron-id>
+ <network-id>VPEADIG1d77c-1086-41ec-b7f3-94bb30936808</network-id>
+ </vnf-networks>
+ <tenant>1710vPEPROJECTS297135PROJECT</tenant>
+ <affinity>26VRR_mtrnj151rv2-affinity</affinity>
+ </generic-vnf-service>
+ <oper-status>
+ <order-status>Completed</order-status>
+ </oper-status>
+ <vnf-request-information>
+ <aic-cloud-region>VNN1CA52LCP</aic-cloud-region>
+ <vnf-name>skask</vnf-name>
+ <generic-vnf-id>afd0f02a-1ddb-43bb-aded-5113e46e82ae</generic-vnf-id>
+ <generic-vnf-type>ZVNN1MOGX01-SVC/ZVNN1MOGX01 - VF AUG 1 1</generic-vnf-type>
+ <generic-vnf-name>ZVNN1MOGX01</generic-vnf-name>
+ <tenant>33d209df14ac4c08ad60747185d2f3e0</tenant>
+ <vnf-id>bd1b3789-6474-4935-94b2-90b656e035d0</vnf-id>
+ <vnf-type>ZVNN1MOGX01 - VF AUG 1module-0</vnf-type>
+ </vnf-request-information>
+ </service-data>
+ </service-list>
+ </tag0RequestData>
+</response-data>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleRollback/GenericVnf.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleRollback/GenericVnf.xml
new file mode 100644
index 0000000000..50e4347e5f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleRollback/GenericVnf.xml
@@ -0,0 +1,26 @@
+<generic-vnf xmlns="http://org.openecomp.aai.inventory/v7">
+ <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>
+ <vnf-name>STMTN5MMSC21</vnf-name>
+ <vnf-type>mmsc-capacity</vnf-type>
+ <service-id>SDN-MOBILITY</service-id>
+ <equipment-role>vMMSC</equipment-role>
+ <orchestration-status>pending-create</orchestration-status>
+ <in-maint>false</in-maint>
+ <is-closed-loop-disabled>false</is-closed-loop-disabled>
+ <resource-version>1508691</resource-version>
+ <vf-modules>
+ <vf-module>
+ <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>
+ <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>
+ <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</persona-model-id>
+ <persona-model-version>1.0</persona-model-version>
+ <is-base-vf-module>true</is-base-vf-module>
+ <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>
+ <orchestration-status>pending-create</orchestration-status>
+ <resource-version>1508692</resource-version>
+ </vf-module>
+ </vf-modules>
+ <relationship-list/>
+ <l-interfaces/>
+ <lag-interfaces/>
+</generic-vnf> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleRollback/GenericVnfVfModule.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleRollback/GenericVnfVfModule.xml
new file mode 100644
index 0000000000..f60260d85b
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleRollback/GenericVnfVfModule.xml
@@ -0,0 +1,26 @@
+<generic-vnf xmlns="http://org.openecomp.aai.inventory/v7">
+ <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>
+ <vnf-name>STMTN5MMSC21</vnf-name>
+ <vnf-type>mmsc-capacity</vnf-type>
+ <service-id>SDN-MOBILITY</service-id>
+ <equipment-role>vMMSC</equipment-role>
+ <orchestration-status>pending-create</orchestration-status>
+ <in-maint>false</in-maint>
+ <is-closed-loop-disabled>false</is-closed-loop-disabled>
+ <resource-version>0000021</resource-version>
+ <vf-modules>
+ <vf-module>
+ <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>
+ <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>
+ <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</persona-model-id>
+ <persona-model-version>1.0</persona-model-version>
+ <is-base-vf-module>true</is-base-vf-module>
+ <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>
+ <orchestration-status>pending-create</orchestration-status>
+ <resource-version>0000073</resource-version>
+ </vf-module>
+ </vf-modules>
+ <relationship-list/>
+ <l-interfaces/>
+ <lag-interfaces/>
+</generic-vnf> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleRollback/deactivateSDNCRequest.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleRollback/deactivateSDNCRequest.xml
new file mode 100644
index 0000000000..69884c5534
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleRollback/deactivateSDNCRequest.xml
@@ -0,0 +1,36 @@
+<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>testReqId</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>svcInstId_test</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>deactivate</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>vf-module-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>http://localhost:28080/mso/SDNCAdapterCallbackService</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>testRequestId</request-id>
+ <request-action>DeleteVfModuleInstance</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id/>
+ <subscription-service-type/>
+ <service-instance-id>12345</service-instance-id>
+ <global-customer-id/>
+ </service-information>
+ <vnf-information>
+ <vnf-id>skask</vnf-id>
+ <vnf-type/>
+ </vnf-information>
+ <vf-module-information>
+ <vf-module-id>cb510af0-5b21-4bc7-86d9-323cb396ce32</vf-module-id>
+ </vf-module-information>
+ <vf-module-request-input/>
+ </sdncadapterworkflow:SDNCRequestData>
+</sdncadapterworkflow:SDNCAdapterWorkflowRequest> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleRollback/sdncAdapterWorkflowRequest.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleRollback/sdncAdapterWorkflowRequest.xml
new file mode 100644
index 0000000000..a03c28c91e
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleRollback/sdncAdapterWorkflowRequest.xml
@@ -0,0 +1,37 @@
+<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>testReqId</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>cb510af0-5b21-4bc7-86d9-323cb396ce32</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>delete</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>http://localhost:28080/mso/SDNCAdapterCallbackService</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>testRequestId</request-id>
+ <request-action>DisconnectVNFRequest</request-action>
+ <source>VID</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id>12345</service-id>
+ <service-type>12345</service-type>
+ <service-instance-id>12345</service-instance-id>
+ <subscriber-name>notsurewecare</subscriber-name>
+ </service-information>
+ <vnf-request-information>
+ <vnf-id>cb510af0-5b21-4bc7-86d9-323cb396ce32</vnf-id>
+ <vnf-type>PCRF::module-0-2</vnf-type>
+ <vnf-name>PCRF::module-0-2</vnf-name>
+ <generic-vnf-id>skask</generic-vnf-id>
+ <generic-vnf-name>skask-test</generic-vnf-name>
+ <generic-vnf-type>vRRaas</generic-vnf-type>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <tenant>fba1bd1e195a404cacb9ce17a9b2b421</tenant>
+ </vnf-request-information>
+ </sdncadapterworkflow:SDNCRequestData>
+</sdncadapterworkflow:SDNCAdapterWorkflowRequest> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleRollback/vnfAdapterRestV1Request.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleRollback/vnfAdapterRestV1Request.xml
new file mode 100644
index 0000000000..abb30b3c2c
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleRollback/vnfAdapterRestV1Request.xml
@@ -0,0 +1,14 @@
+<deleteVfModuleRequest>
+ <cloudSiteId>null</cloudSiteId>
+ <tenantId>null</tenantId>
+ <vnfId>skask</vnfId>
+ <vfModuleId>cb510af0-5b21-4bc7-86d9-323cb396ce32</vfModuleId>
+ <vfModuleStackId>null</vfModuleStackId>
+ <skipAAI>true</skipAAI>
+ <msoRequest>
+ <requestId>testRequestId</requestId>
+ <serviceInstanceId>12345</serviceInstanceId>
+ </msoRequest>
+ <messageId>12345-1513795852327</messageId>
+ <notificationUrl>http://localhost:18080/mso/WorkflowMessage/VNFAResponse/null-1513795852327</notificationUrl>
+</deleteVfModuleRequest> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeCallbackResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeCallbackResponse.xml
new file mode 100644
index 0000000000..a421355aba
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeCallbackResponse.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<createVolumeGroupResponse>
+ <messageId>{{MESSAGE-ID}}</messageId>
+ <volumeGroupCreated>true</volumeGroupCreated>
+ <volumeGroupId>d485ecee-957c-4a0a-8b95-27a22b90103f</volumeGroupId>
+ <volumeGroupOutputs>
+ <entry>
+ <key>mmsc_vol_1</key>
+ <value>a73e0fe9-1ce8-49c2-8fef-e2788605be29</value>
+ </entry>
+ <entry>
+ <key>mmsc_vol_2</key>
+ <value>37b6455a-5ea8-463a-89e3-0efeaf7b7c6d</value>
+ </entry>
+ <entry>
+ <key>nemsfe_vol_1</key>
+ <value>b7ff1c21-d138-49a3-bf13-4cfd91efaf48</value>
+ </entry>
+ <entry>
+ <key>nemsbe_vol_1</key>
+ <value>a5988471-cd42-44d8-b078-64f2f13d3d4c</value>
+ </entry>
+ <entry>
+ <key>mmsc_vol_5</key>
+ <value>f7b91c1e-ab8c-413a-a850-ba80a246c7e0</value>
+ </entry>
+ <entry>
+ <key>nemsfe_vol_2</key>
+ <value>957ea3f3-2d4a-4707-bfd2-ba66f42037c2</value>
+ </entry>
+ <entry>
+ <key>mmsc_vol_3</key>
+ <value>de6fccfe-d61a-48b0-b03b-87bf1bf749b3</value>
+ </entry>
+ <entry>
+ <key>mmsc_vol_4</key>
+ <value>76162310-2c38-4c32-981c-5c2880190077</value>
+ </entry>
+ </volumeGroupOutputs>
+ <volumeGroupRollback>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <messageId>e585e4f4-9452-437a-b294-45a2d6d3b7a3</messageId>
+ <msoRequest>
+ <requestId>c30b9453-4b68-4c2e-aacf-58a5ba648bf5</requestId>
+ <serviceInstanceId>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</serviceInstanceId>
+ </msoRequest>
+ <tenantId>1bbab536a19b4756926e7d0ec1eb543c</tenantId>
+ <volumeGroupCreated>true</volumeGroupCreated>
+ <volumeGroupId>78987</volumeGroupId>
+ <volumeGroupStackId>ZRDM1MMSC01_base_vol/7f74e5e1-5fc1-4593-ac7e-cc9899a106ef</volumeGroupStackId>
+ </volumeGroupRollback>
+ <volumeGroupStackId>ZRDM1MMSC01_base_vol/7f74e5e1-5fc1-4593-ac7e-cc9899a106ef</volumeGroupStackId>
+</createVolumeGroupResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeNoRollbackRequest.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeNoRollbackRequest.xml
new file mode 100644
index 0000000000..38e8662787
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeNoRollbackRequest.xml
@@ -0,0 +1,24 @@
+<volume-request xmlns="http://org.onap/so/infra/vnf-request/v1" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <request-info>
+ <test-data-only>123abc</test-data-only> <!-- don't remove this tag. Its used for junit test -->
+ <request-id>d8d4fcfa-fd7e-4413-b19d-c95aa67291b8</request-id>
+ <action>CREATE_VF_MODULE_VOL</action>
+ <source>SoapUI-bns-create-base-vol-1001-1</source>
+ </request-info>
+ <volume-inputs>
+ <vnf-type>Test/vSAMP12</vnf-type>
+ <vf-module-model-name>vSAMP12::base::module-0</vf-module-model-name>
+ <backout-on-failure>false</backout-on-failure>
+ <asdc-service-model-version/>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <aic-cloud-region>MDTWNJ21</aic-cloud-region>
+ <tenant-id>897deadc2b954a6bac6d3c197fb3525e</tenant-id>
+ <volume-group-name>MSOTESTVOL101a-vSAMP12_base_vol_module-0</volume-group-name>
+ <volume-group-id/>
+ </volume-inputs>
+ <volume-params>
+ <param name="param1">value1</param>"
+ <param name="param2">value2</param>"
+ <param name="param3">value3</param>"
+ </volume-params>
+</volume-request>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeRequest.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeRequest.xml
new file mode 100644
index 0000000000..62d1aba771
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeRequest.xml
@@ -0,0 +1,24 @@
+<volume-request xmlns="http://org.onap/so/infra/vnf-request/v1" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <request-info>
+ <test-data-only>123abc</test-data-only> <!-- don't remove this tag. Its used for junit test -->
+ <request-id>d8d4fcfa-fd7e-4413-b19d-c95aa67291b8</request-id>
+ <action>CREATE_VF_MODULE_VOL</action>
+ <source>SoapUI-bns-create-base-vol-1001-1</source>
+ </request-info>
+ <volume-inputs>
+ <vnf-type>Test/vSAMP12</vnf-type>
+ <vf-module-model-name>vSAMP12::base::module-0</vf-module-model-name>
+ <backout-on-failure>true</backout-on-failure>
+ <asdc-service-model-version/>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <aic-cloud-region>MDTWNJ21</aic-cloud-region>
+ <tenant-id>897deadc2b954a6bac6d3c197fb3525e</tenant-id>
+ <volume-group-name>MSOTESTVOL101a-vSAMP12_base_vol_module-0</volume-group-name>
+ <volume-group-id/>
+ </volume-inputs>
+ <volume-params>
+ <param name="param1">value1</param>"
+ <param name="param2">value2</param>"
+ <param name="param3">value3</param>"
+ </volume-params>
+</volume-request>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/GenericVnf.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/GenericVnf.xml
new file mode 100644
index 0000000000..aea1a46017
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/GenericVnf.xml
@@ -0,0 +1,38 @@
+<generic-vnf xmlns="http://org.openecomp.aai.inventory/v8">
+ <vnf-id>TEST-VNF-ID-0123</vnf-id>
+ <vnf-name>STMTN5MMSC20</vnf-name>
+ <vnf-type>pcrf-capacity</vnf-type>
+ <service-id>SDN-MOBILITY</service-id>
+ <equipment-role>vPCRF</equipment-role>
+ <orchestration-status>pending-create</orchestration-status>
+ <in-maint>false</in-maint>
+ <is-closed-loop-disabled>false</is-closed-loop-disabled>
+ <persona-model-id>introvert</persona-model-id>
+ <persona-model-version>2.0</persona-model-version>
+ <resource-version>0000020</resource-version>
+ <vf-modules>
+ <vf-module>
+ <vf-module-id>lukewarm</vf-module-id>
+ <vf-module-name>PCRF::module-0-0</vf-module-name>
+ <persona-model-id>introvert</persona-model-id>
+ <persona-model-version>2.0</persona-model-version>
+ <is-base-vf-module>true</is-base-vf-module>
+ <heat-stack-id>fastburn</heat-stack-id>
+ <orchestration-status>pending-create</orchestration-status>
+ <resource-version>0000074</resource-version>
+ </vf-module>
+ <vf-module>
+ <vf-module-id>supercool</vf-module-id>
+ <vf-module-name>PCRF::module-1-0</vf-module-name>
+ <persona-model-id>extrovert</persona-model-id>
+ <persona-model-version>2.0</persona-model-version>
+ <is-base-vf-module>false</is-base-vf-module>
+ <heat-stack-id>slowburn</heat-stack-id>
+ <orchestration-status>pending-create</orchestration-status>
+ <resource-version>0000075</resource-version>
+ </vf-module>
+ </vf-modules>
+ <relationship-list/>
+ <l-interfaces/>
+ <lag-interfaces/>
+</generic-vnf> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/RollbackVfModuleVolumeCallbackResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/RollbackVfModuleVolumeCallbackResponse.xml
new file mode 100644
index 0000000000..6ab9416617
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/RollbackVfModuleVolumeCallbackResponse.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<rollbackVolumeGroupResponse>
+ <messageId>{{MESSAGE-ID}}</messageId>
+ <volumeGroupRolledback>true</volumeGroupRolledback>
+</rollbackVolumeGroupResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_VID_request.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_VID_request.json
new file mode 100644
index 0000000000..6cc84c79b6
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_VID_request.json
@@ -0,0 +1,104 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "volumeGroup",
+ "modelId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12::base::module-0",
+ "modelVersion": "1"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "MSOTESTVOL103W-vSAMP12_base_vol_module-0",
+ "source": "VID",
+ "callbackUrl": "{do we support this???}"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "{service-instance-id}",
+ "modelInfo": {
+ "modelType": "service",
+ "modelId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "{parent service model name}",
+ "modelVersion": "1"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "{vnf-instance-id}",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "Test/vSAMP12",
+ "modelVersion": "1"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "backoutOnFailure": true,
+ "serviceId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "userParams": [
+ {
+ "name": "vnfName",
+ "value": "STMTN5MMSC20"
+ },
+ {
+ "name": "vnfName2",
+ "value": "US1117MTSNJVBR0246"
+ },
+ {
+ "name": "vnfNmInformation",
+ "value": ""
+ },
+ {
+ "name": "vnfType",
+ "value": "pcrf-capacity"
+ },
+ {
+ "name": "vnfId",
+ "value": "skask"
+ },
+ {
+ "name": "vnfStackId",
+ "value": "slowburn"
+ },
+ {
+ "name": "vnfStatus",
+ "value": "created"
+ },
+ {
+ "name": "aicCloudRegion",
+ "value": "MDTWNJ21"
+ },
+ {
+ "name": "availabilityZone",
+ "value": "slcp3-esx-az01"
+ },
+ {
+ "name": "oamNetworkName",
+ "value": "VLAN-OAM-1323"
+ },
+ {
+ "name": "vmName",
+ "value": "slcp34246vbc246ceb"
+ },
+ {
+ "name": "ipagNetworkId",
+ "value": "970cd2b9-7f09-4a12-af47-182ea38ba1f0"
+ },
+ {
+ "name": "vpeNetworkId",
+ "value": "545cc2c3-1930-4100-b534-5d82d0e12bb6"
+ }
+ ]
+ }
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_createVolumeName_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_createVolumeName_AAIResponse_Success.xml
new file mode 100644
index 0000000000..02b43ff186
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_createVolumeName_AAIResponse_Success.xml
@@ -0,0 +1,49 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="X-CSI-Internal-WriteableRequest" value="true"/>
+ <rest:header name="X-CSI-MethodName" value="UNKNOWN"/>
+ <rest:header name="Content-Length" value="968"/>
+ <rest:header name="breadcrumbId" value="ID-mtsnjv9aaas23-44965-1459957053425-0-211465"/>
+ <rest:header name="X-CSI-UniqueTransactionId"
+ value="AjscCsiRestful28795@mtsnjv9aaas237d4a4d21-e60a-495f-935f-cc225dc3c847"/>
+ <rest:header name="User-Agent" value="Jakarta Commons-HttpClient/3.1"/>
+ <rest:header name="X-TransactionID" value="3a19f95d-d63e-4a8e-8b9c-6563895628aa"/>
+ <rest:header name="X-CSI-ServiceName" value="UNKNOWN"/>
+ <rest:header name="Server" value="Jetty(9.2.z-SNAPSHOT)"/>
+ <rest:header name="Cache-Control" value="no-cache,no-store"/>
+ <rest:header name="X-FromAppId" value="MSO"/>
+ <rest:header name="Date" value="Fri,08 Apr 2016 16:53:04 GMT"/>
+ <rest:header name="X-CSI-ConversationId"
+ value="ajscUser~CNG-CSI~c0a2bb44-2167-4e85-ad6a-483a24c0823a"/>
+ <rest:header name="volume-group-name" value="simpleCinderVolume_201604071"/>
+ <rest:header name="X-CSI-MessageId" value="f6d6eed4-456e-4033-be04-b17582902dc2"/>
+ <rest:header name="X-AAI-TXID" value="mtsnjv9aaas23-20160408-16:53:04:592-73255"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Accept" value="application/xml"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <volume-group xmlns="http://org.openecomp.aai.inventory/v8">
+ <volume-group-id>simpleCinderVolume_201604071</volume-group-id>
+ <volume-group-name>simpleCinderVolume_201604071</volume-group-name>
+ <heat-stack-id>simpleCinderVolume_201604071</heat-stack-id>
+ <vnf-type>simple_cinder_master</vnf-type>
+ <orchestration-status>Pending</orchestration-status>
+ <resource-version>1460134360</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v6/cloud-infrastructure/tenants/tenant/897deadc2b954a6bac6d3c197fb3525e/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>897deadc2b954a6bac6d3c197fb3525e</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>MSOTest1</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+ </volume-group>
+ </rest:payload>
+</rest:RESTResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_deleteVolumeName_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_deleteVolumeName_AAIResponse_Success.xml
new file mode 100644
index 0000000000..1574310474
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_deleteVolumeName_AAIResponse_Success.xml
@@ -0,0 +1,24 @@
+ <rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="X-CSI-Internal-WriteableRequest" value="true"/>
+ <rest:header name="X-CSI-MethodName" value="helloWorld-GetMethod(Logical)"/>
+ <rest:header name="Content-Length" value="0"/>
+ <rest:header name="breadcrumbId" value="ID-mtsnjv9aaas23-44965-1459957053425-0-211467"/>
+ <rest:header name="X-CSI-UniqueTransactionId"
+ value="AjscCsiRestful28795@mtsnjv9aaas23d44059bc-ef96-4af8-a28b-98044e08d7af"/>
+ <rest:header name="User-Agent" value="Jakarta Commons-HttpClient/3.1"/>
+ <rest:header name="X-TransactionID" value="3749995c-266b-4025-a0c4-4ce6983efc66"/>
+ <rest:header name="X-CSI-ServiceName" value="helloWorld"/>
+ <rest:header name="Server" value="Jetty(9.2.z-SNAPSHOT)"/>
+ <rest:header name="Cache-Control" value="no-cache,no-store"/>
+ <rest:header name="X-FromAppId" value="MSO"/>
+ <rest:header name="Date" value="Fri,08 Apr 2016 16:53:04 GMT"/>
+ <rest:header name="X-CSI-ConversationId"
+ value="ajscUser~CNG-CSI~bbd0e78f-d4e7-41be-b9ad-4a6767fa660a"/>
+ <rest:header name="X-CSI-MessageId" value="6ccfeb13-56da-4836-bfbd-5a42dee60939"/>
+ <rest:header name="X-AAI-TXID" value="mtsnjv9aaas23-20160408-16:53:04:629-73256"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Accept" value="application/xml"/>
+ </rest:headers>
+ </rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_queryVolumeName_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_queryVolumeName_AAIResponse_Success.xml
new file mode 100644
index 0000000000..5e8913f335
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_queryVolumeName_AAIResponse_Success.xml
@@ -0,0 +1,49 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="X-CSI-Internal-WriteableRequest" value="true"/>
+ <rest:header name="X-CSI-MethodName" value="UNKNOWN"/>
+ <rest:header name="Content-Length" value="968"/>
+ <rest:header name="breadcrumbId" value="ID-mtsnjv9aaas23-44965-1459957053425-0-211465"/>
+ <rest:header name="X-CSI-UniqueTransactionId"
+ value="AjscCsiRestful28795@mtsnjv9aaas237d4a4d21-e60a-495f-935f-cc225dc3c847"/>
+ <rest:header name="User-Agent" value="Jakarta Commons-HttpClient/3.1"/>
+ <rest:header name="X-TransactionID" value="3a19f95d-d63e-4a8e-8b9c-6563895628aa"/>
+ <rest:header name="X-CSI-ServiceName" value="UNKNOWN"/>
+ <rest:header name="Server" value="Jetty(9.2.z-SNAPSHOT)"/>
+ <rest:header name="Cache-Control" value="no-cache,no-store"/>
+ <rest:header name="X-FromAppId" value="MSO"/>
+ <rest:header name="Date" value="Fri,08 Apr 2016 16:53:04 GMT"/>
+ <rest:header name="X-CSI-ConversationId"
+ value="ajscUser~CNG-CSI~c0a2bb44-2167-4e85-ad6a-483a24c0823a"/>
+ <rest:header name="volume-group-name" value="simpleCinderVolume_201604071"/>
+ <rest:header name="X-CSI-MessageId" value="f6d6eed4-456e-4033-be04-b17582902dc2"/>
+ <rest:header name="X-AAI-TXID" value="mtsnjv9aaas23-20160408-16:53:04:592-73255"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Accept" value="application/xml"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <volume-group xmlns="http://org.openecomp.aai.inventory/v8">
+ <volume-group-id>8424bb3c-c3e7-4553-9662-469649ed9379</volume-group-id>
+ <volume-group-name>MSOTESTVOL103W-vSAMP12_base_vol_module-0</volume-group-name>
+ <heat-stack-id/>
+ <vnf-type>simple_cinder_master</vnf-type>
+ <orchestration-status>Pending</orchestration-status>
+ <resource-version>1460134360</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v6/cloud-infrastructure/tenants/tenant/897deadc2b954a6bac6d3c197fb3525e/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>897deadc2b954a6bac6d3c197fb3525e</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>MSOTest1</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+ </volume-group>
+ </rest:payload>
+</rest:RESTResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_updateVolumeName_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_updateVolumeName_AAIResponse_Success.xml
new file mode 100644
index 0000000000..1574310474
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV1/createVfModuleVolume_updateVolumeName_AAIResponse_Success.xml
@@ -0,0 +1,24 @@
+ <rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="X-CSI-Internal-WriteableRequest" value="true"/>
+ <rest:header name="X-CSI-MethodName" value="helloWorld-GetMethod(Logical)"/>
+ <rest:header name="Content-Length" value="0"/>
+ <rest:header name="breadcrumbId" value="ID-mtsnjv9aaas23-44965-1459957053425-0-211467"/>
+ <rest:header name="X-CSI-UniqueTransactionId"
+ value="AjscCsiRestful28795@mtsnjv9aaas23d44059bc-ef96-4af8-a28b-98044e08d7af"/>
+ <rest:header name="User-Agent" value="Jakarta Commons-HttpClient/3.1"/>
+ <rest:header name="X-TransactionID" value="3749995c-266b-4025-a0c4-4ce6983efc66"/>
+ <rest:header name="X-CSI-ServiceName" value="helloWorld"/>
+ <rest:header name="Server" value="Jetty(9.2.z-SNAPSHOT)"/>
+ <rest:header name="Cache-Control" value="no-cache,no-store"/>
+ <rest:header name="X-FromAppId" value="MSO"/>
+ <rest:header name="Date" value="Fri,08 Apr 2016 16:53:04 GMT"/>
+ <rest:header name="X-CSI-ConversationId"
+ value="ajscUser~CNG-CSI~bbd0e78f-d4e7-41be-b9ad-4a6767fa660a"/>
+ <rest:header name="X-CSI-MessageId" value="6ccfeb13-56da-4836-bfbd-5a42dee60939"/>
+ <rest:header name="X-AAI-TXID" value="mtsnjv9aaas23-20160408-16:53:04:629-73256"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Accept" value="application/xml"/>
+ </rest:headers>
+ </rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV2/cloudRegion_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV2/cloudRegion_AAIResponse_Success.xml
new file mode 100644
index 0000000000..90c668c576
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV2/cloudRegion_AAIResponse_Success.xml
@@ -0,0 +1,20 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <cloud-owner>att-aic</cloud-owner>
+ <cloud-region-id>RDM2WAGPLCP</cloud-region-id>
+ <cloud-region-version>2.5</cloud-region-version>
+ <complex-name>RDM2WAGPLCP</complex-name>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV2/vnfAdapterDeleteRequest.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV2/vnfAdapterDeleteRequest.xml
new file mode 100644
index 0000000000..fd6c228cba
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModuleVolumeV2/vnfAdapterDeleteRequest.xml
@@ -0,0 +1,13 @@
+<deleteVolumeGroupRequest>
+ <cloudSiteId>null</cloudSiteId>
+ <tenantId>12345</tenantId>
+ <volumeGroupId>12345</volumeGroupId>
+ <volumeGroupStackId>null</volumeGroupStackId>
+ <skipAAI>true</skipAAI>
+ <msoRequest>
+ <requestId>12345</requestId>
+ <serviceInstanceId>12345</serviceInstanceId>
+ </msoRequest>
+ <messageId>580b5601-9260-4d19-abed-e671ac42c429</messageId>
+ <notificationUrl>http://localhost:18080/mso/WorkflowMessage/VNFAResponse/580b5601-9260-4d19-abed-e671ac42c429</notificationUrl>
+</deleteVolumeGroupRequest> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule_getVnfResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule_getVnfResponse.xml
new file mode 100644
index 0000000000..b8c2cfdad0
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoCreateVfModule_getVnfResponse.xml
@@ -0,0 +1,26 @@
+<generic-vnf xmlns="http://org.openecomp.aai.inventory/v7">
+ <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>
+ <vnf-name>STMTN5MMSC21</vnf-name>
+ <vnf-type>mmsc-capacity</vnf-type>
+ <service-id>SDN-MOBILITY</service-id>
+ <equipment-role>vMMSC</equipment-role>
+ <orchestration-status>pending-create</orchestration-status>
+ <in-maint>false</in-maint>
+ <is-closed-loop-disabled>false</is-closed-loop-disabled>
+ <resource-version>1508691</resource-version>
+ <vf-modules>
+ <vf-module>
+ <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>
+ <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>
+ <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</persona-model-id>
+ <persona-model-version>1.0</persona-model-version>
+ <is-base-vf-module>true</is-base-vf-module>
+ <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>
+ <orchestration-status>pending-create</orchestration-status>
+ <resource-version>1508692</resource-version>
+ </vf-module>
+ </vf-modules>
+ <relationship-list/>
+ <l-interfaces/>
+ <lag-interfaces/>
+ </generic-vnf> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoDeleteVfModule/getGenericVnfResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoDeleteVfModule/getGenericVnfResponse.xml
new file mode 100644
index 0000000000..be5130ead8
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoDeleteVfModule/getGenericVnfResponse.xml
@@ -0,0 +1,28 @@
+<generic-vnf xmlns="http://com.att.aai.inventory/v10">
+ <vnf-id>6d2e2469-8708-47c3-a0d4-73fa28a8a50b</vnf-id>
+ <vnf-name>STMTN5MMSC20</vnf-name>
+ <vnf-type>pcrf-capacity</vnf-type>
+ <service-id>SDN-MOBILITY</service-id>
+ <equipment-role>vPCRF</equipment-role>
+ <orchestration-status>created</orchestration-status>
+ <in-maint>false</in-maint>
+ <is-closed-loop-disabled>false</is-closed-loop-disabled>
+ <persona-model-id>introvert</persona-model-id>
+ <persona-model-version>2.0</persona-model-version>
+ <resource-version>0000020</resource-version>
+ <vf-modules>
+ <vf-module>
+ <vf-module-id>baseVfModuleId</vf-module-id>
+ <vf-module-name>PCRF::module-0-0</vf-module-name>
+ <persona-model-id>introvert</persona-model-id>
+ <persona-model-version>2.0</persona-model-version>
+ <is-base-vf-module>false</is-base-vf-module>
+ <heat-stack-id>baseVfModuleHeatStackId</heat-stack-id>
+ <orchestration-status>Created</orchestration-status>
+ <resource-version>0000074</resource-version>
+ </vf-module>
+ </vf-modules>
+ <relationship-list/>
+ <l-interfaces/>
+ <lag-interfaces/>
+</generic-vnf> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoDeleteVfModule/sdncAdapterWorkflowRequest.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoDeleteVfModule/sdncAdapterWorkflowRequest.xml
new file mode 100644
index 0000000000..9829fd2dbf
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoDeleteVfModule/sdncAdapterWorkflowRequest.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1" xmlns:ns5="http://org.onap/so/request/types/v1" xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>testReqId</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>12345</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>release</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>http://localhost:8090/SDNCAdapterCallback</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>12345</request-id>
+ <request-action>DisconnectVNFRequest</request-action>
+ <source>VID</source>
+ <notification-url />
+ <order-number />
+ <order-version />
+ </request-information>
+ <service-information>
+ <service-id>12345</service-id>
+ <service-type>12345</service-type>
+ <service-instance-id>123456789</service-instance-id>
+ <subscriber-name>notsurewecare</subscriber-name>
+ </service-information>
+ <vnf-request-information>
+ <vnf-id>12345</vnf-id>
+ <vnf-type>null</vnf-type>
+ <vnf-name>vfModuleName_test</vnf-name>
+ <generic-vnf-id>12345</generic-vnf-id>
+ <generic-vnf-name />
+ <generic-vnf-type />
+ <aic-cloud-region>null</aic-cloud-region>
+ <tenant>19123c2924c648eb8e42a3c1f14b7682</tenant>
+ </vnf-request-information>
+ </sdncadapterworkflow:SDNCRequestData>
+</sdncadapterworkflow:SDNCAdapterWorkflowRequest> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/cloudRegion_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/cloudRegion_AAIResponse_Success.xml
new file mode 100644
index 0000000000..90c668c576
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/cloudRegion_AAIResponse_Success.xml
@@ -0,0 +1,20 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <cloud-owner>att-aic</cloud-owner>
+ <cloud-region-id>RDM2WAGPLCP</cloud-region-id>
+ <cloud-region-version>2.5</cloud-region-version>
+ <complex-name>RDM2WAGPLCP</complex-name>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/getGenericVnfResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/getGenericVnfResponse.xml
new file mode 100644
index 0000000000..be5130ead8
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/getGenericVnfResponse.xml
@@ -0,0 +1,28 @@
+<generic-vnf xmlns="http://com.att.aai.inventory/v10">
+ <vnf-id>6d2e2469-8708-47c3-a0d4-73fa28a8a50b</vnf-id>
+ <vnf-name>STMTN5MMSC20</vnf-name>
+ <vnf-type>pcrf-capacity</vnf-type>
+ <service-id>SDN-MOBILITY</service-id>
+ <equipment-role>vPCRF</equipment-role>
+ <orchestration-status>created</orchestration-status>
+ <in-maint>false</in-maint>
+ <is-closed-loop-disabled>false</is-closed-loop-disabled>
+ <persona-model-id>introvert</persona-model-id>
+ <persona-model-version>2.0</persona-model-version>
+ <resource-version>0000020</resource-version>
+ <vf-modules>
+ <vf-module>
+ <vf-module-id>baseVfModuleId</vf-module-id>
+ <vf-module-name>PCRF::module-0-0</vf-module-name>
+ <persona-model-id>introvert</persona-model-id>
+ <persona-model-version>2.0</persona-model-version>
+ <is-base-vf-module>false</is-base-vf-module>
+ <heat-stack-id>baseVfModuleHeatStackId</heat-stack-id>
+ <orchestration-status>Created</orchestration-status>
+ <resource-version>0000074</resource-version>
+ </vf-module>
+ </vf-modules>
+ <relationship-list/>
+ <l-interfaces/>
+ <lag-interfaces/>
+</generic-vnf> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/sdncActivateRequest.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/sdncActivateRequest.xml
new file mode 100644
index 0000000000..6fa8bfedc9
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/sdncActivateRequest.xml
@@ -0,0 +1,36 @@
+<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>testReqId</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>MIS/1604/0026/SW_INTERNET</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>activate</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>http://localhost:8090/SDNCAdapter</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>testRequestId</request-id>
+ <request-action>ChangeVNFActivateRequest</request-action>
+ <source>PORTAL</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-type>12345</service-type>
+ <service-instance-id>skask</service-instance-id>
+ <subscriber-name>dontcare</subscriber-name>
+ </service-information>
+ <vnf-request-information>
+ <vnf-id>cb510af0-5b21-4bc7-86d9-323cb396ce32</vnf-id>
+ <vnf-type>PCRF::module-0-2</vnf-type>
+ <vnf-name>abc</vnf-name>
+ <generic-vnf-id>skask</generic-vnf-id>
+ <generic-vnf-name>skask-test</generic-vnf-name>
+ <generic-vnf-type>vRRaas</generic-vnf-type>
+ <tenant>fba1bd1e195a404cacb9ce17a9b2b421</tenant>
+ <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>
+ <use-preload>Y</use-preload>
+ </vnf-request-information>
+ </sdncadapterworkflow:SDNCRequestData>
+</sdncadapterworkflow:SDNCAdapterWorkflowRequest> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/sdncChangeAssignRequest.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/sdncChangeAssignRequest.xml
new file mode 100644
index 0000000000..c57dec4d86
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/sdncChangeAssignRequest.xml
@@ -0,0 +1,36 @@
+<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>testReqId</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>MIS/1604/0026/SW_INTERNET</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>changeassign</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>http://localhost:8090/SDNCAdapter</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>testRequestId</request-id>
+ <request-action>ChangeVNFActivateRequest</request-action>
+ <source>PORTAL</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-type>12345</service-type>
+ <service-instance-id>skask</service-instance-id>
+ <subscriber-name>dontcare</subscriber-name>
+ </service-information>
+ <vnf-request-information>
+ <vnf-id>cb510af0-5b21-4bc7-86d9-323cb396ce32</vnf-id>
+ <vnf-type>PCRF::module-0-2</vnf-type>
+ <vnf-name>abc</vnf-name>
+ <generic-vnf-id>skask</generic-vnf-id>
+ <generic-vnf-name>skask-test</generic-vnf-name>
+ <generic-vnf-type>vRRaas</generic-vnf-type>
+ <tenant>fba1bd1e195a404cacb9ce17a9b2b421</tenant>
+ <aic-cloud-region>MDTWNJ21</aic-cloud-region>
+ <use-preload>Y</use-preload>
+ </vnf-request-information>
+ </sdncadapterworkflow:SDNCRequestData>
+</sdncadapterworkflow:SDNCAdapterWorkflowRequest> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/sdncGetResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/sdncGetResponse.xml
new file mode 100644
index 0000000000..20b5462729
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/sdncGetResponse.xml
@@ -0,0 +1,195 @@
+<response-data>
+ <tag0CallbackHeader>
+ <tag0RequestId>2681784d-118e-4485-929f-2ae3212f5c07-1507707098467</tag0RequestId>
+ <tag0ResponseCode>200</tag0ResponseCode>
+ <tag0ResponseMessage>OK</tag0ResponseMessage>
+ </tag0CallbackHeader>
+ <tag0RequestData>
+ <service-list>
+ <service-instance-id>vnfID-1712_26</service-instance-id>
+ <service-status>
+ <response-code>200</response-code>
+ <request-status>synccomplete</request-status>
+ <response-timestamp>2017-09-19T143942.327Z</response-timestamp>
+ <final-indicator>Y</final-indicator>
+ <rpc-name>activate-vnf-request</rpc-name>
+ </service-status>
+ <service-data>
+ <service-information>
+ <service-type>vRRaaS</service-type>
+ <service-instance-id>vnfID-1712_26</service-instance-id>
+ </service-information>
+ <request-information>
+ <request-id>ae322537-d081-4a01-95a5-c1448116d0c5</request-id>
+ </request-information>
+ <ipsec-tunnel-parameters/>
+ <vnf-topology-information>
+ <vnf-assignments>
+ <availability-zones>
+ <availability-zone>frkde-esx-az01</availability-zone>
+ </availability-zones>
+ <vnf-vms>
+ <vm-type>vrra</vm-type>
+ <vm-count>1</vm-count>
+ <vm-networks>
+ <network-role>ADIGOam.OAM</network-role>
+ <network-name>ADIGOAM.OAM</network-name>
+ <v4-assigned-ip-list>
+ <v4-ip-type>NMLAN</v4-ip-type>
+ <ipv4-gateway-prefix>10.66.132.113</ipv4-gateway-prefix>
+ <v4-ip-prefix>10.66.132.115</v4-ip-prefix>
+ <v4-ip-prefix-length>32</v4-ip-prefix-length>
+ <v4-ip-source>EIPAM</v4-ip-source>
+ </v4-assigned-ip-list>
+ <network-id>VPEADIG1d77c-1086-41ec-b7f3-94bb30936807</network-id>
+ </vm-networks>
+ <vm-networks>
+ <network-role>ADIG_SRIOV_1</network-role>
+ <network-name>ADIG_SRIOV_1</network-name>
+ <network-id>VPEADIG1d77c-1086-41ec-b7f3-94bb30936808</network-id>
+ <vlan-filter>[,]</vlan-filter>
+ </vm-networks>
+ <vm-networks>
+ <network-role>ADIG_SRIOV_2</network-role>
+ <network-name>ADIG_SRIOV_2</network-name>
+ <network-id>VPEADIG1d77c-1086-41ec-b7f3-94bb30936809</network-id>
+ <vlan-filter>[,]</vlan-filter>
+ </vm-networks>
+ <vm-networks>
+ <network-role>Internal-Network1</network-role>
+ <v4-assigned-ip-list>
+ <v4-ip-type>INTERNAL</v4-ip-type>
+ <v4-ip-prefix-length>24</v4-ip-prefix-length>
+ <v4-ip-source>OTHER</v4-ip-source>
+ <v4-ip-prefix>128.0.0.1</v4-ip-prefix>
+ <ipv4-prefix-block>128.0.0.0</ipv4-prefix-block>
+ </v4-assigned-ip-list>
+ <network-name>VRR-STMTN5MMSC20-INT1</network-name>
+ <network-forwarding>12</network-forwarding>
+ <network-id>VMX-INT1</network-id>
+ </vm-networks>
+ <vm-networks>
+ <network-role>Internal-Network2</network-role>
+ <v4-assigned-ip-list>
+ <v4-ip-type>INTERNAL</v4-ip-type>
+ <v4-ip-prefix-length>24</v4-ip-prefix-length>
+ <v4-ip-source>OTHER</v4-ip-source>
+ <v4-ip-prefix>128.0.0.1</v4-ip-prefix>
+ <ipv4-prefix-block>128.0.0.0</ipv4-prefix-block>
+ </v4-assigned-ip-list>
+ <network-name>VRR-STMTN5MMSC20-INT2</network-name>
+ <network-forwarding>12</network-forwarding>
+ <network-id>VMX-INT2</network-id>
+ </vm-networks>
+ <vm-names>
+ <vm-name>frkdevRvrra24</vm-name>
+ <vm-uuid>b05a42c3-28ea-4d18-8653-6515125acc1a</vm-uuid>
+ </vm-names>
+ </vnf-vms>
+ <vnf-status>Activated</vnf-status>
+ <vnf-networks>
+ <network-role>ADIGOam.OAM</network-role>
+ <network-name>ADIGOAM.OAM</network-name>
+ <neutron-id>491c7cef-a3f4-4990-883e-b0af397466d0</neutron-id>
+ <network-id>VPEADIG1d77c-1086-41ec-b7f3-94bb30936807</network-id>
+ </vnf-networks>
+ <vnf-networks>
+ <network-role>ADIG_SRIOV_2</network-role>
+ <network-name>ADIG_SRIOV_2</network-name>
+ <neutron-id>491c7cef-a3f4-4990-883e-b0af397466d0</neutron-id>
+ <network-id>VPEADIG1d77c-1086-41ec-b7f3-94bb30936809</network-id>
+ </vnf-networks>
+ <vnf-networks>
+ <network-role>ADIG_SRIOV_1</network-role>
+ <network-name>ADIG_SRIOV_1</network-name>
+ <neutron-id>491c7cef-a3f4-4990-883e-b0af397466d0</neutron-id>
+ <network-id>VPEADIG1d77c-1086-41ec-b7f3-94bb30936808</network-id>
+ </vnf-networks>
+ </vnf-assignments>
+ </vnf-topology-information>
+ <generic-vnf-service>
+ <cloud-region-id>FRN1</cloud-region-id>
+ <outer-vlan-tag>4027</outer-vlan-tag>
+ <cloud-owner>att-aic</cloud-owner>
+ <service-ecomp-model-information>
+ <model-uuid>b73c6911-be64-448a-bb4b-7b7a7006507a</model-uuid>
+ <model-version>5.0</model-version>
+ <model-name>MOW AVPN vMX AV vPE Service</model-name>
+ <model-invariant-uuid>d48764b1-043d-4783-89e3-8817602dc833</model-invariant-uuid>
+ </service-ecomp-model-information>
+ <as-number>65001</as-number>
+ <infra-service-instance-id>wl3900-1712-46db-99be-de9eb963a6cf26</infra-service-instance-id>
+ <country-code>DE</country-code>
+ <vnf-id>vnfID-1712_26</vnf-id>
+ <vnf-host-name>26VRR_mtrnj151rv2</vnf-host-name>
+ <vf-module-ecomp-model-information>
+ <vf-module-model-customization-uuid-list>
+ <vf-module-model-customization-uuid>778c2ed5-77a8-426e-94fe-51a4d40199c4
+ </vf-module-model-customization-uuid>
+ </vf-module-model-customization-uuid-list>
+ <vf-module-model-customization-uuid-list>
+ <vf-module-model-customization-uuid>cb510af0-5b21-4bc7-86d9-323cb396ced4
+ </vf-module-model-customization-uuid>
+ </vf-module-model-customization-uuid-list>
+ <model-uuid>c91330e5-8e1a-459b-95ee-d682046cbeca</model-uuid>
+ <model-version>3</model-version>
+ <model-name>MowAvpnVmxAvVpe..base_vRE_AV..module-0</model-name>
+ <model-invariant-uuid>f9f41064-cbe7-4e94-ac4c-93d9c54af317</model-invariant-uuid>
+ </vf-module-ecomp-model-information>
+ <orchestration-status>Activated</orchestration-status>
+ <vnf-type>RR</vnf-type>
+ <aic-clli>FRNKGEFF</aic-clli>
+ <prov-status>PROV</prov-status>
+ <v4-assigned-ip-list>
+ <v4-ip-type>NMLAN</v4-ip-type>
+ <ipv4-gateway-prefix>10.66.132.113</ipv4-gateway-prefix>
+ <v4-ip-prefix>10.66.132.115</v4-ip-prefix>
+ <v4-ip-prefix-length>32</v4-ip-prefix-length>
+ <v4-ip-source>EIPAM</v4-ip-source>
+ </v4-assigned-ip-list>
+ <vnf-ecomp-model-information>
+ <model-uuid>07bc0630-11d2-4c08-9c8f-75b036db1f4d</model-uuid>
+ <model-version>3.0</model-version>
+ <model-name>MOW AVPN vMX AV vPE</model-name>
+ <vnf-model-customization-uuid>31d077f6-356f-436e-b447-1997faff4c68
+ </vnf-model-customization-uuid>
+ <model-invariant-uuid>31d077f6-356f-436e-b447-1997faff4c68</model-invariant-uuid>
+ </vnf-ecomp-model-information>
+ <vnf-networks>
+ <network-role>ADIGOam.OAM</network-role>
+ <network-name>ADIGOAM.OAM</network-name>
+ <neutron-id>491c7cef-a3f4-4990-883e-b0af397466d0</neutron-id>
+ <network-id>VPEADIG1d77c-1086-41ec-b7f3-94bb30936807</network-id>
+ </vnf-networks>
+ <vnf-networks>
+ <network-role>ADIG_SRIOV_2</network-role>
+ <network-name>ADIG_SRIOV_2</network-name>
+ <neutron-id>491c7cef-a3f4-4990-883e-b0af397466d0</neutron-id>
+ <network-id>VPEADIG1d77c-1086-41ec-b7f3-94bb30936809</network-id>
+ </vnf-networks>
+ <vnf-networks>
+ <network-role>ADIG_SRIOV_1</network-role>
+ <network-name>ADIG_SRIOV_1</network-name>
+ <neutron-id>491c7cef-a3f4-4990-883e-b0af397466d0</neutron-id>
+ <network-id>VPEADIG1d77c-1086-41ec-b7f3-94bb30936808</network-id>
+ </vnf-networks>
+ <tenant>1710vPEPROJECTS297135PROJECT</tenant>
+ <affinity>26VRR_mtrnj151rv2-affinity</affinity>
+ </generic-vnf-service>
+ <oper-status>
+ <order-status>Completed</order-status>
+ </oper-status>
+ <vnf-request-information>
+ <aic-cloud-region>VNN1CA52LCP</aic-cloud-region>
+ <vnf-name>skask</vnf-name>
+ <generic-vnf-id>afd0f02a-1ddb-43bb-aded-5113e46e82ae</generic-vnf-id>
+ <generic-vnf-type>ZVNN1MOGX01-SVC/ZVNN1MOGX01 - VF AUG 1 1</generic-vnf-type>
+ <generic-vnf-name>ZVNN1MOGX01</generic-vnf-name>
+ <tenant>33d209df14ac4c08ad60747185d2f3e0</tenant>
+ <vnf-id>bd1b3789-6474-4935-94b2-90b656e035d0</vnf-id>
+ <vnf-type>ZVNN1MOGX01 - VF AUG 1module-0</vnf-type>
+ </vnf-request-information>
+ </service-data>
+ </service-list>
+ </tag0RequestData>
+</response-data>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/sdncTopologyRequest.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/sdncTopologyRequest.xml
new file mode 100644
index 0000000000..79ab33d45c
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/sdncTopologyRequest.xml
@@ -0,0 +1,11 @@
+<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>testReqId</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>MIS/1604/0026/SW_INTERNET</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>query</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>/VNF-API:vnfs/vnf-list/12345</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>http://localhost:8090/SDNCAdapter</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>mobility</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+</sdncadapterworkflow:SDNCAdapterWorkflowRequest> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/vnfAdapterRestRequest.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/vnfAdapterRestRequest.xml
new file mode 100644
index 0000000000..d9268872b3
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/DoUpdateVfModule/vnfAdapterRestRequest.xml
@@ -0,0 +1,170 @@
+<updateVfModuleRequest>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <tenantId>fba1bd1e195a404cacb9ce17a9b2b421</tenantId>
+ <vnfId>skask</vnfId>
+ <vfModuleId>cb510af0-5b21-4bc7-86d9-323cb396ce32</vfModuleId>
+ <vfModuleStackId>abc</vfModuleStackId>
+ <vnfType>vRRaas</vnfType>
+ <vnfVersion>1.0</vnfVersion>
+ <modelCustomizationUuid>cb510af0-5b21-4bc7-86d9-323cb396ced3</modelCustomizationUuid>
+ <vfModuleType>PCRF::module-0-2</vfModuleType>
+ <volumeGroupId>12345</volumeGroupId>
+ <volumeGroupStackId>12345</volumeGroupStackId>
+ <baseVfModuleId>12345</baseVfModuleId>
+ <baseVfModuleStackId>12345</baseVfModuleStackId>
+ <skipAAI>true</skipAAI>
+ <backout>12345</backout>
+ <failIfExists>false</failIfExists>
+ <vfModuleParams>
+ <entry>
+ <key>vf_module_id</key>
+ <value>cb510af0-5b21-4bc7-86d9-323cb396ce32</value>
+ </entry>
+ <entry>
+ <key>vrra_Internal-Network1_ips</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>ADIG_SRIOV_2_subnet_id</key>
+ <value/>
+ </entry>
+ <entry>
+ <key>vrra_ADIGOam.OAM_v6_ips</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>vnf_name</key>
+ <value>skask-test</value>
+ </entry>
+ <entry>
+ <key>ADIGOam.OAM_v6_subnet_id</key>
+ <value/>
+ </entry>
+ <entry>
+ <key>workload_context</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>vf_module_name</key>
+ <value>PCRF::module-0-2</value>
+ </entry>
+ <entry>
+ <key>vnf_id</key>
+ <value>skask</value>
+ </entry>
+ <entry>
+ <key>ADIG_SRIOV_2_v6_subnet_id</key>
+ <value/>
+ </entry>
+ <entry>
+ <key>vrra_ADIG_SRIOV_1_ips</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>ADIG_SRIOV_1_v6_subnet_id</key>
+ <value/>
+ </entry>
+ <entry>
+ <key>ADIG_SRIOV_1_subnet_id</key>
+ <value/>
+ </entry>
+ <entry>
+ <key>vrr_flavor_name</key>
+ <value>ns.c16r32d128.v1</value>
+ </entry>
+ <entry>
+ <key>ADIG_SRIOV_2_net_name</key>
+ <value>ADIG_SRIOV_2</value>
+ </entry>
+ <entry>
+ <key>ADIGOam.OAM_subnet_id</key>
+ <value/>
+ </entry>
+ <entry>
+ <key>ADIGOam.OAM_net_id</key>
+ <value>491c7cef-a3f4-4990-883e-b0af397466d0</value>
+ </entry>
+ <entry>
+ <key>environment_context</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>ADIG_SRIOV_1_net_fqdn</key>
+ <value/>
+ </entry>
+ <entry>
+ <key>ADIGOam.OAM_net_name</key>
+ <value>ADIGOAM.OAM</value>
+ </entry>
+ <entry>
+ <key>vrra_name_0</key>
+ <value>frkdevRvrra24</value>
+ </entry>
+ <entry>
+ <key>vrra_ADIG_SRIOV_2_ips</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>ADIG_SRIOV_2_net_fqdn</key>
+ <value/>
+ </entry>
+ <entry>
+ <key>vrra_Internal-Network2_ips</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>ADIG_SRIOV_1_net_name</key>
+ <value>ADIG_SRIOV_1</value>
+ </entry>
+ <entry>
+ <key>vrra_ADIG_SRIOV_1_v6_ips</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>vrra_ADIGOam.OAM_ips</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>vrra_Internal-Network1_v6_ips</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>vrr_image_name</key>
+ <value>MDT17</value>
+ </entry>
+ <entry>
+ <key>ADIGOam.OAM_net_fqdn</key>
+ <value/>
+ </entry>
+ <entry>
+ <key>vrra_names</key>
+ <value>frkdevRvrra24</value>
+ </entry>
+ <entry>
+ <key>ADIG_SRIOV_1_net_id</key>
+ <value>491c7cef-a3f4-4990-883e-b0af397466d0</value>
+ </entry>
+ <entry>
+ <key>vrra_Internal-Network2_v6_ips</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>vrra_ADIG_SRIOV_2_v6_ips</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>ADIG_SRIOV_2_net_id</key>
+ <value>491c7cef-a3f4-4990-883e-b0af397466d0</value>
+ </entry>
+ <entry>
+ <key>availability_zone_0</key>
+ <value>nova</value>
+ </entry>
+ </vfModuleParams>
+ <msoRequest>
+ <requestId>testRequestId</requestId>
+ <serviceInstanceId>MIS/1604/0026/SW_INTERNET</serviceInstanceId>
+ </msoRequest>
+ <messageId>testRequestId-1503410089303-1513287018300</messageId>
+ <notificationUrl>http://localhost:28080/mso/WorkflowMesssage/VNFAResponse/testRequestId-1503410089303-1513287018300</notificationUrl>
+</updateVfModuleRequest> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/MsoCompletionRequest.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/MsoCompletionRequest.xml
new file mode 100644
index 0000000000..d5175f4dc9
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/MsoCompletionRequest.xml
@@ -0,0 +1,11 @@
+<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1"
+ xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-info>
+ <request-id>null</request-id>
+ <action>DELETE</action>
+ <source>null</source>
+ </request-info>
+ <aetgt:status-message>E2E Service Instance was deleted successfully.</aetgt:status-message>
+ <aetgt:mso-bpel-name>DeleteCustomE2EServiceInstance</aetgt:mso-bpel-name>
+</aetgt:MsoCompletionRequest> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/SDNCDeleteResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/SDNCDeleteResponse.xml
new file mode 100644
index 0000000000..e380ce7ed2
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/SDNCDeleteResponse.xml
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<sdncadapterworkflow:SDNCAdapterWorkflowResponse
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
+ <sdncadapterworkflow:response-data>
+ <tag0:RequestData
+ xmlns:tag0="http://org.onap/workflow/sdnc/adapter/schema/v1"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">
+ <output xmlns="com:att:sdnctl:nbncapi">
+ <ack-final-indicator>Y</ack-final-indicator>
+ <svc-request-id>SK-2016-10-22-001</svc-request-id>
+ <nbnc-response-information>
+ <response-info>
+ <result>SUCCESS</result>
+ <aai-status>ERROR</aai-status>
+ </response-info>
+ <virtual-datacenter-list>
+ <vdc-id>15001417</vdc-id>
+ <router-list>
+ <router-name>ALPRTR2</router-name>
+ <ipe-loopback-address>1.1.1.2</ipe-loopback-address>
+ <vlan-list>
+ <vlan-id>1255.ae81</vlan-id>
+ <border-element-type>VDBE</border-element-type>
+ <border-element-tangibility>VIRTUAL</border-element-tangibility>
+ <port-id></port-id>
+ <border-element-id>ALPVDBE1</border-element-id>
+ <border-element-v4-subnet>3.1.1.0/22</border-element-v4-subnet>
+ <lag-id>ae81</lag-id>
+ <border-element-v6-subnet>3:1:1::0/22</border-element-v6-subnet>
+ </vlan-list>
+ <vlan-list>
+ <vlan-id>1995.ae81</vlan-id>
+ <border-element-type>ASBG</border-element-type>
+ <border-element-tangibility>VIRTUAL</border-element-tangibility>
+ <port-id></port-id>
+ <border-element-id>ALPASBG1</border-element-id>
+ <border-element-v4-subnet>3.1.1.0/22</border-element-v4-subnet>
+ <lag-id>ae81</lag-id>
+ <border-element-v6-subnet>3:1:1::0/22</border-element-v6-subnet>
+ </vlan-list>
+ <vlan-list>
+ <vlan-id>85.xe-10/0/2</vlan-id>
+ <border-element-type>BGF2</border-element-type>
+ <border-element-tangibility>PHYSICAL</border-element-tangibility>
+ <port-id>xe-10/0/2</port-id>
+ <border-element-id>ALPBGF2</border-element-id>
+ <border-element-v4-subnet>3.1.2.0/22</border-element-v4-subnet>
+ <lag-id></lag-id>
+ <border-element-v6-subnet>3:1:2::0/22</border-element-v6-subnet>
+ </vlan-list>
+ <vlan-list>
+ <vlan-id>85.xe-10/0/1</vlan-id>
+ <border-element-type>BGF1</border-element-type>
+ <border-element-tangibility>PHYSICAL</border-element-tangibility>
+ <port-id>xe-10/0/1</port-id>
+ <border-element-id>ALPBGF1</border-element-id>
+ <border-element-v4-subnet>3.1.2.0/22</border-element-v4-subnet>
+ <lag-id></lag-id>
+ <border-element-v6-subnet>3:1:2::0/22</border-element-v6-subnet>
+ </vlan-list>
+ <ipe-id>2</ipe-id>
+ </router-list>
+ <router-list>
+ <router-name>ALPRTR1</router-name>
+ <ipe-loopback-address>1.1.1.1</ipe-loopback-address>
+ <vlan-list>
+ <vlan-id>1255.ae81</vlan-id>
+ <border-element-type>VDBE</border-element-type>
+ <border-element-tangibility>VIRTUAL</border-element-tangibility>
+ <port-id></port-id>
+ <border-element-id>ALPVDBE1</border-element-id>
+ <border-element-v4-subnet>3.1.1.0/22</border-element-v4-subnet>
+ <lag-id>ae81</lag-id>
+ <border-element-v6-subnet>3:1:1::0/22</border-element-v6-subnet>
+ </vlan-list>
+ <vlan-list>
+ <vlan-id>1995.ae81</vlan-id>
+ <border-element-type>ASBG</border-element-type>
+ <border-element-tangibility>VIRTUAL</border-element-tangibility>
+ <port-id></port-id>
+ <border-element-id>ALPASBG1</border-element-id>
+ <border-element-v4-subnet>3.1.1.0/22</border-element-v4-subnet>
+ <lag-id>ae81</lag-id>
+ <border-element-v6-subnet>3:1:1::0/22</border-element-v6-subnet>
+ </vlan-list>
+ <vlan-list>
+ <vlan-id>85.xe-10/0/2</vlan-id>
+ <border-element-type>BGF2</border-element-type>
+ <border-element-tangibility>PHYSICAL</border-element-tangibility>
+ <port-id>xe-10/0/2</port-id>
+ <border-element-id>ALPBGF2</border-element-id>
+ <border-element-v4-subnet>3.1.2.0/22</border-element-v4-subnet>
+ <lag-id></lag-id>
+ <border-element-v6-subnet>3:1:2::0/22</border-element-v6-subnet>
+ </vlan-list>
+ <vlan-list>
+ <vlan-id>85.xe-10/0/1</vlan-id>
+ <border-element-type>BGF1</border-element-type>
+ <border-element-tangibility>PHYSICAL</border-element-tangibility>
+ <port-id>xe-10/0/1</port-id>
+ <border-element-id>ALPBGF1</border-element-id>
+ <border-element-v4-subnet>3.1.2.0/22</border-element-v4-subnet>
+ <lag-id></lag-id>
+ <border-element-v6-subnet>3:1:2::0/22</border-element-v6-subnet>
+ </vlan-list>
+ <ipe-id>1</ipe-id>
+ </router-list>
+ </virtual-datacenter-list>
+ <virtual-datacenter-list>
+ <vdc-id>15001418</vdc-id>
+ <router-list>
+ <router-name>SANRTR1</router-name>
+ <ipe-loopback-address>2.1.1.1</ipe-loopback-address>
+ <vlan-list>
+ <vlan-id>1255.ae81</vlan-id>
+ <border-element-type>VDBE</border-element-type>
+ <border-element-tangibility>VIRTUAL</border-element-tangibility>
+ <port-id></port-id>
+ <border-element-id>SANVDBE1</border-element-id>
+ <border-element-v4-subnet>4.1.1.0/22</border-element-v4-subnet>
+ <lag-id>ae81</lag-id>
+ <border-element-v6-subnet>4:1:1::0/22</border-element-v6-subnet>
+ </vlan-list>
+ <vlan-list>
+ <vlan-id>1995.ae81</vlan-id>
+ <border-element-type>ASBG</border-element-type>
+ <border-element-tangibility>VIRTUAL</border-element-tangibility>
+ <port-id></port-id>
+ <border-element-id>SANASBG1</border-element-id>
+ <border-element-v4-subnet>4.1.1.0/22</border-element-v4-subnet>
+ <lag-id>ae81</lag-id>
+ <border-element-v6-subnet>4:1:1::0/22</border-element-v6-subnet>
+ </vlan-list>
+ <vlan-list>
+ <vlan-id>85.xe-10/0/2</vlan-id>
+ <border-element-type>BGF2</border-element-type>
+ <border-element-tangibility>PHYSICAL</border-element-tangibility>
+ <port-id>xe-10/0/2</port-id>
+ <border-element-id>SANBGF2</border-element-id>
+ <border-element-v4-subnet>4.1.2.0/22</border-element-v4-subnet>
+ <lag-id></lag-id>
+ <border-element-v6-subnet>4:1:2::0/22</border-element-v6-subnet>
+ </vlan-list>
+ <vlan-list>
+ <vlan-id>85.xe-10/0/1</vlan-id>
+ <border-element-type>BGF1</border-element-type>
+ <border-element-tangibility>PHYSICAL</border-element-tangibility>
+ <port-id>xe-10/0/1</port-id>
+ <border-element-id>SANBGF1</border-element-id>
+ <border-element-v4-subnet>4.1.2.0/22</border-element-v4-subnet>
+ <lag-id></lag-id>
+ <border-element-v6-subnet>4:1:2::0/22</border-element-v6-subnet>
+ </vlan-list>
+ <ipe-id>1</ipe-id>
+ </router-list>
+ <router-list>
+ <router-name>SANRTR2</router-name>
+ <ipe-loopback-address>2.1.1.2</ipe-loopback-address>
+ <vlan-list>
+ <vlan-id>1255.ae81</vlan-id>
+ <border-element-type>VDBE</border-element-type>
+ <border-element-tangibility>VIRTUAL</border-element-tangibility>
+ <port-id></port-id>
+ <border-element-id>SANVDBE1</border-element-id>
+ <border-element-v4-subnet>4.1.1.0/22</border-element-v4-subnet>
+ <lag-id>ae81</lag-id>
+ <border-element-v6-subnet>4:1:1::0/22</border-element-v6-subnet>
+ </vlan-list>
+ <vlan-list>
+ <vlan-id>1995.ae81</vlan-id>
+ <border-element-type>ASBG</border-element-type>
+ <border-element-tangibility>VIRTUAL</border-element-tangibility>
+ <port-id></port-id>
+ <border-element-id>SANASBG1</border-element-id>
+ <border-element-v4-subnet>4.1.1.0/22</border-element-v4-subnet>
+ <lag-id>ae81</lag-id>
+ <border-element-v6-subnet>4:1:1::0/22</border-element-v6-subnet>
+ </vlan-list>
+ <vlan-list>
+ <vlan-id>85.xe-10/0/2</vlan-id>
+ <border-element-type>BGF2</border-element-type>
+ <border-element-tangibility>PHYSICAL</border-element-tangibility>
+ <port-id>xe-10/0/2</port-id>
+ <border-element-id>SANBGF2</border-element-id>
+ <border-element-v4-subnet>4.1.2.0/22</border-element-v4-subnet>
+ <lag-id></lag-id>
+ <border-element-v6-subnet>4:1:2::0/22</border-element-v6-subnet>
+ </vlan-list>
+ <vlan-list>
+ <vlan-id>85.xe-10/0/1</vlan-id>
+ <border-element-type>BGF1</border-element-type>
+ <border-element-tangibility>PHYSICAL</border-element-tangibility>
+ <port-id>xe-10/0/1</port-id>
+ <border-element-id>SANBGF1</border-element-id>
+ <border-element-v4-subnet>4.1.2.0/22</border-element-v4-subnet>
+ <lag-id></lag-id>
+ <border-element-v6-subnet>4:1:2::0/22</border-element-v6-subnet>
+ </vlan-list>
+ <ipe-id>2</ipe-id>
+ </router-list>
+ </virtual-datacenter-list>
+ <service-type>COLLABORATE</service-type>
+ <interface-status>DISABLE</interface-status>
+ <customer-id>custid-888</customer-id>
+ <service-instance-id>SII-2016-10-22-001</service-instance-id>
+ <provision-type>CUSTOMER</provision-type>
+ <vni-id>100668</vni-id>
+ </nbnc-response-information>
+ </output>
+ </tag0:RequestData>
+ </sdncadapterworkflow:response-data>
+</sdncadapterworkflow:SDNCAdapterWorkflowResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/aaiGetResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/aaiGetResponse.xml
new file mode 100644
index 0000000000..c367b5c959
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/aaiGetResponse.xml
@@ -0,0 +1,33 @@
+<service-instance xmlns="http://org.openecomp.aai.inventory/v11">
+ <service-instance-id>1234</service-instance-id>
+ <service-instance-name>volte-service</service-instance-name>
+ <service-type>testservicetype</service-type>
+ <service-role>testservicerole</service-role>
+ <description>volte service</description>
+ <model-invariant-id>c1d4305f-cdbd-4bbe-9069-a2f4978fd89e</model-invariant-id>
+ <model-version-id>d4df5c27-98a1-4812-a8aa-c17f055b7a3f</model-version-id>
+ <resource-version>1508838121849</resource-version>
+ <orchestration-status>create</orchestration-status>
+ <relationship-list>
+ <relationship>
+ <related-to>service-instance</related-to>
+ <related-link>/aai/v11/business/customers/customer/test_customer/service-subscription/example-service-type/service-instance/1234_1</related-link>
+ <relationship-data>
+ <relationship-key>customer.global-customer-id</relationship-key>
+ <relationship-value>test_customer</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-subscription.service-type</relationship-key>
+ <relationship-value>test_customer</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-instance.service-instance-id</relationship-key>
+ <relationship-value>1234_1</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>service-instance.service-instance-name</property-key>
+ <property-value>volte-service_vEPC</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+</service-instance> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getARUrlById.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getARUrlById.xml
new file mode 100644
index 0000000000..e178583a34
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getARUrlById.xml
@@ -0,0 +1,6 @@
+<search-results xmlns="http://org.openecomp.aai.inventory">
+ <result-data>
+ <resource-type>allotted-resource</resource-type>
+ <resource-link>https://aai-ext1.test.com:8443/aai/v7/business/customers/customer/SDN-ETHERNET-INTERNET/service-subscriptions/service-subscription/123456789/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET/allotted-resources/allotted-resource/arId-1</resource-link>
+ </result-data>
+</search-results> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getGenericVnfByNameResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getGenericVnfByNameResponse.xml
new file mode 100644
index 0000000000..a472996121
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getGenericVnfByNameResponse.xml
@@ -0,0 +1,23 @@
+<generic-vnfs xmlns="http://org.openecomp.aai.inventory/v3">
+ <generic-vnf>
+ <vnf-id>2f1cc940-455f-4ee2-9411-a7899cd4f124</vnf-id>
+ <vnf-name>testVnfName123</vnf-name>
+ <vnf-type>mmsc-capacity</vnf-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <equipment-role>vMMSC</equipment-role>
+ <orchestration-status>pending-create</orchestration-status>
+ <resource-version>testReVer123</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>nothing</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/c597ab81-fece-49f4-a4f5-710cebb13c29/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>c597ab81-fece-49f4-a4f5-710cebb13c29</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ <l-interfaces/>
+ <lag-interfaces/>
+ </generic-vnf>
+ </generic-vnfs> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getGenericVnfResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getGenericVnfResponse.xml
new file mode 100644
index 0000000000..8ba178cc1c
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getGenericVnfResponse.xml
@@ -0,0 +1,90 @@
+<generic-vnfs xmlns="http://org.openecomp.aai.inventory/v3">
+ <generic-vnf>
+ <vnf-id>2f1cc940-455f-4ee2-9411-a7899cd4f124</vnf-id>
+ <vnf-name>testVnfName123</vnf-name>
+ <vnf-type>mmsc-capacity</vnf-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <equipment-role>vMMSC</equipment-role>
+ <orchestration-status>pending-create</orchestration-status>
+ <relationship-list>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/c597ab81-fece-49f4-a4f5-710cebb13c29/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>c597ab81-fece-49f4-a4f5-710cebb13c29</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/53956c91-6e5e-49aa-88dd-535f57e66e70/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>53956c91-6e5e-49aa-88dd-535f57e66e70</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/44e0d9e0-9334-4ec6-9344-07a96dac629f/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>44e0d9e0-9334-4ec6-9344-07a96dac629f</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/ac49d99b-5daf-4624-9f8e-188b126ea166/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>ac49d99b-5daf-4624-9f8e-188b126ea166</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ <l-interfaces/>
+ <lag-interfaces/>
+ </generic-vnf>
+ <generic-vnf>
+ <vnf-id>802767b3-18a6-4432-96db-25522786aee0</vnf-id>
+ <vnf-name>ZRDM1MMSC03</vnf-name>
+ <vnf-type>mmsc-capacity</vnf-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <equipment-role>vMMSC</equipment-role>
+ <orchestration-status>pending-create</orchestration-status>
+ <relationship-list>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/c597ab81-fece-49f4-a4f5-710cebb13c29/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>c597ab81-fece-49f4-a4f5-710cebb13c29</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/53956c91-6e5e-49aa-88dd-535f57e66e70/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>53956c91-6e5e-49aa-88dd-535f57e66e70</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/44e0d9e0-9334-4ec6-9344-07a96dac629f/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>44e0d9e0-9334-4ec6-9344-07a96dac629f</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/ac49d99b-5daf-4624-9f8e-188b126ea166/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>ac49d99b-5daf-4624-9f8e-188b126ea166</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ <l-interfaces/>
+ <lag-interfaces/>
+ </generic-vnf>
+ </generic-vnfs> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getGenericVnfResponse_hasRelationships.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getGenericVnfResponse_hasRelationships.xml
new file mode 100644
index 0000000000..8ba178cc1c
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getGenericVnfResponse_hasRelationships.xml
@@ -0,0 +1,90 @@
+<generic-vnfs xmlns="http://org.openecomp.aai.inventory/v3">
+ <generic-vnf>
+ <vnf-id>2f1cc940-455f-4ee2-9411-a7899cd4f124</vnf-id>
+ <vnf-name>testVnfName123</vnf-name>
+ <vnf-type>mmsc-capacity</vnf-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <equipment-role>vMMSC</equipment-role>
+ <orchestration-status>pending-create</orchestration-status>
+ <relationship-list>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/c597ab81-fece-49f4-a4f5-710cebb13c29/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>c597ab81-fece-49f4-a4f5-710cebb13c29</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/53956c91-6e5e-49aa-88dd-535f57e66e70/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>53956c91-6e5e-49aa-88dd-535f57e66e70</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/44e0d9e0-9334-4ec6-9344-07a96dac629f/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>44e0d9e0-9334-4ec6-9344-07a96dac629f</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/ac49d99b-5daf-4624-9f8e-188b126ea166/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>ac49d99b-5daf-4624-9f8e-188b126ea166</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ <l-interfaces/>
+ <lag-interfaces/>
+ </generic-vnf>
+ <generic-vnf>
+ <vnf-id>802767b3-18a6-4432-96db-25522786aee0</vnf-id>
+ <vnf-name>ZRDM1MMSC03</vnf-name>
+ <vnf-type>mmsc-capacity</vnf-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <equipment-role>vMMSC</equipment-role>
+ <orchestration-status>pending-create</orchestration-status>
+ <relationship-list>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/c597ab81-fece-49f4-a4f5-710cebb13c29/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>c597ab81-fece-49f4-a4f5-710cebb13c29</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/53956c91-6e5e-49aa-88dd-535f57e66e70/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>53956c91-6e5e-49aa-88dd-535f57e66e70</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/44e0d9e0-9334-4ec6-9344-07a96dac629f/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>44e0d9e0-9334-4ec6-9344-07a96dac629f</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/ac49d99b-5daf-4624-9f8e-188b126ea166/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>ac49d99b-5daf-4624-9f8e-188b126ea166</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ <l-interfaces/>
+ <lag-interfaces/>
+ </generic-vnf>
+ </generic-vnfs> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getNotFound.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getNotFound.xml
new file mode 100644
index 0000000000..f66c9c4fb8
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getNotFound.xml
@@ -0,0 +1,2 @@
+<search-results xmlns="http://org.openecomp.aai.inventory">
+</search-results> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getParentSIUrlById.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getParentSIUrlById.xml
new file mode 100644
index 0000000000..c29133e539
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getParentSIUrlById.xml
@@ -0,0 +1,6 @@
+<search-results xmlns="http://org.openecomp.aai.inventory">
+ <result-data>
+ <resource-type>service-instance</resource-type>
+ <resource-link>https://aai-ext1.test.com:8443/aai/v7/business/customers/customer/SDN-ETHERNET-INTERNET/service-subscriptions/service-subscription/123456789/service-instances/service-instance/MIS%252F1604%252F0027%252FSW_INTERNET</resource-link>
+ </result-data>
+</search-results> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getParentServiceInstance.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getParentServiceInstance.xml
new file mode 100644
index 0000000000..bc810c6014
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getParentServiceInstance.xml
@@ -0,0 +1,30 @@
+<service-instance>
+ <service-instance-id>MIS/1604/0027/SW_INTERNET</service-instance-id>
+ <resource-version>123456789</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>cvlan-tag</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v2/network/vces/vce/832bace2-3fb0-49e0-a6a4-07c47223c535/port-groups/port-group/slcp1447vbc.ipag/cvlan-tags/cvlan-tag/2003/</related-link>
+ <relationship-data>
+ <relationship-key>cvlan-tag.cvlan-tag</relationship-key>
+ <relationship-value>2003</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>port-group.interface-id</relationship-key>
+ <relationship-value>slcp1447vbc.ipag</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>vce.vnf-id</relationship-key>
+ <relationship-value>832bace2-3fb0-49e0-a6a4-07c47223c535</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vce</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v2/network/vces/vce/832bace2-3fb0-49e0-a6a4-07c47223c535/</related-link>
+ <relationship-data>
+ <relationship-key>vce.vnf-id</relationship-key>
+ <relationship-value>832bace2-3fb0-49e0-a6a4-07c47223c535</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+</service-instance>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getSINoRelations.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getSINoRelations.xml
new file mode 100644
index 0000000000..e52b26ac00
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getSINoRelations.xml
@@ -0,0 +1,6 @@
+<service-instance>
+ <service-instance-id>MIS/1604/0026/SW_INTERNET</service-instance-id>
+ <resource-version>123456789</resource-version>
+ <relationship-list/>
+ <metadata/>
+</service-instance> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getSIUrlById.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getSIUrlById.xml
new file mode 100644
index 0000000000..416689e10c
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getSIUrlById.xml
@@ -0,0 +1,6 @@
+ <search-results xmlns="http://org.openecomp.aai.inventory">
+ <result-data>
+ <resource-type>service-instance</resource-type>
+ <resource-link>https://aai-ext1.test.com:8443/aai/v7/business/customers/customer/SDN-ETHERNET-INTERNET/service-subscriptions/service-subscription/123456789/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET</resource-link>
+ </result-data>
+ </search-results> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getSIUrlByIdVipr.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getSIUrlByIdVipr.xml
new file mode 100644
index 0000000000..28c739a0af
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getSIUrlByIdVipr.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<search-results xmlns="http://org.openecomp.aai.inventory/v8">
+ <result-data>
+ <resource-type>service-instance</resource-type>
+ <resource-link>https://aai-int1.test.com:8443/aai/v8/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/aa8428ac-7dd2-441f-aa3e-e175802574fb</resource-link>
+ </result-data>
+</search-results> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getServiceInstance.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getServiceInstance.xml
new file mode 100644
index 0000000000..e377c70474
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/GenericFlows/getServiceInstance.xml
@@ -0,0 +1,30 @@
+<service-instance>
+ <service-instance-id>MIS/1604/0026/SW_INTERNET</service-instance-id>
+ <resource-version>123456789</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>cvlan-tag</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v2/network/vces/vce/832bace2-3fb0-49e0-a6a4-07c47223c535/port-groups/port-group/slcp1447vbc.ipag/cvlan-tags/cvlan-tag/2003/</related-link>
+ <relationship-data>
+ <relationship-key>cvlan-tag.cvlan-tag</relationship-key>
+ <relationship-value>2003</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>port-group.interface-id</relationship-key>
+ <relationship-value>slcp1447vbc.ipag</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>vce.vnf-id</relationship-key>
+ <relationship-value>832bace2-3fb0-49e0-a6a4-07c47223c535</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vce</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v2/network/vces/vce/832bace2-3fb0-49e0-a6a4-07c47223c535/</related-link>
+ <relationship-data>
+ <relationship-key>vce.vnf-id</relationship-key>
+ <relationship-value>832bace2-3fb0-49e0-a6a4-07c47223c535</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </service-instance> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/ConfigVnf_VID_request.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/ConfigVnf_VID_request.json
new file mode 100644
index 0000000000..04040028c3
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/ConfigVnf_VID_request.json
@@ -0,0 +1,39 @@
+{
+"requestDetails": {
+"modelInfo": {
+"modelType": "vnf",
+"modelInvariantUuid": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+"modelUuid": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+"modelName": "vSAMP12",
+"modelVersion": "1.0",
+"modelCustomizationUuid": "MODEL-ID-1234"
+},
+"cloudConfiguration": {
+"lcpCloudRegionId": "mdt1",
+"tenantId": "fba1bd1e195a404cacb9ce17a9b2b421"
+},
+"requestInfo": {
+"instanceName": "STMTN",
+"instanceId": "skask",
+"source": "VID",
+"suppressRollback": true
+},
+"relatedInstanceList": [
+{
+"relatedInstance": {
+"instanceId": "MIS%2F1604%2F0026%2FSW_INTERNET",
+"modelInfo": {
+"modelType": "service",
+"modelInvariantUuid": "995256d2-5a33-55df-13ab-12abad84e7ff",
+"modelUuid": "ab6478e5-ea33-3346-ac12-ab121484a3fe",
+"modelName": "ServicevSAMP12",
+"modelVersion": "1.0"
+}
+}
+}
+],
+"requestParameters": {
+"payload": "{\"request-parameters\":{\"host-ip-address\":\"10.10.10.10\"},\"configuration- parameters\":{\"name1\":\"value1\",\"name2\":\"value2\"}}"
+}
+}
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/CreateVnfInfraRequest.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/CreateVnfInfraRequest.json
new file mode 100644
index 0000000000..c1491d128b
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/CreateVnfInfraRequest.json
@@ -0,0 +1,46 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantUuid": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelInstanceName": "vSAMP12 1",
+ "modelCustomizationUuid": "customizationId123"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "testVnfName123",
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "{serviceInstanceId}",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantUuid": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "{parent service model name}",
+ "modelVersion": "1.0"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ },
+ "platform": {
+ "platformName": "platform name"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "line of business names"
+ }
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/DeleteCustomE2EService.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/DeleteCustomE2EService.json
new file mode 100644
index 0000000000..661a89ec99
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/DeleteCustomE2EService.json
@@ -0,0 +1,21 @@
+{
+ "requestDetails": {
+ "requestInfo": {
+ "callbackUrl": "http://localhost:28080/simulada/CCD/AsyncRequestStatus",
+ "source": "CCD",
+ "instanceName": "USOSTCDALTX0101VFHN31"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "38829939920000",
+ "subscriberName": "Fern Hill Real Estate LLC 31"
+ },
+ "requestParameters": {
+ "userParams": [
+ {
+ "name": "someUserParam",
+ "value": "someValue"
+ }
+ ]
+ }
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/DeleteVnfInfraRequestCascadeDelete.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/DeleteVnfInfraRequestCascadeDelete.json
new file mode 100644
index 0000000000..e8d9fc29b1
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/DeleteVnfInfraRequestCascadeDelete.json
@@ -0,0 +1,39 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantUuid": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelInstanceName": "vSAMP12 1"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "testVnfName123",
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "{serviceInstanceId}",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantUuid": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "{parent service model name}",
+ "modelVersion": "1.0"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "cascadeDelete": true
+ }
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/DoCreateServiceInstance_request.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/DoCreateServiceInstance_request.json
new file mode 100644
index 0000000000..640e16b634
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/DoCreateServiceInstance_request.json
@@ -0,0 +1,186 @@
+{ "serviceResources" : {
+ "modelInfo" : {
+ "modelName" : "MSOTADevInfra_vSAMP10a_Service",
+ "modelUuid" : "5df8b6de-2083-11e7-93ae-92361f002671",
+ "modelInvariantUuid" : "9647dfc4-2083-11e7-93ae-92361f002671",
+ "modelVersion" : "1.0"
+ },
+ "serviceType" : "PortMirroring",
+ "serviceRole" : "InfraRole",
+ "environmentContext" : "Luna",
+ "workloadContext" : "Oxygen",
+ "serviceVnfs": [
+
+ { "modelInfo" : {
+ "modelName" : "vSAMP10a",
+ "modelUuid" : "ff2ae348-214a-11e7-93ae-92361f002671",
+ "modelInvariantUuid" : "2fff5b20-214b-11e7-93ae-92361f002671",
+ "modelVersion" : "1.0",
+ "modelCustomizationUuid" : "68dc9a92-214c-11e7-93ae-92361f002671",
+ "modelInstanceName" : "vSAMP10a 1"
+ },
+ "toscaNodeType" : "VF",
+ "nfFunction" : null,
+ "nfType" : null,
+ "nfRole" : null,
+ "nfNamingCode" : null,
+ "multiStageDesign" : null,
+ "vfModules": [
+ {
+ "modelInfo" : {
+ "modelName" : "NetworkFqdnTest4",
+ "modelUuid" : "025606c1-4223-11e7-9252-005056850d2e",
+ "modelInvariantUuid" : "06bd0a18-65c0-4418-83c7-5b0d13cba01a",
+ "modelVersion" : "2.0",
+ "modelCustomizationUuid" : "06bd0a18-65c0-4418-83c7-5b0d13cba01a"
+ }, "isBase" : true,
+ "vfModuleLabel" : "label",
+ "initialCount" : 0,
+ "hasVolumeGroup" : true
+ },
+ {
+ "modelInfo" : {
+ "modelName" : "NetworkFqdnTest3",
+ "modelUuid" : "02560575-4223-11e7-9252-005056850d2e",
+ "modelInvariantUuid" : "06bd0a18-65c0-4418-83c7-5b0d13cba0bb",
+ "modelVersion" : "1.0",
+ "modelCustomizationUuid" : "06bd0a18-65c0-4418-83c7-5b0d13cba0bb"
+ }, "isBase" : true,
+ "vfModuleLabel" : "label",
+ "initialCount" : 0,
+ "hasVolumeGroup" : false
+ },
+ {
+ "modelInfo" : {
+ "modelName" : "NetworkFqdnTest5",
+ "modelUuid" : "025607e4-4223-11e7-9252-005056850d2e",
+ "modelInvariantUuid" : "06bd0a18-65c0-4418-83c7-5b0d14cba01a",
+ "modelVersion" : "1.0",
+ "modelCustomizationUuid" : "06bd0a18-65c0-4418-83c7-5b0d14cba01a"
+ }, "isBase" : false,
+ "vfModuleLabel" : "label",
+ "initialCount" : 0,
+ "hasVolumeGroup" : false
+ },
+ {
+ "modelInfo" : {
+ "modelName" : "vSAMP10aDEV::PCM::module-2",
+ "modelUuid" : "7774b4e4-7d37-11e7-bb31-be2e44b06b34",
+ "modelInvariantUuid" : "93e9c1d2-7d37-11e7-bb31-be2e44b06b34",
+ "modelVersion" : "2",
+ "modelCustomizationUuid" : "6728bee8-7d3a-11e7-bb31-be2e44b06b34"
+ }, "isBase" : false,
+ "vfModuleLabel" : "PCM",
+ "initialCount" : 0,
+ "hasVolumeGroup" : true
+ },
+ {
+ "modelInfo" : {
+ "modelName" : "vSAMP10aDEV::PCM::module-1",
+ "modelUuid" : "066de97e-253e-11e7-93ae-92361f002671",
+ "modelInvariantUuid" : "64efd51a-2544-11e7-93ae-92361f002671",
+ "modelVersion" : "2",
+ "modelCustomizationUuid" : "b4ea86b4-253f-11e7-93ae-92361f002671"
+ }, "isBase" : false,
+ "vfModuleLabel" : "PCM",
+ "initialCount" : 0,
+ "hasVolumeGroup" : true
+ },
+ {
+ "modelInfo" : {
+ "modelName" : "vSAMP10aDEV::base::module-0",
+ "modelUuid" : "20c4431c-246d-11e7-93ae-92361f002671",
+ "modelInvariantUuid" : "78ca26d0-246d-11e7-93ae-92361f002671",
+ "modelVersion" : "2",
+ "modelCustomizationUuid" : "cb82ffd8-252a-11e7-93ae-92361f002671"
+ }, "isBase" : true,
+ "vfModuleLabel" : "base",
+ "initialCount" : 1,
+ "hasVolumeGroup" : true
+ },
+ {
+ "modelInfo" : {
+ "modelName" : "vSAMP10a::base::module-0",
+ "modelUuid" : "02560de2-4223-11e7-9252-005056850d2e",
+ "modelInvariantUuid" : null,
+ "modelVersion" : "2",
+ "modelCustomizationUuid" : "MIGRATED_36e76920-ef30-4793-9979-cbd7d4b2bfc4"
+ }, "isBase" : true,
+ "vfModuleLabel" : "base",
+ "initialCount" : 1,
+ "hasVolumeGroup" : true
+ },
+ {
+ "modelInfo" : {
+ "modelName" : "base::module-0",
+ "modelUuid" : "02561381-4223-11e7-9252-005056850d2e",
+ "modelInvariantUuid" : null,
+ "modelVersion" : "1",
+ "modelCustomizationUuid" : "MIGRATED_51baae4c-b7c7-4f57-b77e-6e01acca89e5"
+ }, "isBase" : true,
+ "vfModuleLabel" : "module-0",
+ "initialCount" : 1,
+ "hasVolumeGroup" : false
+ },
+ {
+ "modelInfo" : {
+ "modelName" : "vSAMP10a::PCM::module-1",
+ "modelUuid" : "02560f1b-4223-11e7-9252-005056850d2e",
+ "modelInvariantUuid" : null,
+ "modelVersion" : "1",
+ "modelCustomizationUuid" : "MIGRATED_e9be2ed7-45b6-479c-b06e-9093899f8ce8"
+ }, "isBase" : true,
+ "vfModuleLabel" : "PCM",
+ "initialCount" : 1,
+ "hasVolumeGroup" : true
+ }
+ ]
+ }
+ ],
+ "serviceNetworks": [],
+ "serviceAllottedResources": [
+ {
+ "modelInfo" : {
+ "modelName" : "Tunnel_Xconn",
+ "modelUuid" : "f6b7d4c6-e8a4-46e2-81bc-31cad5072842",
+ "modelInvariantUuid" : "b7a1b78e-6b6b-4b36-9698-8c9530da14af",
+ "modelVersion" : "1.0",
+ "modelCustomizationUuid" : "5b9bee43-f537-4fb3-9e8b-4de9f714d28a",
+ "modelInstanceName" : "Pri_Tunnel_Xconn 9"
+ },
+ "toscaNodeType" : null,
+ "allottedResourceType" : null,
+ "allottedResourceRole" : null,
+ "providingServiceModelInvariantUuid" : null,
+ "nfFunction" : null,
+ "nfType" : null,
+ "nfRole" : null,
+ "nfNamingCode" : null
+ }
+ ],
+ "serviceConfigs": [
+ {
+ "modelInfo" : {
+ "modelName" : "Mulder",
+ "modelUuid" : "025606c1-4fff-11e7-9252-005056850d2e",
+ "modelInvariantUuid" : "025606c1-4eee-11e7-9252-005056850d2e",
+ "modelVersion" : "1.0",
+ "modelCustomizationUuid" : "025606c1-4ddd-11e7-9252-005056850d2e",
+ "modelInstanceName" : "X_FILES_001"
+ },
+ "toscaNodeType" : "Scully"
+ },
+ {
+ "modelInfo" : {
+ "modelName" : "Krychuk",
+ "modelUuid" : "025606c1-5fff-11e7-9252-005056850d2e",
+ "modelInvariantUuid" : "025606c1-5eee-11e7-9252-005056850d2e",
+ "modelVersion" : "1.0",
+ "modelCustomizationUuid" : "025606c1-5ddd-11e7-9252-005056850d2e",
+ "modelInstanceName" : "X_FILES_002"
+ },
+ "toscaNodeType" : "Skinner"
+ }
+ ]
+ }}
+
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/DoScaleE2EServiceInstance.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/DoScaleE2EServiceInstance.json
new file mode 100644
index 0000000000..dd3ff6841e
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/DoScaleE2EServiceInstance.json
@@ -0,0 +1,38 @@
+{
+ "service":
+ {
+ "serviceType":"example-service-type",
+ "globalSubscriberId":"test_custormer",
+ "resources":
+ [
+ {
+ "resourceInstanceId":"ns111",
+ "scaleType":"SCALE_NS",
+ "scaleNsData":
+ {
+ "scaleNsByStepsData":
+ {
+ "numberOfSteps":"4",
+ "aspectId":"TIC_EDGE_HW",
+ "scalingDirection":"UP"
+ }
+ }
+ },
+ {
+ "resourceInstanceId":"ns333",
+ "scaleType":"SCALE_NS",
+ "scaleNsData":
+ {
+ "scaleNsByStepsData":
+ {
+ "numberOfSteps":"4",
+ "aspectId":"TIC_EDGE_HW",
+ "scalingDirection":"UP"
+ }
+ }
+ }
+ ],
+ "serviceInstanceName":"service1"
+ },
+ "operationId":"15c01683-4f15-45e7-b213-dcbfe6f42a1b"
+ } \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/ReplaceVnf_VID_request.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/ReplaceVnf_VID_request.json
new file mode 100644
index 0000000000..7c9717244b
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/ReplaceVnf_VID_request.json
@@ -0,0 +1,49 @@
+{
+"requestDetails": {
+"modelInfo": {
+"modelType": "vnf",
+"modelInvariantUuid": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+"modelUuid": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+"modelName": "vSAMP12",
+"modelVersion": "1.0",
+"modelCustomizationUuid": "MODEL-ID-1234"
+},
+"cloudConfiguration": {
+"lcpCloudRegionId": "mdt1",
+"tenantId": "88a6ca3ee0394ade9403f075db23167e"
+},
+"requestInfo": {
+"instanceName": "STMTN",
+"instanceId": "a27ce5a9-29c4-4c22-a017-6615ac73c721",
+"source": "VID",
+"suppressRollback": true
+},
+"relatedInstanceList": [
+{
+"relatedInstance": {
+"instanceId": "MIS%2F1604%2F0026%2FSW_INTERNET",
+"modelInfo": {
+"modelType": "service",
+"modelInvariantUuid": "995256d2-5a33-55df-13ab-12abad84e7ff",
+"modelUuid": "ab6478e5-ea33-3346-ac12-ab121484a3fe",
+"modelName": "ServicevSAMP12",
+"modelVersion": "1.0"
+}
+}
+}
+],
+"requestParameters": {
+"usePreload": false,
+"userParams" : [
+ {
+ "name" : "someUserParam",
+ "value" : "someValue"
+ },
+ {
+ "name": "sgi_protected_subnet_id",
+ "value": "thisissomefakevalue"
+ }
+]
+}
+}
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/UpdateVfModule_VID_request.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/UpdateVfModule_VID_request.json
new file mode 100644
index 0000000000..9564f705ae
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/UpdateVfModule_VID_request.json
@@ -0,0 +1,62 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vfModule",
+ "modelInvariantUuid": "introvert",
+ "modelUuid": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "STMTN5MMSC21-MMSC::model-1-0",
+ "modelVersion": "1",
+ "modelCustomizationUuid": "MODEL12345"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "MDTWNJ21",
+ "tenantId": "fba1bd1e195a404cacb9ce17a9b2b421"
+ },
+ "requestInfo": {
+ "instanceName": "PCRF::module-0",
+ "instanceId": "supercool",
+ "source": "VID",
+ "suppressRollback": true
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "123456",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantUuid": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "SERVICE_MODEL_NAME",
+ "modelVersion": "1.0"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "skask",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantUuid": "skask",
+ "modelUuid": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelInstanceName": "vSAMP12 1"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "usePreload": false,
+ "userParams": [
+ {
+ "name": "someUserParam",
+ "value": "someValue"
+ },
+ {
+ "name": "sgi_protected_subnet_id",
+ "value": "thisissomefakevalue"
+ }
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/UpdateVnf_VID_request.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/UpdateVnf_VID_request.json
new file mode 100644
index 0000000000..5ce8546a41
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/UpdateVnf_VID_request.json
@@ -0,0 +1,56 @@
+{
+"requestDetails": {
+"modelInfo": {
+"modelType": "vnf",
+"modelInvariantUuid": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+"modelUuid": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+"modelName": "vSAMP12",
+"modelVersion": "1.0",
+"modelCustomizationUuid": "MODEL-ID-1234"
+},
+"cloudConfiguration": {
+"lcpCloudRegionId": "mdt1",
+"tenantId": "fba1bd1e195a404cacb9ce17a9b2b421"
+},
+"requestInfo": {
+"instanceName": "STMTN",
+"instanceId": "skask",
+"source": "VID",
+"suppressRollback": true
+},
+"relatedInstanceList": [
+{
+"relatedInstance": {
+"instanceId": "MIS%2F1604%2F0026%2FSW_INTERNET",
+"modelInfo": {
+"modelType": "service",
+"modelInvariantUuid": "995256d2-5a33-55df-13ab-12abad84e7ff",
+"modelUuid": "ab6478e5-ea33-3346-ac12-ab121484a3fe",
+"modelName": "ServicevSAMP12",
+"modelVersion": "1.0"
+}
+}
+}
+],
+"requestParameters": {
+"usePreload": false,
+"userParams" : [
+ {
+ "name" : "someUserParam",
+ "value" : "someValue"
+ },
+ {
+ "name": "sgi_protected_subnet_id",
+ "value": "thisissomefakevalue"
+ },
+ {
+ "name": "vlc_sctp_b_route_prefixes",
+ "value": [
+ { "interface_route_table_routes_route_prefix": "107.239.41.163/32" },
+ { "interface_route_table_routes_route_prefix": "107.239.41.164/32" },
+ { "interface_route_table_routes_route_prefix": "107.239.41.165/32" }
+ ]}
+]
+}
+}
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/VnfInPlaceUpdate_VID_request.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/VnfInPlaceUpdate_VID_request.json
new file mode 100644
index 0000000000..eb2d9faa2a
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/InfrastructureFlows/VnfInPlaceUpdate_VID_request.json
@@ -0,0 +1,16 @@
+{
+"requestDetails": {
+"cloudConfiguration": {
+"lcpCloudRegionId": "mdt1",
+"tenantId": "fba1bd1e195a404cacb9ce17a9b2b421"
+},
+"requestInfo": {
+"source": "VID",
+"requestorId": "xxxxxx"
+},
+"requestParameters": {
+"payload":
+"{\"existing-software-version\": \"3.1\",\"new-software-version\": \"3.2\", \"operations-timeout\": \"3600\"}"
+}
+}
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Macro/CreateNetworkCollection.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Macro/CreateNetworkCollection.json
new file mode 100644
index 0000000000..7b369ab97e
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Macro/CreateNetworkCollection.json
@@ -0,0 +1,70 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "5d48acb5-097d-4982-aeb2-f4a3bd87d31b",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelName": "MOW AVPN vMX BV vPE 1 Service",
+ "modelVersion": "10"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "owningEntity": {
+ "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
+ "owningEntityName": "PACKET CORE"
+ },
+ "project": {
+ "projectName": "{some project name}"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "{some subscriber id}"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx"
+ },
+ "requestParameters": {
+ "subscriptionServiceType": "VMX",
+ "aLaCarte": false,
+ "userParams": [
+ {
+ "service": {
+ "modelInfo": {
+ "modelName": "MOW AVPN vMX BV vPE 1 Service",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a"
+ },
+ "instanceParams": [],
+ "resources": {
+ "networks": [
+ {
+ "modelInfo": {
+ "modelName": "201673MowAvpnVpeBvL..AVPN_vRE_BV..module-1",
+ "modelCustomizationId": "da4d4327-fb7d-4311-ac7a-be7ba60cf970"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ }
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowAvpnVpeBvL..AVPN_vRE_BV..module-1",
+ "modelCustomizationId": "da4d4327-fb7d-4311-ac7a-be7ba60cf970"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Macro/ServiceMacroAssign.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Macro/ServiceMacroAssign.json
new file mode 100644
index 0000000000..51caddd48a
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Macro/ServiceMacroAssign.json
@@ -0,0 +1,125 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "5d48acb5-097d-4982-aeb2-f4a3bd87d31b",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelName": "MOW AVPN vMX BV vPE 1 Service",
+ "modelVersion": "10.0"
+ },
+ "owningEntity": {
+ "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
+ "owningEntityName": "PACKET CORE"
+ },
+ "project": {
+ "projectName": "{some project name}"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "{some subscriber id}"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx"
+ },
+ "requestParameters": {
+ "subscriptionServiceType": "VMX",
+ "aLaCarte": false,
+ "userParams": [
+ {
+ "service": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelName": "MOW AVPN vMX BV vPE 1 Service",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a"
+ },
+ "instanceParams": [],
+ "resources": {
+ "vnfs": [
+ {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelName": "2016-73_MOW-AVPN-vPE-BV-L",
+ "modelVersionId": "7f40c192-f63c-463e-ba94-286933b895f8",
+ "modelCustomizationName": "2016-73_MOW-AVPN-vPE-BV-L 0",
+ "modelCustomizationId": "ab153b6e-c364-44c0-bef6-1f2982117f04"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "platform": {
+ "platformName": "test"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "someValue"
+ },
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "instanceParams": [],
+ "vfModules": [
+ {
+ "modelInfo": {
+ "modelType": "vfModule",
+ "modelName": "201673MowAvpnVpeBvL..AVPN_base_vPE_BV..module-0",
+ "modelVersionId": "4c75f813-fa91-45a4-89d0-790ff5f1ae79",
+ "modelCustomizationId": "a25e8e8c-58b8-4eec-810c-97dcc1f5cb7f"
+ },
+ "instanceParams": [
+ {
+ "vmx_int_net_len": "24"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelType": "vfModule",
+ "modelName": "201673MowAvpnVpeBvL..AVPN_vRE_BV..module-1",
+ "modelVersionId": "56e2b103-637c-4d1a-adc8-3a7f4a6c3240",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "100"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelType": "vfModule",
+ "modelName": "201673MowAvpnVpeBvL..AVPN_vRE_BV..module-1",
+ "modelVersionId": "56e2b103-637c-4d1a-adc8-3a7f4a6c3240",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "50"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelType": "vfModule",
+ "modelName": "201673MowAvpnVpeBvL..AVPN_vPFE_BV..module-2",
+ "modelVersionId": "f555558f-d538-4876-8ffa-b102650fad64",
+ "modelCustomizationId": "da4d4327-fb7d-4311-ac7a-be7ba60cf969"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vmx_vpfe_int_ip_0": "192.168.0.16"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Policy/policyAbortResponse.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Policy/policyAbortResponse.json
new file mode 100644
index 0000000000..c315b1ed1d
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Policy/policyAbortResponse.json
@@ -0,0 +1 @@
+{"decision":"PERMIT","details":"Abort"} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Policy/policySkipResponse.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Policy/policySkipResponse.json
new file mode 100644
index 0000000000..7cbdebb6b3
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Policy/policySkipResponse.json
@@ -0,0 +1 @@
+{"decision":"PERMIT","details":"Skip"} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Schemas/ActivateServiceInstance.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Schemas/ActivateServiceInstance.json
new file mode 100644
index 0000000000..5a6460b62d
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Schemas/ActivateServiceInstance.json
@@ -0,0 +1,7 @@
+{
+ "ActivateServiceInstance": {
+ "serviceInstance": {
+ "@class": "inventory.aai.onap.org.v12.ServiceInstance"
+ }
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Schemas/ActivateVnfSchema.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Schemas/ActivateVnfSchema.json
new file mode 100644
index 0000000000..57ab9c2799
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Schemas/ActivateVnfSchema.json
@@ -0,0 +1,13 @@
+{
+ "ActivateVnf": {
+ "serviceInstance": {
+ "@class": "inventory.aai.onap.org.v12.ServiceInstance"
+ },
+ "customer": {
+ "@class": "inventory.aai.onap.org.v12.Customer"
+ },
+ "genericVnf": {
+ "@class": "inventory.aai.onap.org.v12.GenericVnf"
+ }
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Schemas/AssignServiceInstanceSchema.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Schemas/AssignServiceInstanceSchema.json
new file mode 100644
index 0000000000..7c35761461
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Schemas/AssignServiceInstanceSchema.json
@@ -0,0 +1,16 @@
+{
+ "AssignServiceInstance": {
+ "serviceInstance": {
+ "@class": "inventory.aai.onap.org.v12.ServiceInstance"
+ },
+ "project": {
+ "@class": "inventory.aai.onap.org.v12.Project"
+ },
+ "owningEntity": {
+ "@class": "inventory.aai.onap.org.v12.OwningEntity"
+ },
+ "customer": {
+ "@class": "inventory.aai.onap.org.v12.Customer"
+ }
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Schemas/AssignVnfSchema.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Schemas/AssignVnfSchema.json
new file mode 100644
index 0000000000..7fff5ca3ce
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/Schemas/AssignVnfSchema.json
@@ -0,0 +1,13 @@
+{
+ "AssignVnf": {
+ "serviceInstance": {
+ "@class": "inventory.aai.onap.org.v12.ServiceInstance"
+ },
+ "customer": {
+ "@class": "inventory.aai.onap.org.v12.Customer"
+ },
+ "genericVnf": {
+ "@class": "inventory.aai.onap.org.v12.GenericVnf"
+ }
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/sdncUpdateNetworkTopologySimResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/sdncUpdateNetworkTopologySimResponse.xml
new file mode 100644
index 0000000000..836b3c8055
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/sdncUpdateNetworkTopologySimResponse.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:v1="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <soapenv:Header />
+ <soapenv:Body>
+ <SDNCAdapterCallbackRequest xmlns="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <CallbackHeader>
+ <RequestId>testRequestId</RequestId>
+ <ResponseCode>200</ResponseCode>
+ <ResponseMessage>OK</ResponseMessage>
+ </CallbackHeader>
+ <RequestData xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:type="xs:string">&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;output xmlns="com:att:sdnctl:vnf"&gt;&lt;svc-request-id&gt;19174929-3809-49ca-89eb-17f84a035389&lt;/svc-request-id&gt;&lt;response-code&gt;200&lt;/response-code&gt;&lt;ack-final-indicator&gt;Y&lt;/ack-final-indicator&gt;&lt;network-information&gt;&lt;network-id&gt;49c86598-f766-46f8-84f8-8d1c1b10f9b4&lt;/network-id&gt;&lt;/network-information&gt;&lt;service-information&gt;&lt;service-type&gt;a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb&lt;/service-type&gt;&lt;service-instance-id&gt;HSL_direct_net_2&lt;/service-instance-id&gt;&lt;subscriber-name&gt;notsurewecare&lt;/subscriber-name&gt;&lt;/service-information&gt;&lt;/output&gt;</RequestData>
+ </SDNCAdapterCallbackRequest>
+ </soapenv:Body>
+</soapenv:Envelope>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_400.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_400.xml
new file mode 100644
index 0000000000..a5640b2b26
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_400.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<createNetworkError>
+<messageId>680bd458-5ec1-4a16-b77c-509022e53450</messageId><category>INTERNAL</category>
+<message>400 Bad Request: The server could not comply with the request since it is either malformed or otherwise incorrect., error.type=StackValidationFailed, error.message=Property error: : resources.network.properties: : Unknown Property network_ipam_refs_data</message>
+<rolledBack>true</rolledBack>
+</createNetworkError>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_500.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_500.xml
new file mode 100644
index 0000000000..02996a13ea
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_500.xml
@@ -0,0 +1,80 @@
+<html>
+ <head>
+ <title>JBoss Web/7.2.2.Final-redhat-1 - JBWEB000064: Error report
+ </title>
+ <style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
+ H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}
+ H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}
+ BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;}
+ B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}
+ P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A
+ {color : black;}A.name {color : black;}HR {color : #525D76;} -->
+ </style>
+ </head>
+ <body>
+ <h1>JBWEB000065: HTTP Status 500 - java.lang.NullPointerException</h1>
+ <HR size="1" noshade="noshade" />
+ <p>
+ <b>JBWEB000309: type</b>
+ JBWEB000066: Exception report
+ </p>
+ <p>
+ <b>JBWEB000068: message</b>
+ <u>java.lang.NullPointerException</u>
+ </p>
+ <p>
+ <b>JBWEB000069: description</b>
+ <u>JBWEB000145: The server encountered an internal error that
+ prevented it from fulfilling this request.
+ </u>
+ </p>
+ <p>
+ <b>JBWEB000070: exception</b>
+ <pre>org.jboss.resteasy.spi.UnhandledException:
+ java.lang.NullPointerException
+ org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:365)
+ org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:233)
+ org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:209)
+ org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:557)
+ org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:524)
+ org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:126)
+ org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
+ org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
+ org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
+ javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
+ org.onap.so.logger.LogFilter.doFilter(LogFilter.java:35)
+ </pre>
+ </p>
+ <p>
+ <b>JBWEB000071: root cause</b>
+ <pre>java.lang.NullPointerException
+ org.onap.so.adapters.network.NetworkAdapterRest$CreateNetworkVolumesTask.run(NetworkAdapterRest.java:128)
+ org.onap.so.adapters.network.NetworkAdapterRest.createNetwork(NetworkAdapterRest.java:64)
+ sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+ sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
+ sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+ java.lang.reflect.Method.invoke(Method.java:606)
+ org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:167)
+ org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:269)
+ org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:227)
+ org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:216)
+ org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:542)
+ org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:524)
+ org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:126)
+ org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
+ org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
+ org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
+ javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
+ org.onap.so.logger.LogFilter.doFilter(LogFilter.java:35)
+ </pre>
+ </p>
+ <p>
+ <b>JBWEB000072: note</b>
+ <u>JBWEB000073: The full stack trace of the root cause is available
+ in the JBoss Web/7.2.2.Final-redhat-1 logs.
+ </u>
+ </p>
+ <HR size="1" noshade="noshade" />
+ <h3>JBoss Web/7.2.2.Final-redhat-1</h3>
+ </body>
+</html> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_Success.xml
new file mode 100644
index 0000000000..0faec794b0
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetworkResponse_Success.xml
@@ -0,0 +1,24 @@
+<ns2:updateNetworkContrailResponse xmlns:ns2="http://org.onap.so/network"
+ xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <subnetIdMap>
+ <entry>
+ <key>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</key>
+ <value>bd8e87c6-f4e2-41b8-b0bc-9596aa00cd73</value>
+ </entry>
+ </subnetIdMap>
+ <rollback>
+ <cloudId>RDM2WAGPLCP</cloudId>
+ <msoRequest>
+ <requestId>1ef47428-cade-45bd-a103-0751e8b2deb0</requestId>
+ <serviceInstanceId/>
+ </msoRequest>
+ <networkCreated>true</networkCreated>
+ <networkId>MNS-25180-L-01-dmz_direct_net_1/2c88a3a9-69b9-43a7-ada6-1aca577c3641</networkId>
+ <networkType>CONTRAIL_EXTERNAL</networkType>
+ <networkUpdated>false</networkUpdated>
+ <neutronNetworkId>c4f4e878-cde0-4b15-ae9a-bda857759cea</neutronNetworkId>
+ <tenantId>7dd5365547234ee8937416c65507d266</tenantId>
+ </rollback>
+</ns2:updateNetworkContrailResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryInstance_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryInstance_Success.xml
new file mode 100644
index 0000000000..ca5145c226
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryInstance_Success.xml
@@ -0,0 +1,4 @@
+<result-data>
+ <resource-type>service-instance</resource-type>
+ <resource-link>https://aai-conexus-e2e.test.com:8443/aai/v8/business/customers/customer/8310000058863/service-subscriptions/service-subscription/vMOG/service-instances/service-instance/f70e927b-6087-4974-9ef8-c5e4d5847ca4</resource-link>
+</result-data> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_NoPayload_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_NoPayload_Success.xml
new file mode 100644
index 0000000000..e06d27ea88
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_NoPayload_Success.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <orchestration-status>pending-create</orchestration-status>
+ <physical-network-name>networkName</physical-network-name>
+ <is-provider-network>false</is-provider-network>
+ <is-shared-network>true</is-shared-network>
+ <is-external-network>false</is-external-network>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <segmentation-assignments>
+ <segmentation-id>413</segmentation-id>
+ <resource-version>4132176</resource-version>
+ </segmentation-assignments>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>network-policy</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg</related-link>
+ <relationship-data>
+ <relationship-key>network-policy.network-policy-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0cg</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+</l3-network>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_Success.xml
new file mode 100644
index 0000000000..24ee1df9c8
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkId_AAIResponse_Success.xml
@@ -0,0 +1,95 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:502-132671"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <l3-network xmlns="http://org.openecomp.aai.inventory/v8">
+ <network-id>49c86598-f766-46f8-84f8-8d1c1b10f9b4</network-id>
+ <network-name>MNS-25180-L-01-dmz_direct_net_1</network-name>
+ <network-type>CONTRAIL_EXTERNAL</network-type>
+ <network-role>dmz_direct</network-role>
+ <network-technology>contrail</network-technology>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ <network-role-instance>0</network-role-instance>
+ <orchestration-status>pending-create</orchestration-status>
+ <physical-network-name>networkName</physical-network-name>
+ <is-provider-network>false</is-provider-network>
+ <is-shared-network>true</is-shared-network>
+ <is-external-network>false</is-external-network>
+ <subnets>
+ <subnet>
+ <subnet-id>57e9a1ff-d14f-4071-a828-b19ae98eb2fc</subnet-id>
+ <gateway-address>107.239.52.1</gateway-address>
+ <network-start-address>107.239.52.0</network-start-address>
+ <cidr-mask>24</cidr-mask>
+ <ip-version>4</ip-version>
+ <orchestration-status>pending-create</orchestration-status>
+ <dhcp-enabled>true</dhcp-enabled>
+ <subnet-name>subnetName</subnet-name>
+ <relationship-list/>
+ </subnet>
+ </subnets>
+ <segmentation-assignments>
+ <segmentation-id>413</segmentation-id>
+ <resource-version>4132176</resource-version>
+ </segmentation-assignments>
+ <relationship-list>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vpn-binding</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/</related-link>
+ <relationship-data>
+ <relationship-key>vpn-binding.vpn-id</relationship-key>
+ <relationship-value>c980a6ef-3b88-49f0-9751-dbad8608d0a6</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/cloud-infrastructure/tenants/tenant/7dd5365547234ee8937416c65507d266/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>7dd5365547234ee8937416c65507d266</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>network-policy</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg</related-link>
+ <relationship-data>
+ <relationship-key>network-policy.network-policy-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0cg</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN1</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>route-table-reference</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/route-table-references/route-table-reference/refFQDN2</related-link>
+ <relationship-data>
+ <relationship-key>route-table-reference.route-table-reference-id</relationship-key>
+ <relationship-value>cee6d136-e378-4678-a024-2cd15f0ee0hi</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </l3-network>
+ </rest:payload>
+</rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkPolicy_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkPolicy_AAIResponse_Success.xml
new file mode 100644
index 0000000000..79cc14ada3
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkPolicy_AAIResponse_Success.xml
@@ -0,0 +1,21 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Mon,14 Mar 2016 20:53:33 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="localhost-20160314-20:53:33:487-134392"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <network-policy xmlns="http://org.openecomp.aai.inventory/v8">
+ <network-policy-id>9a7b327d9-287aa00-82c4b0-105757</network-policy-id>
+ <network-policy-fqdn>GN_EVPN_Test</network-policy-fqdn>
+ <heat-stack-id>13979:105757</heat-stack-id>
+ <resource-version>13979:105757</resource-version>
+ </network-policy>
+ </rest:payload>
+</rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkTableRef1_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkTableRef1_AAIResponse_Success.xml
new file mode 100644
index 0000000000..db134a1127
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkTableRef1_AAIResponse_Success.xml
@@ -0,0 +1,20 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Mon,14 Mar 2016 20:53:33 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="localhost-20160314-20:53:33:487-134392"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <route-table-references xmlns="http://org.openecomp.aai.inventory/v8">
+ <route-table-reference-id>5938baec-03ca-2bd5-a3f1-d54x123e253a</route-table-reference-id>
+ <route-table-reference-fqdn>refFQDN1</route-table-reference-fqdn>
+ <resource-version>12345</resource-version>
+ </route-table-references>
+ </rest:payload>
+</rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkTableRef2_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkTableRef2_AAIResponse_Success.xml
new file mode 100644
index 0000000000..34b4a036c4
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryNetworkTableRef2_AAIResponse_Success.xml
@@ -0,0 +1,20 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Mon,14 Mar 2016 20:53:33 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="localhost-20160314-20:53:33:487-134392"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <route-table-references xmlns="http://org.openecomp.aai.inventory/v8">
+ <route-table-reference-id>5938baec-03ca-2bd5-a3f1-d54x123e253a</route-table-reference-id>
+ <route-table-reference-fqdn>refFQDN2</route-table-reference-fqdn>
+ <resource-version>12345</resource-version>
+ </route-table-references>
+ </rest:payload>
+</rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryVpnBindingList_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryVpnBindingList_AAIResponse_Success.xml
new file mode 100644
index 0000000000..c01d0a4f61
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryVpnBindingList_AAIResponse_Success.xml
@@ -0,0 +1,57 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Mon,14 Mar 2016 20:53:33 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="localhost-20160314-20:53:33:487-134392"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <vpn-binding xmlns="http://org.openecomp.aai.inventory/v8">
+ <vpn-id>9a7b327d9-287aa00-82c4b0-105757</vpn-id>
+ <vpn-name>GN_EVPN_Test</vpn-name>
+ <route-targets>
+ <route-target>
+ <global-route-target>13979:105708</global-route-target>
+ <route-target-role>EXPORT</route-target-role>
+ <resource-version>1504025599510</resource-version>
+ </route-target>
+ <route-target>
+ <global-route-target>13979:105707</global-route-target>
+ <route-target-role>IMPORT</route-target-role>
+ <resource-version>1504025599519</resource-version>
+ </route-target>
+ </route-targets>
+ <relationship-list>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/l3-networks/l3-network/689ec39e-c5fc-4462-8db2-4f760763ad28/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>689ec39e-c5fc-4462-8db2-4f760763ad28</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/l3-networks/l3-network/1a49396b-19b3-40a4-8792-aa2fbd0f0704/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>1a49396b-19b3-40a4-8792-aa2fbd0f0704</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/l3-networks/l3-network/774f3329-3c83-4771-86c7-9e6207cd50fd/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>774f3329-3c83-4771-86c7-9e6207cd50fd</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </vpn-binding>
+ </rest:payload>
+</rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml
new file mode 100644
index 0000000000..5f1c2cafa5
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_queryVpnBinding_AAIResponse_Success.xml
@@ -0,0 +1,46 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Mon,14 Mar 2016 20:53:33 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="localhost-20160314-20:53:33:487-134392"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <vpn-binding xmlns="http://org.openecomp.aai.inventory/v8">
+ <vpn-id>9a7b327d9-287aa00-82c4b0-105757</vpn-id>
+ <vpn-name>GN_EVPN_Test</vpn-name>
+ <global-route-target>13979:105757</global-route-target>
+ <relationship-list>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/l3-networks/l3-network/689ec39e-c5fc-4462-8db2-4f760763ad28/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>689ec39e-c5fc-4462-8db2-4f760763ad28</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/l3-networks/l3-network/1a49396b-19b3-40a4-8792-aa2fbd0f0704/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>1a49396b-19b3-40a4-8792-aa2fbd0f0704</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>https://aai-app-e2e.test.com:8443/aai/v8/network/l3-networks/l3-network/774f3329-3c83-4771-86c7-9e6207cd50fd/</related-link>
+ <relationship-data>
+ <relationship-key>l3-network.network-id</relationship-key>
+ <relationship-value>774f3329-3c83-4771-86c7-9e6207cd50fd</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </vpn-binding>
+ </rest:payload>
+</rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_updateContrail_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_updateContrail_AAIResponse_Success.xml
new file mode 100644
index 0000000000..eedbda9343
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateNetworkV2/updateNetwork_updateContrail_AAIResponse_Success.xml
@@ -0,0 +1,11 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
+ <rest:header name="Content-Length" value="0"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:551-132672"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+</rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_Success.xml
new file mode 100644
index 0000000000..03d63f9f05
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/queryVolumeId_AAIResponse_Success.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<volume-group xmlns="http://org.openecomp.aai.inventory/v8">
+ <volume-group-id>78987</volume-group-id>
+ <volume-group-name>MSOTESTVOL102a-vSAMP12_base_vol_module-0</volume-group-name>
+ <heat-stack-id/>
+ <vnf-type>Test/vSAMP12</vnf-type>
+ <orchestration-status>Pending</orchestration-status>
+ <resource-version>0000020</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <related-link>/aai/v7/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mdt1/tenants/tenant/fba1bd1e195a404cacb9ce17a9b2b421/</related-link>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>fba1bd1e195a404cacb9ce17a9b2b421</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>mdt1</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>tenant.tenant-name</property-key>
+ <property-value>ECOMP_MDT1</property-value>
+ </related-to-property>
+ </relationship>
+ <relationship>
+ <related-to>vf-module</related-to>
+ <related-link>/aai/v8/network/generic-vnfs/generic-vnf/9e48f6ea-f786-46de-800a-d480e5ccc846/vf-modules/vf-module/6a1dc898-b590-47b9-bbf0-34424a7a2ec3/</related-link>
+ <relationship-data>
+ <relationship-key>generic-vnf.vnf-id</relationship-key>
+ <relationship-value>9e48f6ea-f786-46de-800a-d480e5ccc846</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>vf-module.vf-module-id</relationship-key>
+ <relationship-value>6a1dc898-b590-47b9-bbf0-34424a7a2ec3</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+</volume-group>
+ \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/updateVfModuleVolume_VID_request.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/updateVfModuleVolume_VID_request.json
new file mode 100644
index 0000000000..603c1f452f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/updateVfModuleVolume_VID_request.json
@@ -0,0 +1,64 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "volumeGroup",
+ "modelInvariantUuid": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12::base::module-0",
+ "modelVersion": "1"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "fba1bd1e195a404cacb9ce17a9b2b421"
+ },
+ "requestInfo": {
+ "instanceName": "MSOTESTVOL101a-vSAMP12_base_vol_module-0",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "{service-instance-id}",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantUuid": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "Test",
+ "modelVersion": "2.0"
+ }
+ }
+ }, {
+ "relatedInstance": {
+ "instanceId": "{vnf-instance-id}",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantUuid": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "Test/vSAMP12",
+ "modelVersion": "1",
+ "modelInstanceName": "vSAMP12"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "serviceId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "userParams": [
+ {"name": "vnfName", "value": "STMTN5MMSC20" },
+ {"name": "vnfName2", "value": "US1117MTSNJVBR0246" },
+ {"name": "vnfNmInformation", "value": "" },
+ {"name": "vnfType", "value": "pcrf-capacity" },
+ {"name": "vnfId", "value": "skask" },
+ {"name": "vnfStackId", "value": "slowburn" },
+ {"name": "vnfStatus", "value": "created" },
+ {"name": "aicCloudRegion", "value": "MDTWNJ21" },
+ {"name": "availabilityZone", "value": "slcp3-esx-az01" },
+ {"name": "oamNetworkName", "value": "VLAN-OAM-1323" },
+ {"name": "vmName", "value": "slcp34246vbc246ceb" },
+ {"name": "ipagNetworkId", "value": "970cd2b9-7f09-4a12-af47-182ea38ba1f0" },
+ {"name": "vpeNetworkId", "value": "545cc2c3-1930-4100-b534-5d82d0e12bb6" }
+ ]
+ }
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/updateVfModuleVolume_VID_request_2.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/updateVfModuleVolume_VID_request_2.json
new file mode 100644
index 0000000000..f32ba2994b
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/updateVfModuleVolume_VID_request_2.json
@@ -0,0 +1,64 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "volumeGroup",
+ "modelInvariantUuid": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12::base::module-0",
+ "modelVersion": "1"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "fba1bd1e195a404cacb9ce17a9b2b421"
+ },
+ "requestInfo": {
+ "instanceName": "MSOTESTVOL101a-vSAMP12_base_vol_module-0",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "{service-instance-id}",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantUuid": "ff3514e3-5a33-55df-13ab-12abad84e7ff-x",
+ "modelUuid": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "Test",
+ "modelVersion": "2.0"
+ }
+ }
+ }, {
+ "relatedInstance": {
+ "instanceId": "{vnf-instance-id}",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantUuid": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelUuid": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "Test/vSAMP12",
+ "modelVersion": "1",
+ "modelInstanceName": "vSAMP12"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "serviceId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "userParams": [
+ {"name": "vnfName", "value": "STMTN5MMSC20" },
+ {"name": "vnfName2", "value": "US1117MTSNJVBR0246" },
+ {"name": "vnfNmInformation", "value": "" },
+ {"name": "vnfType", "value": "pcrf-capacity" },
+ {"name": "vnfId", "value": "skask" },
+ {"name": "vnfStackId", "value": "slowburn" },
+ {"name": "vnfStatus", "value": "created" },
+ {"name": "aicCloudRegion", "value": "MDTWNJ21" },
+ {"name": "availabilityZone", "value": "slcp3-esx-az01" },
+ {"name": "oamNetworkName", "value": "VLAN-OAM-1323" },
+ {"name": "vmName", "value": "slcp34246vbc246ceb" },
+ {"name": "ipagNetworkId", "value": "970cd2b9-7f09-4a12-af47-182ea38ba1f0" },
+ {"name": "vpeNetworkId", "value": "545cc2c3-1930-4100-b534-5d82d0e12bb6" }
+ ]
+ }
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/updateVolumeGroupRequest.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/updateVolumeGroupRequest.xml
new file mode 100644
index 0000000000..8f8d150970
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/updateVolumeGroupRequest.xml
@@ -0,0 +1,38 @@
+<updateVolumeGroupRequest>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <tenantId/>
+ <vnfId>2f1cc940-455f-4ee2-9411-a7899cd4f124</vnfId>
+ <vnfName>testVnfName123</vnfName>
+ <volumeGroupId>null</volumeGroupId>
+ <volumeGroupName>MSOTESTVOL102a-vSAMP12_base_vol_module-0</volumeGroupName>
+ <volumeGroupStackId/>
+ <vnfType>vnf1</vnfType>
+ <vnfVersion>1</vnfVersion>
+ <vfModuleType/>
+ <modelCustomizationUuid/>
+ <volumeGroupParams>
+ <entry>
+ <key>vnf_id</key>
+ <value>2f1cc940-455f-4ee2-9411-a7899cd4f124</value>
+ </entry>
+ <entry>
+ <key>vnf_name</key>
+ <value>testVnfName123</value>
+ </entry>
+ <entry>
+ <key>vf_module_id</key>
+ <value>null</value>
+ </entry>
+ <entry>
+ <key>vf_module_name</key>
+ <value>MSOTESTVOL102a-vSAMP12_base_vol_module-0</value>
+ </entry>
+ </volumeGroupParams>
+ <skipAAI>true</skipAAI>
+ <msoRequest>
+ <requestId>12345</requestId>
+ <serviceInstanceId>12345</serviceInstanceId>
+ </msoRequest>
+ <messageId>12345-1513275871414</messageId>
+ <notificationUrl>http://localhost:28080/mso/WorkflowMessage/VNFAResponse/12345-1513275871414</notificationUrl>
+</updateVolumeGroupRequest> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/vf_module_aai_response.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/vf_module_aai_response.xml
new file mode 100644
index 0000000000..4087ab8f5f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/UpdateVfModuleVolumeInfraV1/vf_module_aai_response.xml
@@ -0,0 +1,29 @@
+<vf-module xmlns="http://org.openecomp.aai.inventory/v8">
+ <vf-module-id>6a1dc898-b590-47b9-bbf0-34424a7a2ec3</vf-module-id>
+ <vf-module-name>MSOST10606-vSAMP12_MTN6_base_module-0</vf-module-name>
+ <heat-stack-id>MSOST10606-vSAMP12_MTN6_base_module-0/81b01583-690c-4ec3-9c58-0eafa7a90be7</heat-stack-id>
+ <orchestration-status>active</orchestration-status>
+ <is-base-vf-module>true</is-base-vf-module>
+ <resource-version>1475077639</resource-version>
+ <model-invariant-id>ff5256d2-5a33-55df-13ab-12abad84e7ff</model-invariant-id>
+ <model-version-id>1.0</model-version-id>
+ <relationship-list>
+ <relationship>
+ <related-to>volume-group</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn6/volume-groups/volume-group/064bd1c6-e377-4009-a744-e958eec6e727/</related-link>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>mtn6</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>volume-group.volume-group-id</relationship-key>
+ <relationship-value>064bd1c6-e377-4009-a744-e958eec6e727</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+
+</vf-module> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/SDNCTopologyQueryBRGCallback.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/SDNCTopologyQueryBRGCallback.xml
new file mode 100644
index 0000000000..2be546162f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/SDNCTopologyQueryBRGCallback.xml
@@ -0,0 +1,37 @@
+<output xmlns="org:onap:sdnctl:vnf">
+<brg-topology xmlns="org:onap:sdnctl:vnf">
+ <onap-model-information>
+ <model-invariant-uuid>36e20198-c67a-464b-96d0-aaa99eb2639e</model-invariant-uuid>
+ <model-uuid>5b9b15d0-5dd7-47dc-95b9-0440c340a3ba</model-uuid>
+ <model-version>1.0</model-version>
+ <model-name>BRGmodelname</model-name>
+ <model-customization-uuid>013bd784-9bca-4919-ae2f-ae57af27bad9</model-customization-uuid>
+ </onap-model-information>
+ <allotted-resource-identifiers>
+ <parent-service-instance-id>parent-service-instance-id</parent-service-instance-id>
+ <consuming-service-intance-id>consuming-service-instance-id</consuming-service-intance-id>
+ <allotted-resource-name>namefromrequest</allotted-resource-name>
+ <allotted-resource-type>brg</allotted-resource-type>
+ <allotted-resource-id>allottedresourceidfromrequest</allotted-resource-id>
+ </allotted-resource-identifiers>
+ <brg-assignments>
+ <fq-name>fq-name</fq-name>
+ <dest-network>
+ <network-id>d1</network-id>
+ <network-role>drole</network-role>
+ </dest-network>
+ <vlan-tag>vlan-tag</vlan-tag>
+ <source-network>
+ <network-id>s2</network-id>
+ <network-role>srole</network-role>
+ </source-network>
+ <txc-id>txc-id</txc-id>
+ <txc-applied-service>
+ <service-instance-id>1</service-instance-id>
+ <vnf-id>123</vnf-id>
+ <txc-fqdn>a.b.c.d</txc-fqdn>
+ </txc-applied-service>
+ </brg-assignments>
+</brg-topology>
+
+</output>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/SDNCTopologyQueryTXCCallback.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/SDNCTopologyQueryTXCCallback.xml
new file mode 100644
index 0000000000..c2d197a2d8
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/SDNCTopologyQueryTXCCallback.xml
@@ -0,0 +1,24 @@
+<output xmlns="org:onap:sdnctl:vnf">
+<tunnelxconn-topology xmlns="org:onap:sdnctl:vnf">
+ <onap-model-information>
+ <model-invariant-uuid>36e20198-c67a-464b-96d0-aaa99eb2639e</model-invariant-uuid>
+ <model-uuid>5b9b15d0-5dd7-47dc-95b9-0440c340a3ba</model-uuid>
+ <model-version>1.0</model-version>
+ <model-name>TXCmodelname</model-name>
+ <model-customization-uuid>013bd784-9bca-4919-ae2f-ae57af27bad9</model-customization-uuid>
+ </onap-model-information>
+ <allotted-resource-identifiers>
+ <parent-service-instance-id>parent-service-instance-id</parent-service-instance-id>
+ <consuming-service-intance-id>consuming-service-instance-id</consuming-service-intance-id>
+ <allotted-resource-name>namefromrequest</allotted-resource-name>
+ <allotted-resource-type>tunnelxconn</allotted-resource-type>
+ <allotted-resource-id>allottedresourceidfromrequest</allotted-resource-id>
+ </allotted-resource-identifiers>
+ <tunnelxconn-assignments>
+ <vni>my-vni</vni>
+ <vgmux-bearer-ip>my-bearer-ip</vgmux-bearer-ip>
+ <vgmux-lan-ip>my-lan-ip</vgmux-lan-ip>
+ </tunnelxconn-assignments>
+</tunnelxconn-topology>
+
+</output>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/arGetById.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/arGetById.xml
new file mode 100644
index 0000000000..bb7f4c20fd
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/arGetById.xml
@@ -0,0 +1,31 @@
+<allotted-resource xmlns="http://org.openecomp.aai.inventory/v9">
+ <id>ar-1</id>
+ <orchestration-status>Active</orchestration-status>
+ <role>TunnelXConn</role>
+ <type>TunnelXConn</type>
+ <description>TunnelXConn</description>
+ <selflink/>
+ <resource-version>1490627351232</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>service-instance</related-to>
+ <related-link>http://localhost:28090/aai/v9/business/customers/customer/SDN-ETHERNET-INTERNET/service-subscriptions/service-subscription/123456789/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET/allotted-resources/allotted-resource/arId-1</related-link>
+ <relationship-data>
+ <relationship-key>customer.global-customer-id</relationship-key>
+ <relationship-value>SDN-ETHERNET-INTERNET</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-subscription.service-type</relationship-key>
+ <relationship-value>123456789</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-instance.service-instance-id</relationship-key>
+ <relationship-value>88819355-9a71-4ddc-9e22-373f0644b40b</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>service-instance.service-instance-name</property-key>
+ <property-value>vcpe-1702-m010904-name4</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+</allotted-resource>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/getCatalogServiceResourcesData.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/getCatalogServiceResourcesData.json
new file mode 100644
index 0000000000..81fdcc76d0
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/getCatalogServiceResourcesData.json
@@ -0,0 +1,127 @@
+{ "serviceResources" : {
+ "modelInfo" : {
+ "modelName" : "MSO Test Network",
+ "modelUuid" : "aed5a5b7-20d3-44f7-90a3-ddbd16f14d1e",
+ "modelInvariantUuid" : "52b49b5d-3086-4ffd-b5e6-1b1e5e7e062f",
+ "modelVersion" : null
+ },
+ "serviceVnfs": [
+ { "modelInfo" : {
+ "modelName" : "vHNF for DHV Test",
+ "modelUuid" : "7097d8bb-f6ad-4cf7-866e-6a04c8f1b332",
+ "modelInvariantUuid" : "6ea0b528-e303-4686-aa77-aa2fcbdccb96",
+ "modelVersion" : "2.0",
+ "modelCustomizationUuid" : "da86dd87-43c5-458c-b226-5315b7be9ad5",
+ "modelInstanceName" : "vHNF for DHV Test 17"
+ },
+ "toscaNodeType" : null,
+ "nfFunction" : null,
+ "nfType" : null,
+ "nfRole" : null,
+ "nfNamingCode" : null,
+ "vfModules": [
+ {
+ "modelInfo" : {
+ "modelName" : "VhnfForDhvTest..base_TEST..module-0",
+ "modelUuid" : "ebc3d18c-3e62-4c24-bcd6-961e98701a0a",
+ "modelInvariantUuid" : "f5696ec0-ec71-4916-bf3b-93a654efcba4",
+ "modelVersion" : "1",
+ "modelCustomizationUuid" : "1740536a-742e-40f5-b9c8-83918849a787"
+ }, "isBase" : true,
+ "vfModuleLabel" : "base_TEST",
+ "initialCount" : 1,
+ "hasVolumeGroup" : true
+ }
+ ]
+ }
+ ],
+ "serviceNetworks": [
+ {
+ "modelInfo" : {
+ "modelName" : "CONTRAIL_BASIC",
+ "modelUuid" : "fe5be3a6-dbe0-46d6-bcac-44dc841a7edc",
+ "modelInvariantUuid" : "ab07fbd8-185a-45ac-be45-db3eb02e98d5",
+ "modelVersion" : null,
+ "modelCustomizationUuid" : "0cb9b26a-9820-48a7-86e5-16c510e993d9",
+ "modelInstanceName" : "CONTRAIL_BASIC 5"
+ },
+ "toscaNodeType" : null,
+ "networkType" : null,
+ "networkTechnology" : null,
+ "networkRole" : null,
+ "networkScope" : null
+ }
+ ],
+ "serviceAllottedResources": [
+ {
+ "modelInfo" : {
+ "modelName" : "IP_MUX_Demux",
+ "modelUuid" : "64a1a718-556b-48ce-b3b7-ed3237ccc94f",
+ "modelInvariantUuid" : "f110ef53-a0a6-4d72-ab91-fd88a835e8c4",
+ "modelVersion" : "2.0",
+ "modelCustomizationUuid" : "4bab0880-2f06-4aeb-87cb-3734c8e8bf93",
+ "modelInstanceName" : "Pri_IP_MUX_Demux 1"
+ },
+ "toscaNodeType" : null,
+ "allottedResourceType" : "TunnelXConn",
+ "allottedResourceRole" : "TunnelXConn",
+ "providingServiceModelInvariantUuid" : null,
+ "nfFunction" : null,
+ "nfType" : null,
+ "nfRole" : null,
+ "nfNamingCode" : null,
+ "homingSolution": {
+ "inventoryType": "service",
+ "serviceInstanceId": "MIS%252F1604%252F0027%252FSW_INTERNET",
+ "vnfHostname": "MDTNJ01",
+ "cloudOwner": "aic",
+ "cloudRegionId": "dfwtx",
+ "aicClli": "KDTNJ01",
+ "aicVersion": "3.0",
+ "entitlementPoolList": [
+ "f1d563e8-e714-4393-8f99-cc480144a05e",
+ "j1d563e8-e714-4393-8f99-cc480144a05e"
+ ],
+ "licenseKeyGroupList": [
+ "s1d563e8-e714-4393-8f99-cc480144a05e",
+ "b1d563e8-e714-4393-8f99-cc480144a05e"
+ ]
+ }
+ },
+ {
+ "modelInfo" : {
+ "modelName" : "Service_Admin",
+ "modelUuid" : "73501e03-ee76-4509-a8ce-96d2a9f33ee9",
+ "modelInvariantUuid" : "462edf71-1a3c-487b-bf55-497460ab7de3",
+ "modelVersion" : "2.0",
+ "modelCustomizationUuid" : "a896ffad-c8f9-404e-a527-7a8d0cc99ce6",
+ "modelInstanceName" : "Pri_Service_Admin 5"
+ },
+ "toscaNodeType" : null,
+ "allottedResourceType" : "BRG",
+ "allottedResourceRole" : "BRG",
+ "providingServiceModelInvariantUuid" : null,
+ "nfFunction" : null,
+ "nfType" : null,
+ "nfRole" : null,
+ "nfNamingCode" : null,
+ "homingSolution": {
+ "inventoryType": "service",
+ "serviceInstanceId": "MIS%252F1604%252F0027%252FSW_INTERNET",
+ "vnfHostname": "MDTNJ01",
+ "cloudOwner": "aic",
+ "cloudRegionId": "dfwtx",
+ "aicClli": "KDTNJ01",
+ "aicVersion": "3.0",
+ "entitlementPoolList": [
+ "f1d563e8-e714-4393-8f99-cc480144a05e",
+ "j1d563e8-e714-4393-8f99-cc480144a05e"
+ ],
+ "licenseKeyGroupList": [
+ "s1d563e8-e714-4393-8f99-cc480144a05e",
+ "b1d563e8-e714-4393-8f99-cc480144a05e"
+ ]
+ }
+ }
+ ]
+ }} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/getCatalogServiceResourcesNoData.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/getCatalogServiceResourcesNoData.json
new file mode 100644
index 0000000000..80692b27f5
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/getCatalogServiceResourcesNoData.json
@@ -0,0 +1,11 @@
+{ "serviceResources" : {
+ "modelInfo" : {
+ "modelName" : "MSO Test Network",
+ "modelUuid" : "aed5a5b7-20d3-44f7-90a3-ddbd16f14d1e",
+ "modelInvariantUuid" : "52b49b5d-3086-4ffd-b5e6-1b1e5e7e062f",
+ "modelVersion" : null
+ },
+ "serviceVnfs": [],
+ "serviceNetworks": [],
+ "serviceAllottedResources": []
+ }} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/getCustomer.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/getCustomer.xml
new file mode 100644
index 0000000000..b9d88d15db
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/getCustomer.xml
@@ -0,0 +1,7 @@
+<customer xmlns="http://org.openecomp.aai.inventory/v8">
+ <global-customer-id>SDN-ETHERNET-INTERNET</global-customer-id>
+ <subscriber-name>SDN-ETHERNET-INTERNET</subscriber-name>
+ <resource-version>1490627351232</resource-version>
+ <service-subscriptions/>
+ <relationship-list/>
+</customer>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/request.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/request.json
new file mode 100644
index 0000000000..dc4669e8d9
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/request.json
@@ -0,0 +1,40 @@
+{
+ "requestDetails":
+ {
+ "modelInfo":
+ {
+ "modelType":"service",
+ "modelInvariantUuid":"uuid-miu-svc-011-abcdef",
+ "modelVersionId":"ASDC_TOSCA_UUID",
+ "modelName":"SIModelName1",
+ "modelVersion":"2"
+ },
+ "subscriberInfo":
+ {
+ "globalSubscriberId":"SDN-ETHERNET-INTERNET",
+ "subscriberName":"Kaneohe"
+ },
+ "requestInfo":
+ {
+ "instanceName":"VCPE1",
+ "source":"VID",
+ "suppressRollback":"false",
+ "productFamilyId":"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"
+ },
+ "cloudConfiguration":
+ {
+ "lcpCloudRegionId":"mdt1",
+ "tenantId":"8b1df54faa3b49078e3416e21370a3ba"
+ },
+ "requestParameters":
+ {
+ "subscriptionServiceType":"123456789",
+ "aLaCarte":"false",
+ "userParams":
+ {
+ "BRG_WAN_MAC_Address" : "brgmac"
+ }
+ }
+
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/requestNoSIName.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/requestNoSIName.json
new file mode 100644
index 0000000000..dc9ac49a4e
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/requestNoSIName.json
@@ -0,0 +1,39 @@
+{
+ "requestDetails":
+ {
+ "modelInfo":
+ {
+ "modelType":"service",
+ "modelInvariantUuid":"uuid-miu-svc-011-abcdef",
+ "modelVersionId":"ASDC_TOSCA_UUID",
+ "modelName":"SIModelName1",
+ "modelVersion":"2"
+ },
+ "subscriberInfo":
+ {
+ "globalSubscriberId":"SDN-ETHERNET-INTERNET",
+ "subscriberName":"Kaneohe"
+ },
+ "requestInfo":
+ {
+ "source":"VID",
+ "suppressRollback":"false",
+ "productFamilyId":"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"
+ },
+ "cloudConfiguration":
+ {
+ "lcpCloudRegionId":"mdt1",
+ "tenantId":"8b1df54faa3b49078e3416e21370a3ba"
+ },
+ "requestParameters":
+ {
+ "subscriptionServiceType":"123456789",
+ "aLaCarte":"false",
+ "userParams":
+ {
+ "BRG_WAN_MAC_Address" : "brgmac"
+ }
+ }
+
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/requestNoSINameNoRollback.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/requestNoSINameNoRollback.json
new file mode 100644
index 0000000000..d5b0713d9f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/CreateVcpeResCustService/requestNoSINameNoRollback.json
@@ -0,0 +1,39 @@
+{
+ "requestDetails":
+ {
+ "modelInfo":
+ {
+ "modelType":"service",
+ "modelInvariantUuid":"uuid-miu-svc-011-abcdef",
+ "modelVersionId":"ASDC_TOSCA_UUID",
+ "modelName":"SIModelName1",
+ "modelVersion":"2"
+ },
+ "subscriberInfo":
+ {
+ "globalSubscriberId":"SDN-ETHERNET-INTERNET",
+ "subscriberName":"Kaneohe"
+ },
+ "requestInfo":
+ {
+ "source":"VID",
+ "suppressRollback":"true",
+ "productFamilyId":"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"
+ },
+ "cloudConfiguration":
+ {
+ "lcpCloudRegionId":"mdt1",
+ "tenantId":"8b1df54faa3b49078e3416e21370a3ba"
+ },
+ "requestParameters":
+ {
+ "subscriptionServiceType":"123456789",
+ "aLaCarte":"false",
+ "userParams":
+ {
+ "BRG_WAN_MAC_Address" : "brgmac"
+ }
+ }
+
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/arGetBRGById.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/arGetBRGById.xml
new file mode 100644
index 0000000000..3cb31464d5
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/arGetBRGById.xml
@@ -0,0 +1,31 @@
+<allotted-resource xmlns="http://org.openecomp.aai.inventory/v9">
+ <id>ar-brgB</id>
+ <orchestration-status>Active</orchestration-status>
+ <role>BRG</role>
+ <type>BRG</type>
+ <description>BRG</description>
+ <selflink/>
+ <resource-version>1490627351232</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>service-instance</related-to>
+ <related-link>http://localhost:28090/aai/v9/business/customers/customer/SDN-ETHERNET-INTERNET/service-subscriptions/service-subscription/123456789/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET/allotted-resources/allotted-resource/arId-1</related-link>
+ <relationship-data>
+ <relationship-key>customer.global-customer-id</relationship-key>
+ <relationship-value>SDN-ETHERNET-INTERNET</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-subscription.service-type</relationship-key>
+ <relationship-value>123456789</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-instance.service-instance-id</relationship-key>
+ <relationship-value>88819355-9a71-4ddc-9e22-373f0644b40b</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>service-instance.service-instance-name</property-key>
+ <property-value>vcpe-1702-m010904-name4</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+</allotted-resource>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/arGetTXCById.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/arGetTXCById.xml
new file mode 100644
index 0000000000..65cee9f662
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/arGetTXCById.xml
@@ -0,0 +1,31 @@
+<allotted-resource xmlns="http://org.openecomp.aai.inventory/v9">
+ <id>ar-txcA</id>
+ <orchestration-status>Active</orchestration-status>
+ <role>TunnelXConn</role>
+ <type>TunnelXConn</type>
+ <description>TunnelXConn</description>
+ <selflink/>
+ <resource-version>1490627351232</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>service-instance</related-to>
+ <related-link>http://localhost:28090/aai/v9/business/customers/customer/SDN-ETHERNET-INTERNET/service-subscriptions/service-subscription/123456789/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET/allotted-resources/allotted-resource/arId-1</related-link>
+ <relationship-data>
+ <relationship-key>customer.global-customer-id</relationship-key>
+ <relationship-value>SDN-ETHERNET-INTERNET</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-subscription.service-type</relationship-key>
+ <relationship-value>123456789</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-instance.service-instance-id</relationship-key>
+ <relationship-value>88819355-9a71-4ddc-9e22-373f0644b40b</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>service-instance.service-instance-name</property-key>
+ <property-value>vcpe-1702-m010904-name4</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+</allotted-resource>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/getBRGArUrlById.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/getBRGArUrlById.xml
new file mode 100644
index 0000000000..932dbfb2ca
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/getBRGArUrlById.xml
@@ -0,0 +1,6 @@
+<search-results xmlns="http://org.openecomp.aai.inventory">
+ <result-data>
+ <resource-type>allotted-resource</resource-type>
+ <resource-link>https://aai-ext1.test.com:8443/aai/v7/business/customers/customer/SDN-ETHERNET-INTERNET/service-subscriptions/service-subscription/123456789/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET/allotted-resources/allotted-resource/ar-brgB</resource-link>
+ </result-data>
+</search-results> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/getSI.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/getSI.xml
new file mode 100644
index 0000000000..e0511873b6
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/getSI.xml
@@ -0,0 +1,35 @@
+<service-instance>
+
+ <service-instance-id>MIS/1604/0026/SW_INTERNET</service-instance-id>
+ <resource-version>123456789</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>generic-vnf</related-to>
+ <related-link>/aai/v7/generic-vnf/vnfX</related-link>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>/aai/v7/l3-network/netA</related-link>
+ </relationship>
+ <relationship>
+ <related-to>generic-vnf</related-to>
+ <related-link>/aai/v7/generic-vnf/vnfY</related-link>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>/aai/v7/l3-network/netB</related-link>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>/aai/v7/l3-network/netC</related-link>
+ </relationship>
+ <relationship>
+ <related-to>allotted-resource</related-to>
+ <related-link>/aai/v11/business/customers/customer/SDN-ETHERNET-INTERNET/service-subscriptions/service-subscription/123456789/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET/allotted-resources/allotted-resource/ar-txcA</related-link>
+ </relationship>
+ <relationship>
+ <related-to>allotted-resource</related-to>
+ <related-link>/aai/v11/business/customers/customer/SDN-ETHERNET-INTERNET/service-subscriptions/service-subscription/123456789/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET/allotted-resources/allotted-resource/ar-brgB</related-link>
+ </relationship>
+ </relationship-list>
+</service-instance>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/getSIAfterDelArs.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/getSIAfterDelArs.xml
new file mode 100644
index 0000000000..feb535c238
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/getSIAfterDelArs.xml
@@ -0,0 +1,8 @@
+<service-instance>
+ <service-instance-id>MIS/1604/0026/SW_INTERNET</service-instance-id>
+ <service-type>SDN-MOBILITY</service-type>
+ <resource-version>123456789</resource-version>
+
+ <relationship-list>
+ </relationship-list>
+</service-instance>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/getTXCArUrlById.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/getTXCArUrlById.xml
new file mode 100644
index 0000000000..1c4f13d642
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/getTXCArUrlById.xml
@@ -0,0 +1,6 @@
+<search-results xmlns="http://org.openecomp.aai.inventory">
+ <result-data>
+ <resource-type>allotted-resource</resource-type>
+ <resource-link>https://aai-ext1.test.com:8443/aai/v7/business/customers/customer/SDN-ETHERNET-INTERNET/service-subscriptions/service-subscription/123456789/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET/allotted-resources/allotted-resource/ar-txcA</resource-link>
+ </result-data>
+</search-results> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/request.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/request.json
new file mode 100644
index 0000000000..dc4669e8d9
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/request.json
@@ -0,0 +1,40 @@
+{
+ "requestDetails":
+ {
+ "modelInfo":
+ {
+ "modelType":"service",
+ "modelInvariantUuid":"uuid-miu-svc-011-abcdef",
+ "modelVersionId":"ASDC_TOSCA_UUID",
+ "modelName":"SIModelName1",
+ "modelVersion":"2"
+ },
+ "subscriberInfo":
+ {
+ "globalSubscriberId":"SDN-ETHERNET-INTERNET",
+ "subscriberName":"Kaneohe"
+ },
+ "requestInfo":
+ {
+ "instanceName":"VCPE1",
+ "source":"VID",
+ "suppressRollback":"false",
+ "productFamilyId":"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"
+ },
+ "cloudConfiguration":
+ {
+ "lcpCloudRegionId":"mdt1",
+ "tenantId":"8b1df54faa3b49078e3416e21370a3ba"
+ },
+ "requestParameters":
+ {
+ "subscriptionServiceType":"123456789",
+ "aLaCarte":"false",
+ "userParams":
+ {
+ "BRG_WAN_MAC_Address" : "brgmac"
+ }
+ }
+
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/serviceToDelete.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/serviceToDelete.xml
new file mode 100644
index 0000000000..8b8863e29c
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DeleteVcpeResCustService/serviceToDelete.xml
@@ -0,0 +1,36 @@
+<service xmlns="http://org.openecomp.aai.inventory/v9">
+ <relationship-list>
+ <relationship>
+ <related-to>generic-vnf</related-to>
+ <related-link>/aai/v7/generic-vnf/vnfX</related-link>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>/aai/v7/l3-network/netA</related-link>
+ </relationship>
+ <relationship>
+ <related-to>generic-vnf</related-to>
+ <related-link>/aai/v7/generic-vnf/vnfY/</related-link>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>/aai/v7/l3-network/netB</related-link>
+ </relationship>
+ <relationship>
+ <related-to>l3-network</related-to>
+ <related-link>/aai/v7/l3-network/netC</related-link>
+ </relationship>
+ <relationship>
+ <related-to>allotted-resource</related-to>
+ <related-link>/aai/v11/anytxc</related-link>
+ </relationship>
+ <relationship>
+ <related-to>allotted-resource</related-to>
+ <related-link>/aai/v11/anybrg</related-link>
+ </relationship>
+ <relationship>
+ <related-to>allotted-resource</related-to>
+ <related-link>/aai/v11/other</related-link>
+ </relationship>
+ </relationship-list>
+</service>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRG/SDNCTopologyQueryCallback.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRG/SDNCTopologyQueryCallback.xml
new file mode 100644
index 0000000000..2be546162f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRG/SDNCTopologyQueryCallback.xml
@@ -0,0 +1,37 @@
+<output xmlns="org:onap:sdnctl:vnf">
+<brg-topology xmlns="org:onap:sdnctl:vnf">
+ <onap-model-information>
+ <model-invariant-uuid>36e20198-c67a-464b-96d0-aaa99eb2639e</model-invariant-uuid>
+ <model-uuid>5b9b15d0-5dd7-47dc-95b9-0440c340a3ba</model-uuid>
+ <model-version>1.0</model-version>
+ <model-name>BRGmodelname</model-name>
+ <model-customization-uuid>013bd784-9bca-4919-ae2f-ae57af27bad9</model-customization-uuid>
+ </onap-model-information>
+ <allotted-resource-identifiers>
+ <parent-service-instance-id>parent-service-instance-id</parent-service-instance-id>
+ <consuming-service-intance-id>consuming-service-instance-id</consuming-service-intance-id>
+ <allotted-resource-name>namefromrequest</allotted-resource-name>
+ <allotted-resource-type>brg</allotted-resource-type>
+ <allotted-resource-id>allottedresourceidfromrequest</allotted-resource-id>
+ </allotted-resource-identifiers>
+ <brg-assignments>
+ <fq-name>fq-name</fq-name>
+ <dest-network>
+ <network-id>d1</network-id>
+ <network-role>drole</network-role>
+ </dest-network>
+ <vlan-tag>vlan-tag</vlan-tag>
+ <source-network>
+ <network-id>s2</network-id>
+ <network-role>srole</network-role>
+ </source-network>
+ <txc-id>txc-id</txc-id>
+ <txc-applied-service>
+ <service-instance-id>1</service-instance-id>
+ <vnf-id>123</vnf-id>
+ <txc-fqdn>a.b.c.d</txc-fqdn>
+ </txc-applied-service>
+ </brg-assignments>
+</brg-topology>
+
+</output>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRG/getAR.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRG/getAR.xml
new file mode 100644
index 0000000000..e352ff8f1f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRG/getAR.xml
@@ -0,0 +1,8 @@
+<allotted-resource xmlns="http://org.openecomp.aai.inventory/v9">
+ <relationship-list>
+ <relationship>
+ <related-to>allotted-resource</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v7/business/customers/customer/SDN-ETHERNET-INTERNET/service-subscriptions/service-subscription/123456789/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET/allotted-resources/allotted-resource/arId-1</related-link>
+ </relationship>
+ </relationship-list>
+</allotted-resource>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRG/getArBrg.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRG/getArBrg.xml
new file mode 100644
index 0000000000..8c3976b828
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRG/getArBrg.xml
@@ -0,0 +1,31 @@
+<allotted-resource xmlns="http://org.openecomp.aai.inventory/v9">
+ <id>ar-1</id>
+ <orchestration-status>Active</orchestration-status>
+ <role>BRGr</role>
+ <type>BRGt</type>
+ <description>BRG</description>
+ <selflink/>
+ <resource-version>1490627351232</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>service-instance</related-to>
+ <related-link>http://localhost:28090/aai/v9/business/customers/customer/SDN-ETHERNET-INTERNET/service-subscriptions/service-subscription/123456789/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET/allotted-resources/allotted-resource/arId-1</related-link>
+ <relationship-data>
+ <relationship-key>customer.global-customer-id</relationship-key>
+ <relationship-value>SDN-ETHERNET-INTERNET</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-subscription.service-type</relationship-key>
+ <relationship-value>123456789</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-instance.service-instance-id</relationship-key>
+ <relationship-value>88819355-9a71-4ddc-9e22-373f0644b40b</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>service-instance.service-instance-name</property-key>
+ <property-value>vcpe-1702-m010904-name4</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+</allotted-resource>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRG/getArBrg2.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRG/getArBrg2.xml
new file mode 100644
index 0000000000..650d608fb0
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRG/getArBrg2.xml
@@ -0,0 +1,31 @@
+<allotted-resource xmlns="http://org.openecomp.aai.inventory/v9">
+ <id>ar-1</id>
+ <orchestration-status>Active</orchestration-status>
+ <role>txc</role>
+ <type>BRG</type>
+ <description>BRG</description>
+ <selflink/>
+ <resource-version>1490627351232</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>service-instance</related-to>
+ <related-link>http://localhost:28090/aai/v9/business/customers/customer/SDN-ETHERNET-INTERNET/service-subscriptions/service-subscription/123456789/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET/allotted-resources/allotted-resource/arId-1</related-link>
+ <relationship-data>
+ <relationship-key>customer.global-customer-id</relationship-key>
+ <relationship-value>SDN-ETHERNET-INTERNET</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-subscription.service-type</relationship-key>
+ <relationship-value>123456789</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-instance.service-instance-id</relationship-key>
+ <relationship-value>88819355-9a71-4ddc-9e22-373f0644b40b</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>service-instance.service-instance-name</property-key>
+ <property-value>vcpe-1702-m010904-name4</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+</allotted-resource>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRG/getSIandAR.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRG/getSIandAR.xml
new file mode 100644
index 0000000000..14c7410995
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRG/getSIandAR.xml
@@ -0,0 +1,38 @@
+<service-instance>
+ <service-instance-id>MIS/1604/0026/SW_INTERNET</service-instance-id>
+ <resource-version>123456789</resource-version>
+
+ <orchestration-status>Active</orchestration-status>
+
+ <relationship-list>
+ <relationship>
+ <related-to>allotted-resource</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v7/business/customers/customer/SDN-ETHERNET-INTERNET/service-subscriptions/service-subscription/123456789/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET/allotted-resources/allotted-resource/arId-1</related-link>
+ </relationship>
+
+ <relationship>
+ <related-to>cvlan-tag</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v2/network/vces/vce/832bace2-3fb0-49e0-a6a4-07c47223c535/port-groups/port-group/slcp1447vbc.ipag/cvlan-tags/cvlan-tag/2003/</related-link>
+ <relationship-data>
+ <relationship-key>cvlan-tag.cvlan-tag</relationship-key>
+ <relationship-value>2003</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>port-group.interface-id</relationship-key>
+ <relationship-value>slcp1447vbc.ipag</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>vce.vnf-id</relationship-key>
+ <relationship-value>832bace2-3fb0-49e0-a6a4-07c47223c535</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vce</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v2/network/vces/vce/832bace2-3fb0-49e0-a6a4-07c47223c535/</related-link>
+ <relationship-data>
+ <relationship-key>vce.vnf-id</relationship-key>
+ <relationship-value>832bace2-3fb0-49e0-a6a4-07c47223c535</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+</service-instance>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml
new file mode 100644
index 0000000000..8ed991608a
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml
@@ -0,0 +1,31 @@
+<allotted-resource xmlns="http://org.openecomp.aai.inventory/v9">
+ <id>ar-1</id>
+ <orchestration-status>Active</orchestration-status>
+ <role>BRG</role>
+ <type>BRG</type>
+ <description>BRG</description>
+ <selflink/>
+ <resource-version>1490627351232</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>service-instance</related-to>
+ <related-link>http://localhost:28090/aai/v9/business/customers/customer/SDN-ETHERNET-INTERNET/service-subscriptions/service-subscription/123456789/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET/allotted-resources/allotted-resource/arId-1</related-link>
+ <relationship-data>
+ <relationship-key>customer.global-customer-id</relationship-key>
+ <relationship-value>SDN-ETHERNET-INTERNET</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-subscription.service-type</relationship-key>
+ <relationship-value>123456789</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-instance.service-instance-id</relationship-key>
+ <relationship-value>88819355-9a71-4ddc-9e22-373f0644b40b</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>service-instance.service-instance-name</property-key>
+ <property-value>vcpe-1702-m010904-name4</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+</allotted-resource>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRGRollback/sdncActivateRollbackReq.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRGRollback/sdncActivateRollbackReq.xml
new file mode 100644
index 0000000000..713c5e7ad5
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRGRollback/sdncActivateRollbackReq.xml
@@ -0,0 +1,51 @@
+<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>b043d290-140d-4a38-a9b6-95d3b8bd27d1</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>MIS%252F1604%252F0026%252FSW_INTERNET</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>deactvate</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>brg-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>http://localhost:28090/mso/SDNCAdapterCallbackService</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>RaaTestRequestId1</request-id>
+ <request-action>DeleteBRGInstance</request-action>
+ <source>MSO</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id></service-id>
+ <subscription-service-type></subscription-service-type>
+ <onap-model-information></onap-model-information>
+ <service-instance-id>MIS%252F1604%252F0026%252FSW_INTERNET</service-instance-id>
+ <subscriber-name/>
+ <global-customer-id></global-customer-id>
+ </service-information>
+ <allotted-resource-information>
+ <allotted-resource-id>arId-1</allotted-resource-id>
+ <allotted-resource-type>brg</allotted-resource-type>
+ <parent-service-instance-id>MIS%252F1604%252F0026%252FSW_INTERNET</parent-service-instance-id>
+ <onap-model-information>
+ <model-invariant-uuid></model-invariant-uuid>
+ <model-uuid></model-uuid>
+ <model-customization-uuid></model-customization-uuid>
+ <model-version></model-version>
+ <model-name></model-name>
+ </onap-model-information>
+ </allotted-resource-information>
+ <brg-request-input>
+ <source-network>
+ <network-id>${sourceNetworkId}</network-id>
+ <network-role>${sourceNetworkRole}</network-role>
+ </source-network>
+ <dest-network>
+ <network-id/>
+ <network-role></network-role>
+ </dest-network>
+ </brg-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+</sdncadapterworkflow:SDNCAdapterWorkflowRequest>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRGRollback/sdncAssignRollbackReq.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRGRollback/sdncAssignRollbackReq.xml
new file mode 100644
index 0000000000..df61910355
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRGRollback/sdncAssignRollbackReq.xml
@@ -0,0 +1,51 @@
+<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>b043d290-140d-4a38-a9b6-95d3b8bd27d3</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>MIS%252F1604%252F0026%252FSW_INTERNET</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>unassign</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>brg-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>http://localhost:28090/mso/SDNCAdapterCallbackService</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>RaaTestRequestId1</request-id>
+ <request-action>DeleteBRGInstance</request-action>
+ <source>MSO</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id></service-id>
+ <subscription-service-type></subscription-service-type>
+ <onap-model-information></onap-model-information>
+ <service-instance-id>MIS%252F1604%252F0026%252FSW_INTERNET</service-instance-id>
+ <subscriber-name/>
+ <global-customer-id></global-customer-id>
+ </service-information>
+ <allotted-resource-information>
+ <allotted-resource-id>arId-1</allotted-resource-id>
+ <allotted-resource-type>brg</allotted-resource-type>
+ <parent-service-instance-id>MIS%252F1604%252F0026%252FSW_INTERNET</parent-service-instance-id>
+ <onap-model-information>
+ <model-invariant-uuid></model-invariant-uuid>
+ <model-uuid></model-uuid>
+ <model-customization-uuid></model-customization-uuid>
+ <model-version></model-version>
+ <model-name></model-name>
+ </onap-model-information>
+ </allotted-resource-information>
+ <brg-request-input>
+ <source-network>
+ <network-id>${sourceNetworkId}</network-id>
+ <network-role>${sourceNetworkRole}</network-role>
+ </source-network>
+ <dest-network>
+ <network-id/>
+ <network-role></network-role>
+ </dest-network>
+ </brg-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+</sdncadapterworkflow:SDNCAdapterWorkflowRequest>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRGRollback/sdncCreateRollbackReq.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRGRollback/sdncCreateRollbackReq.xml
new file mode 100644
index 0000000000..35c783539c
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceBRGRollback/sdncCreateRollbackReq.xml
@@ -0,0 +1,51 @@
+<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>b043d290-140d-4a38-a9b6-95d3b8bd27d2</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>MIS%252F1604%252F0026%252FSW_INTERNET</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>delete</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>brg-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>http://localhost:28090/mso/SDNCAdapterCallbackService</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>RaaTestRequestId1</request-id>
+ <request-action>DeleteBRGInstance</request-action>
+ <source>MSO</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id></service-id>
+ <subscription-service-type></subscription-service-type>
+ <onap-model-information></onap-model-information>
+ <service-instance-id>MIS%252F1604%252F0026%252FSW_INTERNET</service-instance-id>
+ <subscriber-name/>
+ <global-customer-id></global-customer-id>
+ </service-information>
+ <allotted-resource-information>
+ <allotted-resource-id>arId-1</allotted-resource-id>
+ <allotted-resource-type>brg</allotted-resource-type>
+ <parent-service-instance-id>MIS%252F1604%252F0026%252FSW_INTERNET</parent-service-instance-id>
+ <onap-model-information>
+ <model-invariant-uuid></model-invariant-uuid>
+ <model-uuid></model-uuid>
+ <model-customization-uuid></model-customization-uuid>
+ <model-version></model-version>
+ <model-name></model-name>
+ </onap-model-information>
+ </allotted-resource-information>
+ <brg-request-input>
+ <source-network>
+ <network-id>${sourceNetworkId}</network-id>
+ <network-role>${sourceNetworkRole}</network-role>
+ </source-network>
+ <dest-network>
+ <network-id/>
+ <network-role></network-role>
+ </dest-network>
+ </brg-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+</sdncadapterworkflow:SDNCAdapterWorkflowRequest>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXC/SDNCTopologyQueryCallback.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXC/SDNCTopologyQueryCallback.xml
new file mode 100644
index 0000000000..c2d197a2d8
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXC/SDNCTopologyQueryCallback.xml
@@ -0,0 +1,24 @@
+<output xmlns="org:onap:sdnctl:vnf">
+<tunnelxconn-topology xmlns="org:onap:sdnctl:vnf">
+ <onap-model-information>
+ <model-invariant-uuid>36e20198-c67a-464b-96d0-aaa99eb2639e</model-invariant-uuid>
+ <model-uuid>5b9b15d0-5dd7-47dc-95b9-0440c340a3ba</model-uuid>
+ <model-version>1.0</model-version>
+ <model-name>TXCmodelname</model-name>
+ <model-customization-uuid>013bd784-9bca-4919-ae2f-ae57af27bad9</model-customization-uuid>
+ </onap-model-information>
+ <allotted-resource-identifiers>
+ <parent-service-instance-id>parent-service-instance-id</parent-service-instance-id>
+ <consuming-service-intance-id>consuming-service-instance-id</consuming-service-intance-id>
+ <allotted-resource-name>namefromrequest</allotted-resource-name>
+ <allotted-resource-type>tunnelxconn</allotted-resource-type>
+ <allotted-resource-id>allottedresourceidfromrequest</allotted-resource-id>
+ </allotted-resource-identifiers>
+ <tunnelxconn-assignments>
+ <vni>my-vni</vni>
+ <vgmux-bearer-ip>my-bearer-ip</vgmux-bearer-ip>
+ <vgmux-lan-ip>my-lan-ip</vgmux-lan-ip>
+ </tunnelxconn-assignments>
+</tunnelxconn-topology>
+
+</output>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXC/getAR.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXC/getAR.xml
new file mode 100644
index 0000000000..e352ff8f1f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXC/getAR.xml
@@ -0,0 +1,8 @@
+<allotted-resource xmlns="http://org.openecomp.aai.inventory/v9">
+ <relationship-list>
+ <relationship>
+ <related-to>allotted-resource</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v7/business/customers/customer/SDN-ETHERNET-INTERNET/service-subscriptions/service-subscription/123456789/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET/allotted-resources/allotted-resource/arId-1</related-link>
+ </relationship>
+ </relationship-list>
+</allotted-resource>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXC/getArTxc.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXC/getArTxc.xml
new file mode 100644
index 0000000000..dfb7d46a68
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXC/getArTxc.xml
@@ -0,0 +1,31 @@
+<allotted-resource xmlns="http://org.openecomp.aai.inventory/v9">
+ <id>ar-1</id>
+ <orchestration-status>Active</orchestration-status>
+ <role>TXCr</role>
+ <type>TXCt</type>
+ <description>TXC</description>
+ <selflink/>
+ <resource-version>1490627351232</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>service-instance</related-to>
+ <related-link>http://localhost:28090/aai/v9/business/customers/customer/SDN-ETHERNET-INTERNET/service-subscriptions/service-subscription/123456789/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET/allotted-resources/allotted-resource/arId-1</related-link>
+ <relationship-data>
+ <relationship-key>customer.global-customer-id</relationship-key>
+ <relationship-value>SDN-ETHERNET-INTERNET</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-subscription.service-type</relationship-key>
+ <relationship-value>123456789</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-instance.service-instance-id</relationship-key>
+ <relationship-value>88819355-9a71-4ddc-9e22-373f0644b40b</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>service-instance.service-instance-name</property-key>
+ <property-value>vcpe-1702-m010904-name4</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+</allotted-resource>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXC/getArTxc2.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXC/getArTxc2.xml
new file mode 100644
index 0000000000..59c503036a
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXC/getArTxc2.xml
@@ -0,0 +1,31 @@
+<allotted-resource xmlns="http://org.openecomp.aai.inventory/v9">
+ <id>ar-1</id>
+ <orchestration-status>Active</orchestration-status>
+ <role>brg</role>
+ <type>TXC</type>
+ <description>TXC</description>
+ <selflink/>
+ <resource-version>1490627351232</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>service-instance</related-to>
+ <related-link>http://localhost:28090/aai/v9/business/customers/customer/SDN-ETHERNET-INTERNET/service-subscriptions/service-subscription/123456789/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET/allotted-resources/allotted-resource/arId-1</related-link>
+ <relationship-data>
+ <relationship-key>customer.global-customer-id</relationship-key>
+ <relationship-value>SDN-ETHERNET-INTERNET</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-subscription.service-type</relationship-key>
+ <relationship-value>123456789</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-instance.service-instance-id</relationship-key>
+ <relationship-value>88819355-9a71-4ddc-9e22-373f0644b40b</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>service-instance.service-instance-name</property-key>
+ <property-value>vcpe-1702-m010904-name4</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+</allotted-resource>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXC/getSIandAR.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXC/getSIandAR.xml
new file mode 100644
index 0000000000..14c7410995
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXC/getSIandAR.xml
@@ -0,0 +1,38 @@
+<service-instance>
+ <service-instance-id>MIS/1604/0026/SW_INTERNET</service-instance-id>
+ <resource-version>123456789</resource-version>
+
+ <orchestration-status>Active</orchestration-status>
+
+ <relationship-list>
+ <relationship>
+ <related-to>allotted-resource</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v7/business/customers/customer/SDN-ETHERNET-INTERNET/service-subscriptions/service-subscription/123456789/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET/allotted-resources/allotted-resource/arId-1</related-link>
+ </relationship>
+
+ <relationship>
+ <related-to>cvlan-tag</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v2/network/vces/vce/832bace2-3fb0-49e0-a6a4-07c47223c535/port-groups/port-group/slcp1447vbc.ipag/cvlan-tags/cvlan-tag/2003/</related-link>
+ <relationship-data>
+ <relationship-key>cvlan-tag.cvlan-tag</relationship-key>
+ <relationship-value>2003</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>port-group.interface-id</relationship-key>
+ <relationship-value>slcp1447vbc.ipag</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>vce.vnf-id</relationship-key>
+ <relationship-value>832bace2-3fb0-49e0-a6a4-07c47223c535</relationship-value>
+ </relationship-data>
+ </relationship>
+ <relationship>
+ <related-to>vce</related-to>
+ <related-link>https://aai-ext1.test.com:8443/aai/v2/network/vces/vce/832bace2-3fb0-49e0-a6a4-07c47223c535/</related-link>
+ <relationship-data>
+ <relationship-key>vce.vnf-id</relationship-key>
+ <relationship-value>832bace2-3fb0-49e0-a6a4-07c47223c535</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+</service-instance>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXCRollback/arGetById.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXCRollback/arGetById.xml
new file mode 100644
index 0000000000..bb7f4c20fd
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXCRollback/arGetById.xml
@@ -0,0 +1,31 @@
+<allotted-resource xmlns="http://org.openecomp.aai.inventory/v9">
+ <id>ar-1</id>
+ <orchestration-status>Active</orchestration-status>
+ <role>TunnelXConn</role>
+ <type>TunnelXConn</type>
+ <description>TunnelXConn</description>
+ <selflink/>
+ <resource-version>1490627351232</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>service-instance</related-to>
+ <related-link>http://localhost:28090/aai/v9/business/customers/customer/SDN-ETHERNET-INTERNET/service-subscriptions/service-subscription/123456789/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET/allotted-resources/allotted-resource/arId-1</related-link>
+ <relationship-data>
+ <relationship-key>customer.global-customer-id</relationship-key>
+ <relationship-value>SDN-ETHERNET-INTERNET</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-subscription.service-type</relationship-key>
+ <relationship-value>123456789</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-instance.service-instance-id</relationship-key>
+ <relationship-value>88819355-9a71-4ddc-9e22-373f0644b40b</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>service-instance.service-instance-name</property-key>
+ <property-value>vcpe-1702-m010904-name4</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+</allotted-resource>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXCRollback/sdncActivateRollbackReq.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXCRollback/sdncActivateRollbackReq.xml
new file mode 100644
index 0000000000..35630b79a8
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXCRollback/sdncActivateRollbackReq.xml
@@ -0,0 +1,51 @@
+<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>b043d290-140d-4a38-a9b6-95d3b8bd27d1</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>MIS%252F1604%252F0026%252FSW_INTERNET</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>deactvate</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>tunnelxconn-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>http://localhost:8080/mso/SDNCAdapterCallbackService</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>RaaTestRequestId1</request-id>
+ <request-action>DeleteTunnelXConnInstance</request-action>
+ <source>MSO</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id></service-id>
+ <subscription-service-type></subscription-service-type>
+ <onap-model-information></onap-model-information>
+ <service-instance-id>MIS%252F1604%252F0026%252FSW_INTERNET</service-instance-id>
+ <subscriber-name/>
+ <global-customer-id></global-customer-id>
+ </service-information>
+ <allotted-resource-information>
+ <allotted-resource-id>arId-1</allotted-resource-id>
+ <allotted-resource-type>tunnelxconn</allotted-resource-type>
+ <parent-service-instance-id>MIS%252F1604%252F0026%252FSW_INTERNET</parent-service-instance-id>
+ <onap-model-information>
+ <model-invariant-uuid></model-invariant-uuid>
+ <model-uuid></model-uuid>
+ <model-customization-uuid></model-customization-uuid>
+ <model-version></model-version>
+ <model-name></model-name>
+ </onap-model-information>
+ </allotted-resource-information>
+ <tunnelxconn-request-input>
+ <source-network>
+ <network-id>${sourceNetworkId}</network-id>
+ <network-role>${sourceNetworkRole}</network-role>
+ </source-network>
+ <dest-network>
+ <network-id/>
+ <network-role></network-role>
+ </dest-network>
+ </tunnelxconn-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+</sdncadapterworkflow:SDNCAdapterWorkflowRequest>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXCRollback/sdncAssignRollbackReq.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXCRollback/sdncAssignRollbackReq.xml
new file mode 100644
index 0000000000..f6c9cc4626
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXCRollback/sdncAssignRollbackReq.xml
@@ -0,0 +1,51 @@
+<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>b043d290-140d-4a38-a9b6-95d3b8bd27d3</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>MIS%252F1604%252F0026%252FSW_INTERNET</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>unassign</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>tunnelxconn-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>http://localhost:8080/mso/SDNCAdapterCallbackService</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>RaaTestRequestId1</request-id>
+ <request-action>DeleteTunnelXConnInstance</request-action>
+ <source>MSO</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id></service-id>
+ <subscription-service-type></subscription-service-type>
+ <onap-model-information></onap-model-information>
+ <service-instance-id>MIS%252F1604%252F0026%252FSW_INTERNET</service-instance-id>
+ <subscriber-name/>
+ <global-customer-id></global-customer-id>
+ </service-information>
+ <allotted-resource-information>
+ <allotted-resource-id>arId-1</allotted-resource-id>
+ <allotted-resource-type>tunnelxconn</allotted-resource-type>
+ <parent-service-instance-id>MIS%252F1604%252F0026%252FSW_INTERNET</parent-service-instance-id>
+ <onap-model-information>
+ <model-invariant-uuid></model-invariant-uuid>
+ <model-uuid></model-uuid>
+ <model-customization-uuid></model-customization-uuid>
+ <model-version></model-version>
+ <model-name></model-name>
+ </onap-model-information>
+ </allotted-resource-information>
+ <tunnelxconn-request-input>
+ <source-network>
+ <network-id>${sourceNetworkId}</network-id>
+ <network-role>${sourceNetworkRole}</network-role>
+ </source-network>
+ <dest-network>
+ <network-id/>
+ <network-role></network-role>
+ </dest-network>
+ </tunnelxconn-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+</sdncadapterworkflow:SDNCAdapterWorkflowRequest>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXCRollback/sdncCreateRollbackReq.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXCRollback/sdncCreateRollbackReq.xml
new file mode 100644
index 0000000000..2a5597ca77
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoCreateAllottedResourceTXCRollback/sdncCreateRollbackReq.xml
@@ -0,0 +1,51 @@
+<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.onap/so/request/types/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>b043d290-140d-4a38-a9b6-95d3b8bd27d2</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>MIS%252F1604%252F0026%252FSW_INTERNET</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>delete</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>tunnelxconn-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>http://localhost:8080/mso/SDNCAdapterCallbackService</sdncadapter:CallbackUrl>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>RaaTestRequestId1</request-id>
+ <request-action>DeleteTunnelXConnInstance</request-action>
+ <source>MSO</source>
+ <notification-url/>
+ <order-number/>
+ <order-version/>
+ </request-information>
+ <service-information>
+ <service-id></service-id>
+ <subscription-service-type></subscription-service-type>
+ <onap-model-information></onap-model-information>
+ <service-instance-id>MIS%252F1604%252F0026%252FSW_INTERNET</service-instance-id>
+ <subscriber-name/>
+ <global-customer-id></global-customer-id>
+ </service-information>
+ <allotted-resource-information>
+ <allotted-resource-id>arId-1</allotted-resource-id>
+ <allotted-resource-type>tunnelxconn</allotted-resource-type>
+ <parent-service-instance-id>MIS%252F1604%252F0026%252FSW_INTERNET</parent-service-instance-id>
+ <onap-model-information>
+ <model-invariant-uuid></model-invariant-uuid>
+ <model-uuid></model-uuid>
+ <model-customization-uuid></model-customization-uuid>
+ <model-version></model-version>
+ <model-name></model-name>
+ </onap-model-information>
+ </allotted-resource-information>
+ <tunnelxconn-request-input>
+ <source-network>
+ <network-id>${sourceNetworkId}</network-id>
+ <network-role>${sourceNetworkRole}</network-role>
+ </source-network>
+ <dest-network>
+ <network-id/>
+ <network-role></network-role>
+ </dest-network>
+ </tunnelxconn-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+</sdncadapterworkflow:SDNCAdapterWorkflowRequest>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoDeleteAllottedResourceBRG/arGetById.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoDeleteAllottedResourceBRG/arGetById.xml
new file mode 100644
index 0000000000..8ed991608a
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoDeleteAllottedResourceBRG/arGetById.xml
@@ -0,0 +1,31 @@
+<allotted-resource xmlns="http://org.openecomp.aai.inventory/v9">
+ <id>ar-1</id>
+ <orchestration-status>Active</orchestration-status>
+ <role>BRG</role>
+ <type>BRG</type>
+ <description>BRG</description>
+ <selflink/>
+ <resource-version>1490627351232</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>service-instance</related-to>
+ <related-link>http://localhost:28090/aai/v9/business/customers/customer/SDN-ETHERNET-INTERNET/service-subscriptions/service-subscription/123456789/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET/allotted-resources/allotted-resource/arId-1</related-link>
+ <relationship-data>
+ <relationship-key>customer.global-customer-id</relationship-key>
+ <relationship-value>SDN-ETHERNET-INTERNET</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-subscription.service-type</relationship-key>
+ <relationship-value>123456789</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-instance.service-instance-id</relationship-key>
+ <relationship-value>88819355-9a71-4ddc-9e22-373f0644b40b</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>service-instance.service-instance-name</property-key>
+ <property-value>vcpe-1702-m010904-name4</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+</allotted-resource>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoDeleteAllottedResourceTXC/arGetById.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoDeleteAllottedResourceTXC/arGetById.xml
new file mode 100644
index 0000000000..bb7f4c20fd
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VCPE/DoDeleteAllottedResourceTXC/arGetById.xml
@@ -0,0 +1,31 @@
+<allotted-resource xmlns="http://org.openecomp.aai.inventory/v9">
+ <id>ar-1</id>
+ <orchestration-status>Active</orchestration-status>
+ <role>TunnelXConn</role>
+ <type>TunnelXConn</type>
+ <description>TunnelXConn</description>
+ <selflink/>
+ <resource-version>1490627351232</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>service-instance</related-to>
+ <related-link>http://localhost:28090/aai/v9/business/customers/customer/SDN-ETHERNET-INTERNET/service-subscriptions/service-subscription/123456789/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET/allotted-resources/allotted-resource/arId-1</related-link>
+ <relationship-data>
+ <relationship-key>customer.global-customer-id</relationship-key>
+ <relationship-value>SDN-ETHERNET-INTERNET</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-subscription.service-type</relationship-key>
+ <relationship-value>123456789</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-instance.service-instance-id</relationship-key>
+ <relationship-value>88819355-9a71-4ddc-9e22-373f0644b40b</relationship-value>
+ </relationship-data>
+ <related-to-property>
+ <property-key>service-instance.service-instance-name</property-key>
+ <property-value>vcpe-1702-m010904-name4</property-value>
+ </related-to-property>
+ </relationship>
+ </relationship-list>
+</allotted-resource>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogServiceResourcesData.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogServiceResourcesData.json
new file mode 100644
index 0000000000..d05fccf98a
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogServiceResourcesData.json
@@ -0,0 +1,94 @@
+{ "serviceResources" : {
+ "modelInfo" : {
+ "modelName" : "MSO Test Network",
+ "modelUuid" : "aed5a5b7-20d3-44f7-90a3-ddbd16f14d1e",
+ "modelInvariantUuid" : "52b49b5d-3086-4ffd-b5e6-1b1e5e7e062f",
+ "modelVersion" : null
+ },
+ "serviceVnfs": [
+ { "modelInfo" : {
+ "modelName" : "vHNF for DHV Test",
+ "modelUuid" : "7097d8bb-f6ad-4cf7-866e-6a04c8f1b332",
+ "modelInvariantUuid" : "6ea0b528-e303-4686-aa77-aa2fcbdccb96",
+ "modelVersion" : "2.0",
+ "modelCustomizationUuid" : "da86dd87-43c5-458c-b226-5315b7be9ad5",
+ "modelInstanceName" : "vHNF for DHV Test 17"
+ },
+ "toscaNodeType" : null,
+ "nfFunction" : null,
+ "nfType" : null,
+ "nfRole" : null,
+ "nfNamingCode" : null,
+ "multiStageDesign" : null,
+ "vfModules": [
+ {
+ "modelInfo" : {
+ "modelName" : "VhnfForDhvTest..base_TEST..module-0",
+ "modelUuid" : "ebc3d18c-3e62-4c24-bcd6-961e98701a0a",
+ "modelInvariantUuid" : "f5696ec0-ec71-4916-bf3b-93a654efcba4",
+ "modelVersion" : "1",
+ "modelCustomizationUuid" : "1740536a-742e-40f5-b9c8-83918849a787"
+ }, "isBase" : true,
+ "vfModuleLabel" : "base_TEST",
+ "initialCount" : 1,
+ "hasVolumeGroup" : true
+ }
+ ]
+ }
+ ],
+ "serviceNetworks": [
+ {
+ "modelInfo" : {
+ "modelName" : "CONTRAIL_BASIC",
+ "modelUuid" : "fe5be3a6-dbe0-46d6-bcac-44dc841a7edc",
+ "modelInvariantUuid" : "ab07fbd8-185a-45ac-be45-db3eb02e98d5",
+ "modelVersion" : null,
+ "modelCustomizationUuid" : "0cb9b26a-9820-48a7-86e5-16c510e993d9",
+ "modelInstanceName" : "CONTRAIL_BASIC 5"
+ },
+ "toscaNodeType" : null,
+ "networkType" : null,
+ "networkTechnology" : null,
+ "networkRole" : null,
+ "networkScope" : null
+ }
+ ],
+ "serviceAllottedResources": [
+ {
+ "modelInfo" : {
+ "modelName" : "IP_MUX_Demux",
+ "modelUuid" : "64a1a718-556b-48ce-b3b7-ed3237ccc94f",
+ "modelInvariantUuid" : "f110ef53-a0a6-4d72-ab91-fd88a835e8c4",
+ "modelVersion" : "2.0",
+ "modelCustomizationUuid" : "4bab0880-2f06-4aeb-87cb-3734c8e8bf93",
+ "modelInstanceName" : "Pri_IP_MUX_Demux 1"
+ },
+ "toscaNodeType" : null,
+ "allottedResourceType" : "ContrailRoute",
+ "allottedResourceRole" : null,
+ "providingServiceModelInvariantUuid" : null,
+ "nfFunction" : null,
+ "nfType" : null,
+ "nfRole" : null,
+ "nfNamingCode" : null
+ },
+ {
+ "modelInfo" : {
+ "modelName" : "Service_Admin",
+ "modelUuid" : "73501e03-ee76-4509-a8ce-96d2a9f33ee9",
+ "modelInvariantUuid" : "462edf71-1a3c-487b-bf55-497460ab7de3",
+ "modelVersion" : "2.0",
+ "modelCustomizationUuid" : "a896ffad-c8f9-404e-a527-7a8d0cc99ce6",
+ "modelInstanceName" : "Pri_Service_Admin 5"
+ },
+ "toscaNodeType" : null,
+ "allottedResourceType" : "SecurityZone",
+ "allottedResourceRole" : null,
+ "providingServiceModelInvariantUuid" : null,
+ "nfFunction" : null,
+ "nfType" : null,
+ "nfRole" : null,
+ "nfNamingCode" : null
+ }
+ ]
+ }} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogServiceResourcesDataForReplaceVnfInfra.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogServiceResourcesDataForReplaceVnfInfra.json
new file mode 100644
index 0000000000..b6e8a94888
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogServiceResourcesDataForReplaceVnfInfra.json
@@ -0,0 +1,98 @@
+{ "serviceResources" : {
+ "serviceType" : "PortMirroring",
+ "serviceRole" : "InfraRole",
+ "environmentContext" : "Luna",
+ "workloadContext" : "Oxygen",
+ "modelInfo" : {
+ "modelName" : "MSO Test Network",
+ "modelUuid" : "aed5a5b7-20d3-44f7-90a3-ddbd16f14d1e",
+ "modelInvariantUuid" : "52b49b5d-3086-4ffd-b5e6-1b1e5e7e062f",
+ "modelVersion" : null
+ },
+ "serviceVnfs": [
+ { "modelInfo" : {
+ "modelName" : "vHNF for DHV Test",
+ "modelUuid" : "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelInvariantUuid" : "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersion" : "1.0",
+ "modelCustomizationUuid" : "MODEL-ID-1234",
+ "modelInstanceName" : "vHNF for DHV Test 17"
+ },
+ "toscaNodeType" : null,
+ "nfFunction" : null,
+ "nfType" : null,
+ "nfRole" : "vSCP",
+ "nfNamingCode" : null,
+ "multiStageDesign" : null,
+ "vfModules": [
+ {
+ "modelInfo" : {
+ "modelName" : "VhnfForDhvTest..base_TEST..module-0",
+ "modelUuid" : "ebc3d18c-3e62-4c24-bcd6-961e98701a0a",
+ "modelInvariantUuid" : "introvert",
+ "modelVersion" : "1",
+ "modelCustomizationUuid" : "1740536a-742e-40f5-b9c8-83918849a787"
+ }, "isBase" : true,
+ "vfModuleLabel" : "base_TEST",
+ "initialCount" : 1,
+ "hasVolumeGroup" : true
+ }
+ ]
+ }
+ ],
+ "serviceNetworks": [
+ {
+ "modelInfo" : {
+ "modelName" : "CONTRAIL_BASIC",
+ "modelUuid" : "fe5be3a6-dbe0-46d6-bcac-44dc841a7edc",
+ "modelInvariantUuid" : "ab07fbd8-185a-45ac-be45-db3eb02e98d5",
+ "modelVersion" : null,
+ "modelCustomizationUuid" : "0cb9b26a-9820-48a7-86e5-16c510e993d9",
+ "modelInstanceName" : "CONTRAIL_BASIC 5"
+ },
+ "toscaNodeType" : null,
+ "networkType" : null,
+ "networkTechnology" : null,
+ "networkRole" : null,
+ "networkScope" : null
+ }
+ ],
+ "serviceAllottedResources": [
+ {
+ "modelInfo" : {
+ "modelName" : "IP_MUX_Demux",
+ "modelUuid" : "64a1a718-556b-48ce-b3b7-ed3237ccc94f",
+ "modelInvariantUuid" : "f110ef53-a0a6-4d72-ab91-fd88a835e8c4",
+ "modelVersion" : "2.0",
+ "modelCustomizationUuid" : "4bab0880-2f06-4aeb-87cb-3734c8e8bf93",
+ "modelInstanceName" : "Pri_IP_MUX_Demux 1"
+ },
+ "toscaNodeType" : null,
+ "allottedResourceType" : "ContrailRoute",
+ "allottedResourceRole" : null,
+ "providingServiceModelInvariantUuid" : null,
+ "nfFunction" : null,
+ "nfType" : null,
+ "nfRole" : null,
+ "nfNamingCode" : null
+ },
+ {
+ "modelInfo" : {
+ "modelName" : "Service_Admin",
+ "modelUuid" : "73501e03-ee76-4509-a8ce-96d2a9f33ee9",
+ "modelInvariantUuid" : "462edf71-1a3c-487b-bf55-497460ab7de3",
+ "modelVersion" : "2.0",
+ "modelCustomizationUuid" : "a896ffad-c8f9-404e-a527-7a8d0cc99ce6",
+ "modelInstanceName" : "Pri_Service_Admin 5"
+ },
+ "toscaNodeType" : null,
+ "allottedResourceType" : "SecurityZone",
+ "allottedResourceRole" : null,
+ "providingServiceModelInvariantUuid" : null,
+ "nfFunction" : null,
+ "nfType" : null,
+ "nfRole" : null,
+ "nfNamingCode" : null
+ }
+ ]
+ }} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogServiceResourcesDataForUpdateVnfInfra.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogServiceResourcesDataForUpdateVnfInfra.json
new file mode 100644
index 0000000000..e1d3118537
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogServiceResourcesDataForUpdateVnfInfra.json
@@ -0,0 +1,110 @@
+{ "serviceResources" : {
+ "serviceType" : "PortMirroring",
+ "serviceRole" : "InfraRole",
+ "environmentContext" : "Luna",
+ "workloadContext" : "Oxygen",
+ "modelInfo" : {
+ "modelName" : "MSO Test Network",
+ "modelUuid" : "aed5a5b7-20d3-44f7-90a3-ddbd16f14d1e",
+ "modelInvariantUuid" : "52b49b5d-3086-4ffd-b5e6-1b1e5e7e062f",
+ "modelVersion" : null
+ },
+ "serviceVnfs": [
+ { "modelInfo" : {
+ "modelName" : "vHNF for DHV Test",
+ "modelUuid" : "7097d8bb-f6ad-4cf7-866e-6a04c8f1b332",
+ "modelInvariantUuid" : "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersion" : "2.0",
+ "modelCustomizationUuid" : "da86dd87-43c5-458c-b226-5315b7be9ad5",
+ "modelInstanceName" : "vHNF for DHV Test 17"
+ },
+ "toscaNodeType" : null,
+ "nfFunction" : null,
+ "nfType" : null,
+ "nfRole" : "vSCP",
+ "nfNamingCode" : null,
+ "multiStageDesign" : null,
+ "vfModules": [
+ {
+ "modelInfo" : {
+ "modelName" : "VhnfForDhvTest..base_TEST..module-0",
+ "modelUuid" : "ebc3d18c-3e62-4c24-bcd6-961e98701a0a",
+ "modelInvariantUuid" : "introvert",
+ "modelVersion" : "1",
+ "modelCustomizationUuid" : "1740536a-742e-40f5-b9c8-83918849a787"
+ }, "isBase" : true,
+ "vfModuleLabel" : "base_TEST",
+ "initialCount" : 1,
+ "hasVolumeGroup" : true
+ },
+ {
+ "modelInfo" : {
+ "modelName" : "VhnfForDhvTest..base_TEST..module-1",
+ "modelUuid" : "ebc3d18c-3e62-4c24-bcd6-961e98701a0b",
+ "modelInvariantUuid" : "extrovert",
+ "modelVersion" : "1",
+ "modelCustomizationUuid" : "1740536a-742e-40f5-b9c8-83918849a788"
+ }, "isBase" : false,
+ "vfModuleLabel" : "addon_TEST",
+ "initialCount" : 1,
+ "hasVolumeGroup" : true
+ }
+ ]
+ }
+ ],
+ "serviceNetworks": [
+ {
+ "modelInfo" : {
+ "modelName" : "CONTRAIL_BASIC",
+ "modelUuid" : "fe5be3a6-dbe0-46d6-bcac-44dc841a7edc",
+ "modelInvariantUuid" : "ab07fbd8-185a-45ac-be45-db3eb02e98d5",
+ "modelVersion" : null,
+ "modelCustomizationUuid" : "0cb9b26a-9820-48a7-86e5-16c510e993d9",
+ "modelInstanceName" : "CONTRAIL_BASIC 5"
+ },
+ "toscaNodeType" : null,
+ "networkType" : null,
+ "networkTechnology" : null,
+ "networkRole" : null,
+ "networkScope" : null
+ }
+ ],
+ "serviceAllottedResources": [
+ {
+ "modelInfo" : {
+ "modelName" : "IP_MUX_Demux",
+ "modelUuid" : "64a1a718-556b-48ce-b3b7-ed3237ccc94f",
+ "modelInvariantUuid" : "f110ef53-a0a6-4d72-ab91-fd88a835e8c4",
+ "modelVersion" : "2.0",
+ "modelCustomizationUuid" : "4bab0880-2f06-4aeb-87cb-3734c8e8bf93",
+ "modelInstanceName" : "Pri_IP_MUX_Demux 1"
+ },
+ "toscaNodeType" : null,
+ "allottedResourceType" : "ContrailRoute",
+ "allottedResourceRole" : null,
+ "providingServiceModelInvariantUuid" : null,
+ "nfFunction" : null,
+ "nfType" : null,
+ "nfRole" : null,
+ "nfNamingCode" : null
+ },
+ {
+ "modelInfo" : {
+ "modelName" : "Service_Admin",
+ "modelUuid" : "73501e03-ee76-4509-a8ce-96d2a9f33ee9",
+ "modelInvariantUuid" : "462edf71-1a3c-487b-bf55-497460ab7de3",
+ "modelVersion" : "2.0",
+ "modelCustomizationUuid" : "a896ffad-c8f9-404e-a527-7a8d0cc99ce6",
+ "modelInstanceName" : "Pri_Service_Admin 5"
+ },
+ "toscaNodeType" : null,
+ "allottedResourceType" : "SecurityZone",
+ "allottedResourceRole" : null,
+ "providingServiceModelInvariantUuid" : null,
+ "nfFunction" : null,
+ "nfType" : null,
+ "nfRole" : null,
+ "nfNamingCode" : null
+ }
+ ]
+ }} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogVnfData.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogVnfData.json
new file mode 100644
index 0000000000..c7938d1af6
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogVnfData.json
@@ -0,0 +1,44 @@
+{"serviceVnfs": [
+ { "modelInfo" : {
+ "modelName" : "vHNF for DHV Test",
+ "modelUuid" : "7097d8bb-f6ad-4cf7-866e-6a04c8f1b332",
+ "modelInvariantUuid" : "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersion" : "2.0",
+ "modelCustomizationUuid" : "da86dd87-43c5-458c-b226-5315b7be9ad5",
+ "modelInstanceName" : "vHNF for DHV Test 17"
+ },
+ "toscaNodeType" : null,
+ "nfFunction" : null,
+ "nfType" : null,
+ "nfRole" : "vSCP",
+ "nfNamingCode" : null,
+ "multiStageDesign" : null,
+ "vfModules": [
+ {
+ "modelInfo" : {
+ "modelName" : "VhnfForDhvTest..base_TEST..module-0",
+ "modelUuid" : "ebc3d18c-3e62-4c24-bcd6-961e98701a0a",
+ "modelInvariantUuid" : "introvert",
+ "modelVersion" : "1",
+ "modelCustomizationUuid" : "1740536a-742e-40f5-b9c8-83918849a787"
+ }, "isBase" : true,
+ "vfModuleLabel" : "base_TEST",
+ "initialCount" : 1,
+ "hasVolumeGroup" : true
+ },
+ {
+ "modelInfo" : {
+ "modelName" : "VhnfForDhvTest..base_TEST..module-1",
+ "modelUuid" : "ebc3d18c-3e62-4c24-bcd6-961e98701a0b",
+ "modelInvariantUuid" : "extrovert",
+ "modelVersion" : "1",
+ "modelCustomizationUuid" : "1740536a-742e-40f5-b9c8-83918849a788"
+ }, "isBase" : false,
+ "vfModuleLabel" : "addon_TEST",
+ "initialCount" : 1,
+ "hasVolumeGroup" : true
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogVnfNoTwoPhasedForVfModule.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogVnfNoTwoPhasedForVfModule.json
new file mode 100644
index 0000000000..3067d124c3
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogVnfNoTwoPhasedForVfModule.json
@@ -0,0 +1,44 @@
+{"serviceVnfs": [
+ { "modelInfo" : {
+ "modelName" : "vSAMP12",
+ "modelUuid" : "7097d8bb-f6ad-4cf7-866e-6a04c8f1b332",
+ "modelInvariantUuid" : "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersion" : "2.0",
+ "modelCustomizationUuid" : "MODEL-123",
+ "modelInstanceName" : "VNF for VF Module Create Test Two Phased"
+ },
+ "toscaNodeType" : null,
+ "nfFunction" : null,
+ "nfType" : null,
+ "nfRole" : "vSCP",
+ "nfNamingCode" : null,
+ "multiStageDesign" : null,
+ "vfModules": [
+ {
+ "modelInfo" : {
+ "modelName" : "STMTN5MMSC21-MMSC::model-1-0",
+ "modelUuid" : "ebc3d18c-3e62-4c24-bcd6-961e98701a0a",
+ "modelInvariantUuid" : "introvert",
+ "modelVersion" : "1",
+ "modelCustomizationUuid" : "1740536a-742e-40f5-b9c8-83918849a787"
+ }, "isBase" : true,
+ "vfModuleLabel" : "base_TEST",
+ "initialCount" : 1,
+ "hasVolumeGroup" : true
+ },
+ {
+ "modelInfo" : {
+ "modelName" : "VhnfForDhvTest..base_TEST..module-1",
+ "modelUuid" : "ebc3d18c-3e62-4c24-bcd6-961e98701a0b",
+ "modelInvariantUuid" : "extrovert",
+ "modelVersion" : "1",
+ "modelCustomizationUuid" : "1740536a-742e-40f5-b9c8-83918849a788"
+ }, "isBase" : false,
+ "vfModuleLabel" : "addon_TEST",
+ "initialCount" : 1,
+ "hasVolumeGroup" : true
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogVnfYesTwoPhasedForVfModule.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogVnfYesTwoPhasedForVfModule.json
new file mode 100644
index 0000000000..a9b3226483
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/getCatalogVnfYesTwoPhasedForVfModule.json
@@ -0,0 +1,44 @@
+{"serviceVnfs": [
+ { "modelInfo" : {
+ "modelName" : "vSAMP12",
+ "modelUuid" : "7097d8bb-f6ad-4cf7-866e-6a04c8f1b332",
+ "modelInvariantUuid" : "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersion" : "2.0",
+ "modelCustomizationUuid" : "MODEL-123",
+ "modelInstanceName" : "VNF for VF Module Create Test Two Phased"
+ },
+ "toscaNodeType" : null,
+ "nfFunction" : null,
+ "nfType" : null,
+ "nfRole" : "vSCP",
+ "nfNamingCode" : null,
+ "multiStageDesign" : "true",
+ "vfModules": [
+ {
+ "modelInfo" : {
+ "modelName" : "STMTN5MMSC21-MMSC::model-1-0",
+ "modelUuid" : "ebc3d18c-3e62-4c24-bcd6-961e98701a0a",
+ "modelInvariantUuid" : "introvert",
+ "modelVersion" : "1",
+ "modelCustomizationUuid" : "1740536a-742e-40f5-b9c8-83918849a787"
+ }, "isBase" : true,
+ "vfModuleLabel" : "base_TEST",
+ "initialCount" : 1,
+ "hasVolumeGroup" : true
+ },
+ {
+ "modelInfo" : {
+ "modelName" : "VhnfForDhvTest..base_TEST..module-1",
+ "modelUuid" : "ebc3d18c-3e62-4c24-bcd6-961e98701a0b",
+ "modelInvariantUuid" : "extrovert",
+ "modelVersion" : "1",
+ "modelCustomizationUuid" : "1740536a-742e-40f5-b9c8-83918849a788"
+ }, "isBase" : false,
+ "vfModuleLabel" : "addon_TEST",
+ "initialCount" : 1,
+ "hasVolumeGroup" : true
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/serviceDecompositionATMFW.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/serviceDecompositionATMFW.json
new file mode 100644
index 0000000000..bc54c557e1
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VIPR/serviceDecompositionATMFW.json
@@ -0,0 +1,110 @@
+{
+"serviceResources" : {
+ "modelInfo" : {
+ "modelName" : "CMW_Service",
+ "modelUuid" : "",
+ "modelInvariantId" : "cmw-123-456-789",
+ "modelVersion" : "",
+ "modelCustomizationUuid" : "",
+ "modelInstanceName" : "",
+ "modelCustomizationName" : "",
+ "modelVersionId" : "Cmw_123",
+ "modelType" : ""
+ },
+ "serviceInstanceData" : {
+ "instanceId" : "ff5256d2-5a33-55df-13ab-12abad84e7ff"
+ },
+ "serviceNetworks" : [ {
+ "modelInfo" : {
+ "modelName" : "CONTRAIL30_BASIC",
+ "modelUuid" : "",
+ "modelInvariantId" : "not yet implemented",
+ "modelVersion" : "1.0",
+ "modelCustomizationUuid" : "z_network_123",
+ "modelInstanceName" : "",
+ "modelCustomizationName" : "",
+ "modelVersionId" : "mod-inst-uuid-123",
+ "modelType" : "network"
+ },
+ "instanceData" : { },
+ "networkType" : "CONTRAIL30_BASIC"
+ } ],
+ "serviceVnfs" : [ {
+ "modelInfo" : {
+ "modelName" : "vSAMP12",
+ "modelUuid" : "",
+ "modelInvariantId" : "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersion" : "1.0",
+ "modelCustomizationUuid" : "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelInstanceName" : "",
+ "modelCustomizationName" : "",
+ "modelVersionId" : "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelType" : "vnf"
+ },
+ "instanceData" : { },
+ "vfModules" : [ {
+ "modelInfo" : {
+ "modelName" : "vSAMP12::base::module-0",
+ "modelUuid" : "",
+ "modelInvariantId" : "miu-1001",
+ "modelVersion" : "1",
+ "modelCustomizationUuid" : "1001",
+ "modelInstanceName" : "",
+ "modelCustomizationName" : "",
+ "modelVersionId" : "",
+ "modelType" : "vfModule"
+ },
+ "instanceData" : { },
+ "hasVolumeGroup" : false,
+ "isBase" : true,
+ "initialCount" : 1
+ }, {
+ "modelInfo" : {
+ "modelName" : "base::module-0",
+ "modelUuid" : "",
+ "modelInvariantId" : "miu-1002",
+ "modelVersion" : "1",
+ "modelCustomizationUuid" : "1002",
+ "modelInstanceName" : "",
+ "modelCustomizationName" : "",
+ "modelVersionId" : "",
+ "modelType" : "vfModule"
+ },
+ "instanceData" : { },
+ "hasVolumeGroup" : false,
+ "isBase" : true,
+ "initialCount" : 1
+ }, {
+ "modelInfo" : {
+ "modelName" : "vSAMP12DEV::base::module-0",
+ "modelUuid" : "",
+ "modelInvariantId" : "miu-1003",
+ "modelVersion" : "1",
+ "modelCustomizationUuid" : "f86e8800-7629-427f-b284-3dbfd04db01f",
+ "modelInstanceName" : "",
+ "modelCustomizationName" : "",
+ "modelVersionId" : "",
+ "modelType" : "vfModule"
+ },
+ "instanceData" : { },
+ "hasVolumeGroup" : false,
+ "isBase" : true,
+ "initialCount" : 0
+ } ]
+ } ],
+ "serviceAllottedResources" : [ {
+ "modelInfo" : {
+ "modelName" : "Bruce Wayne",
+ "modelUuid" : "",
+ "modelInvariantId" : "not yet implemented",
+ "modelVersion" : "1.0",
+ "modelCustomizationUuid" : "ar-mod-custid-456-456",
+ "modelInstanceName" : "Clark Kent",
+ "modelCustomizationName" : "",
+ "modelVersionId" : "123-123",
+ "modelType" : "allottedResource"
+ },
+ "instanceData" : { }
+ } ]
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/AddNetworkPolicy_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/AddNetworkPolicy_AAIResponse_Success.xml
new file mode 100644
index 0000000000..0688ea51e4
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/AddNetworkPolicy_AAIResponse_Success.xml
@@ -0,0 +1,21 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Mon,14 Mar 2016 20:53:33 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="localhost-20160314-20:53:33:487-134392"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <network-policy xmlns="http://org.openecomp.aai.inventory/v8">
+ <network-policy-id>9a7b327d9-287aa00-82c4b0-105757</network-policy-id>
+ <network-policy-fqdn>fqdn123</network-policy-fqdn>
+ <heat-stack-id>slowburn</heat-stack-id>
+ <resource-version>145878989</resource-version>
+ </network-policy>
+ </rest:payload>
+</rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/CreateVfModuleVolumeCallbackResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/CreateVfModuleVolumeCallbackResponse.xml
new file mode 100644
index 0000000000..a421355aba
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/CreateVfModuleVolumeCallbackResponse.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<createVolumeGroupResponse>
+ <messageId>{{MESSAGE-ID}}</messageId>
+ <volumeGroupCreated>true</volumeGroupCreated>
+ <volumeGroupId>d485ecee-957c-4a0a-8b95-27a22b90103f</volumeGroupId>
+ <volumeGroupOutputs>
+ <entry>
+ <key>mmsc_vol_1</key>
+ <value>a73e0fe9-1ce8-49c2-8fef-e2788605be29</value>
+ </entry>
+ <entry>
+ <key>mmsc_vol_2</key>
+ <value>37b6455a-5ea8-463a-89e3-0efeaf7b7c6d</value>
+ </entry>
+ <entry>
+ <key>nemsfe_vol_1</key>
+ <value>b7ff1c21-d138-49a3-bf13-4cfd91efaf48</value>
+ </entry>
+ <entry>
+ <key>nemsbe_vol_1</key>
+ <value>a5988471-cd42-44d8-b078-64f2f13d3d4c</value>
+ </entry>
+ <entry>
+ <key>mmsc_vol_5</key>
+ <value>f7b91c1e-ab8c-413a-a850-ba80a246c7e0</value>
+ </entry>
+ <entry>
+ <key>nemsfe_vol_2</key>
+ <value>957ea3f3-2d4a-4707-bfd2-ba66f42037c2</value>
+ </entry>
+ <entry>
+ <key>mmsc_vol_3</key>
+ <value>de6fccfe-d61a-48b0-b03b-87bf1bf749b3</value>
+ </entry>
+ <entry>
+ <key>mmsc_vol_4</key>
+ <value>76162310-2c38-4c32-981c-5c2880190077</value>
+ </entry>
+ </volumeGroupOutputs>
+ <volumeGroupRollback>
+ <cloudSiteId>RDM2WAGPLCP</cloudSiteId>
+ <messageId>e585e4f4-9452-437a-b294-45a2d6d3b7a3</messageId>
+ <msoRequest>
+ <requestId>c30b9453-4b68-4c2e-aacf-58a5ba648bf5</requestId>
+ <serviceInstanceId>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</serviceInstanceId>
+ </msoRequest>
+ <tenantId>1bbab536a19b4756926e7d0ec1eb543c</tenantId>
+ <volumeGroupCreated>true</volumeGroupCreated>
+ <volumeGroupId>78987</volumeGroupId>
+ <volumeGroupStackId>ZRDM1MMSC01_base_vol/7f74e5e1-5fc1-4593-ac7e-cc9899a106ef</volumeGroupStackId>
+ </volumeGroupRollback>
+ <volumeGroupStackId>ZRDM1MMSC01_base_vol/7f74e5e1-5fc1-4593-ac7e-cc9899a106ef</volumeGroupStackId>
+</createVolumeGroupResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/DBUpdateResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/DBUpdateResponse.xml
new file mode 100644
index 0000000000..0ae5b79484
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/DBUpdateResponse.xml
@@ -0,0 +1,4 @@
+
+
+<ns2:updateRequestResponse xmlns:ns2="http://org.onap.so/requestsdb"
+ xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"/> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/DoUpdateVfModuleRequest.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/DoUpdateVfModuleRequest.xml
new file mode 100644
index 0000000000..5232e530e9
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/DoUpdateVfModuleRequest.xml
@@ -0,0 +1,29 @@
+<vnf-request xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-info>
+ <request-id>DEV-VF-0011</request-id>
+ <action>UPDATE_VF_MODULE</action>
+ <source>PORTAL</source>
+ </request-info>
+ <vnf-inputs>
+ <vnf-id>skask</vnf-id> <!-- Required -->
+ <vf-module-id>supercool</vf-module-id> <!-- Required -->
+ <vnf-type>pcrf-capacity</vnf-type> <!-- Optional -->
+ <vf-module-model-name>PCRF::module-0</vf-module-model-name> <!-- Required -->
+ <asdc-service-model-version></asdc-service-model-version> <!-- Optional -->
+ <service-id>serviceIdUUID</service-id> <!-- Required -->
+ <aic-cloud-region>MDTWNJ21</aic-cloud-region> <!-- Required -->
+ <tenant-id>fba1bd1e195a404cacb9ce17a9b2b421</tenant-id> <!-- Required -->
+ <volume-group-id>78987</volume-group-id> <!-- Optional -->
+ <persona-model-id>introvert</persona-model-id> <!-- Optional -->
+ <persona-model-version>3.14</persona-model-version> <!-- Optional -->
+ <contrail-service-instance-fqdn>myhost.appl.edu</contrail-service-instance-fqdn> <!-- Optional -->
+ <vnf-persona-model-id>introvert</vnf-persona-model-id> <!-- Optional -->
+ <vnf-persona-model-version>3.14</vnf-persona-model-version> <!-- Optional -->
+ </vnf-inputs>
+ <vnf-params>
+ <param name="oam_network_name">VLAN-OAM-1323</param>
+ <param name="vm_name">slcp34246vbc246ceb</param>
+ <param name="ipag_network">970cd2b9-7f09-4a12-af47-182ea38ba1f0</param>
+ <param name="vpe_network">545cc2c3-1930-4100-b534-5d82d0e12bb6</param>
+ </vnf-params>
+</vnf-request>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/GenerateVfModuleName_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/GenerateVfModuleName_AAIResponse_Success.xml
new file mode 100644
index 0000000000..1c736453bc
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/GenerateVfModuleName_AAIResponse_Success.xml
@@ -0,0 +1,51 @@
+<generic-vnf xmlns="http://org.openecomp.aai.inventory/v7">
+ <vnf-id>12345678-f41f-4822-9323-b75962763d74</vnf-id>
+ <vnf-name>STMTN5MMSC20</vnf-name>
+ <vnf-type>pcrf-capacity</vnf-type>
+ <service-id>SDN-MOBILITY</service-id>
+ <equipment-role>vPCRF</equipment-role>
+ <orchestration-status>pending-create</orchestration-status>
+ <in-maint>false</in-maint>
+ <is-closed-loop-disabled>false</is-closed-loop-disabled>
+ <model-invariant-id>introvert</model-invariant-id>
+ <model-version-id>2.0</model-version-id>
+ <resource-version>0000020</resource-version>
+ <vf-modules>
+ <vf-module>
+ <vf-module-id>lukewarm</vf-module-id>
+ <vf-module-name>PCRF::module-0-0</vf-module-name>
+ <model-invariant-id>extrovert</model-invariant-id>
+ <model-version-id>2.0</model-version-id>
+ <is-base-vf-module>true</is-base-vf-module>
+ <heat-stack-id>fastburn</heat-stack-id>
+ <module-index>2</module-index>
+ <orchestration-status>pending-create</orchestration-status>
+ <resource-version>0000074</resource-version>
+ </vf-module>
+ <vf-module>
+ <vf-module-id>supercool</vf-module-id>
+ <vf-module-name>PCRF::module-1-0</vf-module-name>
+ <model-invariant-id>extrovert</model-invariant-id>
+ <model-version-id>2.0</model-version-id>
+ <is-base-vf-module>false</is-base-vf-module>
+ <heat-stack-id>slowburn</heat-stack-id>
+ <module-index>0</module-index>
+ <orchestration-status>pending-create</orchestration-status>
+ <resource-version>0000075</resource-version>
+ </vf-module>
+ <vf-module>
+ <vf-module-id>supercool</vf-module-id>
+ <vf-module-name>PCRF::module-1-0</vf-module-name>
+ <model-invariant-id>introvert</model-invariant-id>
+ <model-version-id>2.0</model-version-id>
+ <is-base-vf-module>false</is-base-vf-module>
+ <heat-stack-id>slowburn</heat-stack-id>
+ <module-index>1</module-index>
+ <orchestration-status>pending-create</orchestration-status>
+ <resource-version>0000075</resource-version>
+ </vf-module>
+ </vf-modules>
+ <relationship-list/>
+ <l-interfaces/>
+ <lag-interfaces/>
+</generic-vnf>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/GenericVnf.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/GenericVnf.xml
new file mode 100644
index 0000000000..ed96028908
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/GenericVnf.xml
@@ -0,0 +1,38 @@
+<generic-vnf xmlns="http://org.openecomp.aai.inventory/v7">
+ <vnf-id>skask</vnf-id>
+ <vnf-name>STMTN5MMSC20</vnf-name>
+ <vnf-type>pcrf-capacity</vnf-type>
+ <service-id>SDN-MOBILITY</service-id>
+ <equipment-role>vPCRF</equipment-role>
+ <orchestration-status>pending-create</orchestration-status>
+ <in-maint>false</in-maint>
+ <is-closed-loop-disabled>false</is-closed-loop-disabled>
+ <model-invariant-id>introvert</model-invariant-id>
+ <model-version-id>2.0</model-version-id>
+ <resource-version>0000020</resource-version>
+ <vf-modules>
+ <vf-module>
+ <vf-module-id>lukewarm</vf-module-id>
+ <vf-module-name>PCRF::module-0-0</vf-module-name>
+ <model-invariant-id>introvert</model-invariant-id>
+ <model-version-id>2.0</model-version-id>
+ <is-base-vf-module>true</is-base-vf-module>
+ <heat-stack-id>fastburn</heat-stack-id>
+ <orchestration-status>pending-create</orchestration-status>
+ <resource-version>0000074</resource-version>
+ </vf-module>
+ <vf-module>
+ <vf-module-id>supercool</vf-module-id>
+ <vf-module-name>PCRF::module-1-0</vf-module-name>
+ <model-invariant-id>extrovert</model-invariant-id>
+ <model-version-id>2.0</model-version-id>
+ <is-base-vf-module>false</is-base-vf-module>
+ <heat-stack-id>slowburn</heat-stack-id>
+ <orchestration-status>pending-create</orchestration-status>
+ <resource-version>0000075</resource-version>
+ </vf-module>
+ </vf-modules>
+ <relationship-list/>
+ <l-interfaces/>
+ <lag-interfaces/>
+</generic-vnf>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/QueryNetworkPolicy_AAIResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/QueryNetworkPolicy_AAIResponse_Success.xml
new file mode 100644
index 0000000000..f3009e0f4c
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/QueryNetworkPolicy_AAIResponse_Success.xml
@@ -0,0 +1,21 @@
+<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+ statusCode="200">
+ <rest:headers>
+ <rest:header name="Transfer-Encoding" value="chunked"/>
+ <rest:header name="Date" value="Mon,14 Mar 2016 20:53:33 GMT"/>
+ <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
+ <rest:header name="X-AAI-TXID"
+ value="localhost-20160314-20:53:33:487-134392"/>
+ <rest:header name="Content-Type" value="application/xml"/>
+ <rest:header name="Server" value="Apache-Coyote/1.1"/>
+ <rest:header name="Cache-Control" value="private"/>
+ </rest:headers>
+ <rest:payload contentType="text/xml">
+ <network-policy xmlns="http://org.openecomp.aai.inventory/v8">
+ <network-policy-id>9a7b327d9-287aa00-82c4b0-105757</network-policy-id>
+ <network-policy-fqdn>GN_EVPN_Test</network-policy-fqdn>
+ <heat-stack-id>195159195</heat-stack-id>
+ <resource-version>14567890</resource-version>
+ </network-policy>
+ </rest:payload>
+</rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCSITopologyAssignCallback.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCSITopologyAssignCallback.xml
new file mode 100644
index 0000000000..d476b728bd
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCSITopologyAssignCallback.xml
@@ -0,0 +1,11 @@
+<output
+ xmlns="org:onap:sdnc:northbound:generic-resource">
+ <svc-request-id>094d311c-40bc-4ff1-9617-37c4226efcc3</svc-request-id>
+ <response-code>200</response-code>
+ <response-message></response-message>
+ <ack-final-indicator>Y</ack-final-indicator>
+ <service-response-information>
+ <instance-id>8462db9b-3e91-4e90-a2c8-6471313f87bf</instance-id>
+ <object-path>restconf/config/GENERIC-RESOURCE-API:services/service/8462db9b-3e91-4e90-a2c8-6471313f87bf/service-data/service-topology/</object-path>
+ </service-response-information>
+</output> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyActivateCallback.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyActivateCallback.xml
new file mode 100644
index 0000000000..4cab6c6615
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyActivateCallback.xml
@@ -0,0 +1,13 @@
+<output xmlns="com:att:sdnctl:vnf">
+ <vnf-information>
+ <vnf-id>skask</vnf-id>
+ </vnf-information>
+ <response-code>200</response-code>
+ <svc-request-id>{{REQUEST-ID}}</svc-request-id>
+ <ack-final-indicator>Y</ack-final-indicator>
+ <service-information>
+ <subscriber-name>dontcare</subscriber-name>
+ <service-instance-id>0</service-instance-id>
+ <service-type>SDN-MOBILITY</service-type>
+ </service-information>
+</output> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyAssignCallback.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyAssignCallback.xml
new file mode 100644
index 0000000000..7512435415
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyAssignCallback.xml
@@ -0,0 +1,16 @@
+ <output xmlns="com:att:sdnctl:vnf">
+ <vnf-information>
+ <vnf-id>skask</vnf-id>
+ </vnf-information>
+ <response-code>200</response-code>
+ <svc-request-id>{{REQUEST-ID}}</svc-request-id>
+ <ack-final-indicator>Y</ack-final-indicator>
+ <service-information>
+ <subscriber-name>dontcare</subscriber-name>
+ <service-instance-id>0</service-instance-id>
+ <service-type>SDN-MOBILITY</service-type>
+ </service-information>
+ <instance-reference>
+ <object-path>restconf/SDNCObjectPath</object-path>
+ </instance-reference>
+ </output> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyChangeAssignCallback.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyChangeAssignCallback.xml
new file mode 100644
index 0000000000..7d3d0e54d1
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyChangeAssignCallback.xml
@@ -0,0 +1,13 @@
+ <output xmlns="com:att:sdnctl:vnf">
+ <vnf-information>
+ <vnf-id>skask</vnf-id>
+ </vnf-information>
+ <response-code>200</response-code>
+ <svc-request-id>{{REQUEST-ID}}</svc-request-id>
+ <ack-final-indicator>Y</ack-final-indicator>
+ <service-information>
+ <subscriber-name>dontcare</subscriber-name>
+ <service-instance-id>0</service-instance-id>
+ <service-type>SDN-MOBILITY</service-type>
+ </service-information>
+ </output> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyCreateCallback.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyCreateCallback.xml
new file mode 100644
index 0000000000..c1a03539cc
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyCreateCallback.xml
@@ -0,0 +1,16 @@
+ <output xmlns="org:onap:sdnctl:vnf">
+ <vnf-information>
+ <vnf-id>skask</vnf-id>
+ </vnf-information>
+ <response-code>200</response-code>
+ <svc-request-id>{{REQUEST-ID}}</svc-request-id>
+ <ack-final-indicator>Y</ack-final-indicator>
+ <service-information>
+ <subscriber-name>dontcare</subscriber-name>
+ <service-instance-id>0</service-instance-id>
+ <service-type>SDN-MOBILITY</service-type>
+ </service-information>
+ <instance-reference>
+ <object-path>restconf/SDNCObjectPath</object-path>
+ </instance-reference>
+ </output>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyDeactivateCallback.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyDeactivateCallback.xml
new file mode 100644
index 0000000000..e43a1319ca
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyDeactivateCallback.xml
@@ -0,0 +1,13 @@
+<output xmlns="org:onap:sdnctl:vnf">
+ <vnf-information>
+ <vnf-id>skask</vnf-id>
+ </vnf-information>
+ <response-code>200</response-code>
+ <svc-request-id>{{REQUEST-ID}}</svc-request-id>
+ <ack-final-indicator>Y</ack-final-indicator>
+ <service-information>
+ <subscriber-name>dontcare</subscriber-name>
+ <service-instance-id>0</service-instance-id>
+ <service-type>SDN-MOBILITY</service-type>
+ </service-information>
+</output>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyDeactivateCallbackNotFound.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyDeactivateCallbackNotFound.xml
new file mode 100644
index 0000000000..d061cda9e0
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyDeactivateCallbackNotFound.xml
@@ -0,0 +1,8 @@
+<output xmlns="org:onap:sdnctl:vnf">
+ <vnf-information>
+ <vnf-id>skask</vnf-id>
+ </vnf-information>
+ <response-code>404</response-code>
+ <svc-request-id>{{REQUEST-ID}}</svc-request-id>
+ <ack-final-indicator>Y</ack-final-indicator>
+</output>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyDeleteCallback.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyDeleteCallback.xml
new file mode 100644
index 0000000000..c1a03539cc
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyDeleteCallback.xml
@@ -0,0 +1,16 @@
+ <output xmlns="org:onap:sdnctl:vnf">
+ <vnf-information>
+ <vnf-id>skask</vnf-id>
+ </vnf-information>
+ <response-code>200</response-code>
+ <svc-request-id>{{REQUEST-ID}}</svc-request-id>
+ <ack-final-indicator>Y</ack-final-indicator>
+ <service-information>
+ <subscriber-name>dontcare</subscriber-name>
+ <service-instance-id>0</service-instance-id>
+ <service-type>SDN-MOBILITY</service-type>
+ </service-information>
+ <instance-reference>
+ <object-path>restconf/SDNCObjectPath</object-path>
+ </instance-reference>
+ </output>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyQueryCallback.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyQueryCallback.xml
new file mode 100644
index 0000000000..0ee3f2827d
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyQueryCallback.xml
@@ -0,0 +1,315 @@
+<output xmlns="com:att:sdnctl:vnf">
+<vnf-list xmlns="com:att:sdnctl:vnf">
+ <vnf-id>bd1b3789-6474-4935-94b2-90b656e035d0</vnf-id>
+ <service-data>
+ <vnf-id>bd1b3789-6474-4935-94b2-90b656e035d0</vnf-id>
+ <sdnc-request-header>
+ <svc-request-id>9ddf628a-9eca-430e-8974-22d520a31be1</svc-request-id>
+ <svc-action>assign</svc-action>
+ <svc-notification-url>https://localhost:8443/adapters/rest/SDNCNotify</svc-notification-url>
+ </sdnc-request-header>
+ <service-information>
+ <subscriber-name>notsurewecare</subscriber-name>
+ <service-instance-id>bd1b3789-6474-4935-94b2-90b656e035d0</service-instance-id>
+ <service-type>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ </service-information>
+ <oper-status>
+ <order-status>PendingCreate</order-status>
+ </oper-status>
+ <vnf-request-information>
+ <aic-cloud-region>VNN1CA52LCP</aic-cloud-region>
+ <vnf-name>skask</vnf-name>
+ <generic-vnf-id>afd0f02a-1ddb-43bb-aded-5113e46e82ae</generic-vnf-id>
+ <generic-vnf-type>ZVNN1MOGX01-SVC/ZVNN1MOGX01 - VF AUG 1 1</generic-vnf-type>
+ <generic-vnf-name>ZVNN1MOGX01</generic-vnf-name>
+ <tenant>33d209df14ac4c08ad60747185d2f3e0</tenant>
+ <vnf-id>bd1b3789-6474-4935-94b2-90b656e035d0</vnf-id>
+ <vnf-type>ZVNN1MOGX01 - VF AUG 1::module-0</vnf-type>
+ </vnf-request-information>
+ <vnf-topology-information>
+ <vnf-assignments>
+ <vnf-networks>
+ <network-role>mog_exn</network-role>
+ <network-id>03dbd833-785c-40c0-bf32-37594b5334bc</network-id>
+ <network-name>MNS-25180-P-VNNYCA01_exn_protected_net_1</network-name>
+ <contrail-network-fqdn/>
+ <subnet-id/>
+ <neutron-id>6f82d234-41a4-48e9-a9e8-415667a72929</neutron-id>
+ <sriov-vlan-filter-list>
+ <sriov-vlan-filter>filter1</sriov-vlan-filter>
+ </sriov-vlan-filter-list>
+ <sriov-vlan-filter-list>
+ <sriov-vlan-filter>filter2</sriov-vlan-filter>
+ </sriov-vlan-filter-list>
+ </vnf-networks>
+ <vnf-networks>
+ <network-role>mog_oam</network-role>
+ <network-id>3f181cde-9380-4c20-9d3a-e1a4ee74f994</network-id>
+ <network-name>MNS-25180-P-VNNYCA01_oam_protected_net_1</network-name>
+ <contrail-network-fqdn/>
+ <subnet-id/>
+ <neutron-id>713b6770-13fa-4949-8dbb-a1288c5e5932</neutron-id>
+ </vnf-networks>
+ <vnf-networks>
+ <network-role>mog_cor_B</network-role>
+ <network-id>821a550a-3f50-4725-995b-f212d5caec7c</network-id>
+ <network-name>MNS-25180-P-VNNYCA01_cor_direct_net_1</network-name>
+ <contrail-network-fqdn/>
+ <subnet-id/>
+ <neutron-id>18926e56-12b6-4a4d-98b6-37e0c05626ee</neutron-id>
+ </vnf-networks>
+ <vnf-networks>
+ <network-role>mog_cor_A</network-role>
+ <network-id>3dabf5c0-cffb-420c-8960-8499c74eb25f</network-id>
+ <network-name>MNS-25180-P-VNNYCA01_cor_direct_net_2</network-name>
+ <contrail-network-fqdn/>
+ <subnet-id/>
+ <neutron-id>35530b29-a4de-48ff-a014-111110ccc652</neutron-id>
+ </vnf-networks>
+ <vnf-networks>
+ <network-role>mog_gn</network-role>
+ <network-id>3ce97321-6e7f-49af-bd12-f833e377c310</network-id>
+ <network-name>MNS-25180-P-VNNYCA01_gn_direct_net_1</network-name>
+ <contrail-network-fqdn/>
+ <subnet-id/>
+ <neutron-id>32bfdd2c-28e1-4895-87a6-373bf12c3129</neutron-id>
+ </vnf-networks>
+ <vnf-networks>
+ <network-role>mog_dmz</network-role>
+ <network-id>d43ca910-02a5-47dc-8510-100a68a3c9e0</network-id>
+ <network-name>MNS-25180-P-VNNYCA01_dmz_protected_net_1</network-name>
+ <contrail-network-fqdn/>
+ <subnet-id/>
+ <neutron-id>cb9500fb-943f-412e-aea6-458711564a75</neutron-id>
+ </vnf-networks>
+ <availability-zones>
+ <availability-zone>nova</availability-zone>
+ </availability-zones>
+ <vnf-vms>
+ <vm-type>ps</vm-type>
+ <vm-names>
+ <vm-name>ZVNN1MOGX01MPS001</vm-name>
+ </vm-names>
+ <vm-names>
+ <vm-name>ZVNN1MOGX01MPS002</vm-name>
+ </vm-names>
+ <vm-names>
+ <vm-name>ZVNN1MOGX01MPS003</vm-name>
+ </vm-names>
+ <vm-names>
+ <vm-name>ZVNN1MOGX01MPS004</vm-name>
+ </vm-names>
+ <vm-count>4</vm-count>
+ <vm-networks>
+ <network-role>mog_cor_B</network-role>
+ <network-ips>
+ <ip-address>107.224.36.251</ip-address>
+ </network-ips>
+ <network-ips>
+ <ip-address>107.224.36.252</ip-address>
+ </network-ips>
+ <network-ips>
+ <ip-address>107.224.36.253</ip-address>
+ </network-ips>
+ <network-ips>
+ <ip-address>107.224.36.254</ip-address>
+ </network-ips>
+ <use-dhcp>N</use-dhcp>
+ </vm-networks>
+ </vnf-vms>
+ <vnf-vms>
+ <vm-type>cm</vm-type>
+ <vm-names>
+ <vm-name>ZVNN1MOGX01MCM001</vm-name>
+ </vm-names>
+ <vm-names>
+ <vm-name>ZVNN1MOGX01OAM002</vm-name>
+ </vm-names>
+ <vm-count>1</vm-count>
+ <vm-networks>
+ <network-role>mog_cor_B</network-role>
+ <network-ips>
+ <ip-address>107.224.36.249</ip-address>
+ </network-ips>
+ <network-ips>
+ <ip-address>107.224.36.250</ip-address>
+ </network-ips>
+ <use-dhcp>N</use-dhcp>
+ </vm-networks>
+ <vm-networks>
+ <network-role>mog_oam</network-role>
+ <network-ips>
+ <ip-address>107.239.167.250</ip-address>
+ </network-ips>
+ <network-ips>
+ <ip-address>107.239.167.251</ip-address>
+ </network-ips>
+ <use-dhcp>N</use-dhcp>
+ </vm-networks>
+ </vnf-vms>
+ <vnf-vms>
+ <vm-type>oam</vm-type>
+ <vm-names>
+ <vm-name>ZVNN1MOGX01OAM001</vm-name>
+ </vm-names>
+ <vm-names>
+ <vm-name>ZVNN1MOGX01OAM002</vm-name>
+ </vm-names>
+ <vm-count>2</vm-count>
+ <vm-networks>
+ <network-role>mog_oam</network-role>
+ <network-ips>
+ <ip-address>107.239.167.252</ip-address>
+ </network-ips>
+ <network-ips>
+ <ip-address>107.239.167.251</ip-address>
+ </network-ips>
+ <use-dhcp>N</use-dhcp>
+ </vm-networks>
+ <vm-networks>
+ <network-role>mog_cor_B</network-role>
+ <network-ips>
+ <ip-address>107.224.36.249</ip-address>
+ </network-ips>
+ <network-ips>
+ <ip-address>107.224.36.250</ip-address>
+ </network-ips>
+ <use-dhcp>N</use-dhcp>
+ </vm-networks>
+ </vnf-vms>
+ <vnf-vms>
+ <vm-type>pd</vm-type>
+ <vm-names>
+ <vm-name>ZVNN1MOGX01MPD001</vm-name>
+ </vm-names>
+ <vm-names>
+ <vm-name>ZVNN1MOGX01MPD002</vm-name>
+ </vm-names>
+ <vm-count>2</vm-count>
+ <vm-networks>
+ <network-role>mog_dmz</network-role>
+ <network-ips>
+ <ip-address>107.225.25.253</ip-address>
+ </network-ips>
+ <network-ips>
+ <ip-address>107.225.25.254</ip-address>
+ </network-ips>
+ <use-dhcp>N</use-dhcp>
+ <floating-ip>107.225.254.253</floating-ip>
+ </vm-networks>
+ <vm-networks>
+ <network-role>mog_oam</network-role>
+ <network-ips>
+ <ip-address>107.239.167.254</ip-address>
+ </network-ips>
+ <network-ips>
+ <ip-address>107.239.167.253</ip-address>
+ </network-ips>
+ <use-dhcp>N</use-dhcp>
+ <floating-ip>107.239.167.249</floating-ip>
+ </vm-networks>
+ <vm-networks>
+ <network-role>mog_exn</network-role>
+ <network-ips>
+ <ip-address>107.224.46.253</ip-address>
+ </network-ips>
+ <network-ips>
+ <ip-address>107.224.46.254</ip-address>
+ </network-ips>
+ <use-dhcp>N</use-dhcp>
+ <floating-ip>107.224.46.252</floating-ip>
+ </vm-networks>
+ <vm-networks>
+ <network-role>mog_cor_B</network-role>
+ <network-ips>
+ <ip-address>107.224.36.247</ip-address>
+ </network-ips>
+ <network-ips>
+ <ip-address>107.224.36.248</ip-address>
+ </network-ips>
+ <use-dhcp>N</use-dhcp>
+ <floating-ip>107.224.41.252</floating-ip>
+ </vm-networks>
+ <vm-networks>
+ <network-role>mog_gn</network-role>
+ <network-ips>
+ <ip-address>107.224.41.253</ip-address>
+ </network-ips>
+ <network-ips>
+ <ip-address>107.224.41.254</ip-address>
+ </network-ips>
+ <use-dhcp>N</use-dhcp>
+ <floating-ip>107.224.41.252</floating-ip>
+ </vm-networks>
+ <vm-networks>
+ <network-role>mog_cor_A</network-role>
+ <network-ips>
+ <ip-address>107.224.38.253</ip-address>
+ </network-ips>
+ <network-ips>
+ <ip-address>107.224.38.254</ip-address>
+ </network-ips>
+ <use-dhcp>N</use-dhcp>
+ </vm-networks>
+ </vnf-vms>
+ <vnf-vms>
+ <vm-type>sm</vm-type>
+ <vm-names>
+ <vm-name>ZVNN1MOGX01MSM001</vm-name>
+ </vm-names>
+ <vm-names>
+ <vm-name>ZVNN1MOGX01MSM002</vm-name>
+ </vm-names>
+ <vm-names>
+ <vm-name>ZVNN1MOGX01MSM003</vm-name>
+ </vm-names>
+ <vm-names>
+ <vm-name>ZVNN1MOGX01MSM004</vm-name>
+ </vm-names>
+ <vm-count>4</vm-count>
+ <vm-networks>
+ <network-role>mog_cor_B</network-role>
+ <network-ips>
+ <ip-address>107.224.36.243</ip-address>
+ </network-ips>
+ <network-ips>
+ <ip-address>107.224.36.244</ip-address>
+ </network-ips>
+ <network-ips>
+ <ip-address>107.224.36.245</ip-address>
+ </network-ips>
+ <network-ips>
+ <ip-address>107.224.36.246</ip-address>
+ </network-ips>
+ <use-dhcp>N</use-dhcp>
+ </vm-networks>
+ </vnf-vms>
+ </vnf-assignments>
+ <vnf-topology-identifier>
+ <vnf-name>ZVNNMOGX01_base</vnf-name>
+ <service-type>SDN-MOBILITY</service-type>
+ <vnf-type>ZVNN1MOGX01 - VF AUG 1::module-0</vnf-type>
+ <generic-vnf-type>ZVNN1MOGX01-SVC/ZVNN1MOGX01 - VF AUG 1 1</generic-vnf-type>
+ <generic-vnf-name>ZVNN1MOGX01</generic-vnf-name>
+ </vnf-topology-identifier>
+ </vnf-topology-information>
+ <request-information>
+ <request-id>9ddf628a-9eca-430e-8974-22d520a31be1</request-id>
+ <notification-url/>
+ <source>PORTAL</source>
+ <request-action>VNFActivateRequest</request-action>
+ </request-information>
+ </service-data>
+ <service-status>
+ <response-code>200</response-code>
+ <final-indicator>Y</final-indicator>
+ <request-status>synccomplete</request-status>
+ <response-timestamp>2016-08-05T16:15:19.398Z</response-timestamp>
+ <rpc-name>vnf-topology-operation</rpc-name>
+ <vnfsdn-action>VNFActivateRequest</vnfsdn-action>
+ <rpc-action>assign</rpc-action>
+ </service-status>
+</vnf-list>
+
+</output>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyQueryCallbackVfModule.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyQueryCallbackVfModule.xml
new file mode 100644
index 0000000000..677ecb7444
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyQueryCallbackVfModule.xml
@@ -0,0 +1,141 @@
+<output xmlns="com:att:sdnctl:vnf">
+ <vnf-list xmlns="com:att:sdnctl:vnf">
+ <vnf-id>28455973-1ee5-4ad1-8d35-c4732679743a</vnf-id>
+ <service-status>
+ <response-code>200</response-code>
+ <final-indicator>Y</final-indicator>
+ <request-status>synccomplete</request-status>
+ <response-timestamp>2016-06-08T19:44:59.138Z</response-timestamp>
+ <rpc-name>vnf-topology-operation</rpc-name>
+ <vnfsdn-action>VNFActivateRequest</vnfsdn-action>
+ <rpc-action>assign</rpc-action>
+ </service-status>
+ <service-data>
+ <vnf-id>28455973-1ee5-4ad1-8d35-c4732679743</vnf-id>
+ <service-information>
+ <subscriber-name>notsurewecare</subscriber-name>
+ <service-instance-id>28455973-1ee5-4ad1-8d35-c4732679743a</service-instance-id>
+ <service-type>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-type>
+ <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+ </service-information>
+ <sdnc-request-header>
+ <svc-request-id>5e168556-a5c6-4813-bff3-cc03007afbbc</svc-request-id>
+ <svc-notification-url>http://localhost:8080/adapters/rest/SDNCNotify</svc-notification-url>
+ <svc-action>assign</svc-action>
+ </sdnc-request-header>
+ <vnf-request-information>
+ <aic-cloud-region>AAIAIC25</aic-cloud-region>
+ <vnf-name>MSOTEST06-vSAMP3::base::module-0</vnf-name>
+ <generic-vnf-id>91ad7ab0-9ffd-471d-971c-3eb913a2cc75</generic-vnf-id>
+ <generic-vnf-type>Test/vSAMP3 1</generic-vnf-type>
+ <generic-vnf-name>MSOTEST06</generic-vnf-name>
+ <tenant>4ae1d3446a4c48b2bec44b6cfba06d68</tenant>
+ <vnf-id>28455973-1ee5-4ad1-8d35-c4732679743a</vnf-id>
+ <vnf-type>vSAMP3::base::module-0</vnf-type>
+ </vnf-request-information>
+ <oper-status>
+ <order-status>PendingCreate</order-status>
+ </oper-status>
+ <vnf-topology-information>
+ <vnf-parameters>
+ <vnf-parameter-name>image</vnf-parameter-name>
+ <vnf-parameter-value>Ubuntu_Perf</vnf-parameter-value>
+ </vnf-parameters>
+ <vnf-parameters>
+ <vnf-parameter-name>flavor</vnf-parameter-name>
+ <vnf-parameter-value>m1.small</vnf-parameter-value>
+ </vnf-parameters>
+ <vnf-assignments>
+ <vnf-networks>
+ <network-role>int_imbl</network-role>
+ <network-id>680b7453-0ec4-4d96-b355-280d981d418f</network-id>
+ <network-name>Nimbus-25193-T-Willows2_int_imbl_net_1</network-name>
+ <contrail-network-fqdn>default-domain:Nimbus-25193-T-Willows2:Nimbus-25193-T-Willows2_int_imbl_net_1</contrail-network-fqdn>
+ <subnet-id></subnet-id>
+ <ipv6-subnet-id>775607fb-e16a-45ef-94a7-82fba0d16eec</ipv6-subnet-id>
+ <neutron-id>640d07fb-e16a-45ef-94a7-82fba0d169bf</neutron-id>
+ <sriov-vlan-filter-list>
+ <sriov-vlan-filter>filter1</sriov-vlan-filter>
+ </sriov-vlan-filter-list>
+ <sriov-vlan-filter-list>
+ <sriov-vlan-filter>filter2</sriov-vlan-filter>
+ </sriov-vlan-filter-list>
+ </vnf-networks>
+ <vnf-networks>
+ <network-role>sgi_protected</network-role>
+ <network-id>f9039ce9-e3cf-4716-b2d1-ec7912178ea4</network-id>
+ <network-name>Nimbus-25193-T-Willows2_sgi_protected_net_1</network-name>
+ <contrail-network-fqdn>default-domain:Nimbus-25193-T-Willows2:Nimbus-25193-T-Willows2_sgi_protected_net_1</contrail-network-fqdn>
+ <subnet-id>b9999ce9-e3cf-4716-b2d1-ec791217678c</subnet-id>
+ <ipv6-subnet-id></ipv6-subnet-id>
+ <neutron-id>bf11bba8-b971-4ab5-8281-215b3fedcd3c</neutron-id>
+ </vnf-networks>
+ <vnf-vms>
+ <vm-type>cm</vm-type>
+ <vm-names>
+ <vm-name>ZVNN1MOGX01MCM001</vm-name>
+ </vm-names>
+ <vm-names>
+ <vm-name>ZVNN1MOGX01OAM002</vm-name>
+ </vm-names>
+ <vm-count>1</vm-count>
+ <vm-networks>
+ <network-role>mog_cor_B</network-role>
+ <network-ips>
+ <ip-address>107.224.36.249</ip-address>
+ </network-ips>
+ <network-ips>
+ <ip-address>107.224.36.250</ip-address>
+ </network-ips>
+ <network-ips-v6>
+ <ip-address-ipv6>2606:ae00:2e01:800::67</ip-address-ipv6>
+ </network-ips-v6>
+ <use-dhcp>N</use-dhcp>
+ <floating-ip>107.224.41.252</floating-ip>
+ <floating-ip-v6>2001:1890:1001:2B32::29:C</floating-ip-v6>
+ </vm-networks>
+ <vm-networks>
+ <network-role>mog_oam</network-role>
+ <network-ips>
+ <ip-address>107.239.167.250</ip-address>
+ </network-ips>
+ <network-ips>
+ <ip-address>107.239.167.251</ip-address>
+ </network-ips>
+ <network-ips-v6>
+ <ip-address-ipv6>aa::aa::aa::aa::aa::aa</ip-address-ipv6>
+ </network-ips-v6>
+ <network-ips-v6>
+ <ip-address-ipv6>bb::bb::bb::bb::bb::bb</ip-address-ipv6>
+ </network-ips-v6>
+ <interface-route-prefixes>
+ <interface-route-prefix-cidr>1.2.3.4/26</interface-route-prefix-cidr>
+ </interface-route-prefixes>
+ <interface-route-prefixes>
+ <interface-route-prefix-cidr>2002::/64</interface-route-prefix-cidr>
+ </interface-route-prefixes>
+ <use-dhcp>N</use-dhcp>
+ <floating-ip-v6>1111:1890:1001:2B32::29:D</floating-ip-v6>
+ </vm-networks>
+ </vnf-vms>
+ <availability-zones>
+ <availability-zone>nova</availability-zone>
+ </availability-zones>
+ </vnf-assignments>
+ <vnf-topology-identifier>
+ <vnf-name>MSOTEST06-vSAMP3::base::module-0</vnf-name>
+ <service-type>SDN-MOBILITY</service-type>
+ <vnf-type>vSAMP3::base::module-0</vnf-type>
+ <generic-vnf-type>Test/vSAMP3 1</generic-vnf-type>
+ <generic-vnf-name>MSOTEST06</generic-vnf-name>
+ </vnf-topology-identifier>
+ </vnf-topology-information>
+ <request-information>
+ <request-id>5e168556-a5c6-4813-bff3-cc03007afbbc</request-id>
+ <notification-url></notification-url>
+ <source>SoapUI-bns-vf-base-vSAMP3-9001</source>
+ <request-action>VNFActivateRequest</request-action>
+ </request-information>
+ </service-data>
+</vnf-list>
+</output>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyQueryCallbackVfModuleNoVnf.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyQueryCallbackVfModuleNoVnf.xml
new file mode 100644
index 0000000000..c50c25671b
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyQueryCallbackVfModuleNoVnf.xml
@@ -0,0 +1,81 @@
+<output xmlns="com:att:sdnctl:vnf">
+<vf-module-topology xmlns="org:onap:sdnc:northbound:generic-resource">
+ <vf-module-topology-identifier>
+ <vf-module-id>0725b072-b854-4705-bf8e-c1a1eb08651e</vf-module-id>
+ <vf-module-type>vSAMP10aDEV::base::module-0</vf-module-type>
+ <vf-module-name>zmtn6nf-code-111_base_0</vf-module-name>
+ </vf-module-topology-identifier>
+ <onap-model-information>
+ <model-name>vSAMP10aDEV::base::module-0</model-name>
+ <model-customization-uuid>819ef122-ca19-4141-a61e-62922f8fc279</model-customization-uuid>
+ <model-version>ff2ae348-214a-11e7-93ae-92361f002673</model-version>
+ <model-invariant-uuid>3a97db99-c4bb-498a-a13a-38f65f1ced3d</model-invariant-uuid>
+ <model-uuid>ff2ae348-214a-11e7-93ae-92361f002673</model-uuid>
+ </onap-model-information>
+ <tenant>19123c2924c648eb8e42a3c1f14b7682</tenant>
+ <aic-cloud-region>mtn6</aic-cloud-region>
+ <aic-clli>AUSTTXGR</aic-clli>
+ <vf-module-parameters>
+ <param>
+ <name>image</name>
+ <value>Ubuntu_Perf</value>
+ </param>
+ <param>
+ <name>flavor</name>
+ <value>m1.small</value>
+ </param>
+ </vf-module-parameters>
+ <vf-module-assignments>
+ <vms>
+ <vm>
+ <vm-type>cm</vm-type>
+ <vm-names>
+ <vm-name>ZVNN1MOGX01MCM001</vm-name>
+ </vm-names>
+ <vm-names>
+ <vm-name>ZVNN1MOGX01OAM002</vm-name>
+ </vm-names>
+ <vm-count>1</vm-count>
+ <vm-networks>
+ <network-role>mog_cor_B</network-role>
+ <network-ips>
+ <ip-address>107.224.36.249</ip-address>
+ </network-ips>
+ <network-ips>
+ <ip-address>107.224.36.250</ip-address>
+ </network-ips>
+ <network-ips-v6>
+ <ip-address-ipv6>2606:ae00:2e01:800::67</ip-address-ipv6>
+ </network-ips-v6>
+ <use-dhcp>N</use-dhcp>
+ <floating-ip>107.224.41.252</floating-ip>
+ <floating-ip-v6>2001:1890:1001:2B32::29:C</floating-ip-v6>
+ </vm-networks>
+ <vm-networks>
+ <network-role>mog_oam</network-role>
+ <network-ips>
+ <ip-address>107.239.167.250</ip-address>
+ </network-ips>
+ <network-ips>
+ <ip-address>107.239.167.251</ip-address>
+ </network-ips>
+ <network-ips-v6>
+ <ip-address-ipv6>aa::aa::aa::aa::aa::aa</ip-address-ipv6>
+ </network-ips-v6>
+ <network-ips-v6>
+ <ip-address-ipv6>bb::bb::bb::bb::bb::bb</ip-address-ipv6>
+ </network-ips-v6>
+ <interface-route-prefixes>
+ <interface-route-prefix-cidr>1.2.3.4/26</interface-route-prefix-cidr>
+ </interface-route-prefixes>
+ <interface-route-prefixes>
+ <interface-route-prefix-cidr>2002::/64</interface-route-prefix-cidr>
+ </interface-route-prefixes>
+ <use-dhcp>N</use-dhcp>
+ <floating-ip-v6>1111:1890:1001:2B32::29:D</floating-ip-v6>
+ </vm-networks>
+ </vm>
+ </vms>
+ </vf-module-assignments>
+</vf-module-topology>
+</output> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyQueryCallbackVnf.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyQueryCallbackVnf.xml
new file mode 100644
index 0000000000..ba98ef8838
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyQueryCallbackVnf.xml
@@ -0,0 +1,82 @@
+<output xmlns="com:att:sdnctl:vnf">
+<vnf-topology xmlns="org:onap:sdnc:northbound:generic-resource">
+ <vnf-topology-identifier-structure>
+ <nf-type>nf-type-1</nf-type>
+ <vnf-name>zmtn6nf-code-111</vnf-name>
+ <nf-role>nf-role-1</nf-role>
+ <nf-function>nf-function-1</nf-function>
+ <nf-code>nf-code-1</nf-code>
+ <vnf-id>eac30f85-f61f-4c5f-862e-2c62f9e135de</vnf-id>
+ <vnf-type>null</vnf-type>
+ </vnf-topology-identifier-structure>
+ <onap-model-information>
+ <model-name>vSAMP10a_macro</model-name>
+ <model-customization-uuid>819ef122-ca19-4141-a61e-62922f8fc279</model-customization-uuid>
+ <model-version>1.0</model-version>
+ <model-invariant-uuid>ef176121-f02c-4dd3-927c-22131d48446b</model-invariant-uuid>
+ <model-uuid>ff2ae348-214a-11e7-93ae-92361f002672</model-uuid>
+ </onap-model-information>
+ <vnf-resource-assignments>
+ <vnf-networks>
+ <network-role>mog_exn</network-role>
+ <network-id>03dbd833-785c-40c0-bf32-37594b5334bc</network-id>
+ <network-name>MNS-25180-P-VNNYCA01_exn_protected_net_1</network-name>
+ <contrail-network-fqdn/>
+ <subnet-id/>
+ <neutron-id>6f82d234-41a4-48e9-a9e8-415667a72929</neutron-id>
+ <sriov-vlan-filter-list>
+ <sriov-vlan-filter>filter1</sriov-vlan-filter>
+ </sriov-vlan-filter-list>
+ <sriov-vlan-filter-list>
+ <sriov-vlan-filter>filter2</sriov-vlan-filter>
+ </sriov-vlan-filter-list>
+ </vnf-networks>
+ <vnf-networks>
+ <network-role>mog_oam</network-role>
+ <network-id>3f181cde-9380-4c20-9d3a-e1a4ee74f994</network-id>
+ <network-name>MNS-25180-P-VNNYCA01_oam_protected_net_1</network-name>
+ <contrail-network-fqdn/>
+ <subnet-id/>
+ <neutron-id>713b6770-13fa-4949-8dbb-a1288c5e5932</neutron-id>
+ </vnf-networks>
+ <vnf-networks>
+ <network-role>mog_cor_B</network-role>
+ <network-id>821a550a-3f50-4725-995b-f212d5caec7c</network-id>
+ <network-name>MNS-25180-P-VNNYCA01_cor_direct_net_1</network-name>
+ <contrail-network-fqdn/>
+ <subnet-id/>
+ <neutron-id>18926e56-12b6-4a4d-98b6-37e0c05626ee</neutron-id>
+ </vnf-networks>
+ <vnf-networks>
+ <network-role>mog_cor_A</network-role>
+ <network-id>3dabf5c0-cffb-420c-8960-8499c74eb25f</network-id>
+ <network-name>MNS-25180-P-VNNYCA01_cor_direct_net_2</network-name>
+ <contrail-network-fqdn/>
+ <subnet-id/>
+ <neutron-id>35530b29-a4de-48ff-a014-111110ccc652</neutron-id>
+ </vnf-networks>
+ <vnf-networks>
+ <network-role>mog_gn</network-role>
+ <network-id>3ce97321-6e7f-49af-bd12-f833e377c310</network-id>
+ <network-name>MNS-25180-P-VNNYCA01_gn_direct_net_1</network-name>
+ <contrail-network-fqdn/>
+ <subnet-id/>
+ <neutron-id>32bfdd2c-28e1-4895-87a6-373bf12c3129</neutron-id>
+ </vnf-networks>
+ <vnf-networks>
+ <network-role>mog_dmz</network-role>
+ <network-id>d43ca910-02a5-47dc-8510-100a68a3c9e0</network-id>
+ <network-name>MNS-25180-P-VNNYCA01_dmz_protected_net_1</network-name>
+ <contrail-network-fqdn/>
+ <subnet-id/>
+ <neutron-id>cb9500fb-943f-412e-aea6-458711564a75</neutron-id>
+ </vnf-networks>
+ <availability-zones>
+ <availability-zone>nova</availability-zone>
+ </availability-zones>
+ </vnf-resource-assignments>
+ <tenant>19123c2924c648eb8e42a3c1f14b7682</tenant>
+ <aic-cloud-region>mtn6</aic-cloud-region>
+ <aic-clli>AUSTTXGR</aic-clli>
+</vnf-topology>
+</output> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyUnassignCallback.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyUnassignCallback.xml
new file mode 100644
index 0000000000..c1a03539cc
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/SDNCTopologyUnassignCallback.xml
@@ -0,0 +1,16 @@
+ <output xmlns="org:onap:sdnctl:vnf">
+ <vnf-information>
+ <vnf-id>skask</vnf-id>
+ </vnf-information>
+ <response-code>200</response-code>
+ <svc-request-id>{{REQUEST-ID}}</svc-request-id>
+ <ack-final-indicator>Y</ack-final-indicator>
+ <service-information>
+ <subscriber-name>dontcare</subscriber-name>
+ <service-instance-id>0</service-instance-id>
+ <service-type>SDN-MOBILITY</service-type>
+ </service-information>
+ <instance-reference>
+ <object-path>restconf/SDNCObjectPath</object-path>
+ </instance-reference>
+ </output>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/StandardSDNCSynchResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/StandardSDNCSynchResponse.xml
new file mode 100644
index 0000000000..77528ccf61
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/StandardSDNCSynchResponse.xml
@@ -0,0 +1,5 @@
+<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
+ <soap:Body>
+ <SDNCAdapterResponse xmlns="http://org.onap/workflow/sdnc/adapter/schema/v1"/>
+ </soap:Body>
+</soap:Envelope> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VNFAdapterRestCreateCallback.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VNFAdapterRestCreateCallback.xml
new file mode 100644
index 0000000000..49ecd0bf3f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VNFAdapterRestCreateCallback.xml
@@ -0,0 +1,55 @@
+<createVfModuleResponse>
+ <vnfId>skask</vnfId>
+ <vfModuleId>supercool</vfModuleId>
+ <vfModuleStackId>slowburn</vfModuleStackId>
+ <vfModuleCreated>true</vfModuleCreated>
+ <vfModuleOutputs>
+ <entry>
+ <key>key1</key>
+ <value>value1</value>
+ </entry>
+ <entry>
+ <key>key2</key>
+ <value>value2</value>
+ </entry>
+ <entry>
+<key>server1_private_ip</key>
+<value>192.168.28.3</value>
+</entry>
+<entry>
+<key>contrail-service-instance-fqdn</key>
+<value>default-domain:MSOTest:MsoNW-RA</value>
+</entry>
+<entry>
+<key>policyKey1_contrail_network_policy_fqdn</key>
+<value>MSOTest:DefaultPolicyFQDN1</value>
+</entry>
+<entry>
+<key>policyKey2_contrail_network_policy_fqdn</key>
+<value>MSOTest:DefaultPolicyFQDN2</value>
+</entry>
+<entry>
+<key>oam_management_v6_address</key>
+<value>2000:abc:bce:1111</value>
+</entry>
+<entry>
+<key>oam_management_v4_address</key>
+<value>127.0.0.1</value>
+</entry>
+ </vfModuleOutputs>
+ <rollback> <!-- JC's doc has "vfModuleRollback" -->
+ <vnfId>skask</vnfId>
+ <vfModuleId>supercool</vfModuleId>
+ <vfModuleStackId>slowburn</vfModuleStackId>
+ <vfModuleCreated>true</vfModuleCreated>
+ <tenantId>tenantId</tenantId>
+ <cloudSiteId>cloudSiteId</cloudSiteId>
+ <msoRequest>
+ <requestId>requestId</requestId>
+ <serviceInstanceId>serviceInstanceId</serviceInstanceId>
+ </msoRequest>
+ <messageId>{{MESSAGE-ID}}</messageId> <!-- JC's doc does not have this -->
+ </rollback>
+ <messageId>{{MESSAGE-ID}}</messageId>
+</createVfModuleResponse>
+
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VNFAdapterRestDeleteRequest.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VNFAdapterRestDeleteRequest.xml
new file mode 100644
index 0000000000..61aeaa7d66
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VNFAdapterRestDeleteRequest.xml
@@ -0,0 +1,15 @@
+<deleteVfModuleRequest>
+ <messageId>testMessageId</messageId>
+ <skipAAI>true</skipAAI>
+ <notificationUrl>testNotificationUrl</notificationUrl>
+ <cloudSiteId>testAicCloudRegion}</cloudSiteId>
+ <tenantId>testTenantId</tenantId>
+ <vnfId>testVnfId</vnfId>
+ <vfModuleId>testVfModuleId</vfModuleId>
+ <vfModuleStackId>testVfModuleStackId</vfModuleStackId>
+ <msoRequest>
+ <requestId>testRequestId</requestId>
+ <serviceInstanceId>testServiceInstanceId</serviceInstanceId>
+ <synchronous>false</synchronous>
+ </msoRequest>
+</deleteVfModuleRequest> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VNFAdapterRestDeleteResponse.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VNFAdapterRestDeleteResponse.xml
new file mode 100644
index 0000000000..b5b61192f7
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VNFAdapterRestDeleteResponse.xml
@@ -0,0 +1,56 @@
+<deleteVfModuleResponse>
+ <messageId>testMessageId</messageId>
+ <vfModuleDeleted>true</vfModuleDeleted>
+ <vfModuleId>testVfModuleId</vfModuleId>
+ <vfModuleOutputs>
+ <entry>
+ <key>key1</key>
+ <value>value1</value>
+ </entry>
+ <entry>
+ <key>key2</key>
+ <value>value2</value>
+ </entry>
+ <entry>
+ <key>server1_private_ip</key>
+ <value>192.168.28.3</value>
+ </entry>
+ <entry>
+ <key>contrail-service-instance-fqdn</key>
+ <value>default-domain:MSOTest:MsoNW-RA</value>
+ </entry>
+ <entry>
+ <key>policyKey1_contrail_network_policy_fqdn</key>
+ <value>MSOTest:DefaultPolicyFQDN1</value>
+ </entry>
+ <entry>
+ <key>policyKey2_contrail_network_policy_fqdn</key>
+ <value>MSOTest:DefaultPolicyFQDN2</value>
+ </entry>
+ <entry>
+ <key>oam_management_v6_address</key>
+ <value>2000:abc:bce:1111</value>
+ </entry>
+ <entry>
+ <key>oam_management_v4_address</key>
+ <value>127.0.0.1</value>
+ </entry>
+ <entry>
+ <key>internal_security_group</key>
+ <value>test_internal_security_group</value>
+ </entry>
+ <entry>
+ <key>int_internal_net_id</key>
+ <value>test_int_internal_net_id</value>
+ </entry>
+ <entry>
+ <key>dsx_server_group_id</key>
+ <value>test_dsx_server_group_id</value>
+ </entry>
+ <entry>
+ <key>mcas_host_key</key>
+ <value>test_mcas_host_key</value>
+ </entry>
+ </vfModuleOutputs>
+ <vnfId>testVnfId</vnfId>
+</deleteVfModuleResponse> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VNFAdapterRestUpdateCallback.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VNFAdapterRestUpdateCallback.xml
new file mode 100644
index 0000000000..c602dd9667
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VNFAdapterRestUpdateCallback.xml
@@ -0,0 +1,16 @@
+<updateVfModuleResponse>
+ <vnfId>skask</vnfId>
+ <vfModuleId>supercool</vfModuleId>
+ <vfModuleStackId>slowburn</vfModuleStackId>
+ <vfModuleOutputs>
+ <entry>
+ <key>key1</key>
+ <value>value1</value>
+ </entry>
+ <entry>
+ <key>key2</key>
+ <value>value2</value>
+ </entry>
+ </vfModuleOutputs>
+ <messageId>{{MESSAGE-ID}}</messageId>
+</updateVfModuleResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VNFAdapterRestVolumeGroupCallback.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VNFAdapterRestVolumeGroupCallback.xml
new file mode 100644
index 0000000000..830d2e2237
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VNFAdapterRestVolumeGroupCallback.xml
@@ -0,0 +1,15 @@
+<updateVolumeGroupResponse>
+ <volumeGroupId>78987</volumeGroupId>
+ <volumeGroupStackId>slowburn</volumeGroupStackId>
+ <vfModuleOutputs>
+ <entry>
+ <key>key1</key>
+ <value>value1</value>
+ </entry>
+ <entry>
+ <key>key2</key>
+ <value>value2</value>
+ </entry>
+ </vfModuleOutputs>
+ <messageId>{{MESSAGE-ID}}</messageId>
+</updateVolumeGroupResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VfModule-lukewarm.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VfModule-lukewarm.xml
new file mode 100644
index 0000000000..ba0b4e4609
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VfModule-lukewarm.xml
@@ -0,0 +1,10 @@
+<vf-module xmlns="http://org.openecomp.aai.inventory/v7">
+ <vf-module-id>lukewarm</vf-module-id>
+ <vf-module-name>PCRF::module-1</vf-module-name>
+ <heat-stack-id>slowburn</heat-stack-id>
+ <orchestration-status>pending-create</orchestration-status>
+ <is-base-vf-module>true</is-base-vf-module>
+ <resource-version>330-90</resource-version>
+ <model-invariant-id>introvert</model-invariant-id>
+ <model-version-id>2.0</model-version-id>
+</vf-module> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VfModule-new-PendingActivation.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VfModule-new-PendingActivation.xml
new file mode 100644
index 0000000000..2ccba7d056
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VfModule-new-PendingActivation.xml
@@ -0,0 +1,9 @@
+<vf-module xmlns="http://org.openecomp.aai.inventory/v7">
+ <vf-module-id>b37d96db-7d2c-47ce-bf61-a6c7b82fe161</vf-module-id>
+ <vf-module-name>PCRF::module-0-2</vf-module-name>
+ <model-invariant-id>00000000-0000-0000-0000-000000000000</model-invariant-id>
+ <model-version-id>1.0</model-version-id>
+ <is-base-vf-module>false</is-base-vf-module>
+ <orchestration-status>PendingActivation</orchestration-status>
+ <resource-version>330-90</resource-version>
+</vf-module> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VfModule-new.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VfModule-new.xml
new file mode 100644
index 0000000000..481410c3f6
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VfModule-new.xml
@@ -0,0 +1,9 @@
+<vf-module xmlns="http://org.openecomp.aai.inventory/v7">
+ <vf-module-id>b37d96db-7d2c-47ce-bf61-a6c7b82fe161</vf-module-id>
+ <vf-module-name>PCRF::module-0-2</vf-module-name>
+ <model-invariant-id>00000000-0000-0000-0000-000000000000</model-invariant-id>
+ <model-version-id>1.0</model-version-id>
+ <is-base-vf-module>false</is-base-vf-module>
+ <orchestration-status>pending-create</orchestration-status>
+ <resource-version>330-90</resource-version>
+</vf-module> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VfModule-supercool.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VfModule-supercool.xml
new file mode 100644
index 0000000000..49513f1eac
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VfModule-supercool.xml
@@ -0,0 +1,27 @@
+<vf-module xmlns="http://org.openecomp.aai.inventory/v7">
+ <vf-module-id>supercool</vf-module-id>
+ <vf-module-name>PCRF::module-2</vf-module-name>
+ <heat-stack-id>fastburn</heat-stack-id>
+ <orchestration-status>pending-create</orchestration-status>
+ <is-base-vf-module>false</is-base-vf-module>
+ <resource-version>330-89</resource-version>
+ <model-invariant-id>introvert</model-invariant-id>
+ <model-version-id>2.0</model-version-id>
+ <relationship-list>
+ <relationship>
+ <related-to>volume-group</related-to>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>pdk1</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>volume-group.volume-group-id</relationship-key>
+ <relationship-value>78987</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+</vf-module> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VolumeGroup.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VolumeGroup.xml
new file mode 100644
index 0000000000..df84706ec5
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/VfModularity/VolumeGroup.xml
@@ -0,0 +1,25 @@
+ <volume-group xmlns="http://org.openecomp.aai.inventory/v7">
+ <volume-group-id>78987</volume-group-id>
+ <volume-group-name>Volume_2</volume-group-name>
+ <heat-stack-id>slowburn</heat-stack-id>
+ <vnf-type>pcrf-capacity</vnf-type>
+ <orchestration-status>Active</orchestration-status>
+ <resource-version>0000020</resource-version>
+ <relationship-list>
+ <relationship>
+ <related-to>tenant</related-to>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-owner</relationship-key>
+ <relationship-value>att-aic</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>cloud-region.cloud-region-id</relationship-key>
+ <relationship-value>MDTWNJ21</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>tenant.tenant-id</relationship-key>
+ <relationship-value>fba1bd1e195a404cacb9ce17a9b2b421</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </volume-group> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/deleteNetworkResponse_Success.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/deleteNetworkResponse_Success.xml
new file mode 100644
index 0000000000..b8b8a4ff20
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/deleteNetworkResponse_Success.xml
@@ -0,0 +1,3 @@
+<ns2:deleteNetworkResponse xmlns:ns2="http://org.onap.so/network">
+ <networkDeleted>true</networkDeleted>
+</ns2:deleteNetworkResponse>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/requestDetails.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/requestDetails.json
new file mode 100644
index 0000000000..76616e14a5
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/requestDetails.json
@@ -0,0 +1,37 @@
+{
+ "requestDetails": {
+ "project": {
+ "projectName": "vSAMP12 Project"
+ },
+ "owningEntity": {
+ "owningEntityId": "MSO-Test-OE",
+ "owningEntityName": "MSO-Test123"
+ },
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantUuid": "d214abcc-2083-11e7-93ae-92361f002671",
+ "modelUuid": "c4503baa-2083-11e7-93ae-92361f002671",
+ "modelName": "MSOTADevInfra_vSAMP12_Service",
+ "modelVersion": "1.0"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "requestInfo": {
+ "instanceName": "bensServiceInstance3",
+ "source": "VID",
+ "suppressRollback": "true",
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "8b1df54faa3b49078e3416e21370a3ba"
+ },
+ "requestParameters": {
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "aLaCarte": "false",
+ "userParams": []
+ }
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/schema.json b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/schema.json
new file mode 100644
index 0000000000..36b51e9575
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/__files/schema.json
@@ -0,0 +1,16 @@
+{
+ "CreateServiceInstanceV3": {
+ "serviceInstance": {
+ "@class": "inventory.aai.onap.org.v12.ServiceInstance"
+ },
+ "project": {
+ "@class": "inventory.aai.onap.org.v12.Project"
+ },
+ "owningEntity": {
+ "@class": "inventory.aai.onap.org.v12.OwningEntity"
+ },
+ "customer": {
+ "@class": "inventory.aai.onap.org.v12.Customer"
+ }
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/application-test.yml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/application-test.yml
new file mode 100644
index 0000000000..007615e569
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/application-test.yml
@@ -0,0 +1,340 @@
+aai:
+ auth: 757A94191D685FD2092AC1490730A4FC
+ dme2:
+ timeout: '30000'
+ endpoint: https://localhost:8443
+camunda:
+ bpm:
+ admin-user:
+ id: admin
+ password: admin
+ database:
+ type: h2
+ history-level: FULL
+ metrics:
+ enabled: false
+ db-reporter-activate: false
+canopi:
+ auth: 757A94191D685FD2092AC1490730A4FC
+csi:
+ aots:
+ addincidentmanagement:
+ endpoint: http://localhost:28090/AddIncidentManagementTicketRequest
+ networkstatus:
+ endpoint: http://localhost:28090/SendManagedNetworkStatusNotification
+entitymanager:
+ packagesToScan: com
+
+mso:
+ correlation:
+ timeout: PT60S
+ logPath: logs
+ async:
+ core-pool-size: 50
+ max-pool-size: 50
+ queue-capacity: 500
+ adapters:
+ completemsoprocess:
+ endpoint: http://localhost:30253/CompleteMsoProcess
+ db:
+ auth: 757A94191D685FD2092AC1490730A4FC
+ password: wLg4sjrAFUS8rfVfdvTXeQ==
+ endpoint: http://localhost:28090
+ spring:
+ endpoint: http://localhost:28090
+ network:
+ endpoint: http://localhost:30253/services/NetworkAdapter
+ rest:
+ endpoint: http://localhost:30253/services/rest/v1/networks
+ openecomp:
+ db:
+ endpoint: http://localhost:30257/services/RequestsDbAdapter
+ po:
+ auth: 757A94191D685FD2092AC1490730A4FC
+ password: 3141634BF7E070AA289CF2892C986C0B
+ sdnc:
+ endpoint: http://localhost:30254/adapters/SDNCAdapter
+ rest:
+ endpoint: http://localhost:30254/adapters/rest/v1/sdnc
+ timeout: PT60S
+ tenant:
+ endpoint: http://localhost:30253/services/TenantAdapter
+ vnf:
+ endpoint: http://localhost:30253/services/VnfAdapter
+ rest:
+ endpoint: http://localhost:30253/services/rest/v1/vnfs
+ volume-groups:
+ rest:
+ endpoint: http://localhost:30253/services/rest/v1/volume-groups
+ vnf-async:
+ endpoint: http://localhost:30253/services/VnfAdapterAsync
+ adiod:
+ vce:
+ service:
+ model:
+ invariant:
+ uuid: 1cc4e2e4-eb6e-404d-a66f-c8733cedcce8
+ version: '5.0'
+ bpmn:
+ process:
+ historyTimeToLive: '30'
+ callbackRetryAttempts: '5'
+ catalog:
+ db:
+ endpoint: http://localhost:30258/ecomp/mso/catalog
+ spring:
+ endpoint: http://localhost:30258
+ csi:
+ pwd: 4EA237303511EFBBC37F17A351562131
+ sendmanagednetworkstatusnotification:
+ applicationname: NetworkManagementEthernetOverFiber
+ version: '212'
+ usrname: mso
+ db:
+ auth: Basic YnBlbDptc28tZGItMTUwNyE=
+ default:
+ adapter:
+ namespace: http://com.att.mso
+ gateway:
+ service:
+ model:
+ name: HNGWaaS for DHV Test
+ healthcheck:
+ log:
+ debug: 'false'
+ infra:
+ customer:
+ id: testCustIdInfra
+ msoKey: 07a7159d3bf51a0e53be7a8f89699be7
+ oam:
+ network:
+ role:
+ gateway: HngwOamNetVto.OAM
+ portal: HnportalOamNetVto.OAM
+ po:
+ timeout: PT60S
+ portal:
+ service:
+ model:
+ name: HNPortalaaS for DHV Test
+ request:
+ db:
+ endpoint: http://localhost:28090/
+ rollback: 'true'
+ sdnc:
+ firewall:
+ yang:
+ model:
+ version: '2015-05-15'
+ password: 3141634BF7E070AA289CF2892C986C0B
+ timeout:
+ firewall:
+ minutes: '20'
+ ucpe:
+ async:
+ hours: '120'
+ minutes: '5'
+ service:
+ agnostic:
+ sniro:
+ endpoint: /sniro/api/v2/placement
+ host: http://localhost:30253
+ site-name: CamundaEngine
+ sniro:
+ auth: test:testpwd
+ callback: http://localhost:28090/adapters/rest/SDNCNotify
+ endpoint: http://localhost:28090/optimizationInstance/V1/create
+ policies:
+ dhv:
+ 2vvig: SNIRO.DistanceToLocationPolicy_vhngw,SNIRO.VNFPolicy_vhngatewayprimary1_v1,SNIRO.ResourceInstancePolicy_hngateway,SNIRO.ResourceRegionPolicy_hngateway_v1,SNIRO.VNFPolicy_vhngatewaysecondary1_v1,SNIRO.ZonePolicy_vhngw,SNIRO.PlacementOptimizationPolicy_dhv_v3,SNIRO.VNFPolicy_vhnportal_primary1_v1,SNIRO.ResourceInstancePolicy_vhnportal_v3,SNIRO.ResourceRegionPolicy_vhnportal_v1,SNIRO.VNFPolicy_vhnportalsecondary1_v1,SNIRO.ZonePolicy_vhnportal,SNIRO.DistanceToLocationPolicy_vvig,SNIRO.InventoryGroupPolicy_vvig,SNIRO.VNFPolicy_vvigprimary1_v1,SNIRO.ResourceInstancePolicy_vvig,SNIRO.VNFPolicy_vvigsecondary1_v1
+ 4vvig: SNIRO.DistanceToLocationPolicy_vhngw,SNIRO.VNFPolicy_vhngatewayprimary1_v1,SNIRO.ResourceInstancePolicy_hngateway,SNIRO.ResourceRegionPolicy_hngateway_v1,SNIRO.VNFPolicy_vhngatewaysecondary1_v1,SNIRO.ZonePolicy_vhngw,SNIRO.PlacementOptimizationPolicy_dhv_v3,SNIRO.VNFPolicy_vhnportal_primary1_v1,SNIRO.ResourceInstancePolicy_vhnportal_v3,SNIRO.ResourceRegionPolicy_vhnportal_v1,SNIRO.VNFPolicy_vhnportalsecondary1_v1,SNIRO.ZonePolicy_vhnportal,SNIRO.VNFPolicy_vvigprimary2_v1,SNIRO.VNFPolicy_vvigsecondary2_v1,SNIRO.DistanceToLocationPolicy_vvig,SNIRO.InventoryGroupPolicy_vvig,SNIRO.VNFPolicy_vvigprimary1_v1,SNIRO.ResourceInstancePolicy_vvig,SNIRO.VNFPolicy_vvigsecondary1_v1
+ timeout: PT30M
+ sriov:
+ network:
+ role:
+ gateway1: HngwSriovProviderNet.SR_IOV_Provider2_1
+ gateway2: HngwSriovProviderNet.SR_IOV_Provider2_2
+ portal1: HnportalSriovProviderNet3.SR_IOV_Provider2_1
+ portal2: HnportalSriovProviderNet3.SR_IOV_Provider2_2
+ workflow:
+ aai:
+ distribution:
+ delay: PT5S
+ CreateGenericVNFV1:
+ aai:
+ volume-group:
+ uri: /aai/v6/cloud-infrastructure/volume-groups/volume-group
+ DHVCreateService:
+ aai:
+ customer:
+ uri: /aai/v9/business/customers/customer
+ createvce:
+ delay:
+ seconds: '1'
+ default:
+ aai:
+ version: '8'
+ cloud-region:
+ version: '9'
+ generic-vnf:
+ version: '9'
+ v11:
+ customer:
+ uri: /aai/v11/business/customers/customer
+ generic-query:
+ uri: /aai/v11/search/generic-query
+ generic-vnf:
+ uri: /aai/v11/network/generic-vnfs/generic-vnf
+ l3-network:
+ uri: /aai/v11/network/l3-networks/l3-network
+ network-policy:
+ uri: /aai/v11/network/network-policies/network-policy
+ nodes-query:
+ uri: /aai/v11/search/nodes-query
+ route-table-reference:
+ uri: /aai/v11/network/route-table-references/route-table-reference
+ tenant:
+ uri: /aai/v11/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/tenants/tenant
+ vce:
+ uri: /aai/v11/network/vces/vce
+ vpn-binding:
+ uri: /aai/v11/network/vpn-bindings/vpn-binding
+ v8:
+ configuration:
+ uri: /aai/v11/network/configurations/configuration
+ customer:
+ uri: /aai/v8/business/customers/customer
+ generic-query:
+ uri: /aai/v8/search/generic-query
+ l3-network:
+ uri: /aai/v8/network/l3-networks/l3-network
+ network-policy:
+ uri: /aai/v8/network/network-policies/network-policy
+ nodes-query:
+ uri: /aai/v8/search/nodes-query
+ route-table-reference:
+ uri: /aai/v8/network/route-table-references/route-table-reference
+ tenant:
+ uri: /aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/tenants/tenant
+ vce:
+ uri: /aai/v8/network/vces/vce
+ vpn-binding:
+ uri: /aai/v8/network/vpn-bindings/vpn-binding
+ v9:
+ cloud-region:
+ uri: /aai/v9/cloud-infrastructure/cloud-regions/cloud-region/att-aic
+ generic-vnf:
+ uri: /aai/v9/network/generic-vnfs/generic-vnf
+ retry:
+ attempts: '1'
+ deleteCinderVolumeV1:
+ aai:
+ volume-group:
+ uri: /aai/v6/cloud-infrastructure/volume-groups/volume-group
+ global:
+ default:
+ aai:
+ namespace: http://org.openecomp.aai.inventory/
+ l3ToHigherLayerAddBonding:
+ model:
+ invariantid: 50359538-066f-4a8d-807f-f2bc8eaa79dc
+ name: WAN Bonding v0.1
+ version: '0.1'
+ versionid: 52dbec20-47aa-42e4-936c-331d8e350d44
+ message:
+ endpoint: http://localhost:30252/mso/WorkflowMessage
+ notification:
+ name: GenericNotificationServiceATT
+ sdncadapter:
+ callback: http://localhost:30254/mso/SDNCAdapterCallbackService
+ vnfadapter:
+ create:
+ callback: http://localhost:30253/mso/vnfAdapterNotify
+ delete:
+ callback: http://localhost:30253/mso/vnfAdapterNotify
+ query:
+ callback: http://localhost:30253/mso/vnfAdapterNotify
+ rollback:
+ callback: http://localhost:30253/mso/vnfAdapterNotify
+policy:
+ auth: Basic dGVzdHBkcDphbHBoYTEyMw==
+ client:
+ auth: Basic bTAzNzQzOnBvbGljeVIwY2sk
+ endpoint: https://localhost:8081/pdp/api/
+ environment: TEST
+sdnc:
+ auth: Basic YWRtaW46YWRtaW4=
+ host: https://localhost:8443
+ path: /restconf/operations/GENERIC-RESOURCE-API
+sdno:
+ health-check:
+ dmaap:
+ password: eHQ1cUJrOUc
+ publisher:
+ topic: com.att.sdno.test-health-diagnostic-v02
+ subscriber:
+ topic: com.att.sdno.test-health-diagnostic-v02
+ username: testuser
+sniro:
+ conductor:
+ host: http://localhost:30253
+ uri: /release
+ manager:
+ host: http://localhost:30253
+ uri: /sniro/api/placement/v2
+ headers.auth: Basic dGVzdDp0ZXN0cHdk
+ headers.patchVersion: 1
+ headers.minorVersion: 1
+ headers.latestVersion: 2
+server:
+ port: 8080
+ tomcat:
+ max-threads: 50
+ # ssl:
+ # key-store: /app/msoClientKeyStore.jks
+ # key-store-password: mso4you
+ # key-store-type: JKS
+ # trust-store: /app/msoTrustStore.jks
+ # trust-store-password: mso_Domain2.0_4you
+spring:
+ h2:
+ console:
+ enabled: true
+ path: /h2
+ datasource:
+ url: jdbc:h2:mem:AZ;;DB_CLOSE_ON_EXIT=FALSE
+ username: sa
+ password: sa
+ driverClassName: org.h2.Driver
+ security:
+ usercredentials:
+ -
+ username: test
+ password: '$2a$12$Zi3AuYcZoZO/gBQyUtST2.F5N6HqcTtaNci2Et.ufsQhski56srIu'
+ role: BPMN-Client
+# Hibernate
+hibernate:
+ dialect: org.hibernate.dialect.MySQL5Dialect
+ show_sql: false
+
+management:
+ security:
+ enabled: false
+
+security:
+ basic:
+ enabled: false
+
+appc:
+ client:
+ topic:
+ read:
+ name: APPC-TEST-AMDOCS2
+ timeout: 360000
+ write: APPC-TEST-AMDOCS1-IST
+ response:
+ timeout: 360000
+ key: LSl8QKolmKcC0yJR
+ secret: lgjXraD1HutKxv8jEN6tVouu
+ service: ueb
+ poolMembers: localhost:3904,localhost:3904,localhost:3904 \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/applicationContext_forPnfTesting.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/applicationContext_forPnfTesting.xml
new file mode 100644
index 0000000000..ebefee7b08
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/applicationContext_forPnfTesting.xml
@@ -0,0 +1,65 @@
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:context="http://www.springframework.org/schema/context"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/context
+ http://www.springframework.org/schema/context/spring-context-2.5.xsd" >
+
+ <bean id="dataSource" class="org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy">
+ <property name="targetDataSource">
+ <bean class="org.springframework.jdbc.datasource.SimpleDriverDataSource">
+ <property name="driverClass" value="org.h2.Driver" />
+ <property name="url"
+ value="jdbc:h2:mem:process-engine;DB_CLOSE_DELAY=1000" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </bean>
+ </property>
+ </bean>
+
+ <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
+ <property name="dataSource" ref="dataSource" />
+ </bean>
+
+ <bean id="processEngineConfiguration" class="org.camunda.bpm.engine.spring.SpringProcessEngineConfiguration">
+ <property name="processEngineName" value="engine" />
+ <property name="dataSource" ref="dataSource" />
+ <property name="transactionManager" ref="transactionManager" />
+ <property name="databaseSchemaUpdate" value="true" />
+ <property name="jobExecutorActivate" value="false" />
+ <!--<property name="deploymentResources" value="classpath*:*.bpmn" />-->
+ </bean>
+
+ <bean id="processEngine" class="org.camunda.bpm.engine.spring.ProcessEngineFactoryBean">
+ <property name="processEngineConfiguration" ref="processEngineConfiguration" />
+ </bean>
+
+ <bean id="repositoryService" factory-bean="processEngine" factory-method="getRepositoryService" />
+ <bean id="runtimeService" factory-bean="processEngine" factory-method="getRuntimeService" />
+ <bean id="taskService" factory-bean="processEngine" factory-method="getTaskService" />
+ <bean id="historyService" factory-bean="processEngine" factory-method="getHistoryService" />
+ <bean id="managementService" factory-bean="processEngine" factory-method="getManagementService" />
+
+ <context:annotation-config />
+
+ <bean id="processEngineRule" class="org.camunda.bpm.engine.test.ProcessEngineRule">
+ <property name="processEngine" ref="processEngine" />
+ </bean>
+
+ <bean id="aaiConnection" class="org.onap.so.bpmn.infrastructure.pnf.delegate.AaiConnectionTestImpl"/>
+
+ <bean id="checkAaiForCorrelationIdDelegate" class="org.onap.so.bpmn.infrastructure.pnf.delegate.CheckAaiForCorrelationIdDelegate">
+ <property name="aaiConnection" ref="aaiConnection"/>
+ </bean>
+
+ <bean id="createAaiEntryWithPnfIdDelegate" class="org.onap.so.bpmn.infrastructure.pnf.delegate.CreateAaiEntryWithPnfIdDelegate">
+ <property name="aaiConnection" ref="aaiConnection"/>
+ </bean>
+
+ <bean id="informDmaapClient" class="org.onap.so.bpmn.infrastructure.pnf.delegate.InformDmaapClient">
+ <property name="dmaapClient" ref="dmaapClient"/>
+ </bean>
+
+ <bean id="dmaapClient" class="org.onap.so.bpmn.infrastructure.pnf.delegate.DmaapClientTestImpl"/>
+</beans>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/catalogDBClientProps.properties b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/catalogDBClientProps.properties
new file mode 100644
index 0000000000..bca529f960
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/catalogDBClientProps.properties
@@ -0,0 +1 @@
+catalog.db.endpoint= http://localhost: \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/logback-test.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/logback-test.xml
new file mode 100644
index 0000000000..38a2ef6ef5
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/logback-test.xml
@@ -0,0 +1,44 @@
+<configuration>
+
+
+
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+ <encoder>
+ <pattern>%d{HH:mm:ss.SSS} [%thread] |%X{RequestId}| %-5level
+ %logger{1024} - %msg%n
+ </pattern>
+ </encoder>
+ </appender>
+
+
+ <logger name="com.att.ecomp.audit" level="info" additivity="false">
+ <appender-ref ref="STDOUT" />
+ </logger>
+
+ <logger name="com.att.eelf.metrics" level="info" additivity="false">
+ <appender-ref ref="STDOUT" />
+ </logger>
+
+ <logger name="com.att.eelf.error" level="WARN" additivity="false">
+ <appender-ref ref="STDOUT" />
+ </logger>
+
+ <logger name="org.onap" level="${so.log.level:-DEBUG}" additivity="false">
+ <appender-ref ref="STDOUT" />
+ </logger>
+
+
+ <logger name="ch.vorburger" level="WARN" additivity="false">
+ <appender-ref ref="STDOUT" />
+ </logger>
+
+ <logger name="AUDIT" level="info" additivity="true">
+ <appender-ref ref="STDOUT" />
+ </logger>
+
+ <root level="WARN">
+ <appender-ref ref="STDOUT" />
+ </root>
+
+
+</configuration> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/requestsDBClientProps.properties b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/requestsDBClientProps.properties
new file mode 100644
index 0000000000..758a6edd97
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/requestsDBClientProps.properties
@@ -0,0 +1 @@
+requests.db.endpoint= http://localhost: \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/stubprocess/GenericStub.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/stubprocess/GenericStub.bpmn
new file mode 100644
index 0000000000..66f458425e
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/stubprocess/GenericStub.bpmn
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_vwRmIBsREeeIQtzUKIjH4g" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.11.2" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="GenericStub" name="GenericStub" isExecutable="true">
+ <bpmn2:startEvent id="StartEvent_1">
+ <bpmn2:outgoing>SequenceFlow_0tyavm9</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:endEvent id="EndEvent_0n56tas">
+ <bpmn2:incoming>SequenceFlow_0tyavm9</bpmn2:incoming>
+ <bpmn2:terminateEventDefinition />
+ </bpmn2:endEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_0tyavm9" sourceRef="StartEvent_1" targetRef="EndEvent_0n56tas" />
+ </bpmn2:process>
+ <bpmn2:error id="Error_10hit0u" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
+ <bpmn2:error id="Error_1lwpypa" name="Java Lang Exception" errorCode="java.lang.Exception" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="GenericStub">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
+ <dc:Bounds x="147" y="275" width="36" height="36" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0ougemc_di" bpmnElement="EndEvent_0n56tas">
+ <dc:Bounds x="263" y="275" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="236" y="311" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0tyavm9_di" bpmnElement="SequenceFlow_0tyavm9">
+ <di:waypoint xsi:type="dc:Point" x="183" y="293" />
+ <di:waypoint xsi:type="dc:Point" x="263" y="293" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="223" y="272" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>