summaryrefslogtreecommitdiffstats
path: root/controlloop/common/eventmanager/src
diff options
context:
space:
mode:
Diffstat (limited to 'controlloop/common/eventmanager/src')
-rw-r--r--controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java14
1 files changed, 5 insertions, 9 deletions
diff --git a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java
index e13352ac0..590e32439 100644
--- a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java
+++ b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java
@@ -346,8 +346,6 @@ public class ControlLoopOperationManager implements Serializable {
return null;
} else if (response instanceof SOResponse) {
SOResponse msoResponse = (SOResponse) response;
-
- Integer operationAttempt = this.attempts;
switch (msoResponse.httpResponseCode) {
case 200:
@@ -355,7 +353,7 @@ public class ControlLoopOperationManager implements Serializable {
//
// Consider it as success
//
- this.completeOperation(operationAttempt, msoResponse.httpResponseCode + " Success", PolicyResult.SUCCESS);
+ this.completeOperation(this.attempts, msoResponse.httpResponseCode + " Success", PolicyResult.SUCCESS);
if (this.policyResult != null && this.policyResult.equals(PolicyResult.FAILURE_TIMEOUT)) {
return null;
}
@@ -364,23 +362,21 @@ public class ControlLoopOperationManager implements Serializable {
//
// Consider it as failure
//
- this.completeOperation(operationAttempt, msoResponse.httpResponseCode + " Failed", PolicyResult.FAILURE);
+ this.completeOperation(this.attempts, msoResponse.httpResponseCode + " Failed", PolicyResult.FAILURE);
if (this.policyResult != null && this.policyResult.equals(PolicyResult.FAILURE_TIMEOUT)) {
return null;
}
- // increment operation attempts for retries
- this.attempts += 1;
return PolicyResult.FAILURE;
}
} else if (response instanceof VFCResponse) {
VFCResponse vfcResponse = (VFCResponse) response;
- Integer operationAttempt = this.attempts;
+
if (vfcResponse.responseDescriptor.getStatus().equalsIgnoreCase("finished")) {
//
// Consider it as success
//
- this.completeOperation(operationAttempt, " Success", PolicyResult.SUCCESS);
+ this.completeOperation(this.attempts, " Success", PolicyResult.SUCCESS);
if (this.policyResult != null && this.policyResult.equals(PolicyResult.FAILURE_TIMEOUT)) {
return null;
}
@@ -389,7 +385,7 @@ public class ControlLoopOperationManager implements Serializable {
//
// Consider it as failure
//
- this.completeOperation(operationAttempt, " Failed", PolicyResult.FAILURE);
+ this.completeOperation(this.attempts, " Failed", PolicyResult.FAILURE);
if (this.policyResult != null && this.policyResult.equals(PolicyResult.FAILURE_TIMEOUT)) {
return null;
}