aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-infrastructure-common
diff options
context:
space:
mode:
authorhyu2010 <hyu2010b@gmail.com>2021-01-02 17:27:33 -0500
committerhyu2010 <hyu2010b@gmail.com>2021-01-02 17:27:33 -0500
commitc8a5fd977678e56e18e0306a5ade89bdfa1e9b9e (patch)
treeeac3453dd298b7df788810d6a0980ad5079bd94a /bpmn/so-bpmn-infrastructure-common
parentb8d1719673835887cd0ba10b88359a819edc9373 (diff)
Fixes for bugs found in Transport Slicing integration
This update contains for the fixes for the following JIRA: SO-3444: Transport Slicing Integration: add config flag for enable/disable SDNC CCVPN network configuration Issue-ID: SO-3444 Signed-off-by: hyu2010 <hyu2010b@gmail.com> Change-Id: I7ccc3735e6a46c0453da0dd7d04086b73cc50eb1
Diffstat (limited to 'bpmn/so-bpmn-infrastructure-common')
-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)
+ }
}