aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common/eventmanager/src/main
diff options
context:
space:
mode:
authorSaravanan A <saravanan.a75@wipro.com>2019-04-05 20:45:44 +0530
committerPamela Dragosh <pdragosh@research.att.com>2019-04-08 17:27:35 -0400
commit776b69ebd28440f84a890b1d4170af77ca5974ff (patch)
tree849f41dc83e8a794bd875d08f122ffef3e6e3dc1 /controlloop/common/eventmanager/src/main
parente55d256a9eeb411bb485919eb4c1d449cbae5d46 (diff)
Code changes done for OOF SON use case
Added a new control loop for SON ANR changes Introducing control loop response flow using DCAE_CL_RSP topic Change-Id: I81d0e92ce2f5c489596ad70d7b523cab0d8436ce Issue-ID: POLICY-1463 Signed-off-by: Saravanan A <saravanan.a75@wipro.com> Signed-off-by: Pamela Dragosh <pdragosh@research.att.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 1234a8ae1..8b7b15909 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
@@ -39,6 +39,7 @@ import org.onap.policy.appclcm.LcmResponseWrapper;
import org.onap.policy.controlloop.ControlLoopEvent;
import org.onap.policy.controlloop.ControlLoopException;
import org.onap.policy.controlloop.ControlLoopOperation;
+import org.onap.policy.controlloop.ControlLoopResponse;
import org.onap.policy.controlloop.VirtualControlLoopEvent;
import org.onap.policy.controlloop.actor.appc.AppcActorServiceProvider;
import org.onap.policy.controlloop.actor.appclcm.AppcLcmActorServiceProvider;
@@ -299,7 +300,7 @@ public class ControlLoopOperationManager implements Serializable {
return operationRequest;
case "SDNR":
/*
- * If the recipe is ModifyConfig, a SDNR request is constructed.
+ * If the recipe is ModifyConfig or ModifyConfigANR, a SDNR request is constructed.
*/
this.currentOperation = operation;
this.operationRequest = SdnrActorServiceProvider.constructRequest((VirtualControlLoopEvent) onset,
@@ -985,4 +986,24 @@ public class ControlLoopOperationManager implements Serializable {
//
this.currentOperation = null;
}
+
+ /**
+ * Construct a ControlLoopResponse object from actor response and input event.
+ *
+ * @param response the response from actor
+ * @param event the input event
+ *
+ * @return a ControlLoopResponse
+ */
+ public ControlLoopResponse getControlLoopResponse(Object response, VirtualControlLoopEvent event) {
+ if (response instanceof PciResponseWrapper) {
+ //
+ // Cast SDNR response and handle it
+ //
+ return SdnrActorServiceProvider.getControlLoopResponse((PciResponseWrapper) response, event);
+ } else {
+ return null;
+ }
+ }
+
}