summaryrefslogtreecommitdiffstats
path: root/bpmn/MSOInfrastructureBPMN
diff options
context:
space:
mode:
authorSeshu Kumar M <seshu.kumar.m@huawei.com>2018-05-30 04:59:16 +0000
committerGerrit Code Review <gerrit@onap.org>2018-05-30 04:59:16 +0000
commitf341814348f794518bce5653357dab39bfe46916 (patch)
treed6875bd7ad2172407a19fd43008836b119154522 /bpmn/MSOInfrastructureBPMN
parent97c02aa6319b112ba45b55f16d2de96b783eac2b (diff)
parent8425c0116bd683792d4e6fe20b5a37f091d1cb86 (diff)
Merge "Fix OOF Homing Interface"
Diffstat (limited to 'bpmn/MSOInfrastructureBPMN')
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy60
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVcpeResCustService.bpmn1
2 files changed, 41 insertions, 20 deletions
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy
index ce117d3655..8844924bad 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy
@@ -76,6 +76,7 @@ public class CreateVcpeResCustService extends AbstractServiceTaskProcessor {
execution.setVariable("homingService", "")
execution.setVariable("cloudOwner", "")
execution.setVariable("cloudRegionId", "")
+ execution.setVariable("homingModelIds", "")
//TODO
execution.setVariable("sdncVersion", "1707")
@@ -199,28 +200,47 @@ public class CreateVcpeResCustService extends AbstractServiceTaskProcessor {
def userParams = reqMap.requestDetails?.requestParameters?.userParams
Map<String, String> inputMap = [:]
-
- if (userParams) {
+ if (userParams) {
userParams.each {
- userParam ->
- if("BRG_WAN_MAC_Address".equals(userParam?.name)) {
- execution.setVariable("brgWanMacAddress", userParam.value)
- inputMap.put("BRG_WAN_MAC_Address", userParam.value)
- }
- if("Customer_Location".equals(userParam?.name)) {
- execution.setVariable("customerLocation", userParam.value)
- userParam.value.each {
- customerLocParam ->
- inputMap.put(customerLocParam.key, customerLocParam.value)
+ userParam ->
+ if ("Customer_Location".equals(userParam?.name)) {
+ execution.setVariable("customerLocation", userParam.value)
+ userParam.value.each {
+ param ->
+ inputMap.put(param.key, param.value)
+ }
+ }
+ if ("Homing_Model_Ids".equals(userParam?.name)) {
+ utils.log("DEBUG", "Homing_Model_Ids: " + userParam.value.toString() + " ---- Type is:" +
+ userParam.value.getClass() , isDebugEnabled)
+ def modelIdLst = []
+ userParam.value.each {
+ param ->
+ def valueMap = [:]
+ param.each {
+ entry ->
+ valueMap.put(entry.key, entry.value)
}
- }
- if("Homing_Solution".equals(userParam?.name)) {
- execution.setVariable("homingService", userParam.value)
- inputMap.put("Homing_Solution", userParam.value)
- } else {
- execution.setVariable("homingService", "oof")
- }
- }
+ modelIdLst.add(valueMap)
+ utils.log("DEBUG", "Param: " + param.toString() + " ---- Type is:" +
+ 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)
+ }
+ if ("Homing_Solution".equals(userParam?.name)) {
+ execution.setVariable("homingService", userParam.value)
+ inputMap.put("Homing_Solution", userParam.value)
+ }
+ }
+ }
+
+ if (execution.getVariable("homingService") == "") {
+ // Set Default Homing to OOF if not set
+ execution.setVariable("homingService", "oof")
}
utils.log("DEBUG", "User Input Parameters map: " + userParams.toString(), isDebugEnabled)
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVcpeResCustService.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVcpeResCustService.bpmn
index 9342e34f59..0a0c95af4c 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVcpeResCustService.bpmn
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVcpeResCustService.bpmn
@@ -452,6 +452,7 @@ CreateVcpeResCustService.prepareCreateAllottedResourceTXC(execution)]]></bpmn2:s
<camunda:in source="cloudOwner" target="cloudOwner" />
<camunda:in source="cloudRegionId" target="cloudRegionId" />
<camunda:in source="serviceInstanceName" target="serviceInstanceName" />
+ <camunda:in source="homingModelIds" target="homingModelIds" />
</bpmn2:extensionElements>
<bpmn2:incoming>SequenceFlow_11efpvh</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_1jbuf1t</bpmn2:outgoing>