diff options
author | Jim Hahn <jrh3@att.com> | 2020-03-23 15:04:46 -0400 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2020-03-23 16:03:48 -0400 |
commit | 56bc6f68baeb376b99e0dbe4de4790f494dbe3c2 (patch) | |
tree | 70e5282b76cbe48aa63bcdd4a88f67c3a4919c44 /models-interactions/model-actors/actorServiceProvider/src/main | |
parent | ef5768de060c6cbf10b06569e00617b052dc7e61 (diff) |
New Guard actor request structure is incorrect
Missing various fields within the request structure (e.g.,
ONAPName). Fixed.
In the process, also modified makeGuardPayload() so that it
only constructs the inner "guard" JSON object, making it easier
for invoking code to modify it.
Issue-ID: POLICY-2434
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I7d34a279845bb98425caf66565eab7513d310815
Diffstat (limited to 'models-interactions/model-actors/actorServiceProvider/src/main')
-rw-r--r-- | models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/impl/OperationPartial.java | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/impl/OperationPartial.java b/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/impl/OperationPartial.java index cdbdc2af5..a9d7f4e58 100644 --- a/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/impl/OperationPartial.java +++ b/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/impl/OperationPartial.java @@ -230,14 +230,7 @@ public abstract class OperationPartial implements Operation { */ protected CompletableFuture<OperationOutcome> startGuardAsync() { // get the guard payload - Map<String, Object> guardPayload = makeGuardPayload(); - - // wrap it in a "resource" - Map<String, Object> resource = new LinkedHashMap<>(); - resource.put("guard", guardPayload); - - Map<String, Object> payload = new LinkedHashMap<>(); - payload.put("resource", resource); + Map<String, Object> payload = makeGuardPayload(); /* * Note: can't use constants from actor.guard, because that would create a @@ -255,7 +248,7 @@ public abstract class OperationPartial implements Operation { protected Map<String, Object> makeGuardPayload() { Map<String, Object> guard = new LinkedHashMap<>(); guard.put("actor", params.getActor()); - guard.put("recipe", params.getOperation()); + guard.put("operation", params.getOperation()); guard.put("target", params.getTargetEntity()); guard.put("requestId", params.getRequestId()); |