summaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-infrastructure-common/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/so-bpmn-infrastructure-common/src/main')
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoActivateTnNssi.groovy3
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateTnNssiInstance.groovy2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateTnNssi.groovy5
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/TnNssmfUtils.groovy14
4 files changed, 23 insertions, 1 deletions
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoActivateTnNssi.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoActivateTnNssi.groovy
index 37e3df1505..f3f8c8bacf 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoActivateTnNssi.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoActivateTnNssi.groovy
@@ -83,6 +83,7 @@ public class DoActivateTnNssi extends AbstractServiceTaskProcessor {
String actionType = operationType.equals("activateInstance") ? "activate" : "deactivate"
execution.setVariable("actionType", actionType)
+ tnNssmfUtils.setEnableSdncConfig(execution)
logger.debug("Finish preProcessRequest")
}
@@ -147,6 +148,8 @@ public class DoActivateTnNssi extends AbstractServiceTaskProcessor {
String jobId = execution.getVariable("jobId")
String nsiId = execution.getVariable("nsiId")
String operType = execution.getVariable("actionType")
+ operType = operType.toUpperCase()
+
ResourceOperationStatus roStatus = tnNssmfUtils.buildRoStatus(modelUuid, ssInstanceId,
jobId, nsiId, operType, status, progress, statusDescription)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateTnNssiInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateTnNssiInstance.groovy
index 0b028e6c13..04f07b66d4 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateTnNssiInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateTnNssiInstance.groovy
@@ -63,6 +63,8 @@ class DoCreateTnNssiInstance extends AbstractServiceTaskProcessor {
}"""
execution.setVariable("serviceModelInfo", serviceModelInfo)
+ tnNssmfUtils.setEnableSdncConfig(execution)
+
logger.trace("Exit preProcessRequest")
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateTnNssi.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateTnNssi.groovy
index a8622b9253..a715e7799d 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateTnNssi.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateTnNssi.groovy
@@ -80,6 +80,9 @@ class DoDeallocateTnNssi extends AbstractServiceTaskProcessor {
"modelVersion":""
}"""
execution.setVariable("serviceModelInfo", serviceModelInfo)
+
+ tnNssmfUtils.setEnableSdncConfig(execution)
+
logger.debug("Finish preProcessRequest")
}
@@ -155,7 +158,7 @@ class DoDeallocateTnNssi extends AbstractServiceTaskProcessor {
String nsiId = execution.getVariable("nsiId")
ResourceOperationStatus roStatus = tnNssmfUtils.buildRoStatus(modelUuid, ssInstanceId,
- jobId, nsiId, "deallocate", status, progress, statusDescription)
+ jobId, nsiId, "DEALLOCATE", status, progress, statusDescription)
logger.debug("DoDeallocateTnNssi: roStatus={}", roStatus)
requestDBUtil.prepareUpdateResourceOperationStatus(execution, roStatus)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/TnNssmfUtils.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/TnNssmfUtils.groovy
index cfee1aa0cf..009b0a1941 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/TnNssmfUtils.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/TnNssmfUtils.groovy
@@ -354,4 +354,18 @@ class TnNssmfUtils {
return roStatus
}
+
+
+ void setEnableSdncConfig(DelegateExecution execution) {
+ String enableSdnc = UrnPropertiesReader.getVariable(
+ "mso.workflow.TnNssmf.enableSDNCNetworkConfig")
+ if (isBlank(enableSdnc)) {
+ logger.debug("mso.workflow.TnNssmf.enableSDNCNetworkConfig is undefined, so use default value (true)")
+ enableSdnc = "true"
+ }
+
+ logger.debug("setEnableSdncConfig: enableSdnc=" + enableSdnc)
+
+ execution.setVariable("enableSdnc", enableSdnc)
+ }
}