aboutsummaryrefslogtreecommitdiffstats
path: root/models/src/main
diff options
context:
space:
mode:
authorSirisha_Manchikanti <sirisha.manchikanti@est.tech>2021-08-31 11:25:34 +0100
committerSirisha_Manchikanti <sirisha.manchikanti@est.tech>2021-09-01 16:48:18 +0100
commit83b5318e545fbc72e3612c4300c4d738b0b577de (patch)
treec4429d0f64b16f510ca00160cd1eb49d91657b45 /models/src/main
parentbd376e1dd5e8ccb1893ef244dcd9e4b1a0686150 (diff)
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 <sirisha.manchikanti@est.tech> Change-Id: I2b98d7dc6946b0c27763f1a150d1bf4adca90a2f
Diffstat (limited to 'models/src/main')
-rw-r--r--models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoopElement.java4
-rw-r--r--models/src/main/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantUpdate.java3
2 files changed, 4 insertions, 3 deletions
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<ParticipantDefinition> 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;
}
}