diff options
author | Lukasz Muszkieta <lukasz.muszkieta@nokia.com> | 2021-11-19 13:13:12 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2021-11-19 13:13:12 +0000 |
commit | 634473225cfa557fde97ba507805db7621462742 (patch) | |
tree | dda3dd0d5d38512d18340e3b04be273d030314e6 /bpmn/so-bpmn-infrastructure-common | |
parent | 469cd2266c732713b01ebbe4d31b2e7640f91dd7 (diff) | |
parent | 0c39444aec32954cc40cb2af4aac7f863e421c7d (diff) |
Merge "Support activate, terminate feature for NSMF based TN slices"
Diffstat (limited to 'bpmn/so-bpmn-infrastructure-common')
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) } |