From 776b69ebd28440f84a890b1d4170af77ca5974ff Mon Sep 17 00:00:00 2001 From: Saravanan A Date: Fri, 5 Apr 2019 20:45:44 +0530 Subject: 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 Signed-off-by: Pamela Dragosh --- .../eventmanager/ControlLoopOperationManager.java | 23 +++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'controlloop/common/eventmanager/src/main') 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; + } + } + } -- cgit 1.2.3-korg