aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn
diff options
context:
space:
mode:
authorBenjamin, Max (mb388a) <mb388a@us.att.com>2019-01-25 17:08:41 -0500
committerSmokowski, Steve (ss835w) <ss835w@us.att.com>2019-01-28 14:39:43 -0500
commitfe91155454a27401e8c23780fa247c0ede196747 (patch)
tree26d0f2e56d9b31283c5f2173c5e765d035187137 /bpmn
parentd62389df8c10d46609c5770b45697f7ac401dc82 (diff)
parentfe76d074a452e58d4122cc234d17e7aa407a1b44 (diff)
Merge 'origin/casablanca' into master
Issue-ID: SO-1435 Change-Id: If065ef5c91e769452fd6701fa6c28a23b4bdf2b2 Signed-off-by: Smokowski, Steve (ss835w) <ss835w@us.att.com>
Diffstat (limited to 'bpmn')
-rw-r--r--bpmn/MSOCommonBPMN/pom.xml4
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/MsoUtils.groovy3
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofHoming.groovy83
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy16
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java245
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/util/OofInfraUtils.java112
-rw-r--r--bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/MsoUtilsTest.groovy10
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilderTest.java384
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/dmaapproperties/DmaapPropertiesClientTest.java2
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/dmaapproperties/GlobalDmaapPublisherTest.java4
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/exception/ExceptionBuilderTest.java3
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/application-test.yaml2
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/vfModuleCount.xml44
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/RollbackData.java25
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/AllottedResource.java14
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/NetworkResource.java15
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ServiceInstance.java3
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/VnfResource.java13
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/json/JsonUtils.java4
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/AllottedResourceTest.java12
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/NetworkResourceTest.java12
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/ServiceInstanceTest.java10
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/VnfResourceTest.java11
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/json/JsonUtilsTest.java14
-rw-r--r--bpmn/MSOCoreBPMN/src/test/resources/json-examples/OofExample.json110
-rw-r--r--bpmn/mso-infrastructure-bpmn/pom.xml5
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/WorkflowActionBB.bpmn2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateSDNCNetworkResource.groovy17
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy4
-rwxr-xr-xbpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateGenericALaCarteServiceInstance.groovy8
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy11
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateResources.groovy2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy63
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy19
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfAndModules.groovy39
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVFCNetworkServiceInstance.groovy12
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy40
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputs.java6
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/properties/BPMNProperties.java3
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/service/ServicePluginFactory.java21
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java15
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncServiceTopologyOperationTask.java2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResourceTest.groovy5
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfAndModulesTest.groovy452
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/CreateVcpeResCustServiceTest.groovy12
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreatePnfEntryInAaiDelegateTest.java2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/GeneratePnfUuidDelegateTest.java6
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputsTest.java16
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/resources/__files/VCPE/CreateVcpeResCustService/request.json33
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/ActivateSDNCNetworkResource.bpmn2
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/Create3rdONAPE2EServiceInstance.bpmn8
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateActivateSDNCResource.bpmn6
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateCustomE2EServiceInstance.bpmn116
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateDeviceResource.bpmn2
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateSDNCNetworkResource.bpmn4
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustService.bpmn3
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustServiceV2.bpmn1
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeActivateSDNCNetworkResource.bpmn2
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/Delete3rdONAPE2EServiceInstance.bpmn8
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteCustomE2EServiceInstance.bpmn2
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteDeviceResource.bpmn2
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteSDNCNetworkResource.bpmn4
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/UpdateCustomE2EServiceInstance.bpmn6
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn2
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2EServiceInstanceV2.bpmn10
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVnfAndModules.bpmn148
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstance.bpmn2
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstanceV2.bpmn10
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteE2EServiceInstance.bpmn6
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteResourcesV1.bpmn2
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoScaleE2EServiceInstance.bpmn2
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateE2EServiceInstance.bpmn2
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/activity/ExecuteActivity.java1
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheck.java23
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/OrchestrationStatusValidator.java4
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapper.java8
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheckTest.java31
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/OrchestrationStatusValidatorUnitTest.java45
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapperTest.java22
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapperPayloadTest.java2
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapperTest.java2
81 files changed, 1978 insertions, 460 deletions
diff --git a/bpmn/MSOCommonBPMN/pom.xml b/bpmn/MSOCommonBPMN/pom.xml
index abf53f96f5..b115d36a0a 100644
--- a/bpmn/MSOCommonBPMN/pom.xml
+++ b/bpmn/MSOCommonBPMN/pom.xml
@@ -363,12 +363,12 @@
<dependency>
<groupId>org.onap.sdc.sdc-tosca</groupId>
<artifactId>sdc-tosca</artifactId>
- <version>1.4.1</version>
+ <version>1.4.4</version>
</dependency>
<dependency>
<groupId>org.onap.sdc.jtosca</groupId>
<artifactId>jtosca</artifactId>
- <version>1.4.1</version>
+ <version>1.4.4</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/MsoUtils.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/MsoUtils.groovy
index 2f240fb70d..4f0b530a3b 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/MsoUtils.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/MsoUtils.groovy
@@ -931,7 +931,8 @@ class MsoUtils {
if (moduleIndexList == null || moduleIndexList.size() == 0) {
return "0"
}
- def sortedModuleIndexList = moduleIndexList.sort { a, b -> a.compareTo b }
+
+ def sortedModuleIndexList = moduleIndexList.sort{ a, b -> a as Integer <=> b as Integer}
for (i in 0..sortedModuleIndexList.size()-1) {
if (Integer.parseInt(sortedModuleIndexList[i]) != i) {
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofHoming.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofHoming.groovy
index 5659c7affa..5e949fd8d2 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofHoming.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofHoming.groovy
@@ -35,7 +35,7 @@ import org.onap.so.client.HttpClientFactory
import org.onap.so.logger.MsoLogger
import org.onap.so.db.catalog.beans.CloudIdentity
import org.onap.so.db.catalog.beans.CloudSite
-
+import org.onap.so.db.catalog.beans.HomingInstance
import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
import org.onap.so.utils.TargetEntity
@@ -209,17 +209,12 @@ class OofHoming extends AbstractServiceTaskProcessor {
for (int j = 0; j < arrSol.length(); j++) {
JSONObject placement = arrSol.getJSONObject(j)
utils.log("DEBUG", "****** Placement Solution is: " + placement + " *****", "true")
- String jsonServiceResourceId = placement.getString("serviceResourceId")
- String jsonResourceModuleName = placement.getString("resourceModuleName")
+ String jsonServiceResourceId = jsonUtil.getJsonValue( placement.toString(), "serviceResourceId")
+ utils.log("DEBUG", "****** homing serviceResourceId is: " + jsonServiceResourceId + " *****", "true")
for (Resource resource : resourceList) {
String serviceResourceId = resource.getResourceId()
- String resourceModuleName = ""
- if (resource.getResourceType() == ResourceType.ALLOTTED_RESOURCE ||
- resource.getResourceType() == ResourceType.VNF) {
- resourceModuleName = resource.getNfFunction()
- }
- if (serviceResourceId.equalsIgnoreCase(jsonServiceResourceId) ||
- resourceModuleName.equalsIgnoreCase(jsonResourceModuleName)) {
+ utils.log("DEBUG", "****** decomp serviceResourceId is: " + serviceResourceId + " *****", "true")
+ if (serviceResourceId.equalsIgnoreCase(jsonServiceResourceId)) {
JSONObject solution = placement.getJSONObject("solution")
String solutionType = solution.getString("identifierType")
String inventoryType = ""
@@ -228,20 +223,26 @@ class OofHoming extends AbstractServiceTaskProcessor {
} else {
inventoryType = "cloud"
}
+ utils.log("DEBUG", "****** homing inventoryType is: " + inventoryType + " *****", "true")
resource.getHomingSolution().setInventoryType(InventoryType.valueOf(inventoryType))
JSONArray assignmentArr = placement.getJSONArray("assignmentInfo")
+ utils.log("DEBUG", "****** assignmentInfo is: " + assignmentArr.toString() + " *****", "true")
+
+ Map<String, String> assignmentMap = jsonUtil.entryArrayToMap(execution,
+ assignmentArr.toString(), "key", "value")
String oofDirectives = null
- assignmentArr.each { element ->
- JSONObject jsonObject = new JSONObject(element.toString())
- if (jsonUtil.getJsonRawValue(jsonObject.toString(), "key") == "oof_directives") {
- oofDirectives = jsonUtil.getJsonRawValue(jsonObject.toString(), "value")
+ assignmentMap.each { key, value ->
+ utils.log("DEBUG", "****** element: " + key + " *****", "true")
+ if (key == "oof_directives") {
+ oofDirectives = value
+ utils.log("DEBUG", "****** homing oofDirectives: " + oofDirectives + " *****", "true")
}
}
- Map<String, String> assignmentMap = jsonUtil.entryArrayToMap(execution,
- assignmentArr.toString(), "key", "value")
String cloudOwner = assignmentMap.get("cloudOwner")
+ utils.log("DEBUG", "****** homing cloudOwner: " + cloudOwner + " *****", "true")
String cloudRegionId = assignmentMap.get("locationId")
+ utils.log("DEBUG", "****** homing cloudRegionId: " + cloudRegionId + " *****", "true")
resource.getHomingSolution().setCloudOwner(cloudOwner)
resource.getHomingSolution().setCloudRegionId(cloudRegionId)
@@ -249,12 +250,26 @@ class OofHoming extends AbstractServiceTaskProcessor {
cloudSite.setId(cloudRegionId)
cloudSite.setRegionId(cloudRegionId)
String orchestrator = execution.getVariable("orchestrator")
- if ((orchestrator != null) || (orchestrator != "")) {
+ if ((orchestrator != null) && (orchestrator != "")) {
cloudSite.setOrchestrator(orchestrator)
+ utils.log("DEBUG", "****** orchestrator: " + orchestrator + " *****", "true")
+ } else {
+ cloudSite.setOrchestrator("multicloud")
}
CloudIdentity cloudIdentity = new CloudIdentity()
cloudIdentity.setId(cloudRegionId)
+ cloudIdentity.setIdentityServerType(ServerType."KEYSTONE")
+ cloudIdentity.setAdminTenant("service")
+ cloudIdentity.setIdentityAuthenticationType(AuthenticationType.USERNAME_PASSWORD)
+ String msoMulticloudUserName = UrnPropertiesReader
+ .getVariable("mso.multicloud.api.username", execution,
+ "apih")
+ String msoMulticloudPassword = UrnPropertiesReader
+ .getVariable("mso.multicloud.api.password", execution,
+ "abc123")
+ cloudIdentity.setMsoId(msoMulticloudUserName)
+ cloudIdentity.setMsoPass(msoMulticloudPassword)
// Get MSB Url
String msbHost = oofUtils.getMsbHost(execution)
String multicloudApiEndpoint = UrnPropertiesReader
@@ -263,19 +278,39 @@ class OofHoming extends AbstractServiceTaskProcessor {
cloudIdentity.setIdentityUrl(msbHost + multicloudApiEndpoint
+ "/" + cloudOwner + "/" +
cloudRegionId + "/infra_workload")
-
+ utils.log("DEBUG", "****** Cloud IdentityUrl: " + msbHost + multicloudApiEndpoint
+ + "/" + cloudOwner + "/" +
+ cloudRegionId + "/infra_workload"
+ + " *****", "true")
+ utils.log("DEBUG", "****** CloudIdentity: " + cloudIdentity.toString()
+ + " *****", "true")
cloudSite.setIdentityService(cloudIdentity)
+ utils.log("DEBUG", "****** CloudSite: " + cloudSite.toString()
+ + " *****", "true")
// Set cloudsite in catalog DB here
- oofUtils.createCloudSiteCatalogDb(cloudSite)
+ oofUtils.createCloudSite(cloudSite, execution)
if (oofDirectives != null && oofDirectives != "") {
resource.getHomingSolution().setOofDirectives(oofDirectives)
execution.setVariable("oofDirectives", oofDirectives)
- utils.log("DEBUG", "***** OofDirectives is: " + oofDirectives +
+ utils.log("DEBUG", "***** OofDirectives set to: " + oofDirectives +
" *****", "true")
}
+ // Set Homing Instance
+ String serviceInstanceId = decomposition.getServiceInstance().getInstanceId()
+ HomingInstance homingInstance = new HomingInstance()
+ homingInstance.setServiceInstanceId(serviceInstanceId)
+ homingInstance.setCloudOwner(cloudOwner)
+ homingInstance.setCloudRegionId(cloudRegionId)
+ if (oofDirectives != null && oofDirectives != "") {
+ homingInstance.setOofDirectives(oofDirectives)}
+ else {
+ homingInstance.setOofDirectives("{}")
+ }
+ oofUtils.createHomingInstance(homingInstance, execution)
+
if (inventoryType.equalsIgnoreCase("service")) {
resource.getHomingSolution().setRehome(assignmentMap.get("isRehome").toBoolean())
VnfResource vnf = new VnfResource()
@@ -283,6 +318,12 @@ class OofHoming extends AbstractServiceTaskProcessor {
resource.getHomingSolution().setVnf(vnf)
resource.getHomingSolution().setServiceInstanceId(solution.getJSONArray("identifiers")[0].toString())
}
+ } else {
+ utils.log("DEBUG", "ProcessHomingSolution Exception: no matching serviceResourceIds returned in " +
+ "homing solution", isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - " +
+ "Occurred in Homing ProcessHomingSolution: no matching serviceResourceIds returned")
+
}
}
}
@@ -312,8 +353,10 @@ class OofHoming extends AbstractServiceTaskProcessor {
utils.log("DEBUG", "*** Completed Homing Process Homing Solution ***", isDebugEnabled)
} catch (BpmnError b) {
+ utils.log("DEBUG", "ProcessHomingSolution Error: " + b, isDebugEnabled)
throw b
} catch (Exception e) {
+ utils.log("DEBUG", "ProcessHomingSolution Exception: " + e, isDebugEnabled)
msoLogger.error(e);
exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occurred in Homing ProcessHomingSolution")
}
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy
index c0da8881fb..af33f38a64 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy
@@ -36,6 +36,7 @@ import org.onap.so.bpmn.core.json.JsonUtils
import org.onap.so.client.HttpClient
import org.onap.so.client.HttpClientFactory
import org.onap.so.db.catalog.beans.CloudSite
+import org.onap.so.db.catalog.beans.HomingInstance
import org.onap.so.utils.TargetEntity
import org.springframework.http.HttpEntity
import org.springframework.http.HttpHeaders
@@ -495,6 +496,7 @@ class OofUtils {
if (candidatesJson != "") {candidatesJson = candidatesJson.substring(0, candidatesJson.length() - 1)}
return candidatesJson
}
+
/**
* This method creates a cloudsite in catalog database.
*
@@ -524,9 +526,19 @@ class OofUtils {
exceptionUtil.buildAndThrowWorkflowException(execution, responseCode, "Received a Bad Sync Response from CatalogDB.")
}
}
-
+
+ /**
+ * This method creates a HomingInstance in catalog database.
+ *
+ * @param HomingInstance homingInstance
+ *
+ * @return void
+ */
+ Void createHomingInstance(HomingInstance homingInstance, DelegateExecution execution) {
+ oofInfraUtils.createHomingInstance(homingInstance, execution)
+ }
String getMsbHost(DelegateExecution execution) {
- msbHost = UrnPropertiesReader.getVariable("mso.msb.host", execution, "msb-iag.onap")
+ String msbHost = UrnPropertiesReader.getVariable("mso.msb.host", execution, "msb-iag.onap")
Integer msbPort = UrnPropertiesReader.getVariable("mso.msb.port", execution, "80").toInteger()
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java
index 12a4b2a9c3..025b533dc0 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java
@@ -20,29 +20,18 @@
package org.onap.so.bpmn.common.resource;
-import java.io.File;
import java.io.IOException;
-import java.nio.file.Paths;
+import java.lang.reflect.Type;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.HashMap;
-import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
-import java.util.Optional;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriBuilder;
import org.camunda.bpm.engine.runtime.Execution;
-import org.onap.sdc.tosca.parser.api.ISdcCsarHelper;
-import org.onap.sdc.tosca.parser.exceptions.SdcToscaParserException;
-import org.onap.sdc.tosca.parser.impl.SdcToscaParserFactory;
-import org.onap.sdc.toscaparser.api.NodeTemplate;
-import org.onap.sdc.toscaparser.api.Property;
-import org.onap.sdc.toscaparser.api.RequirementAssignment;
-import org.onap.sdc.toscaparser.api.RequirementAssignments;
-import org.onap.sdc.toscaparser.api.functions.GetInput;
-import org.onap.sdc.toscaparser.api.parameters.Input;
import org.onap.so.bpmn.core.UrnPropertiesReader;
import org.onap.so.bpmn.core.json.JsonUtils;
import org.onap.so.client.HttpClient;
@@ -58,86 +47,34 @@ import com.google.gson.reflect.TypeToken;
public class ResourceRequestBuilder {
- private static String CUSTOMIZATION_UUID = "customizationUUID";
+ private static String CUSTOMIZATION_UUID = "cuserviceResourcesstomizationUUID";
- private static String SERVICE_URL_TOSCA_CSAR = "/v3/serviceToscaCsar";
+ private static String SERVICE_URL_SERVICE_INSTANCE = "/v2/serviceResources";
private static MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA, ResourceRequestBuilder.class);
static JsonUtils jsonUtil = new JsonUtils();
- public static List<String> getResourceSequence(Execution execution, String serviceUuid) {
- List<String> resouceSequence = new ArrayList<String>();
- List<NodeTemplate> resultList = new ArrayList<NodeTemplate>();
- String csarpath = null;
- try {
- csarpath = getCsarFromUuid(serviceUuid);
-
- SdcToscaParserFactory toscaParser = SdcToscaParserFactory.getInstance();
- ISdcCsarHelper iSdcCsarHelper = toscaParser.getSdcCsarHelper(csarpath, false);
- List<NodeTemplate> nodeTemplates = iSdcCsarHelper.getServiceNodeTemplates();
- List<NodeTemplate> nodes = new ArrayList<NodeTemplate>();
- nodes.addAll(nodeTemplates);
-
- for (NodeTemplate nodeTemplate : nodeTemplates) {
- RequirementAssignments requirement = iSdcCsarHelper.getRequirementsOf(nodeTemplate);
-
- if (requirement == null || requirement.getAll() == null || requirement.getAll().isEmpty()) {
- resultList.add(nodeTemplate);
- nodes.remove(nodeTemplate);
- }
- }
-
- resultList = getRequirementList(resultList, nodes, iSdcCsarHelper);
-
- for (NodeTemplate node : resultList) {
- String templateName = node.getMetaData().getValue("name");
- if (!resouceSequence.contains(templateName)) {
- resouceSequence.add(templateName);
- }
- }
-
- } catch (SdcToscaParserException toscarParserE) {
- LOGGER.debug("sdc tosca parser failed for csar: " + csarpath, toscarParserE);
- return resouceSequence;
- } catch (Exception e) {
- LOGGER.debug("csar file is not available for service uuid:" + serviceUuid, e);
- return resouceSequence;
- }
-
- return resouceSequence;
- }
+ public static List<String> getResourceSequence(String serviceUuid) {
+
+ List<String> resourceSequence = new ArrayList();
+ try {
+ Map<String, Object> serviceResponse = getServiceInstnace(serviceUuid);
+
+ if (serviceResponse.containsKey("serviceResources")) {
+ Map<String, Object> serviceResources = (Map<String, Object>) serviceResponse.get("serviceResources");
- private static List<NodeTemplate> getRequirementList(List<NodeTemplate> resultList, List<NodeTemplate> nodeTemplates,
- ISdcCsarHelper iSdcCsarHelper) {
-
- List<NodeTemplate> nodes = new ArrayList<NodeTemplate>();
- nodes.addAll(nodeTemplates);
-
- for (NodeTemplate nodeTemplate : nodeTemplates) {
- RequirementAssignments requirement = iSdcCsarHelper.getRequirementsOf(nodeTemplate);
- List<RequirementAssignment> reqAs = requirement.getAll();
- for (RequirementAssignment ra : reqAs) {
- String reqNode = ra.getNodeTemplateName();
- for (NodeTemplate rNode : resultList) {
- if (rNode.getName().equals(reqNode)) {
- if(!resultList.contains(nodeTemplate)) {
- resultList.add(nodeTemplate);
- }
- if(nodes.contains(nodeTemplate)) {
- nodes.remove(nodeTemplate);
- }
- break;
- }
- }
- }
- }
-
- if (!nodes.isEmpty()) {
- getRequirementList(resultList, nodes, iSdcCsarHelper);
- }
-
- return resultList;
+ if (serviceResources.containsKey("resourceOrder")) {
+ String resourceOrder = (String) serviceResources.get("resourceOrder");
+ if (resourceOrder!= null) {
+ resourceSequence.addAll(Arrays.asList(resourceOrder.split(",")));
+ }
+ }
+ }
+ } catch (Exception e) {
+ LOGGER.error("not able to retrieve service order.");
+ }
+ return resourceSequence;
}
/* build the resource Parameters detail.
@@ -184,12 +121,8 @@ public class ResourceRequestBuilder {
resourceInputsFromUuiMap = new HashMap();
}
- try {
- Map<String, Object> resourceInputsFromServiceDeclaredLevel = buildResouceRequest(serviceUuid, resourceCustomizationUuid, serviceInput);
- resourceInputsFromUuiMap.putAll(resourceInputsFromServiceDeclaredLevel);
- } catch(SdcToscaParserException e) {
- LOGGER.error("SdcToscaParserException", e);
- }
+ Map<String, Object> resourceInputsFromServiceDeclaredLevel = buildResouceRequest(serviceUuid, resourceCustomizationUuid, serviceInput);
+ resourceInputsFromUuiMap.putAll(resourceInputsFromServiceDeclaredLevel);
String resourceInputsStr = getJsonString(resourceInputsFromUuiMap);
String result = "{\n"
+ "\"locationConstraints\":" + locationConstraints +",\n"
@@ -198,91 +131,95 @@ public class ResourceRequestBuilder {
return result;
}
- public static Map<String, Object> buildResouceRequest(String serviceUuid, String resourceCustomizationUuid, Map<String, Object> serviceInputs)
- throws SdcToscaParserException {
-
- Map<String, Object> resouceRequest = new HashMap<>();
-
- String csarpath = null;
+ @SuppressWarnings("unchecked")
+ public static Map<String, Object> buildResouceRequest(String serviceUuid, String resourceCustomizationUuid, Map<String, Object> serviceInputs) {
try {
- csarpath = getCsarFromUuid(serviceUuid);
- } catch(Exception e) {
- LOGGER.debug("csar file is not available for service uuid:" + serviceUuid, e);
- return resouceRequest;
- }
+ Map<String, Object> serviceInstnace = getServiceInstnace(serviceUuid);
- SdcToscaParserFactory toscaParser = SdcToscaParserFactory.getInstance();
- ISdcCsarHelper iSdcCsarHelper = toscaParser.getSdcCsarHelper(csarpath, false);
+ // find match of customization uuid in vnf
+ Map<String, Map<String, Object>> serviceResources = (Map<String, Map<String, Object>>) serviceInstnace.get("serviceResources");
- List<Input> serInput = iSdcCsarHelper.getServiceInputs();
- Optional<NodeTemplate> nodeTemplateOpt = iSdcCsarHelper.getServiceNodeTemplates().stream()
- .filter(e -> e.getMetaData().getValue(CUSTOMIZATION_UUID).equals(resourceCustomizationUuid)).findFirst();
+ List<Map<String, Object>> serviceVnfCust = (List<Map<String, Object>>) serviceResources.get("serviceVnfs");
+ String resourceInputStr = getResourceInputStr(serviceVnfCust, resourceCustomizationUuid);
- if(nodeTemplateOpt.isPresent()) {
- NodeTemplate nodeTemplate = nodeTemplateOpt.get();
- LinkedHashMap<String, Property> resourceProperties = nodeTemplate.getProperties();
+ // find match in network resource
+ if (resourceInputStr == null) {
+ List<Map<String, Object>> serviceNetworkCust = (List<Map<String, Object>>) serviceResources.get("serviceNetworks");
+ resourceInputStr = getResourceInputStr(serviceNetworkCust, resourceCustomizationUuid);
- for(String key : resourceProperties.keySet()) {
- Property property = resourceProperties.get(key);
-
- Object value = getValue(property.getValue(), serviceInputs, serInput);
- resouceRequest.put(key, value);
+ // find match in AR resource
+ if (resourceInputStr == null) {
+ List<Map<String, Object>> serviceArCust = (List<Map<String, Object>>) serviceResources.get("serviceAllottedResources");
+ resourceInputStr = getResourceInputStr(serviceArCust, resourceCustomizationUuid);
+ }
}
+
+ if (resourceInputStr != null || !resourceInputStr.equals("")) {
+ return getResourceInput(resourceInputStr, serviceInputs);
+ }
+
+ } catch (Exception e) {
+ LOGGER.error("not able to retrieve service instance");
}
- return resouceRequest;
+ return new HashMap();
}
- private static Object getValue(Object value, Map<String, Object> serviceInputs, List<Input> servInputs) {
- if(value instanceof Map) {
- Map<String, Object> valueMap = new HashMap<>();
+ private static String getResourceInputStr(List<Map<String, Object>> resources, String resCustomizationUuid) {
- Map<String, Object> propertyMap = (Map<String, Object>)value;
+ for (Map<String, Object> resource : resources) {
+ Map<String, String> modelInfo = (Map<String, String>) resource.get("modelInfo");
- for(String key : propertyMap.keySet()) {
- valueMap.put(key, getValue(propertyMap.get(key), serviceInputs, servInputs));
+ if (modelInfo.get("modelCustomizationUuid").equalsIgnoreCase(resCustomizationUuid)) {
+ return (String) resource.get("resourceInput");
}
- return valueMap; // return if the value is nested hashmap
- } else if(value instanceof GetInput) {
- String inputName = ((GetInput)value).getInputName();
-
- if(serviceInputs.get(inputName) != null) {
- value = serviceInputs.get(inputName);
- } else {
- for(Input input : servInputs) {
- if(input.getName().equals(inputName)) {
- return input.getDefault(); // return default value
- }
+ }
+ return null;
+ }
+
+ // this method combines resource input with service input
+ private static Map<String, Object> getResourceInput(String resourceInputStr, Map<String, Object> serviceInputs) {
+ Gson gson = new Gson();
+ Type type = new TypeToken<Map<String, String>>(){}.getType();
+ Map<String, Object> resourceInput = gson.fromJson(resourceInputStr, type);
+
+ // replace value if key is available in service input
+ for (String key: resourceInput.keySet()) {
+ String value = (String) resourceInput.get(key);
+
+ if (value.contains("|")) {
+ // node it type of getinput
+ String[] split = value.split("\\|");
+ String tmpKey = split[0];
+ if (serviceInputs.containsKey(tmpKey)) {
+ value = (String) serviceInputs.get(tmpKey);
+ } else {
+ value = split[1];
}
}
+ resourceInput.put(key,value);
}
- return value; // return property value
+ return resourceInput;
}
- private static String getCsarFromUuid(String uuid) throws Exception {
- String catalogEndPoint = UrnPropertiesReader.getVariable("mso.catalog.db.endpoint");
- HttpClient client = new HttpClientFactory().newJsonClient(
- UriBuilder.fromUri(catalogEndPoint).path(SERVICE_URL_TOSCA_CSAR).queryParam("serviceModelUuid", uuid).build().toURL(),
- TargetEntity.CATALOG_DB);
-
- client.addAdditionalHeader("Accept", "application/json");
-// client.addBasicAuthHeader (UrnPropertiesReader.getVariable("mso.adapters.db.auth"), UrnPropertiesReader.getVariable("mso.msoKey"));
- client.addAdditionalHeader("Authorization", UrnPropertiesReader.getVariable("mso.db.auth"));
- Response response = client.get();
- String value = response.readEntity(String.class);
+ public static Map<String, Object> getServiceInstnace(String uuid) throws Exception {
+ String catalogEndPoint = UrnPropertiesReader.getVariable("mso.catalog.db.endpoint");
- HashMap<String, String> map = new Gson().fromJson(value, new TypeToken<HashMap<String, String>>() {}.getType());
+ HttpClient client = new HttpClientFactory().newJsonClient(
+ UriBuilder.fromUri(catalogEndPoint).path(SERVICE_URL_SERVICE_INSTANCE).queryParam("serviceModelUuid", uuid).build().toURL(),
+ TargetEntity.CATALOG_DB);
- String filePath = Paths.get(System.getProperty("mso.config.path"), "ASDC", map.get("version"), map.get("name")).normalize().toString();
+ client.addAdditionalHeader("Accept", "application/json");
+ client.addAdditionalHeader("Authorization", UrnPropertiesReader.getVariable("mso.db.auth"));
- File csarFile = new File(filePath);
+ Response apiResponse = client.get();
- if(!csarFile.exists()) {
- throw new Exception("csar file does not exist in filePath:" + csarFile.getAbsolutePath());
- }
+ String value = apiResponse.readEntity(String.class);
- return csarFile.getAbsolutePath();
+ ObjectMapper objectMapper = new ObjectMapper();
+ HashMap<String, Object> map = objectMapper.readValue(value, HashMap.class);
+ return map;
}
-
+
public static <T> T getJsonObject(String jsonstr, Class<T> type) {
ObjectMapper mapper = new ObjectMapper();
mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true);
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/util/OofInfraUtils.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/util/OofInfraUtils.java
new file mode 100644
index 0000000000..df7b57f3a3
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/util/OofInfraUtils.java
@@ -0,0 +1,112 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018. Intel Corp. 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.common.util;
+
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.onap.so.bpmn.core.UrnPropertiesReader;
+import org.onap.so.db.catalog.beans.CloudSite;
+import org.onap.so.db.catalog.beans.HomingInstance;
+import org.onap.so.db.catalog.client.CatalogDbClient;
+import org.onap.so.logger.MsoLogger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.Arrays;
+import java.util.Optional;
+
+public class OofInfraUtils {
+
+ private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, OofInfraUtils.class);
+
+ /**
+ * This method creates a cloudsite in catalog database.
+ *
+ * @param cloudSite
+ *
+ * @return void
+ */
+ public void createCloudSite(CloudSite cloudSite, DelegateExecution execution) {
+ String endpoint = UrnPropertiesReader.getVariable("mso.catalog.db.spring.endpoint", execution);
+ String auth = UrnPropertiesReader.getVariable("mso.db.auth", execution);
+ try {
+ CloudSite getCloudsite;
+
+ CatalogDbClient client = new CatalogDbClient(endpoint, auth);
+
+ getCloudsite = Optional.ofNullable(client.getCloudSite(cloudSite.getId(), endpoint + "/cloudSite/")).orElse(new CloudSite());
+ if (!cloudSite.getId().equals(getCloudsite.getId())) {
+ client.postCloudSite(cloudSite);
+ LOGGER.debug("Did not findd cloudsite : " + cloudSite.getId());
+ LOGGER.debug("Will create cloudSite: " + cloudSite.toString());
+ }
+ else {
+ LOGGER.debug("Found cloudsite : " + cloudSite.getId());
+ LOGGER.debug("Will not create cloudSite: " + cloudSite.toString());
+ }
+ } catch (Exception e) {
+ LOGGER.debug("Error looking up or creating cloudsite : " + cloudSite.getId());
+ LOGGER.debug("CloudSite Lookup/Creation Error: " + e);
+ }
+
+
+ }
+
+ /**
+ * This method creates a HomingInstance in catalog database.
+ *
+ * @param homingInstance
+ *
+ * @return void
+ */
+ public void createHomingInstance(HomingInstance homingInstance, DelegateExecution execution) {
+ String endpoint = UrnPropertiesReader.getVariable("mso.catalog.db.spring.endpoint", execution);
+ String auth = UrnPropertiesReader.getVariable("mso.db.auth", execution);
+
+ CatalogDbClient client = new CatalogDbClient(endpoint, auth);
+ try {
+ client.postHomingInstance(homingInstance);
+ } catch (Exception exception) {
+ LOGGER.debug("Could not create HomingInstance : " + homingInstance.getServiceInstanceId());
+ LOGGER.debug("HomingInstance Creation Error: " + exception);
+ }
+
+ }
+
+ /**
+ * This method gets a HomingInstance in catalog database.
+ *
+ * @param serviceInstanceId
+ *
+ * @return HomingInstance
+ */
+ public HomingInstance getHomingInstance(String serviceInstanceId, DelegateExecution execution) {
+ String endpoint = UrnPropertiesReader.getVariable("mso.catalog.db.spring.endpoint", execution);
+ String auth = UrnPropertiesReader.getVariable("mso.db.auth", execution);
+
+ CatalogDbClient client = new CatalogDbClient(endpoint, auth);
+ try {
+ return client.getHomingInstance(serviceInstanceId, endpoint + "/homingInstance/");
+ } catch (Exception exception) {
+ LOGGER.debug("Could not get HomingInstance for serviceInstanceId : " + serviceInstanceId);
+ LOGGER.debug("Get HomingInstance Error: " + exception);
+ }
+ return null;
+ }
+}
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/MsoUtilsTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/MsoUtilsTest.groovy
index dfaf5d2140..c6a68c0e7a 100644
--- a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/MsoUtilsTest.groovy
+++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/MsoUtilsTest.groovy
@@ -277,5 +277,13 @@ class MsoUtilsTest {
}
}
-
+ @Test
+ public void testGetLowestUnusedIndex() {
+ def responseAsString = getFile("vfModuleCount.xml")
+ def index = utils.getLowestUnusedIndex(responseAsString)
+ println " lowest module count test: "
+ println " actual - " + index
+ println " expected - " + "14"
+ assertEquals("expected vs actual", "14", index)
+ }
} \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilderTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilderTest.java
index 5598e3d2e4..e5e13268b2 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilderTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilderTest.java
@@ -19,24 +19,390 @@
*/
package org.onap.so.bpmn.common.resource;
-import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.mockito.Mock;
+import org.onap.so.BaseTest;
+import org.onap.so.bpmn.core.UrnPropertiesReader;
+import org.springframework.core.env.Environment;
+
+import static com.github.tomakehurst.wiremock.client.WireMock.*;
+
-public class ResourceRequestBuilderTest {
+public class ResourceRequestBuilderTest extends BaseTest {
@Test
- public void buildResouceRequestTest() throws Exception {
+ public void getResourceInputTest() throws Exception {
- ResourceRequestBuilder.buildResouceRequest("xxxxxx",
- "a1074969-944f-4ddc-b687-9550b0c8cd57", new HashMap<>());
+
+
+ stubFor(get(urlEqualTo("/ecomp/mso/catalog/v2/serviceResources?serviceModelUuid=c3954379-4efe-431c-8258-f84905b158e5"))
+ .willReturn(ok("{ \"serviceResources\" : {\n" +
+ "\t\"modelInfo\" : {\n" +
+ "\t\t\"modelName\" : \"demoVFWCL\",\n" +
+ "\t\t\"modelUuid\" : \"c3954379-4efe-431c-8258-f84905b158e5\",\n" +
+ "\t\t\"modelInvariantUuid\" : \"0cbff61e-3b0a-4eed-97ce-b1b4faa03493\",\n" +
+ "\t\t\"modelVersion\" : \"1.0\"\n" +
+ "\t},\n" +
+ "\t\"serviceType\" : \"\",\n" +
+ "\t\"serviceRole\" : \"\",\n" +
+ "\t\"environmentContext\" : null,\n" +
+ "\t\"resourceOrder\" : \"res1,res2\",\n" +
+ "\t\"workloadContext\" : \"Production\",\n" +
+ "\t\"serviceVnfs\": [\n" +
+ "\t\n" +
+ "\t\t{ \"modelInfo\" : {\n" +
+ "\t\t\t\"modelName\" : \"15968a6e-2fe5-41bf-a481\",\n" +
+ "\t\t\t\"modelUuid\" : \"808abda3-2023-4105-92d2-e62644b61d53\",\n" +
+ "\t\t\t\"modelInvariantUuid\" : \"6e4ffc7c-497e-4a77-970d-af966e642d31\",\n" +
+ "\t\t\t\"modelVersion\" : \"1.0\",\n" +
+ "\t\t\t\"modelCustomizationUuid\" : \"a00404d5-d7eb-4c46-b6b6-9cf2d087e545\",\n" +
+ "\t\t\t\"modelInstanceName\" : \"15968a6e-2fe5-41bf-a481 0\"\n" +
+ "\t\t\t},\n" +
+ "\t\t\"toscaNodeType\" : \"org.openecomp.resource.vf.15968a6e2fe541bfA481\",\n" +
+ "\t\t\"nfFunction\" \t: null,\n" +
+ "\"resourceInput\":\"{\\\"a\\\":\\\"b\\\"}\"," +
+ "\t\t\"nfType\" \t\t: null,\n" +
+ "\t\t\"nfRole\" \t\t: null,\n" +
+ "\t\t\"nfNamingCode\" \t: null,\n" +
+ "\t\t\"multiStageDesign\" : \"false\",\n" +
+ "\t\t\t\"vfModules\": [\n" +
+ "\t\t\t\t{\n" +
+ "\t\t\t\t\t\"modelInfo\" : { \n" +
+ "\t\t\t\t\t\t\"modelName\" : \"15968a6e2fe541bfA481..base_vfw..module-0\",\n" +
+ "\t\t\t\t\t\t\"modelUuid\" : \"ec7fadde-1e5a-42f7-8255-cb19e475ff45\",\n" +
+ "\t\t\t\t\t\t\"modelInvariantUuid\" : \"61ab8b64-a014-4cf3-8a5a-b5ef388f8819\",\n" +
+ "\t\t\t\t\t\t\"modelVersion\" : \"1\",\n" +
+ "\t\t\t\t\t\t\"modelCustomizationUuid\" : \"123aff6b-854f-4026-ae1e-cc74a3924576\"\n" +
+ "\t\t\t\t\t},\t\t\"isBase\" : true,\n" +
+ "\t\t\t\t\t\"vfModuleLabel\" : \"base_vfw\",\n" +
+ "\t\t\t\t\t\"initialCount\" : 1,\n" +
+ "\t\t\t\t\t\"hasVolumeGroup\" : true\n" +
+ "\t\t\t\t}\n" +
+ "\t\t\t]\n" +
+ "\t\t},\n" +
+ "\t\n" +
+ "\t\t{ \"modelInfo\" : {\n" +
+ "\t\t\t\"modelName\" : \"f971106a-248f-4202-9d1f\",\n" +
+ "\t\t\t\"modelUuid\" : \"4fbc08a4-35ed-4a59-9e47-79975e4add7e\",\n" +
+ "\t\t\t\"modelInvariantUuid\" : \"c669799e-adf1-46ae-8c70-48b326fe89f3\",\n" +
+ "\t\t\t\"modelVersion\" : \"1.0\",\n" +
+ "\t\t\t\"modelCustomizationUuid\" : \"e776449e-2b10-45c5-9217-2775c88ca1a0\",\n" +
+ "\t\t\t\"modelInstanceName\" : \"f971106a-248f-4202-9d1f 0\"\n" +
+ "\t\t\t},\n" +
+ "\t\t\"toscaNodeType\" : \"org.openecomp.resource.vf.F971106a248f42029d1f\",\n" +
+ "\t\t\"nfFunction\" \t: null,\n" +
+ "\t\t\"nfType\" \t\t: null,\n" +
+ "\t\t\"nfRole\" \t\t: null,\n" +
+ "\"resourceInput\":\"{\\\"a\\\":\\\"key|default_value\\\"}\"," +
+ "\t\t\"nfNamingCode\" \t: null,\n" +
+ "\t\t\"multiStageDesign\" : \"false\",\n" +
+ "\t\t\t\"vfModules\": [\n" +
+ "\t\t\t\t{\n" +
+ "\t\t\t\t\t\"modelInfo\" : { \n" +
+ "\t\t\t\t\t\t\"modelName\" : \"F971106a248f42029d1f..base_vpkg..module-0\",\n" +
+ "\t\t\t\t\t\t\"modelUuid\" : \"47d5273a-7456-4786-9035-b3911944cc35\",\n" +
+ "\t\t\t\t\t\t\"modelInvariantUuid\" : \"0ea3e57e-ac7a-425a-928b-b4aee8806c15\",\n" +
+ "\t\t\t\t\t\t\"modelVersion\" : \"1\",\n" +
+ "\t\t\t\t\t\t\"modelCustomizationUuid\" : \"9ed9fef6-d3f8-4433-9807-7e23393a16bc\"\n" +
+ "\t\t\t\t\t},\t\t\"isBase\" : true,\n" +
+ "\t\t\t\t\t\"vfModuleLabel\" : \"base_vpkg\",\n" +
+ "\t\t\t\t\t\"initialCount\" : 1,\n" +
+ "\t\t\t\t\t\"hasVolumeGroup\" : true\n" +
+ "\t\t\t\t}\n" +
+ "\t\t\t]\n" +
+ "\t\t}\n" +
+ "\t],\n" +
+ "\t\"serviceNetworks\": [],\n" +
+ "\t\"serviceAllottedResources\": []\n" +
+ "\t}}")));
+
+// when(UrnPropertiesReader.getVariable(anyString())).thenReturn("http://localhost:8080");
+ HashMap serviceInput = new HashMap();
+ serviceInput.put("key", "value");
+ Map<String, Object> stringObjectMap = ResourceRequestBuilder.buildResouceRequest("c3954379-4efe-431c-8258-f84905b158e5",
+ "e776449e-2b10-45c5-9217-2775c88ca1a0", serviceInput);
+ assertEquals(stringObjectMap.get("a"), "value");
}
@Test
- public void buildResouceRequestParametersTest() throws Exception {
+ public void getResourceInputDefaultValueTest() throws Exception {
+
+ stubFor(get(urlEqualTo("/ecomp/mso/catalog/v2/serviceResources?serviceModelUuid=c3954379-4efe-431c-8258-f84905b158e5"))
+ .willReturn(ok("{ \"serviceResources\" : {\n" +
+ "\t\"modelInfo\" : {\n" +
+ "\t\t\"modelName\" : \"demoVFWCL\",\n" +
+ "\t\t\"modelUuid\" : \"c3954379-4efe-431c-8258-f84905b158e5\",\n" +
+ "\t\t\"modelInvariantUuid\" : \"0cbff61e-3b0a-4eed-97ce-b1b4faa03493\",\n" +
+ "\t\t\"modelVersion\" : \"1.0\"\n" +
+ "\t},\n" +
+ "\t\"serviceType\" : \"\",\n" +
+ "\t\"serviceRole\" : \"\",\n" +
+ "\t\"environmentContext\" : null,\n" +
+ "\t\"workloadContext\" : \"Production\",\n" +
+ "\t\"serviceVnfs\": [\n" +
+ "\t\n" +
+ "\t\t{ \"modelInfo\" : {\n" +
+ "\t\t\t\"modelName\" : \"15968a6e-2fe5-41bf-a481\",\n" +
+ "\t\t\t\"modelUuid\" : \"808abda3-2023-4105-92d2-e62644b61d53\",\n" +
+ "\t\t\t\"modelInvariantUuid\" : \"6e4ffc7c-497e-4a77-970d-af966e642d31\",\n" +
+ "\t\t\t\"modelVersion\" : \"1.0\",\n" +
+ "\t\t\t\"modelCustomizationUuid\" : \"a00404d5-d7eb-4c46-b6b6-9cf2d087e545\",\n" +
+ "\t\t\t\"modelInstanceName\" : \"15968a6e-2fe5-41bf-a481 0\"\n" +
+ "\t\t\t},\n" +
+ "\t\t\"toscaNodeType\" : \"org.openecomp.resource.vf.15968a6e2fe541bfA481\",\n" +
+ "\t\t\"nfFunction\" \t: null,\n" +
+ "\"resourceInput\":\"{\\\"a\\\":\\\"b\\\"}\"," +
+ "\t\t\"nfType\" \t\t: null,\n" +
+ "\t\t\"nfRole\" \t\t: null,\n" +
+ "\t\t\"nfNamingCode\" \t: null,\n" +
+ "\t\t\"multiStageDesign\" : \"false\",\n" +
+ "\t\t\t\"vfModules\": [\n" +
+ "\t\t\t\t{\n" +
+ "\t\t\t\t\t\"modelInfo\" : { \n" +
+ "\t\t\t\t\t\t\"modelName\" : \"15968a6e2fe541bfA481..base_vfw..module-0\",\n" +
+ "\t\t\t\t\t\t\"modelUuid\" : \"ec7fadde-1e5a-42f7-8255-cb19e475ff45\",\n" +
+ "\t\t\t\t\t\t\"modelInvariantUuid\" : \"61ab8b64-a014-4cf3-8a5a-b5ef388f8819\",\n" +
+ "\t\t\t\t\t\t\"modelVersion\" : \"1\",\n" +
+ "\t\t\t\t\t\t\"modelCustomizationUuid\" : \"123aff6b-854f-4026-ae1e-cc74a3924576\"\n" +
+ "\t\t\t\t\t},\t\t\"isBase\" : true,\n" +
+ "\t\t\t\t\t\"vfModuleLabel\" : \"base_vfw\",\n" +
+ "\t\t\t\t\t\"initialCount\" : 1,\n" +
+ "\t\t\t\t\t\"hasVolumeGroup\" : true\n" +
+ "\t\t\t\t}\n" +
+ "\t\t\t]\n" +
+ "\t\t},\n" +
+ "\t\n" +
+ "\t\t{ \"modelInfo\" : {\n" +
+ "\t\t\t\"modelName\" : \"f971106a-248f-4202-9d1f\",\n" +
+ "\t\t\t\"modelUuid\" : \"4fbc08a4-35ed-4a59-9e47-79975e4add7e\",\n" +
+ "\t\t\t\"modelInvariantUuid\" : \"c669799e-adf1-46ae-8c70-48b326fe89f3\",\n" +
+ "\t\t\t\"modelVersion\" : \"1.0\",\n" +
+ "\t\t\t\"modelCustomizationUuid\" : \"e776449e-2b10-45c5-9217-2775c88ca1a0\",\n" +
+ "\t\t\t\"modelInstanceName\" : \"f971106a-248f-4202-9d1f 0\"\n" +
+ "\t\t\t},\n" +
+ "\t\t\"toscaNodeType\" : \"org.openecomp.resource.vf.F971106a248f42029d1f\",\n" +
+ "\t\t\"nfFunction\" \t: null,\n" +
+ "\t\t\"nfType\" \t\t: null,\n" +
+ "\t\t\"nfRole\" \t\t: null,\n" +
+ "\"resourceInput\":\"{\\\"a\\\":\\\"key|default_value\\\"}\"," +
+ "\t\t\"nfNamingCode\" \t: null,\n" +
+ "\t\t\"multiStageDesign\" : \"false\",\n" +
+ "\t\t\t\"vfModules\": [\n" +
+ "\t\t\t\t{\n" +
+ "\t\t\t\t\t\"modelInfo\" : { \n" +
+ "\t\t\t\t\t\t\"modelName\" : \"F971106a248f42029d1f..base_vpkg..module-0\",\n" +
+ "\t\t\t\t\t\t\"modelUuid\" : \"47d5273a-7456-4786-9035-b3911944cc35\",\n" +
+ "\t\t\t\t\t\t\"modelInvariantUuid\" : \"0ea3e57e-ac7a-425a-928b-b4aee8806c15\",\n" +
+ "\t\t\t\t\t\t\"modelVersion\" : \"1\",\n" +
+ "\t\t\t\t\t\t\"modelCustomizationUuid\" : \"9ed9fef6-d3f8-4433-9807-7e23393a16bc\"\n" +
+ "\t\t\t\t\t},\t\t\"isBase\" : true,\n" +
+ "\t\t\t\t\t\"vfModuleLabel\" : \"base_vpkg\",\n" +
+ "\t\t\t\t\t\"initialCount\" : 1,\n" +
+ "\t\t\t\t\t\"hasVolumeGroup\" : true\n" +
+ "\t\t\t\t}\n" +
+ "\t\t\t]\n" +
+ "\t\t}\n" +
+ "\t],\n" +
+ "\t\"serviceNetworks\": [],\n" +
+ "\t\"serviceAllottedResources\": []\n" +
+ "\t}}")));
+
+// when(UrnPropertiesReader.getVariable(anyString())).thenReturn("http://localhost:8080");
+ HashMap serviceInput = new HashMap();
+ serviceInput.put("key1", "value");
+ Map<String, Object> stringObjectMap = ResourceRequestBuilder.buildResouceRequest("c3954379-4efe-431c-8258-f84905b158e5",
+ "e776449e-2b10-45c5-9217-2775c88ca1a0", serviceInput);
+ assertEquals(stringObjectMap.get("a"), "default_value");
+ }
+
+ @Test
+ public void getResourceInputValueNoDefaultTest() throws Exception {
+
+ stubFor(get(urlEqualTo("/ecomp/mso/catalog/v2/serviceResources?serviceModelUuid=c3954379-4efe-431c-8258-f84905b158e5"))
+ .willReturn(ok("{ \"serviceResources\" : {\n" +
+ "\t\"modelInfo\" : {\n" +
+ "\t\t\"modelName\" : \"demoVFWCL\",\n" +
+ "\t\t\"modelUuid\" : \"c3954379-4efe-431c-8258-f84905b158e5\",\n" +
+ "\t\t\"modelInvariantUuid\" : \"0cbff61e-3b0a-4eed-97ce-b1b4faa03493\",\n" +
+ "\t\t\"modelVersion\" : \"1.0\"\n" +
+ "\t},\n" +
+ "\t\"serviceType\" : \"\",\n" +
+ "\t\"serviceRole\" : \"\",\n" +
+ "\t\"environmentContext\" : null,\n" +
+ "\t\"workloadContext\" : \"Production\",\n" +
+ "\t\"serviceVnfs\": [\n" +
+ "\t\n" +
+ "\t\t{ \"modelInfo\" : {\n" +
+ "\t\t\t\"modelName\" : \"15968a6e-2fe5-41bf-a481\",\n" +
+ "\t\t\t\"modelUuid\" : \"808abda3-2023-4105-92d2-e62644b61d53\",\n" +
+ "\t\t\t\"modelInvariantUuid\" : \"6e4ffc7c-497e-4a77-970d-af966e642d31\",\n" +
+ "\t\t\t\"modelVersion\" : \"1.0\",\n" +
+ "\t\t\t\"modelCustomizationUuid\" : \"a00404d5-d7eb-4c46-b6b6-9cf2d087e545\",\n" +
+ "\t\t\t\"modelInstanceName\" : \"15968a6e-2fe5-41bf-a481 0\"\n" +
+ "\t\t\t},\n" +
+ "\t\t\"toscaNodeType\" : \"org.openecomp.resource.vf.15968a6e2fe541bfA481\",\n" +
+ "\t\t\"nfFunction\" \t: null,\n" +
+ "\"resourceInput\":\"{\\\"a\\\":\\\"b\\\"}\"," +
+ "\t\t\"nfType\" \t\t: null,\n" +
+ "\t\t\"nfRole\" \t\t: null,\n" +
+ "\t\t\"nfNamingCode\" \t: null,\n" +
+ "\t\t\"multiStageDesign\" : \"false\",\n" +
+ "\t\t\t\"vfModules\": [\n" +
+ "\t\t\t\t{\n" +
+ "\t\t\t\t\t\"modelInfo\" : { \n" +
+ "\t\t\t\t\t\t\"modelName\" : \"15968a6e2fe541bfA481..base_vfw..module-0\",\n" +
+ "\t\t\t\t\t\t\"modelUuid\" : \"ec7fadde-1e5a-42f7-8255-cb19e475ff45\",\n" +
+ "\t\t\t\t\t\t\"modelInvariantUuid\" : \"61ab8b64-a014-4cf3-8a5a-b5ef388f8819\",\n" +
+ "\t\t\t\t\t\t\"modelVersion\" : \"1\",\n" +
+ "\t\t\t\t\t\t\"modelCustomizationUuid\" : \"123aff6b-854f-4026-ae1e-cc74a3924576\"\n" +
+ "\t\t\t\t\t},\t\t\"isBase\" : true,\n" +
+ "\t\t\t\t\t\"vfModuleLabel\" : \"base_vfw\",\n" +
+ "\t\t\t\t\t\"initialCount\" : 1,\n" +
+ "\t\t\t\t\t\"hasVolumeGroup\" : true\n" +
+ "\t\t\t\t}\n" +
+ "\t\t\t]\n" +
+ "\t\t},\n" +
+ "\t\n" +
+ "\t\t{ \"modelInfo\" : {\n" +
+ "\t\t\t\"modelName\" : \"f971106a-248f-4202-9d1f\",\n" +
+ "\t\t\t\"modelUuid\" : \"4fbc08a4-35ed-4a59-9e47-79975e4add7e\",\n" +
+ "\t\t\t\"modelInvariantUuid\" : \"c669799e-adf1-46ae-8c70-48b326fe89f3\",\n" +
+ "\t\t\t\"modelVersion\" : \"1.0\",\n" +
+ "\t\t\t\"modelCustomizationUuid\" : \"e776449e-2b10-45c5-9217-2775c88ca1a0\",\n" +
+ "\t\t\t\"modelInstanceName\" : \"f971106a-248f-4202-9d1f 0\"\n" +
+ "\t\t\t},\n" +
+ "\t\t\"toscaNodeType\" : \"org.openecomp.resource.vf.F971106a248f42029d1f\",\n" +
+ "\t\t\"nfFunction\" \t: null,\n" +
+ "\t\t\"nfType\" \t\t: null,\n" +
+ "\t\t\"nfRole\" \t\t: null,\n" +
+ "\"resourceInput\":\"{\\\"a\\\":\\\"value\\\"}\"," +
+ "\t\t\"nfNamingCode\" \t: null,\n" +
+ "\t\t\"multiStageDesign\" : \"false\",\n" +
+ "\t\t\t\"vfModules\": [\n" +
+ "\t\t\t\t{\n" +
+ "\t\t\t\t\t\"modelInfo\" : { \n" +
+ "\t\t\t\t\t\t\"modelName\" : \"F971106a248f42029d1f..base_vpkg..module-0\",\n" +
+ "\t\t\t\t\t\t\"modelUuid\" : \"47d5273a-7456-4786-9035-b3911944cc35\",\n" +
+ "\t\t\t\t\t\t\"modelInvariantUuid\" : \"0ea3e57e-ac7a-425a-928b-b4aee8806c15\",\n" +
+ "\t\t\t\t\t\t\"modelVersion\" : \"1\",\n" +
+ "\t\t\t\t\t\t\"modelCustomizationUuid\" : \"9ed9fef6-d3f8-4433-9807-7e23393a16bc\"\n" +
+ "\t\t\t\t\t},\t\t\"isBase\" : true,\n" +
+ "\t\t\t\t\t\"vfModuleLabel\" : \"base_vpkg\",\n" +
+ "\t\t\t\t\t\"initialCount\" : 1,\n" +
+ "\t\t\t\t\t\"hasVolumeGroup\" : true\n" +
+ "\t\t\t\t}\n" +
+ "\t\t\t]\n" +
+ "\t\t}\n" +
+ "\t],\n" +
+ "\t\"serviceNetworks\": [],\n" +
+ "\t\"serviceAllottedResources\": []\n" +
+ "\t}}")));
+
+// when(UrnPropertiesReader.getVariable(anyString())).thenReturn("http://localhost:8080");
+ HashMap serviceInput = new HashMap();
+ serviceInput.put("key1", "value");
+ Map<String, Object> stringObjectMap = ResourceRequestBuilder.buildResouceRequest("c3954379-4efe-431c-8258-f84905b158e5",
+ "e776449e-2b10-45c5-9217-2775c88ca1a0", serviceInput);
+ assertEquals(stringObjectMap.get("a"), "value");
+ }
+
+ @Test
+ public void getResourceSequenceTest() throws Exception {
+
+ stubFor(get(urlEqualTo("/ecomp/mso/catalog/v2/serviceResources?serviceModelUuid=c3954379-4efe-431c-8258-f84905b158e5"))
+ .willReturn(ok("{ \"serviceResources\" : {\n" +
+ "\t\"modelInfo\" : {\n" +
+ "\t\t\"modelName\" : \"demoVFWCL\",\n" +
+ "\t\t\"modelUuid\" : \"c3954379-4efe-431c-8258-f84905b158e5\",\n" +
+ "\t\t\"modelInvariantUuid\" : \"0cbff61e-3b0a-4eed-97ce-b1b4faa03493\",\n" +
+ "\t\t\"modelVersion\" : \"1.0\"\n" +
+ "\t},\n" +
+ "\t\"serviceType\" : \"\",\n" +
+ "\t\"serviceRole\" : \"\",\n" +
+ "\t\"environmentContext\" : null,\n" +
+ "\t\"resourceOrder\" : \"res1,res2\",\n" +
+ "\t\"workloadContext\" : \"Production\",\n" +
+ "\t\"serviceVnfs\": [\n" +
+ "\t\n" +
+ "\t\t{ \"modelInfo\" : {\n" +
+ "\t\t\t\"modelName\" : \"15968a6e-2fe5-41bf-a481\",\n" +
+ "\t\t\t\"modelUuid\" : \"808abda3-2023-4105-92d2-e62644b61d53\",\n" +
+ "\t\t\t\"modelInvariantUuid\" : \"6e4ffc7c-497e-4a77-970d-af966e642d31\",\n" +
+ "\t\t\t\"modelVersion\" : \"1.0\",\n" +
+ "\t\t\t\"modelCustomizationUuid\" : \"a00404d5-d7eb-4c46-b6b6-9cf2d087e545\",\n" +
+ "\t\t\t\"modelInstanceName\" : \"15968a6e-2fe5-41bf-a481 0\"\n" +
+ "\t\t\t},\n" +
+ "\t\t\"toscaNodeType\" : \"org.openecomp.resource.vf.15968a6e2fe541bfA481\",\n" +
+ "\t\t\"nfFunction\" \t: null,\n" +
+ "\"resourceInput\":\"{\\\"a\\\":\\\"b\\\"}\"," +
+ "\t\t\"nfType\" \t\t: null,\n" +
+ "\t\t\"nfRole\" \t\t: null,\n" +
+ "\t\t\"nfNamingCode\" \t: null,\n" +
+ "\t\t\"multiStageDesign\" : \"false\",\n" +
+ "\t\t\t\"vfModules\": [\n" +
+ "\t\t\t\t{\n" +
+ "\t\t\t\t\t\"modelInfo\" : { \n" +
+ "\t\t\t\t\t\t\"modelName\" : \"15968a6e2fe541bfA481..base_vfw..module-0\",\n" +
+ "\t\t\t\t\t\t\"modelUuid\" : \"ec7fadde-1e5a-42f7-8255-cb19e475ff45\",\n" +
+ "\t\t\t\t\t\t\"modelInvariantUuid\" : \"61ab8b64-a014-4cf3-8a5a-b5ef388f8819\",\n" +
+ "\t\t\t\t\t\t\"modelVersion\" : \"1\",\n" +
+ "\t\t\t\t\t\t\"modelCustomizationUuid\" : \"123aff6b-854f-4026-ae1e-cc74a3924576\"\n" +
+ "\t\t\t\t\t},\t\t\"isBase\" : true,\n" +
+ "\t\t\t\t\t\"vfModuleLabel\" : \"base_vfw\",\n" +
+ "\t\t\t\t\t\"initialCount\" : 1,\n" +
+ "\t\t\t\t\t\"hasVolumeGroup\" : true\n" +
+ "\t\t\t\t}\n" +
+ "\t\t\t]\n" +
+ "\t\t},\n" +
+ "\t\n" +
+ "\t\t{ \"modelInfo\" : {\n" +
+ "\t\t\t\"modelName\" : \"f971106a-248f-4202-9d1f\",\n" +
+ "\t\t\t\"modelUuid\" : \"4fbc08a4-35ed-4a59-9e47-79975e4add7e\",\n" +
+ "\t\t\t\"modelInvariantUuid\" : \"c669799e-adf1-46ae-8c70-48b326fe89f3\",\n" +
+ "\t\t\t\"modelVersion\" : \"1.0\",\n" +
+ "\t\t\t\"modelCustomizationUuid\" : \"e776449e-2b10-45c5-9217-2775c88ca1a0\",\n" +
+ "\t\t\t\"modelInstanceName\" : \"f971106a-248f-4202-9d1f 0\"\n" +
+ "\t\t\t},\n" +
+ "\t\t\"toscaNodeType\" : \"org.openecomp.resource.vf.F971106a248f42029d1f\",\n" +
+ "\t\t\"nfFunction\" \t: null,\n" +
+ "\t\t\"nfType\" \t\t: null,\n" +
+ "\t\t\"nfRole\" \t\t: null,\n" +
+ "\"resourceInput\":\"{\\\"a\\\":\\\"key|default_value\\\"}\"," +
+ "\t\t\"nfNamingCode\" \t: null,\n" +
+ "\t\t\"multiStageDesign\" : \"false\",\n" +
+ "\t\t\t\"vfModules\": [\n" +
+ "\t\t\t\t{\n" +
+ "\t\t\t\t\t\"modelInfo\" : { \n" +
+ "\t\t\t\t\t\t\"modelName\" : \"F971106a248f42029d1f..base_vpkg..module-0\",\n" +
+ "\t\t\t\t\t\t\"modelUuid\" : \"47d5273a-7456-4786-9035-b3911944cc35\",\n" +
+ "\t\t\t\t\t\t\"modelInvariantUuid\" : \"0ea3e57e-ac7a-425a-928b-b4aee8806c15\",\n" +
+ "\t\t\t\t\t\t\"modelVersion\" : \"1\",\n" +
+ "\t\t\t\t\t\t\"modelCustomizationUuid\" : \"9ed9fef6-d3f8-4433-9807-7e23393a16bc\"\n" +
+ "\t\t\t\t\t},\t\t\"isBase\" : true,\n" +
+ "\t\t\t\t\t\"vfModuleLabel\" : \"base_vpkg\",\n" +
+ "\t\t\t\t\t\"initialCount\" : 1,\n" +
+ "\t\t\t\t\t\"hasVolumeGroup\" : true\n" +
+ "\t\t\t\t}\n" +
+ "\t\t\t]\n" +
+ "\t\t}\n" +
+ "\t],\n" +
+ "\t\"serviceNetworks\": [],\n" +
+ "\t\"serviceAllottedResources\": []\n" +
+ "\t}}")));
- String parameters =
- "{ \"locationConstraints\":[ ], \"resources\":[ { \"resourceName\":\"vEPC_ONAP01\", \"resourceInvariantUuid\":\"36ebe421-283a-4ee8-92f1-d09e7c44b911\", \"resourceUuid\":\"27a0e235-b67a-4ea4-a0cf-25761afed111\", \"resourceCustomizationUuid\":\"27a0e235-b67a-4ea4-a0cf-25761afed231\", \"parameters\":{ \"locationConstraints\":[ { \"vnfProfileId\":\"b244d433-8c9c-49ad-9c70-8e34b8dc8328\", \"locationConstraints\":{ \"vimId\":\"vmware_vio\" } }, { \"vnfProfileId\":\"8a9f7c48-21ce-41b7-95b8-a8ac61ccb1ff\", \"locationConstraints\":{ \"vimId\":\"core-dc_RegionOne\" } } ], \"resources\":[ ], \"requestInputs\":{ \"sdncontroller\":\"\" } } }, { \"resourceName\":\"VL OVERLAYTUNNEL\", \"resourceInvariantUuid\":\"184494cf-472f-436f-82e2-d83dddde21cb\", \"resourceUuid\":\"95bc3e59-c9c5-458f-ad6e-78874ab4b3cc\", \"resourceCustomizationUuid\":\"27a0e235-b67a-4ea4-a0cf-25761afed232\", \"parameters\":{ \"locationConstraints\":[ ], \"resources\":[ ], \"requestInputs\":{ } } } ], \"requestInputs\":{ \"vlunderlayvpn0_name\":\"l3connect\", \"vlunderlayvpn0_site1_id\":\"IP-WAN-Controller-1\", \"vlunderlayvpn0_site2_id\":\"SPTNController\", \"vlunderlayvpn0_site1_networkName\":\"network1,network2\", \"vlunderlayvpn0_site2_networkName\":\"network3,network4\", \"vlunderlayvpn0_site1_routerId\":\"a8098c1a-f86e-11da-bd1a-00112444be1a\", \"vlunderlayvpn0_site2_routerId\":\"a8098c1a-f86e-11da-bd1a-00112444be1e\", \"vlunderlayvpn0_site2_importRT1\":\"200:1,200:2\", \"vlunderlayvpn0_site1_exportRT1\":\"300:1,300:2\", \"vlunderlayvpn0_site2_exportRT1\":\"400:1,400:2\", \"vlunderlayvpn0_site1_vni\":\"2000\", \"vlunderlayvpn0_site2_vni\":\"3000\", \"vlunderlayvpn0_tunnelType\":\"L3-DCI\" } }";
- ResourceRequestBuilder.buildResourceRequestParameters(null, "1bd0eae6-2dcc-4461-9ae6-56d641f369d6", "27a0e235-b67a-4ea4-a0cf-25761afed231", parameters);
+ List<String> resourceSequence = ResourceRequestBuilder.getResourceSequence("c3954379-4efe-431c-8258-f84905b158e5");
+ assertEquals(resourceSequence.size(), 2);
+ assertEquals(resourceSequence.get(0), "res1");
+ assertEquals(resourceSequence.get(1), "res2");
}
} \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/dmaapproperties/DmaapPropertiesClientTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/dmaapproperties/DmaapPropertiesClientTest.java
index dbf2eb75fd..95b86524a3 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/dmaapproperties/DmaapPropertiesClientTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/dmaapproperties/DmaapPropertiesClientTest.java
@@ -26,6 +26,7 @@ import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo;
import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertTrue;
import java.io.File;
import java.io.IOException;
@@ -46,6 +47,7 @@ public class DmaapPropertiesClientTest extends BaseTest{
@Autowired
private DmaapPropertiesClient dmaapPropertiesClient;
+
private final String file = "src/test/resources/org/onap/so/client/avpn/dmaap/avpnDmaapAsyncRequestStatus.json";
private String requestId = "rq1234d1-5a33-55df-13ab-12abad84e331";
private String clientSource = "SPP";
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/dmaapproperties/GlobalDmaapPublisherTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/dmaapproperties/GlobalDmaapPublisherTest.java
index 47e05831ad..4d7c85efdb 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/dmaapproperties/GlobalDmaapPublisherTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/dmaapproperties/GlobalDmaapPublisherTest.java
@@ -21,6 +21,7 @@
package org.onap.so.client.dmaapproperties;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
import org.junit.Test;
import org.onap.so.BaseTest;
@@ -30,7 +31,8 @@ public class GlobalDmaapPublisherTest extends BaseTest{
@Autowired
private GlobalDmaapPublisher globalDmaapPublisher;
-
+
+
@Test
public void testGetters() {
assertEquals("dmaapUsername", globalDmaapPublisher.getUserName());
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/exception/ExceptionBuilderTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/exception/ExceptionBuilderTest.java
index d1013e7541..2e25449937 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/exception/ExceptionBuilderTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/exception/ExceptionBuilderTest.java
@@ -21,7 +21,7 @@
package org.onap.so.client.exception;
import static org.junit.Assert.assertEquals;
-
+import static org.junit.Assert.assertTrue;
import org.camunda.bpm.engine.delegate.BpmnError;
import org.junit.Test;
import org.onap.so.bpmn.mock.FileUtil;
@@ -32,6 +32,7 @@ public class ExceptionBuilderTest extends BaseTest {
private static final String RESOURCE_PATH = "__files/";
private static final String VALID_ERROR_MESSAGE = "{test error message}";
+
@Test
public void buildAndThrowWorkflowExceptionTest() {
try {
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/application-test.yaml b/bpmn/MSOCommonBPMN/src/test/resources/application-test.yaml
index 18f94f3b88..945972c9e2 100644
--- a/bpmn/MSOCommonBPMN/src/test/resources/application-test.yaml
+++ b/bpmn/MSOCommonBPMN/src/test/resources/application-test.yaml
@@ -84,7 +84,7 @@ mso:
callbackRetryAttempts: '5'
catalog:
db:
- endpoint: http://localhost:${wiremock.server.port}/
+ endpoint: http://localhost:${wiremock.server.port}/ecomp/mso/catalog
spring:
endpoint: http://localhost:${wiremock.server.port}
correlation:
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/vfModuleCount.xml b/bpmn/MSOCommonBPMN/src/test/resources/vfModuleCount.xml
new file mode 100644
index 0000000000..b7dee68a77
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/vfModuleCount.xml
@@ -0,0 +1,44 @@
+<vfModules>
+ <vf-module>
+ <module-index>0</module-index>
+ </vf-module>
+ <vf-module>
+ <module-index>1</module-index>
+ </vf-module>
+ <vf-module>
+ <module-index>2</module-index>
+ </vf-module>
+ <vf-module>
+ <module-index>3</module-index>
+ </vf-module>
+ <vf-module>
+ <module-index>4</module-index>
+ </vf-module>
+ <vf-module>
+ <module-index>5</module-index>
+ </vf-module>
+ <vf-module>
+ <module-index>6</module-index>
+ </vf-module>
+ <vf-module>
+ <module-index>7</module-index>
+ </vf-module>
+ <vf-module>
+ <module-index>8</module-index>
+ </vf-module>
+ <vf-module>
+ <module-index>9</module-index>
+ </vf-module>
+ <vf-module>
+ <module-index>10</module-index>
+ </vf-module>
+ <vf-module>
+ <module-index>11</module-index>
+ </vf-module>
+ <vf-module>
+ <module-index>12</module-index>
+ </vf-module>
+ <vf-module>
+ <module-index>13</module-index>
+ </vf-module>
+</vfModules> \ No newline at end of file
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/RollbackData.java b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/RollbackData.java
index 9c80548490..52207f2156 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/RollbackData.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/RollbackData.java
@@ -25,24 +25,26 @@ import java.util.HashMap;
import java.util.Map;
import java.util.stream.Collectors;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
/**
- * An object that stores data for rollbacks. Data is organized by type. A
- * type is simply a string identifier. Multiple types of data may be stored
- * in the same object for separate rollback operations.
+ * An object that stores data for rollbacks. Data is organized by type. A type is simply a string
+ * identifier. Multiple types of data may be stored in the same object for separate rollback
+ * operations.
*/
public class RollbackData implements Serializable {
private static final long serialVersionUID = 1L;
- private Map<String, Map<String, Serializable>> dictionary =
- new HashMap<>();
+ @JsonProperty
+ private final Map<String, Map<String, Serializable>> dictionary = new HashMap<>();
/**
* Returns true if the specified type is stored in this object.
*
* @param type the data type
*/
- public boolean hasType(String type) {
+ public boolean hasType(final String type) {
return dictionary.containsKey(type);
}
@@ -53,9 +55,8 @@ public class RollbackData implements Serializable {
* @param key the key
* @param value the value
*/
- public void put(String type, String key, String value) {
- Map<String, Serializable> mapForType = dictionary
- .computeIfAbsent(type, k -> new HashMap<>());
+ public void put(final String type, final String key, final String value) {
+ final Map<String, Serializable> mapForType = dictionary.computeIfAbsent(type, k -> new HashMap<>());
mapForType.put(key, value);
}
@@ -67,8 +68,8 @@ public class RollbackData implements Serializable {
* @param key the key
* @return the item or null if there is no item for the specified type and key
*/
- public Serializable get(String type, String key) {
- Map<String, Serializable> mapForType = dictionary.get(type);
+ public Serializable get(final String type, final String key) {
+ final Map<String, Serializable> mapForType = dictionary.get(type);
if (mapForType == null) {
return null;
@@ -83,7 +84,7 @@ public class RollbackData implements Serializable {
* @param type the data type
* @return a map, or null if there are no items associated with the specified data type
*/
- public Map<String, Serializable> get(String type) {
+ public Map<String, Serializable> get(final String type) {
return dictionary.get(type);
}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/AllottedResource.java b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/AllottedResource.java
index f143346cae..c7c7bba20c 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/AllottedResource.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/AllottedResource.java
@@ -22,6 +22,8 @@ package org.onap.so.bpmn.core.domain;
import java.util.UUID;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonRootName;
/**
@@ -55,6 +57,9 @@ public class AllottedResource extends Resource {
private String nfNamingCode;
private String orchestrationStatus;
+ @JsonIgnore
+ private String resourceInput;
+
/*
* GET and SET
*/
@@ -119,4 +124,13 @@ public class AllottedResource extends Resource {
public void setOrchestrationStatus(String orchestrationStatus) {
this.orchestrationStatus = orchestrationStatus;
}
+
+
+ public String getResourceInput() {
+ return resourceInput;
+ }
+
+ public void setResourceInput(String resourceInput) {
+ this.resourceInput = resourceInput;
+ }
} \ No newline at end of file
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/NetworkResource.java b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/NetworkResource.java
index 20ab3ecc84..f0e97f15ef 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/NetworkResource.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/NetworkResource.java
@@ -22,6 +22,8 @@ package org.onap.so.bpmn.core.domain;
import java.util.UUID;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonRootName;
@@ -47,7 +49,10 @@ public class NetworkResource extends Resource {
private String networkRole;
private String networkTechnology;
private String networkScope;
-
+
+ @JsonIgnore
+ private String resourceInput;
+
/*
* GET and SET
*/
@@ -75,4 +80,12 @@ public class NetworkResource extends Resource {
public void setNetworkScope(String networkScope) {
this.networkScope = networkScope;
}
+
+ public String getResourceInput() {
+ return resourceInput;
+ }
+
+ public void setResourceInput(String resourceInput) {
+ this.resourceInput = resourceInput;
+ }
} \ No newline at end of file
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ServiceInstance.java b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ServiceInstance.java
index 4295f50a3c..5cdbbcb7c9 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ServiceInstance.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ServiceInstance.java
@@ -23,6 +23,8 @@ package org.onap.so.bpmn.core.domain;
import java.io.Serializable;
import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonRootName;
/**
@@ -32,6 +34,7 @@ import com.fasterxml.jackson.annotation.JsonRootName;
* @author cb645j
*
*/
+@JsonIgnoreProperties(ignoreUnknown = true)
public class ServiceInstance extends JsonWrapper implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/VnfResource.java b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/VnfResource.java
index dc76ab0bc7..a7e5389583 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/VnfResource.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/VnfResource.java
@@ -25,6 +25,7 @@ import java.util.List;
import java.util.UUID;
import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonRootName;
@@ -59,6 +60,9 @@ public class VnfResource extends Resource {
private String multiStageDesign;
private String orchestrationStatus;
+ @JsonIgnore
+ private String resourceInput;
+
/*
* GET and SET
*/
@@ -123,6 +127,15 @@ public class VnfResource extends Resource {
public void setOrchestrationStatus(String orchestrationStatus){
this.orchestrationStatus = orchestrationStatus;
}
+
+ public String getResourceInput() {
+ return resourceInput;
+ }
+
+ public void setResourceInput(String resourceInput) {
+ this.resourceInput = resourceInput;
+ }
+
/**
* Returns a list of all VfModule objects.
* Base module is first entry in the list
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/json/JsonUtils.java b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/json/JsonUtils.java
index ee53148e44..35f76908e3 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/json/JsonUtils.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/json/JsonUtils.java
@@ -927,7 +927,7 @@ public class JsonUtils {
for (int i = 0; i < arr.length(); i++){
JSONObject jo = arr.getJSONObject(i);
String key = jo.getString(keyNode);
- String value = jo.getString(valueNode);
+ String value = jo.get(valueNode).toString();
map.put(key, value);
}
msoLogger.debug("Completed Entry Array To Map Util Method");
@@ -954,7 +954,7 @@ public class JsonUtils {
for(int i = 0; i < arr.length(); i++){
JSONObject jo = arr.getJSONObject(i);
String key = jo.getString(keyNode);
- String value = jo.getString(valueNode);
+ String value = jo.get(valueNode).toString();
map.put(key, value);
}
msoLogger.debug("Completed Entry Array To Map Util Method");
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/AllottedResourceTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/AllottedResourceTest.java
index b1dd8659cd..cca28d411f 100644
--- a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/AllottedResourceTest.java
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/AllottedResourceTest.java
@@ -21,8 +21,11 @@ package org.onap.so.bpmn.core.domain;
import static org.junit.Assert.*;
+import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.Test;
+import java.io.IOException;
+
public class AllottedResourceTest {
private AllottedResource ar = new AllottedResource();
@@ -51,4 +54,13 @@ public class AllottedResourceTest {
}
+ @Test
+ public void allottedResourceMapperTest() throws IOException {
+ String jsonStr = "{\"allottedResourceType\": \"code123\", \"resourceInput\": \"sample\"}";
+ ObjectMapper objectMapper = new ObjectMapper();
+ AllottedResource vnfResource = objectMapper.readValue(jsonStr, AllottedResource.class);
+
+ assertTrue(vnfResource != null);
+ }
+
}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/NetworkResourceTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/NetworkResourceTest.java
index 6ca9cef8d2..ee23ebd438 100644
--- a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/NetworkResourceTest.java
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/NetworkResourceTest.java
@@ -21,8 +21,11 @@ package org.onap.so.bpmn.core.domain;
import static org.junit.Assert.*;
+import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.Test;
+import java.io.IOException;
+
public class NetworkResourceTest {
private NetworkResource nr = new NetworkResource();
@@ -39,4 +42,13 @@ public class NetworkResourceTest {
}
+ @Test
+ public void networkResourceMapperTest() throws IOException {
+ String jsonStr = "{\"networkScope\": \"code123\", \"resourceInput\": \"sample\"}";
+ ObjectMapper objectMapper = new ObjectMapper();
+ NetworkResource networkResource = objectMapper.readValue(jsonStr, NetworkResource.class);
+
+ assertTrue(networkResource != null);
+ }
+
}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/ServiceInstanceTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/ServiceInstanceTest.java
index 7cacc9da88..c04dc9d601 100644
--- a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/ServiceInstanceTest.java
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/ServiceInstanceTest.java
@@ -21,8 +21,10 @@ package org.onap.so.bpmn.core.domain;
import static org.junit.Assert.*;
+import java.io.IOException;
import java.util.Map;
+import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.Test;
public class ServiceInstanceTest {
@@ -58,4 +60,12 @@ public class ServiceInstanceTest {
}
+ @Test
+ public void serviceInstanceMapperTest() throws IOException {
+ String jsonStr = "{\"workloadContext\": \"code123\", \"resourceOrder\": \"sample\"}";
+ ObjectMapper objectMapper = new ObjectMapper();
+ ServiceInstance serviceInstance = objectMapper.readValue(jsonStr, ServiceInstance.class);
+ assertTrue(serviceInstance != null);
+ }
+
}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/VnfResourceTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/VnfResourceTest.java
index 24947e9a8d..a83337fc5b 100644
--- a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/VnfResourceTest.java
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/VnfResourceTest.java
@@ -21,8 +21,10 @@ package org.onap.so.bpmn.core.domain;
import static org.junit.Assert.*;
+import java.io.IOException;
import java.util.List;
+import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.Test;
public class VnfResourceTest {
@@ -52,4 +54,13 @@ public class VnfResourceTest {
}
+ @Test
+ public void vnfResourceMapperTest() throws IOException {
+ String jsonStr = "{\"vnfHostname\": \"home\", \"resourceInput\": \"sample\"}";
+ ObjectMapper objectMapper = new ObjectMapper();
+ VnfResource vnfResource = objectMapper.readValue(jsonStr, VnfResource.class);
+
+ assertTrue(vnfResource != null);
+ }
+
}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/json/JsonUtilsTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/json/JsonUtilsTest.java
index 6748128f05..067ae9806d 100644
--- a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/json/JsonUtilsTest.java
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/json/JsonUtilsTest.java
@@ -81,7 +81,19 @@ public class JsonUtilsTest {
JSONArray assignmentInfo = homingDataJson.getJSONArray("assignmentInfo");
Map<String, String> map = utils.entryArrayToMap(assignmentInfo.toString(), "variableName", "variableValue");
assertEquals(map.get("cloudOwner"), "CloudOwner");
- }
+ }
+ @Test
+ public void entryArrayToMapStringTestOof() throws IOException {
+ JsonUtils utils = new JsonUtils();
+ String response = this.getJson("OofExample.json");
+ String entry = JsonUtils.getJsonValue(response, "solutions.placementSolutions");
+ JSONArray arr = new JSONArray(entry);
+ JSONArray arr2 = arr.getJSONArray(0);
+ JSONObject homingDataJson = arr2.getJSONObject(0);
+ JSONArray assignmentInfo = homingDataJson.getJSONArray("assignmentInfo");
+ Map<String, String> map = utils.entryArrayToMap(assignmentInfo.toString(), "key", "value");
+ assertEquals(map.get("cloudOwner"), "HPA-cloud");
+ }
@Test
public void getJsonRootPropertyTest() throws IOException {
String response = this.getJson("SDNCServiceResponseExample.json");
diff --git a/bpmn/MSOCoreBPMN/src/test/resources/json-examples/OofExample.json b/bpmn/MSOCoreBPMN/src/test/resources/json-examples/OofExample.json
new file mode 100644
index 0000000000..127748a5e8
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/resources/json-examples/OofExample.json
@@ -0,0 +1,110 @@
+{
+ "requestStatus":"completed",
+ "statusMessage":"",
+ "solutions":{
+ "placementSolutions":[
+ [
+ {
+ "serviceResourceId":"78976677-bca7-446a-8b31-52b83e9aa925",
+ "resourceModuleName":"7400fd06C75f4a44A68f",
+ "solution":{
+ "identifierType":"cloudRegionId",
+ "cloudOwner":"HPA-cloud",
+ "identifiers":[
+ "Cloud-region3"
+ ]
+ },
+ "assignmentInfo":[
+ {
+ "value":"false",
+ "key":"isRehome"
+ },
+ {
+ "value":"att_aic",
+ "key":"locationType"
+ },
+ {
+ "value":"Cloud-region3",
+ "key":"locationId"
+ },
+ {
+ "value":{
+ "directives":[
+ {
+ "directives":[
+ {
+ "attributes":[
+ {
+ "attribute_value":"Flavor31",
+ "attribute_name":"label_1"
+ }
+ ],
+ "type":"flavor_directives"
+ },
+ {
+ "attributes":[
+ {
+ "attribute_value":"direct",
+ "attribute_name":"oof_returned_vnic_type_for_firewall_protected"
+ }
+ ],
+ "type":"sriovNICNetwork_directives"
+ }
+ ],
+ "type":"vnfc",
+ "id":"vfw_1"
+ },
+ {
+ "directives":[
+ {
+ "attributes":[
+ {
+ "attribute_value":"Flavor32",
+ "attribute_name":"label_2"
+ }
+ ],
+ "type":"flavor_directives"
+ }
+ ],
+ "type":"vnfc",
+ "id":"vfw_2"
+ },
+ {
+ "directives":[
+ {
+ "attributes":[
+ {
+ "attribute_value":"Flavor32",
+ "attribute_name":"label_3"
+ }
+ ],
+ "type":"flavor_directives"
+ }
+ ],
+ "type":"vnfc",
+ "id":"vfw_3"
+ }
+ ]
+ },
+ "key":"oof_directives"
+ },
+ {
+ "value":"DLLSTX233",
+ "key":"cloudClli"
+ },
+ {
+ "value":"75919",
+ "key":"aic_version"
+ },
+ {
+ "value":"HPA-cloud",
+ "key":"cloudOwner"
+ }
+ ]
+ }
+ ]
+ ]
+ },
+ "transactionId":"",
+ "requestId":"05da4f90-15f7-4128-8ac4-e06dc3cc06f9"
+} \ No newline at end of file
diff --git a/bpmn/mso-infrastructure-bpmn/pom.xml b/bpmn/mso-infrastructure-bpmn/pom.xml
index fb5d0108ba..5d0d05df92 100644
--- a/bpmn/mso-infrastructure-bpmn/pom.xml
+++ b/bpmn/mso-infrastructure-bpmn/pom.xml
@@ -164,6 +164,11 @@
<version>${camunda.springboot.version}</version>
</dependency>
<dependency>
+ <groupId>org.camunda.bpm.springboot</groupId>
+ <artifactId>camunda-bpm-spring-boot-starter-webapp</artifactId>
+ <version>2.3.0</version>
+ </dependency>
+ <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/WorkflowActionBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/WorkflowActionBB.bpmn
index a389e8077b..81d3226037 100644
--- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/WorkflowActionBB.bpmn
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/WorkflowActionBB.bpmn
@@ -562,4 +562,4 @@
</bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
-</bpmn:definitions> \ No newline at end of file
+</bpmn:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateSDNCNetworkResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateSDNCNetworkResource.groovy
index b912b64145..a8da95aa7c 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateSDNCNetworkResource.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateSDNCNetworkResource.groovy
@@ -53,7 +53,6 @@ public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor {
MsoUtils msoUtils = new MsoUtils()
public void preProcessRequest(DelegateExecution execution) {
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
msoLogger.info(" ***** Started preProcessRequest *****")
try {
@@ -64,7 +63,7 @@ public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor {
String resourceInput = execution.getVariable("resourceInput")
//Get ResourceInput Object
ResourceInput resourceInputObj = ResourceRequestBuilder.getJsonObject(resourceInput, ResourceInput.class)
- execution.setVariable(Prefix + "resourceInput", resourceInputObj)
+ execution.setVariable(Prefix + "resourceInput", resourceInputObj.toString())
//Deal with recipeParams
String recipeParamsFromWf = execution.getVariable("recipeParamXsd")
@@ -125,8 +124,8 @@ public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor {
} catch (BpmnError e) {
throw e;
} catch (Exception ex){
- msg = "Exception in preProcessRequest " + ex.getMessage()
- msoLogger.debug( msg)
+ String msg = "Exception in preProcessRequest " + ex.getMessage()
+ msoLogger.debug(msg)
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
}
@@ -398,7 +397,7 @@ public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor {
} catch (Exception ex) {
String exceptionMessage = " Bpmn error encountered in CreateSDNCCNetworkResource flow. prepareSDNCRequest() - " + ex.getMessage()
- msoLogger.debug( exceptionMessage)
+ msoLogger.debug(exceptionMessage)
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
}
@@ -415,21 +414,21 @@ public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor {
}
public void sendSyncResponse(DelegateExecution execution) {
- msoLogger.dubug(" *** sendSyncResponse *** ")
+ msoLogger.info("started sendsyncResp")
try {
String operationStatus = "finished"
// RESTResponse for main flow
String resourceOperationResp = """{"operationStatus":"${operationStatus}"}""".trim()
- msoLogger.dubug(" sendSyncResponse to APIH:" + "\n" + resourceOperationResp)
+ msoLogger.debug(" sendSyncResponse to APIH:" + "\n" + resourceOperationResp)
sendWorkflowResponse(execution, 202, resourceOperationResp)
execution.setVariable("sentSyncResponse", true)
} catch (Exception ex) {
String msg = "Exception in sendSyncResponse:" + ex.getMessage()
- msoLogger.debug( msg)
+ msoLogger.debug(msg)
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
- msoLogger.dubug(" ***** Exit sendSyncResponse *****")
+ msoLogger.info("exited send sync Resp")
}
} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy
index 6ef446b490..02ae6a6f48 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy
@@ -302,7 +302,7 @@ public class CreateCustomE2EServiceInstance extends AbstractServiceTaskProcessor
xmlns:ns="http://org.onap.so/requestsdb">
<soapenv:Header/>
<soapenv:Body>
- <ns:updateServiceOperationStatus xmlns:ns="http://org.onap.so/requestsdb">
+ <ns:initServiceOperationStatus xmlns:ns="http://org.onap.so/requestsdb">
<serviceId>${MsoUtils.xmlEscape(serviceId)}</serviceId>
<operationId>${MsoUtils.xmlEscape(operationId)}</operationId>
<operationType>${MsoUtils.xmlEscape(operationType)}</operationType>
@@ -311,7 +311,7 @@ public class CreateCustomE2EServiceInstance extends AbstractServiceTaskProcessor
<operationContent>${MsoUtils.xmlEscape(operationContent)}</operationContent>
<progress>${MsoUtils.xmlEscape(progress)}</progress>
<reason>${MsoUtils.xmlEscape(reason)}</reason>
- </ns:updateServiceOperationStatus>
+ </ns:initServiceOperationStatus>
</soapenv:Body>
</soapenv:Envelope>"""
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateGenericALaCarteServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateGenericALaCarteServiceInstance.groovy
index 9763960bfd..848785e5f3 100755
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateGenericALaCarteServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateGenericALaCarteServiceInstance.groovy
@@ -165,6 +165,10 @@ public class CreateGenericALaCarteServiceInstance extends AbstractServiceTaskPro
msoLogger.debug("User Input Parameter " + userParam.name + ": " + userParam.value.toString())
inputMap.put(userParam.name, userParam.value)
}
+ if ("Orchestrator".equalsIgnoreCase(userParam?.name)) {
+ execution.setVariable("orchestrator", userParam.value)
+ inputMap.put("orchestrator", userParam.value)
+ }
}
}
@@ -344,6 +348,10 @@ public class CreateGenericALaCarteServiceInstance extends AbstractServiceTaskPro
msoLogger.debug("User Input Parameter " + userParam.name + ": " + userParam.value.toString())
inputMap.put(userParam.name, userParam.value)
}
+ if ("Orchestrator".equalsIgnoreCase(userParam?.name)) {
+ execution.setVariable("orchestrator", userParam.value)
+ inputMap.put("orchestrator", userParam.value)
+ }
}
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy
index b2c278b64c..9301f3d508 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy
@@ -203,7 +203,7 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor {
uResourceInput = jsonUtil.addJsonValue(uResourceInput, "requestInputs.access-ltp-id", inputParameters.get("local-access-ltp-id"))
uResourceInput = jsonUtil.addJsonValue(uResourceInput, "requestInputs.access-node-id", inputParameters.get("local-access-node-id"))
resourceInputObj.setResourceParameters(uResourceInput)
- execution.setVariable(Prefix + "resourceInput", resourceInputObj)
+ execution.setVariable(Prefix + "resourceInput", resourceInputObj.toString())
}
break
@@ -539,10 +539,7 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor {
private def getInstnaceId(DelegateExecution execution) {
def response = new XmlSlurper().parseText(execution.getVariable("CRENWKI_createSDNCResponse"))
- def data = response.toString()
- data = data.substring(data.indexOf("<"))
- def resp = new XmlSlurper().parseText(data)
ResourceInput resourceInputObj = ResourceRequestBuilder.getJsonObject(execution.getVariable(Prefix + "resourceInput"), ResourceInput.class)
String modelName = resourceInputObj.getResourceModelInfo().getModelName()
def val = ""
@@ -551,17 +548,17 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor {
case ~/[\w\s\W]*deviceVF[\w\s\W]*/ :
case ~/[\w\s\W]*SiteWANVF[\w\s\W]*/ :
case ~/[\w\s\W]*Site[\w\s\W]*/:
- val = resp."vnf-response-information"."instance-id"
+ val = response."response-data"."RequestData"."output"."vnf-response-information"."instance-id"
break
case ~/[\w\s\W]*sdwanvpnattachment[\w\s\W]*/ :
case ~/[\w\s\W]*sotnvpnattachment[\w\s\W]*/:
- val = resp."connection-attachment-response-information"."instance-id"
+ val = response."response-data"."RequestData"."output"."connection-attachment-response-information"."instance-id"
break
// for SDWANConnectivity and SOTNConnectivity and default:
default:
- val = resp."network-response-information"."instance-id"
+ val = response."response-data"."RequestData"."output"."network-response-information"."instance-id"
break
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateResources.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateResources.groovy
index aa1eed95bb..6096f16b18 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateResources.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateResources.groovy
@@ -104,7 +104,7 @@ public class DoCreateResources extends AbstractServiceTaskProcessor{
// get Sequence from csar(model)
if(resourceSequence == null) {
- resourceSequence = ResourceRequestBuilder.getResourceSequence(execution, serviceModelUuid)
+ resourceSequence = ResourceRequestBuilder.getResourceSequence(serviceModelUuid)
msoLogger.info("Get Sequence from csar : " + resourceSequence)
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy
index 1d3d3331ef..53e3525036 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy
@@ -41,10 +41,12 @@ import org.onap.so.bpmn.common.scripts.MsoUtils
import org.onap.so.bpmn.common.scripts.NetworkUtils
import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
import org.onap.so.bpmn.common.scripts.VfModuleBase
+import org.onap.so.bpmn.common.util.OofInfraUtils
import org.onap.so.bpmn.core.RollbackData
import org.onap.so.bpmn.core.UrnPropertiesReader
import org.onap.so.bpmn.core.WorkflowException
import org.onap.so.bpmn.core.domain.VnfResource
+import org.onap.so.bpmn.core.json.DecomposeJsonUtil
import org.onap.so.bpmn.core.json.JsonUtils
import org.onap.so.client.HttpClient
import org.onap.so.client.aai.AAIObjectPlurals
@@ -56,6 +58,7 @@ import org.onap.so.client.aai.entities.uri.AAIUri
import org.onap.so.client.aai.entities.uri.AAIUriFactory;
import org.onap.so.client.graphinventory.entities.uri.Depth
import org.onap.so.constants.Defaults
+import org.onap.so.db.catalog.beans.HomingInstance
import org.onap.so.logger.MessageEnum
import org.onap.so.logger.MsoLogger
@@ -78,7 +81,9 @@ public class DoCreateVfModule extends VfModuleBase {
ExceptionUtil exceptionUtil = new ExceptionUtil()
JsonUtils jsonUtil = new JsonUtils()
SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ OofInfraUtils oofInfraUtils = new OofInfraUtils()
CatalogDbUtils catalogDbUtils = new CatalogDbUtilsFactory().create()
+ DecomposeJsonUtil decomposeJsonUtils = new DecomposeJsonUtil()
private final HttpClientFactory httpClientFactory = new HttpClientFactory()
/**
@@ -235,12 +240,37 @@ public class DoCreateVfModule extends VfModuleBase {
String globalSubscriberId = execution.getVariable("globalSubscriberId")
execution.setVariable("DCVFM_globalSubscriberId", globalSubscriberId)
msoLogger.debug("globalSubsrciberId: " + globalSubscriberId)
- //OofDirectives
- String oofDirectives = execution.getVariable("oofDirectives")
+
+ // Set Homing Info
+ String oofDirectives = null
+ try {
+ HomingInstance homingInstance = oofInfraUtils.getHomingInstance(serviceInstanceId, execution)
+ if (homingInstance != null) {
+ execution.setVariable("DCVFM_cloudSiteId", homingInstance.getCloudRegionId())
+ rollbackData.put("VFMODULE", "aiccloudregion", homingInstance.getCloudRegionId())
+ msoLogger.debug("Overwriting cloudSiteId with homing cloudSiteId: " +
+ homingInstance.getCloudRegionId())
+ execution.setVariable("DCVFM_cloudOwner", homingInstance.getCloudOwner())
+ rollbackData.put("VFMODULE", "cloudOwner", homingInstance.getCloudOwner())
+ msoLogger.debug("Overwriting cloudOwner with homing cloudOwner: " +
+ homingInstance.getCloudOwner())
+ oofDirectives = homingInstance.getOofDirectives()
+ execution.setVariable("DCVFM_oofDirectives", oofDirectives)
+ }
+ } catch (Exception exception) {
+ msoLogger.debug("Could not find homing information for service instance: " + serviceInstanceId +
+ "... continuing")
+ msoLogger.debug("Could not find homing information for service instance error: " + exception)
+ }
+ //OofDirectives to Input Params
Map<String,String> vfModuleInputParams = execution.getVariable("vfModuleInputParams")
- if (oofDirectives != null) {
- vfModuleInputParams.put("oofDirectives", oofDirectives)
- logDebug("OofDirectives are: " + oofDirectives, isDebugLogEnabled)
+ if (oofDirectives != null && vfModuleInputParams != null) {
+ vfModuleInputParams.put("oof_directives", oofDirectives)
+ vfModuleInputParams.put("sdnc_directives", "{}")
+ msoLogger.debug("OofDirectives are: " + oofDirectives)
+ } else if (vfModuleInputParams != null) {
+ vfModuleInputParams.put("oof_directives", "{}")
+ vfModuleInputParams.put("sdnc_directives", "{}")
}
if (vfModuleInputParams != null) {
execution.setVariable("DCVFM_vnfParamsMap", vfModuleInputParams)
@@ -467,11 +497,30 @@ public class DoCreateVfModule extends VfModuleBase {
}
//OofDirectives
- String oofDirectives = execution.getVariable("oofDirectives")
+ String oofDirectives = null
+ try {
+ HomingInstance homingInstance = oofInfraUtils.getHomingInstance(serviceInstanceId, execution)
+ if (homingInstance != null) {
+ execution.setVariable("DCVFM_cloudSiteId", homingInstance.getCloudRegionId())
+ rollbackData.put("VFMODULE", "aiccloudregion", homingInstance.getCloudRegionId())
+ msoLogger.debug("Overwriting cloudSiteId with homing cloudSiteId: " +
+ homingInstance.getCloudRegionId())
+ execution.setVariable("DCVFM_cloudOwner", homingInstance.getCloudOwner())
+ rollbackData.put("VFMODULE", "cloudOwner", homingInstance.getCloudOwner())
+ msoLogger.debug("Overwriting cloudOwner with homing cloudOwner: " +
+ homingInstance.getCloudOwner())
+ oofDirectives = homingInstance.getOofDirectives()
+ execution.setVariable("DCVFM_oofDirectives", oofDirectives)
+ }
+ } catch (Exception exception) {
+ msoLogger.debug("Could not find homing information for service instance: " + serviceInstanceId +
+ "... continuing")
+ msoLogger.debug("Could not find homing information for service instance error: " + exception)
+ }
if (oofDirectives != null) {
Map<String, String> paramsMap = execution.getVariable("DCVFM_vnfParamsMap")
paramsMap.put("oofDirectives", oofDirectives)
- logDebug("OofDirectives are: " + oofDirectives, isDebugLogEnabled)
+ msoLogger.debug("OofDirectives are: " + oofDirectives)
execution.setVariable("DCVFM_vnfParamsMap", paramsMap)
}
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy
index b35aab1176..deb0bffaf9 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy
@@ -20,6 +20,8 @@
package org.onap.so.bpmn.infrastructure.scripts
+import org.onap.so.db.catalog.beans.HomingInstance
+
import static org.apache.commons.lang3.StringUtils.*
import org.camunda.bpm.engine.delegate.BpmnError
@@ -31,6 +33,7 @@ import org.onap.so.bpmn.common.scripts.ExceptionUtil
import org.onap.so.bpmn.common.scripts.MsoUtils
import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
import org.onap.so.bpmn.common.scripts.VidUtils
+import org.onap.so.bpmn.common.util.OofInfraUtils
import org.onap.so.bpmn.core.RollbackData
import org.onap.so.bpmn.core.UrnPropertiesReader
import org.onap.so.bpmn.core.WorkflowException
@@ -61,6 +64,7 @@ class DoCreateVnf extends AbstractServiceTaskProcessor {
JsonUtils jsonUtil = new JsonUtils()
VidUtils vidUtils = new VidUtils(this)
SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ OofInfraUtils oofInfraUtils = new OofInfraUtils()
/**
* This method gets and validates the incoming
@@ -238,6 +242,21 @@ class DoCreateVnf extends AbstractServiceTaskProcessor {
execution.setVariable("DoCVNF_nfFunction", nfFunction)
msoLogger.debug("NF Function is: " + nfFunction)
+ // Set Homing Info
+ try {
+ HomingInstance homingInstance = oofInfraUtils.getHomingInstance(serviceInstanceId, execution)
+ if (homingInstance != null) {
+ execution.setVariable("DoCVNF_cloudSiteId", homingInstance.getCloudRegionId())
+ rollbackData.put("VNF", "cloudSiteId", homingInstance.getCloudRegionId())
+ msoLogger.debug("Overwriting cloudSiteId with homing cloudSiteId: " +
+ homingInstance.getCloudRegionId())
+ }
+ } catch (Exception exception) {
+ msoLogger.debug("Could not find homing information for service instance: " + serviceInstanceId +
+ "... continuing")
+ msoLogger.debug("Could not find homing information for service instance error: " + exception)
+ }
+
rollbackData.put("VNF", "rollbackSDNCAssign", "false")
rollbackData.put("VNF", "rollbackSDNCActivate", "false")
rollbackData.put("VNF", "rollbackVnfCreate", "false")
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfAndModules.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfAndModules.groovy
index 232336b0ee..88e7b34dcd 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfAndModules.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfAndModules.groovy
@@ -118,7 +118,10 @@ class DoCreateVnfAndModules extends AbstractServiceTaskProcessor {
}
}
execution.setVariable("vnfId", vnfId)
-
+
+ Map<String,String> vfModuleNames = execution.getVariable("vfModuleNames")
+ msoLogger.debug("Incoming vfModuleNames: " + vfModuleNames)
+
// Set aLaCarte to false
execution.setVariable("aLaCarte", false)
@@ -137,9 +140,17 @@ class DoCreateVnfAndModules extends AbstractServiceTaskProcessor {
rollbackData.put("VNFANDMODULES", "numOfCreatedAddOnModules", "0")
execution.setVariable("rollbackData", rollbackData)
- sleep (20000)
+ String delayMS = execution.getVariable("delayMS")
+ long longDelayMS = 20000;
+ if (delayMS != null && !delayMS.isEmpty()) {
+ longDelayMS = Long.parseLong(delayMS);
+ }
+ if (longDelayMS > 0) {
+ msoLogger.debug("Delaying workflow " + longDelayMS + "ms");
+ sleep(longDelayMS)
+ }
}catch(BpmnError b){
msoLogger.debug("Rethrowing MSOWorkflowException")
throw b
@@ -151,7 +162,6 @@ class DoCreateVnfAndModules extends AbstractServiceTaskProcessor {
msoLogger.trace("COMPLETED DoCreateVnfAndModules PreProcessRequest Process")
}
-
public void queryCatalogDB (DelegateExecution execution) {
execution.setVariable("prefix",Prefix)
@@ -159,8 +169,8 @@ class DoCreateVnfAndModules extends AbstractServiceTaskProcessor {
msoLogger.trace("STARTED DoCreateVnfAndModules QueryCatalogDB Process")
try {
VnfResource vnf = null
- ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
// if serviceDecomposition is specified, get info from serviceDecomposition
+ ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
if (serviceDecomposition != null) {
msoLogger.debug("Getting Catalog DB data from ServiceDecomposition object: " + serviceDecomposition.toJsonString())
List<VnfResource> vnfs = serviceDecomposition.getVnfResources()
@@ -208,6 +218,7 @@ class DoCreateVnfAndModules extends AbstractServiceTaskProcessor {
}
ModuleResource baseVfModule = null
+ Map<String,String> vfModuleNames = execution.getVariable("vfModuleNames")
for (int i = 0; i < vfModules.size; i++) {
msoLogger.debug("handling VF Module ")
@@ -222,6 +233,8 @@ class DoCreateVnfAndModules extends AbstractServiceTaskProcessor {
execution.setVariable("baseVfModuleLabel", baseVfModuleLabel)
String basePersonaModelId = baseVfModuleModelInfoObject.getModelInvariantUuid()
execution.setVariable("basePersonaModelId", basePersonaModelId)
+ String baseVfModuleName = getPredefinedVfModuleName(execution, basePersonaModelId)
+ execution.setVariable("baseVfModuleName", baseVfModuleName)
baseVfModule = vfModule
break
}
@@ -284,6 +297,8 @@ class DoCreateVnfAndModules extends AbstractServiceTaskProcessor {
execution.setVariable("addOnVfModuleLabel", addOnVfModuleLabel)
String addOnPersonaModelId = addOnVfModuleModelInfoObject.getModelInvariantUuid()
execution.setVariable("addOnPersonaModelId", addOnPersonaModelId)
+ String addOnVfModuleName = getPredefinedVfModuleName(execution, addOnPersonaModelId)
+ execution.setVariable("addOnVfModuleName", addOnVfModuleName)
int addOnInitialCount = addOnModule.getInitialCount()
execution.setVariable("initialCount", addOnInitialCount)
@@ -460,5 +475,19 @@ class DoCreateVnfAndModules extends AbstractServiceTaskProcessor {
msoLogger.trace("Exit createLineOfBusiness")
}
+ public String getPredefinedVfModuleName(DelegateExecution execution, String vfModuleModelInvariantUuid) {
+ Map<String,String> vfModuleNames = execution.getVariable("vfModuleNames")
+
+ if (vfModuleNames == null) {
+ return null
+ }
+
+ String vfModuleName = vfModuleNames.get(vfModuleModelInvariantUuid)
-} \ No newline at end of file
+ if (vfModuleName != null) {
+ msoLogger.debug("Using vfModuleName='" + vfModuleName + "' for vfModuleModelInvariantUuid=" + vfModuleModelInvariantUuid)
+ }
+
+ return vfModuleName
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVFCNetworkServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVFCNetworkServiceInstance.groovy
index 6109d8631f..7c8a1d70e1 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVFCNetworkServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVFCNetworkServiceInstance.groovy
@@ -149,7 +149,7 @@ public class DoDeleteVFCNetworkServiceInstance extends AbstractServiceTaskProces
}
/**
- * instantiate NS task
+ * terminate NS task
*/
public void terminateNetworkService(DelegateExecution execution) {
@@ -247,19 +247,19 @@ public class DoDeleteVFCNetworkServiceInstance extends AbstractServiceTaskProces
msoLogger.trace("Started Execute VFC adapter Delete Process ")
msoLogger.info("url:"+url +"\nrequestBody:"+ requestBody)
- Response r
+ Response r
try{
- URL Url = new URL(url)
+ URL Url = new URL(url)
// Get the Basic Auth credentials for the VFCAdapter, username is 'bpel', auth is '07a7159d3bf51a0e53be7a8f89699be7'
// user 'bepl' authHeader is the same with mso.db.auth
String basicAuthValuedb = UrnPropertiesReader.getVariable("mso.db.auth", execution)
HttpClient httpClient = httpClientFactory.newJsonClient(url, TargetEntity.VNF_ADAPTER)
httpClient.addAdditionalHeader("Accept", "application/json")
httpClient.addAdditionalHeader("Authorization", basicAuthValuedb)
-
- r = httpClient.delete(requestBody)
-
+ httpClient.addAdditionalHeader("Content-Type", "application/json")
+ r = httpClient.delete(requestBody)
+
msoLogger.trace("Completed Execute VF-C adapter Delete Process ")
}catch(Exception e){
msoLogger.error("Exception occured while executing VF-C Post Call. Exception is: \n" + e.getMessage());
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy
index a8e3b2040b..13d5aad2b0 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy
@@ -97,7 +97,7 @@ public class CreateVcpeResCustService extends AbstractServiceTaskProcessor {
InitializeProcessVariables(execution)
//Config Inputs
- String aaiDistDelay = UrnPropertiesReader.getVariable("aai.workflowAaiDistributionDelay")
+ String aaiDistDelay = UrnPropertiesReader.getVariable("aai.workflowAaiDistributionDelay", execution)
if (isBlank(aaiDistDelay)) {
String msg = "workflowAaiDistributionDelay is null"
msoLogger.debug(msg)
@@ -209,14 +209,13 @@ public class CreateVcpeResCustService extends AbstractServiceTaskProcessor {
def userParams = reqMap.requestDetails?.requestParameters?.userParams
Map<String, String> inputMap = [:]
- if (userParams) {
+ if (userParams) {
userParams.each {
- userParam ->
+ userParam ->
if ("Customer_Location".equals(userParam?.name)) {
Map<String, String> customerMap = [:]
userParam.value.each {
param ->
-
inputMap.put(param.key, param.value)
customerMap.put(param.key, param.value)
}
@@ -238,7 +237,7 @@ public class CreateVcpeResCustService extends AbstractServiceTaskProcessor {
param.getClass() , isDebugEnabled)
}
execution.setVariable("homingModelIds", modelIdLst)
- }
+ }
if ("BRG_WAN_MAC_Address".equals(userParam?.name)) {
execution.setVariable("brgWanMacAddress", userParam.value)
inputMap.put("BRG_WAN_MAC_Address", userParam.value)
@@ -247,7 +246,34 @@ public class CreateVcpeResCustService extends AbstractServiceTaskProcessor {
execution.setVariable("homingService", userParam.value)
execution.setVariable("callHoming", true)
inputMap.put("Homing_Solution", userParam.value)
- }
+ }
+ if ("Orchestrator".equalsIgnoreCase(userParam?.name)) {
+ execution.setVariable("orchestrator", userParam.value)
+ inputMap.put("orchestrator", userParam.value)
+ }
+ if ("VfModuleNames".equals(userParam?.name)) {
+ utils.log("DEBUG", "VfModuleNames: " + userParam.value.toString(), isDebugEnabled)
+ def vfModuleNames = [:]
+ userParam.value.each {
+ entry ->
+ String vfModuleModelInvariantUuid = null;
+ String vfModuleName = null;
+ entry.each {
+ param ->
+ if ("VfModuleModelInvariantUuid".equals(param.key)) {
+ vfModuleModelInvariantUuid = param.value;
+ } else if ("VfModuleName".equals(param.key)) {
+ vfModuleName = param.value;
+ }
+ }
+
+ if (vfModuleModelInvariantUuid != null && !vfModuleModelInvariantUuid.isEmpty() && vfModuleName != null && !vfModuleName.isEmpty()) {
+ vfModuleNames.put(vfModuleModelInvariantUuid, vfModuleName)
+ utils.log("DEBUG", "VfModuleModelInvariantUuid: " + vfModuleModelInvariantUuid + " VfModuleName: " + vfModuleName, isDebugEnabled)
+ }
+ }
+ execution.setVariable("vfModuleNames", vfModuleNames)
+ }
}
}
@@ -257,7 +283,7 @@ public class CreateVcpeResCustService extends AbstractServiceTaskProcessor {
}
msoLogger.debug("User Input Parameters map: " + userParams.toString())
- execution.setVariable("serviceInputParams", inputMap)
+ execution.setVariable("serviceInputParams", inputMap) // DOES NOT SEEM TO BE USED
msoLogger.debug("Incoming brgWanMacAddress is: " + execution.getVariable('brgWanMacAddress'))
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputs.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputs.java
index e9b0bc77b2..c1ddf2e04e 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputs.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputs.java
@@ -27,7 +27,6 @@ import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableName
import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.TIMEOUT_FOR_NOTIFICATION;
import com.google.common.base.Strings;
-import java.util.regex.Pattern;
import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.camunda.bpm.engine.delegate.JavaDelegate;
import org.onap.so.bpmn.common.scripts.ExceptionUtil;
@@ -39,8 +38,7 @@ import org.springframework.stereotype.Component;
@Component
public class PnfCheckInputs implements JavaDelegate {
- private static final Pattern UUID_PATTERN = Pattern
- .compile("(?i)^[0-9a-f]{8}-[0-9a-f]{4}-[1-5]{1}[0-9a-f]{3}-[89ab]{1}[0-9a-f]{3}-[0-9a-f]{12}$");
+ public static final String UUID_REGEX = "(?i)^[0-9a-f]{8}-[0-9a-f]{4}-[1-5]{1}[0-9a-f]{3}-[89ab]{1}[0-9a-f]{3}-[0-9a-f]{12}$";
private static MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.GENERAL, PnfCheckInputs.class);
private String defaultTimeout;
@@ -69,7 +67,7 @@ public class PnfCheckInputs implements JavaDelegate {
if (Strings.isNullOrEmpty(pnfUuid)) {
new ExceptionUtil().buildAndThrowWorkflowException(execution, 9999, "pnfUuid variable not defined");
}
- if (!UUID_PATTERN.matcher(pnfUuid).matches()) {
+ if (!pnfUuid.matches(UUID_REGEX)) {
new ExceptionUtil().buildAndThrowWorkflowException(execution, 9999, "pnfUuid is not a valid UUID");
}
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/properties/BPMNProperties.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/properties/BPMNProperties.java
index 60f109a81f..0d7c4abeee 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/properties/BPMNProperties.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/properties/BPMNProperties.java
@@ -21,6 +21,7 @@ package org.onap.so.bpmn.infrastructure.properties;
import java.util.Arrays;
import java.util.List;
+import org.onap.so.bpmn.core.UrnPropertiesReader;
import org.onap.so.bpmn.core.UrnPropertiesReader;
import org.onap.so.logger.MsoLogger;
@@ -37,7 +38,7 @@ public class BPMNProperties {
}
public static List<String> getResourceSequenceProp(String input) {
- String resourceSequence = getProperty("mso.workflow.custom." + input + ".resource.sequence", null);
+ String resourceSequence = UrnPropertiesReader.getVariable("mso.workflow.custom."+ input + ".resource.sequence");
if (resourceSequence != null) {
return Arrays.asList(resourceSequence.split(","));
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/service/ServicePluginFactory.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/service/ServicePluginFactory.java
index ac341886ba..48c78632dd 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/service/ServicePluginFactory.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/service/ServicePluginFactory.java
@@ -430,14 +430,19 @@ public class ServicePluginFactory {
Map<String, String> keys = uri.getURIKeys();
String uriString = uri.build().toString();
- AAIResourceUri parent = AAIUriFactory.createResourceUri(AAIObjectType.PNF, keys.get("pnf-name"));
-
- AAIResultWrapper wrapper = client.get(parent);
- Optional<Relationships> optRelationships = wrapper.getRelationships();
- if (optRelationships.isPresent()) {
- Relationships relationships = optRelationships.get();
-
- return !relationships.getRelatedAAIUris(AAIObjectType.EXT_AAI_NETWORK).isEmpty();
+
+ if (uriString != null) {
+ // get the pnfname
+ String[] token = uriString.split("/");
+ AAIResourceUri parent = AAIUriFactory.createResourceUri(AAIObjectType.PNF, token[4]);
+
+ AAIResultWrapper wrapper = client.get(parent);
+ Optional<Relationships> optRelationships = wrapper.getRelationships();
+ if (optRelationships.isPresent()) {
+ Relationships relationships = optRelationships.get();
+
+ return !relationships.getRelatedAAIUris(AAIObjectType.EXT_AAI_NETWORK).isEmpty();
+ }
}
return false;
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java
index 3c4a35737b..3108adaa53 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java
@@ -93,7 +93,7 @@ public abstract class AbstractSdncOperationTask extends BaseTask {
logger.info("AbstractSdncOperationTask.updateResOperStatus begin!");
String requestsdbEndPoint = env.getProperty("mso.adapters.openecomp.db.endpoint");
HttpPost httpPost = new HttpPost(requestsdbEndPoint);
- httpPost.addHeader("Authorization", "Basic QlBFTENsaWVudDpwYXNzd29yZDEk");
+ httpPost.addHeader("Authorization", "Basic YnBlbDpwYXNzd29yZDEk");
httpPost.addHeader("Content-type", "application/soap+xml");
String postBody = getPostStringBody(resourceOperationStatus);
httpPost.setEntity(new StringEntity(postBody, ContentType.APPLICATION_XML));
@@ -174,7 +174,7 @@ public abstract class AbstractSdncOperationTask extends BaseTask {
logger.info("AbstractSdncOperationTask.getResourceOperationStatus begin!");
String requestsdbEndPoint = env.getProperty("mso.adapters.openecomp.db.endpoint");
HttpPost httpPost = new HttpPost(requestsdbEndPoint);
- httpPost.addHeader("Authorization", "Basic QlBFTENsaWVudDpwYXNzd29yZDEk");
+ httpPost.addHeader("Authorization", "Basic YnBlbDpwYXNzd29yZDEk");
httpPost.addHeader("Content-type", "application/soap+xml");
String getBody = getGetStringBody(serviceId, operationId, resourceTemplateUUID);
httpPost.setEntity(new StringEntity(getBody, ContentType.APPLICATION_XML));
@@ -289,9 +289,8 @@ public abstract class AbstractSdncOperationTask extends BaseTask {
protected boolean isSend2SdncDirectly() {
logger.info("AbstractSdncOperationTask.isSend2SdncDirectly begin!");
- String sdncIp = UrnPropertiesReader.getVariable("sdnc-ip");
- String sdncPort = UrnPropertiesReader.getVariable("sdnc-port");
- if (!StringUtils.isBlank(sdncIp) && isIp(sdncIp) && !StringUtils.isBlank(sdncPort)) {
+ String sdncHost = UrnPropertiesReader.getVariable("sdnc.host");
+ if (!StringUtils.isBlank(sdncHost)) {
logger.info("AbstractSdncOperationTask.isSend2SdncDirectly = true.");
return true;
}
@@ -317,6 +316,12 @@ public abstract class AbstractSdncOperationTask extends BaseTask {
return returnPort;
}
+ protected String getSdncHost() {
+ String sdncHost = UrnPropertiesReader.getVariable("sdnc.host");
+ logger.info("AbstractSdncOperationTask.getSdncPort: returnPort = {}", sdncHost);
+ return sdncHost;
+ }
+
private GenericResourceApi getGenericResourceApiClient() {
logger.info("AbstractSdncOperationTask.getGenericResourceApiClient begin!");
String msbIp = System.getenv().get(ONAP_IP);
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncServiceTopologyOperationTask.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncServiceTopologyOperationTask.java
index 8e41d0d88e..dc625d35c3 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncServiceTopologyOperationTask.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncServiceTopologyOperationTask.java
@@ -72,7 +72,7 @@ public class SdncServiceTopologyOperationTask extends AbstractSdncOperationTask
private void send2SdncDirectly(String defaulAuth,
RpcServiceTopologyOperationInputEntity inputEntity) throws RouteException {
sdncLogger.info("SdncServiceTopologyOperationTask.send2SdncDirectly begin!");
- String url = "http://" + getSdncIp() + ":" + getSdncPort() + URL;
+ String url = getSdncHost() + URL;
HttpPost httpPost = new HttpPost(url);
httpPost.addHeader("Authorization", defaulAuth);
httpPost.addHeader("Content-type", "application/json");
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResourceTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResourceTest.groovy
index 820c14eb94..8dde45be81 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResourceTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResourceTest.groovy
@@ -129,10 +129,7 @@ class CreateSDNCNetworkResourceTest extends GroovyTestCase {
private getInstanceId() {
def response = new XmlSlurper().parseText(sdncAdapterWorkflowResponse)
- def data = response.toString()
- data = data.substring(data.indexOf("<"))
- def resp = new XmlSlurper().parseText(data)
- def instanceId = resp."network-response-information"."instance-id"
+ def instanceId = response."response-data"."RequestData"."output"."network-response-information"."instance-id"
return instanceId
}
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfAndModulesTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfAndModulesTest.groovy
new file mode 100644
index 0000000000..47db6b3b7b
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfAndModulesTest.groovy
@@ -0,0 +1,452 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 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 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.AllottedResource
+import org.onap.so.bpmn.core.domain.HomingSolution
+import org.onap.so.bpmn.core.domain.InventoryType
+import org.onap.so.bpmn.core.domain.License
+import org.onap.so.bpmn.core.domain.ModelInfo
+import org.onap.so.bpmn.core.domain.ModuleResource
+import org.onap.so.bpmn.core.domain.NetworkResource
+import org.onap.so.bpmn.core.domain.ResourceInstance
+import org.onap.so.bpmn.core.domain.ResourceType
+import org.onap.so.bpmn.core.domain.ServiceDecomposition
+import org.onap.so.bpmn.core.domain.ServiceInstance
+import org.onap.so.bpmn.core.domain.VnfResource
+
+import static org.mockito.Mockito.*
+
+@RunWith(MockitoJUnitRunner.class)
+class DoCreateVnfAndModulesTest {
+
+ @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()
+ setupBasicProcessInputs(mockExecution)
+
+ ServiceDecomposition serviceDecomposition = createServiceDecomposition()
+ when(mockExecution.getVariable("serviceDecomposition")).thenReturn(serviceDecomposition)
+
+ Map<String,String> vfModuleNames = new HashMap<String,String>()
+ vfModuleNames.put("3ec98c7a-ac20-49a1-9e0d-09fea7e8db45", "VGWA:e2:25:25:25:%")
+ vfModuleNames.put("cc250e7e-746b-4d84-8064-df20c74213a6", "VGWB:f9:32:32:32:%")
+ when(mockExecution.getVariable("vfModuleNames")).thenReturn(vfModuleNames)
+
+ DoCreateVnfAndModules obj = new DoCreateVnfAndModules()
+ obj.preProcessRequest(mockExecution)
+
+ Mockito.verify(mockExecution, times(11)).setVariable(captor.capture(), captor.capture())
+
+ List list = captor.getAllValues()
+ for (int i = 0; i < list.size(); i+=2) {
+ System.out.println("captor[" + i/2 + "]: " + list.get(i)
+ + (i+1 < list.size() ? ("=" + list.get(i+1)) : ""))
+ }
+
+ String someKey = list.get(18)
+ Assert.assertEquals("numOfCreatedAddOnModules", someKey)
+ Integer someValue = list.get(19)
+ Assert.assertEquals(0, someValue)
+
+ String lastKey = list.get(20)
+ Assert.assertEquals("rollbackData", lastKey)
+ }
+
+ @Test
+ void testQueryCatalogDB() {
+ ExecutionEntity mockExecution = setupMock()
+ setupBasicProcessInputs(mockExecution)
+
+ ServiceDecomposition serviceDecomposition = createServiceDecomposition()
+ when(mockExecution.getVariable("serviceDecomposition")).thenReturn(serviceDecomposition)
+
+ DoCreateVnfAndModules obj = new DoCreateVnfAndModules()
+ obj.queryCatalogDB(mockExecution)
+
+ Mockito.verify(mockExecution, times(11)).setVariable(captor.capture(), captor.capture())
+
+ List list = captor.getAllValues()
+ for (int i = 0; i < list.size(); i+=2) {
+ System.out.println("captor[" + i/2 + "]: " + list.get(i)
+ + (i+1 < list.size() ? ("=" + list.get(i+1)) : ""))
+ }
+
+ String vfModuleNameKey = list.get(12)
+ Assert.assertEquals("baseVfModuleName", vfModuleNameKey)
+ String vfModuleNameValue = list.get(13)
+ Assert.assertEquals(null, vfModuleNameValue)
+
+ String lastKey = list.get(20)
+ Assert.assertEquals("baseVfModuleId", lastKey)
+ }
+
+ @Test
+ void testQueryCatalogDBWithVfModuleNames() {
+ ExecutionEntity mockExecution = setupMock()
+ setupBasicProcessInputs(mockExecution)
+
+ ServiceDecomposition serviceDecomposition = createServiceDecomposition()
+ when(mockExecution.getVariable("serviceDecomposition")).thenReturn(serviceDecomposition)
+
+ Map<String,String> vfModuleNames = new HashMap<String,String>()
+ vfModuleNames.put("3ec98c7a-ac20-49a1-9e0d-09fea7e8db45", "VGWA:e2:25:25:25:%")
+ vfModuleNames.put("cc250e7e-746b-4d84-8064-df20c74213a6", "VGWB:f9:32:32:32:%")
+ when(mockExecution.getVariable("vfModuleNames")).thenReturn(vfModuleNames)
+
+ DoCreateVnfAndModules obj = new DoCreateVnfAndModules()
+ obj.queryCatalogDB(mockExecution)
+
+ Mockito.verify(mockExecution, times(11)).setVariable(captor.capture(), captor.capture())
+
+ List list = captor.getAllValues()
+ for (int i = 0; i < list.size(); i+=2) {
+ System.out.println("captor[" + i/2 + "]: " + list.get(i)
+ + (i+1 < list.size() ? ("=" + list.get(i+1)) : ""))
+ }
+
+ String vfModuleNameKey = list.get(12)
+ Assert.assertEquals("baseVfModuleName", vfModuleNameKey)
+ String vfModuleNameValue = list.get(13)
+ Assert.assertEquals("VGWA:e2:25:25:25:%", vfModuleNameValue)
+
+ String lastKey = list.get(20)
+ Assert.assertEquals("baseVfModuleId", lastKey)
+ }
+
+ @Test
+ void testPreProcessAddonModule() {
+ ExecutionEntity mockExecution = setupMock()
+ setupBasicProcessInputs(mockExecution)
+
+ ServiceDecomposition serviceDecomposition = createServiceDecomposition()
+ when(mockExecution.getVariable("serviceDecomposition")).thenReturn(serviceDecomposition)
+
+ VnfResource vnf = serviceDecomposition.getVnfResources().get(0);
+ List<ModuleResource> vfModules = vnf.getAllVfModuleObjects()
+
+ for (int i = vfModules.size()-1; i >= 0; i--) {
+ if (vfModules.get(i).getIsBase()) {
+ vfModules.remove(i);
+ }
+ }
+
+ when(mockExecution.getVariable("addOnModules")).thenReturn(vfModules)
+ when(mockExecution.getVariable("addOnModulesDeployed")).thenReturn(0)
+
+ DoCreateVnfAndModules obj = new DoCreateVnfAndModules()
+ obj.preProcessAddOnModule(mockExecution)
+
+ Mockito.verify(mockExecution, times(9)).setVariable(captor.capture(), captor.capture())
+
+ List list = captor.getAllValues()
+ for (int i = 0; i < list.size(); i+=2) {
+ System.out.println("captor[" + i/2 + "]: " + list.get(i)
+ + (i+1 < list.size() ? ("=" + list.get(i+1)) : ""))
+ }
+
+ String vfModuleNameKey = list.get(14)
+ Assert.assertEquals("addOnVfModuleName", vfModuleNameKey)
+ String vfModuleNameValue = list.get(15)
+ Assert.assertEquals(null, vfModuleNameValue)
+
+ String lastKey = list.get(16)
+ Assert.assertEquals("initialCount", lastKey)
+ }
+
+ @Test
+ void testPreProcessAddonModuleWithVfModuleNames() {
+ ExecutionEntity mockExecution = setupMock()
+ setupBasicProcessInputs(mockExecution)
+
+ ServiceDecomposition serviceDecomposition = createServiceDecomposition()
+ when(mockExecution.getVariable("serviceDecomposition")).thenReturn(serviceDecomposition)
+
+ Map<String,String> vfModuleNames = new HashMap<String,String>()
+ vfModuleNames.put("3ec98c7a-ac20-49a1-9e0d-09fea7e8db45", "VGWA:e2:25:25:25:%")
+ vfModuleNames.put("cc250e7e-746b-4d84-8064-df20c74213a6", "VGWB:f9:32:32:32:%")
+ when(mockExecution.getVariable("vfModuleNames")).thenReturn(vfModuleNames)
+
+ VnfResource vnf = serviceDecomposition.getVnfResources().get(0);
+ List<ModuleResource> vfModules = vnf.getAllVfModuleObjects()
+
+ for (int i = vfModules.size()-1; i >= 0; i--) {
+ if (vfModules.get(i).getIsBase()) {
+ vfModules.remove(i);
+ }
+ }
+
+ when(mockExecution.getVariable("addOnModules")).thenReturn(vfModules)
+ when(mockExecution.getVariable("addOnModulesDeployed")).thenReturn(0)
+
+ DoCreateVnfAndModules obj = new DoCreateVnfAndModules()
+ obj.preProcessAddOnModule(mockExecution)
+
+ Mockito.verify(mockExecution, times(9)).setVariable(captor.capture(), captor.capture())
+
+ List list = captor.getAllValues()
+ for (int i = 0; i < list.size(); i+=2) {
+ System.out.println("captor[" + i/2 + "]: " + list.get(i)
+ + (i+1 < list.size() ? ("=" + list.get(i+1)) : ""))
+ }
+
+ String vfModuleNameKey = list.get(14)
+ Assert.assertEquals("addOnVfModuleName", vfModuleNameKey)
+ String vfModuleNameValue = list.get(15)
+ Assert.assertEquals("VGWB:f9:32:32:32:%", vfModuleNameValue)
+
+ String lastKey = list.get(16)
+ Assert.assertEquals("initialCount", lastKey)
+ }
+
+ private static setupBasicProcessInputs(ExecutionEntity mockExecution) {
+ when(mockExecution.getVariable("prefix")).thenReturn("DCVAM_")
+ when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
+ when(mockExecution.getVariable("msoRequestId")).thenReturn("28a7f01e-a6aa-44fd-b25e-e06e14873cd7")
+ when(mockExecution.getVariable("serviceInstanceId")).thenReturn("7d34a7df-d6c3-4f1c-8710-576412134a5a")
+ when(mockExecution.getVariable("productFamilyId")).thenReturn("a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb")
+ when(mockExecution.getVariable("lcpCloudRegionId")).thenReturn("RegionOne")
+ when(mockExecution.getVariable("tenantId")).thenReturn("b8ad3842ab3642f7bf3fbe4e4d3b9f86")
+ when(mockExecution.getVariable("disableRollback")).thenReturn("true")
+ when(mockExecution.getVariable("delayMS")).thenReturn("0")
+
+ }
+
+ private static ExecutionEntity setupMock() {
+ ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
+ when(mockProcessDefinition.getKey()).thenReturn("DoCreateVnfAndModules")
+ RepositoryService mockRepositoryService = mock(RepositoryService.class)
+ when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
+ when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("DoCreateVnfAndModules")
+ 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("DoCreateVnfAndModules")
+ when(mockExecution.getProcessInstanceId()).thenReturn("DoCreateVnfAndModules")
+ when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
+ when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
+
+ return mockExecution
+ }
+
+ public static ServiceDecomposition createServiceDecomposition() {
+ ServiceDecomposition serviceDecomposition = new ServiceDecomposition()
+
+ ServiceInstance serviceInstance = new ServiceInstance()
+ serviceInstance.setInstanceId("7d34a7df-d6c3-4f1c-8710-576412134a5a")
+ serviceDecomposition.setServiceInstance(serviceInstance)
+ serviceDecomposition.setServiceType("")
+ serviceDecomposition.setServiceRole("")
+
+ ModelInfo serviceModelInfo = new ModelInfo()
+ serviceDecomposition.setModelInfo(serviceModelInfo)
+ serviceModelInfo.setModelName("vcpesvc_rescust_1111")
+ serviceModelInfo.setModelUuid("1dffd5f9-bb29-4a47-8073-9b9b07f4943a")
+ serviceModelInfo.setModelVersion("1.0")
+ serviceModelInfo.setModelCustomizationUuid("")
+ serviceModelInfo.setModelCustomizationName("")
+ serviceModelInfo.setModelInstanceName("")
+ serviceModelInfo.setModelType("")
+
+ List<VnfResource> vnfResources = new ArrayList<VnfResource>()
+ serviceDecomposition.setVnfResources(vnfResources)
+
+ VnfResource vnfResource = new VnfResource()
+ vnfResources.add(vnfResource)
+ vnfResource.setResourceId("9504b6b3-d346-4387-952c-8f9b7570b055")
+ vnfResource.setResourceType(ResourceType.VNF)
+ ModelInfo vnfModelInfo = new ModelInfo()
+ vnfResource.setModelInfo(vnfModelInfo)
+ vnfModelInfo.setModelName("vcpevsp_vgw_1111")
+ vnfModelInfo.setModelUuid("289e96fd-a679-4286-a8a2-d76f930d650b")
+ vnfModelInfo.setModelInvariantUuid("0327af89-f836-4086-aadb-17d5c9bd8a83");
+ vnfModelInfo.setModelVersion("1.0");
+ vnfModelInfo.setModelCustomizationUuid("cf151beb-9510-44a1-a165-c783e673baa1");
+ vnfModelInfo.setModelCustomizationName("");
+ vnfModelInfo.setModelInstanceName("vcpevsp_vgw_1111 0")
+ vnfModelInfo.setModelType("")
+ vnfResource.setResourceInstance(new ResourceInstance())
+ vnfResource.setHomingSolution(new HomingSolution())
+ vnfResource.setToscaNodeType("org.openecomp.resource.vf.VcpevspVgw1111")
+ vnfResource.setMultiStageDesign("false")
+ vnfResource.setMultiStageDesign("false")
+
+ List<ModuleResource> moduleResources = new ArrayList<ModuleResource>()
+ vnfResource.setModules(moduleResources)
+
+ ModuleResource moduleResource = new ModuleResource()
+ moduleResources.add(moduleResource)
+ moduleResource.setResourceType(ResourceType.MODULE)
+ ModelInfo moduleModelInfo = new ModelInfo()
+ moduleResource.setModelInfo(moduleModelInfo);
+ moduleModelInfo.setModelName("VcpevspVgw1111..base_vcpe_vgw..module-0")
+ moduleModelInfo.setModelUuid("cf35b6b8-1f31-4efc-87a7-d53f840b8fdf")
+ moduleModelInfo.setModelInvariantUuid("3ec98c7a-ac20-49a1-9e0d-09fea7e8db45")
+ moduleModelInfo.setModelVersion("1")
+ moduleModelInfo.setModelCustomizationUuid("281085b3-4598-4c94-811d-58cc685763e7")
+ moduleModelInfo.setModelCustomizationName("")
+ moduleModelInfo.setModelInstanceName("")
+ moduleModelInfo.setModelType("")
+ moduleResource.setResourceInstance(new ResourceInstance())
+ moduleResource.setHomingSolution(new HomingSolution())
+ moduleResource.setHasVolumeGroup(false)
+ moduleResource.setIsBase(true)
+ moduleResource.setVfModuleLabel("base_vcpe_vgw")
+ moduleResource.setInitialCount(1)
+
+ // For testing an add-on module; not in the actual vCPE model
+ moduleResource = new ModuleResource()
+ moduleResources.add(moduleResource)
+ moduleResource.setResourceType(ResourceType.MODULE)
+ moduleModelInfo = new ModelInfo()
+ moduleResource.setModelInfo(moduleModelInfo);
+ moduleModelInfo.setModelName("VcpevspVgw1111..addon_vcpe_vgw..module-1")
+ moduleModelInfo.setModelUuid("8c8b41b2-8466-41b4-ae8d-5924830c40e8")
+ moduleModelInfo.setModelInvariantUuid("cc250e7e-746b-4d84-8064-df20c74213a6")
+ moduleModelInfo.setModelVersion("1")
+ moduleModelInfo.setModelCustomizationUuid("99424afc-1fb4-4598-a99b-3e0690b4cb03")
+ moduleModelInfo.setModelCustomizationName("")
+ moduleModelInfo.setModelInstanceName("")
+ moduleModelInfo.setModelType("")
+ moduleResource.setResourceInstance(new ResourceInstance())
+ moduleResource.setHomingSolution(new HomingSolution())
+ moduleResource.setHasVolumeGroup(false)
+ moduleResource.setIsBase(false)
+ moduleResource.setVfModuleLabel("addon_vcpe_vgw")
+ moduleResource.setInitialCount(1)
+
+ serviceDecomposition.setNetworkResources(new ArrayList<NetworkResource>())
+
+ List<AllottedResource> allottedResources = new ArrayList<AllottedResource>()
+ serviceDecomposition.setAllottedResources(allottedResources)
+
+ AllottedResource ar = new AllottedResource()
+ allottedResources.add(ar)
+ ar.setResourceId("ed4a3a9a-1411-4924-a9ee-61a41871a040")
+ ar.setResourceType(ResourceType.ALLOTTED_RESOURCE)
+ ModelInfo arModelInfo = new ModelInfo()
+ ar.setModelInfo(arModelInfo)
+ arModelInfo.setModelName("vcpear_tunnelxconn_1111")
+ arModelInfo.setModelUuid("d99e5442-c5e4-4197-ad8d-54f7ad43dd83")
+ arModelInfo.setModelInvariantUuid("61c17371-e824-4587-a9bb-21782aa28391")
+ arModelInfo.setModelVersion("1.0")
+ arModelInfo.setModelCustomizationUuid("506bb474-b8c2-41fd-aeec-4371c3ef58a4")
+ arModelInfo.setModelCustomizationName("")
+ arModelInfo.setModelInstanceName("vcpear_tunnelxconn_1111 0")
+ arModelInfo.setModelType("")
+ ar.setResourceInstance(new ResourceInstance())
+ HomingSolution homingSolution = new HomingSolution()
+ ar.setHomingSolution(homingSolution)
+ homingSolution.setInventoryType(InventoryType.service)
+ homingSolution.setServiceInstanceId("d600c1c0-ff45-40e4-bf29-45a95fa64556")
+ homingSolution.setCloudOwner("CloudOwner")
+ homingSolution.setCloudRegionId("RegionOne")
+ VnfResource vnf = new VnfResource()
+ homingSolution.setVnf(vnf)
+ vnf.setResourceId("cea5e96e-9c67-437c-bf94-2329d277be09")
+ vnf.setResourceType(ResourceType.VNF)
+ vnf.setResourceInstance(new ResourceInstance())
+ vnf.setHomingSolution(new HomingSolution())
+ vnf.setVnfHostname("vnfHostName")
+ homingSolution.setLicense(new License())
+ homingSolution.setRehome(false)
+ ar.setToscaNodeType("org.openecomp.resource.vf.VcpearTunnelxconn1111")
+ ar.setAllottedResourceType("TunnelXConnect")
+ ar.setAllottedResourceRole("TunnelXConn")
+ ar.setProvidingServiceModelName("org.openecomp.service.VcpesvcVgmux1111")
+ ar.setProvidingServiceModelInvariantUuid("d5751cb3-b9e9-470b-9c29-76a5e3ea12d0")
+ ar.setProvidingServiceModelUuid("61b6e96a-f0c6-4f34-a91c-dab3574dd025")
+ ar.setNfType("TunnelXConn")
+ ar.setNfRole("TunnelXConn")
+
+ ar = new AllottedResource()
+ allottedResources.add(ar)
+ ar.setResourceId("3b1b3686-ccfe-4e7c-9d6b-76419db398f9")
+ ar.setResourceType(ResourceType.ALLOTTED_RESOURCE)
+ arModelInfo = new ModelInfo()
+ ar.setModelInfo(arModelInfo)
+ arModelInfo.setModelName("vcpear_brg_1111")
+ arModelInfo.setModelUuid("6b0a5aa5-98d8-455c-8cd1-618a3f1ac859")
+ arModelInfo.setModelInvariantUuid("531f9aa5-dea4-4958-89ad-ef03f77cbf07")
+ arModelInfo.setModelVersion("1.0")
+ arModelInfo.setModelCustomizationUuid("d23ac3fe-ea54-4060-a7c1-ec9178c79620")
+ arModelInfo.setModelCustomizationName("")
+ arModelInfo.setModelInstanceName("vcpear_brg_1111 0")
+ arModelInfo.setModelType("")
+ ar.setResourceInstance(new ResourceInstance())
+ homingSolution = new HomingSolution()
+ ar.setHomingSolution(homingSolution)
+ homingSolution.setInventoryType(InventoryType.service)
+ homingSolution.setServiceInstanceId("bc28ebca-0cc3-4bf8-9ce9-d1524e4bec79")
+ homingSolution.setCloudOwner("CloudOwner")
+ homingSolution.setCloudRegionId("RegionOne")
+ vnf = new VnfResource()
+ homingSolution.setVnf(vnf)
+ vnf.setResourceId("65183e95-e6f1-46cb-9315-2da27a24c2b9")
+ vnf.setResourceType(ResourceType.VNF)
+ vnf.setResourceInstance(new ResourceInstance())
+ vnf.setHomingSolution(new HomingSolution())
+ vnf.setVnfHostname("vnfHostName")
+ homingSolution.setLicense(new License())
+ homingSolution.setRehome(false)
+ ar.setToscaNodeType("org.openecomp.resource.vf.VcpearBrg1111")
+ ar.setAllottedResourceType("BRG")
+ ar.setAllottedResourceRole("BRG")
+ ar.setProvidingServiceModelName("org.openecomp.service.VcpesvcVbrg1111")
+ ar.setProvidingServiceModelInvariantUuid("6eff53bf-0045-41b0-bd48-b4e1284e5b7a")
+ ar.setProvidingServiceModelUuid("0e500bca-15ac-42eb-a2f1-4bfd3b2828ff")
+ ar.setNfType("BRG")
+ ar.setNfRole("BRG")
+
+ return serviceDecomposition
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/CreateVcpeResCustServiceTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/CreateVcpeResCustServiceTest.groovy
index d0ded39146..160eee2337 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/CreateVcpeResCustServiceTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/CreateVcpeResCustServiceTest.groovy
@@ -85,10 +85,10 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
// ***** preProcessRequest *****
@Test
- @Ignore // 1802 merge
public void preProcessRequest() {
ExecutionEntity mex = setupMock()
def map = setupMap(mex)
+
initPreProcess(mex)
CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
@@ -96,7 +96,6 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
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"))
@@ -118,6 +117,8 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
def reqinfo = map.get(Prefix+"requestInfo")
assertTrue(reqinfo.indexOf("<request-id>mri</") >= 0)
assertTrue(reqinfo.indexOf("<source>VID</") >= 0)
+
+ assertTrue(map.containsKey("vfModuleNames"))
}
@Test
@@ -127,7 +128,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
def map = setupMap(mex)
initPreProcess(mex)
- when(mex.getVariable("URN_mso_workflow_aai_distribution_delay")).thenReturn(null)
+ when(mex.getVariable("aai.workflowAaiDistributionDelay")).thenReturn(null)
CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
@@ -209,7 +210,6 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
.replace('"mdt1"', '"CloudOwner_CloudRegion1"')
when(mex.getVariable("bpmnRequest")).thenReturn(req)
- when(mex.getVariable("URN_mso_workflow_aai_distribution_delay")).thenReturn("PT5S")
when(mex.getVariable("aai.workflowAaiDistributionDelay")).thenReturn("PT5S")
CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
@@ -230,8 +230,6 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
.replace('"mdt1"', '"CloudRegion1_"')
when(mex.getVariable("bpmnRequest")).thenReturn(req)
- when(mex.getVariable("URN_mso_workflow_aai_distribution_delay")).thenReturn(60)
- when(mex.getVariable("URN_mso_workflow_aai_distribution_delay")).thenReturn("PT5S")
when(mex.getVariable("aai.workflowAaiDistributionDelay")).thenReturn("PT5S")
CreateVcpeResCustService CreateVcpeResCustService = new CreateVcpeResCustService()
@@ -1122,7 +1120,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
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("aai.workflowAaiDistributionDelay")).thenReturn("PT5S")
when(mex.getVariable("mso-request-id")).thenReturn("mri")
when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
when(mex.getVariable("requestAction")).thenReturn("ra")
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreatePnfEntryInAaiDelegateTest.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreatePnfEntryInAaiDelegateTest.java
index 6bfbac0791..c487125ea6 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreatePnfEntryInAaiDelegateTest.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreatePnfEntryInAaiDelegateTest.java
@@ -53,4 +53,4 @@ public class CreatePnfEntryInAaiDelegateTest {
assertThat(createdEntry.getPnfName()).isEqualTo("testCorrelationId");
assertThat(createdEntry.isInMaint()).isNull();
}
-} \ No newline at end of file
+}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/GeneratePnfUuidDelegateTest.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/GeneratePnfUuidDelegateTest.java
index 763a4546e8..8a1cdfa4c0 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/GeneratePnfUuidDelegateTest.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/GeneratePnfUuidDelegateTest.java
@@ -28,8 +28,6 @@ import org.camunda.bpm.extension.mockito.delegate.DelegateExecutionFake;
import org.junit.Test;
public class GeneratePnfUuidDelegateTest {
- private static final String UUID_REGEX = "(?i)^[0-9a-f]{8}-[0-9a-f]{4}-[1-5]{1}[0-9a-f]{3}-[89ab]{1}[0-9a-f]{3}-[0-9a-f]{12}$";
-
@Test
public void execute_shouldSetValidUuidAsPnfUuid() {
// given
@@ -38,6 +36,6 @@ public class GeneratePnfUuidDelegateTest {
// when
delegate.execute(execution);
// then
- assertThat((String) execution.getVariable(PNF_UUID)).matches(UUID_REGEX);
+ assertThat((String) execution.getVariable(PNF_UUID)).matches(PnfCheckInputs.UUID_REGEX);
}
-} \ No newline at end of file
+}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputsTest.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputsTest.java
index d670305a9a..1888831e2e 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputsTest.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputsTest.java
@@ -4,8 +4,6 @@
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
- * Modifications Copyright 2018 Nokia
- * ================================================================================
* 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
@@ -23,7 +21,7 @@
package org.onap.so.bpmn.infrastructure.pnf.delegate;
import static org.assertj.core.api.Assertions.assertThat;
-import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy;
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.CORRELATION_ID;
import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.PNF_UUID;
import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.TIMEOUT_FOR_NOTIFICATION;
@@ -56,18 +54,6 @@ public class PnfCheckInputsTest {
}
@Test
- public void shouldThrowException_whenCorrelationIdIsEmptyString() {
- PnfCheckInputs testedObject = prepareExecutionForCorrelationId("");
- assertThatThrownBy(() -> testedObject.execute(delegateExecution)).isInstanceOf(BpmnError.class);
- }
-
- @Test
- public void shouldThrowException_whenTimeoutIsNotSetAndDefaultIsNotDefined() {
- PnfCheckInputs testedObject = prepareExecutionForTimeout(null, null);
- assertThatThrownBy(() -> testedObject.execute(delegateExecution)).isInstanceOf(BpmnError.class);
- }
-
- @Test
public void shouldThrowException_whenTimeoutIsEmptyStringAndDefaultIsNotDefined() {
PnfCheckInputs testedObject = prepareExecutionForTimeout(null, "");
assertThatThrownBy(() -> testedObject.execute(delegateExecution)).isInstanceOf(BpmnError.class);
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/resources/__files/VCPE/CreateVcpeResCustService/request.json b/bpmn/so-bpmn-infrastructure-common/src/test/resources/__files/VCPE/CreateVcpeResCustService/request.json
index dc4669e8d9..766d27a26d 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/resources/__files/VCPE/CreateVcpeResCustService/request.json
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/resources/__files/VCPE/CreateVcpeResCustService/request.json
@@ -23,6 +23,7 @@
},
"cloudConfiguration":
{
+ "cloudOwner":"CloudOwner",
"lcpCloudRegionId":"mdt1",
"tenantId":"8b1df54faa3b49078e3416e21370a3ba"
},
@@ -30,11 +31,37 @@
{
"subscriptionServiceType":"123456789",
"aLaCarte":"false",
- "userParams":
+ "userParams":[
{
- "BRG_WAN_MAC_Address" : "brgmac"
+ "name":"BRG_WAN_MAC_Address",
+ "value":"brgmac"
+ },
+ {
+ "name":"Customer_Location",
+ "value":{
+ "customerLatitude":"32.897480",
+ "customerLongitude":"-97.040443",
+ "customerName":"some_company"
+ }
+ },
+ {
+ "name":"Homing_Solution",
+ "value":"sniro"
+ },
+ {
+ "name":"VfModuleNames",
+ "value":[
+ {
+ "VfModuleModelInvariantUuid":"c0e70c86-9813-4441-93c7-ad356a9a8d3b",
+ "VfModuleName":"VGWA:f4:56:56:56:%"
+ },
+ {
+ "VfModuleModelInvariantUuid":"5366deab-be06-44c7-b4f7-77e657b78b25",
+ "VfModuleName":"VGWB:a9:18:18:18:%"
+ }
+ ]
}
+ ]
}
-
}
}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/ActivateSDNCNetworkResource.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/ActivateSDNCNetworkResource.bpmn
index fe2c8928d8..8cde4f6c56 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/ActivateSDNCNetworkResource.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/ActivateSDNCNetworkResource.bpmn
@@ -38,7 +38,7 @@ dcsi.prepareUpdateAfterActivateSDNCResource(execution)</bpmn:script>
<camunda:inputParameter name="headers">
<camunda:map>
<camunda:entry key="content-type">application/soap+xml</camunda:entry>
- <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
</camunda:map>
</camunda:inputParameter>
<camunda:inputParameter name="payload">${CVFMI_updateResOperStatusRequest}</camunda:inputParameter>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/Create3rdONAPE2EServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/Create3rdONAPE2EServiceInstance.bpmn
index 6a7cf8160a..6be6cc9899 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/Create3rdONAPE2EServiceInstance.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/Create3rdONAPE2EServiceInstance.bpmn
@@ -46,7 +46,7 @@ dcsi.prepareUpdateProgress(execution)]]></bpmn:script>
<camunda:inputParameter name="headers">
<camunda:map>
<camunda:entry key="content-type">application/soap+xml</camunda:entry>
- <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
</camunda:map>
</camunda:inputParameter>
<camunda:inputParameter name="payload">${CVFMI_updateResOperStatusRequest}</camunda:inputParameter>
@@ -82,7 +82,7 @@ dcsi.doCreateE2ESIin3rdONAP(execution)]]></bpmn:script>
<camunda:inputParameter name="headers">
<camunda:map>
<camunda:entry key="content-type">application/soap+xml</camunda:entry>
- <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
</camunda:map>
</camunda:inputParameter>
<camunda:inputParameter name="payload">${CVFMI_updateResOperStatusRequest}</camunda:inputParameter>
@@ -199,7 +199,7 @@ dcsi.prepareUpdateProgress(execution)]]></bpmn:script>
<camunda:inputParameter name="headers">
<camunda:map>
<camunda:entry key="content-type">application/soap+xml</camunda:entry>
- <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
</camunda:map>
</camunda:inputParameter>
<camunda:inputParameter name="payload">${CVFMI_updateResOperStatusRequest}</camunda:inputParameter>
@@ -311,7 +311,7 @@ dcsi.prepareUpdateProgress(execution)]]></bpmn:script>
<camunda:inputParameter name="headers">
<camunda:map>
<camunda:entry key="content-type">application/soap+xml</camunda:entry>
- <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
</camunda:map>
</camunda:inputParameter>
<camunda:inputParameter name="payload">${CVFMI_updateResOperStatusRequest}</camunda:inputParameter>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateActivateSDNCResource.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateActivateSDNCResource.bpmn
index 29d7a11175..5f4f964008 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateActivateSDNCResource.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateActivateSDNCResource.bpmn
@@ -79,7 +79,7 @@ dcsi.prepareUpdateAfterCreateSDNCResource(execution)]]></bpmn:script>
<camunda:inputParameter name="headers">
<camunda:map>
<camunda:entry key="content-type">application/soap+xml</camunda:entry>
- <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
</camunda:map>
</camunda:inputParameter>
<camunda:inputParameter name="payload">${CVFMI_updateResOperStatusRequest}</camunda:inputParameter>
@@ -101,7 +101,7 @@ dcsi.prepareUpdateAfterCreateSDNCResource(execution)]]></bpmn:script>
<camunda:inputParameter name="headers">
<camunda:map>
<camunda:entry key="content-type">application/soap+xml</camunda:entry>
- <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
</camunda:map>
</camunda:inputParameter>
<camunda:inputParameter name="payload">${CVFMI_updateResOperStatusRequest}</camunda:inputParameter>
@@ -147,7 +147,7 @@ dcsi.prepareUpdateAfterActivateSDNCResource(execution)]]></bpmn:script>
<camunda:inputParameter name="headers">
<camunda:map>
<camunda:entry key="content-type">application/soap+xml</camunda:entry>
- <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
</camunda:map>
</camunda:inputParameter>
<camunda:inputParameter name="payload">${CVFMI_updateResOperStatusRequest}</camunda:inputParameter>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateCustomE2EServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateCustomE2EServiceInstance.bpmn
index 6f73b46e2e..04ff48d4ed 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateCustomE2EServiceInstance.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateCustomE2EServiceInstance.bpmn
@@ -1,5 +1,5 @@
<?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" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0">
+<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" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.16.2">
<bpmn:process id="CreateCustomE2EServiceInstance" name="CreateCustomE2EServiceInstance" isExecutable="true">
<bpmn:startEvent id="StartEvent_00qj6ro" name="Create SI Start Flow">
<bpmn:outgoing>SequenceFlow_0s2spoq</bpmn:outgoing>
@@ -8,9 +8,9 @@
<bpmn:scriptTask id="ScriptTask_0u3lw39" name="Handle Unexpected Error" scriptFormat="groovy">
<bpmn:incoming>SequenceFlow_1dsbjjb</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1yay321</bpmn:outgoing>
- <bpmn:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
+ <bpmn:script>import org.onap.so.bpmn.common.scripts.*
ExceptionUtil ex = new ExceptionUtil()
-ex.processJavaException(execution)]]></bpmn:script>
+ex.processJavaException(execution)</bpmn:script>
</bpmn:scriptTask>
<bpmn:startEvent id="StartEvent_0v1ffn4">
<bpmn:outgoing>SequenceFlow_1dsbjjb</bpmn:outgoing>
@@ -54,16 +54,16 @@ ex.processJavaException(execution)]]></bpmn:script>
<bpmn:scriptTask id="ScriptTask_1s09c7d" name="Pre Process Incoming Request" scriptFormat="groovy">
<bpmn:incoming>SequenceFlow_0s2spoq</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0z4faf9</bpmn:outgoing>
- <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
def csi= new CreateCustomE2EServiceInstance()
-csi.preProcessRequest(execution)]]></bpmn:script>
+csi.preProcessRequest(execution)</bpmn:script>
</bpmn:scriptTask>
<bpmn:scriptTask id="ScriptTask_0ttvn8r" name="Prepare Completion Request" scriptFormat="groovy">
<bpmn:incoming>SequenceFlow_14zu6wr</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0je30si</bpmn:outgoing>
- <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
def csi = new CreateCustomE2EServiceInstance()
-csi.prepareCompletionRequest(execution)]]></bpmn:script>
+csi.prepareCompletionRequest(execution)</bpmn:script>
</bpmn:scriptTask>
<bpmn:callActivity id="CallActivity_02fyxz0" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess">
<bpmn:extensionElements>
@@ -88,9 +88,9 @@ csi.prepareCompletionRequest(execution)]]></bpmn:script>
<bpmn:scriptTask id="ScriptTask_0u8o9p2" name="Prepare Fallout Request" scriptFormat="groovy">
<bpmn:incoming>SequenceFlow_0n9pexp</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_01umodj</bpmn:outgoing>
- <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
def csi = new CreateCustomE2EServiceInstance()
-csi.prepareFalloutRequest(execution)]]></bpmn:script>
+csi.prepareFalloutRequest(execution)</bpmn:script>
</bpmn:scriptTask>
<bpmn:callActivity id="CallActivity_1ang7q8" name="Call FalloutHandler" calledElement="FalloutHandler">
<bpmn:extensionElements>
@@ -107,9 +107,9 @@ csi.prepareFalloutRequest(execution)]]></bpmn:script>
<bpmn:scriptTask id="ScriptTask_1rn6nqi" name="Send Error Response">
<bpmn:incoming>SequenceFlow_0e1r62n</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0n9pexp</bpmn:outgoing>
- <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
def csi = new CreateCustomE2EServiceInstance()
-csi.sendSyncError(execution)]]></bpmn:script>
+csi.sendSyncError(execution)</bpmn:script>
</bpmn:scriptTask>
<bpmn:sequenceFlow id="SequenceFlow_0e1r62n" sourceRef="StartEvent_0dug28e" targetRef="ScriptTask_1rn6nqi" />
<bpmn:sequenceFlow id="SequenceFlow_1ysapam" sourceRef="CallActivity_1ang7q8" targetRef="EndEvent_03wysuk" />
@@ -119,9 +119,9 @@ csi.sendSyncError(execution)]]></bpmn:script>
<bpmn:scriptTask id="ScriptTask_0xupxj9" name="Send Sync Ack Response" scriptFormat="groovy">
<bpmn:incoming>SequenceFlow_081z8l2</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_19eilro</bpmn:outgoing>
- <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
def csi = new CreateCustomE2EServiceInstance()
-csi.sendSyncResponse(execution)]]></bpmn:script>
+csi.sendSyncResponse(execution)</bpmn:script>
</bpmn:scriptTask>
<bpmn:exclusiveGateway id="ExclusiveGateway_0aqn64l" name="Success?">
<bpmn:incoming>SequenceFlow_0klbpxx</bpmn:incoming>
@@ -138,19 +138,19 @@ csi.sendSyncResponse(execution)]]></bpmn:script>
<bpmn:sequenceFlow id="SequenceFlow_0yayvrf" sourceRef="CallActivity_02fyxz0" targetRef="EndEvent_0bpd6c0" />
<bpmn:sequenceFlow id="SequenceFlow_0z4faf9" sourceRef="ScriptTask_1s09c7d" targetRef="Task_1tqjch6" />
<bpmn:sequenceFlow id="SequenceFlow_14zu6wr" name="yes" sourceRef="ExclusiveGateway_0aqn64l" targetRef="ScriptTask_0ttvn8r">
- <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("WorkflowException") == null}]]></bpmn:conditionExpression>
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{execution.getVariable("WorkflowException") == null}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="SequenceFlow_0je30si" sourceRef="ScriptTask_0ttvn8r" targetRef="CallActivity_02fyxz0" />
<bpmn:sequenceFlow id="SequenceFlow_1fueo69" name="no" sourceRef="ExclusiveGateway_0aqn64l" targetRef="EndEvent_07uk5iy">
- <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("WorkflowException") != null}]]></bpmn:conditionExpression>
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{execution.getVariable("WorkflowException") != null}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="SequenceFlow_1euqjsp" sourceRef="Task_1tqjch6" targetRef="Task_19mxcw3" />
<bpmn:scriptTask id="Task_1tqjch6" name="Init Service Operation Status" scriptFormat="groovy">
<bpmn:incoming>SequenceFlow_0z4faf9</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1euqjsp</bpmn:outgoing>
- <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
def csi= new CreateCustomE2EServiceInstance()
-csi.prepareInitServiceOperationStatus(execution)]]></bpmn:script>
+csi.prepareInitServiceOperationStatus(execution)</bpmn:script>
</bpmn:scriptTask>
<bpmn:serviceTask id="Task_19mxcw3" name="Update Service Operation Status">
<bpmn:extensionElements>
@@ -160,7 +160,7 @@ csi.prepareInitServiceOperationStatus(execution)]]></bpmn:script>
<camunda:inputParameter name="headers">
<camunda:map>
<camunda:entry key="content-type">application/soap+xml</camunda:entry>
- <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
</camunda:map>
</camunda:inputParameter>
<camunda:inputParameter name="payload">${CVFMI_updateServiceOperStatusRequest}</camunda:inputParameter>
@@ -225,61 +225,61 @@ csi.prepareInitServiceOperationStatus(execution)]]></bpmn:script>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0s2spoq_di" bpmnElement="SequenceFlow_0s2spoq">
- <di:waypoint xsi:type="dc:Point" x="30" y="198" />
- <di:waypoint xsi:type="dc:Point" x="115" y="198" />
+ <di:waypoint x="30" y="198" />
+ <di:waypoint x="115" y="198" />
<bpmndi:BPMNLabel>
<dc:Bounds x="27.5" y="177" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_19eilro_di" bpmnElement="SequenceFlow_19eilro">
- <di:waypoint xsi:type="dc:Point" x="710" y="198" />
- <di:waypoint xsi:type="dc:Point" x="751" y="198" />
+ <di:waypoint x="710" y="198" />
+ <di:waypoint x="751" y="198" />
<bpmndi:BPMNLabel>
<dc:Bounds x="685.5" y="177" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0klbpxx_di" bpmnElement="SequenceFlow_0klbpxx">
- <di:waypoint xsi:type="dc:Point" x="851" y="198" />
- <di:waypoint xsi:type="dc:Point" x="903" y="198" />
+ <di:waypoint x="851" y="198" />
+ <di:waypoint x="903" y="198" />
<bpmndi:BPMNLabel>
<dc:Bounds x="832" y="177" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0yayvrf_di" bpmnElement="SequenceFlow_0yayvrf">
- <di:waypoint xsi:type="dc:Point" x="1276" y="238" />
- <di:waypoint xsi:type="dc:Point" x="1276" y="286" />
+ <di:waypoint x="1276" y="238" />
+ <di:waypoint x="1276" y="286" />
<bpmndi:BPMNLabel>
<dc:Bounds x="1246" y="262" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0z4faf9_di" bpmnElement="SequenceFlow_0z4faf9">
- <di:waypoint xsi:type="dc:Point" x="215" y="198" />
- <di:waypoint xsi:type="dc:Point" x="273" y="198" />
+ <di:waypoint x="215" y="198" />
+ <di:waypoint x="273" y="198" />
<bpmndi:BPMNLabel>
<dc:Bounds x="199" y="177" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_14zu6wr_di" bpmnElement="SequenceFlow_14zu6wr">
- <di:waypoint xsi:type="dc:Point" x="953" y="198" />
- <di:waypoint xsi:type="dc:Point" x="990" y="198" />
- <di:waypoint xsi:type="dc:Point" x="990" y="198" />
- <di:waypoint xsi:type="dc:Point" x="1038" y="198" />
+ <di:waypoint x="953" y="198" />
+ <di:waypoint x="990" y="198" />
+ <di:waypoint x="990" y="198" />
+ <di:waypoint x="1038" y="198" />
<bpmndi:BPMNLabel>
<dc:Bounds x="987" y="195" width="20" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0je30si_di" bpmnElement="SequenceFlow_0je30si">
- <di:waypoint xsi:type="dc:Point" x="1138" y="198" />
- <di:waypoint xsi:type="dc:Point" x="1226" y="198" />
+ <di:waypoint x="1138" y="198" />
+ <di:waypoint x="1226" y="198" />
<bpmndi:BPMNLabel>
<dc:Bounds x="1137" y="183" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1fueo69_di" bpmnElement="SequenceFlow_1fueo69">
- <di:waypoint xsi:type="dc:Point" x="928" y="223" />
- <di:waypoint xsi:type="dc:Point" x="928" y="250" />
- <di:waypoint xsi:type="dc:Point" x="928" y="250" />
- <di:waypoint xsi:type="dc:Point" x="928" y="286" />
+ <di:waypoint x="928" y="223" />
+ <di:waypoint x="928" y="250" />
+ <di:waypoint x="928" y="250" />
+ <di:waypoint x="928" y="286" />
<bpmndi:BPMNLabel>
<dc:Bounds x="901" y="228" width="15" height="12" />
</bpmndi:BPMNLabel>
@@ -321,54 +321,54 @@ csi.prepareInitServiceOperationStatus(execution)]]></bpmn:script>
<dc:Bounds x="443" y="434" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1dsbjjb_di" bpmnElement="SequenceFlow_1dsbjjb">
- <di:waypoint xsi:type="dc:Point" x="532" y="727" />
- <di:waypoint xsi:type="dc:Point" x="611" y="727" />
+ <di:waypoint x="532" y="727" />
+ <di:waypoint x="611" y="727" />
<bpmndi:BPMNLabel>
<dc:Bounds x="529.5" y="727" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1yay321_di" bpmnElement="SequenceFlow_1yay321">
- <di:waypoint xsi:type="dc:Point" x="711" y="727" />
- <di:waypoint xsi:type="dc:Point" x="772" y="727" />
+ <di:waypoint x="711" y="727" />
+ <di:waypoint x="772" y="727" />
<bpmndi:BPMNLabel>
<dc:Bounds x="701.5" y="727" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0e1r62n_di" bpmnElement="SequenceFlow_0e1r62n">
- <di:waypoint xsi:type="dc:Point" x="399" y="474" />
- <di:waypoint xsi:type="dc:Point" x="421" y="474" />
- <di:waypoint xsi:type="dc:Point" x="421" y="474" />
- <di:waypoint xsi:type="dc:Point" x="442" y="474" />
+ <di:waypoint x="399" y="474" />
+ <di:waypoint x="421" y="474" />
+ <di:waypoint x="421" y="474" />
+ <di:waypoint x="442" y="474" />
<bpmndi:BPMNLabel>
<dc:Bounds x="391" y="474" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1ysapam_di" bpmnElement="SequenceFlow_1ysapam">
- <di:waypoint xsi:type="dc:Point" x="898" y="474" />
- <di:waypoint xsi:type="dc:Point" x="942" y="474" />
+ <di:waypoint x="898" y="474" />
+ <di:waypoint x="942" y="474" />
<bpmndi:BPMNLabel>
<dc:Bounds x="875" y="459" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0n9pexp_di" bpmnElement="SequenceFlow_0n9pexp">
- <di:waypoint xsi:type="dc:Point" x="543" y="474" />
- <di:waypoint xsi:type="dc:Point" x="570" y="474" />
- <di:waypoint xsi:type="dc:Point" x="570" y="474" />
- <di:waypoint xsi:type="dc:Point" x="621" y="474" />
+ <di:waypoint x="543" y="474" />
+ <di:waypoint x="570" y="474" />
+ <di:waypoint x="570" y="474" />
+ <di:waypoint x="621" y="474" />
<bpmndi:BPMNLabel>
<dc:Bounds x="540" y="474" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_01umodj_di" bpmnElement="SequenceFlow_01umodj">
- <di:waypoint xsi:type="dc:Point" x="721" y="474" />
- <di:waypoint xsi:type="dc:Point" x="798" y="474" />
+ <di:waypoint x="721" y="474" />
+ <di:waypoint x="798" y="474" />
<bpmndi:BPMNLabel>
<dc:Bounds x="715.5" y="459" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1euqjsp_di" bpmnElement="SequenceFlow_1euqjsp">
- <di:waypoint xsi:type="dc:Point" x="373" y="198" />
- <di:waypoint xsi:type="dc:Point" x="446" y="198" />
+ <di:waypoint x="373" y="198" />
+ <di:waypoint x="446" y="198" />
<bpmndi:BPMNLabel>
<dc:Bounds x="364.5" y="177" width="90" height="12" />
</bpmndi:BPMNLabel>
@@ -380,8 +380,8 @@ csi.prepareInitServiceOperationStatus(execution)]]></bpmn:script>
<dc:Bounds x="446" y="158" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_081z8l2_di" bpmnElement="SequenceFlow_081z8l2">
- <di:waypoint xsi:type="dc:Point" x="546" y="198" />
- <di:waypoint xsi:type="dc:Point" x="610" y="198" />
+ <di:waypoint x="546" y="198" />
+ <di:waypoint x="610" y="198" />
<bpmndi:BPMNLabel>
<dc:Bounds x="533" y="177" width="90" height="12" />
</bpmndi:BPMNLabel>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateDeviceResource.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateDeviceResource.bpmn
index 5fd2c69608..29cec8ed1e 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateDeviceResource.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateDeviceResource.bpmn
@@ -93,7 +93,7 @@ dcsi.prepareUpdateProgress(execution)]]></bpmn:script>
<camunda:inputParameter name="headers">
<camunda:map>
<camunda:entry key="content-type">application/soap+xml</camunda:entry>
- <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
</camunda:map>
</camunda:inputParameter>
<camunda:inputParameter name="payload">${CVFMI_updateResOperStatusRequest}</camunda:inputParameter>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateSDNCNetworkResource.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateSDNCNetworkResource.bpmn
index a94569c29b..0bdc6dc0bd 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateSDNCNetworkResource.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateSDNCNetworkResource.bpmn
@@ -62,7 +62,7 @@ dcsi.prepareUpdateBeforeCreateSDNCResource(execution)</bpmn:script>
<camunda:inputParameter name="headers">
<camunda:map>
<camunda:entry key="content-type">application/soap+xml</camunda:entry>
- <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
</camunda:map>
</camunda:inputParameter>
<camunda:inputParameter name="payload">${CVFMI_updateResOperStatusRequest}</camunda:inputParameter>
@@ -84,7 +84,7 @@ dcsi.prepareUpdateBeforeCreateSDNCResource(execution)</bpmn:script>
<camunda:inputParameter name="headers">
<camunda:map>
<camunda:entry key="content-type">application/soap+xml</camunda:entry>
- <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
</camunda:map>
</camunda:inputParameter>
<camunda:inputParameter name="payload">${CVFMI_updateResOperStatusRequest}</camunda:inputParameter>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustService.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustService.bpmn
index 7413e6df83..54f0947d29 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustService.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustService.bpmn
@@ -1,5 +1,5 @@
<?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:camunda="http://camunda.org/schema/1.0/bpmn" 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.11.3" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+<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:camunda="http://camunda.org/schema/1.0/bpmn" 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.10.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
<bpmn2:process id="CreateVcpeResCustService" name="CreateVcpeResCustService" isExecutable="true">
<bpmn2:scriptTask id="sendSyncAckResponse_ScriptTask" name="Send Sync Ack Response" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
@@ -518,6 +518,7 @@ CreateVcpeResCustService.prepareCreateAllottedResourceBRG(execution)]]></bpmn2:s
<camunda:in source="serviceModelInfo" target="serviceModelInfo" />
<camunda:in source="globalSubscriberId" target="globalSubscriberId" />
<camunda:in source="serviceDecomposition" target="serviceDecomposition" />
+ <camunda:in source="vfModuleNames" target="vfModuleNames" />
</bpmn2:extensionElements>
<bpmn2:incoming>SequenceFlow_0ws7fjn</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_1mkdhw9</bpmn2:outgoing>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustServiceV2.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustServiceV2.bpmn
index bfbdc25f18..2dbf12717c 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustServiceV2.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustServiceV2.bpmn
@@ -488,6 +488,7 @@ CreateVcpeResCustService.prepareCreateAllottedResourceTXC(execution)]]></bpmn2:s
<camunda:in source="serviceModelInfo" target="serviceModelInfo" />
<camunda:in source="globalSubscriberId" target="globalSubscriberId" />
<camunda:in source="serviceDecomposition" target="serviceDecomposition" />
+ <camunda:in source="vfModuleNames" target="vfModuleNames" />
</bpmn2:extensionElements>
<bpmn2:incoming>SequenceFlow_0ws7fjn</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_1mkdhw9</bpmn2:outgoing>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeActivateSDNCNetworkResource.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeActivateSDNCNetworkResource.bpmn
index eaf37191d5..cfcd259d7c 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeActivateSDNCNetworkResource.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeActivateSDNCNetworkResource.bpmn
@@ -62,7 +62,7 @@ csi.sendSyncResponse(execution)</bpmn:script>
<camunda:inputParameter name="headers">
<camunda:map>
<camunda:entry key="content-type">application/soap+xml</camunda:entry>
- <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
</camunda:map>
</camunda:inputParameter>
<camunda:inputParameter name="payload">${CVFMI_updateResOperStatusRequest}</camunda:inputParameter>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/Delete3rdONAPE2EServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/Delete3rdONAPE2EServiceInstance.bpmn
index 25fd6af574..f6dcff4435 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/Delete3rdONAPE2EServiceInstance.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/Delete3rdONAPE2EServiceInstance.bpmn
@@ -46,7 +46,7 @@ dcsi.prepareUpdateProgress(execution)]]></bpmn:script>
<camunda:inputParameter name="headers">
<camunda:map>
<camunda:entry key="content-type">application/soap+xml</camunda:entry>
- <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
</camunda:map>
</camunda:inputParameter>
<camunda:inputParameter name="payload">${CVFMI_updateResOperStatusRequest}</camunda:inputParameter>
@@ -82,7 +82,7 @@ dcsi.doDeleteE2ESIin3rdONAP(execution)]]></bpmn:script>
<camunda:inputParameter name="headers">
<camunda:map>
<camunda:entry key="content-type">application/soap+xml</camunda:entry>
- <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
</camunda:map>
</camunda:inputParameter>
<camunda:inputParameter name="payload">${CVFMI_updateResOperStatusRequest}</camunda:inputParameter>
@@ -192,7 +192,7 @@ dcsi.prepareUpdateProgress(execution)]]></bpmn:script>
<camunda:inputParameter name="headers">
<camunda:map>
<camunda:entry key="content-type">application/soap+xml</camunda:entry>
- <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
</camunda:map>
</camunda:inputParameter>
<camunda:inputParameter name="payload">${CVFMI_updateResOperStatusRequest}</camunda:inputParameter>
@@ -303,7 +303,7 @@ dcsi.prepareUpdateProgress(execution)]]></bpmn:script>
<camunda:inputParameter name="headers">
<camunda:map>
<camunda:entry key="content-type">application/soap+xml</camunda:entry>
- <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
</camunda:map>
</camunda:inputParameter>
<camunda:inputParameter name="payload">${CVFMI_updateResOperStatusRequest}</camunda:inputParameter>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteCustomE2EServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteCustomE2EServiceInstance.bpmn
index 2d68d650c5..7010442b5d 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteCustomE2EServiceInstance.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteCustomE2EServiceInstance.bpmn
@@ -152,7 +152,7 @@ csi.prepareInitServiceOperationStatus(execution)]]></bpmn:script>
<camunda:inputParameter name="headers">
<camunda:map>
<camunda:entry key="content-type">application/soap+xml</camunda:entry>
- <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
</camunda:map>
</camunda:inputParameter>
<camunda:inputParameter name="payload">${CVFMI_updateServiceOperStatusRequest}</camunda:inputParameter>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteDeviceResource.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteDeviceResource.bpmn
index 73d38b383c..7d9a9e2b5d 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteDeviceResource.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteDeviceResource.bpmn
@@ -92,7 +92,7 @@ dcsi.prepareUpdateProgress(execution)]]></bpmn:script>
<camunda:inputParameter name="headers">
<camunda:map>
<camunda:entry key="content-type">application/soap+xml</camunda:entry>
- <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
</camunda:map>
</camunda:inputParameter>
<camunda:inputParameter name="payload">${CVFMI_updateResOperStatusRequest}</camunda:inputParameter>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteSDNCNetworkResource.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteSDNCNetworkResource.bpmn
index 80fcc1762e..c2d4de3973 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteSDNCNetworkResource.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteSDNCNetworkResource.bpmn
@@ -58,7 +58,7 @@ dcsi.prepareUpdateBeforeDeleteSDNCResource(execution)</bpmn:script>
<camunda:inputParameter name="headers">
<camunda:map>
<camunda:entry key="content-type">application/soap+xml</camunda:entry>
- <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
</camunda:map>
</camunda:inputParameter>
<camunda:inputParameter name="payload">${CVFMI_updateResOperStatusRequest}</camunda:inputParameter>
@@ -80,7 +80,7 @@ dcsi.prepareUpdateBeforeDeleteSDNCResource(execution)</bpmn:script>
<camunda:inputParameter name="headers">
<camunda:map>
<camunda:entry key="content-type">application/soap+xml</camunda:entry>
- <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
</camunda:map>
</camunda:inputParameter>
<camunda:inputParameter name="payload">${CVFMI_updateResOperStatusRequest}</camunda:inputParameter>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/UpdateCustomE2EServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/UpdateCustomE2EServiceInstance.bpmn
index 1be30d62e4..e2488fda6a 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/UpdateCustomE2EServiceInstance.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/UpdateCustomE2EServiceInstance.bpmn
@@ -136,7 +136,7 @@ csi.sendSyncError(execution)]]></bpmn:script>
<camunda:inputParameter name="headers">
<camunda:map>
<camunda:entry key="content-type">application/soap+xml</camunda:entry>
- <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
</camunda:map>
</camunda:inputParameter>
<camunda:inputParameter name="payload">${CVFMI_updateServiceOperStatusRequest}</camunda:inputParameter>
@@ -246,7 +246,7 @@ csi.prepareInitServiceOperationStatus(execution)]]></bpmn:script>
<camunda:inputParameter name="headers">
<camunda:map>
<camunda:entry key="content-type">application/soap+xml</camunda:entry>
- <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
</camunda:map>
</camunda:inputParameter>
<camunda:inputParameter name="payload">${CVFMI_updateServiceOperStatusRequest}</camunda:inputParameter>
@@ -270,7 +270,7 @@ csi.prepareInitServiceOperationStatus(execution)]]></bpmn:script>
<camunda:inputParameter name="headers">
<camunda:map>
<camunda:entry key="content-type">application/soap+xml</camunda:entry>
- <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
</camunda:map>
</camunda:inputParameter>
<camunda:inputParameter name="payload">${CVFMI_updateServiceOperStatusRequest}</camunda:inputParameter>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn
index 01040ba914..eccb9486dd 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn
@@ -123,7 +123,7 @@ ddsi.preInitResourcesOperStatus(execution)]]></bpmn2:script>
<camunda:inputParameter name="headers">
<camunda:map>
<camunda:entry key="content-type">application/soap+xml</camunda:entry>
- <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
</camunda:map>
</camunda:inputParameter>
<camunda:inputParameter name="payload">${CVFMI_initResOperStatusRequest}</camunda:inputParameter>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2EServiceInstanceV2.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2EServiceInstanceV2.bpmn
index c699f911d0..31174a0b3e 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2EServiceInstanceV2.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2EServiceInstanceV2.bpmn
@@ -284,7 +284,7 @@ ddsi.preUpdateServiceOperationStatus(execution)]]></bpmn2:script>
<camunda:inputParameter name="headers">
<camunda:map>
<camunda:entry key="content-type">application/soap+xml</camunda:entry>
- <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
</camunda:map>
</camunda:inputParameter>
<camunda:inputParameter name="payload">${CVFMI_updateServiceOperStatusRequest}</camunda:inputParameter>
@@ -317,7 +317,7 @@ ddsi.preUpdateServiceOperationStatus(execution)]]></bpmn2:script>
<camunda:inputParameter name="headers">
<camunda:map>
<camunda:entry key="content-type">application/soap+xml</camunda:entry>
- <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
</camunda:map>
</camunda:inputParameter>
<camunda:inputParameter name="payload">${CVFMI_updateServiceOperStatusRequest}</camunda:inputParameter>
@@ -350,7 +350,7 @@ ddsi.preUpdateServiceOperationStatus(execution)]]></bpmn2:script>
<camunda:inputParameter name="headers">
<camunda:map>
<camunda:entry key="content-type">application/soap+xml</camunda:entry>
- <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
</camunda:map>
</camunda:inputParameter>
<camunda:inputParameter name="payload">${CVFMI_updateServiceOperStatusRequest}</camunda:inputParameter>
@@ -381,7 +381,7 @@ ddsi.preInitResourcesOperStatus(execution)]]></bpmn2:script>
<camunda:inputParameter name="headers">
<camunda:map>
<camunda:entry key="content-type">application/soap+xml</camunda:entry>
- <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
</camunda:map>
</camunda:inputParameter>
<camunda:inputParameter name="payload">${CVFMI_initResOperStatusRequest}</camunda:inputParameter>
@@ -404,7 +404,7 @@ ddsi.preInitResourcesOperStatus(execution)]]></bpmn2:script>
<camunda:inputParameter name="headers">
<camunda:map>
<camunda:entry key="content-type">application/soap+xml</camunda:entry>
- <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
</camunda:map>
</camunda:inputParameter>
<camunda:inputParameter name="payload">${CVFMI_updateServiceOperStatusRequest}</camunda:inputParameter>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVnfAndModules.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVnfAndModules.bpmn
index b5988538e3..016aaa20d2 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVnfAndModules.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVnfAndModules.bpmn
@@ -1,5 +1,5 @@
<?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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0">
+<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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0">
<bpmn:process id="DoCreateVnfAndModules" name="DoCreateVnfAndModules" isExecutable="true">
<bpmn:startEvent id="StartEvent_1">
<bpmn:outgoing>SequenceFlow_0o4vuzt</bpmn:outgoing>
@@ -42,7 +42,8 @@ doCreateVnfAndModules.preProcessRequest(execution)]]></bpmn:script>
<camunda:in source="false" target="usePreload" />
<camunda:in source="aLaCarte" target="aLaCarte" />
</bpmn:extensionElements>
- <bpmn:incoming>SequenceFlow_1hf7k7q</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_0tbhtk8</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_10nwzbe</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1ixcnb6</bpmn:outgoing>
</bpmn:callActivity>
<bpmn:sequenceFlow id="SequenceFlow_0o4vuzt" sourceRef="StartEvent_1" targetRef="PreProcessRequest" />
@@ -79,6 +80,7 @@ doCreateVnfAndModules.preProcessRequest(execution)]]></bpmn:script>
<camunda:in source="aLaCarte" target="aLaCarte" />
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_1lh21yl</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_12ffqm1</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1llbx0k</bpmn:outgoing>
</bpmn:callActivity>
<bpmn:scriptTask id="Task_1lfmdks" name="Validate Create Add-On VF Module Response" scriptFormat="groovy">
@@ -132,7 +134,7 @@ doCreateVnfAndModules.validateAddOnModule(execution)]]></bpmn:script>
<camunda:in source="vnfResourceDecomposition" target="vnfResourceDecomposition" />
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_19ohb1a</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_07u8e3l</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_0oxfrrr</bpmn:outgoing>
</bpmn:callActivity>
<bpmn:scriptTask id="PreProcessAddOnModule" name="PreProcess Add-On Module" scriptFormat="groovy">
<bpmn:incoming>SequenceFlow_0jz6bqn</bpmn:incoming>
@@ -157,12 +159,11 @@ doCreateVnfAndModules.queryCatalogDB(execution)]]></bpmn:script>
<bpmn:sequenceFlow id="SequenceFlow_0jz6bqn" name="yes" sourceRef="ExclusiveGateway_1vyqr5o" targetRef="PreProcessAddOnModule">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("addOnModulesDeployed") < execution.getVariable("addOnModulesToDeploy")}]]></bpmn:conditionExpression>
</bpmn:sequenceFlow>
- <bpmn:sequenceFlow id="SequenceFlow_0kld3qt" name="yes" sourceRef="ExclusiveGateway_1hx9s0y" targetRef="GenerateAddOnModuleName">
+ <bpmn:sequenceFlow id="SequenceFlow_0kld3qt" name="yes" sourceRef="ExclusiveGateway_1hx9s0y" targetRef="ExclusiveGateway_03anzqd">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("instancesOfThisModuleDeployed") < execution.getVariable("initialCount")}]]></bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="SequenceFlow_1mguf2m" sourceRef="Task_1lfmdks" targetRef="ExclusiveGateway_1hx9s0y" />
<bpmn:sequenceFlow id="SequenceFlow_1vrogpr" name="no" sourceRef="ExclusiveGateway_1hx9s0y" targetRef="PostProcessAddOnModule" />
- <bpmn:sequenceFlow id="SequenceFlow_1hf7k7q" sourceRef="GenerateBaseModuleName" targetRef="CreateBaseVfModule" />
<bpmn:callActivity id="GenerateBaseModuleName" name="Generate Base Module Name" calledElement="GenerateVfModuleName">
<bpmn:extensionElements>
<camunda:in source="vnfId" target="vnfId" />
@@ -173,8 +174,8 @@ doCreateVnfAndModules.queryCatalogDB(execution)]]></bpmn:script>
<camunda:out source="WorkflowException" target="WorkflowException" />
<camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
</bpmn:extensionElements>
- <bpmn:incoming>SequenceFlow_07u8e3l</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_1hf7k7q</bpmn:outgoing>
+ <bpmn:incoming>SequenceFlow_19ecf9p</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0tbhtk8</bpmn:outgoing>
</bpmn:callActivity>
<bpmn:callActivity id="GenerateAddOnModuleName" name="Generate Add-On Module Name" calledElement="GenerateVfModuleName">
<bpmn:extensionElements>
@@ -186,7 +187,7 @@ doCreateVnfAndModules.queryCatalogDB(execution)]]></bpmn:script>
<camunda:out source="WorkflowException" target="WorkflowException" />
<camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
</bpmn:extensionElements>
- <bpmn:incoming>SequenceFlow_0kld3qt</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_0ulldxo</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1lh21yl</bpmn:outgoing>
</bpmn:callActivity>
<bpmn:sequenceFlow id="SequenceFlow_1lh21yl" sourceRef="GenerateAddOnModuleName" targetRef="CreateAddOnVfModule" />
@@ -240,7 +241,6 @@ dcvam.postProcessRollback(execution)]]></bpmn:script>
</bpmn:startEvent>
</bpmn:subProcess>
<bpmn:sequenceFlow id="SequenceFlow_19ohb1a" sourceRef="QueryCatalogDB" targetRef="CreateVNF" />
- <bpmn:sequenceFlow id="SequenceFlow_07u8e3l" sourceRef="CreateVNF" targetRef="GenerateBaseModuleName" />
<bpmn:sequenceFlow id="SequenceFlow_0j52dxv" sourceRef="PostProcessAddOnModule" targetRef="ExclusiveGateway_1vyqr5o" />
<bpmn:scriptTask id="PostProcessAddOnModule" name="PostProcess Add-On Module" scriptFormat="groovy">
<bpmn:incoming>SequenceFlow_1vrogpr</bpmn:incoming>
@@ -250,9 +250,9 @@ def doCreateVnfAndModules = new DoCreateVnfAndModules()
doCreateVnfAndModules.postProcessAddOnModule(execution)]]></bpmn:script>
</bpmn:scriptTask>
<bpmn:sequenceFlow id="SequenceFlow_1t407j7" sourceRef="Task_1mrb29r" targetRef="Task_0qrf3e8" />
- <bpmn:sequenceFlow id="SequenceFlow_0baw1tl" sourceRef="Task_0qrf3e8" targetRef="GenerateBaseModuleName" />
+ <bpmn:sequenceFlow id="SequenceFlow_0baw1tl" sourceRef="Task_0qrf3e8" targetRef="ExclusiveGateway_06ccv8x" />
<bpmn:scriptTask id="Task_1mrb29r" name="Create Platform" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_07u8e3l</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_0oxfrrr</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1t407j7</bpmn:outgoing>
<bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
def doCreateVnfAndModules = new DoCreateVnfAndModules()
@@ -265,6 +265,26 @@ doCreateVnfAndModules.createPlatform(execution)]]></bpmn:script>
def doCreateVnfAndModules = new DoCreateVnfAndModules()
doCreateVnfAndModules.createLineOfBusiness(execution)]]></bpmn:script>
</bpmn:scriptTask>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_06ccv8x" name="Need to Generate Name?" default="SequenceFlow_10nwzbe">
+ <bpmn:incoming>SequenceFlow_0baw1tl</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_19ecf9p</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_10nwzbe</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_19ecf9p" name="yes" sourceRef="ExclusiveGateway_06ccv8x" targetRef="GenerateBaseModuleName">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("baseVfModuleName") == null}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_0tbhtk8" sourceRef="GenerateBaseModuleName" targetRef="CreateBaseVfModule" />
+ <bpmn:sequenceFlow id="SequenceFlow_10nwzbe" name="no" sourceRef="ExclusiveGateway_06ccv8x" targetRef="CreateBaseVfModule" />
+ <bpmn:exclusiveGateway id="ExclusiveGateway_03anzqd" name="Need to Generate Name?" default="SequenceFlow_12ffqm1">
+ <bpmn:incoming>SequenceFlow_0kld3qt</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0ulldxo</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_12ffqm1</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_0ulldxo" name="yes" sourceRef="ExclusiveGateway_03anzqd" targetRef="GenerateAddOnModuleName">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("addOnVfModuleName") == null}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_12ffqm1" name="no" sourceRef="ExclusiveGateway_03anzqd" targetRef="CreateAddOnVfModule" />
+ <bpmn:sequenceFlow id="SequenceFlow_0oxfrrr" sourceRef="CreateVNF" targetRef="Task_1mrb29r" />
</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" />
@@ -303,16 +323,16 @@ doCreateVnfAndModules.createLineOfBusiness(execution)]]></bpmn:script>
<dc:Bounds x="2239" y="57" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="EndEvent_1h41bs7_di" bpmnElement="EndEvent_0v6povc">
- <dc:Bounds x="2362" y="147" width="36" height="36" />
+ <dc:Bounds x="1524" y="37" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="2380" y="183" width="0" height="0" />
+ <dc:Bounds x="1497" y="73" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1llbx0k_di" bpmnElement="SequenceFlow_1llbx0k">
<di:waypoint xsi:type="dc:Point" x="2200" y="97" />
<di:waypoint xsi:type="dc:Point" x="2239" y="97" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="2220" y="82" width="0" height="0" />
+ <dc:Bounds x="2175" y="82" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ExclusiveGateway_1vyqr5o_di" bpmnElement="ExclusiveGateway_1vyqr5o" isMarkerVisible="true">
@@ -323,11 +343,9 @@ doCreateVnfAndModules.createLineOfBusiness(execution)]]></bpmn:script>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_132bohl_di" bpmnElement="SequenceFlow_132bohl">
<di:waypoint xsi:type="dc:Point" x="1542" y="140" />
- <di:waypoint xsi:type="dc:Point" x="1542" y="36" />
- <di:waypoint xsi:type="dc:Point" x="2380" y="36" />
- <di:waypoint xsi:type="dc:Point" x="2380" y="147" />
+ <di:waypoint xsi:type="dc:Point" x="1542" y="73" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1962" y="21" width="16" height="12" />
+ <dc:Bounds x="1548" y="98.99999999999997" width="16" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="CallActivity_0zr4ioh_di" bpmnElement="CreateVNF">
@@ -356,10 +374,10 @@ doCreateVnfAndModules.createLineOfBusiness(execution)]]></bpmn:script>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0kld3qt_di" bpmnElement="SequenceFlow_0kld3qt">
<di:waypoint xsi:type="dc:Point" x="1869" y="140" />
- <di:waypoint xsi:type="dc:Point" x="1869" y="89" />
- <di:waypoint xsi:type="dc:Point" x="1952" y="89" />
+ <di:waypoint xsi:type="dc:Point" x="1869" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1974" y="97" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1886" y="96" width="16" height="12" />
+ <dc:Bounds x="1890.6265060240964" y="103.99999999999983" width="20" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1mguf2m_di" bpmnElement="SequenceFlow_1mguf2m">
@@ -377,27 +395,21 @@ doCreateVnfAndModules.createLineOfBusiness(execution)]]></bpmn:script>
<di:waypoint xsi:type="dc:Point" x="1869" y="301" />
<di:waypoint xsi:type="dc:Point" x="1751" y="301" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1878" y="247" width="14" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1hf7k7q_di" bpmnElement="SequenceFlow_1hf7k7q">
- <di:waypoint xsi:type="dc:Point" x="1191" y="165" />
- <di:waypoint xsi:type="dc:Point" x="1239" y="165" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1215" y="150" width="0" height="0" />
+ <dc:Bounds x="1878" y="247" width="15" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="CallActivity_0rz8zl9_di" bpmnElement="GenerateBaseModuleName">
- <dc:Bounds x="1091" y="125" width="100" height="80" />
+ <dc:Bounds x="1077" y="245" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="CallActivity_0otq8mo_di" bpmnElement="GenerateAddOnModuleName">
- <dc:Bounds x="1952" y="57" width="100" height="80" />
+ <dc:Bounds x="1949" y="-53" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1lh21yl_di" bpmnElement="SequenceFlow_1lh21yl">
- <di:waypoint xsi:type="dc:Point" x="2052" y="97" />
- <di:waypoint xsi:type="dc:Point" x="2100" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="2049" y="-13" />
+ <di:waypoint xsi:type="dc:Point" x="2150" y="-13" />
+ <di:waypoint xsi:type="dc:Point" x="2150" y="57" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="2076" y="82" width="0" height="0" />
+ <dc:Bounds x="2054.5" y="-28" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_12x4dvf_di" bpmnElement="SequenceFlow_12x4dvf">
@@ -485,13 +497,6 @@ doCreateVnfAndModules.createLineOfBusiness(execution)]]></bpmn:script>
<dc:Bounds x="546" y="140" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_07u8e3l_di" bpmnElement="SequenceFlow_07u8e3l">
- <di:waypoint xsi:type="dc:Point" x="674" y="165" />
- <di:waypoint xsi:type="dc:Point" x="742" y="165" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="708" y="150" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0j52dxv_di" bpmnElement="SequenceFlow_0j52dxv">
<di:waypoint xsi:type="dc:Point" x="1651" y="301" />
<di:waypoint xsi:type="dc:Point" x="1543" y="301" />
@@ -512,9 +517,9 @@ doCreateVnfAndModules.createLineOfBusiness(execution)]]></bpmn:script>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0baw1tl_di" bpmnElement="SequenceFlow_0baw1tl">
<di:waypoint xsi:type="dc:Point" x="1016" y="165" />
- <di:waypoint xsi:type="dc:Point" x="1091" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="1100" y="165" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1054" y="150" width="0" height="0" />
+ <dc:Bounds x="1013" y="150" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ScriptTask_0i9vj5o_di" bpmnElement="Task_1mrb29r">
@@ -523,6 +528,63 @@ doCreateVnfAndModules.createLineOfBusiness(execution)]]></bpmn:script>
<bpmndi:BPMNShape id="ScriptTask_0stghuy_di" bpmnElement="Task_0qrf3e8">
<dc:Bounds x="916" y="125" width="100" height="80" />
</bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_06ccv8x_di" bpmnElement="ExclusiveGateway_06ccv8x" isMarkerVisible="true">
+ <dc:Bounds x="1102" y="140" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1083" y="102" width="87" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_19ecf9p_di" bpmnElement="SequenceFlow_19ecf9p">
+ <di:waypoint xsi:type="dc:Point" x="1127" y="190" />
+ <di:waypoint xsi:type="dc:Point" x="1127" y="215" />
+ <di:waypoint xsi:type="dc:Point" x="1127" y="215" />
+ <di:waypoint xsi:type="dc:Point" x="1127" y="245" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1132" y="209" width="20" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0tbhtk8_di" bpmnElement="SequenceFlow_0tbhtk8">
+ <di:waypoint xsi:type="dc:Point" x="1177" y="285" />
+ <di:waypoint xsi:type="dc:Point" x="1289" y="285" />
+ <di:waypoint xsi:type="dc:Point" x="1289" y="205" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1233" y="264" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_10nwzbe_di" bpmnElement="SequenceFlow_10nwzbe">
+ <di:waypoint xsi:type="dc:Point" x="1152" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="1239" y="165" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1188" y="144" width="15" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_03anzqd_di" bpmnElement="ExclusiveGateway_03anzqd" isMarkerVisible="true">
+ <dc:Bounds x="1973.884115884116" y="71.89710289710288" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1957" y="126" width="87" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ulldxo_di" bpmnElement="SequenceFlow_0ulldxo">
+ <di:waypoint xsi:type="dc:Point" x="1999" y="72" />
+ <di:waypoint xsi:type="dc:Point" x="1999" y="27" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2004" y="44" width="20" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_12ffqm1_di" bpmnElement="SequenceFlow_12ffqm1">
+ <di:waypoint xsi:type="dc:Point" x="2024" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="2100" y="97" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2055" y="76" width="15" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0oxfrrr_di" bpmnElement="SequenceFlow_0oxfrrr">
+ <di:waypoint xsi:type="dc:Point" x="674" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="742" y="165" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="708" y="144" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstance.bpmn
index 2e12dd3b96..1b02fd772d 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstance.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstance.bpmn
@@ -99,7 +99,7 @@ ddsi.preInitResourcesOperStatus(execution)]]></bpmn:script>
<camunda:inputParameter name="headers">
<camunda:map>
<camunda:entry key="content-type">application/soap+xml</camunda:entry>
- <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
</camunda:map>
</camunda:inputParameter>
<camunda:inputParameter name="payload">${CVFMI_initResOperStatusRequest}</camunda:inputParameter>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstanceV2.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstanceV2.bpmn
index 2df19abf68..cc927b240b 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstanceV2.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstanceV2.bpmn
@@ -245,7 +245,7 @@ ddsi.preUpdateServiceOperationStatus(execution)]]></bpmn:script>
<camunda:inputParameter name="headers">
<camunda:map>
<camunda:entry key="content-type">application/soap+xml</camunda:entry>
- <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
</camunda:map>
</camunda:inputParameter>
<camunda:inputParameter name="payload">${CVFMI_updateServiceOperStatusRequest}</camunda:inputParameter>
@@ -278,7 +278,7 @@ ddsi.preUpdateServiceOperationStatus(execution)]]></bpmn:script>
<camunda:inputParameter name="headers">
<camunda:map>
<camunda:entry key="content-type">application/soap+xml</camunda:entry>
- <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
</camunda:map>
</camunda:inputParameter>
<camunda:inputParameter name="payload">${CVFMI_updateServiceOperStatusRequest}</camunda:inputParameter>
@@ -310,7 +310,7 @@ ddsi.preUpdateServiceOperationStatus(execution)]]></bpmn:script>
<camunda:inputParameter name="headers">
<camunda:map>
<camunda:entry key="content-type">application/soap+xml</camunda:entry>
- <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
</camunda:map>
</camunda:inputParameter>
<camunda:inputParameter name="payload">${CVFMI_updateServiceOperStatusRequest}</camunda:inputParameter>
@@ -349,7 +349,7 @@ ddsi.preUpdateServiceOperationStatus(execution)]]></bpmn:script>
<camunda:inputParameter name="headers">
<camunda:map>
<camunda:entry key="content-type">application/soap+xml</camunda:entry>
- <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
</camunda:map>
</camunda:inputParameter>
<camunda:inputParameter name="payload">${CVFMI_updateServiceOperStatusRequest}</camunda:inputParameter>
@@ -380,7 +380,7 @@ ddsi.preInitResourcesOperStatus(execution)]]></bpmn:script>
<camunda:inputParameter name="headers">
<camunda:map>
<camunda:entry key="content-type">application/soap+xml</camunda:entry>
- <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
</camunda:map>
</camunda:inputParameter>
<camunda:inputParameter name="payload">${CVFMI_initResOperStatusRequest}</camunda:inputParameter>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteE2EServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteE2EServiceInstance.bpmn
index 6084f570ce..9f9d58fa19 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteE2EServiceInstance.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteE2EServiceInstance.bpmn
@@ -66,7 +66,7 @@ ddsi.preInitResourcesOperStatus(execution)]]></bpmn:script>
<camunda:inputParameter name="headers">
<camunda:map>
<camunda:entry key="content-type">application/soap+xml</camunda:entry>
- <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
</camunda:map>
</camunda:inputParameter>
<camunda:inputParameter name="payload">${CVFMI_initResOperStatusRequest}</camunda:inputParameter>
@@ -206,12 +206,12 @@ dcsi.postDecomposeService(execution)]]></bpmn:script>
<bpmn:scriptTask id="ScriptTask_0f3tjbn" name="prepare update service operation status" scriptFormat="groovy">
<bpmn:incoming>SequenceFlow_0h5c1bd</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1ab3vex</bpmn:outgoing>
- <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
execution.setVariable("progress", "100")
execution.setVariable("result", "finished")
execution.setVariable("operationContent", "No actual resoure in service instance")
def csi= new DoDeleteE2EServiceInstance()
-csi.prepareUpdateServiceOperationStatus(execution)</bpmn:script>
+csi.prepareUpdateServiceOperationStatus(execution)]]></bpmn:script>
</bpmn:scriptTask>
<bpmn:intermediateCatchEvent id="IntermediateCatchEvent_0hrkmxb" name="End Delete Process">
<bpmn:outgoing>SequenceFlow_0h5c1bd</bpmn:outgoing>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteResourcesV1.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteResourcesV1.bpmn
index fe5e93cbec..16acb0d7e1 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteResourcesV1.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteResourcesV1.bpmn
@@ -119,7 +119,7 @@ ddrs.preProcessRequest(execution)]]></bpmn:script>
<camunda:inputParameter name="headers">
<camunda:map>
<camunda:entry key="content-type">application/soap+xml</camunda:entry>
- <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
</camunda:map>
</camunda:inputParameter>
<camunda:inputParameter name="payload">${CVFMI_updateResOperStatusRequest}</camunda:inputParameter>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoScaleE2EServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoScaleE2EServiceInstance.bpmn
index fa8a2213b0..dddbe18ba5 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoScaleE2EServiceInstance.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoScaleE2EServiceInstance.bpmn
@@ -30,7 +30,7 @@ ddsi.preInitResourcesOperStatus(execution)]]></bpmn:script>
<camunda:inputParameter name="headers">
<camunda:map>
<camunda:entry key="content-type">application/soap+xml</camunda:entry>
- <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
</camunda:map>
</camunda:inputParameter>
<camunda:inputParameter name="payload">${CVFMI_initResOperStatusRequest}</camunda:inputParameter>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateE2EServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateE2EServiceInstance.bpmn
index 8383ccbd1f..785db75fa1 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateE2EServiceInstance.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateE2EServiceInstance.bpmn
@@ -67,7 +67,7 @@ ddsi.preInitResourcesOperStatus(execution)]]></bpmn2:script>
<camunda:inputParameter name="headers">
<camunda:map>
<camunda:entry key="content-type">application/soap+xml</camunda:entry>
- <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
</camunda:map>
</camunda:inputParameter>
<camunda:inputParameter name="payload">${CVFMI_initResOperStatusRequest}</camunda:inputParameter>
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/activity/ExecuteActivity.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/activity/ExecuteActivity.java
index 94eead2d05..acef0cb354 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/activity/ExecuteActivity.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/activity/ExecuteActivity.java
@@ -84,6 +84,7 @@ public class ExecuteActivity implements JavaDelegate {
variables.put("buildingBlock", executeBuildingBlock);
variables.put("mso-request-id", requestId);
variables.put("retryCount", 1);
+ variables.put("aLaCarte", true);
ProcessInstanceWithVariables buildingBlockResult = runtimeService.createProcessInstanceByKey("ExecuteBuildingBlock").setVariables(variables).executeWithVariablesInReturn();
VariableMap variableMap = buildingBlockResult.getVariables();
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheck.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheck.java
index 2dae820e95..4f2e2c98d2 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheck.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheck.java
@@ -21,7 +21,10 @@ package org.onap.so.bpmn.infrastructure.flowspecific.tasks;
import java.util.HashMap;
import java.util.Optional;
-
+import java.net.HttpURLConnection;
+import java.net.SocketTimeoutException;
+import org.apache.http.conn.ConnectTimeoutException;
+import org.camunda.bpm.engine.delegate.BpmnError;
import org.onap.appc.client.lcm.model.Action;
import org.onap.so.bpmn.common.BuildingBlockExecution;
import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
@@ -105,10 +108,22 @@ public class GenericVnfHealthCheck {
appCClient.runAppCCommand(action, msoRequestId, vnfId, payload, payloadInfo, controllerType);
appcCode = appCClient.getErrorCode();
appcMessage = appCClient.getErrorMessage();
-
+ } catch (BpmnError ex) {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Caught exception in GenericVnfHealthCheck", "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + ex);
+ appcMessage = ex.getMessage();
+ exceptionUtil.buildAndThrowWorkflowException(execution, Integer.parseInt(appcCode), appcMessage);
} catch (Exception e) {
- msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "Caught exception in runAppcCommand in GenericVnfHealthCheck", "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "APPC Error", e);
- appcMessage = e.getMessage();
+ if (e instanceof java.util.concurrent.TimeoutException )
+ {
+ appcMessage = "Request to APPC timed out. ";
+ msoLogger.error(MessageEnum.RA_CONNECTION_EXCEPTION, "Caught timedOut exception in runAppcCommand in GenericVnfHealthCheck", "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "APPC Error", e);
+ throw e;
+ }
+ else {
+ msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "Caught exception in runAppcCommand in GenericVnfHealthCheck", "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "APPC Error", e);
+ appcMessage = e.getMessage();
+ exceptionUtil.buildAndThrowWorkflowException(execution, Integer.parseInt(appcCode), appcMessage);
+ }
}
msoLogger.error("Error Message: " + appcMessage);
msoLogger.error("ERROR CODE: " + appcCode);
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/OrchestrationStatusValidator.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/OrchestrationStatusValidator.java
index b0063c1da1..2065dfb71e 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/OrchestrationStatusValidator.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/OrchestrationStatusValidator.java
@@ -105,6 +105,10 @@ public class OrchestrationStatusValidator {
org.onap.so.bpmn.servicedecomposition.bbobjects.Configuration configuration = extractPojosForBB.extractByKey(execution, ResourceKey.CONFIGURATION_ID, execution.getLookupMap().get(ResourceKey.CONFIGURATION_ID));
orchestrationStatus = configuration.getOrchestrationStatus();
break;
+ case NO_VALIDATE:
+ //short circuit and exit method
+ execution.setVariable(ORCHESTRATION_STATUS_VALIDATION_RESULT, OrchestrationStatusValidationDirective.VALIDATION_SKIPPED);
+ return;
default:
// can't currently get here, so not tested. Added in case enum is expanded without a change to this code
throw new OrchestrationStatusValidationException(String.format(UNKNOWN_RESOURCE_TYPE, buildingBlockFlowName, buildingBlockDetail.getResourceType(), buildingBlockDetail.getTargetAction()));
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapper.java
index 93e588f2e1..701817ab58 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapper.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapper.java
@@ -29,6 +29,7 @@ import java.util.UUID;
import javax.annotation.PostConstruct;
+import org.apache.commons.lang3.StringUtils;
import org.onap.sdnc.northbound.client.model.GenericResourceApiParam;
import org.onap.sdnc.northbound.client.model.GenericResourceApiParamParam;
import org.onap.sdnc.northbound.client.model.GenericResourceApiVfModuleTopology;
@@ -92,7 +93,12 @@ public class VnfAdapterObjectMapper {
deleteVolumeGroupRequest.setCloudSiteId(cloudRegion.getLcpCloudRegionId());
deleteVolumeGroupRequest.setTenantId(cloudRegion.getTenantId());
deleteVolumeGroupRequest.setVolumeGroupId(volumeGroup.getVolumeGroupId());
- deleteVolumeGroupRequest.setVolumeGroupStackId(volumeGroup.getHeatStackId());
+ if (!StringUtils.isEmpty(volumeGroup.getHeatStackId())){
+ deleteVolumeGroupRequest.setVolumeGroupStackId(volumeGroup.getHeatStackId());
+ } else
+ {
+ deleteVolumeGroupRequest.setVolumeGroupStackId(volumeGroup.getVolumeGroupName());
+ }
deleteVolumeGroupRequest.setSkipAAI(true);
deleteVolumeGroupRequest.setMsoRequest(createMsoRequest(requestContext, serviceInstance));
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheckTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheckTest.java
index e17859969d..7fdf2535bf 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheckTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheckTest.java
@@ -35,6 +35,7 @@ import java.util.UUID;
import org.camunda.bpm.engine.delegate.BpmnError;
import org.junit.Before;
+import org.junit.Ignore;
import org.junit.Test;
import org.mockito.ArgumentMatchers;
import org.mockito.InjectMocks;
@@ -142,4 +143,34 @@ public class GenericVnfHealthCheckTest extends BaseTaskTest {
genericVnfHealthCheck.callAppcClient(execution);
verify(appCClient, times(1)).runAppCCommand(action, msoRequestId, vnfId, Optional.of(payload), payloadInfo, controllerType);
}
+
+ @Test
+ @Ignore //The runAppCCommand method in not capable of throwing this exception
+ public void callAppcClientTimeOutExceptionTest() {
+ expectedException.expect(java.util.concurrent.TimeoutException.class);
+ Action action = Action.HealthCheck;
+ String vnfId = genericVnf.getVnfId();
+ String payload = "{\"testName\":\"testValue\",}";
+ String controllerType = "testType";
+ HashMap<String, String> payloadInfo = new HashMap<String, String>();
+ payloadInfo.put("vnfName", "testVnfName");
+ payloadInfo.put("vfModuleId", "testVfModuleId");
+ payloadInfo.put("oamIpAddress", "testOamIpAddress");
+ payloadInfo.put("vnfHostIpAddress", "testOamIpAddress");
+ execution.setVariable("action", Action.HealthCheck.toString());
+ execution.setVariable("msoRequestId", msoRequestId);
+ execution.setVariable("controllerType", controllerType);
+ execution.setVariable("vnfId", "testVnfId1");
+ execution.setVariable("vnfName", "testVnfName");
+ execution.setVariable("vfModuleId", "testVfModuleId");
+ execution.setVariable("oamIpAddress", "testOamIpAddress");
+ execution.setVariable("vnfHostIpAddress", "testOamIpAddress");
+ execution.setVariable("payload", payload);
+
+ doThrow(java.util.concurrent.TimeoutException.class).when(appCClient).runAppCCommand(action, msoRequestId, vnfId, Optional.of(payload), payloadInfo, controllerType);
+
+
+ genericVnfHealthCheck.callAppcClient(execution);
+ verify(appCClient, times(1)).runAppCCommand(action, msoRequestId, vnfId, Optional.of(payload), payloadInfo, controllerType);
+ }
}
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/OrchestrationStatusValidatorUnitTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/OrchestrationStatusValidatorUnitTest.java
new file mode 100644
index 0000000000..4ace2727be
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/OrchestrationStatusValidatorUnitTest.java
@@ -0,0 +1,45 @@
+package org.onap.so.bpmn.infrastructure.workflow.tasks;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.junit.Assert.assertThat;
+import static org.mockito.Mockito.when;
+
+import org.camunda.bpm.extension.mockito.delegate.DelegateExecutionFake;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.runners.MockitoJUnitRunner;
+import org.onap.so.bpmn.common.BuildingBlockExecution;
+import org.onap.so.bpmn.common.DelegateExecutionImpl;
+import org.onap.so.db.catalog.beans.BuildingBlockDetail;
+import org.onap.so.db.catalog.beans.OrchestrationAction;
+import org.onap.so.db.catalog.beans.OrchestrationStatusValidationDirective;
+import org.onap.so.db.catalog.beans.ResourceType;
+import org.onap.so.db.catalog.client.CatalogDbClient;
+
+@RunWith(MockitoJUnitRunner.class)
+public class OrchestrationStatusValidatorUnitTest {
+
+ @Mock
+ private CatalogDbClient catalogDbClient;
+
+ @InjectMocks
+ private OrchestrationStatusValidator validator;
+ @Test
+ public void skipValidationTest() {
+ BuildingBlockDetail bbDetail = new BuildingBlockDetail();
+ bbDetail.setBuildingBlockName("customBB");
+ bbDetail.setResourceType(ResourceType.NO_VALIDATE);
+ bbDetail.setTargetAction(OrchestrationAction.CUSTOM);
+ when(catalogDbClient.getBuildingBlockDetail("customBB")).thenReturn(bbDetail);
+ BuildingBlockExecution execution = new DelegateExecutionImpl(new DelegateExecutionFake());
+ execution.setVariable("flowToBeCalled", "customBB");
+ execution.setVariable("aLaCarte", false);
+ validator.validateOrchestrationStatus(execution);
+
+
+ assertThat(execution.getVariable("orchestrationStatusValidationResult"), equalTo(OrchestrationStatusValidationDirective.VALIDATION_SKIPPED));
+ }
+
+}
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapperTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapperTest.java
index 99e76450af..339e9cbf17 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapperTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapperTest.java
@@ -230,7 +230,16 @@ public class VnfAdapterObjectMapperTest {
}
@Test
- public void test_deleteVolumeGroupRequestMapper() throws Exception {
+ public void test_deleteVolumeGroupHeatIdRequestMapper() throws Exception{
+ this.test_deleteVolumeGroupRequestMapper("heatStackId");
+ }
+
+ @Test
+ public void test_deleteVolumeGroupNoHeatIdRequestMapper() throws Exception{
+ this.test_deleteVolumeGroupRequestMapper(null);
+ }
+
+ private void test_deleteVolumeGroupRequestMapper(String heatStackId) throws Exception {
DeleteVolumeGroupRequest expectedDeleteVolumeGroupRequest = new DeleteVolumeGroupRequest();
CloudRegion cloudRegion = new CloudRegion();
@@ -244,8 +253,13 @@ public class VnfAdapterObjectMapperTest {
volumeGroup.setVolumeGroupId("volumeGroupId");
expectedDeleteVolumeGroupRequest.setVolumeGroupId(volumeGroup.getVolumeGroupId());
- volumeGroup.setHeatStackId("heatStackId");
- expectedDeleteVolumeGroupRequest.setVolumeGroupStackId(volumeGroup.getHeatStackId());
+ if (heatStackId != null){
+ volumeGroup.setHeatStackId("heatStackId");
+ expectedDeleteVolumeGroupRequest.setVolumeGroupStackId(volumeGroup.getHeatStackId());
+ } else {
+ volumeGroup.setVolumeGroupName("volumeGroupName");
+ expectedDeleteVolumeGroupRequest.setVolumeGroupStackId(volumeGroup.getVolumeGroupName());
+ }
expectedDeleteVolumeGroupRequest.setSkipAAI(true);
@@ -269,7 +283,7 @@ public class VnfAdapterObjectMapperTest {
assertThat(actualDeleteVolumeGroupRequest, sameBeanAs(expectedDeleteVolumeGroupRequest));
}
-
+
@Test
@Ignore
public void test_createVolumeGroupParams() throws Exception {
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapperPayloadTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapperPayloadTest.java
index 32a495e094..a156c382d1 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapperPayloadTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapperPayloadTest.java
@@ -845,7 +845,7 @@ public class VnfAdapterVfModuleObjectMapperPayloadTest {
jsonToCompare,
DeleteVfModuleRequest.class);
- assertThat(vfModuleVNFAdapterRequest, sameBeanAs(reqMapper1).ignoring("messageId").ignoring("notificationUrl"));
+ assertThat(vfModuleVNFAdapterRequest, sameBeanAs(reqMapper1).ignoring("messageId").ignoring("notificationUrl").ignoring("vfModuleStackId"));
}
@Test
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapperTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapperTest.java
index 85750874dd..160feed426 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapperTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapperTest.java
@@ -43,7 +43,7 @@ import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule;
import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext;
import org.onap.so.entity.MsoRequest;
-public class VnfAdapterVfModuleObjectMapperTest{
+public class VnfAdapterVfModuleObjectMapperTest {
@Spy
private VnfAdapterVfModuleObjectMapper mapper = new VnfAdapterVfModuleObjectMapper();