From 466783f7638c9173f08a63d51af2c799c0a63598 Mon Sep 17 00:00:00 2001 From: FrancescoFioraEst Date: Tue, 31 Aug 2021 15:55:59 +0100 Subject: Verify alignment with Definition of TOSCA Control Loop Types Issue-ID: POLICY-3612 Change-Id: I818f80cdc1db98752a7791ef4aba7377add66516 Signed-off-by: FrancescoFioraEst --- .../participant/intermediary/handler/ParticipantHandler.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'participant/participant-intermediary') 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 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; -- cgit 1.2.3-korg