aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeshu Kumar M <seshu.kumar.m@huawei.com>2019-08-05 05:12:20 +0000
committerGerrit Code Review <gerrit@onap.org>2019-08-05 05:12:20 +0000
commit058deb47d8edba65fdef6b5834fbf79ff9989e79 (patch)
treea56563ad1beb3a431629e8859663d8a728a5b172
parent48b5b0067d301b4b9ec12415c68b4aec3fa3d098 (diff)
parent8216fb7fbf1dc5fd8d334532add11cc91e19be14 (diff)
Merge "Fix Blocker Bug"
-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);
}