diff options
Diffstat (limited to 'models-interactions/model-actors/actor.aai')
4 files changed, 19 insertions, 19 deletions
diff --git a/models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiCustomQueryOperation.java b/models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiCustomQueryOperation.java index 54801358c..612fba98d 100644 --- a/models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiCustomQueryOperation.java +++ b/models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiCustomQueryOperation.java @@ -37,10 +37,10 @@ import org.onap.policy.common.endpoints.utils.NetLoggerUtil.EventType; import org.onap.policy.common.utils.coder.StandardCoderObject; import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome; import org.onap.policy.controlloop.actorserviceprovider.OperationProperties; +import org.onap.policy.controlloop.actorserviceprovider.OperationResult; import org.onap.policy.controlloop.actorserviceprovider.impl.HttpOperation; import org.onap.policy.controlloop.actorserviceprovider.parameters.ControlLoopOperationParams; import org.onap.policy.controlloop.actorserviceprovider.parameters.HttpConfig; -import org.onap.policy.controlloop.policy.PolicyResult; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -188,7 +188,7 @@ public class AaiCustomQueryOperation extends HttpOperation<String> { } @Override - public OperationOutcome setOutcome(OperationOutcome outcome, PolicyResult result, Response rawResponse, + public OperationOutcome setOutcome(OperationOutcome outcome, OperationResult result, Response rawResponse, String response) { super.setOutcome(outcome, result, rawResponse, response); diff --git a/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiCustomQueryOperationTest.java b/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiCustomQueryOperationTest.java index 8e8b8f150..5a5e170dd 100644 --- a/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiCustomQueryOperationTest.java +++ b/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiCustomQueryOperationTest.java @@ -53,6 +53,7 @@ import org.onap.policy.common.utils.coder.StandardCoder; import org.onap.policy.common.utils.coder.StandardCoderObject; import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome; import org.onap.policy.controlloop.actorserviceprovider.OperationProperties; +import org.onap.policy.controlloop.actorserviceprovider.OperationResult; import org.onap.policy.controlloop.actorserviceprovider.Util; import org.onap.policy.controlloop.actorserviceprovider.impl.HttpOperation; import org.onap.policy.controlloop.actorserviceprovider.impl.HttpOperator; @@ -60,7 +61,6 @@ import org.onap.policy.controlloop.actorserviceprovider.parameters.ControlLoopOp import org.onap.policy.controlloop.actorserviceprovider.parameters.HttpConfig; import org.onap.policy.controlloop.actorserviceprovider.parameters.HttpParams; import org.onap.policy.controlloop.actorserviceprovider.spi.Actor; -import org.onap.policy.controlloop.policy.PolicyResult; public class AaiCustomQueryOperationTest extends BasicAaiOperation { private static final StandardCoder coder = new StandardCoder(); @@ -120,7 +120,7 @@ public class AaiCustomQueryOperationTest extends BasicAaiOperation { oper.setProperty(OperationProperties.AAI_VSERVER_LINK, MY_LINK); outcome = oper.start().get(); - assertEquals(PolicyResult.SUCCESS, outcome.getResult()); + assertEquals(OperationResult.SUCCESS, outcome.getResult()); assertNotNull(outcome.getResponse()); } @@ -171,7 +171,7 @@ public class AaiCustomQueryOperationTest extends BasicAaiOperation { CompletableFuture<OperationOutcome> future2 = oper.start(); - assertEquals(PolicyResult.SUCCESS, getResult(future2)); + assertEquals(OperationResult.SUCCESS, getResult(future2)); // tenant response should have been cached within the context assertNotNull(context.getProperty(AaiGetTenantOperation.getKey(MY_VSERVER))); @@ -198,7 +198,7 @@ public class AaiCustomQueryOperationTest extends BasicAaiOperation { CompletableFuture<OperationOutcome> future2 = oper.start(); - assertEquals(PolicyResult.SUCCESS, getResult(future2)); + assertEquals(OperationResult.SUCCESS, getResult(future2)); // should not have replaced tenant response assertSame(data, context.getProperty(AaiGetTenantOperation.getKey(MY_VSERVER))); @@ -259,10 +259,10 @@ public class AaiCustomQueryOperationTest extends BasicAaiOperation { @Test public void testSetOutcome() { - outcome = oper.setOutcome(params.makeOutcome(null), PolicyResult.SUCCESS, null, null); + outcome = oper.setOutcome(params.makeOutcome(null), OperationResult.SUCCESS, null, null); assertNull(outcome.getResponse()); - outcome = oper.setOutcome(params.makeOutcome(null), PolicyResult.SUCCESS, null, "{}"); + outcome = oper.setOutcome(params.makeOutcome(null), OperationResult.SUCCESS, null, "{}"); assertTrue(outcome.getResponse() instanceof AaiCqResponse); } @@ -289,7 +289,7 @@ public class AaiCustomQueryOperationTest extends BasicAaiOperation { context.setProperty(AaiGetTenantOperation.getKey(SIM_VSERVER), data); } - private PolicyResult getResult(CompletableFuture<OperationOutcome> future2) + private OperationResult getResult(CompletableFuture<OperationOutcome> future2) throws InterruptedException, ExecutionException, TimeoutException { executor.runAll(100); diff --git a/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetPnfOperationTest.java b/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetPnfOperationTest.java index 13b5b5926..84f28210e 100644 --- a/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetPnfOperationTest.java +++ b/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetPnfOperationTest.java @@ -43,9 +43,9 @@ import org.onap.policy.common.utils.coder.StandardCoder; import org.onap.policy.common.utils.coder.StandardCoderObject; import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome; import org.onap.policy.controlloop.actorserviceprovider.OperationProperties; +import org.onap.policy.controlloop.actorserviceprovider.OperationResult; import org.onap.policy.controlloop.actorserviceprovider.parameters.HttpConfig; import org.onap.policy.controlloop.actorserviceprovider.parameters.HttpParams; -import org.onap.policy.controlloop.policy.PolicyResult; public class AaiGetPnfOperationTest extends BasicAaiOperation { private static final String INPUT_FIELD = "input"; @@ -100,7 +100,7 @@ public class AaiGetPnfOperationTest extends BasicAaiOperation { oper.setProperty(OperationProperties.AAI_TARGET_ENTITY, "OzVServer"); outcome = oper.start().get(); - assertEquals(PolicyResult.SUCCESS, outcome.getResult()); + assertEquals(OperationResult.SUCCESS, outcome.getResult()); assertTrue(outcome.getResponse() instanceof StandardCoderObject); } @@ -117,7 +117,7 @@ public class AaiGetPnfOperationTest extends BasicAaiOperation { oper.setProperty(OperationProperties.AAI_TARGET_ENTITY, "getFail"); outcome = oper.start().get(); - assertEquals(PolicyResult.FAILURE, outcome.getResult()); + assertEquals(OperationResult.FAILURE, outcome.getResult()); } @Test @@ -139,7 +139,7 @@ public class AaiGetPnfOperationTest extends BasicAaiOperation { executor.runAll(100); assertTrue(future2.isDone()); - assertEquals(PolicyResult.SUCCESS, future2.get().getResult()); + assertEquals(OperationResult.SUCCESS, future2.get().getResult()); // data should have been cached within the context StandardCoderObject data = context.getProperty(AaiGetPnfOperation.getKey(TARGET_ENTITY)); @@ -167,7 +167,7 @@ public class AaiGetPnfOperationTest extends BasicAaiOperation { executor.runAll(100); assertTrue(future2.isDone()); - assertEquals(PolicyResult.FAILURE, future2.get().getResult()); + assertEquals(OperationResult.FAILURE, future2.get().getResult()); // data should NOT have been cached within the context assertNull(context.getProperty(AaiGetPnfOperation.getKey(TARGET_ENTITY))); diff --git a/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetTenantOperationTest.java b/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetTenantOperationTest.java index 11604cdb9..cf9a7a6a1 100644 --- a/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetTenantOperationTest.java +++ b/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetTenantOperationTest.java @@ -43,9 +43,9 @@ import org.onap.policy.common.utils.coder.StandardCoder; import org.onap.policy.common.utils.coder.StandardCoderObject; import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome; import org.onap.policy.controlloop.actorserviceprovider.OperationProperties; +import org.onap.policy.controlloop.actorserviceprovider.OperationResult; import org.onap.policy.controlloop.actorserviceprovider.parameters.HttpConfig; import org.onap.policy.controlloop.actorserviceprovider.parameters.HttpParams; -import org.onap.policy.controlloop.policy.PolicyResult; public class AaiGetTenantOperationTest extends BasicAaiOperation { private static final String INPUT_FIELD = "input"; @@ -100,7 +100,7 @@ public class AaiGetTenantOperationTest extends BasicAaiOperation { oper.setProperty(OperationProperties.AAI_TARGET_ENTITY, "OzVServer"); outcome = oper.start().get(); - assertEquals(PolicyResult.SUCCESS, outcome.getResult()); + assertEquals(OperationResult.SUCCESS, outcome.getResult()); assertTrue(outcome.getResponse() instanceof StandardCoderObject); } @@ -117,7 +117,7 @@ public class AaiGetTenantOperationTest extends BasicAaiOperation { oper.setProperty(OperationProperties.AAI_TARGET_ENTITY, "failedVserver"); outcome = oper.start().get(); - assertEquals(PolicyResult.FAILURE, outcome.getResult()); + assertEquals(OperationResult.FAILURE, outcome.getResult()); } @Test @@ -139,7 +139,7 @@ public class AaiGetTenantOperationTest extends BasicAaiOperation { executor.runAll(100); assertTrue(future2.isDone()); - assertEquals(PolicyResult.SUCCESS, future2.get().getResult()); + assertEquals(OperationResult.SUCCESS, future2.get().getResult()); // data should have been cached within the context StandardCoderObject data = context.getProperty(AaiGetTenantOperation.getKey(TARGET_ENTITY)); @@ -167,7 +167,7 @@ public class AaiGetTenantOperationTest extends BasicAaiOperation { executor.runAll(100); assertTrue(future2.isDone()); - assertEquals(PolicyResult.FAILURE, future2.get().getResult()); + assertEquals(OperationResult.FAILURE, future2.get().getResult()); // data should NOT have been cached within the context assertNull(context.getProperty(AaiGetTenantOperation.getKey(TARGET_ENTITY))); |