From: sr20255772 Date: Mon, 28 Nov 2022 12:28:40 +0000 (+0000) Subject: Support Activate,Deactivate and Terminate feature for NSMF based TN slices X-Git-Tag: 1.12.1~14^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?p=so.git;a=commitdiff_plain;h=3ac2c805850162882cea6e0fedaa2e2fce4aa8c2 Support Activate,Deactivate and Terminate feature for NSMF based TN slices Issue-ID: SO-4029 Signed-off-by: sr20255772 Change-Id: I97f0c610c55fb19fbcd0f9ae441b6826800820ab --- 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 2aaec9f164..42b36f9b0e 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 @@ -142,10 +142,10 @@ class DoActivateAccessNSSI extends AbstractServiceTaskProcessor { Map relatedNssis = new HashMap<>() relatedNssis = getRelatedInstancesByRole(execution, ROLE_NSSI,KEY_NSSI, anNssiId) + execution.setVariable("relatedNssis", relatedNssis) 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 74a2d980f7..5b65e08fe1 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 @@ -128,10 +128,10 @@ class DoDeAllocateAccessNSSI extends AbstractServiceTaskProcessor { Map relatedNssis = new HashMap<>() relatedNssis = getRelatedInstancesByRole(execution, ROLE_NSSI, anNssiId) + execution.setVariable("relatedNssis", relatedNssis) if(relatedNssis.size() == 1) { execution.setVariable("IsRANNfAlonePresent", true) } - execution.setVariable("relatedNssis", relatedNssis) } diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateNSSI.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateNSSI.groovy index 554f7a6392..daf5f460d8 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateNSSI.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateNSSI.groovy @@ -104,7 +104,7 @@ class DoDeallocateNSSI extends AbstractServiceTaskProcessor try { ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition") as ServiceDecomposition - String vendor = serviceDecomposition ?.getServiceRole() + String vendor = serviceDecomposition.getServiceRole() NetworkType domainType = convertServiceCategory(serviceDecomposition.getServiceCategory()) def currentNSSI = execution.getVariable("currentNSSI") @@ -138,6 +138,9 @@ class DoDeallocateNSSI extends AbstractServiceTaskProcessor if(serviceCategory ==~ /TN.*MH.*/){ return SubnetType.TN_MH.getNetworkType() } + if(serviceCategory ==~ /TN.*FH.*/){ + return SubnetType.TN_FH.getNetworkType() + } return null } 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 b1561357ae..559466413a 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 @@ -37,7 +37,7 @@ Flow_1876ml0 - + Flow_0uxerfg Flow_00vt4gf Flow_0g9k299 @@ -46,7 +46,9 @@ #{execution.getVariable("shouldChangeSPStatus") == true} - + + #{execution.getVariable("shouldChangeSPStatus") == false} + Flow_1yd57bl Flow_0zjaac9 @@ -550,6 +552,35 @@ activator.prepareUpdateJobStatus(execution,"finished","100","AN NSSI activation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -760,35 +791,6 @@ activator.prepareUpdateJobStatus(execution,"finished","100","AN NSSI activation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -801,6 +803,12 @@ activator.prepareUpdateJobStatus(execution,"finished","100","AN NSSI activation + + + + + + @@ -813,6 +821,12 @@ activator.prepareUpdateJobStatus(execution,"finished","100","AN NSSI activation + + + + + + @@ -822,7 +836,7 @@ activator.prepareUpdateJobStatus(execution,"finished","100","AN NSSI activation - + @@ -900,41 +914,59 @@ activator.prepareUpdateJobStatus(execution,"finished","100","AN NSSI activation - - - - - + + - - - - - + + + + + + + + + + + + + + + + + + - - - - - + + - - - - - + + - - - - - + + - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -1032,59 +1064,29 @@ activator.prepareUpdateJobStatus(execution,"finished","100","AN NSSI activation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - - - - - - - - - - + + + + + - - + + + + + - - + + + + + diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeallocateNSSI.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeallocateNSSI.bpmn index 85533e72dc..a1cf7388e7 100644 --- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeallocateNSSI.bpmn +++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeallocateNSSI.bpmn @@ -131,7 +131,9 @@ dnssi.prepareJobStatusRequest(execution) SequenceFlow_1wpbkt9 - + + #{(execution.getVariable("isNSSIDeAllocated" ) == false)} + SequenceFlow_1ii5002 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 48978500e3..fd24568210 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 @@ -1,5 +1,5 @@ - + SequenceFlow_03s744c @@ -154,11 +154,11 @@ deallocator.performOofNSSITerminationCall(execution) - Flow_1oxjcb2 + Flow_0sc59nw - + Flow_083usqs @@ -176,12 +176,73 @@ deallocator.performOofNSSITerminationCall(execution) + + Flow_1oxjcb2 + Flow_0sc59nw + import org.onap.so.bpmn.infrastructure.scripts.* +def runScript = new DoDeallocateTnNssi() +runScript.deleteServiceInstance(execution) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -197,8 +258,8 @@ deallocator.performOofNSSITerminationCall(execution) - - + + @@ -216,120 +277,63 @@ deallocator.performOofNSSITerminationCall(execution) - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - + + - + - - - + + + - + - - - - - - - + - - - - - + + - - - - - + + - - + + - + - - - - - + + - - - - - + + + + + + + + + + - - + + - - - - - + + @@ -340,22 +344,22 @@ deallocator.performOofNSSITerminationCall(execution) + + + + + + - - - - - - - - + + - + @@ -364,31 +368,41 @@ deallocator.performOofNSSITerminationCall(execution) + + + - - + + + + + - - + + + + + - - - - - - - - - - + + + + + - - + + + + + - - + + + + +