aboutsummaryrefslogtreecommitdiffstats
path: root/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter
diff options
context:
space:
mode:
authorLukasz Muszkieta <lukasz.muszkieta@nokia.com>2019-08-02 17:36:37 +0200
committerLukasz Muszkieta <lukasz.muszkieta@nokia.com>2019-08-02 17:36:37 +0200
commit8216fb7fbf1dc5fd8d334532add11cc91e19be14 (patch)
treeefe529f697e9848da6269f3c7d537840e89ae028 /adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter
parent8b02fbc54e6db36d969b233d136f90b8d6615f80 (diff)
Fix Blocker Bug
Change-Id: I6be7c799896d32ffd20591ce9b8a0957d506b5c3 Issue-ID: SO-2187 Signed-off-by: Lukasz Muszkieta <lukasz.muszkieta@nokia.com>
Diffstat (limited to 'adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter')
-rw-r--r--adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/jobmanagement/JobManager.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/jobmanagement/JobManager.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/jobmanagement/JobManager.java
index d01e5b186c..68fdb79444 100644
--- a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/jobmanagement/JobManager.java
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/jobmanagement/JobManager.java
@@ -126,15 +126,16 @@ public class JobManager {
private OperationStateEnum getOperationState(final VnfmOperation vnfmOperation,
final InlineResponse200 operationResponse) {
switch (vnfmOperation.getNotificationStatus()) {
- case NOTIFICATION_PROCESSING_NOT_REQUIRED:
- default:
- return OperationStateEnum.fromValue(operationResponse.getOperationState().getValue());
case NOTIFICATION_PROCESSING_PENDING:
return org.onap.vnfmadapter.v1.model.OperationStateEnum.PROCESSING;
case NOTIFICATION_PROCEESING_SUCCESSFUL:
return org.onap.vnfmadapter.v1.model.OperationStateEnum.COMPLETED;
case NOTIFICATION_PROCESSING_FAILED:
return org.onap.vnfmadapter.v1.model.OperationStateEnum.FAILED;
+ default:
+ if (operationResponse == null || operationResponse.getOperationState() == null)
+ return null;
+ return OperationStateEnum.fromValue(operationResponse.getOperationState().getValue());
}
}
@@ -157,7 +158,7 @@ public class JobManager {
final java.util.Optional<VnfmOperation> relatedOperation = mapOfJobIdToVnfmOperation.values().stream()
.filter(operation -> operation.getOperationId().equals(operationId)).findFirst();
if (relatedOperation.isPresent()) {
- relatedOperation.get().setVnfDeleted();;
+ relatedOperation.get().setVnfDeleted();
} else {
logger.debug("No operation found for operation ID {} ", operationId);
}