aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-infrastructure-common/src/main/groovy
diff options
context:
space:
mode:
authorkrishnaa96 <krishna.moorthy6@wipro.com>2021-10-22 11:38:04 +0530
committerkrishna moorthy <krishna.moorthy6@wipro.com>2021-11-17 08:01:58 +0000
commit0c39444aec32954cc40cb2af4aac7f863e421c7d (patch)
treef5249adaa4edea9fe25fc63d6e82cfc03b2ad902 /bpmn/so-bpmn-infrastructure-common/src/main/groovy
parenta612c41efbca46b7e9d02b5674e4e991e2408017 (diff)
Support activate, terminate feature for NSMF based TN slices
Issue-ID: SO-3784 Signed-off-by: krishnaa96 <krishna.moorthy6@wipro.com> Change-Id: I3214cfe5faf3bc9d10081859d63d5a67ee2d6318
Diffstat (limited to 'bpmn/so-bpmn-infrastructure-common/src/main/groovy')
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoActivateAccessNSSI.groovy6
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeAllocateAccessNSSI.groovy6
2 files changed, 10 insertions, 2 deletions
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<String,ServiceInstance> 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<String,ServiceInstance> 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)
}