Implemented OOF call in TN NSSMF for deallocate flow
[so.git] / bpmn / so-bpmn-infrastructure-common / src / main / groovy / org / onap / so / bpmn / infrastructure / scripts / TnNssmfUtils.groovy
index d6e94ef..d1e2b11 100644 (file)
@@ -382,6 +382,18 @@ class TnNssmfUtils {
         execution.setVariable("enableSdnc", enableSdnc)
     }
 
+    void setEnableOofConfig(DelegateExecution execution) {
+        String enableOof = UrnPropertiesReader.getVariable(
+                "mso.workflow.TnNssmf.enableOOFNetworkConfig")
+        if (isBlank(enableOof)) {
+            logger.debug("mso.workflow.TnNssmf.enableOOFNetworkConfig is undefined, so use default value (true)")
+            enableOof = "true"
+        }
+        logger.debug("setEnableOofConfig: enableOof=" + enableOof)
+
+        execution.setVariable("enableOof", enableOof)
+    }
+
     String setExecVarFromJsonIfExists(DelegateExecution execution,
                                       String jsonStr, String jsonKey, String varName) {
         return setExecVarFromJsonStr(execution, jsonStr, jsonKey, varName, false)