summaryrefslogtreecommitdiffstats
path: root/participant/participant-intermediary
diff options
context:
space:
mode:
authorSirisha_Manchikanti <sirisha.manchikanti@est.tech>2021-07-27 17:24:44 +0100
committerSirisha_Manchikanti <sirisha.manchikanti@est.tech>2021-07-29 08:59:27 +0100
commit2d351b432d28c0d9bda0dbeaac994b030e3b6f82 (patch)
treeeeb9e82baae554ea395a0e62a19e54da1847fa13 /participant/participant-intermediary
parentd5c645873589e0b56a6ad0edd5bd0d480896f765 (diff)
Updates to participant messages
Updated participant messages according to https://wiki.onap.org/display/DW/The+CLAMP+Control+Loop+Participant+Protocol Issue-ID: POLICY-3416 Signed-off-by: Sirisha_Manchikanti <sirisha.manchikanti@est.tech> Change-Id: Idef19bee05116f11690c7aca0493e731dd128e06
Diffstat (limited to 'participant/participant-intermediary')
-rw-r--r--participant/participant-intermediary/src/main/java/org/onap/policy/clamp/controlloop/participant/intermediary/handler/ControlLoopHandler.java7
-rw-r--r--participant/participant-intermediary/src/main/java/org/onap/policy/clamp/controlloop/participant/intermediary/handler/ParticipantHandler.java2
2 files changed, 6 insertions, 3 deletions
diff --git a/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/controlloop/participant/intermediary/handler/ControlLoopHandler.java b/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/controlloop/participant/intermediary/handler/ControlLoopHandler.java
index e1a7e7fdf..c9da1279d 100644
--- a/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/controlloop/participant/intermediary/handler/ControlLoopHandler.java
+++ b/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/controlloop/participant/intermediary/handler/ControlLoopHandler.java
@@ -31,6 +31,7 @@ import org.apache.commons.collections4.CollectionUtils;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ClElementStatistics;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoop;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoopElement;
+import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoopElementDefinition;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoopOrderedState;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoopState;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoops;
@@ -177,7 +178,8 @@ public class ControlLoopHandler {
*
* @param updateMsg the update message
*/
- public void handleControlLoopUpdate(ControlLoopUpdate updateMsg) {
+ public void handleControlLoopUpdate(ControlLoopUpdate updateMsg,
+ Map<UUID, ControlLoopElementDefinition> clElementDefinitions) {
if (!updateMsg.appliesTo(participantType, participantId)) {
return;
@@ -211,7 +213,8 @@ public class ControlLoopHandler {
for (ControlLoopElementListener clElementListener : listeners) {
try {
for (ControlLoopElement element : updateMsg.getControlLoop().getElements().values()) {
- clElementListener.controlLoopElementUpdate(element, updateMsg.getControlLoopDefinition());
+ clElementListener.controlLoopElementUpdate(element,
+ clElementDefinitions.get(element.getId()).getControlLoopElementToscaServiceTemplate());
}
} catch (PfModelException e) {
LOGGER.debug("Control loop element update failed {}", updateMsg.getControlLoopId());
diff --git a/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/controlloop/participant/intermediary/handler/ParticipantHandler.java b/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/controlloop/participant/intermediary/handler/ParticipantHandler.java
index ed1da5819..9daff7239 100644
--- a/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/controlloop/participant/intermediary/handler/ParticipantHandler.java
+++ b/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/controlloop/participant/intermediary/handler/ParticipantHandler.java
@@ -115,7 +115,7 @@ public class ParticipantHandler implements Closeable {
* @param updateMsg the update message
*/
public void handleControlLoopUpdate(ControlLoopUpdate updateMsg) {
- controlLoopHandler.handleControlLoopUpdate(updateMsg);
+ controlLoopHandler.handleControlLoopUpdate(updateMsg, clElementDefsOnThisParticipant);
}
/**