aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateGenericALaCarteServiceInstance.groovy66
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy9
-rw-r--r--common/pom.xml2
3 files changed, 65 insertions, 12 deletions
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateGenericALaCarteServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateGenericALaCarteServiceInstance.groovy
index 968612301d..9763960bfd 100755
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateGenericALaCarteServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateGenericALaCarteServiceInstance.groovy
@@ -142,12 +142,37 @@ public class CreateGenericALaCarteServiceInstance extends AbstractServiceTaskPro
Map<String, String> inputMap = [:]
if (userParams) {
userParams.each {
- userParam -> inputMap.put(userParam.name, userParam.value.toString())
+ userParam ->
+ if ("Customer_Location".equals(userParam?.name)) {
+ msoLogger.debug("User Input customerLocation: " + userParam.value.toString())
+ Map<String, String> customerMap = [:]
+ userParam.value.each {
+ param ->
+
+ inputMap.put(param.key, param.value)
+ customerMap.put(param.key, param.value)
+ }
+ execution.setVariable("customerLocation", customerMap)
+ }
+ if ("Homing_Solution".equals(userParam?.name)) {
+ msoLogger.debug("User Input Homing_Solution: " + userParam.value.toString())
+ execution.setVariable("homingService", userParam.value)
+ execution.setVariable("callHoming", true)
+ inputMap.put("Homing_Solution", userParam.value)
+ }
+ if (!"Homing_Solution".equals(userParam?.name) && !"Customer_Location".equals(userParam?.name))
+ {
+ msoLogger.debug("User Input Parameter " + userParam.name + ": " + userParam.value.toString())
+ inputMap.put(userParam.name, userParam.value)
+ }
}
}
msoLogger.debug("User Input Parameters map: " + userParams.toString())
- execution.setVariable("serviceInputParams", inputMap)
+ msoLogger.debug("User Input Map: " + inputMap.toString())
+ if (inputMap.toString() != "[:]") {
+ execution.setVariable("serviceInputParams", inputMap)
+ }
//TODO
//execution.setVariable("failExists", true)
@@ -231,7 +256,7 @@ public class CreateGenericALaCarteServiceInstance extends AbstractServiceTaskPro
}
public void processDecomposition(DelegateExecution execution) {
- def isDebugEnabled = execution.getVariable(DebugFlag)
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
msoLogger.trace("Inside processDecomposition() of CreateGenericALaCarteServiceInstance ")
@@ -241,7 +266,6 @@ public class CreateGenericALaCarteServiceInstance extends AbstractServiceTaskPro
// VNFs
List<VnfResource> vnfList = serviceDecomposition.getVnfResources()
- filterVnfs(vnfList)
serviceDecomposition.setVnfResources(vnfList)
execution.setVariable("vnfList", vnfList)
@@ -290,18 +314,44 @@ public class CreateGenericALaCarteServiceInstance extends AbstractServiceTaskPro
def jsonOutput = new JsonOutput()
def siRequest = execution.getVariable("bpmnRequest")
Map reqMap = jsonSlurper.parseText(siRequest)
+
//InputParams
def userParams = reqMap.requestDetails?.requestParameters?.userParams
+
Map<String, String> inputMap = [:]
- if (userParams != null) {
+ if (userParams) {
userParams.each {
- userParam -> inputMap.put(userParam.name, userParam.value)
+ userParam ->
+ if ("Customer_Location".equals(userParam?.name)) {
+ msoLogger.debug("User Input customerLocation: " + userParam.value.toString())
+ Map<String, String> customerMap = [:]
+ userParam.value.each {
+ param ->
+
+ inputMap.put(param.key, param.value)
+ customerMap.put(param.key, param.value)
+ }
+ execution.setVariable("customerLocation", customerMap)
+ }
+ if ("Homing_Solution".equals(userParam?.name)) {
+ msoLogger.debug("User Input Homing_Solution: " + userParam.value.toString())
+ execution.setVariable("homingService", userParam.value)
+ execution.setVariable("callHoming", true)
+ inputMap.put("Homing_Solution", userParam.value)
+ }
+ if (!"Homing_Solution".equals(userParam?.name) && !"Customer_Location".equals(userParam?.name))
+ {
+ msoLogger.debug("User Input Parameter " + userParam.name + ": " + userParam.value.toString())
+ inputMap.put(userParam.name, userParam.value)
+ }
}
}
msoLogger.debug("User Input Parameters map: " + userParams.toString())
- execution.setVariable("serviceInputParams", inputMap)
-
+ msoLogger.debug("User Input Map: " + inputMap.toString())
+ if (inputMap.toString() != "[:]") {
+ execution.setVariable("serviceInputParams", inputMap)
+ }
ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
String serviceInstanceId = execution.getVariable("serviceInstanceId")
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy
index c5f712cafc..beac679691 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy
@@ -202,12 +202,15 @@ public class CreateVcpeResCustService extends AbstractServiceTaskProcessor {
userParams.each {
userParam ->
if ("Customer_Location".equals(userParam?.name)) {
- execution.setVariable("customerLocation", userParam.value)
- userParam.value.each {
+ Map<String, String> customerMap = [:]
+ userParam.value.each {
param ->
+
inputMap.put(param.key, param.value)
+ customerMap.put(param.key, param.value)
}
- }
+ execution.setVariable("customerLocation", customerMap)
+ }
if ("Homing_Model_Ids".equals(userParam?.name)) {
utils.log("DEBUG", "Homing_Model_Ids: " + userParam.value.toString() + " ---- Type is:" +
userParam.value.getClass() , isDebugEnabled)
diff --git a/common/pom.xml b/common/pom.xml
index 285cd5613d..d8e71b0e44 100644
--- a/common/pom.xml
+++ b/common/pom.xml
@@ -62,7 +62,7 @@
<dependency>
<groupId>org.onap.aai.aai-common</groupId>
<artifactId>aai-schema</artifactId>
- <version>1.3.0-SNAPSHOT</version>
+ <version>1.3.0</version>
</dependency>
<dependency>
<groupId>org.modelmapper</groupId>