diff options
author | 2017-10-24 22:00:08 -0500 | |
---|---|---|
committer | 2017-10-25 09:29:41 -0500 | |
commit | 85b1ada7cc0883aa8b86ea6e11bf86719e1cc10e (patch) | |
tree | 86f4712aa717e1fa5e510c345f887b3e0c11f6c8 /controlloop/common/actors/actor.appc/src/test | |
parent | 7e3ace91847ec5aaccfeeff638a8d2d9b17e45fc (diff) |
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 <dc443y@att.com>
Signed-off-by: daniel <dc443y@att.com>
Diffstat (limited to 'controlloop/common/actors/actor.appc/src/test')
-rw-r--r-- | controlloop/common/actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/AppcServiceProviderTest.java | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/controlloop/common/actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/AppcServiceProviderTest.java b/controlloop/common/actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/AppcServiceProviderTest.java index 5a107f814..31a041d4b 100644 --- a/controlloop/common/actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/AppcServiceProviderTest.java +++ b/controlloop/common/actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/AppcServiceProviderTest.java @@ -29,8 +29,6 @@ import java.util.UUID; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; -import org.onap.policy.aai.AAIGETVnfResponse; -import org.onap.policy.aai.util.AAIException; import org.onap.policy.appc.Request; import org.onap.policy.appc.Response; import org.onap.policy.appc.ResponseCode; @@ -55,7 +53,6 @@ public class AppcServiceProviderTest { private static VirtualControlLoopEvent onsetEvent; private static ControlLoopOperation operation; private static Policy policy; - private static AAIGETVnfResponse aaiResponse; static { /* @@ -94,10 +91,6 @@ public class AppcServiceProviderTest { policy.setRetry(2); policy.setTimeout(300); - /* Construct a mock A&AI response */ - aaiResponse = new AAIGETVnfResponse(); - aaiResponse.vnfID = "vnf01"; - /* Set environment properties */ PolicyEngine.manager.setEnvironmentProperty("aai.url", "http://localhost:6666"); PolicyEngine.manager.setEnvironmentProperty("aai.username", "AAI"); @@ -123,12 +116,7 @@ public class AppcServiceProviderTest { public void constructModifyConfigRequestTest() { Request appcRequest = null; - try { - appcRequest = APPCActorServiceProvider.constructRequest(onsetEvent, operation, policy, aaiResponse); - } catch (AAIException e) { - logger.warn(e.toString()); - fail("no vnfid found"); - } + appcRequest = APPCActorServiceProvider.constructRequest(onsetEvent, operation, policy, "vnf01"); /* The service provider must return a non null APPC request */ assertNotNull(appcRequest); |