aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn
diff options
context:
space:
mode:
authorSeshu Kumar M <seshu.kumar.m@huawei.com>2018-03-14 10:58:19 +0000
committerGerrit Code Review <gerrit@onap.org>2018-03-14 10:58:19 +0000
commitdbd16b671c1b1b8c9827da22b92c987584dd8268 (patch)
tree83370737cd69170fc07780c547d10119944197a3 /bpmn
parentd86780d2709c79a6b25e7ca39e1e95ae0f3b67dc (diff)
parentff1a833164759bb20fb1e4250429805cadc213f4 (diff)
Merge "Update resource parameters node task"
Diffstat (limited to 'bpmn')
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy24
1 files changed, 4 insertions, 20 deletions
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
index 1f632162ff..7a7f7cf131 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
@@ -32,6 +32,7 @@ import org.openecomp.mso.bpmn.core.domain.AllottedResource
import org.openecomp.mso.bpmn.core.domain.NetworkResource
import org.openecomp.mso.bpmn.core.domain.VnfResource
import org.openecomp.mso.bpmn.common.recipe.ResourceInput
+import org.openecomp.mso.bpmn.common.resource.ResourceRequestBuilder;
import org.openecomp.mso.bpmn.common.recipe.BpmnRestClient
import org.openecomp.mso.bpmn.core.json.JsonUtils
import org.openecomp.mso.bpmn.common.scripts.AaiUtil
@@ -594,27 +595,10 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
resourceInput.setResourceUuid(resourceUuid)
String incomingRequest = execution.getVariable("uuiRequest")
- String resourcesStr = jsonUtil.getJsonValue(incomingRequest, "service.parameters.resources")
- String serviceRequestInputs = jsonUtil.getJsonValue(incomingRequest, "service.parameters.requestInputs")
- String serviceDescription = jsonUtil.getJsonValue(incomingRequest, "service.description")
- resourceInput.setResourceInstanceDes(serviceDescription)
- utils.log("INFO", "Prepare Resource Request:" + resourceInput.toString(), isDebugEnabled)
- List<String> resourceList = jsonUtil.StringArrayToList(execution, resourcesStr)
- String locationConstraints = ""
- String resourceRequestInputs = ""
- for(String resource : resourceList){
- String resourceUuidTmp = jsonUtil.getJsonValue(resource, "resourceUuid")
- String resourceCustomizationUuidTmp = jsonUtil.getJsonValue(resource, "resourceCustomizationUuid")
- if(StringUtils.equals(resourceUuidTmp, resourceUuid) && StringUtils.equals(resourceCustomizationUuidTmp, resourceCustomizationUuid)){
-
- String resourceParameters = jsonUtil.getJsonValue(resource, "parameters")
- locationConstraints = jsonUtil.getJsonValue(resourceParameters, "locationConstraints")
- resourceRequestInputs = jsonUtil.getJsonValue(resourceParameters, "requestInputs")
- }
- }
//set the requestInputs from tempalte To Be Done
- //String resourceParameters = ResourceRequestBuilder.buildRequestParameters()
- String resourceParameters = ""
+ String serviceModelUuid = execution.getVariable("modelUuid")
+ String serviceParameters = jsonUtil.getJsonValue(incomingRequest, "service.parameters")
+ String resourceParameters = ResourceRequestBuilder.buildResourceRequestParameters(execution, serviceModelUuid, resourceCustomizationUuid, serviceParameters)
resourceInput.setResourceParameters(resourceParameters)
execution.setVariable("resourceInput", resourceInput)
utils.log("INFO", "======== COMPLETED prepareResourceRecipeRequest Process ======== ", isDebugEnabled)