From 85b1ada7cc0883aa8b86ea6e11bf86719e1cc10e Mon Sep 17 00:00:00 2001 From: daniel Date: Tue, 24 Oct 2017 22:00:08 -0500 Subject: Fix Source/Target Lock The locking of the target is now taken care of when the operation manager is initialized. This allows us to keep the template flow the same and to ensure that for vFW we will not lock the source if it is not intended to be the target. NOTE: This will have to be revised in the future if policy chaining will support having different targets specified for each policy in the chain. Additional work was done for hardening the APPC model code to make sure exceptions are caught and we gracefully end processing the event with memory clean up and a final failure notification sent. Issue-Id: POLICY-367 Change-Id: Ic796d95eb5400067744492f810dd8069ba6241b3 Signed-off-by: Daniel Cruz Signed-off-by: daniel --- .../controlloop/eventmanager/ControlLoopOperationManagerTest.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'controlloop/common/eventmanager/src/test/java') diff --git a/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManagerTest.java b/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManagerTest.java index caa17ff38..d41d8bf57 100644 --- a/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManagerTest.java +++ b/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManagerTest.java @@ -40,6 +40,7 @@ import org.onap.policy.appclcm.LCMResponseWrapper; import org.onap.policy.controlloop.ControlLoopEventStatus; import org.onap.policy.controlloop.VirtualControlLoopEvent; import org.onap.policy.controlloop.ControlLoopException; +import org.onap.policy.controlloop.ControlLoopTargetType; import org.onap.policy.controlloop.Util; import org.onap.policy.controlloop.policy.ControlLoopPolicy; import org.onap.policy.controlloop.policy.PolicyResult; @@ -56,6 +57,7 @@ public class ControlLoopOperationManagerTest { onset = new VirtualControlLoopEvent(); onset.requestID = UUID.randomUUID(); onset.target = "generic-vnf.vnf-name"; + onset.target_type = ControlLoopTargetType.VNF; onset.closedLoopAlarmStart = Instant.now(); onset.AAI = new HashMap<>(); onset.AAI.put("generic-vnf.vnf-name", "testTriggerSource"); -- cgit 1.2.3-korg