summaryrefslogtreecommitdiffstats
path: root/participant/participant-intermediary/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'participant/participant-intermediary/src/main')
-rw-r--r--participant/participant-intermediary/src/main/java/org/onap/policy/clamp/controlloop/participant/intermediary/handler/ParticipantHandler.java7
1 files changed, 3 insertions, 4 deletions
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 49ad6dab1..134bda6bb 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
@@ -296,7 +296,7 @@ public class ParticipantHandler {
if (toscaServiceTemplate != null) {
// This message is to commission the controlloop
for (ParticipantDefinition participantDefinition : participantUpdateMsg.getParticipantDefinitionUpdates()) {
- if (participantDefinition.getParticipantId().equals(participantType)) {
+ if (participantDefinition.getParticipantType().equals(participantType)) {
clElementDefsOnThisParticipant.clear();
clElementDefsOnThisParticipant.addAll(participantDefinition.getControlLoopElementDefinitionList());
break;
@@ -347,12 +347,11 @@ public class ParticipantHandler {
heartbeat.setControlLoopInfoList(getControlLoopInfoList());
if (responseToParticipantStatusReq) {
- List<ParticipantDefinition> participantDefinitionUpdates = new ArrayList<>();
ParticipantDefinition participantDefinition = new ParticipantDefinition();
participantDefinition.setParticipantId(participantId);
+ participantDefinition.setParticipantType(participantType);
participantDefinition.setControlLoopElementDefinitionList(clElementDefsOnThisParticipant);
- participantDefinitionUpdates.add(participantDefinition);
- heartbeat.setParticipantDefinitionUpdates(participantDefinitionUpdates);
+ heartbeat.setParticipantDefinitionUpdates(List.of(participantDefinition));
}
return heartbeat;