aboutsummaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors/actor.cds/src
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2020-11-18 10:44:41 -0500
committerJim Hahn <jrh3@att.com>2020-11-20 11:49:01 -0500
commit1dd41890f83702d47c5a957493046433989ef36c (patch)
tree4271931cf6ca6e7c43141cc600bd8351015be294 /models-interactions/model-actors/actor.cds/src
parentca468c57a4d09842f2608e32da74b30eba52d015 (diff)
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 <jrh3@att.com>
Diffstat (limited to 'models-interactions/model-actors/actor.cds/src')
-rw-r--r--models-interactions/model-actors/actor.cds/src/test/java/org/onap/policy/controlloop/actor/cds/GrpcOperationTest.java9
1 files changed, 4 insertions, 5 deletions
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<String, Object> 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);