summaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors
diff options
context:
space:
mode:
authorRashmi Pujar <rashmi.pujar@bell.ca>2019-10-17 11:43:02 -0400
committerRashmi Pujar <rashmi.pujar@bell.ca>2019-10-17 12:14:10 -0400
commite82e4dfcc6ba261cd8b0129e9d8a62642a54549b (patch)
treeb73e47858e7c1c278d76af9e670372c33cad0adf /models-interactions/model-actors
parent9c2c12756735b0354de68903bbba7bfb55d56863 (diff)
Remove the CDS blueprint name and version from its payload.
This information is redundant since it is included in the request header. Found during integration testing Issue-ID: POLICY-2089 Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca> Change-Id: Icdb4753ccae687f85318f5efeed09d5e13a6853b
Diffstat (limited to 'models-interactions/model-actors')
-rw-r--r--models-interactions/model-actors/actor.cds/src/main/java/org/onap/policy/controlloop/actor/cds/CdsActorServiceProvider.java9
-rw-r--r--models-interactions/model-actors/actor.cds/src/main/java/org/onap/policy/controlloop/actor/cds/beans/CdsActionRequest.java2
2 files changed, 8 insertions, 3 deletions
diff --git a/models-interactions/model-actors/actor.cds/src/main/java/org/onap/policy/controlloop/actor/cds/CdsActorServiceProvider.java b/models-interactions/model-actors/actor.cds/src/main/java/org/onap/policy/controlloop/actor/cds/CdsActorServiceProvider.java
index 272b4e1c3..5501f8618 100644
--- a/models-interactions/model-actors/actor.cds/src/main/java/org/onap/policy/controlloop/actor/cds/CdsActorServiceProvider.java
+++ b/models-interactions/model-actors/actor.cds/src/main/java/org/onap/policy/controlloop/actor/cds/CdsActorServiceProvider.java
@@ -111,11 +111,16 @@ public class CdsActorServiceProvider implements Actor {
}
String cbaName = payload.get(CdsActorConstants.KEY_CBA_NAME);
String cbaVersion = payload.get(CdsActorConstants.KEY_CBA_VERSION);
- String cbaActionName = policy.getRecipe();
+
+ // Retain only the payload by removing CBA name and version once they are extracted
+ // to be put in CDS request header.
+ payload.remove(CdsActorConstants.KEY_CBA_NAME);
+ payload.remove(CdsActorConstants.KEY_CBA_VERSION);
// Embed payload from policy to ConfigDeployRequest object, serialize and inject into grpc request.
+ String cbaActionName = policy.getRecipe();
CdsActionRequest request = new CdsActionRequest();
- request.setConfigDeployProperties(payload);
+ request.setPolicyPayload(payload);
request.setActionName(cbaActionName);
request.setResolutionKey(UUID.randomUUID().toString());
diff --git a/models-interactions/model-actors/actor.cds/src/main/java/org/onap/policy/controlloop/actor/cds/beans/CdsActionRequest.java b/models-interactions/model-actors/actor.cds/src/main/java/org/onap/policy/controlloop/actor/cds/beans/CdsActionRequest.java
index 45fbbca65..32f102382 100644
--- a/models-interactions/model-actors/actor.cds/src/main/java/org/onap/policy/controlloop/actor/cds/beans/CdsActionRequest.java
+++ b/models-interactions/model-actors/actor.cds/src/main/java/org/onap/policy/controlloop/actor/cds/beans/CdsActionRequest.java
@@ -39,7 +39,7 @@ public class CdsActionRequest implements Serializable {
private static final Coder CODER = new StandardCoder();
@SerializedName("policy-payload")
- private Map<String, String> configDeployProperties;
+ private Map<String, String> policyPayload;
@SerializedName("aai-properties")
private Map<String, String> aaiProperties;