From 1dd41890f83702d47c5a957493046433989ef36c Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Wed, 18 Nov 2020 10:44:41 -0500 Subject: Delete preprocessed flag from actors Removed the "preprocessed" flag from the Actor parameter class, now that the actors no longer have a startPreprocess() method. Also removed targetEntity from Actor parameter class. Created a makeOutcome method within OperationPartial, which is used to create an initial outcome whose target field is pre-populated with the target-entity extracted from the properties. As the meaning of "target" may be specific to an operation, the makeOutcome method may be overridden by an operation subclass. Issue-ID: POLICY-2804 Change-Id: Ifb66de63301d644e69340009593513773ee5672d Signed-off-by: Jim Hahn --- .../org/onap/policy/controlloop/actor/cds/GrpcOperationTest.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'models-interactions/model-actors/actor.cds/src') diff --git a/models-interactions/model-actors/actor.cds/src/test/java/org/onap/policy/controlloop/actor/cds/GrpcOperationTest.java b/models-interactions/model-actors/actor.cds/src/test/java/org/onap/policy/controlloop/actor/cds/GrpcOperationTest.java index da069d83e..f83f782d9 100644 --- a/models-interactions/model-actors/actor.cds/src/test/java/org/onap/policy/controlloop/actor/cds/GrpcOperationTest.java +++ b/models-interactions/model-actors/actor.cds/src/test/java/org/onap/policy/controlloop/actor/cds/GrpcOperationTest.java @@ -64,7 +64,6 @@ import org.onap.policy.simulators.CdsSimulator; import org.onap.policy.simulators.Util; public class GrpcOperationTest { - private static final String TARGET_ENTITY = "entity"; private static final String MY_VNF = "my-vnf"; private static final String MY_SVC_ID = "my-service-instance-id"; private static final String RESOURCE_ID = "my-resource-id"; @@ -125,7 +124,7 @@ public class GrpcOperationTest { targetEntityIds.put(ControlLoopOperationParams.PARAMS_ENTITY_RESOURCEID, RESOURCE_ID); params = ControlLoopOperationParams.builder().actor(CdsActorConstants.CDS_ACTOR).operation(GrpcOperation.NAME) - .requestId(REQUEST_ID).actorService(new ActorService()).targetEntity(TARGET_ENTITY) + .requestId(REQUEST_ID).actorService(new ActorService()) .build(); } @@ -137,9 +136,9 @@ public class GrpcOperationTest { Map payload = Map.of("artifact_name", "my_artifact", "artifact_version", "1.0"); params = ControlLoopOperationParams.builder().actor(CdsActorConstants.CDS_ACTOR).operation("subscribe") - .requestId(REQUEST_ID).actorService(new ActorService()).targetEntity(TARGET_ENTITY) + .requestId(REQUEST_ID).actorService(new ActorService()) .retry(0).timeoutSec(5).executor(blockingExecutor).payload(payload) - .preprocessed(true).build(); + .build(); cdsProps.setHost("localhost"); cdsProps.setPort(sim.getPort()); @@ -231,7 +230,7 @@ public class GrpcOperationTest { ControlLoopOperationParams params = ControlLoopOperationParams.builder().actor(CdsActorConstants.CDS_ACTOR) .operation(GrpcOperation.NAME).requestId(REQUEST_ID).actorService(new ActorService()) - .targetType(targetType).targetEntity(TARGET_ENTITY).payload(payloadMap).build(); + .targetType(targetType).payload(payloadMap).build(); GrpcConfig config = new GrpcConfig(executor, cdsProps); operation = new GrpcOperation(params, config); -- cgit 1.2.3-korg