aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhyu2010 <hyu2010b@gmail.com>2021-01-15 19:23:41 -0500
committerhyu2010 <hyu2010b@gmail.com>2021-01-19 11:47:26 -0500
commit70b78e89bc8041f9a54013214b2f660e8c8e1fb1 (patch)
tree179733c3b5bc387ccd55504e7992798adf7420dc
parentfbb5a5dd77092f0fd07ef2c1c0c27f1502f14a91 (diff)
Fixes for bugs found in Transport Slicing integration
This update contains for the fixes for the following JIRAs: SO-3483: Transport Slicing integration: status field in resource_operation_status table should be in capital letters SO-3488: Transport Slicing integration: orchestration status of TN NSSI is missing a 'd' in 'activate' and 'deactivate' Issue-ID: SO-3483 Issue-ID: SO-3488 Signed-off-by: hyu2010 <hyu2010b@gmail.com> Change-Id: I0e3ce5b8819aab61138d3eb7e119b9c9aa7e5a55
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoActivateTnNssi.groovy13
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoActivateTransportNSSI.bpmn5
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoAllocateTransportNSSI.bpmn6
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeallocateTransportNSSI.bpmn2
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoModifyTransportNSSI.bpmn2
5 files changed, 21 insertions, 7 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 f3f8c8bacf..ff7b0a3b6d 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
@@ -117,6 +117,19 @@ public class DoActivateTnNssi extends AbstractServiceTaskProcessor {
}
+ String getOrchStatusBasedOnActionType(String actionType) {
+ String res = "unknown"
+ if (actionType.equals("activate")) {
+ res = "activated"
+ } else if (actionType.equals("deactivate")) {
+ res = "deactivated"
+ } else {
+ logger.error("ERROR: getOrchStatusBasedOnActionType bad actionType= \n" + actionType)
+ }
+
+ return res
+ }
+
void updateAAIOrchStatus(DelegateExecution execution) {
logger.debug("Start updateAAIOrchStatus")
String tnNssiId = execution.getVariable("sliceServiceInstanceId")
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoActivateTransportNSSI.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoActivateTransportNSSI.bpmn
index 51448b027c..eb0c007403 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoActivateTransportNSSI.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoActivateTransportNSSI.bpmn
@@ -30,7 +30,7 @@ ex.processJavaException(execution)</bpmn:script>
<bpmn:outgoing>SequenceFlow_1qv8qw1</bpmn:outgoing>
<bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
def runScript = new DoActivateTnNssi()
-runScript.prepareUpdateJobStatus(execution,"finished","100","Activate or Deactivate successfully")</bpmn:script>
+runScript.prepareUpdateJobStatus(execution,"FINISHED","100","Activate or Deactivate successfully")</bpmn:script>
</bpmn:scriptTask>
<bpmn:sequenceFlow id="SequenceFlow_03s744c" sourceRef="StartEvent_1nbljfd" targetRef="ScriptTask_1tc44ge" />
<bpmn:sequenceFlow id="SequenceFlow_1qv8qw1" sourceRef="ScriptTask_1ssh2l9" targetRef="Activity_0nhxd67" />
@@ -40,8 +40,9 @@ runScript.prepareUpdateJobStatus(execution,"finished","100","Activate or Deactiv
<bpmn:outgoing>SequenceFlow_0kixzdj</bpmn:outgoing>
<bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
def actionType = execution.getVariable("actionType")
-execution.setVariable("orchestrationStatus", actionType)
def runScript = new DoActivateTnNssi()
+def orchStatus = runScript.getOrchStatusBasedOnActionType(actionType)
+execution.setVariable("orchestrationStatus", orchStatus)
runScript.updateAAIOrchStatus(execution)</bpmn:script>
</bpmn:scriptTask>
<bpmn:sequenceFlow id="SequenceFlow_0kixzdj" sourceRef="ScriptTask_19uxoi8" targetRef="ScriptTask_1ssh2l9" />
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoAllocateTransportNSSI.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoAllocateTransportNSSI.bpmn
index f3bd700d9a..124b75cbe8 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoAllocateTransportNSSI.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoAllocateTransportNSSI.bpmn
@@ -69,7 +69,7 @@ ex.processJavaException(execution)</bpmn:script>
<bpmn:outgoing>SequenceFlow_0t094g7</bpmn:outgoing>
<bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
def runScript = new TnAllocateNssi()
-runScript.prepareUpdateJobStatus(execution,"progress","10","Allocate TN NSSI started")</bpmn:script>
+runScript.prepareUpdateJobStatus(execution,"INPROGRESS","10","Allocate TN NSSI started")</bpmn:script>
</bpmn:scriptTask>
<bpmn:intermediateThrowEvent id="IntermediateThrowEvent_1ex8ke9" name="Goto OOF TN NSSI Selection">
<bpmn:incoming>SequenceFlow_0jrclmc</bpmn:incoming>
@@ -80,7 +80,7 @@ runScript.prepareUpdateJobStatus(execution,"progress","10","Allocate TN NSSI sta
<bpmn:outgoing>SequenceFlow_1qv8qw1</bpmn:outgoing>
<bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
def runScript = new TnAllocateNssi()
-runScript.prepareUpdateJobStatus(execution,"finished","100","Allocated TN NSSI successfully")</bpmn:script>
+runScript.prepareUpdateJobStatus(execution,"FINISHED","100","Allocated TN NSSI successfully")</bpmn:script>
</bpmn:scriptTask>
<bpmn:callActivity id="CallActivity_1bnkmaz" name="Call Decompose Service" calledElement="DecomposeService">
<bpmn:extensionElements>
@@ -174,7 +174,7 @@ runScript.updateAAIOrchStatus(execution)</bpmn:script>
<bpmn:outgoing>Flow_1853sgs</bpmn:outgoing>
<bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
def runScript = new TnAllocateNssi()
-runScript.prepareUpdateJobStatus(execution,"finished","100","Allocated TN NSSI successfully")</bpmn:script>
+runScript.prepareUpdateJobStatus(execution,"FINISHED","100","Allocated TN NSSI successfully")</bpmn:script>
</bpmn:scriptTask>
<bpmn:sequenceFlow id="Flow_1853sgs" sourceRef="Activity_1mh10j4" targetRef="Activity_124z7q2" />
<bpmn:callActivity id="Activity_187hs2t" name="Handle TN NSSI Selection OOF request" calledElement="DoHandleOofRequest">
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeallocateTransportNSSI.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeallocateTransportNSSI.bpmn
index de8391428d..1dd362bf4b 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeallocateTransportNSSI.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeallocateTransportNSSI.bpmn
@@ -30,7 +30,7 @@ ex.processJavaException(execution)</bpmn:script>
<bpmn:outgoing>SequenceFlow_1qv8qw1</bpmn:outgoing>
<bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
def runScript = new DoDeallocateTnNssi()
-runScript.prepareUpdateJobStatus(execution,"finished","100","Deallocated TN NSSI successfully")</bpmn:script>
+runScript.prepareUpdateJobStatus(execution,"FINISHED","100","Deallocated TN NSSI successfully")</bpmn:script>
</bpmn:scriptTask>
<bpmn:sequenceFlow id="SequenceFlow_03s744c" sourceRef="StartEvent_1nbljfd" targetRef="ScriptTask_1tc44ge" />
<bpmn:sequenceFlow id="SequenceFlow_1qv8qw1" sourceRef="ScriptTask_1ssh2l9" targetRef="Activity_0rgeefb" />
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoModifyTransportNSSI.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoModifyTransportNSSI.bpmn
index d70bed68cb..2b122fb5e2 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoModifyTransportNSSI.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoModifyTransportNSSI.bpmn
@@ -30,7 +30,7 @@ ex.processJavaException(execution)</bpmn:script>
<bpmn:outgoing>SequenceFlow_1qv8qw1</bpmn:outgoing>
<bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
def runScript = new DoActivateTnNssi()
-runScript.prepareUpdateJobStatus(execution,"finished","100","Modified TN NSSI successfully")</bpmn:script>
+runScript.prepareUpdateJobStatus(execution,"FINISHED","100","Modified TN NSSI successfully")</bpmn:script>
</bpmn:scriptTask>
<bpmn:sequenceFlow id="SequenceFlow_03s744c" sourceRef="StartEvent_1nbljfd" targetRef="ScriptTask_1tc44ge" />
<bpmn:sequenceFlow id="SequenceFlow_1qv8qw1" sourceRef="ScriptTask_1ssh2l9" targetRef="Activity_0ziz3ti" />