From 83b5318e545fbc72e3612c4300c4d738b0b577de Mon Sep 17 00:00:00 2001 From: Sirisha_Manchikanti Date: Tue, 31 Aug 2021 11:25:34 +0100 Subject: Send ToscaServiceTemplateFragment with policies, policy-types ToscaServiceTemplateFragment contains policies, policy-types and respective datatypes to be sent to Policy participant, and there on to Policy Framework to create new policies or policy-types that doesnot exist in the database. https://wiki.onap.org/display/DW/The+CLAMP+Policy+Framework+Participant Issue-ID: POLICY-3607 Signed-off-by: Sirisha_Manchikanti Change-Id: I2b98d7dc6946b0c27763f1a150d1bf4adca90a2f --- .../controlloop/models/controlloop/concepts/ControlLoopElement.java | 4 ++++ .../models/messages/dmaap/participant/ParticipantUpdate.java | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'models/src') diff --git a/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoopElement.java b/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoopElement.java index b99759eb3..67bcb5348 100644 --- a/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoopElement.java +++ b/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoopElement.java @@ -31,6 +31,7 @@ import lombok.ToString; import org.onap.policy.models.base.PfConceptKey; import org.onap.policy.models.base.PfUtils; import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier; +import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate; /** * Class to represent a control loop instance. @@ -57,6 +58,8 @@ public class ControlLoopElement { @NonNull private ControlLoopOrderedState orderedState = ControlLoopOrderedState.UNINITIALISED; + private ToscaServiceTemplate toscaServiceTemplateFragment; + private String description; private ClElementStatistics clElementStatistics; @@ -77,6 +80,7 @@ public class ControlLoopElement { this.participantId = new ToscaConceptIdentifier(otherElement.participantId); this.state = otherElement.state; this.orderedState = otherElement.orderedState; + this.toscaServiceTemplateFragment = otherElement.toscaServiceTemplateFragment; this.description = otherElement.description; this.clElementStatistics = otherElement.clElementStatistics; this.commonPropertiesMap = PfUtils.mapMap(otherElement.commonPropertiesMap, UnaryOperator.identity()); diff --git a/models/src/main/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantUpdate.java b/models/src/main/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantUpdate.java index 5c1b67905..51cce5377 100644 --- a/models/src/main/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantUpdate.java +++ b/models/src/main/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantUpdate.java @@ -41,8 +41,6 @@ public class ParticipantUpdate extends ParticipantMessage { // A list of updates to ParticipantDefinitions private List participantDefinitionUpdates = new ArrayList<>(); - private ToscaServiceTemplate toscaServiceTemplate = new ToscaServiceTemplate(); - /** * Constructor for instantiating ParticipantUpdate class with message name. * @@ -61,6 +59,5 @@ public class ParticipantUpdate extends ParticipantMessage { this.participantDefinitionUpdates = PfUtils.mapList(source.participantDefinitionUpdates, ParticipantDefinition::new); - this.toscaServiceTemplate = source.toscaServiceTemplate; } } -- cgit 1.2.3-korg