summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Daugherty <rd472p@att.com>2018-10-02 13:03:07 +0000
committerGerrit Code Review <gerrit@onap.org>2018-10-02 13:03:07 +0000
commit2c612e19c379dd29d1a3aea22383f1e00edc8e62 (patch)
tree11877dc937cb33482fa14ecb170ab7658436efd5
parent6bfb4b9a77b8ed2ebf94c9e8c1ad683b211e680d (diff)
parentc6f03aa3d0fc3cbfbd0d22c7e4e4c0b60d7d70d1 (diff)
Merge "Fix CreateVfModule Instantiation Error"
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofHoming.groovy1
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy32
2 files changed, 19 insertions, 14 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofHoming.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofHoming.groovy
index 70f91671a8..7028f6eeed 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofHoming.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofHoming.groovy
@@ -269,6 +269,7 @@ class OofHoming extends AbstractServiceTaskProcessor {
if (oofDirectives != null && oofDirectives != "") {
resource.getHomingSolution().setOofDirectives(oofDirectives)
+ execution.setVariable("oofDirectives", oofDirectives)
utils.log("DEBUG", "***** OofDirectives is: " + oofDirectives +
" *****", "true")
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy
index e32d6a8019..da3ecbaef0 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy
@@ -173,12 +173,6 @@ public class DoCreateVfModule extends VfModuleBase {
execution.setVariable("DCVFM_serviceInstanceId", serviceInstanceId)
rollbackData.put("VFMODULE", "serviceInstanceId", serviceInstanceId)
msoLogger.debug("serviceInstanceId: " + serviceInstanceId)
- //OofDirectives
- String oofDirectives = execution.getVariable(cloudSiteId + "_oofDirectives")
- if (flavorList != null) {
- execution.setVariable("DCVFM_flavorList", flavorList)
- logDebug("flavorList is: " + flavorList, isDebugLogEnabled)
- }
//source - HARDCODED
def source = "VID"
execution.setVariable("DCVFM_source", source)
@@ -201,7 +195,7 @@ public class DoCreateVfModule extends VfModuleBase {
execution.setVariable("DCVFM_asdcServiceModelVersion", asdcServiceModelVersion)
msoLogger.debug("asdcServiceModelVersion: " + asdcServiceModelVersion)
//personaModelId
- execution.setVariable("DCVFM_personaModelId", jsonUtil.getJsonValue(vfModuleModelInfo, "modelInvariantUuid"))
+ execution.setVariable("DCVFM_personaModelId", jsonUtil.getJsonValue(vfModuleModelInfo, "modelInvariantUuid"))
//personaModelVersion
execution.setVariable("DCVFM_personaModelVersion", jsonUtil.getJsonValue(vfModuleModelInfo, "modelUuid"))
//vfModuleLabel
@@ -227,8 +221,14 @@ public class DoCreateVfModule extends VfModuleBase {
//globalSubscriberId
String globalSubscriberId = execution.getVariable("globalSubscriberId")
execution.setVariable("DCVFM_globalSubscriberId", globalSubscriberId)
- msoLogger.debug("globalSubsrciberId: " + globalSubscriberId)
+ msoLogger.debug("globalSubsrciberId: " + globalSubscriberId)
+ //OofDirectives
+ String oofDirectives = execution.getVariable("oofDirectives")
Map<String,String> vfModuleInputParams = execution.getVariable("vfModuleInputParams")
+ if (oofDirectives != null) {
+ vfModuleInputParams.put("oofDirectives", oofDirectives)
+ logDebug("OofDirectives are: " + oofDirectives, isDebugLogEnabled)
+ }
if (vfModuleInputParams != null) {
execution.setVariable("DCVFM_vnfParamsMap", vfModuleInputParams)
execution.setVariable("DCVFM_vnfParamsExistFlag", true)
@@ -452,8 +452,18 @@ public class DoCreateVfModule extends VfModuleBase {
}
execution.setVariable("DCVFM_vnfParamsMap", paramsMap)
}
+
+ //OofDirectives
+ String oofDirectives = execution.getVariable("oofDirectives")
+ if (oofDirectives != null) {
+ Map<String, String> paramsMap = execution.getVariable("DCVFM_vnfParamsMap")
+ paramsMap.put("oofDirectives", oofDirectives)
+ logDebug("OofDirectives are: " + oofDirectives, isDebugLogEnabled)
+ execution.setVariable("DCVFM_vnfParamsMap", paramsMap)
+ }
}
+
//Get or Generate UUID
String uuid = execution.getVariable("DCVFM_uuid")
if(uuid == null){
@@ -922,8 +932,6 @@ public class DoCreateVfModule extends VfModuleBase {
def serviceId = execution.getVariable("DCVFM_serviceId")
//serviceInstanceId
def serviceInstanceId = execution.getVariable("DCVFM_serviceInstanceId")
- //OofDirectives
- String oofDirectives = execution.getVariable("DCVFM_oofDirectives")
//backoutOnFailure
def backoutOnFailure = execution.getVariable("DCVFM_backoutOnFailure")
//volumeGroupId
@@ -959,10 +967,6 @@ public class DoCreateVfModule extends VfModuleBase {
}
Map<String, String> vnfParamsMap = execution.getVariable("DCVFM_vnfParamsMap")
- // Add flavorLabel List to vnfParamsMap
- flavorList.each { cloudFlavor ->
- vnfParamsMap.put("label_" + cloudFlavor.getFlavorLabel(), cloudFlavor.getFlavor())
- }
String vfModuleParams = ""
//Get SDNC Response Data for VF Module Topology
String vfModuleSdncGetResponse = execution.getVariable('DCVFM_getSDNCAdapterResponse')