From a5e1bac54eeb71f462a19cfb2b88b5886ca4bea1 Mon Sep 17 00:00:00 2001 From: deepikasatheesh Date: Thu, 10 Sep 2020 03:24:13 -0700 Subject: NSMF Functionality improvements - NSI Termination Issue-ID: SO-3231 Signed-off-by: deepikasatheesh Change-Id: I5ebeea9e7e79ba1c7c236478f4acf34af674eb77 --- .../infrastructure/scripts/DoDeallocateNSSI.groovy | 153 +++++++----- .../scripts/DoDeleteSliceService.groovy | 142 ++++++++--- .../resources/subprocess/DoDeallocateNSSI.bpmn | 265 +++++++++++---------- .../resources/subprocess/DoDeleteSliceService.bpmn | 158 ++++++------ 4 files changed, 425 insertions(+), 293 deletions(-) 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 547cb6cad7..0c795b3bd1 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 @@ -23,6 +23,7 @@ import com.fasterxml.jackson.databind.ObjectMapper import org.camunda.bpm.engine.delegate.DelegateExecution import org.onap.logging.filter.base.ONAPComponents import org.onap.so.beans.nsmf.DeAllocateNssi +import org.onap.so.beans.nsmf.ServiceInfo import org.onap.so.beans.nsmf.EsrInfo import org.onap.so.beans.nsmf.JobStatusRequest import org.onap.so.beans.nsmf.JobStatusResponse @@ -44,7 +45,7 @@ import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory import org.onap.so.db.request.beans.OperationStatus import org.slf4j.Logger import org.slf4j.LoggerFactory - +import org.json.JSONObject import javax.ws.rs.core.Response @@ -126,7 +127,7 @@ class DoDeallocateNSSI extends AbstractServiceTaskProcessor } LOGGER.debug("*****${PREFIX} Exit processDecomposition *****") } - + /** * send deallocate request to nssmf * @param execution @@ -140,61 +141,106 @@ class DoDeallocateNSSI extends AbstractServiceTaskProcessor String nssiId = currentNSSI['nssiServiceInstanceId'] String nsiId = currentNSSI['nsiServiceInstanceId'] String scriptName = execution.getVariable("scriptName") + boolean modifyAction = execution.getVariable("terminateNSI") + String serviceInvariantUuid = currentNSSI['modelInvariantId'] + String serviceUuid = currentNSSI['modelVersionId'] + String globalSubscriberId = currentNSSI['globalSubscriberId'] + String subscriptionServiceType = execution.getVariable("serviceType") + DeAllocateNssi deAllocateNssi = new DeAllocateNssi() deAllocateNssi.setNsiId(nsiId) deAllocateNssi.setNssiId(nssiId) deAllocateNssi.setTerminateNssiOption(0) deAllocateNssi.setSnssaiList(Arrays.asList(snssai)) deAllocateNssi.setScriptName(scriptName) - - NssiDeAllocateRequest deAllocateRequest = new NssiDeAllocateRequest() - deAllocateRequest.setDeAllocateNssi(deAllocateNssi) - deAllocateRequest.setEsrInfo(getEsrInfo(currentNSSI)) - - ObjectMapper mapper = new ObjectMapper() - String nssmfRequest = mapper.writeValueAsString(deAllocateRequest) - - String urlStr = String.format("/api/rest/provMns/v1/NSS/SliceProfiles/%s",profileId) + deAllocateNssi.setSliceProfileId(profileId) + deAllocateNssi.setModifyAction(modifyAction) + + ServiceInfo serviceInfo = new ServiceInfo() + serviceInfo.setServiceInvariantUuid(serviceInvariantUuid) + serviceInfo.setServiceUuid(serviceUuid) + serviceInfo.setGlobalSubscriberId(globalSubscriberId) + serviceInfo.setSubscriptionServiceType(subscriptionServiceType) + + EsrInfo esrInfo = getEsrInfo(currentNSSI) + + execution.setVariable("deAllocateNssi",deAllocateNssi) + execution.setVariable("esrInfo",esrInfo) + execution.setVariable("serviceInfo",serviceInfo) + String nssmfRequest = """ + { + "deAllocateNssi": "${execution.getVariable("deAllocateNssi") as JSONObject}", + "esrInfo": ${execution.getVariable("esrInfo") as JSONObject}, + "serviceInfo": ${execution.getVariable("serviceInfo") as JSONObject} + } + """ + + String urlStr = String.format("/api/rest/provMns/v1/NSS/nssi/%s",nssiId) NssiResponse nssmfResponse = nssmfAdapterUtils.sendPostRequestNSSMF(execution, urlStr, nssmfRequest, NssiResponse.class) if (nssmfResponse != null) { - currentNSSI['jobId']= nssmfResponse.getJobId() ?: "" - currentNSSI['jobProgress'] = 0 - execution.setVariable("currentNSSI", currentNSSI) - - LOGGER.debug("*****${PREFIX} Exit sendRequestToNSSMF *****") - } else { + currentNSSI['jobId']= nssmfResponse.getJobId() ?: "" + currentNSSI['jobProgress'] = 0 + execution.setVariable("currentNSSI", currentNSSI) + } + else { exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "Received a Bad Response from NSSMF.") } - + LOGGER.debug("*****${PREFIX} Exit sendRequestToNSSMF *****") } - /** +/** * send to nssmf query progress * @param execution */ - void getJobStatus(DelegateExecution execution) + void prepareJobStatusRequest(DelegateExecution execution) { def currentNSSI = execution.getVariable("currentNSSI") String jobId = currentNSSI['jobId'] String nssiId = currentNSSI['nssiServiceInstanceId'] String nsiId = currentNSSI['nsiServiceInstanceId'] + String serviceInvariantUuid = currentNSSI['modelInvariantId'] + String serviceUuid = currentNSSI['modelVersionId'] + String globalSubscriberId = currentNSSI['globalSubscriberId'] + String subscriptionServiceType = execution.getVariable("serviceType") + String sST = currentNSSI['sST'] + String PLMNIdList = currentNSSI['PLMNIdList'] + String nssiName = currentNSSI['nssiName'] + + execution.setVariable("responseId", "3") + execution.setVariable("esrInfo", getEsrInfo(currentNSSI)) + execution.setVariable("jobId", jobId) + + Map serviceInfoMap = new HashMap<>() + serviceInfoMap.put("nssiId", nssiId) + serviceInfoMap.put("nsiId", nsiId) + serviceInfoMap.put("nssiName", nssiName) + serviceInfoMap.put("sST", sST) + serviceInfoMap.put("PLMNIdList", PLMNIdList) + serviceInfoMap.put("globalSubscriberId", globalSubscriberId) + serviceInfoMap.put("subscriptionServiceType", subscriptionServiceType) + serviceInfoMap.put("serviceInvariantUuid", serviceInvariantUuid) + serviceInfoMap.put("serviceUuid", serviceUuid) + + execution.setVariable("serviceInfo", serviceInfoMap) + } - JobStatusRequest jobStatusRequest = new JobStatusRequest() - jobStatusRequest.setNssiId(nssiId) - jobStatusRequest.setNsiId(nsiId) - jobStatusRequest.setEsrInfo(getEsrInfo(currentNSSI)) - - ObjectMapper mapper = new ObjectMapper() - String nssmfRequest = mapper.writeValueAsString(jobStatusRequest) - - String urlStr = String.format("/api/rest/provMns/v1/NSS/jobs/%s", jobId) - - JobStatusResponse jobStatusResponse = nssmfAdapterUtils.sendPostRequestNSSMF(execution, urlStr, nssmfRequest, JobStatusResponse.class) - - if (jobStatusResponse != null) { - def progress = jobStatusResponse?.getResponseDescriptor()?.getProgress() + + /** + * send to nssmf query progress + * @param execution + */ + void handleJobStatus(DelegateExecution execution) + { + try + { + String jobStatusResponse = execution.getVariable("responseDescriptor") + String status = jsonUtil.getJsonValue(jobStatusResponse,"status") + def statusDescription = jsonUtil.getJsonValue(jobStatusResponse,"statusDescription") + def progress = jsonUtil.getJsonValue(jobStatusResponse,"progress") + if(!status.equalsIgnoreCase("failed")) + { if(!progress) { LOGGER.error("job progress is null or empty!") @@ -206,61 +252,60 @@ class DoDeallocateNSSI extends AbstractServiceTaskProcessor execution.setVariable("isNSSIDeAllocated", (currentProgress == 100)) execution.setVariable("isNeedUpdateDB", (oldProgress != currentProgress)) currentNSSI['jobProgress'] = currentProgress - - def statusDescription = jobStatusResponse?.getResponseDescriptor()?.getStatusDescription() + currentNSSI['status'] = status currentNSSI['statusDescription'] = statusDescription LOGGER.debug("job status result: nsiId = ${nsiId}, nssiId=${nssiId}, oldProgress=${oldProgress}, progress = ${currentProgress}" ) - - } else { + } + else { + execution.setVariable("isNeedUpdateDB", "true") exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "Received a Bad Response from NSSMF.") } - + } + catch (any) + { + String msg = "Received a Bad Response from NSSMF." cause-"+any.getCause()" + LOGGER.error(any.printStackTrace()) + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg) + } } private EsrInfo getEsrInfo(def currentNSSI) { String domaintype = currentNSSI['domainType'] String vendor = currentNSSI['vendor'] - + EsrInfo info = new EsrInfo() info.setNetworkType(NetworkType.fromString(domaintype)) info.setVendor(vendor) return info } - /** + /** * handle job status * prepare update requestdb * @param execution */ - void handleJobStatus(DelegateExecution execution) + void prepareUpdateOperationStatus(DelegateExecution execution) { def currentNSSI = execution.getVariable("currentNSSI") int currentProgress = currentNSSI["jobProgress"] def proportion = currentNSSI['proportion'] def statusDes = currentNSSI["statusDescription"] int progress = (currentProgress as int) == 0 ? 0 : (currentProgress as int) / 100 * (proportion as int) - + def status = currentNSSI['status'] + OperationStatus operationStatus = new OperationStatus() operationStatus.setServiceId(currentNSSI['e2eServiceInstanceId'] as String) operationStatus.setOperationId(currentNSSI['operationId'] as String) operationStatus.setOperation("DELETE") - operationStatus.setResult("processing") + operationStatus.setResult(status as String) operationStatus.setProgress(progress as String) operationStatus.setOperationContent(statusDes as String) requestDBUtil.prepareUpdateOperationStatus(execution, operationStatus) LOGGER.debug("update operation, currentProgress=${currentProgress}, proportion=${proportion}, progress = ${progress}" ) } - - void timeDelay(DelegateExecution execution) { - try { - Thread.sleep(10000); - } catch(InterruptedException e) { - LOGGER.error("Time Delay exception" + e) - } - } - + /** * delete slice profile from aai * @param execution @@ -291,4 +336,4 @@ class DoDeallocateNSSI extends AbstractServiceTaskProcessor } LOGGER.debug("*****${PREFIX} Exist delSliceProfileFromAAI *****") } -} \ No newline at end of file +} diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteSliceService.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteSliceService.groovy index 5354d52fce..2f78c3d551 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteSliceService.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteSliceService.groovy @@ -25,16 +25,20 @@ import org.onap.aai.domain.yang.AllottedResource import org.onap.aai.domain.yang.AllottedResources import org.onap.aai.domain.yang.Relationship import org.onap.aai.domain.yang.ServiceInstance -import org.onap.aai.domain.yang.SliceProfiles +import org.onap.aai.domain.yang.ServiceProfile +import org.onap.aai.domain.yang.ServiceProfiles import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor import org.onap.so.bpmn.common.scripts.ExceptionUtil +import org.onap.so.bpmn.common.scripts.OofUtils import org.onap.aaiclient.client.aai.AAIObjectType import org.onap.aaiclient.client.aai.entities.AAIResultWrapper import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri +import org.onap.so.client.HttpClient +import org.onap.so.client.HttpClientFactory import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory import org.slf4j.Logger import org.slf4j.LoggerFactory - +import javax.ws.rs.core.Response import javax.ws.rs.NotFoundException import static org.apache.commons.lang3.StringUtils.isBlank @@ -52,6 +56,7 @@ import static org.apache.commons.lang3.StringUtils.isBlank class DoDeleteSliceService extends AbstractServiceTaskProcessor { private final String PREFIX ="DoDeleteSliceService" ExceptionUtil exceptionUtil = new ExceptionUtil() + OofUtils oofUtils = new OofUtils() private static final Logger LOGGER = LoggerFactory.getLogger( DoDeleteSliceService.class) @Override @@ -96,17 +101,47 @@ class DoDeleteSliceService extends AbstractServiceTaskProcessor { { LOGGER.trace(" *****${PREFIX} Start queryE2ESliceSeriveFromAAI *****") String serviceInstanceId = execution.getVariable("serviceInstanceId") - + try + { String errorMsg = "query e2e slice service from aai failed" AAIResultWrapper wrapper = queryAAI(execution, AAIObjectType.SERVICE_INSTANCE, serviceInstanceId, errorMsg) Optional si =wrapper.asBean(ServiceInstance.class) if(si.isPresent()) { String snssai = si.get()?.getEnvironmentContext() + ServiceProfiles serviceProfiles = si.get()?.getServiceProfiles() + ServiceProfile serviceProfile = serviceProfiles.getServiceProfile().get(0) + String serviceProfileId = serviceProfile ? serviceProfile.getProfileId() : "" execution.setVariable("snssai", snssai ?: "") - LOGGER.info("serviceInstanceId: ${serviceInstanceId}, snssai: ${snssai}") + execution.setVariable("serviceProfileId",serviceProfileId) + List sliceProfileList = [] + List relationshipList = si.get().getRelationshipList().getRelationship() + for (Relationship relationship : relationshipList) { + String relatedTo = relationship.getRelatedTo() + if (relatedTo.toLowerCase() == "service-instance") { + String relatioshipurl = relationship.getRelatedLink() + String instanceId = relatioshipurl.substring(relatioshipurl.lastIndexOf("/") + 1, relatioshipurl.length()) + AAIResultWrapper wrapper1 = queryAAI(execution, AAIObjectType.SERVICE_INSTANCE, instanceId, errorMsg) + Optional serviceInstance = wrapper1.asBean(ServiceInstance.class) + if (serviceInstance.isPresent()) { + ServiceInstance instance = serviceInstance.get() + if ("slice-profile-instance".equalsIgnoreCase(instance.getServiceRole())) { + sliceProfileList.add(instance) + } + } + } + } + execution.setVariable("sliceProfileList",sliceProfileList) + LOGGER.info("serviceInstanceId: ${serviceInstanceId}, snssai: ${snssai}, sliceProfileList: ${sliceProfileList}") } LOGGER.trace(" *****${PREFIX} Exit queryE2ESliceSeriveFromAAI *****") + } + catch (any) + { + String msg = "query E2E slice service from aai failed! cause-"+any.getCause() + LOGGER.error(any.printStackTrace()) + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg); + } } /** @@ -169,7 +204,15 @@ class DoDeleteSliceService extends AbstractServiceTaskProcessor { if (relatedTo == "service-instance") { String relatedLink = relationship.getRelatedLink()?:"" - String nssiId = relatedLink ? relatedLink.substring(relatedLink.lastIndexOf("/") + 1,relatedLink.length()) : "" + String instanceId = relatedLink ? relatedLink.substring(relatedLink.lastIndexOf("/") + 1,relatedLink.length()) : "" + AAIResultWrapper wrapper1 = queryAAI(execution, AAIObjectType.SERVICE_INSTANCE, instanceId, errorMsg) + Optional serviceInstance = wrapper1.asBean(ServiceInstance.class) + if (serviceInstance.isPresent()) { + ServiceInstance instance = serviceInstance.get() + if ("nssi".equalsIgnoreCase(instance.getServiceRole())) { + nssiId = instance.getServiceInstanceId() + } + } nssiIdList.add(nssiId) msg+="${nssiId}, " } @@ -227,12 +270,24 @@ class DoDeleteSliceService extends AbstractServiceTaskProcessor { { LOGGER.trace(" *****${PREFIX} Start getCurrentNSSI *****") List nssiInstanceList = execution.getVariable("nssiInstanceList") + List sliceProfileList = execution.getVariable("sliceProfileList") int currentIndex = execution.getVariable("currentNSSIIndex") as int + String profileId = "" ServiceInstance nssi = nssiInstanceList?.get(currentIndex) + for(ServiceInstance sliceProfileInstance : sliceProfileList) { + if(sliceProfileInstance.getWorkloadContext().equalsIgnoreCase(nssi.getWorkloadContext())) + { + profileId = sliceProfileInstance.getServiceInstanceId() + } + } def currentNSSI = [:] currentNSSI['nssiServiceInstanceId'] = nssi?.getServiceInstanceId() currentNSSI['modelInvariantId'] = nssi?.getModelInvariantId() currentNSSI['modelVersionId'] = nssi?.getModelVersionId() + currentNSSI['nssiName'] = nssi?.getServiceInstanceName() + currentNSSI['sST'] = nssi?.getServiceType() + currentNSSI['PLMNIdList'] = nssi?.getServiceInstanceLocationId() + currentNSSI['profileId'] = profileId currentNSSI['snssai'] = execution.getVariable("snssai") ?: "" currentNSSI['nsiServiceInstanceId'] = execution.getVariable("nsiId") ?: "" currentNSSI['operationId'] = execution.getVariable("operationId") ?: "" @@ -271,30 +326,6 @@ class DoDeleteSliceService extends AbstractServiceTaskProcessor { LOGGER.trace(" *****${PREFIX} Exit parseNextNSSI *****") } - - /** - * query sliceProfile from AAI - * save profileId - * @param execution - */ - void querySliceProfileFromAAI(DelegateExecution execution) - { - LOGGER.trace(" *****${PREFIX} Start querySliceProfileFromAAI *****") - def currentNSSI = execution.getVariable("currentNSSI") - String nssiId = currentNSSI['nssiServiceInstanceId'] - String errorMsg = "query slice profile failed" - AAIResultWrapper wrapper = queryAAI(execution, AAIObjectType.SLICE_PROFILE_ALL, nssiId, errorMsg) - Optional sliceProfiles =wrapper.asBean(SliceProfiles.class) - if(sliceProfiles.isPresent()) - { - String profileId = sliceProfiles.get().getSliceProfile()?.get(0)?.getProfileId() - currentNSSI['profileId'] = profileId ?: "" - LOGGER.info("nssiId: ${nssiId}, profileId: ${profileId}") - } - execution.setVariable("currentNSSI", currentNSSI) - LOGGER.trace(" *****${PREFIX} Exit querySliceProfileFromAAI *****") - } - /** * query AAI * @param execution @@ -317,4 +348,57 @@ class DoDeleteSliceService extends AbstractServiceTaskProcessor { return wrapper } + void terminateNSIQuery(DelegateExecution execution) + { + logger.debug("Start terminateNSIQuery") + + String requestId = execution.getVariable("msoRequestId") + String nxlId = currentNSSI['nsiServiceInstanceId'] + String nxlType = "NSI" + String messageType = "nsiTerminationResponse" + String serviceInstanceId = execution.getVariable("serviceInstanceId") + + def authHeader = "" + String basicAuth = UrnPropertiesReader.getVariable("mso.oof.auth", execution) + String msokey = UrnPropertiesReader.getVariable("mso.msoKey", execution) + + String basicAuthValue = utils.encrypt(basicAuth, msokey) + if (basicAuthValue != null) { + logger.debug( "Obtained BasicAuth username and password for OOF: " + basicAuthValue) + try { + authHeader = utils.getBasicAuth(basicAuthValue, msokey) + execution.setVariable("BasicAuthHeaderValue", authHeader) + } catch (Exception ex) { + logger.debug( "Unable to encode username and password string: " + ex) + exceptionUtil.buildAndThrowWorkflowException(execution, 401, "Internal Error - Unable to " + + "encode username and password string") + } + } else { + logger.debug( "Unable to obtain BasicAuth - BasicAuth value null") + exceptionUtil.buildAndThrowWorkflowException(execution, 401, "Internal Error - BasicAuth " + + "value null") + } + + URL requestUrl = new URL(oofUrl + "/api/oof/terminate/nxi/v1") + String oofRequest = oofUtils.buildTerminateNxiRequest(requestId, nxlId, nxlType, messageType, serviceInstanceId) + HttpClient httpClient = new HttpClientFactory().newJsonClient(requestUrl, ONAPComponents.OOF) + httpClient.addAdditionalHeader("Authorization", authHeader) + Response httpResponse = httpClient.post(oofRequest) + + int responseCode = httpResponse.getStatus() + logger.debug("OOF sync response code is: " + responseCode) + + if(responseCode != 200){ + exceptionUtil.buildAndThrowWorkflowException(execution, responseCode, "Received a Bad Sync Response from OOF.") + } + try { + Map resMap = httpResponse.readEntity(Map.class) + boolean terminateResponse = resMap.get("terminateResponse") + execution.setVariable("terminateNSI", terminateResponse) + } catch (Exception ex) { + logger.debug( "Failed to get terminate Response suggested by OOF.") + exceptionUtil.buildAndThrowWorkflowException(execution, 401, "Failed to get terminate Response suggested by OOF.") + } + logger.debug("Finish terminateNSIQuery") + } } 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 db805ecb92..c107cfb53a 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 @@ -1,5 +1,5 @@ - + SequenceFlow_05jfhy6 @@ -35,25 +35,15 @@ dnssi.processDecomposition(execution) SequenceFlow_1e7o57n - SequenceFlow_03b0822 + SequenceFlow_1wj89r5 import org.onap.so.bpmn.infrastructure.scripts.* def dnssi= new DoDeallocateNSSI() dnssi.sendRequestToNSSMF(execution) - - - SequenceFlow_03b0822 - SequenceFlow_1anlirk - SequenceFlow_1jj0p5q - import org.onap.so.bpmn.infrastructure.scripts.* -def dnssi= new DoDeallocateNSSI() -dnssi.getJobStatus(execution) - - - - SequenceFlow_1jj0p5q + + SequenceFlow_02327ff SequenceFlow_0xq380j - SequenceFlow_0sfh52b + SequenceFlow_1wpbkt9 SequenceFlow_0xq380j @@ -76,15 +66,6 @@ dnssi.delSliceProfileFromAAI(execution) import org.onap.so.bpmn.infrastructure.scripts.* def dnssi= new DoDeallocateNSSI() dnssi.preProcessRequest(execution) - - - - SequenceFlow_1ugva41 - SequenceFlow_1u66wjs - SequenceFlow_1anlirk - import org.onap.so.bpmn.infrastructure.scripts.* -def dnssi= new DoDeallocateNSSI() -dnssi.timeDelay(execution) @@ -105,149 +86,171 @@ dnssi.timeDelay(execution) http-connector - SequenceFlow_04vg0c2 - SequenceFlow_1ugva41 + SequenceFlow_19cdxhv + SequenceFlow_02327ff - - SequenceFlow_0sfh52b - SequenceFlow_0r95j9m - SequenceFlow_1u66wjs - - - - #{(execution.getVariable("isNeedUpdateDB" ) == true)} - #{(execution.getVariable("isNeedUpdateDB" ) == true)} - - - - - SequenceFlow_0r95j9m - SequenceFlow_04vg0c2 + SequenceFlow_0o7qjoo + SequenceFlow_19cdxhv + import org.onap.so.bpmn.infrastructure.scripts.* +def dnssi= new DoDeallocateNSSI() +dnssi.prepareUpdateOperationStatus(execution) + + + + + + + + + + SequenceFlow_0w01l14 + SequenceFlow_10nogqz + + + + + SequenceFlow_10nogqz + SequenceFlow_0o7qjoo import org.onap.so.bpmn.infrastructure.scripts.* def dnssi= new DoDeallocateNSSI() dnssi.handleJobStatus(execution) + + + SequenceFlow_1wj89r5 + SequenceFlow_0w01l14 + import org.onap.so.bpmn.infrastructure.scripts.* +def dnssi= new DoDeallocateNSSI() +dnssi.prepareJobStatusRequest(execution) + + + + + + SequenceFlow_1wpbkt9 + + + + - - + + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + - + - - - - - + - - - - - + - - - - - + - - - - - - - - - - - - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteSliceService.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteSliceService.bpmn index 5f4816e78f..5510dcde38 100644 --- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteSliceService.bpmn +++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteSliceService.bpmn @@ -1,5 +1,5 @@ - + SequenceFlow_0ep5het @@ -23,12 +23,11 @@ ddss.getNSIFromAAI(execution) SequenceFlow_1rgfzzy - SequenceFlow_05si1me + SequenceFlow_1aa2ek0 import org.onap.so.bpmn.infrastructure.scripts.* def ddss= new DoDeleteSliceService() ddss.getNSSIListFromAAI(execution) - SequenceFlow_15z9iio SequenceFlow_1c4fjbv @@ -40,7 +39,6 @@ ddss.getNSSIListFromAAI(execution) #{(execution.getVariable("isAllNSSIFinished" ) == true)} - #{(execution.getVariable("isAllNSSIFinished" ) == false)} @@ -55,8 +53,8 @@ ddss.preProcessRequest(execution) SequenceFlow_0926ghe - SequenceFlow_05si1me - SequenceFlow_01o2qpv + SequenceFlow_1252rbf + SequenceFlow_17tvomo import org.onap.so.bpmn.infrastructure.scripts.* def ddss= new DoDeleteSliceService() ddss.getCurrentNSSI(execution) @@ -69,14 +67,6 @@ def ddss= new DoDeleteSliceService() ddss.parseNextNSSI(execution) - - - SequenceFlow_01o2qpv - SequenceFlow_0q83qg3 - import org.onap.so.bpmn.infrastructure.scripts.* -def ddss= new DoDeleteSliceService() -ddss.querySliceProfileFromAAI(execution) - SequenceFlow_0npmman @@ -93,30 +83,84 @@ ddss.queryE2ESliceSeriveFromAAI(execution) - SequenceFlow_0q83qg3 + SequenceFlow_17tvomo SequenceFlow_0c58sw3 + + SequenceFlow_1aa2ek0 + SequenceFlow_1252rbf + import org.onap.so.bpmn.infrastructure.scripts.* +def dss= new DeleteSliceService() +dss.terminateNSIQuery(execution) + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + @@ -126,79 +170,35 @@ ddss.queryE2ESliceSeriveFromAAI(execution) - - - - - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - - - - - - - - - - - - - - - + + + + -- cgit 1.2.3-korg