summaryrefslogtreecommitdiffstats
path: root/bpmn/MSOInfrastructureBPMN/src/main/groovy
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/MSOInfrastructureBPMN/src/main/groovy')
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy28
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DoCreateAllottedResourceTXC.groovy4
2 files changed, 27 insertions, 5 deletions
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy
index fc6293c11f..dba1a8b581 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy
@@ -274,7 +274,7 @@ public class CreateVcpeResCustService extends AbstractServiceTaskProcessor {
execution.setVariable("serviceInstanceName", serviceInstanceName)
ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
- execution.setVariable("serviceDecompositionString", serviceDecomposition.toJsonString())
+ execution.setVariable("serviceDecompositionString", serviceDecomposition.toJsonStringNoRootName())
utils.log("DEBUG", " ***** Completed prepareCreateServiceInstance of CreateVcpeResCustService ***** ", isDebugEnabled)
} catch (Exception ex) {
@@ -363,6 +363,24 @@ public class CreateVcpeResCustService extends AbstractServiceTaskProcessor {
}
+ public void awaitAaiDistribution(Execution execution) {
+ def isDebugEnabled=execution.getVariable(DebugFlag)
+
+ try {
+ String tsleep = execution.getVariable("junitSleepMs")
+
+ //workaround for aai replication issue
+ utils.log("DEBUG", "sleeping while AAI distributes data", isDebugEnabled)
+ sleep(tsleep == null ? 30000 : tsleep as Long)
+
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Unexpected Error from method awaitAaiDistribution() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+
public void prepareCreateAllottedResourceTXC(Execution execution) {
def isDebugEnabled=execution.getVariable(DebugFlag)
@@ -388,13 +406,13 @@ public class CreateVcpeResCustService extends AbstractServiceTaskProcessor {
while (iter.hasNext()){
AllottedResource allottedResource = (AllottedResource)iter.next();
- utils.log("DEBUG", " getting model info for AllottedResource # :" + allottedResource.toJsonString(), isDebugEnabled)
+ utils.log("DEBUG", " getting model info for AllottedResource # :" + allottedResource.toJsonStringNoRootName(), isDebugEnabled)
utils.log("DEBUG", " allottedResource.getAllottedResourceType() :" + allottedResource.getAllottedResourceType(), isDebugEnabled)
if("TunnelXConn".equalsIgnoreCase(allottedResource.getAllottedResourceType())){
//set create flag to true
execution.setVariable("createTXCAR", true)
ModelInfo allottedResourceModelInfo = allottedResource.getModelInfo()
- execution.setVariable("allottedResourceModelInfoTXC", allottedResourceModelInfo.toJsonString())
+ execution.setVariable("allottedResourceModelInfoTXC", allottedResourceModelInfo.toJsonStringNoRootName())
execution.setVariable("allottedResourceRoleTXC", allottedResource.getAllottedResourceRole())
execution.setVariable("allottedResourceTypeTXC", allottedResource.getAllottedResourceType())
//After decomposition and homing BBs, there should be an allotted resource object in the decomposition that represents the TXC,
@@ -441,13 +459,13 @@ public class CreateVcpeResCustService extends AbstractServiceTaskProcessor {
while (iter.hasNext()){
AllottedResource allottedResource = (AllottedResource)iter.next();
- utils.log("DEBUG", " getting model info for AllottedResource # :" + allottedResource.toJsonString(), isDebugEnabled)
+ utils.log("DEBUG", " getting model info for AllottedResource # :" + allottedResource.toJsonStringNoRootName(), isDebugEnabled)
utils.log("DEBUG", " allottedResource.getAllottedResourceType() :" + allottedResource.getAllottedResourceType(), isDebugEnabled)
if("BRG".equalsIgnoreCase(allottedResource.getAllottedResourceType())){
//set create flag to true
execution.setVariable("createBRGAR", true)
ModelInfo allottedResourceModelInfo = allottedResource.getModelInfo()
- execution.setVariable("allottedResourceModelInfoBRG", allottedResourceModelInfo.toJsonString())
+ execution.setVariable("allottedResourceModelInfoBRG", allottedResourceModelInfo.toJsonStringNoRootName())
execution.setVariable("allottedResourceRoleBRG", allottedResource.getAllottedResourceRole())
execution.setVariable("allottedResourceTypeBRG", allottedResource.getAllottedResourceType())
//After decomposition and homing BBs, there should be an allotted resource object in the decomposition that represents the BRG,
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DoCreateAllottedResourceTXC.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DoCreateAllottedResourceTXC.groovy
index 81e347f874..8a4e591654 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DoCreateAllottedResourceTXC.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/DoCreateAllottedResourceTXC.groovy
@@ -78,6 +78,9 @@ public class DoCreateAllottedResourceTXC extends AbstractServiceTaskProcessor{
utils.log("DEBUG"," ***** preProcessRequest *****", isDebugEnabled)
try {
+ String msoRequestId = execution.getVariable("msoRequestId")
+ utils.log("DEBUG", " msoRequestId = " + msoRequestId, isDebugEnabled)
+
execution.setVariable("prefix", Prefix)
//Config Inputs
@@ -215,6 +218,7 @@ public class DoCreateAllottedResourceTXC extends AbstractServiceTaskProcessor{
String arRole = execution.getVariable("allottedResourceRole")
String CSI_resourceLink = execution.getVariable("CSI_resourceLink")
String arModelInfo = execution.getVariable("allottedResourceModelInfo")
+ utils.log("DEBUG", "arModelInfo is:\n" + arModelInfo, isDebugEnabled)
String modelInvariantId = jsonUtil.getJsonValue(arModelInfo, "modelInvariantUuid")
String modelVersionId = jsonUtil.getJsonValue(arModelInfo, "modelUuid")
String modelCustomizationId = jsonUtil.getJsonValue(arModelInfo, "modelCustomizationUuid")