Added scriptName for deallocation of NSSI. 81/104881/1
authorisaac.manuelraj <isaac.manuelraj@huawei.com>
Wed, 1 Apr 2020 15:08:51 +0000 (20:38 +0530)
committerisaac.manuelraj <isaac.manuelraj@huawei.com>
Wed, 1 Apr 2020 15:08:51 +0000 (20:38 +0530)
Added scriptName for deallocation of NSSI. scriptName will be passed to NSSMF Adapter.

Issue-ID: SO-2723
Signed-off-by: Isaac Manuel Raj <isaac.manuelraj@huawei.com>
Change-Id: I69a5445f6ad0870b7aa855fc3ca80ac8e3cf3879

bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSliceService.groovy
bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateNSSI.groovy
bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteSliceService.bpmn
mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/e2eserviceinstancebeans/E2EServiceInstanceDeleteRequest.java

index d8160a9..45fd049 100644 (file)
@@ -77,7 +77,7 @@ class DeleteSliceService extends AbstractServiceTaskProcessor {
             checkAndSetRequestParam(siRequest,"globalSubscriberId",false, execution)
             checkAndSetRequestParam(siRequest,"serviceType",false, execution)
             checkAndSetRequestParam(siRequest,"operationId",false, execution)
-
+            checkAndSetRequestParam(siRequest,"scriptName",false, execution)
             //prepare init operation status
             execution.setVariable("progress", "0")
             execution.setVariable("result", "processing")
index 8d8e973..662baf3 100644 (file)
@@ -138,12 +138,14 @@ class DoDeallocateNSSI extends AbstractServiceTaskProcessor
         String profileId = currentNSSI['profileId']
         String nssiId = currentNSSI['nssiServiceInstanceId']
         String nsiId = currentNSSI['nsiServiceInstanceId']
+        String scriptName = execution.getVariable("scriptName")
 
         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)
index 6d9df52..033f293 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_0prw6yo" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.4.1">
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_0prw6yo" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="2.2.3">
   <bpmn:process id="DeleteSliceService" name="DeleteSliceService" isExecutable="true">
     <bpmn:startEvent id="StartEvent_1" name="start">
       <bpmn:outgoing>SequenceFlow_1ti9sxe</bpmn:outgoing>
@@ -102,6 +102,7 @@ dss.deleteSliceServiceInstance(execution)</bpmn:script>
         <camunda:in source="operationId" target="operationId" />
         <camunda:in source="operationType" target="operationType" />
         <camunda:out source="WorkflowException" target="WorkflowException" />
+        <camunda:in source="scriptName" target="scriptName" />
       </bpmn:extensionElements>
       <bpmn:incoming>SequenceFlow_16lh6o6</bpmn:incoming>
       <bpmn:outgoing>SequenceFlow_0nl4kfh</bpmn:outgoing>
index 3335410..21aa89b 100644 (file)
 package org.onap.so.apihandlerinfra.e2eserviceinstancebeans;
 
 
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
 public class E2EServiceInstanceDeleteRequest {
 
     private String globalSubscriberId;
 
     private String serviceType;
 
+    @JsonIgnore
+    private String scriptName;
+
     public String getGlobalSubscriberId() {
         return globalSubscriberId;
     }
@@ -43,4 +48,11 @@ public class E2EServiceInstanceDeleteRequest {
         this.serviceType = serviceType;
     }
 
+    public String getScriptName() {
+        return scriptName;
+    }
+
+    public void setScriptName(String scriptName) {
+        this.scriptName = scriptName;
+    }
 }