summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorc00149107 <chenchuanyu@huawei.com>2018-03-14 17:49:44 +0800
committerc00149107 <chenchuanyu@huawei.com>2018-03-14 17:49:44 +0800
commitff1a833164759bb20fb1e4250429805cadc213f4 (patch)
tree484d82d329b08c6bad3ccdce5831f1b8e54678fc
parent395e11b138207d86fbb405e5d939162a065428df (diff)
Update resource parameters node task
Update resource parameters node task Change-Id: I549a12fab69f51c3f849a20272318ca9aaf1ff46 Issue-ID: SO-452 Signed-off-by: c00149107 <chenchuanyu@huawei.com>
-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 fd9b6d42e8..f8706cc2f0 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)