summaryrefslogtreecommitdiffstats
path: root/controlloop/common/eventmanager/src/main
diff options
context:
space:
mode:
authorRitu Sood <ritu.sood@intel.com>2017-09-11 14:20:13 -0700
committerRitu Sood <ritu.sood@intel.com>2017-09-21 03:35:01 -0700
commit1aa30b7d83f97103097c7f5d3e4cbd2fad92f659 (patch)
tree8debfa85be42597ea094a298eadc1d0886e5d50f /controlloop/common/eventmanager/src/main
parentf5431672cc07c00f3d4e0a8a0a28d3edffb7d37e (diff)
Add VFC Response in Working Memory & JUNIT
Adding code to insert VFC reponse in working memory and handling that response. Also adding JUNIT and yaml file for VoLTE usecase. Issue-Id: POLICY-212 Change-Id: I74a13272ccd931478d27d80715d8c3ac756fb5c7 Signed-off-by: Ritu Sood <ritu.sood@intel.com>
Diffstat (limited to 'controlloop/common/eventmanager/src/main')
-rw-r--r--controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java23
1 files changed, 22 insertions, 1 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 8849a2351..ec99c1a5c 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
@@ -45,6 +45,7 @@ import org.onap.policy.controlloop.policy.Policy;
import org.onap.policy.controlloop.policy.PolicyResult;
import org.onap.policy.controlloop.actor.so.SOActorServiceProvider;
import org.onap.policy.so.SOResponse;
+import org.onap.policy.vfc.VFCResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -367,8 +368,28 @@ public class ControlLoopOperationManager implements Serializable {
return PolicyResult.FAILURE;
}
+ } else if (response instanceof VFCResponse) {
+ VFCResponse vfcResponse = (VFCResponse) response;
+ if (vfcResponse.responseDescriptor.getStatus().equalsIgnoreCase("finished")) {
+ //
+ // Consider it as success
+ //
+ this.completeOperation(new Integer(1), " Success", PolicyResult.SUCCESS);
+ if (this.policyResult != null && this.policyResult.equals(PolicyResult.FAILURE_TIMEOUT)) {
+ return null;
+ }
+ return PolicyResult.SUCCESS;
+ } else {
+ //
+ // Consider it as failure
+ //
+ this.completeOperation(new Integer(1), " Failed", PolicyResult.FAILURE);
+ if (this.policyResult != null && this.policyResult.equals(PolicyResult.FAILURE_TIMEOUT)) {
+ return null;
+ }
+ return PolicyResult.FAILURE;
+ }
}
-
return null;
}