From: krishnaa96 Date: Fri, 22 Oct 2021 06:08:04 +0000 (+0530) Subject: Support activate, terminate feature for NSMF based TN slices X-Git-Tag: 1.10.0~26^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=0c39444aec32954cc40cb2af4aac7f863e421c7d;p=so.git Support activate, terminate feature for NSMF based TN slices Issue-ID: SO-3784 Signed-off-by: krishnaa96 Change-Id: I3214cfe5faf3bc9d10081859d63d5a67ee2d6318 --- diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoActivateAccessNSSI.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoActivateAccessNSSI.groovy index 5d243437e0..2aaec9f164 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoActivateAccessNSSI.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoActivateAccessNSSI.groovy @@ -141,7 +141,11 @@ class DoActivateAccessNSSI extends AbstractServiceTaskProcessor { execution.setVariable("relatedSPs", getRelatedInstancesByRole(execution, ROLE_SLICE_PROFILE,KEY_SLICE_PROFILE, anSliceProfileId)) Map relatedNssis = new HashMap<>() - execution.setVariable("relatedNssis", getRelatedInstancesByRole(execution, ROLE_NSSI,KEY_NSSI, anNssiId)) + relatedNssis = getRelatedInstancesByRole(execution, ROLE_NSSI,KEY_NSSI, anNssiId) + if(relatedNssis.size() == 1) { + execution.setVariable("IsRANNfAlonePresent", true) + } + execution.setVariable("relatedNssis", relatedNssis) logger.trace("${Prefix} - Exit Get Related instances") } diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeAllocateAccessNSSI.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeAllocateAccessNSSI.groovy index 4cc6e6d478..6fd8080ef0 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeAllocateAccessNSSI.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeAllocateAccessNSSI.groovy @@ -126,7 +126,11 @@ class DoDeAllocateAccessNSSI extends AbstractServiceTaskProcessor { execution.setVariable("anNfSliceProfileId", getInstanceIdByWorkloadContext(execution.getVariable("relatedSPs"), AN_NF)) Map relatedNssis = new HashMap<>() - execution.setVariable("relatedNssis", getRelatedInstancesByRole(execution, ROLE_NSSI, anNssiId)) + relatedNssis = getRelatedInstancesByRole(execution, ROLE_NSSI, anNssiId) + if(relatedNssis.size() == 1) { + execution.setVariable("IsRANNfAlonePresent", true) + } + execution.setVariable("relatedNssis", relatedNssis) } diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoActivateAccessNSSI.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoActivateAccessNSSI.bpmn index 841a23b3eb..b1561357ae 100644 --- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoActivateAccessNSSI.bpmn +++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoActivateAccessNSSI.bpmn @@ -1,5 +1,5 @@ - + Flow_0rh43xe @@ -16,7 +16,7 @@ #{execution.getVariable("shouldChangeAN_NF_SPStatus") == true} - Flow_0mtkhmv + Flow_0umba3p @@ -27,9 +27,9 @@ Flow_1b6vtso - + - Flow_0523saw + Flow_1vyktdh @@ -260,7 +260,7 @@ ex.processJavaException(execution) def activator = new DoActivateAccessNSSI() activator.updateAnNfStatus(execution) - + Flow_1q7frye Flow_1yd57bl @@ -519,494 +519,573 @@ activator.prepareUpdateJobStatus(execution,"finished","100","AN NSSI activation Flow_0g9k299 + + Flow_0523saw + Flow_1vyktdh + Flow_1buy9ji + + + + Flow_1buy9ji + + + + #{(execution.getVariable("IsRANNfAlonePresent" ) == true)} + + + Flow_0mtkhmv + Flow_0umba3p + Flow_1xrbneh + + + + Flow_1xrbneh + + + + #{(execution.getVariable("IsRANNfAlonePresent" ) == true)} + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - - + + + - - + + - - - + + + - - + + - + - - + + - - + + - - - + + + - + - - + + - + - - + + - - + + - - + + - - - + + + - - + + - - + + - - + + - - + + - - + + + - + - - - + + + + + - + - - - + + + + + + + + + + + - + + + + + + + - - + + - + - - + + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - - + + + + + - - + + + + + - - - - - - - - - - + + + + + - - + + + + + - - + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeallocateAccessNSSI.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeallocateAccessNSSI.bpmn index 4debe1fe21..ae81364f90 100644 --- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeallocateAccessNSSI.bpmn +++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeallocateAccessNSSI.bpmn @@ -1,5 +1,5 @@ - + Flow_14g5p2j @@ -37,7 +37,7 @@ deallocator.preProcessRequest(execution) - Flow_1lfvp5s + Flow_01ssl7f @@ -45,9 +45,8 @@ deallocator.preProcessRequest(execution) - - - + + Flow_1hm17vz Flow_0kt6k2i @@ -84,7 +83,7 @@ def deallocator = new DoDeAllocateAccessNSSI() deallocator.performOofAnNfNSSITerminationCall(execution) - Flow_1x4e0k3 + Flow_0b3qqvw @@ -117,7 +116,7 @@ deallocator.deallocateAnNfNssi(execution) Flow_1x4e0k3 - + Flow_0vcn5tl Flow_1bgguw0 @@ -623,14 +622,14 @@ def deallocator = new DoDeAllocateAccessNSSI() deallocator.deleteRanNfSliceProfileInAAI(execution) - Flow_0412ven - Flow_0tlog6y + Flow_12wqmdr + Flow_15ok12u import org.onap.so.bpmn.infrastructure.scripts.* def deallocator = new DoDeAllocateAccessNSSI() deallocator.deleteTNSliceProfileInAAI(execution) - Flow_0tlog6y + Flow_183aijy Flow_1nh3x4j import org.onap.so.bpmn.infrastructure.scripts.* def deallocator = new DoDeAllocateAccessNSSI() @@ -639,7 +638,7 @@ deallocator.deleteANNSSI(execution) - + @@ -665,13 +664,78 @@ deallocator.deleteANNSSI(execution) + + Flow_1x4e0k3 + Flow_0b3qqvw + Flow_1yewqtt + + + + Flow_1yewqtt + + + + #{(execution.getVariable("IsRANNfAlonePresent" ) == true)} + + + Flow_1lfvp5s + Flow_01ssl7f + Flow_1scubfn + + + + Flow_1scubfn + + + + #{(execution.getVariable("IsRANNfAlonePresent" ) == true)} + + + Flow_0412ven + Flow_12wqmdr + Flow_0r8ldai + + + + #{(execution.getVariable("IsRANNfAlonePresent" ) == true)} + + + + Flow_0r8ldai + Flow_15ok12u + Flow_183aijy + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -767,10 +831,6 @@ deallocator.deleteANNSSI(execution) - - - - @@ -810,7 +870,7 @@ deallocator.deleteANNSSI(execution) - + @@ -844,7 +904,7 @@ deallocator.deleteANNSSI(execution) - + @@ -852,15 +912,11 @@ deallocator.deleteANNSSI(execution) - - - - - + - - + + @@ -920,25 +976,58 @@ deallocator.deleteANNSSI(execution) - - - + + + + + + - - - + + + - + - - - - + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -957,12 +1046,6 @@ deallocator.deleteANNSSI(execution) - - - - - - @@ -984,15 +1067,15 @@ deallocator.deleteANNSSI(execution) - - - - - - + + + + + + @@ -1029,21 +1112,94 @@ deallocator.deleteANNSSI(execution) - - + + + + + - - + + + + + - - + + + + + - - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1074,6 +1230,26 @@ deallocator.deleteANNSSI(execution) + + + + + + + + + + + + + + + + + + + + @@ -1155,72 +1331,18 @@ deallocator.deleteANNSSI(execution) - - - - - + + - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -