From f72f3366be2813bd0c2236dfd82bb6a9d8c1209d Mon Sep 17 00:00:00 2001 From: Bhagyalakshmi Date: Mon, 19 Jun 2023 11:46:58 +0530 Subject: Replacing NS InstanceId as Operation id Change-Id: I2d9545631fbcb1c435fc157353f8e4eeae78823c Issue-ID: SO-4099 Signed-off-by: Bhagyalakshmi --- .../so/etsi/nfvo/ns/lcm/bpmn/flows/service/JobExecutorService.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-bpmn-flows/src/main/java/org/onap/so/etsi/nfvo/ns/lcm/bpmn/flows/service/JobExecutorService.java b/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-bpmn-flows/src/main/java/org/onap/so/etsi/nfvo/ns/lcm/bpmn/flows/service/JobExecutorService.java index 14d4fa2..f83d959 100644 --- a/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-bpmn-flows/src/main/java/org/onap/so/etsi/nfvo/ns/lcm/bpmn/flows/service/JobExecutorService.java +++ b/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-bpmn-flows/src/main/java/org/onap/so/etsi/nfvo/ns/lcm/bpmn/flows/service/JobExecutorService.java @@ -44,6 +44,7 @@ import java.time.Instant; import java.time.LocalDateTime; import java.util.HashMap; import java.util.Map; +import java.util.UUID; import java.util.Optional; import java.util.concurrent.TimeUnit; import org.apache.commons.lang3.tuple.ImmutablePair; @@ -162,7 +163,7 @@ public class JobExecutorService { logger.info("New job created in database :\n{}", newJob); final LocalDateTime currentDateTime = LocalDateTime.now(); - final NsLcmOpOcc newNsLcmOpOcc = new NsLcmOpOcc().id(nsInstanceId).operation(NsLcmOpType.INSTANTIATE) + final NsLcmOpOcc newNsLcmOpOcc = new NsLcmOpOcc().id(UUID.randomUUID().toString()).operation(NsLcmOpType.INSTANTIATE) .operationState(OperationStateEnum.PROCESSING).stateEnteredTime(currentDateTime) .startTime(currentDateTime).nfvoNsInst(getNfvoNsInst(nsInstanceId)).isAutoInvocation(false) .isCancelPending(false).operationParams(gson.toJson(instantiateNsRequest)); @@ -207,7 +208,7 @@ public class JobExecutorService { logger.info("New job created in database :\n{}", nfvoJob); final LocalDateTime currentDateTime = LocalDateTime.now(); - final NsLcmOpOcc nsLcmOpOcc = new NsLcmOpOcc().id(nsInstanceId).operation(NsLcmOpType.TERMINATE) + final NsLcmOpOcc nsLcmOpOcc = new NsLcmOpOcc().id(UUID.randomUUID().toString()).operation(NsLcmOpType.TERMINATE) .operationState(OperationStateEnum.PROCESSING).stateEnteredTime(currentDateTime) .startTime(currentDateTime).nfvoNsInst(getNfvoNsInst(nsInstanceId)).isAutoInvocation(false) .isCancelPending(false).operationParams(gson.toJson(terminateNsRequest)); -- cgit 1.2.3-korg