aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-infrastructure-common
diff options
context:
space:
mode:
authorsubhash kumar singh <subhash.kumar.singh@huawei.com>2019-04-28 03:10:37 +0530
committersubhash kumar singh <subhash.kumar.singh@huawei.com>2019-04-28 03:10:37 +0530
commit947249a450e6c849710b750867a9b92300ff384f (patch)
tree382f9edb99372043d0b018fdc2a9a7c76f98e3a8 /bpmn/so-bpmn-infrastructure-common
parentbb0a782bbec2ba9166804237b117ce0c70a1aa76 (diff)
Add parsing for support of new CCVPN model
Update the resource_list logic to create the resource as per new CCVPN model. e.g. new model UUI request to create the service with this input // [ // { VFB1 : [GrpA1, GrA2, GrB1]}, // { VFB2 : [GrpA1, GrB1]}, // { VFA1 : [GrpC1]} // ] should be converted to // [ // { VFA1 : [GrpA1, GrA2, GrB1]}, // { VFA2 : [GrpA1, GrB1]}, // { VFB1 : [GrpC1]} // ] as per resource ordering. Change-Id: I79a30d5080d2551eb7e1944cc4f25d5332d22d4f Issue-ID: SO-1393 Signed-off-by: subhash kumar singh <subhash.kumar.singh@huawei.com>
Diffstat (limited to 'bpmn/so-bpmn-infrastructure-common')
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateResources.groovy11
1 files changed, 11 insertions, 0 deletions
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 a7d453d56d..973d8a156c 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
@@ -22,6 +22,7 @@
package org.onap.so.bpmn.infrastructure.scripts
+import org.onap.so.bpmn.common.resource.InstanceResourceList
import org.onap.so.bpmn.common.scripts.CatalogDbUtilsFactory
import org.onap.so.bpmn.core.domain.GroupResource
import org.onap.so.bpmn.infrastructure.properties.BPMNProperties
@@ -88,6 +89,16 @@ public class DoCreateResources extends AbstractServiceTaskProcessor{
logger.trace("Exit preProcessRequest ")
}
+ // this method will convert resource list to instance_resource_list
+ void prepareInstanceResourceList(DelegateExecution execution) {
+
+ String uuiRequest = execution.getVariable("uuiRequest")
+ List<Resource> sequencedResourceList = execution.getVariable("sequencedResourceList")
+ List<Resource> instanceResourceList = InstanceResourceList.getInstanceResourceList(sequencedResourceList, uuiRequest)
+
+ execution.setVariable("instanceResourceList", instanceResourceList)
+ }
+
public void sequenceResoure(DelegateExecution execution) {
logger.trace("Start sequenceResoure Process ")