aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common/eventmanager/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'controlloop/common/eventmanager/src/main/java')
-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;
+ }
+ }
+
}