summaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors/actor.appc/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'models-interactions/model-actors/actor.appc/src/main')
-rw-r--r--models-interactions/model-actors/actor.appc/src/main/java/org/onap/policy/controlloop/actor/appc/AppcActorServiceProvider.java2
-rw-r--r--models-interactions/model-actors/actor.appc/src/main/java/org/onap/policy/controlloop/actor/appc/AppcOperation.java21
-rw-r--r--models-interactions/model-actors/actor.appc/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor (renamed from models-interactions/model-actors/actor.appc/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorServiceProvider.spi.Actor)0
3 files changed, 19 insertions, 4 deletions
diff --git a/models-interactions/model-actors/actor.appc/src/main/java/org/onap/policy/controlloop/actor/appc/AppcActorServiceProvider.java b/models-interactions/model-actors/actor.appc/src/main/java/org/onap/policy/controlloop/actor/appc/AppcActorServiceProvider.java
index f6a204540..76aa828c1 100644
--- a/models-interactions/model-actors/actor.appc/src/main/java/org/onap/policy/controlloop/actor/appc/AppcActorServiceProvider.java
+++ b/models-interactions/model-actors/actor.appc/src/main/java/org/onap/policy/controlloop/actor/appc/AppcActorServiceProvider.java
@@ -42,7 +42,7 @@ import org.slf4j.LoggerFactory;
public class AppcActorServiceProvider extends BidirectionalTopicActor<BidirectionalTopicActorParams> {
- private static final String NAME = "APPC";
+ public static final String NAME = "APPC";
private static final Logger logger = LoggerFactory.getLogger(AppcActorServiceProvider.class);
diff --git a/models-interactions/model-actors/actor.appc/src/main/java/org/onap/policy/controlloop/actor/appc/AppcOperation.java b/models-interactions/model-actors/actor.appc/src/main/java/org/onap/policy/controlloop/actor/appc/AppcOperation.java
index 7d4af80ad..dc46f1253 100644
--- a/models-interactions/model-actors/actor.appc/src/main/java/org/onap/policy/controlloop/actor/appc/AppcOperation.java
+++ b/models-interactions/model-actors/actor.appc/src/main/java/org/onap/policy/controlloop/actor/appc/AppcOperation.java
@@ -24,6 +24,7 @@ import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.UUID;
+import java.util.concurrent.CompletableFuture;
import org.onap.policy.appc.CommonHeader;
import org.onap.policy.appc.Request;
import org.onap.policy.appc.Response;
@@ -67,6 +68,14 @@ public abstract class AppcOperation extends BidirectionalTopicOperation<Request,
}
/**
+ * Starts the GUARD.
+ */
+ @Override
+ protected CompletableFuture<OperationOutcome> startPreprocessorAsync() {
+ return startGuardAsync();
+ }
+
+ /**
* Makes a request, given the target VNF. This is a support function for
* {@link #makeRequest(int)}.
*
@@ -104,10 +113,16 @@ public abstract class AppcOperation extends BidirectionalTopicOperation<Request,
* @param source source from which to get the values
* @param target where to place the decoded values
*/
- private static void convertPayload(Map<String, String> source, Map<String, Object> target) {
- for (Entry<String, String> ent : source.entrySet()) {
+ private static void convertPayload(Map<String, Object> source, Map<String, Object> target) {
+ for (Entry<String, Object> ent : source.entrySet()) {
+ Object value = ent.getValue();
+ if (value == null) {
+ target.put(ent.getKey(), null);
+ continue;
+ }
+
try {
- target.put(ent.getKey(), coder.decode(ent.getValue(), Object.class));
+ target.put(ent.getKey(), coder.decode(value.toString(), Object.class));
} catch (CoderException e) {
logger.warn("cannot decode JSON value {}: {}", ent.getKey(), ent.getValue(), e);
diff --git a/models-interactions/model-actors/actor.appc/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorServiceProvider.spi.Actor b/models-interactions/model-actors/actor.appc/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor
index f1002a301..f1002a301 100644
--- a/models-interactions/model-actors/actor.appc/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorServiceProvider.spi.Actor
+++ b/models-interactions/model-actors/actor.appc/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor