Merge "NETWORK_RECIPE for CM flows"
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 05c3fa2..694aafc 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
@@ -74,6 +74,8 @@
         execution.setVariable("brgWanMacAddress", "")
         execution.setVariable("customerLocation", "")
         execution.setVariable("homingService", "")
+        execution.setVariable("cloudOwner", "")
+        execution.setVariable("cloudRegionId", "")
 
         //TODO
         execution.setVariable("sdncVersion", "1707")
@@ -169,6 +171,17 @@
             execution.setVariable("subscriberInfo", subscriberInfo)
             utils.log("DEBUG", "Incoming subscriberInfo is: " + subscriberInfo, isDebugEnabled)
 
+            // extract cloud configuration, split vid_ID into cloudOwner and cloudRegionId
+            String vimId = jsonUtil.getJsonValue(createVcpeServiceRequest,
+                    "requestDetails.cloudConfiguration.lcpCloudRegionId")
+            def cloudRegion = vimId.split("_")
+            def cloudOwner = cloudRegion[0].toString()
+            def cloudRegionId = cloudRegion[1].toString()
+            execution.setVariable("cloudOwner", cloudOwner)
+            utils.log("DEBUG","cloudOwner: " + cloudOwner, isDebugEnabled)
+            execution.setVariable("cloudRegionId", cloudRegionId)
+            utils.log("DEBUG","cloudRegionId: " + cloudRegionId, isDebugEnabled)
+
             /*
             * Extracting User Parameters from incoming Request and converting into a Map
             */
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVcpeResCustService.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVcpeResCustService.bpmn
index d101988..ea48104 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVcpeResCustService.bpmn
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVcpeResCustService.bpmn
@@ -449,6 +449,8 @@
         <camunda:in source="subscriberInfo" target="subscriberInfo" />
         <camunda:in source="homingService" target="homingService" />
         <camunda:in source="customerLocation" target="customerLocation" />
+        <camunda:in source="cloudOwner" target="cloudOwner" />
+        <camunda:in source="cloudRegionId" target="cloudRegionId" />
       </bpmn2:extensionElements>
       <bpmn2:incoming>SequenceFlow_11efpvh</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_1jbuf1t</bpmn2:outgoing>