aboutsummaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors/actor.sdnr/src/main
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2020-08-21 13:43:08 -0400
committerJim Hahn <jrh3@att.com>2020-10-27 14:55:15 -0400
commit19ef8b24a98c09a349e6ae7309f535a0135463f6 (patch)
treed988e5a58865ae6f3a38dcb31e4f195f18e59946 /models-interactions/model-actors/actor.sdnr/src/main
parent6b29d2c19e288148171db0c0e446e18dcd46effd (diff)
Make Actors event-agnostic
Removed event and event-context code from the Actor code. Also removed the preprocessing steps from the Actor code, giving the application complete control over any preprocessing. Also fixed a bug wherein the APPC actor was treating the AAI_RESOURCE_VNF property as a String instead of as a GenericVnf. Issue-ID: POLICY-2746-actor Change-Id: Ibc05fe39ffedc0bc461abf10e6a960861ac70119 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'models-interactions/model-actors/actor.sdnr/src/main')
-rw-r--r--models-interactions/model-actors/actor.sdnr/src/main/java/org/onap/policy/controlloop/actor/sdnr/SdnrOperation.java22
1 files changed, 1 insertions, 21 deletions
diff --git a/models-interactions/model-actors/actor.sdnr/src/main/java/org/onap/policy/controlloop/actor/sdnr/SdnrOperation.java b/models-interactions/model-actors/actor.sdnr/src/main/java/org/onap/policy/controlloop/actor/sdnr/SdnrOperation.java
index 308ddd9bd..14f77a687 100644
--- a/models-interactions/model-actors/actor.sdnr/src/main/java/org/onap/policy/controlloop/actor/sdnr/SdnrOperation.java
+++ b/models-interactions/model-actors/actor.sdnr/src/main/java/org/onap/policy/controlloop/actor/sdnr/SdnrOperation.java
@@ -21,7 +21,6 @@
package org.onap.policy.controlloop.actor.sdnr;
import java.util.List;
-import java.util.concurrent.CompletableFuture;
import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome;
import org.onap.policy.controlloop.actorserviceprovider.OperationProperties;
import org.onap.policy.controlloop.actorserviceprovider.OperationResult;
@@ -70,11 +69,6 @@ public class SdnrOperation extends BidirectionalTopicOperation<PciMessage, PciMe
return List.of(getSubRequestId());
}
- @Override
- protected CompletableFuture<OperationOutcome> startPreprocessorAsync() {
- return startGuardAsync();
- }
-
/*
* NOTE: This should avoid throwing exceptions, so that a ControlLoopResponse can be
* added to the outcome. Consequently, it returns FAILURE if a required field is
@@ -156,7 +150,7 @@ public class SdnrOperation extends BidirectionalTopicOperation<PciMessage, PciMe
requestCommonHeader.setSubRequestId(subRequestId);
sdnrRequest.setCommonHeader(requestCommonHeader);
- sdnrRequest.setPayload(getEventPayload());
+ sdnrRequest.setPayload(getProperty(OperationProperties.EVENT_PAYLOAD));
sdnrRequest.setAction(params.getOperation());
/*
@@ -169,18 +163,4 @@ public class SdnrOperation extends BidirectionalTopicOperation<PciMessage, PciMe
/* Return the request to be sent through dmaap. */
return dmaapRequest;
}
-
- /**
- * Gets the event payload, first checking for it in the properties and then in the
- * event.
- *
- * @return the event payload
- */
- protected String getEventPayload() {
- if (containsProperty(OperationProperties.EVENT_PAYLOAD)) {
- return getProperty(OperationProperties.EVENT_PAYLOAD);
- }
-
- return params.getContext().getEvent().getPayload();
- }
}